The other day, I had an interesting realization about modern C++. One thing led to another and here I am with another Lisp dialect. Sorry about that.
It seemed like a good idea at the time.
¯\_(ツ)_/¯
Also,
Most Lispish languages care about fripperies like efficiency and so will internally convert Lisp(ish) expressions to more efficient forms.
Not Sic. Here, it's still a list. If you prod at one with lldb
,
you can chase the pointers. (Don't though; call function po
on it
instead.) It stays Lispy all the way down.
Everything in Sic is a plain old C++ type, so you can easily move between it and native code. In fact, this:
$(print, "2 + 2 =", $(add, 2, 2), "\n")
is a valid C++ expression that does what you'd expect (if you've
imported the sic
namespace). So it's easy to integrate it into a
C++ program.
Unlike most Lispish language, there is no external library; all functions are written in C++.
$(print, "C++ is an acceptable Lisp!\n")
- There's a lot of powerful Lisp(ish) functionality that isn't written yet.
- There's no garbage collection. It just leaks memory.
On a sufficiently Unix-like operating system with Clang installed, just
cd src
make
If you want to use gcc instead, edit the Makefile first.
Note that this needs a recent compiler, one that supports C++17.
This will produce both an executable interpreter (sic
) and a library
(libsic.a
).
The reference manual is generated during building but there's a courtesy copy here.
I also did a blog post about it here.
This is Free/Open-source software released under the terms of the wxWidgets license (i.e. the GNU LGPL but with less restrictions on binary distribution.)
See Copyright.txt for details.