GCL(1L)
πΈ GCL π
okay so bestie, welcome to gcl β the GCL Common Lisp interpreter/compiler, CVS snapshot edition. Yes, the whole thing. Buckle up, we're going lisp-mode. π¦
β¨ SYNOPSIS β¨
gcl [ options ]
π DESCRIPTION π
So gcl is an implementation of a subset of the Common Lisp Ansi standard. It's written in C and in Common Lisp (versatile queen π), and it's highly portable. It's got the features from the original definition of Common Lisp (that's the Guy Steele version 1. thing) plus some features from the proposed new standard. It's giving heritage, it's giving range.
The best documentation is in texinfo/info form, and there are three groups of info, bestie, three:
gcl-siβ for basic common lisp descriptions, and the features that are unique to gcl πgcl-tkβ this one is about the connection with the tk window system, which lets you use all the power of the tcl/tk interaction system from lisp π₯gclβ this third info file details the Ansi standard for common lisp, which this subset tries to adhere to
highly recommended: write your programs in the intersection of gcl and ansi common lisp. like, do that. π Unfortunately the Ansi standard is huge, and covering all of it would take a substantial effort and would make gcl bigger. So. We do what we can. π«Ά
When gcl gets invoked from the shell, the variable si::*command-args* is set to the list of command line arguments. And there are various options it understands, so let's go, one by one, no skipping, we don't do that here π
β¨ OPTIONS β¨
-evalcommand β callsreadand thenevalon the command you passed in. literally just reads it and evals it. iconic.--β stop processing arguments, and setsi::*command-args*to a list containing the arguments after the--. periodt, we're done here π-loadpathname β load the file whose pathname is specified after-load. that's the whole vibe.-fβ opens the file following-ffor input, skips the first line, and then reads and evals the rest of the forms in the file. It replacessi::*command-args*by the the list starting after-f. (yes, "the the". that's the original, I don't make the rules π) This one can be used with the shells to write small shell programs:
#!/usr/local/bin/gcl.exe -f
(format t "hello world ~a~%" (nth 1 si::*command-args*))
The value si::*command-args* will have the appropriate value. So if the above 2 line file is made executable and called foo, then:
tutorial% foo billy
hello world billy
β οΈ NOTE: on many systems (eg SunOs) the first line of an executable script file such as:#!/usr/local/bin/gcl.exe -fonly reads the first 32 characters! So if your pathname where the executable lives together with the'-f'amounts to more than 32 characters, the file will not be recognized. Also the executable must be the actual large binary file, [or a link to it], and not just a/bin/shscript. In the latter case the/bin/shinterpreter would get invoked on the file. π not the vibe we wanted.
Alternately, one could invoke the file foo without making it executable:
tutorial% gcl -f foo "from bill"
hello world from bill
-batchβ do not enter the command print loop. Useful if the other command line arguments actually do something. Also: do not print the License and acknowledgement information. Note that if your program does print any License information, it must print the GCL header information also. π-dirβ the directory where the executable binary that is running is located. Needed bysaveand friends. This gets set assi::*system-directory*-libdirβ okay so for example,-libdir /d/wfs/gcl-2.0/would mean that the files likegcl-tk/tk.owould be found by concatting the path to the libdir path, ie in/d/wfs/gcl-2.0/gcl-tk/tk.oπ-compileβ invoke the compiler on the filename following-compile. Other flags affect compilation. team work makes the dream work π-o-fileβ if nil follows-o-filethen do not produce an.ofile.-c-fileβ if-c-fileis specified, leave the intermediate.cfile there. keep her π-h-fileβ if-h-fileis specified, leave the intermediate.hfile there.-data-fileβ if-data-fileis specified, leave the intermediate.datafile there.-system-pβ if-system-pis specified then invokecompile-filewith the:system-p tkeyword argument, meaning that the C init function will bear a name based on the name of the file, so that it may be invoked by name by C code. fancy fr fr β¨
This GNU package should not be confused with the proprietary program distributed by FRANZ, Inc. Nor should it be confused with any public domain or proprietary lisp system. π« like, read the label bestie.
And for anything other than program development, use of the lisp compiler is strongly recommended in preference to use of the interpreter, due to much higher speed. π₯ speed. periodt.
π FILES π
/usr/bin/gclβ executable shell script wrapper/usr/lib/gcl-version/unixport/saved[_flavor]_gclβ executable lisp images
π¦ SEE ALSO π¦
- Common LISP: The Language, Guy L. Steele, Jr., Digital Press, Bedford, MA, 1984.
- Common LISPcraft, Robert Wilensky, W. W. Norton & Co., New York, 1984.
π AUTHORS π
The GCL system contains C and Lisp source files to build a Common Lisp system. CGL is derived from Kyoto Common LISP (kcl), which was written in 1984 by T. Yuasa and M. Hagiya (working under Professor R. Nakajima at the Research Institute for Mathematical Sciences, Kyoto University). The AKCL system work was begun in 1987 by William Schelter at the University of Texas, Austin, and continued through 1994. In 1994 AKCL was released as GCL (GNU Common Lisp) under the GNU public library license. π history lesson, ate.
and that's the whole page bestie, mwah π β¨ this was the GCL(1L) manual, dated 17 March 1997 β yeah she's vintage, she's iconic, she's still slaying π«ΆπΈ
π¦ where this page comes from
- debian bookworm: gcl 2.6.14-4
- debian trixie: gcl 2.6.14-19
- ubuntu jammy: gcl 2.6.12-117
- ubuntu noble: gcl 2.6.14-8build1
- ubuntu questing: gcl 2.6.14-19
- ubuntu resolute: gcl 2.6.14-19build1
- ubuntu stonking: gcl 2.6.14-21ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms