This is an adaptation of miniPicoLisp, a LISP interpreter. The primary goal of this adaptation is to be extremely readable and make vanilla C as the only dependency. It is not that PicoLisp implementation is not readable. It is my opinion however that some of the space optimizations used in the PicoLisp implementation make it harder to understand the source. Plus, PicoLisp uses some gcc only features. Please note that the readability goal is not achieved yet :)
This is really not "another language" - it's essentially PicoLisp.
PicoLisp is the closest to perfection. Perfection as in "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away". A somewhat unique quality of PicoLisp is that it is "finished software". Has been so for over 3 decades! This may be surprising to you, that a programming language could be "finished" so long ago; even though, we have "new features" being added to the prevailing popular programming languages all the time.
PicoLisp is powerful. I think that Paul Graham's wonderful essay "Beating the averages" does a really good job in explaining the notion of the power of a programming language. The essay does not talk about PicoLisp specifically but this is a direct quote from the essay - "Lisp is so great not because of some magic quality visible only to devotees, but because it is simply the most powerful language available.".
PicoLisp implementation is tied to POSIX/Linux and gcc more tightly that I'd like. Just like, "yes it works on Windows 98 and on Windows NT" is not reasonably acceptable when it comes to portablity; "WORKS" on POSIX is not sufficient in my opinion :) My goal is to have nothing more than vanilla C as a dependency - I say vanilla C to imply that C with very straight forward assembly. PicoLisp also uses a number of space optimization techniques that I feel make it harder to understand the code and dependent on aligned allocations.
The interperter could be built with or without libuv and libSDL. Please take a look at the Dockerfile to see how libuv and libSDL may be installed.
git clone https://github.com/lispware/minilisp.git
cd minilisp/src
make -j8 USE_LIBUV_AND_LIBSDL=1 [You may skip USE_LIBUV_AND_LIBSDL=1 if you do not have those dependencies]
The interperter could be built with or without libuv and libSDL. Prebuilt binaries for those are automatically fetched from https://github.com/ckkashyap/WindowsBinaries
Assuming that you have run vcvars64.bat or vcvars32.bat to ensure that Micrsoft C compiler is set in the PATH.
nmake -f nmakefile PLAT=[x64|x86] USE_LIBUV_AND_LIBSDL=1 [You may skip USE_LIBUV_AND_LIBSDL=1 if you do not have those dependencies]
Assuming that you have gcc
make
Go into the demo/present directory and run the following
../../bin/picoLisp client.l [On Windows, that would be ....\src\picoLisp.exe client.l]. This should open up a window with contents rendered as specified in refresh.l. You can make changes to refresh.l and it should immediately update the window.
- PicoLisp community
- Will Portnoy