GCL(1)

πŸ“¦ version 2.7.1, in fedora 43, fedora 44

πŸ¦‹ 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 to gcl
  • gcl-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 πŸ’…:

  • -eval command β€” call read and then eval on the command passed in.
  • -- β€” stop processing arguments, setting si::*command-args* to a list containing the arguments after the --.
  • -load pathname β€” load the file whose pathname is specified after -load.
  • -f [pathname] β€” open the file following -f for input (or use *standard-input* if it's not supplied), skip the first line, and then read and eval the rest of the forms in the file. this replaces si::*command-args* by the the list starting after the -f switch. 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 -f only 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/sh script. in the latter case the /bin/sh interpreter 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 by save and friends. this gets set as si::*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 β€” if nil follows -o-file, then do not produce an .o file.
  • -c-file β€” if -c-file is specified, leave the intermediate .c file there.
  • -h-file β€” if -h-file is specified, leave the intermediate .h file there.
  • -data-file β€” if -data-file is specified, leave the intermediate .data file there.
  • -system-p β€” if -system-p is specified, then invoke compile-file with the :system-p t keyword 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