For the curious, there is an official YouTube channel with the previous editions https://www.youtube.com/@racketlang/playlists (It usually take a few months until the videos are edited and uploaded.)
Yo! this is cool. I've been doing an interpreted lisp written in OCaml. pricklypear.rocks. https://github.com/sroerick/pricklypear . we are doing cactus driven development. I'll reach out. Would love to compare notes.
It's a common way to implement OO in Lisp-y languages, and it fits if you're taking Smalltalk as an inspiration. SICP has an example in chapter 3 (IIRC) of doing the same, but the selector had to be quoted as in:
Uses an internal lambda for dispatching on messages.
We can also create objects that handle deposits as well as withdrawals, and thus we can represent simple bank accounts. Here is a procedure that returns a “bank-account object” with a specified initial balance:
Each call to make-account sets up an environment with a local state variable balance. Within this environment, make-account defines procedures deposit and withdraw that access balance and an additional procedure dispatch that takes a “message” as input and returns one of the two local procedures. The dispatch procedure itself is returned as the value that represents the bank-account object. This is precisely the message-passing style of programming that we saw in 2.4.3, although here we are using it in conjunction with the ability to modify local variables.
For the curious, there is an official YouTube channel with the previous editions https://www.youtube.com/@racketlang/playlists (It usually take a few months until the videos are edited and uploaded.)
I've been messing around with a language that I summarize as:
ALOE = Scheme + Smalltalk + Types
https://github.com/dharmatech/2026-09-02-aloe-racket
Prototype is in Racket.
Yo! this is cool. I've been doing an interpreted lisp written in OCaml. pricklypear.rocks. https://github.com/sroerick/pricklypear . we are doing cactus driven development. I'll reach out. Would love to compare notes.
quite elegant, feels like a great balance idiomatic scheme and OO
Thanks for checking it out!
Here's a video demo of the code completion in vscode:
https://www.youtube.com/watch?v=YuIjug7elPY
you lost me at the receiver selector order.
It's a common way to implement OO in Lisp-y languages, and it fits if you're taking Smalltalk as an inspiration. SICP has an example in chapter 3 (IIRC) of doing the same, but the selector had to be quoted as in:
Uses an internal lambda for dispatching on messages.
We can also create objects that handle deposits as well as withdrawals, and thus we can represent simple bank accounts. Here is a procedure that returns a “bank-account object” with a specified initial balance:
Each call to make-account sets up an environment with a local state variable balance. Within this environment, make-account defines procedures deposit and withdraw that access balance and an additional procedure dispatch that takes a “message” as input and returns one of the two local procedures. The dispatch procedure itself is returned as the value that represents the bank-account object. This is precisely the message-passing style of programming that we saw in 2.4.3, although here we are using it in conjunction with the ability to modify local variables.3.1.1 Local State Variables
https://sarabander.github.io/sicp/html/3_002e1.xhtml#g_t3_00...
A closure, specifically, because closures are a poor man's object.
https://wiki.c2.com/?ClosuresAndObjectsAreEquivalent
You fool! Objects are a poor man’s closures!
Yup!
Here's a video demo of the code completion in vscode:
https://www.youtube.com/watch?v=YuIjug7elPY
Cool project, thank you for sharing. I've been thinking about something similar lately.
However. "Send, not apply" - sigh.. how shall I put it.. let's try this - eyes_rolling_so_hard_they_fall_out_of_sockets.png
RacketCon is Saturday https://con.racket-lang.org