Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best Scheme interpreter or compiler? [closed]

Tags:

scheme

Hey everyone, I want to start using Scheme and I have two questions. First, would you recommend using an interpreter or a compiler for Scheme and why? Second, which interpreter or compiler for Scheme would you recommend and why? Thanks!

like image 450
adhanlon Avatar asked Mar 26 '10 06:03

adhanlon


People also ask

Does scheme use a compiler or interpreter?

Scheme language tutorial. It's true; Scheme is one of the most powerful programming languages. It works with both compilers and interpreters; thus, offering programmers immense flexibility.

What is compiler and interpreter?

A compiler translates the entire source code in a single run. An interpreter translates the entire source code line by line. It consumes less time i.e., it is faster than an interpreter. It consumes much more time than the compiler i.e., it is slower than the compiler. It is more efficient.


2 Answers

I know you already accepted the answer, but for future visitors to this question, I recommend Chicken Scheme. It tends to produce much smaller executables than mzscheme does. Take the following hello world application, for instance:

(define (say-hello name)   (print (string-append "Hello, " name))   (newline))  (say-hello "Earthling") 

Compiled with mzc --exec mztest hello.scm: 3.3M

Compiled with csc hello.scm -o ctest: 16k

And if you're after library support, Chicken provides Eggs Unlimited, which is like PlaneT for mzscheme (or gems for ruby).

like image 193
Shaun Avatar answered Sep 19 '22 15:09

Shaun


For a beginner, I would highly recommend DrRacket (formerly Dr. Scheme), since it gives you a really nice environment to work in, supports many dialects of Scheme, and gives very good failure and debugging information. I believe most implementations of Scheme are interpreters, although it is possible that there is a compiler out there.

If you are a commandline junkie like me, an alternative you might consider is to run the racket interpreter directly, which is essentially the same thing as Dr. Racket, but without the graphical environment and a commandline interface. Or, start your source file with #! /usr/bin/env racket and make it executable with chmod +x source.rkt.

like image 45
Michael Aaron Safyan Avatar answered Sep 18 '22 15:09

Michael Aaron Safyan