Between Two Lisps (2020)
ane.iki.fi
ane.iki.fi
> 50MB
With compression (zstd now), SBCL binaries weigh ±25MB. Start-up time is super fast. I built a standalone binary for my web app, it is straightforward to start it on the background and access it from an Electron window.
[0]: https://lispcookbook.github.io/cl-cookbook/editor-support.ht...
If I had to pick a language to stay in forever and I had the time to really grow it into what I wanted using C extensions I'd probably choose Janet (or make my own similar lisp).
Like most people, though, I have a day job and until I decide to retire I won't have time to reinvent an entire personal programming system for myself. For pure "get in there and have fun" sessions after work Common Lisp gets my vote despite its clunkiness. And besides... it's a lisp! If something's too clunky I'll just fix it.
Lisp-2s aren’t the only languages in which functions and variables are different namespaces - the same is true of PHP, Perl, Bash, etc. But the later mark the distinction through syntax - variables start with a dollar sign, functions don’t. I think there is something to be said for that approach, compared to the Lisp-2 way it is easier for beginners to understand, and it is instantly obvious whether a symbol is a variable or something else like a function, while also avoiding the Lisp-1 problem of built-in function names clashing with those of popular variable/argument names. I wonder why there are so few Lisp-like languages which adopt the “sigil solution”. (Common Lisp does have sigils, such as :keywords, but not for variables.)
It would be really annoying to have the same sort of de facto requirement for function names. Making the programmer use funcall or apply when calling a function value is much less intrusive, especially since CL idiomatically doesn't have the tail call fetish that Scheme seems to have.
I mean, yes, having functions in a different namespace may be sensible, or at least defensible. That example is ridiculous.
(defun some-algo (list ...) ...)
Sure you can abuse this, everything can be abused. But I'd rather risk an asshole doing that `let` thing (which wouldn't make it past code review) than have more name collisions and naming contortions to avoid them. If the language at least warned on renaming it would be helpful, but then you get things like Go. When I was learning it I accidentally overwrote some built-in function (I don't recall which one, it wasn't actually `make` like in this demo): package main
func main () {
make := 10
aMap := make(map[int]string) // this is now an error
}
I wish I could remember what it was, it was a reasonable name in context (unlike `make` above). But it had a similar effect and a similar strange error. The error is at the function call site, which is technically correct because you're trying to use an `int` (here) as a function. But `make` (above) and similar functions should probably get a warning emitted when you redefine them, at a minimum.In seriousness I like the ability to make such distinctions even if it can be a huge footgun.
But in Lisp/Scheme? Preferrably no C. Just Lisp/Scheme and assembly.
It's somewhat limited but AFAIK it could in theory be made to self-host (right now IIRC image building is done separately from another system, but that's mostly a case of some programming work)
Also, the author Bill is very helpful on the mailing list.
s7: https://ccrma.stanford.edu/software/snd/snd/s7.html Scheme for Max: https://github.com/iainctduncan/scheme-for-max
Not mentioned: Hy (hylang) that adds Clojure-like syntax to Python, and some other super fine Scheme implementation’s not mentioned in the article.
Yeah, MIT Scheme has Edwin and a more-or-less CL-like debugging experience, Gauche has a hardware store's worth of batteries included, Loko compiles down to machine code without passing through C, Chez is fast, and Cyclone has a nice GC.
Same with REPL functionality. Same with libraries available.