I've started writing Clojure code for production at Chartboost, and I'm absolutely loving the language. However, its basis on the JVM is a major downer. I decided to go with it over other lisps due to the practicality of the massive standard library, plus some neat language features.
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?
I'm a Racket newcomer (before that I used Common Lisp as my primary Lisp).
The 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 haven't looked at Racket in a long time. Is it possible to make standalone executables? That's one of the reasons I've used Chicken Scheme (http://www.call-cc.org/) for many cross-platform projects with easy deployability.
There is support for packaging programs to run on machines that does not have Racket installed. I haven't tried it for years, so I can't give details. Try it out:
The only downers I care about are stack traces in "Java" rather than Clojure and the lack of TCO in the JVM.
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.
Don't know of big companies, but it used to be called PLT scheme. It's known for it's huge-ass standard library (batteries included style) and being used as an educational tool in a bunch of big tech schools in the US.
Not a big company, but Northeastern University's CS department uses it in their intro course to computer programming. The staff there is all about PL research and I believe they use it pretty extensively in that regard.
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.
Brown University's accelerated intro CS class only uses Racket (http://www.cs.brown.edu/courses/csci0190/2011/). Beautiful language. Everything in the language, including basic core functions, can be built only using lambda
Scheme is so old that there is not one language but rather a family of dialects that are considered Schemes. The Scheme community has several times made a standard on the parts of the language(s) that various implementors can agree on. The standard is small though. All the major Scheme implementations come with many language constructs and libraries not covered by the standard.
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.
I think racket has all the way up to r6rs but much much more. Racket itself is an implementation of the standard, a GUI, a compiler / interpreter, a standard library and then some all rolled into one.
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 always have mitigated feelings about these tools. On the one hand, those features are really appealing. On the other hand, leaving my regular editor prevents me from using its (sometimes heavily configured) text- and code-editing capabilities. Plus I can access all the code I've written for other projects from Emacs, regardless of the language.
That's my concern as well and the reason I went through a bit off an ordeal getting Clojure into emacs, as opposed to falling back on a Clojure editor.
Yes, it does. The JIT compiler doesn't work on ARM, but otherwise it's fine. This blog post explains how one person got Racket on an Android phone w/ARM: http://www.wedesoft.de/racket-on-android.html
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?