Beating the averages: http://www.paulgraham.com/avg.html
Racket web frameworks: https://github.com/avelino/awesome-racket#web-frameworks
31 karma · joined February 15, 2015
My sites: pragerslaw.com, youpatch.com
Agile/Lean consulting, coaching, training (including technical XP and beyond), facilitation.
Also functional programming (mainly Racket).
Beating the averages: http://www.paulgraham.com/avg.html
Racket web frameworks: https://github.com/avelino/awesome-racket#web-frameworks
Clojure and by extension ClojureScript has a lot of tasteful and pragmatic design decisions, e.g. the use of the threading form and implicit lambda illustrated with the "+ 2").
By contrast Racket has been extended to include a Clojure-inspired threading as a library, showing off just a little of its awesome linguistic extensibility, leading in this case to ergonomically similar code.
Clojure/Script is a wonderful opinionated modern Lisp; Racket is a more linguistically extensible modern Lisp. There's considerable cross-fertilisation going on.
If you love Clojure, it's worth keeping an eye on Racket.
* * *
You can spell λ out as lambda in Racket (and Scheme).
Gene Kim's Clojure example:
; input is JSON string: "{foo: 2}"
(defn xform [s]
(-> (js/JSON.parse s)
js->clj
(update "foo" + 2)
clj->js
js/JSON.stringify))
Racket equivalent: #lang racket
(require threading json)
; input is (xform "{\"foo\" : 2 }")
(define (xform s)
(~> s
string->jsexpr
(hash-update 'foo (λ (x) (+ 2 x)))
jsexpr->string))The example that you give is not an error in full Racket:
Welcome to DrRacket, version 6.12 [3m].
Language: racket, with debugging.
> (cons 'foo 'bar)
'(foo . bar)
Similarly, full Racket has multiple, powerful macro systems, and more besides, deliberately excluded from the Teaching Languages.* * *
I'm not an academic, but the community and core Racket team are incredibly supportive, and any Comp Sci professor running into difficulties teaching a Racket-based course can easily access plenty of support and guidance, starting by contacting the user mailing list.
In this case, the aggregation algorithm not only creates rectangular areas, but also avoids the need for the quilter to have to sew Y-seams.
Here's my talk from RacketCon: https://www.youtube.com/watch?v=8psnTEjYIEA
https://www.amazon.com/How-Design-Programs-Introduction-Prog...
Now there's better compatibility thanks to
#lang planet neil/sicp
Close match to the Python above:
(apply + (range 1 11))
Also at RacketCon 2014 Brian Masterbrook talked about using Racket at www.airstash.com for testing hardware: links at con.racket-lang.org