newlisp(1)
π newlisp(1) β Commandline Parameters π
bestie. okay so this is the manual page for newlisp, the lisp like programming language, and honestly? it's giving iconic. let's get into it π
β¨ NAME β¨
newlisp β lisp like programming language π¦
β¨ SYNOPSIS β¨
newlisp [-n] [-x source target] [-h | -v] [-c | -C | -http] [-t
microseconds] [-s stack] [-m max-mem-megabyte] [[-l path-file | -L
path-file] [-p port-number | -d port-number]] [-w directory] [lisp-files
...] [-e programtext]
β¨ DESCRIPTION β¨
So when you invoke newLISP, the very first thing it does is load init.lsp if it's there. Then you can throw in one or more options and one or more newLISP source files, and honestly the order you type them in is the order they run. No cap.
For some options it genuinely makes sense to have the source files loaded first β think -p and -d. For others, like -s and -m, it's logical to specify those before the source files get loaded. π§ β¨
If you use a -e switch, the programtext gets evaluated and then newlisp exits. Otherwise, evaluation just keeps going interactively β unless an exit happens during lisp-file interpretation, obviously. π
β¨ OPTIONS β¨
-nβ suppresses loading of anyinit.lspor.init.lspinitialization file. like, don't even look at it π-x source targetβ link the newLISP executable with a source file to built a new target executable. π-hβ display a short help text. the lil "help me" button π«Ά-vβ display a version string. π-cβ suppress the commandline prompt. shhh, no prompt π€«-Cβ force prompt when running newLISP in pipe I/O mode for Emacs. yes, force it. periodt.-httpβ only accept HTTP commands π-s stacksizeβ stack size to use when starting newLISP. When no stack size is specified the stack defaults to1024. π-m max-mem-megabyteβ limits memory to max-cell-mem-megabyte megabytes for Lisp cell memory. πlisp-filesβ load and evaluate the specified lisp source files in sequence. Source files can be specified using URLs. If an(exit)is executed by one of the source files then newlisp exits and all processing ceases. πͺ-e programtextβ programtext is an expression enclosed in quotation marks which is evaluated and the result printed to standard out device (STDOUT). In most UNIX system shells apostrophes can also be used to delimit the expression. newLISP exits after evaluation of programtext is complete. β-w directoryβ directory is the start up directory for newLISP. Any file reference in a program will refer to this directory by default as the current directory. This can be used to define a web root directory when in server mode. π-l-L path-fileβ log network connections and newLISP I/O to the file in path-file.-lwill only log network connections or commandline input or net-eval requests.-Lwill additionally log HTTP requests and newLISP output from commandline and net-eval input. π-p port-numberβ listen for commands on a TCP/IP socket connection. In this case standard I/O is redirected to the port specified in the-poption. Any specifiedlisp-fileswill be loaded the first time a connection is made, that is, before text is accepted from the port connection. π-d port-numberβ run in demon mode. As for the-poption, but newLISP does not exit after a closed connection and stays in memory listening for a new connection. π-t microseconds-connection-timeoutβ specifies a connection timeout when running in-por-ddemon mode. Server will disconnect when no further input is read after accepting a client connection. β°-6β starts newLISP in IPv6 'Internet Protocol version 6' mode. Without this switch newLISP will start in IPv4 mode. The protocol mode can also be switched with the built-in'net-ipv'function during runtime. π¦
β¨ EXAMPLES β¨
Start interactive session
newlisp
Execute a program
newlisp myprog.lsp
Execute a remote program
newlisp http://newlisp.org/example.lsp
Add 3 and 4, 7 prints on standard output
newlisp -e "(+ 3 4)"
newLISP is started as a server (the & indicates to LINUX to run the process in the background) and can be connected to with telnet by issuing telnet localhost 1234
newlisp -p 1234 &
newLISP is started as a server for another newlisp process connecting with the net-eval function or HTTP requests. Connection timeout is 3 seconds.
newlisp -c -t 3000000 -d 4711 &
newLISP is started as a server handling HTTP requests only. Connections are logged to the file /usr/home/www/log.txt
newlisp -l /usr/home/www/log.txt -http -d 8080 &
newLISP is started as a server handling HTTP requests and defining the startup/web root directory
newlisp -http -d 8080 -w /usr/home/www/httpdocs &
When accepting HTTP commands a file httpd.conf can be loaded, which will preprocess the path-name in the HTTP request
newlisp httpd.conf -http -d 8080 -w /usr/home/www/httpdocs &
If the file httpd.conf contains:
(command-event (fn (s)
(local (request)
(if (find "?" s) ; is this a query
(begin
(set 'request (first (parse s "?")))
; discover illegal extension in queries
(if (ends-with request ".exe")
(set 'request "GET /errorpage.html")
(set 'request s)))
(set 'request s))
request) ))
then all files ending in .exe will translate the request in to a request for an error page, else the original request string is returned. π―
β¨ EXIT STATUS β¨
newLISP returns a zero exit status for normal termination unless an exit command specifies a code to be returned. Non zero is returned in case of abnormal exit. π₯
β¨ AUTHOR β¨
Lutz Mueller <lutz@nuevatec.com> π
http://www.newlisp.org/ - the newLISP home page πΈ
and that's the whole page, bestie. this doc is from version 10.7.2, dated May 2017 β a whole vintage era, and we stan. go write some lisp π«Άβ¨
π¦ where this page comes from
- debian bookworm: newlisp 10.7.5-2+b2 Β· GPL-3.0-or-later
- debian trixie: newlisp 10.7.5-2+b3 Β· GPL-3.0-or-later
- ubuntu jammy: newlisp 10.7.5-2build1 Β· GPL-3.0-or-later
- ubuntu noble: newlisp 10.7.5-2build3 Β· GPL-3.0-or-later
- ubuntu questing: newlisp 10.7.5-3
- ubuntu resolute: newlisp 10.7.5-3build1 Β· GPL-3.0-or-later
- ubuntu stonking: newlisp 10.7.5-3build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms