scheme

Cross platform (Windows, OSX 10.6) OpenGL development in Scheme

Looking for a version of scheme that will allow me to develop OpenGL applications that run on Windows and Mac OSX. I have tried Spark-Scheme and can't get it to compile on my Mac using OSX 10.6, Chicken scheme gives gcc errors whilst trying to use chicken-install OpenGL. Has anyone had any success with cross platform OpenGL development...

Would a novice learning C and Scheme simultaneously be considered bad practice?

I've been on and off with the C language for the past year(?) until two months prior to present day when I decided to take my learning a bit more seriously. In some areas of the language I feel comfortable, but I know that by anyone's terms I'm still considered an amateur and have much, much more to learn. Recently, I've heard nothing b...

Possible "boat loads" question

You know the river-crossing problems. Here is a sort description: Once upon a time, three cannibals were guiding three missionaries through a jungle. They were on their way to the nearest mission station. After some time, they arrived at a wide river, filled with deadly snakes and fish. There was no way to cross the river without a b...

Mauritus national flag problem

I've made a solution for the Dutch national flag problem already. But this time, I want to try something more difficult: the Mauritus national flag problem - 4 colours, instead of 3. Any suggestions for an effective algorithm? Basically, The Mauritius National Flag Problem focuses on how you would be able to sort the given list of pair...

How do I wrap an REPL using .NET?

I'm trying to make a .NET wrapper for an REPL (specifically Scheme, but I haven't got to where it matters). I looked for some sort of expect-style library, but I couldn't find one, so I've been using a System.Diagnostics.Process. I don't think I'm succeeding at reading and writing correctly. Here's my code; it's in IronPython, but I h...

How are coroutines implemented?

I have a question about coroutine implementation. I saw coroutine first on Lua and stackless-python. I could understand the concept of it, and how to use yield keyword, but I cannot figure out how it is implemented. Can I get some explanation about them? ...

MAURITIUS NATIONAL FLAG PROBLEM.

Possible Duplicate: Mauritus national flag problem Scheme Programming Sample Input: ( (R . 3) (G . 6) (Y . 1) (B . 2) (Y . 7) (G . 3) (R . 1) (B . 8) ) Output: ( (R . 1) (R . 3) (B . 2) (B . 8) (Y . 1) (Y . 7) (G . 3) (G . 6) ) Basically, The Mauritius National Flag Problem focuses on how you would be able to sort the gi...

Is it possible to implement coroutines using only LISP primitives?

First, I'm a LISP newbie. What I want to get is a cooperative micro-threading feature. And this can be gained with coroutine. As I know, Scheme supports coroutines via continuations. However, not all Scheme implementation may have continuations. If so, can I add a continuation feature with only LISP primitives? ...

Starting examples in 'The Little Schemer'

Hello, I am reading 'The Little Schemer' in an effort to better understand some of the core elements of programming (namely recursion) and to get more of an idea how to think like a programmer. The book comes recommended as an entry-level book and the introduction states that all I need to know are English, numbers and counting (which ...

Scheme and Clojure don't have the atom type predicate - is this by design?

Common LISP and Emacs LISP have the atom type predicate. Scheme and Clojure don't have it. http://hyperpolyglot.wikidot.com/lisp Is there a design reason for this - or is it just not an essential function to include in the API? ...

How many primitives does it take to build a LISP machine? Ten, seven or five?

On this site they say there are 10 LISP primitives. The primitives are: atom, quote, eq, car, cdr, cons, cond, lambda, label, apply. http://hyperpolyglot.wikidot.com/lisp#ten-primitives Stevey reckons there are seven (or five): Its part of the purity of the idea of LISP: you only need the seven (or is it five?) primitives to build ...

What are the advantages of scheme macros?

Why would anyone prefer Scheme macros over Common Lisp macros (and I genuinely want to know too, I'm not trying to be a troll)? My experience as a Lisp newb is that Common Lisp style macros are much easier to learn than Scheme's macros. I have yet to see any advantages to Scheme's macros, but of course that doesn't mean they don't exis...

Gambit-C and Chicken comparison?

What's the difference between Gambit-C and Chicken? ...

How to undefine a variable in Scheme?

How to undefine a variable in Scheme? Is this possible? ...

What is it about a single namespace that leads to unhygienic macros? (in LISP)

Some claim that a single namespace in LISP leads to unhygienic macros. http://community.schemewiki.org/?hygiene-versus-gensym http://www.nhplace.com/kent/Papers/Technical-Issues.html What precisely is it about having single, dual or multiple namespaces that leads to macro hygiene? ...

What POOP frameworks exist for Lisp and Scheme.

What all nice POOP (Prototype-based Object-oriented Programming) Frameworks exists in Lisp and Scheme I know one * Sheeple But I did not find any other. ...

Guile Scheme and CGI?

I recently discovered that CGI scripts can be written in pretty much any language that can print to stdout. I've written a small guile cgi script that works on my local apache install, but not on my shared host: #!/usr/local/bin/guile -s !# (display "Content-Type: text/html") (newline) (newline) (display "hi") (newline) This is the o...

Scheme: why this result when redefining a predefined operator?

I received an unexpected result when redefining the + operator in a scheme program using guile. I should point out that this occurred while experimenting to try to understand the language; there's no attempt here to write a useful program. Here's the code: (define (f a b) 4) (define (show) (display (+ 2 2)) (display ",") (display (f...

Scheme or Common Lisp?

Hello! I am an intermediate programmer, and have decided to learn either common lisp or scheme. My question is simple, which one would you choose? I don't care much for the difficulty of the syntax, just the power, flexibility, and other aspects of the language itself. Also, which implementation of either common lisp or scheme should I c...

Defining the defmacro function using only LISP primitives?

McCarthy's Elementary S-functions and predicates were atom, eq, car, cdr, cons He then went on to add to his basic notation, to enable writing what he called S-functions: quote, cond, lambda, label On that basis, we'll call these "the LISP primitives" (although I'm open to an argument about type predicates like numberp) How would you ...