logoalt Hacker News

coffeemugtoday at 5:48 PM3 repliesview on HN

I've been using Racket to work through The Little Learner[1] and it's been a good experience. You need minimal Racket to work through the book (lambda, let, define, map; I think that's about it). But I branched out to learn more about the language and the standard library, and it's a fun and surprisingly powerful system to explore.

The biggest downside of Racket is that you can't build up your environment incrementally the way you can with Common Lisp/Sly. When you change anything in your source you reload REPL state from scratch. After CL it feels incredibly limiting in a Lisp. Incremental buildup is so valuable, if I wanted to do any Lisp work again I'd reach for CL before Racket just for this reason.

BTW, the book is _great_. Quick, easy to get through, very easy to understand, and teaches you everything from soup to nuts. If you're familiar with lisps you can get through the book in two weeks. It's then easy to get into any deep learning tutorial or project you want, or even start implementing some papers. The book manages not to water down the material despite not using any math at all. Although if you know some linear algebra or multivariable calculus you'll appreciate the beauty of the field more.

[1] https://www.thelittlelearner.com/


Replies

mekentoday at 5:51 PM

> The biggest downside of Racket is that you can't build up your environment incrementally the way you can with Common Lisp/Sly. When you change anything in your source you reload REPL state from scratch.

I don’t quite understand… I’m using Racket in emacs/SLIME and I can eval-last-sexp, regions, etc.

show 1 reply
5kgtoday at 9:58 PM

The Little Learner is a great book. I tried rewriting all the code in Python/JAX while following the Scheme code style as closely as possible, and it worked out great.

The appendix on autodiff is a bit rushed, in my opinion. But in all fairness, the number of pages would probably need to be doubled to give a proper exposition of autodiff.

behnamohtoday at 6:01 PM

> The biggest downside of Racket is that you can't build up your environment incrementally the way you can with Common Lisp/Sly. When you change anything in your source you reload REPL state from scratch.

I think no Lisp is a "true" Lisp if it doesn't provide two critical components of the Lisp experience:

- Live Images

- REPL-driven development

That's why Clojure/Racket and even Scheme are Lisp-y but not a true Lisp. The only true Lisp languages I've found are CL and Janet.

show 2 replies