Racket v6.2
groups.google.com
groups.google.com
Haskell is used as the pseudo-code for lectures while assignments are written in Racket.
The course was great because the professor (PR) was:
1- Passionate
2- Knowledgeable
3- A kind person
I have found Racket to be a very effective way to make students (most of them have either no CS background or only have played around with imperative/OOP languages) more comfortable with functional programming.
The best memory I have was during the first lecture. After all the administrative fluff, the prof open his pdf and the first slide reads: "Induction"
I remember thinking "Is this a maths or a CS course?"
The second slide defined the set of natural numbers. As the prof start explaining the syntax and its meaning, I slowly start to realize the beauty of those few words:
Data Nat = Z | S Nat
where Z represent 0 and S the successor function.
We define the data type "Nat" to be either zero or the successor function applied to a "Nat".
It was my "ahah" moment. I was mind-blown by the language's clear syntax and immensely powerful semantics. (This is Haskell not Scheme/Racket).
We would later be introduced to lambda calculus (untyped vs typed), infinite data structures, interpreters etc... It was glorious... What a great professor.
The only "downside" to this is that Racket/Scheme isn't very much used outside of Academia. Which is clearly a shame given its incredible built-in features and elegant LISP-like syntax.
Should anyone have insights/opinions on why Racket/Scheme aren't more used, please feel free to share them with us!
I wonder what are the dynamics that makes a programming language popular over another, also what factors come into play?
Python is probably an exception there because it got popular despite the lack of a clear reason (I would argue it was there to fill the vacuum left by Perl). But Rails is what brought Ruby into the mainstream, and C was brought to the mainstream by Unix, and JavaScript was brought to the mainstream by Netscape, and so on.
Lisp never became mainstream because nobody ever wrote a killer app/library/framework/OS in that language. The most popular flavor of Lisp today, Clojure, managed to carve a niche for itself because its community is so practical-minded and has been working on very practical stuff like Om, Storm, Reagent, etc. Hopefully they will find their own killer app one day.
I think three things contributed to its downfall:
1) Perl 6
2) the huge inflow of people into Unix who were not keen on Perl's ultra-Unixy wackiness (let's borrow from bash, awk, regexps and everything under the sun! - fun but not exactly welcoming to require newcomers to learn the entire cultural history of Unix to learn your language)
3) the fact that sysadmin work was quickly graduating from writing scripts that send angry emails when users fill their 20MB home directory quota into managing serious, distributed system that serve as crucial infrastructure, for which the non-wackiness of Python was a better cultural fit (particularly when the role of developer and sysadmin started to merge)
It's not so much that people started rewriting their Perl scripts, it's more like the newcomers who weren't doing Perl soon outnumbered those who were.
Perhaps one other factor is the rise of GNU/Linux and death of Unix. Linux might still be the world's most "self-incompatible" operating system -- but it's a lot more coherent than a mix of various flavours of Unix/Solaris/BSD etc.
Shell scripting makes more sense if you can assume a certain lower common denominator of GNU sed/grep/awk and posix and/or bash. Along with more or less consistent file system layout, location/availability of special files etc.
Add to that the rise of XML, then json, and perls built in regular expressions doesn't set it so far apart any more -- you'll need a library/tool for parsing/serializing anyway.
Still think it a bit odd to call it the "vacuum left by perl" -- it's probably more the flood created by python/ruby/newcomers...
Specifically:
Well designed and communicated homepage.
Modern products and companies using the language. Their websites should look great too.
Boilerplate-free graphical or web app oriented examples.
If a clean, well designed language with good documentation and bite-sized clear intro videos could do this today, it can build momentum.
Ps: I'm a designer who would love to get into programming with Racket.
How to Design Programs is the way to go. It's an amazing book.
For me it is not a book that teaches Racket though - and not a book to pick up web dev in Racket though.
If there was tutorials on how to do Sinatra, Express or Flask style web apps/apis I think people who use those types of frameworks would find it more accessible. And there are a lot of those type of people.
I believe this is what happened:
The first mainstream computer programs were written in imperative (think assembly goto, etc), and became the defacto standard. As new programmers entered, many were taught by older programmers, so they would most likely learn imperative programming. Since it is arguably harder to learn functional programming after imperative programming, (rather than learning functional programming right away), the imperative cycle continued, and here we are today.
I also attended Waterloo CS, and I am really grateful to have been exposed to Racket. I am actually using Racket for my upper year courses as well, which is awesome.
Which upper-year course is using Racket? CS442?
* Python install: 89MB
* Racket install: 417MB
But 190MB of Racket is documentation, and a non-trivial amount goes to the DrRacket IDE.
[1] http://wiki.call-cc.org/chicken-projects/egg-index-4.html
Last time I did some json parsing it was poetry slow. I've also heard the continuation based webserver was slow and uses a lot of memory.
I'll have to benchmark again to be sure. I hope I'm wrong, racket was very enjoyable to use.
See "Low-level web programming in Racket + a wiki in 500 lines" by Matt Might:
Well, I'm not sure what happened to Arc, but I thought that was based off of plt-scheme/racket -- but never ported to recent releases. Which is a shame because racket has certainly improved a lot (possibly not in ways that matter for Arc).
Does anyone know why/what the status is there?
Additionally, while some(?) older(?) versions of hn is open source[1], being based off a dead(?) dialect of an outdated(?) scheme didn't really help.
Other than that, running a really popular niche web site/forum in production should make Arc interesting, which in turn should make racket interesting. But that apparently didn't happen.
Anyone know what hn currently runs (the stack - is it essentially an updated version of[1] -- or something entirely different)?
Other than that recent example of not becoming popular, I think that the focus on education has lead a lot of people to miss how good racket actually is, out of the box.
It does seem to me to have some of the same challenges as other lisps when it comes to deployment -- it's not all that easy to see how to easily tag something for release, run it through CI and deploy it with some predictable success. Not really any technical limitation, more that it's just not obvious. And wasn't something that was highlighted by racket before, at least.
The Racket community has grown the last 5 years, so I would say that Racket is used more.
Now there's better compatibility thanks to
#lang planet neil/sicp