PICOLISP(1)

πŸ’… PICOLISP β€” the User Commands page, bestie edition πŸ¦‹

okay so sit down, grab a strawberry, because we're talking about PICOLISP(1) from the User Commands section of the manual and it's genuinely iconic.


✨ NAME ✨

pil, picolisp β€” a fast, lightweight Lisp interpreter. that's it, that's the whole intro, and honestly? it ate. πŸ”₯


🌸 SYNOPSIS 🌸

pil [arguments ...] [-] [arguments ...] [+]
picolisp [arguments ...] [-] [arguments ...] [+]

πŸ’– DESCRIPTION πŸ’–

PicoLisp is a Lisp interpreter with a small memory footprint, yet relatively high execution speed. no cap. it's the whole package: an elegant and powerful language plus built-in database functionality, like, who else is doing it like her. πŸ‘‘

pil is the startup front-end</> for the interpreter. she's the responsible older sister β€” she takes care of starting the binary base system and loading a useful runtime environment.

picolisp is just the bare interpreter binary. no frills, no runtime, just vibes and raw power. it's usually called in stand-alone scripts, using the she-bang notation in the first line, passing the minimal environment in lib.l and loading additional files as needed:

#!/usr/bin/picolisp /usr/lib/picolisp/lib.l
(load "@ext.l" "myfiles/lib.l" "myfiles/foo.l")
(do ... something ...)
(bye)

that's the whole script, bestie. she-bang and go. ✨


πŸŽ€ INVOCATION πŸŽ€

PicoLisp has no pre-defined command line flags β€” applications are free to define their own. (yes really, you get to be the main character and pick your own flags. freedom. πŸ’…)

Any built-in or user-level Lisp function can be invoked from the command line by prefixing it with a hyphen. Examples for built-in functions useful in this context are version (print the version number) or bye (exit the interpreter). Therefore, a minimal call to print the version number and then immediately exit the interpreter would be:

$ pil -version -bye

Any other argument (not starting with a hyphen) should be the name of a file to be loaded. If the first character of a path or file name is an at-mark, it will be substituted with the path to the installation directory. cute shortcut, we love her. 🫢

All arguments are evaluated from left to right, then an interactive read-eval-print loop is entered (with a colon as prompt).

A single hyphen stops the evaluation of the rest of the command line, so that the remaining arguments may be processed under program control. lowkey a whole power move.

If the very last command line argument is a single plus character, debugging mode is switched on at interpreter startup, before evaluating any of the command line arguments. A minimal interactive session is started with:

$ pil +

Here you can access the reference manual (expects the shell variable BROWSER to be set, defaults to "w3m")

: (doc)

and the online documentation for most functions,

: (doc 'vi)

or directly inspect their sources:

: (vi 'doc)

The interpreter can be terminated with

: (bye)

or by typing Ctrl-D. bye bestie, it was real. πŸ˜­πŸ’œ


πŸ¦‹ FILES πŸ¦‹

Runtime files are maintained in the ~/.pil directory:

  • ~/.pil/tmp/<pid>/ β€” Process-local temporary directories. every process gets her own little room. boundaries! ✨
  • ~/.pil/rc β€” Loaded after interpreter startup.
  • ~/.pil/viprc β€” Loaded by the Vip editor.

πŸ’€ BUGS πŸ’€

PicoLisp doesn't try to protect you from every possible programming error ("You asked for it, you got it"). fr fr, she said what she said and she's not sorry. πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

Alexander Burger <abu@software-lab.de>


🌈 RESOURCES 🌈


and that's the whole PICOLISP(1) page, bestie β€” straight from the User Commands manual, no cap, every flag and file accounted for. go forth and (bye) on your own terms. πŸŽ€πŸ’–βœ¨