Picolisp Sources
Read This! | Picolisp | Picolisp Machine | Pil Sources | Pil Tutorials | Picolisp By Example | Linux | BASH | C-Programmming | Javascipt | Python | Scheme | Operating Systems | AssemblyLanguage | Computer Security | Firewalls | Exploitation | Social Engineering | Metasploit | Emacs | vim | Pharo Smalltalk | Databases | Networking | Machine Learning | Git | Machine Learning | Algorithms | Open Data Science |
The plain idea
PicoLisp has been implemented three times, and this page indexes my reading of the first two:
- pil32, written in C. Small, readable and the easiest place to start. Its files (
pico.h,main.c,sym.cand the rest) are listed below. Its spirit lives on in miniPicoLisp, a minimal C version still available from Software Lab. - pil64, written in a generic assembly language that is itself defined in PicoLisp (
asm.l), then translated to x86-64, ARM64, PowerPC and others. Fast, with a full 64-bit object database. - pil21, the current PicoLisp since 2020. Alexander Burger rewrote the system again, this time in PicoLisp itself, generating LLVM intermediate code. It keeps the same language and libraries (
@lib/http.l,form.l, the database) while being portable to any platform LLVM supports. If you download PicoLisp today, this is what you get.
Why read interpreter sources at all?
Because PicoLisp is small enough to read. The whole of pil32 is a few thousand lines. You can see exactly how a cell is laid out, how a symbol stores its value and properties, how the garbage collector marks and sweeps, and how eval walks a list. Few languages let you hold the entire machine in your head, and doing it once changes how you write code in any language.
An analogy
Reading a novel tells you the story. Reading the author’s drafts tells you how stories are built. These pages are the drafts.
How to use this page
Start with pico.h for the data structures, then main.c and flow.c to see evaluation, then sym.c and subr.c for symbols and lists. Each source page has a short note saying what the file does. When you are ready for the current system, download pil21 from software-lab.de and compare: the ideas are the same, written a third time.
Examples Examined
32 Bit C Source
- pico.h
- main.c
- apply.c
- balance.c
- big.c
- ext.c
- flow.c
- gc.c
- ht.c
- httpGate.c
- io.c
- lat1.c
- Makefile
- mkVers
- net.c
- ssl.c
- start.c
- subr.c
- sym.c
- tab.c
- TAGS
- utf2.c
- vers.h
64 Bit Asm Source
- apply.l
- arch
- big.l
- db.l
- defs.l
- err.l
- ext.l
- flow.l
- gc.l
- glob.l
- ht.l
- io.l
- lib
- main.l
- Makefile
- mkAsm
- mkAsm.l
- net.l
- src-list
- subr.l
- sym.l
- sys
- sysdefs.c
- tags
- version.l
- x86-64.linux.base.o
- x86-64.linux.base.s
- x86-64.linux.ext.o
- x86-64.linux.ext.s
- x86-64.linux.ht.o
- x86-64.linux.ht.s
Picolisp Libraries
- adm.l
- android.l
- app.l
- bash_completion
- boss.l
- btree.l
- cal.l
- canvas.js
- canvas.l
- complete.l
- conDbgc.l
- db32-64.l
- dbase.l
- db.l
- debug.l
- edit.l
- ed.l
- eedit.l
- el
- eled.l
- ext
- form.js
- form.l
- frac.l
- gcc.l
- gis.l
- glyphlist.txt
- head.ps
- heartbeat.l
- ht
- http.l
- import.l
- json.l
- led.l
- led.min.l
- lint.l
- list
- map
- math32.l
- math64.l
- math.l
- misc.l
- native.l
- nodroid.l
- note.l
- openGl.l
- phone.css
- pilog.l
- plio.js
- prof.l
- ps.l
- readline.l
- role.l
- rsa.l
- scrape.l
- simul.l
- socialshareprivacy
- sq.l
- svg.l
- term.l
- test.l
- tex.l
- tinymce.l
- too.l
- tsm.l
- user.l
- vim
- xhtml.l
- xm.l
- xml.l
- xmlrpc.l
- z3d.l
- zahlwort.l
