GCL(1)
π¦ GCL β the Common Lisp glow-up π
okay bestie, sit down, we're talking about gcl β the GCL Common Lisp interpreter/compiler β and honestly? it's giving "written in 1984 and still standing on business." no cap.
β¨ SYNOPSIS β¨
gcl [ options ]
that's it. that's the whole vibe. just gcl and then whatever options you feel like.
πΈ DESCRIPTION πΈ
so gcl is an implementation of a subset of the Common Lisp Ansi standard. it's written in C and in Common Lisp, and it is highly portable β like, will-run-pretty-much-anywhere portable, we love that for her π. she includes those features from the original definition of Common Lisp (Guy Steele version 1.), plus some features from the proposed new standard. main character behavior, honestly.
the best documentation lives in texinfo/info form, and it comes in three groups of information:
gcl-siβ basic common lisp descriptions, plus the features that are unique togclgcl-tkβ the connection with the tk window system, which lets all the power of the tcl/tk interaction system be used from lisp πgclβ details the Ansi standard for common lisp, which this subset tries to adhere to
it is highly recommended to write programs that live in the intersection of gcl and ansi common lisp. periodt. unfortunately the Ansi standard is huge, and it will require a substantial effort, plus an increase in the size of gcl, to include all of it. like, she's trying her best π.
when gcl is invoked from the shell, the variable si::*command-args* gets set to the list of command line arguments. and various options are understood, which we will now go through one by one because we are thorough and we do not skip π
:
-evalcommand β callreadand thenevalon the command passed in.--β stop processing arguments, settingsi::*command-args*to a list containing the arguments after the--.-loadpathname β load the file whose pathname is specified after-load.-f[pathname] β open the file following-ffor input (or use*standard-input*if it's not supplied), skip the first line, and thenreadandevalthe rest of the forms in the file. this replacessi::*command-args*by the the list starting after the-fswitch. you can use this the way you'd use it with the shells, to write little 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 is, together with the-f, amount 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. no thank you.
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 do something. do not print the License and acknowledgement information. note: 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β for example,
-libdir /d/wfs/gcl-2.0/
would mean that files like gcl-tk/tk.o would 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.-o-fileβ ifnilfollows-o-file, then do not produce an.ofile.-c-fileβ if-c-fileis specified, leave the intermediate.cfile there.-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.
okay and now for some real talk π«Ά:
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. just so we're clear, 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 π₯. like, the compiler is the main character here. fr fr.
π 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. a whole legacy, honestly. we stan π
and that's the whole page, babe π β this one's from the General Commands Manual, dated 17 March 1997, and it's GCL(1) if you need to cite her. slay, bye π¦β¨
π¦ where this page comes from
- fedora 43: gcl 2.7.1-4.fc43 Β· LGPL-2.0-or-later AND GPL-1.0-or-later AND MIT-Modern-Variant AND LOOP
- fedora 44: gcl 2.7.1-9.fc44 Β· LGPL-2.0-or-later AND GPL-1.0-or-later AND MIT-Modern-Variant AND LOOP
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms