Hey y'all
In Scheme, we have:
(proc arg ...)
In ALOE, it's:
(obj msg arg ...)
It's an experiment in making everything about calling methods on objects instead of applying functions. And throwing types in the mix too.
Small interpreter in 2000 lines of Racket:
Contribute to dharmatech/2026-09-02-aloe-racket development by creating an account on GitHub.
It doesn't even have strings yet!
But it can simulate a flock of 3 boids:
Spec:
# Aloe 0.1 spec
Aloe is an s-expression language. Evaluation is message send, not Scheme apply.
Prototype host: Racket (`2026-09-02-aloe-racket`).
Target program: `examples/boids.aloe`.
Deliverable for 0.1: Racket interpreter + type checker. No compiler, no macros, no mutation, no inheritance.
---
## 1. Syntax
A program is a sequence of s-expressions. The reader is the Scheme/Racket reader.
Atoms:
- integers: `0`, `10`, `-3` β type `Int`
- floats: `0.0`, `1.0`, `0.01` β type `Float`
- symbols: `demo`, `x`, `+`, `step`, `Point`
- booleans: `#t`, `#f` β type `Bool`
This file has been truncated. show original
Ed
1 Like
Isn't that what Java did already? what is being tested in this experiment?
Hi Ed,
This is really cool.
It makes me think of another experiment: Purely-functional Object-Oriented System
Thanks for sharing
Stephen
1 Like
Hey @spdegabrielle
Thanks for checking it out!
Yes, experimenting with the various object systems grown in Scheme has influenced ALOE.
1 Like
OK, ALOE 0.2 is out.
For this release, the aim was to implement a basic computer algebra simplifier.
To implement that, I needed two things added to the ALOE core language:
Protocols (class interfaces)
Method overloading
Core language is around 2600 lines of Racket.
# ALOE 0.2 : computer algebra
Weβre taking an application-driven design approach with Aloe.
- Select an application to build in Aloe.
- Start building the application in Aloe.
- Add a feature to core Aloe only when the application requires it.
Weβre doing this instead of adding features randomly or because we think they should be there.
For the Aloe 0.1 release, the driving application was a Boids simulator.
For the Aloe 0.2 release, the driving application is a basic computer algebra simplifier (a Cohen-style fragment in `examples/mpl/`).
To support that library we added two features to the Aloe core:
- protocols (class interfaces: a class can opt into a named protocol such as `Math`)
- method overloading on parameter types
This file has been truncated. show original
In ALOE, since we have
(obj method arg ...)
and we have type inference, we can get code completion for methods after typing an object expression.
Here's a video demo of this using vscode:
We're getting this via LSP support in ALOE.
1 Like
I've been messing around with aloemacs, an emacs-like editor written in ALOE:
It's extremely rudimentary right now.
Mostly serving as an exploration of the ALOE language.
Not currently intended for regular use.
Currently around 2632 lines of ALOE.
Source:
Besides GNU Emacs, a lot of design influence came from E, an emacs-like written in Chez Scheme:
A tiny, fully customizable, self-aware, Emacs-like editor written in Chez Scheme.
As well as legmacs, an emacs-like written in a dialect of clojure:
A small terminal text editor written in and scriptable with let-go, a Clojure-dialect Lisp
2 Likes
Hi, @dharmatech .
This looks so clean!
I notice in your recording that (List empty) is a constructor for an empty list, but then later on you use (Point new ...).
You explain that the syntax is (obj method arg ...), which implies that the classes/types are objects--I am guessing--but is there an underlying construct for, you know, constructing things, that gets wrapped in these specialized methods?
The editor looks pretty cool, too, well done. What font are you using, by the way?
1 Like
bakgatviooldoos:
This looks so clean!
Thanks for checking it out @bakgatviooldoos
In that screenshot, aloemacs is running in a terminal window on Ubuntu 26.04.1.
I'm using the default terminal that comes with Ubuntu.
(I believe the terminal is ptyxis).
I believe the default fixed width font is Ubuntu Monospace:
https://design.ubuntu.com/font
1 Like
@dharmatech , do you explain somewhere in the repo where the name comes from? I skimmed it, but I didn't see anything obvious. I have kind of a hermeneutic bent, so I always find such things very interesting.
If you use define-class with fields, you get one constructor, named new.
dharmatech@X1E:~/journal/2026-09-02-aloe-racket$ rlwrap ./bin/aloe
aloe> (define-class Pt (fields (x Int) (y Int)) (methods))
aloe> Pt
#<class Pt>
aloe> (Pt new 10 20)
#<Pt 10 20>
But instead of fields, you can list the constructors yourself:
(define-class Shape
(constructors
(Circle (fields (radius Float)))
(Rect (fields (width Float) (height Float))))
(methods
(area () Float
(self case
(Circle (r) (3.14159 * (r * r)))
(Rect (w h) (w * h))))))
Then you can do:
aloe> (Shape Circle 1.0)
#<Shape 1.0>
aloe> (Shape Rect 3.0 4.0)
#<Shape 3.0 4.0>
aloe> ((Shape Circle 1.0) area)
3.14159
aloe> ((Shape Rect 3.0 4.0) area)
12.0
List empty and List of are built-ins. Right now, List is sort of a primitive.
That's cool, reminds me of Haskell (because this is my only experience with something similar). Seems like a nice way to address the expression-problem, to some degree.
1 Like
bakgatviooldoos:
@dharmatech , do you explain somewhere in the repo where the name comes from? I skimmed it, but I didn't see anything obvious. I have kind of a hermeneutic bent, so I always find such things very interesting.
I have a bunch of earlier prototypes of the language.
Somewhere along the way I think I had an acronym like:
Associative Language of Objects and Environments
I almost called it:
CARL (Contextual Associative Receiver Language, a nod to Carl Hewitt)
There's no official acronym right now.
1 Like
TIL about Carl Hewitt. Go figure, a big inspiration for Prolog, coming via Micro-Planner.
Planner has been described as "extremely ambitious".
1 Like
bakgatviooldoos:
@dharmatech , do you explain somewhere in the repo where the name comes from? I skimmed it, but I didn't see anything obvious. I have kind of a hermeneutic bent, so I always find such things very interesting.
Guy Steele talked about "growing a language":
So there's that influence as well; growing aloe vera plants.
2 Likes
By the way,
aloemacs is using the excellent tui/term package by @dominik.pantucek :
Thank you Dominik!
1 Like