PicoLisp
github.com
github.com
Nowadays i mostly do numerical work where an all interpreted language with only infinite precision integers (or fixed point numbers thinly wrapped on top) is not really suited but if i need to do a complicated automatic code generation pipeline, i just write a short picolisp script which prints the source code in the target language. The ability to execute and modify ASTs as the nested lists they are is just so convenient.
I'd be interested in seeing some of your code doing this. I've done lots of Scheme and some Clojure and CL, and in my own programming style I mostly avoid using bare s-expressions to represent ASTs (I use structures/objects instead[1]) except in macros, because that is giving me less ambiguity and better error checking. I wonder whether we are working at different levels of scale, or different ways of working that make us prefer one over the other.
[1] I guess it's clear what I mean--basically coding like in an object oriented language, albeit without mutation--but here's an example (definitions and use): https://github.com/pflanze/chj-schemelib/blob/master/coresch... https://github.com/pflanze/chj-schemelib/blob/master/coresch...
I wonder why never got many fans in spite of the strong tries from its author to promote it.
It's quite hard to get into that territory with different ideas, you'd have to provide a rather good value add for that. Even newLisp[1] didn't, and that both had various implementations and a standard. Clojure did, and not just because of the JVM (cf. ABCL/Kawa).
picoLisp just never really presented itself as being particularly unique for a niche. (IIRC also didn't run on Windows)
Common Lisp has most of the mindshare, followed closely by Clojure and the various Scheme implementations.
It is also unfortunate that picolisp can be difficult to install on macOS and Windows.
- Lisp .40%
- Scheme .20%
- Closure <.17%Seriously though, I think I like Common Lisp so much just because I have been using it since about 1982 and I am just very used to it. For a lot of work, I will just use Python if there are one or more Python libraries that solve whatever problem I am working on with just a few lines added Python code that I need to write.
Dynamically scoped, first class environments, fexpr instead of macros. A corollary of that feature set is interpreted, not compiled.
What we have as a result is simpler than scheme. The function/macro distinction is gone and the module system is first class environments. I haven't got as far as working out whether they've done away with phase separation.
It's then tied into a database which seems pretty weird to me but that could totally be my limitation.
I'm curious about this assertation. I've also heard that "do one thing and do it well" is a desirable goal and one should offload tasks to other pieces that specialize in that task (e.g. don't write your own crypto, use existing libraries), is there something that makes a programming language different?
In the context of programming languages, dependencies are a property of a programming language implementation. LLVM is not a small system, yet PicoLisp is a small language, which is why it might be considered a heavy dependency. There are scenarios like embedded where having a tiny implementation with little dependency pays off.
Ordinary programs can be very easily maintained by using only the language's standard library, as standard library is often maintained substantially longer than many third-party libraries.
LLVM is pretty close to internally self contained as it DIY or vendors things in traditional C++ fashion (has optional deps on zlib and ncurses), especially if you use libc++ with it. However it is enormous and continually in flux. Building on LLVM also means picking up C++-like semantics regarding aliasing/undef/poison/freeze which are themselves somewhat in flux.
So in this case if PicoLisp emitted aarch64/x64 directly I'd consider that smaller/simpler than depending on LLVM, despite the increase in complexity in PicoLisp's own codebase from DIY'ing the machine code generation.
Fundamentally moving a load of complexity into a library can be a win but is not intrinsically cheaper than keeping it internal. You don't pay for it in gold - you move dev time and failure modes around, possibly for a net win and possibly for a net loss.
Assuming that having a huge feature set is a desirable quality. Sometimes minimalism is a useful goal in itself - languages with few features usually make those features composable, leading to a combinatorial explosion of the ways those features can be used.
That being said, a small independent compiler/interpreter for PicoLisp would still be nice, though.
There have been multiple rewrites but the last version I remember was written in pure generic 64 bit assembly without any dependency on C. See: https://software-lab.de/doc64/README
Haven't yet found any rationale on the LLVM rewrite.
LLVM would only be a dev dependency for developing or compiling picolisp then, which is fine.