Racket v9.1(blog.racket-lang.org)
111 points byazhenley4 hours ago |3 comments
coffeemug3 hours ago
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/

meken3 hours ago
> 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.

coffeemug2 hours ago
Ah, I'm using racketmode which doesn't support live state buildup (and the builtin GUI doesn't either). What exactly is your setup? SLIME only has a Common Lisp backend, it doesn't support Racket to my knowledge.

EDIT: ok with geiser and geiser-racket incremental state buildup works really well. I rescind my objection!

hencq44 minutes ago
I think that should work in racket-mode as well. You can easily send individual sexps to the repl and add to the live state. However, one thing that CL does that Racket doesn't do (afaik) is when you change a data type (e.g. alter a struct), it automatically ensures live code uses the new types. In Racket by contrast I have to either carefully go through all affected forms and send them to the repl, or send the whole buffer to the repl. This does make the whole experience feel more static than in CL.
meken1 hour ago
Oh, my mistake. I'm using Spacemacs and it looks like it's just using racket-mode..?

https://www.spacemacs.org/layers/+lang/racket/README.html

packetlost2 hours ago
I'm guessing via swank: https://github.com/mbal/swank-racket
behnamoh3 hours ago
> 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.

LAC-Tech3 minutes ago
You are not a true LISP unless you use M-Expressions like the LISP 1.5 manual from the 1960s says. S-Expressions are inauthentic.
packetlost2 hours ago
Is this not ultimately a late-binding issue? Maybe I'm missing something, but I've absolutely been able to incrementally build up an environment without resetting using nrepl and Clojure
meken3 hours ago
I learned recently that Racket is an accepted language on LeetCode, which solved the problem “when am I ever going to write lisp in real life…” for me. It’s provided a great excuse.

I have really been enjoying writing it! Paredit and SLIME are addictive.

behnamoh3 hours ago
> LeetCode

> ...real life...

    (≠ "LeetCode" "real life")
meken2 hours ago
For sure. I just meant having some motivating purpose to write Racket.
vrnvu1 hour ago
Brings memories of when I did some chapters of HTDP2 to learn Lisp.

https://htdp.org/2024-11-6/Book/index.html

More accesible than SICP, highly recommended