A Friendly Introduction to Racket

signa11 215 points 114 comments August 22, 2026
geometridae.bearblog.dev · View on Hacker News

Discussion Highlights (20 comments)

em-bee

any time the topic of racket comes up, i wonder if there are any interesting apps i could explore. but all i find is libraries and dev tools: https://awesome-racket.com/

perrygeo

> In The Amazing Digital Circus (episode 8, "hjsakldfhl"), when Kinger opens the terminal to try to reset Caine, you can see that Caine (a creative AI built in 1996) is programmed in Lisp. The file is literally named Caine-core.lisp. Nice touch. Explains how Caine returns in episode 9: Lisp continuations allow for graceful error recovery.

vatsachak

I've never seen the appeal in schemes other than hot reloadability...

mcbk2142

Very cool! Always was interested in racket, I will try writing Black Jack in it!

fn-mote

Much as I am a fan of Racket, this is not a friendly intro. It is a speedrun. When an introduction says “friendly”, I don’t expect it to assume that I know what lambda is. When an introduction says “friendly”, I don’t expect syntax rules to appear in it. At all.

tech_army

Will definitely try it.

zerr

While the language is interesting, sadly, nobody is using it in the wild. Maybe due to cumbersome deployment options? The ability to produce native standalone executables would boost its usage I believe.

usxr1515

I've been designing my own small language runtime in Rust (VM + JIT + AOT backends) mostly as a way to actually understand tradeoffs compiler authors make instead of just reading about them. Racket's approach to macros and language-oriented programming is one of the things I keep coming back to as a reference curious how much of that flexibility comes at a real runtime cost vs. being mostly a compile-time abstraction.

GregBuchholz

> no special syntax for anything. (list '(1. . #\#) -5/6+7.s-8i `(1 ,@2) 1@1 ;hmmm, no unquote splicing comma ;-) 10# ;surprised? (list #i+1 +1i 1+i) ;complicated or complex? #e-1e10i ;Old MacDonald? "(* 9 10)" #())

ux266478

Nothing against Lisp, but to correct the record: > For decades, Lisp was the language of artificial intelligence. [...] Then came the "AI winter," funding dried up, and Lisp went from star to cult language. Lisp had fallen from relevance before then. Only the United States was still using it, and mostly out of technical debt and a stubborn refusal to move on. Prolog displaced it in the late 1970s, and even within the US, the Lisp part was an unfortunate implementation detail to get to a Prolog-shaped object. It's not surprising that the US fell way behind Japan in this area in the 1980s. Anybody who would imply they would take a Lisp machine over a PIM is either not interested in symbolic computation and just likes Lisp, or they're doing so out of total ignorance of how much more advanced the PIMs were for symbolic AI. The cutting edge was with Prolog, and that's still the case today. Nobody's researching MIL in Lisp, even in America.

0x3444ac53

Mild nitpick, but on Janet https://news.ycombinator.com/item?id=26496339

soegaard

Btw - if people are interested in Racket related blogs / articles etc. https://racket-stories.com/

SilentM68

Thanks for sharing. It's been bookmarked :) .-. / λ \ '---'

SA9G

My first language, 1980 in CMU, was Pascal... quickly followed by LISP in CS/AI courses and C for EE courses. I was a big fan of MacLisp at the time, the MIT version that GLS worked on (could see his comments all over the sources). Of course GLS moved on to Scheme and wrote a few definitive papers on closures. Yeah, that was before PC's everywhere... a loooong time ago. (C++ came years and years afterwards, not a fan. I would have stayed with hardware if the ++ version of C was forced on me all those years ago.) GLS moved to CMU in the early 80's... I remember taking "Comparative Programming Languages" from him. Good teacher and impressive guy. In addition to the obvious, he also covered SNOBOL and APL in that course. Memories :-)

ventana

As the article correctly mentions, Lisp as a concept is much older than any of the popular languages used these days; so are the attempts to get more people use it. Most of them are, unfortunately, unsuccessful, because it's probably impossible to understand Lisp after a quick and friendly introduction. I first met Common Lisp during my college years in early 2000s: we had an enthusiast teacher who taught it for free, in his free time; it was interesting for me as a freshman to learn something new, but also I literally had no idea how to write Lisp code properly, without resorting to using `progn` here and there. For those not aware, `progn` is a form that allows you to write expressions in a sequential way, pretty much like you use the C compound statement, a `{ ... }` block. It works, and after some time you find that you're writing in some crappy imperative programming language with a lot of brackets but you don't learn much about the functional programming. It took me more than a year, and definitely more than any short “friendly introduction”, to understand the functional approach. Now, Racket. I first noticed it while doing my daily LeetCode; they added Racket as a supported language and you can go use it to solve a task. After not using Lisp for 20-something years, I appreciated the opportunity, but I found the type contract syntax infuriating. This is LeetCode #1, “Two sum”: (define/contract (two-sum nums target) (-> (listof exact-integer?) exact-integer? (listof exact-integer?)) ) I don't know what you feel, but this makes me want to close this tab and never return. So if I find myself wanting to write some Lisp and there's a daily LeetCode task I want to solve, the first thing I do is I delete all this garbage and come back to the clean option: (define (two-sum nums target) ...) which, except for the minor syntax differences, brings me back to my college Lisp years and I can actually enjoy it.

vermilingua

Another awesome Racket resource: https://beautifulracket.com/

wild_egg

> Emacs Lisp — millions of people run Lisp every day without knowing it, because their editor is a Lisp interpreter. Are there seriously any emacs users who are completely unaware of elisp? Isn't elisp the entire point of picking emacs?

M0THXYZ

Hiii, I'm Geometridae (Astrid Motilla)! A friend from the Racket community mentioned that my article appeared here. Thank you for reading it, and I'll make sure to take all this feedback and these different perspectives into account for this and future articles! :) I’d also encourage you to give it a try and have some fun with it! I’m using it for some of the 3D demos in my book. It’s definitely not a silver bullet, but I’ve found it can be pretty productive. Personally, my favorite Lisps are Racket, Common Lisp, and Clojure, in that order. I’ve also been tempted to give Chicken Scheme a try! :)

M0THXYZ

On a more personal note, for some weird reason, Racket ended up being the language that got me one of my most important contracts. Through a whole series of butterfly-effect events, that eventually led me into CAD software development, which is where I discovered my love for metamaterials. It’s funny how these things happen!

srcreigh

Side note, does anybody know of some good Rhombus codebases I can read?

Semantic search powered by Rivestack pgvector
4,128 stories · 37,281 chunks indexed