Racket v5.3
blog.racket-lang.org
blog.racket-lang.org
How does Racket compare?
- Specifically, is the standard library + the stuff available through the PlaneT package manager enough to get by with? How's the community? IRC channel, documentations, etc.?
- How does the language compare when it comes to Clojure's neat features? Atoms, keywords, native syntax for vectors or hashes…
Edit: I also forgot to ask: how's performance? It's a compiled language, right?
Also, the slower startup time of the JVM affects clojure apps and makes simple command line scripts in clojure less attractive
~$ time clj test.clj
Hello world!
real 0m1.337s
user 0m1.309s
sys 0m0.172s
~$ time java Test
Hello world!
real 0m0.142s
user 0m0.116s
sys 0m0.030s
You may want to look at the -XX:+TieredCompilation -Xbootclasspath flags. They reduced the clojure startup significantly for me.I think there's some work going on to address the former. The latter issue isn't really that bad unless you need to use trampoline, which I don't care for because it means the functions have to be written to know they'll be used in this way.
Regardless, Clojure is one of my favorite languages.
http://docs.racket-lang.org/guide/index.html
Nice features: Racket programs run without change on Windows, OS X, and, Linux. The GUI library binds to native backends so everything looks native.
The documentation is very nice.
Got any question? Ask the mailing list or on IRC. http://racket-lang.org/community.html
http://docs.racket-lang.org/guide/intro.html?q=executable...
raco exe
http://docs.racket-lang.org/raco/exe.htmlThe standard library is great. It has a lot of built-in functions/macros that abstract many common Lisp paradigms, similar to what Alexandria was meant to do, but much better (in my opinion). Recently, I was working on a Racket implementation of a project that I'd originally wanted to do in Common Lisp, and I felt practically cheated that so many of the 'hard' parts were compositions of one or two Racket standard functions.
Take a look at the Racket homepage; one of the 'Hello, World' examples on rotation is a web server in ~5 lines of clean, readable Racket.
The community is among the best I've seen in programming languages (IRC channels, etc). Very friendly and helpful.
Documentation is very well-done. My only complaint is that I do have a bias against languages without a strong culture of providing example code in the documentation. Some libraries do this better than others. Overall, I'd say it's far better in this regard than Java and Haskell, but not as good as Python. (I understand that this is also a matter of language design; some languages need this more than others).
As far as Clojure's 'features', I've never found myself a fan of the additional syntax, but if you ask me, Racket solves this problem in a far better way: scoped sub-languages.
Lisp's biggest asset is its ability to create other languages (and other syntaxes) so easily; Racket provides an unbelievably clean way of abstracting this and even mixing code between two dialects. For example, I find myself using Typed Racket (a strongly typed dialect with static type checking), but some functions are only implemented in other dialects. That's no problem; I can mix modules written in different dialects in a fairly straightforward manner.
For me, this was the killer feature that convinced me I needed to start using Racket. Yes, this is possible in Common Lisp (what isn't?) but Racket already had a large and accessible community built around this.
So, if there's anything you miss from Clojure, chances are good that you'll be able to find what you need, between the scoped dialects and well-designed libraries, not to mention Lisp's own powerful tools for recursively defining language features on-the-fly.
I keep waiting for Racket's day to come, because it is a really great system.
Wouldn't surprise me.
I spent a semester there and the staff are hardcore into it. I learnt a lot from Olin Shivers (http://www.ccs.neu.edu/home/shivers/) and he used Racket extensively.
I could not quite find that information on the Wikipedia/website.
AFAIK, Racket the language is somewhat a fork of Scheme, but the Racket environment can run different languages (one of which is 'standard' Scheme).
Racket started as a Scheme but changed name to Racket a few years ago to signal that the racket language is much more than plain standard Scheme. One remarkable thing about Racket is the that the module system allows implementing other languages as modules with relative ease. Included in the Racket distribution is therefore an implementation of R6RS (and R5RS) the most recent standard (R7RS is coming soon).
Also included is implementation is a typed version of Racket, an implementation of a logic programming language and, yes your eyes are not deceiving you, Algol 60.
For the Emacs fans: http://docs.racket-lang.org/guide/Emacs.html?q=emacs
I used to use Emacs, but switched to DrRacket several years ago. It is easy to underestimate DrRacket. Tools like Check Syntax which allows scope respecting renaming of identifiers are one of the benefits of using DrRacket.
I also enjoy being see graphical results directly in the REPL. For example plots. http://docs.racket-lang.org/plot/intro.html?q=plot
There are also green threads for concurrency: http://docs.racket-lang.org/reference/concurrency.html