├── .gitignore ├── COPYING ├── Makefile ├── README ├── README.html ├── README.md ├── README.pdf ├── announces ├── 001-relative-package.txt └── Makefile ├── boring ├── ccl.sh ├── cl-loaders ├── GPL ├── VERSION.DAT ├── aima.lisp ├── asdf.lisp ├── cclan.lisp ├── cl-pdf.lisp ├── cliki.lisp ├── clocc.lisp ├── clx.lisp ├── garnet.lisp ├── hemlock.lisp ├── html-parser.lisp ├── lisa.lisp ├── lmud.lisp ├── mcclim.lisp ├── norvig-graph.lisp ├── norvig.dot ├── norvig.lisp ├── old-asdf.lisp ├── pjb.lisp ├── plisp.lisp ├── portableaserve.lisp ├── pseudo.lisp ├── regex.lisp ├── stumpwm.lisp └── uffi.lisp ├── cl-posix ├── GPL ├── VERSION.DAT ├── dirent.html ├── gen-spec.el ├── generalities.html ├── headers.paths ├── index.html ├── questions.txt ├── susv3.lisp └── test.html ├── clext ├── Makefile ├── README ├── VERSION.DAT ├── association-test.lisp ├── association.lisp ├── character-sets.lisp ├── closer-weak-test.lisp ├── closer-weak.lisp ├── com.informatimago.clext.asd ├── com.informatimago.clext.association.asd ├── com.informatimago.clext.association.test.asd ├── com.informatimago.clext.character-sets.asd ├── com.informatimago.clext.closer-weak.asd ├── com.informatimago.clext.filter-stream.asd ├── com.informatimago.clext.pipe.asd ├── com.informatimago.clext.pipe.test.asd ├── com.informatimago.clext.queue.asd ├── com.informatimago.clext.queue.test.asd ├── com.informatimago.clext.redirecting-stream.asd ├── com.informatimago.clext.shell.asd ├── com.informatimago.clext.test.asd ├── debug.lisp ├── filter-stream.lisp ├── filter.lisp ├── gate.lisp ├── gitlab │ ├── com.informatimago.clext.gitlab.asd │ └── gitlab.lisp ├── init.lisp ├── logical-pathname.lisp ├── pipe-article-en.txt ├── pipe-article-fr.txt ├── pipe-test.lisp ├── pipe.lisp ├── pkcs11 │ ├── Makefile │ ├── cert.options │ ├── cffi-debug.lisp │ ├── cffi-utils.lisp │ ├── com.informatimago.clext.pkcs11.asd │ ├── com.informatimago.clext.pkcs11.tests.asd │ ├── commands.sh │ ├── debug.lisp │ ├── loader.lisp │ ├── notes.txt │ ├── pkcs11-cffi.lisp │ ├── pkcs11.lisp │ ├── test-find-objects.c │ ├── tests.lisp │ └── ulong.c ├── queue-test.lisp ├── queue.lisp ├── redirecting-stream.lisp ├── run-program │ ├── com.informatimago.clext.run-program.asd │ ├── com.informatimago.clext.run-program.test.asd │ ├── run-program-test.lisp │ └── run-program.lisp ├── shell.lisp ├── summary.html ├── telnet │ ├── TODO.org │ ├── babel-extension-test.lisp │ ├── babel-extension.lisp │ ├── bt-ccl-debug.lisp │ ├── bt-ccl-debug.org │ ├── bt-patch.lisp │ ├── com.informatimago.clext.telnet.repl.asd │ ├── com.informatimago.clext.telnet.repl.test.asd │ ├── debug.lisp │ ├── interrupt-test.lisp │ ├── interrupt.lisp │ ├── packages.lisp │ ├── start.lisp │ ├── stop.lisp │ ├── telnet-repl.lisp │ ├── telnet-stream-test.lisp │ ├── telnet-stream.lisp │ └── test-stub-nvt.lisp ├── weak-oid.tst ├── weak.tst ├── weakhash.tst ├── weakhash2.tst └── weakptr.tst ├── clisp ├── GPL ├── Makefile ├── Makefile.depend ├── README ├── VERSION.DAT ├── binio.lisp ├── clisp-ffi-howto.txt ├── clisp-ffi.txt ├── com.informatimago.clisp.asd ├── com.informatimago.clisp.test.asd ├── disk.lisp ├── fifo-stream.lisp ├── init.lisp ├── iotask.lisp ├── make-volumes.lisp ├── mysql.lisp ├── objc.lisp ├── post-clisp.awk ├── raw-memory-lib.c ├── raw-memory.lisp ├── rfc1413.lisp ├── script.lisp ├── shell.lisp ├── string-test.lisp ├── string.lisp ├── summary.html ├── susv3-mc3.lisp ├── susv3-xsi.lisp ├── susv3.faq ├── susv3.lisp ├── syslog.c ├── syslog.lisp ├── uffi-bsd.lisp ├── uffi-test.c ├── uffi-test.lisp ├── uffi.c ├── uffi.lisp └── xterm.lisp ├── clmisc ├── GPL ├── Makefile ├── README ├── VERSION.DAT ├── com.informatimago.clmisc.asd ├── com.informatimago.clmisc.test.asd ├── init.lisp ├── resource-utilization-test.lisp ├── resource-utilization.lisp ├── summary.html └── unicode.lisp ├── com.informatimago.asd ├── com.informatimago.test.asd ├── common-lisp ├── GPL ├── Makefile ├── README ├── VERSION.DAT ├── apple-file │ ├── apple-file-test.lisp │ ├── apple-file.lisp │ ├── com.informatimago.common-lisp.apple-file.asd │ └── com.informatimago.common-lisp.apple-file.test.asd ├── arithmetic │ ├── algebra.lisp │ ├── com.informatimago.common-lisp.arithmetic.asd │ ├── com.informatimago.common-lisp.arithmetic.test.asd │ ├── p127n2.lisp │ └── primes.lisp ├── bank │ ├── com.informatimago.common-lisp.bank.asd │ ├── com.informatimago.common-lisp.bank.test.asd │ ├── credit-card.txt │ ├── iban.lisp │ ├── rib-es.vb │ └── rib.lisp ├── cesarum │ ├── a-star-test.lisp │ ├── a-star.lisp │ ├── activity-test.lisp │ ├── activity.lisp │ ├── array-test.lisp │ ├── array.lisp │ ├── ascii-test.lisp │ ├── ascii.lisp │ ├── brelation.lisp │ ├── bset.lisp │ ├── cache-test.lisp │ ├── cache.lisp │ ├── character-sets.lisp │ ├── character.lisp │ ├── circular.lisp │ ├── com.informatimago.common-lisp.cesarum.asd │ ├── com.informatimago.common-lisp.cesarum.test.asd │ ├── combination-test.lisp │ ├── combination.lisp │ ├── constraints-test.lisp │ ├── constraints.lisp │ ├── date-test.lisp │ ├── date.lisp │ ├── dfa.lisp │ ├── dictionary-test.lisp │ ├── dictionary.lisp │ ├── dll.lisp │ ├── ecma048.lisp │ ├── ecma048.txt │ ├── file-test.lisp │ ├── file.lisp │ ├── float-binio.lisp │ ├── graph.lisp │ ├── histogram.lisp │ ├── iana-character-sets.data │ ├── iana-character-sets.lisp │ ├── index-set-test.lisp │ ├── index-set.lisp │ ├── iso3166-cocucod.html │ ├── iso3166.lisp │ ├── iso4217.htm │ ├── iso4217.lisp │ ├── iso639a.lisp │ ├── lisp.indentations │ ├── list-test.lisp │ ├── list.lisp │ ├── llrbtree-test.lisp │ ├── llrbtree.lisp │ ├── mersenne.lisp │ ├── message-queue.lisp │ ├── package.lisp │ ├── peek-stream-test.lisp │ ├── peek-stream.lisp │ ├── pmatch.lisp │ ├── priority-queue-test.lisp │ ├── priority-queue.lisp │ ├── queue.lisp │ ├── raiden.lisp │ ├── sequence-test.lisp │ ├── sequence.lisp │ ├── set-test.lisp │ ├── set.lisp │ ├── simple-test.lisp │ ├── sparse-vector-test.lisp │ ├── sparse-vector.lisp │ ├── stream.lisp │ ├── string-test.lisp │ ├── string.lisp │ ├── symbol.lisp │ ├── tea.lisp │ ├── time.lisp │ ├── unit.lisp │ ├── update-iso3166.lisp │ ├── utility-test.lisp │ ├── utility.lisp │ ├── version.lisp │ └── xoroshiro128.lisp ├── com.informatimago.common-lisp.asd ├── com.informatimago.common-lisp.test.asd ├── compile-with-asdf.lisp ├── compile.sh ├── csv │ ├── com.informatimago.common-lisp.csv.asd │ ├── com.informatimago.common-lisp.csv.test.asd │ ├── csv-doc.txt │ ├── csv.lisp │ └── lisp.indentations ├── data-encoding │ ├── bencode-test.lisp │ ├── bencode.lisp │ ├── com.informatimago.common-lisp.data-encoding.asd │ ├── com.informatimago.common-lisp.data-encoding.test.asd │ ├── data-encoding-test.lisp │ ├── data-encoding.lisp │ ├── ecp.lisp │ ├── hexadecimal.lisp │ ├── ieee-754-test │ ├── ieee-754-test.c │ ├── ieee-754-test.lisp │ └── ieee-754.lisp ├── data │ ├── com.informatimago.common-lisp.data.asd │ └── constants.lisp ├── diagram │ ├── com.informatimago.common-lisp.diagram.asd │ ├── com.informatimago.common-lisp.diagram.test.asd │ └── tree-to-diagram.lisp ├── ed │ ├── com.informatimago.common-lisp.ed.asd │ ├── com.informatimago.common-lisp.ed.test.asd │ ├── ed-tutorial.txt │ └── ed.lisp ├── file │ └── table-file │ │ ├── com.informatimago.common-lisp.file.table-file.asd │ │ ├── com.informatimago.common-lisp.file.table-file.test.asd │ │ ├── table-file-test.lisp │ │ └── table-file.lisp ├── gen-lib-graph.lisp ├── graphviz │ ├── com.informatimago.common-lisp.graphviz.asd │ ├── com.informatimago.common-lisp.graphviz.test.asd │ └── graph-dot.lisp ├── heap │ ├── com.informatimago.common-lisp.heap.asd │ ├── com.informatimago.common-lisp.heap.test.asd │ ├── demo.lisp │ ├── heap.lisp │ └── memory.lisp ├── html-base │ ├── com.informatimago.common-lisp.html-base.asd │ ├── com.informatimago.common-lisp.html-base.test.asd │ ├── html-entities.lisp │ ├── html401.lisp │ └── ml-sexp.lisp ├── html-generator │ ├── com.informatimago.common-lisp.html-generator.asd │ ├── com.informatimago.common-lisp.html-generator.test.asd │ ├── html-generators-in-lisp.txt │ └── html.lisp ├── html-parser │ ├── com.informatimago.common-lisp.html-parser.asd │ ├── com.informatimago.common-lisp.html-parser.test.asd │ └── parse-html.lisp ├── http │ ├── com.informatimago.common-lisp.http.asd │ ├── com.informatimago.common-lisp.http.test.asd │ ├── hquery.lisp │ └── htrans.lisp ├── init.lisp ├── interactive │ ├── browser.lisp │ ├── com.informatimago.common-lisp.interactive.asd │ ├── com.informatimago.common-lisp.interactive.test.asd │ └── interactive.lisp ├── invoice │ ├── com.informatimago.common-lisp.invoice.asd │ ├── com.informatimago.common-lisp.invoice.test.asd │ └── invoice.lisp ├── lisp-reader │ ├── com.informatimago.common-lisp.lisp-reader.asd │ ├── com.informatimago.common-lisp.lisp-reader.test.asd │ ├── package-def.lisp │ ├── package-fun.lisp │ ├── package-mac.lisp │ ├── package-pac.lisp │ ├── package-test.lisp │ ├── reader-test.lisp │ └── reader.lisp ├── lisp-sexp │ ├── com.informatimago.common-lisp.lisp-sexp.asd │ ├── com.informatimago.common-lisp.lisp-sexp.test.asd │ ├── lambda-list-syntax.txt │ ├── source-form-test.lisp │ └── source-form.lisp ├── lisp-text │ ├── com.informatimago.common-lisp.lisp-text.asd │ ├── com.informatimago.common-lisp.lisp-text.test.asd │ └── source-text.lisp ├── lisp │ ├── cl-definition.lisp │ ├── cl-saving-defines.lisp │ ├── cl-symbols-by-chapter.lisp │ ├── com.informatimago.common-lisp.lisp.asd │ ├── com.informatimago.common-lisp.lisp.ibcl.asd │ ├── com.informatimago.common-lisp.lisp.ibcl.test.asd │ ├── com.informatimago.common-lisp.lisp.relative-package.asd │ ├── com.informatimago.common-lisp.lisp.relative-package.test.asd │ ├── com.informatimago.common-lisp.lisp.stepper.asd │ ├── com.informatimago.common-lisp.lisp.stepper.test.asd │ ├── com.informatimago.common-lisp.lisp.test.asd │ ├── generic-cl.lisp │ ├── ibcl-bootstrap.lisp │ ├── ibcl-notes.txt │ ├── ibcl.lisp │ ├── old-stepper.lisp │ ├── relative-package-test.lisp │ ├── relative-package.lisp │ ├── source-test.lisp │ ├── source.lisp │ ├── stepper-functions.lisp │ ├── stepper-notes.txt │ ├── stepper-packages.lisp │ ├── stepper-test.lisp │ └── stepper.lisp ├── obsolete-or-incomplete │ ├── avl.lisp │ ├── database.lisp │ ├── dictionary.lisp │ ├── espana--codigo-cif.html │ ├── espana--codigo-nif.html │ ├── graf.diagram2.tar.gz │ ├── graf.lisp │ ├── iata-aeroports-gvacodapt.html │ ├── iata-companies-gvacodcomp.html │ ├── isbn.lisp │ ├── iso15924-20030223.pdf │ ├── iso15924-codes.html │ ├── iso15924.lisp │ ├── iso646.lisp │ ├── repl.lisp │ ├── rfc2047.lisp │ └── web-cache.lisp ├── parser │ ├── com.informatimago.common-lisp.parser.asd │ ├── com.informatimago.common-lisp.parser.test.asd │ ├── com.informatimago.common-lisp.scanner.asd │ ├── com.informatimago.common-lisp.scanner.test.asd │ ├── generate-scanner.lisp │ ├── packages.lisp │ ├── parser.lisp │ ├── scanner-test.lisp │ └── scanner.lisp ├── picture │ ├── com.informatimago.common-lisp.picture.asd │ ├── com.informatimago.common-lisp.picture.test.asd │ ├── cons-to-ascii.lisp │ ├── picture-test.lisp │ ├── picture.lisp │ └── tree-to-ascii.lisp ├── regexp │ ├── bre.zb │ ├── com.informatimago.common-lisp.regexp.asd │ ├── com.informatimago.common-lisp.regexp.test.asd │ ├── regexp-emacs.lisp │ ├── regexp-posix-test.lisp │ ├── regexp-posix.lisp │ ├── regexp.lisp │ ├── regexp.xbd_chap09.html │ └── regexp.yacc ├── rfc1035 │ ├── com.informatimago.common-lisp.rfc1035.asd │ ├── com.informatimago.common-lisp.rfc1035.test.asd │ ├── rfc1035-test.lisp │ └── rfc1035.lisp ├── rfc2822 │ ├── com.informatimago.common-lisp.rfc2822.asd │ ├── com.informatimago.common-lisp.rfc2822.test.asd │ └── rfc2822.lisp ├── rfc3548 │ ├── com.informatimago.common-lisp.rfc3548.asd │ ├── com.informatimago.common-lisp.rfc3548.test.asd │ ├── lisp.indentations │ ├── rfc3548-test.lisp │ └── rfc3548.lisp ├── summary.html ├── telnet │ ├── com.informatimago.common-lisp.telnet.asd │ ├── com.informatimago.common-lisp.telnet.test.asd │ ├── package.lisp │ ├── status.lisp │ ├── telnet-test.lisp │ ├── telnet.lisp │ └── test.lisp └── unix │ ├── aliases.lisp │ ├── com.informatimago.common-lisp.unix.asd │ ├── com.informatimago.common-lisp.unix.test.asd │ ├── group.lisp │ ├── option.lisp │ └── passwd.lisp ├── compile.lisp ├── description ├── driver ├── driver.lisp └── test-ll │ ├── Makefile │ ├── hello.lisp │ ├── hello.ol │ ├── hw.lisp │ ├── word.lisp │ └── word.lo ├── editor ├── charms-screen.lisp ├── clisp-screen.lisp ├── clisp.lisp ├── com.informatimago.editor.asd ├── com.informatimago.editor.test.asd ├── editor.lisp ├── language.lisp ├── macros.lisp ├── package.lisp ├── screen.lisp └── xterm.lisp ├── future ├── cardano.lisp ├── clean-cl.el ├── com.informatimago.future.asd ├── com.informatimago.future.empty.asd ├── com.informatimago.future.empty.test.asd ├── com.informatimago.future.test.asd ├── export.lisp ├── kml │ ├── kml.lisp │ └── rue_saint_lazarre.kml ├── lisp-sexp │ ├── map-sexps.lisp │ └── packages.lisp ├── markup │ ├── docutils-patches.lisp │ ├── markups.lisp │ ├── specifications.org │ ├── specifications.rst │ └── test.txt ├── rename.el ├── rivest-sexp │ ├── NOTES.txt │ ├── URLs │ ├── draft-hedberg-spocp-sexp-00.txt │ ├── draft-rivest-sexp-00.txt │ ├── parse-rivest.lisp │ ├── rivest-sexp.txt │ └── simple-sexp │ │ ├── read.lisp │ │ └── reps.lisp ├── roman-calendar.lisp ├── simple-parse-uri.lisp ├── special-operators.lisp ├── unicode.lisp ├── vfs │ ├── broadcast-stream.lisp │ ├── cl-stream.lisp │ ├── com.informatimago.common-lisp.virtual-file-system.asd │ ├── concatenated-stream.lisp │ ├── echo-stream.lisp │ ├── filenames.lisp │ ├── files.lisp │ ├── general.lisp │ ├── initialize.lisp │ ├── loader.lisp │ ├── packages.lisp │ ├── standard-streams.lisp │ ├── streams.lisp │ ├── string-input.lisp │ ├── string-output.lisp │ ├── synonym-stream.lisp │ ├── two-way-stream.lisp │ ├── utility.lisp │ ├── vfs-file-stream.lisp │ ├── virtual-fs-test.lisp │ └── virtual-fs.lisp ├── xkcd.lisp └── xmls-tools.lisp ├── implementations.mk ├── languages ├── c11 │ ├── README │ ├── actions.lisp │ ├── c11-parser.lisp │ ├── c11-parser.yacc │ ├── c11-scanner.lex │ ├── c11-scanner.lisp │ ├── c11-yacc.lisp │ ├── com.informatimago.languages.c11.asd │ ├── context.lisp │ ├── graph.lisp │ ├── packages.lisp │ ├── read-yacc.lisp │ ├── scratch.lisp │ ├── scratch.yacc │ ├── test.lisp │ └── tests │ │ ├── caste.c │ │ ├── dense.cc │ │ ├── expressions.c │ │ ├── expressions.sexp │ │ └── fun.c ├── com.informatimago.languages.asd ├── cpp │ ├── built-in-macros.lisp │ ├── c-string-reader-test.lisp │ ├── c-string-reader.lisp │ ├── com.informatimago.languages.cpp.asd │ ├── com.informatimago.languages.cpp.test.asd │ ├── cpp-macro.lisp │ ├── cpp-test.lisp │ ├── cpp.lisp │ ├── cpp.txt │ ├── expression-test.lisp │ ├── expression.lisp │ ├── packages.lisp │ ├── pragma-gcc.lisp │ ├── tests │ │ ├── Makefile │ │ ├── built-ins.c │ │ ├── comment.c │ │ ├── concat.c │ │ ├── concat.h │ │ ├── data.h │ │ ├── define.h │ │ ├── emacs.c │ │ ├── empty-macro.c │ │ ├── errors.c │ │ ├── if-embedded.c │ │ ├── if.c │ │ ├── ifdef.c │ │ ├── include-macro.h │ │ ├── interface.c │ │ ├── line.c │ │ ├── priority.h │ │ ├── recursive.c │ │ ├── shadow.c │ │ ├── stringify.c │ │ ├── stringify.h │ │ ├── substitute.c │ │ ├── test.c │ │ ├── test.h │ │ ├── trigraphs.c │ │ ├── variadic.c │ │ └── variadic.h │ └── token.lisp ├── cxx │ ├── com.informatimago.languages.cxx.asd │ ├── com.informatimago.languages.cxx.test.asd │ └── cxx.lisp ├── languages-in-cl.txt ├── latex │ ├── c++-grammar.tex │ ├── lisp.indentations │ └── parser.lisp ├── linc │ ├── Makefile │ ├── annex-a.lisp │ ├── c++.lisp │ ├── c-operators.lisp │ ├── c-runtime.lisp │ ├── c-sexp-compiler.lisp │ ├── c-sexp-language.lisp │ ├── c-sexp-loader.lisp │ ├── c-sexp-test.lisp │ ├── c-sexp-translator.lisp │ ├── c-string-reader.lisp │ ├── c-syntax-test.lisp │ ├── c-syntax.lisp │ ├── com.informatimago.languages.linc.asd │ ├── com.informatimago.languages.linc.test.asd │ ├── example.c │ ├── example.h │ ├── example.linc │ ├── generate.lisp │ ├── indent.el │ ├── linc.lisp │ ├── lisp.indentations │ ├── loader.lisp │ ├── notes.org │ ├── packages.lisp │ ├── readtable-test.lisp │ ├── readtable.lisp │ ├── run.lisp │ ├── test-c-array.c │ ├── test-c-empty-struct-union.c │ ├── test-c-struct-bit.c │ ├── test-expressions.sexpc │ ├── test-ii.lisp │ ├── test-include.expected │ ├── test-include.sexpc │ ├── test-macros.sexpc │ ├── test-statements.sexpc │ ├── test-types.sexpc │ ├── test.lisp │ ├── test.sexph │ └── utilities.lisp ├── lua │ ├── com.informatimago.languages.lua.asd │ ├── com.informatimago.languages.lua.test.asd │ ├── lua-5_1-grammar.txt │ ├── lua-5_2-grammar.txt │ ├── lua-parser.lisp │ ├── lua-scanner-test.lisp │ ├── lua-scanner.lisp │ ├── package.lisp │ └── test-1.lua ├── ruby │ ├── ast-ruby │ └── reader.lisp └── xlisp │ ├── xlisp.lisp │ └── xlisp.txt ├── lisp.indentations ├── lispdoc ├── Makefile ├── com.informatimago.lispdoc.asd ├── com.informatimago.lispdoc.test.asd ├── doc.lisp ├── generate.lisp ├── genhtml.lisp ├── genrst.lisp ├── gentext.lisp ├── lispdoc-run.lisp ├── lispdoc.lisp ├── openmcl.tar.bz2 ├── package.lisp ├── tree.lisp ├── uri.lisp └── utility.lisp ├── mocl └── kludges │ ├── missing.lisp │ └── rename-asdf-systems.lisp ├── multics └── mxarc.lisp ├── objcl ├── Makefile ├── cocoa.lisp ├── com.informatimago.objcl.asd ├── com.informatimago.objcl.cocoa-playground.asd ├── com.informatimago.objcl.cocoa-playground.test.asd ├── com.informatimago.objcl.test.asd ├── documentation.pdf ├── documentation.rst ├── gnu │ ├── Makefile │ ├── com.ogamita.swig.asd │ ├── com.ogamita.swig.test.asd │ ├── gnu.lisp │ ├── objc.i │ └── objc.lisp ├── howto.lisp ├── mac-roman-test.lisp ├── mac-roman.lisp ├── objc-support.lisp ├── objc │ ├── Makefile │ ├── lispify-objc │ └── objc.i ├── objcl-test.lisp ├── objcl.el ├── objcl.lisp ├── oclo-ccl.lisp ├── oclo.lisp ├── packages.lisp ├── scratch.lisp └── test.lisp ├── pgl ├── README ├── com.informatimago.pgl.asd ├── com.informatimago.pgl.examples.asd ├── examples │ ├── all.lisp │ ├── angles.lisp │ ├── ball.lisp │ ├── checkerboard.lisp │ ├── felt-board.lisp │ ├── image.lisp │ ├── tierra-desde-luna.jpg │ ├── yarn-pattern.lisp │ └── yin-yang.lisp ├── pgl-test.lisp └── pgl.lisp ├── post-clisp.awk ├── rdp ├── README ├── com.informatimago.rdp.asd ├── com.informatimago.rdp.basic.asd ├── com.informatimago.rdp.basic.example.asd ├── com.informatimago.rdp.basic.example.test.asd ├── com.informatimago.rdp.basic.test.asd ├── com.informatimago.rdp.example.asd ├── com.informatimago.rdp.example.test.asd ├── com.informatimago.rdp.test.asd ├── example-basic.lisp ├── example-lisp.lisp ├── movie-shell.lisp ├── packages.lisp ├── rdp-basic-gen.lisp ├── rdp-lisp-boilerplate.lisp ├── rdp-macro.lisp ├── rdp.lisp └── scratch.lisp ├── small-cl-pgms ├── 1024.lisp ├── Makefile ├── aim-8 │ ├── aim-8.aim-8 │ ├── aim-8.html.in │ ├── aim-8.lisp │ ├── aim-8.txt │ ├── aim-8.txt.gz │ ├── diff.m │ ├── examples.aim-8 │ └── index.html.in ├── author-signature.lisp ├── basic │ ├── basic.lisp │ ├── index.html.in │ ├── test-gosub-read.basic │ ├── test-gosub.basic │ ├── test1.basic │ └── test2.basic ├── botihn │ ├── Makefile │ ├── botihn.lisp │ ├── botihn.txt │ ├── com.informatimago.small-cl-pgms.botihn.asd │ └── generate-application.lisp ├── botil │ ├── Makefile │ ├── botil.lisp │ ├── com.informatimago.small-cl-pgms.botil.asd │ ├── design │ │ ├── botil.graffle │ │ ├── f-botil.png │ │ └── o-botil.png │ ├── generate-application.lisp │ └── loader.lisp ├── botvot │ ├── Makefile │ ├── botvot-test.lisp │ ├── botvot.lisp │ ├── botvot.org │ ├── com.informatimago.small-cl-pgms.botvot.asd │ └── generate-application.lisp ├── brainfuck │ ├── 99botles.bf │ ├── brainfuck-test.lisp │ ├── brainfuck.lisp │ ├── com.informatimago.small-cl-pgms.brainfuck.asd │ ├── com.informatimago.small-cl-pgms.brainfuck.test.asd │ ├── fizzbuzz.bf │ ├── fizzbuzz.bfrun │ ├── index.html.in │ ├── simple-cl.lisp │ └── simple-symbol.lisp ├── clisp-fork │ ├── count-fork.c │ └── count-fork.lisp ├── com.informatimago.small-cl-pgms.asd ├── com.informatimago.small-cl-pgms.life.asd ├── com.informatimago.small-cl-pgms.life.test.asd ├── com.informatimago.small-cl-pgms.quine.asd ├── com.informatimago.small-cl-pgms.quine.test.asd ├── com.informatimago.small-cl-pgms.test.asd ├── com.informatimago.small-cl-pgms.what-implementation.asd ├── com.informatimago.small-cl-pgms.what-implementation.test.asd ├── cube.lisp ├── douze.lisp ├── example-soft-opcodes.lisp ├── geek-day │ ├── Makefile │ ├── README │ ├── geek-day.gif │ └── geek-day.lisp ├── guess-the-cat.lisp ├── ibcl │ ├── ibcl-bootstrap.lisp │ ├── ibcl.lisp │ └── index.html.in ├── index.html.in ├── index.lisp ├── init.lisp ├── intersection-r5rs-common-lisp-emacs-lisp │ ├── Makefile │ ├── index.html.in │ ├── intersection-cl-el-r5rs.lisp │ └── intersection-cl-r5rs.lisp ├── irclog-prompter │ ├── README │ ├── com.informatimago.small-cl-pgms.irclog.asd │ ├── irclog.lisp │ ├── loader.lisp │ ├── main.lisp │ ├── packages.lisp │ ├── prompter-test.lisp │ ├── prompter.lisp │ ├── scratch.lisp │ └── swank-slime.lisp ├── le-compte-est-bon.lisp ├── life.lisp ├── m-expression │ ├── index.html.in │ └── m-expression.lisp ├── minlisp.lisp ├── miscellaneous │ └── clisp-server.lisp ├── moon.lisp ├── playtomo-stonedge │ ├── index.html.in │ └── playtomo-stonedge.lisp ├── puzzle.lisp ├── quine.lisp ├── rdp │ ├── example-basic-dribble.txt │ ├── example-basic.lisp │ ├── example-lisp-dribble.txt │ ├── example-lisp.lisp │ ├── index.html.in │ ├── movie-shell.lisp │ ├── rdp-basic-gen.lisp │ ├── rdp.lisp │ └── scratch.lisp ├── rpsls │ ├── index.html.in │ ├── rpcls.txt │ ├── rps101.html │ ├── rpsls-25.jpg │ └── rpsls.lisp ├── sedit │ ├── index.html.in │ ├── sedit.lisp │ ├── sedit2.lisp │ └── swap.lisp ├── solitaire.lisp ├── sudoku-solver │ ├── index.html.in │ └── sudoku-solver.lisp ├── toy-byte-code.lisp ├── toy-byte-code.txt ├── wang-cl.lisp ├── wang.html.in ├── wang.job ├── what-do-you-want │ ├── screen.css │ └── what-do-you-want.lisp └── what-implementation.lisp ├── susv3 ├── GPL ├── Makefile ├── README ├── VERSION.DAT ├── com.informatimago.susv3.asd ├── com.informatimago.susv3.test.asd ├── dirent.lisp ├── init.lisp ├── ipc.lisp ├── post-clisp.awk ├── process.lisp ├── summary.html └── tools.lisp ├── systems-for-quicklisp.sexp ├── test-all-systems.lisp ├── tools ├── Makefile ├── analyse-patchwork.lisp ├── analyze.lisp ├── asdf-file-test.lisp ├── asdf-file.lisp ├── asdf-system-tarball-location.lisp ├── asdf-test.lisp ├── asdf-tools.lisp ├── asdf.el ├── asdf.lisp ├── chatgpt.lisp ├── check-asdf-test.lisp ├── check-asdf.lisp ├── check-uses.lisp ├── clext-compile.lisp ├── clisp-compile.lisp ├── clmisc-compile.lisp ├── com.informatimago.tools.asd ├── com.informatimago.tools.bad-system-with-cycles.asd ├── com.informatimago.tools.chatgpt.asd ├── com.informatimago.tools.check-asdf.asd ├── com.informatimago.tools.check-asdf.test.asd ├── com.informatimago.tools.dependency.asd ├── com.informatimago.tools.make-depends.asd ├── com.informatimago.tools.make-depends.test.asd ├── com.informatimago.tools.manifest.asd ├── com.informatimago.tools.manifest.test.asd ├── com.informatimago.tools.pathname.asd ├── com.informatimago.tools.pathname.test.asd ├── com.informatimago.tools.quicklisp.asd ├── com.informatimago.tools.quicklisp.test.asd ├── com.informatimago.tools.reader-macro.asd ├── com.informatimago.tools.script.asd ├── com.informatimago.tools.script.test.asd ├── com.informatimago.tools.source.asd ├── com.informatimago.tools.source.test.asd ├── com.informatimago.tools.summary.asd ├── com.informatimago.tools.summary.test.asd ├── com.informatimago.tools.symbol.asd ├── com.informatimago.tools.symbol.test.asd ├── com.informatimago.tools.test.asd ├── com.informatimago.tools.thread.asd ├── com.informatimago.tools.try-systems.asd ├── com.informatimago.tools.undefmethod.asd ├── com.informatimago.tools.undefmethod.test.asd ├── common-lisp-compile.lisp ├── compile-with-asdf.lisp ├── dependencies.lisp ├── dependency-cycles-test.lisp ├── dependency-cycles.lisp ├── dummy-asdf.lisp ├── dummy-quicklisp.lisp ├── dummy-uiop.lisp ├── generate.lisp ├── html-unwrap-document.lisp ├── html-wrap-document.lisp ├── init-asdf.lisp ├── load-asdf.lisp ├── loader.lisp ├── make-depends-test.lisp ├── make-depends.lisp ├── make-depends.sh ├── make.lisp ├── make │ ├── Makefile │ ├── com.informatimago.tools.make-print-vars.asd │ ├── com.informatimago.tools.make.asd │ ├── generate-make-print-vars.lisp │ ├── generate.lisp │ ├── make-parser.lisp │ ├── make-print-vars.lisp │ ├── package.lisp │ └── parser.lisp ├── manifest-test.lisp ├── manifest.lisp ├── package-symbols.lisp ├── patch.lisp ├── pathname-test.lisp ├── pathname.lisp ├── quicklisp-test.lisp ├── quicklisp.lisp ├── reader-macro.lisp ├── sbcl-compile.lisp ├── script-test.lisp ├── script.lisp ├── source-test.lisp ├── source.lisp ├── summary-test.lisp ├── summary.lisp ├── susv3-compile.lisp ├── symbol-test.lisp ├── symbol.lisp ├── thread-test.lisp ├── thread.lisp ├── try-systems.lisp ├── undefmethod-test.lisp ├── undefmethod.lisp └── unintern.lisp └── xcode ├── com.informatimago.xcode.asd ├── com.informatimago.xcode.test.asd ├── pbxproj-test.lisp ├── pbxproj.lisp └── test.pbxproj /.gitignore: -------------------------------------------------------------------------------- 1 | *# 2 | *.# 3 | *.[dlw]x32fsl 4 | *.[dlw]x64fsl 5 | *.b 6 | *.bak 7 | *.bin 8 | *.cfsl 9 | *.dSYM 10 | *.db 11 | *.dfsl 12 | *.dll 13 | *.egg-info/ 14 | *.elf 15 | *.exe 16 | *.fas 17 | *.fasl 18 | *.fasl* 19 | *.fsl 20 | *.gcda 21 | *.gcno 22 | *.gcov 23 | *.hmap 24 | *.ilk 25 | *.iml 26 | *.ipa 27 | *.ipch 28 | *.keystore 29 | *.lib 30 | *.log 31 | *.map 32 | *.mode1v3 33 | *.mode2v3 34 | *.moved-aside 35 | *.o 36 | *.pbxuser 37 | *.pdb 38 | *.pdf 39 | *.perspectivev3 40 | *.pfsl 41 | *.pyc 42 | *.pyd 43 | *.pyo 44 | *.pyz 45 | *.sdf 46 | *.so 47 | *.sparcf 48 | *.sse2f 49 | *.sublime-workspace 50 | *.swp 51 | *.tex 52 | *.ufsl 53 | *.user 54 | *.vcxproj.user 55 | *.x86f 56 | *.xbf 57 | *.xccheckout 58 | *.xcuserstate 59 | */.vs 60 | */AppX 61 | */Debug 62 | */Generated Files 63 | */Release 64 | */fastlane/Preview.html 65 | */fastlane/report.xml 66 | */fastlane/screenshots 67 | */x64 68 | *\!*.asd 69 | *~ 70 | --version.lock 71 | .#* 72 | .DS_Store 73 | .DS_Store*.log 74 | ._* 75 | .babelrc 76 | .bin 77 | .buckconfig 78 | .flowconfig 79 | .gitattributes 80 | .gradle 81 | .idea 82 | .tern-* 83 | .vagrant 84 | .vagrant/ 85 | .vs 86 | .watchmanconfig 87 | CMakeCache.txt 88 | CMakeFiles/ 89 | Debug 90 | DerivedData 91 | Release 92 | \.buckd/ 93 | __build__/ 94 | __pycache__ 95 | __tests__/ 96 | app.json 97 | buck-out/ 98 | build/ 99 | cmake_install.cmake 100 | junit-results.xml 101 | local.properties 102 | node_modules/ 103 | npm-debug.log 104 | openssl-hash 105 | package-lock.json 106 | package.json 107 | project.xcworkspace 108 | quant.sublime-workspace 109 | quant/ 110 | sock*.txt 111 | system-index.txt 112 | testaes 113 | testchacha20poly1305 114 | testcurve25519 115 | testdrbg 116 | testmodes 117 | testnorx 118 | testpoly1305 119 | tests/artifacts 120 | testsalsa20 121 | testsha1 122 | testsha2 123 | testsha3 124 | x64 125 | xcuserdata 126 | xdb2/ 127 | yarn-error.log 128 | yarn.lock 129 | ~* 130 | -------------------------------------------------------------------------------- /README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/README.pdf -------------------------------------------------------------------------------- /announces/Makefile: -------------------------------------------------------------------------------- 1 | all: \ 2 | 001-relative-package.pdf 3 | 4 | clean: 5 | -@rm -f 001-relative-package.pdf 6 | 7 | 001-relative-package.pdf:001-relative-package.txt 8 | rst2pdf 001-relative-package.txt 001-relative-package.pdf 9 | open 001-relative-package.pdf 10 | 11 | -------------------------------------------------------------------------------- /boring: -------------------------------------------------------------------------------- 1 | # Boring file regexps: 2 | \.hi$ 3 | \.o$ 4 | \.o\.cmd$ 5 | # *.ko files aren't boring by default because they might 6 | # be Korean translations rather than kernel modules. 7 | # \.ko$ 8 | \.ko\.cmd$ 9 | \.mod\.c$ 10 | (^|/)\.tmp_versions($|/) 11 | (^|/)CVS($|/) 12 | (^|/)RCS($|/) 13 | ~$ 14 | #(^|/)\.[^/] 15 | (^|/)_darcs($|/) 16 | (^|/)semantic.cache($|/) 17 | (^|/)OBJ- 18 | \.bak$ 19 | \.BAK$ 20 | \.orig$ 21 | (^|/)vssver\.scc$ 22 | \.swp$ 23 | \.so$ 24 | (^|/)MT($|/) 25 | (^|/)\{arch\}($|/) 26 | (^|/).arch-ids($|/) 27 | (^|/), 28 | \.class$ 29 | \.prof$ 30 | (^|/)\.DS_Store$ 31 | (^|/)BitKeeper($|/) 32 | (^|/)ChangeSet($|/) 33 | (^|/)\.svn($|/) 34 | \.py[co]$ 35 | \# 36 | \.cvsignore$ 37 | (^|/)Thumbs\.db$ 38 | (^|/)autom4te\.cache($|/) 39 | -------------------------------------------------------------------------------- /ccl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LC_CTYPE=en_US.UTF-8 ccl --quiet --no-init --eval '(DECLAIM (OPTIMIZE (SAFETY 3) (DEBUG 3) (SPEED 0) (SPACE 0)))' --eval '(load "compile.lisp")' --eval '(ccl:quit)' 3 | -------------------------------------------------------------------------------- /cl-loaders/VERSION.DAT: -------------------------------------------------------------------------------- 1 | major=1 2 | minor=0 3 | compilation=3 4 | -------------------------------------------------------------------------------- /cl-loaders/aima.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | 3 | ;; ---------------------------------------------------------------------- 4 | ;; -- CMU-AI -- AIMA: Artificial Inteligence - A Modern Approach -- 5 | ;; ---------------------------------------------------------------- 6 | (eval-when (:compile-toplevel :load-toplevel :execute) 7 | (setf *readtable* (copy-readtable nil))) 8 | 9 | (load "cmu-ai:bookcode;aima;aima") 10 | (aima-load 'all) 11 | 12 | (defun compile-aima () 13 | (aima-compile) 14 | (test 'all)) 15 | 16 | ;;;; aima.lisp -- 2003-05-02 08:02:18 -- pascal ;;;; 17 | -------------------------------------------------------------------------------- /cl-loaders/cl-pdf.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | ;;;;**************************************************************************** 3 | ;;;;FILE: cl-pdf.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Loads com.fractalconcept.cl-pdf 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2004-10-05 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2004 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see 33 | ;;;;**************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | 37 | (load "LOADERS:ASDF") 38 | (pushnew "PACKAGES:COM;FRACTALCONCEPT;CL-PDF;" asdf:*central-registry*) 39 | (asdf:operate 'asdf:load-op :cl-pdf) 40 | 41 | ;;;; cl-pdf.lisp -- -- ;;;; 42 | -------------------------------------------------------------------------------- /cl-loaders/cliki.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | ;;;;**************************************************************************** 3 | ;;;;FILE: cliki.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Loads cliki under sbcl. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2004-12-25 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2004 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see 33 | ;;;;**************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | 37 | (if (string= (lisp-implementation-type) "SBCL") 38 | (sb-ext:without-package-locks (require 'cliki)) 39 | (format t "~&cliki works only on SBCL~%")) 40 | 41 | -------------------------------------------------------------------------------- /cl-loaders/garnet.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | ;;;;**************************************************************************** 3 | ;;;;FILE: garnet.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Loader for garnet. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2004-03-29 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2004 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see 33 | ;;;;**************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | 37 | (load "PACKAGES:NET;SOURCEFORGE;GARNET;GARNET-LOADER") 38 | 39 | -------------------------------------------------------------------------------- /cl-loaders/hemlock.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | ;;;;**************************************************************************** 3 | ;;;;FILE: hemlock.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Loads Portable Hemlock. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2004-07-29 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2004 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see 33 | ;;;;**************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | 37 | (load "loaders:clocc") 38 | (pushnew "/local/share/lisp/packages/net/common-lisp/phemlock" 39 | ;;"/usr/local/share/lisp/packages/org/dyndns/bauhh/hemlock/hemlock/" 40 | mk:*central-registry*) 41 | (mk:oos :hemlock :load) 42 | 43 | -------------------------------------------------------------------------------- /cl-loaders/html-parser.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | (eval-when (:compile-toplevel :load-toplevel :execute) 3 | (setf *readtable* (copy-readtable nil))) 4 | 5 | (let ((path 6 | "/local/share/lisp/packages/edu/mit/ai/cl-http-70-23/html-parser/v10/")) 7 | (setf (logical-pathname-translations "HTML-PARSER") 8 | `(("**;*.*.*" path))) 9 | 10 | (mapc (lambda (f) (load (compile-file (concatenate 'string path f ".lisp")))) 11 | '( 12 | "packages" 13 | "tokenizer" 14 | "plist" 15 | "defs" 16 | "patmatch" 17 | "rewrite-engine" 18 | "rewrite-rules" 19 | "html-tags" 20 | "html-reader" 21 | "html-parser" 22 | "html-utilities")) 23 | ) 24 | 25 | ;;;; html-parser.lisp -- 2003-09-15 04:54:44 -- pascal ;;;; 26 | -------------------------------------------------------------------------------- /cl-loaders/lisa.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | (eval-when (:compile-toplevel :load-toplevel :execute) 3 | (setf *readtable* (copy-readtable nil))) 4 | 5 | (unless (find-package "ASDF") (load "LOADER:ASDF")) 6 | (pushnew "PACKAGES:NET;SOURCEFORGE;LISA;LISA;" asdf::*central-registry*) 7 | (asdf:oos 'asdf:load-op :lisa) 8 | 9 | ;;;; clocc.lisp -- -- ;;;; 10 | -------------------------------------------------------------------------------- /cl-loaders/lmud.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | (eval-when (:compile-toplevel :load-toplevel :execute) 3 | (setf *readtable* (copy-readtable nil))) 4 | 5 | (dolist (file '(split-sequence 6 | defpkg 7 | mixins 8 | attributes 9 | species 10 | thing 11 | universe 12 | comestible 13 | living 14 | character 15 | room 16 | dice 17 | commands 18 | comdefs 19 | driver)) 20 | (load (merge-pathnames (make-pathname :name (string file) 21 | :version :newest) 22 | "PACKAGES:NET;COMMON-LISP;LMUD;LMUD;"))) 23 | 24 | 25 | 26 | ;;;; lmud.lisp -- -- ;;;; 27 | -------------------------------------------------------------------------------- /cl-loaders/mcclim.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | (eval-when (:compile-toplevel :load-toplevel :execute) 3 | (setf *readtable* (copy-readtable nil))) 4 | 5 | (ext:without-package-lock ("GRAY" "COMMON-LISP" "CHARSET") 6 | (package:add-nickname "CHARSET""EXTERNAL-FORMAT") 7 | (asdf:oos 'asdf:load-op :mcclim)) 8 | (asdf:operate 'asdf:load-op :clim-listener) 9 | (format t "~2%(clim-listener:run-listener)~2%") 10 | 11 | -------------------------------------------------------------------------------- /cl-loaders/pseudo.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | (eval-when (:compile-toplevel :load-toplevel :execute) 3 | (setf *readtable* (copy-readtable nil))) 4 | 5 | ;; LOADER:PSEUDO.LISP 6 | ;; ---------------------------------------------------------------------- 7 | ;; -- PSEUDO -- Pseudo-Scheme -- 8 | ;; ----------------------------- 9 | 10 | (in-package :common-lisp-user) 11 | (defvar *pseudoscheme-directory* *default-pathname-defaults*) 12 | (defvar *use-scheme-read* nil) 13 | (defvar *use-scheme-write* t) 14 | (pushnew :unix *features*) 15 | 16 | (progn 17 | (load (com.informatimago.tools.pathname:translate-logical-pathname #P"PACKAGES:EDU;MIT;AI;PSEUDO;LOADIT")) 18 | (load-pseudoscheme (com.informatimago.tools.pathname:translate-logical-pathname #P"PACKAGES:EDU;MIT;AI;PSEUDO;"))) 19 | 20 | (defun scheme () (ps:scheme)) 21 | (format t "~2%Use: (scheme)~2%") 22 | 23 | ;;;; THE END ;;;; 24 | -------------------------------------------------------------------------------- /cl-loaders/stumpwm.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | (eval-when (:compile-toplevel :load-toplevel :execute) 3 | (setf *readtable* (copy-readtable nil))) 4 | (load "loaders:clocc") 5 | (load "port:shell") 6 | (load "loaders:cclan") 7 | (push "/usr/local/src/stumpwm/" asdf:*central-registry*) 8 | (asdf:operate 'asdf:load-op 'stumpwm) 9 | (stumpwm:stumpwm "" :display 1) 10 | 11 | -------------------------------------------------------------------------------- /cl-loaders/uffi.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | ;;;;**************************************************************************** 3 | ;;;;FILE: uffi.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; UFFI loader. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2003-06-05 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2003 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see 33 | ;;;;**************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | 37 | (unless (find-package "ASDF") 38 | (load "LOADER:CCLAN.LISP")) 39 | 40 | (push (directory-namestring (translate-logical-pathname "UFFI:UFFI.ASD")) 41 | asdf:*central-registry*) 42 | (asdf:operate 'asdf:load-op :uffi) 43 | 44 | 45 | ;;;; uffi.lisp -- 2003-06-05 21:06:08 -- pascal ;;;; 46 | -------------------------------------------------------------------------------- /cl-posix/VERSION.DAT: -------------------------------------------------------------------------------- 1 | major=1 2 | minor=0 3 | compilation=3 4 | -------------------------------------------------------------------------------- /cl-posix/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Common-Lisp-Posix 7 | 8 | 10 | 11 | 13 | 14 | 17 | 18 | 21 | 22 | 23 | 24 | 25 |

Common-Lisp-Posix

26 | 27 |

Testing an HTML object: 28 | 29 |

30 |

31 | 37 | 38 |

Comment Here. 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /clext/Makefile: -------------------------------------------------------------------------------- 1 | PREFIX=/usr/local 2 | all:: 3 | doc:: 4 | install:: 5 | 6 | include ../implementations.mk 7 | 8 | CSS="/default.css" 9 | RSTHTMLOPT=\ 10 | --leave-comments \ 11 | --link-stylesheet --stylesheet=$(CSS) 12 | 13 | doc::documentation 14 | documentation::html pipe-article-fr.asc pipe-article-en.asc 15 | html::pipe-article-fr.html pipe-article-en.html 16 | html.in::pipe-article-fr.html.in pipe-article-en.html.in 17 | 18 | clean:: 19 | -@rm -f pipe-article-fr.asc pipe-article-en.asc pipe-article-fr.html.in pipe-article-en.html.in pipe-article-fr.html pipe-article-en.html 20 | 21 | pipe-article-fr.asc:pipe-article-fr.txt 22 | pandoc -f rst -t asciidoc < pipe-article-fr.txt >pipe-article-fr.asc 23 | pipe-article-en.asc:pipe-article-en.txt 24 | pandoc -f rst -t asciidoc < pipe-article-en.txt >pipe-article-en.asc 25 | pipe-article-fr.html.in:pipe-article-fr.txt 26 | rst2html $(RSTHTMLOPT) < pipe-article-fr.txt |../tools/html-unwrap-document.lisp > pipe-article-fr.html.in 27 | pipe-article-en.html.in:pipe-article-en.txt 28 | rst2html $(RSTHTMLOPT) < pipe-article-en.txt |../tools/html-unwrap-document.lisp > pipe-article-en.html.in 29 | pipe-article-fr.html:pipe-article-fr.html.in 30 | ../tools/html-wrap-document.lisp < pipe-article-fr.html.in > pipe-article-fr.html 31 | pipe-article-en.html:pipe-article-en.html.in 32 | ../tools/html-wrap-document.lisp < pipe-article-en.html.in > pipe-article-en.html 33 | 34 | .PHONY:doc documentation html html.in 35 | 36 | #### THE END #### 37 | -------------------------------------------------------------------------------- /clext/README: -------------------------------------------------------------------------------- 1 | .. comment: -*- mode:rst; coding:utf-8 -*- 2 | 3 | com.informatimago.clext Common Lisp Extensions Library 4 | ====================================================== 5 | 6 | This directory contains Common-Lisp packages that are mostly portable, 7 | but that use some extensions, packages out of the Common-Lisp 8 | specifications, like GRAY or other portability libraries. 9 | 10 | com.informatimago.clext.association 11 | This system defines a package exporting macros to define classes 12 | and associations separately. 13 | 14 | com.informatimago.clext.character-sets 15 | This system defines a package to manage character-sets and 16 | external-formats portably. 17 | 18 | com.informatimago.clext.closer-weak 19 | This system defines a package providing a portability layer for 20 | weak pointers and related structures on ccl, clisp, sbcl and cmu. 21 | 22 | com.informatimago.clext.pipe 23 | This system defines a package exporting a pipe abstraction 24 | connecting an output stream to an input stream thru a queue or a 25 | buffer. The threads writing or reading are synchronized. 26 | 27 | .. comment: 28 | 29 | ------------------------------------------------- 30 | --------------- 31 | - 32 | . 33 | 34 | -------------------------------------------------------------------------------- /clext/VERSION.DAT: -------------------------------------------------------------------------------- 1 | major=1 2 | minor=0 3 | compilation=224 4 | -------------------------------------------------------------------------------- /clext/debug.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | (defpackage "COM.INFORMATIMAGO.CLEXT.DEBUG" 4 | (:use "COMMON-LISP" 5 | "BORDEAUX-THREADS") 6 | (:shadow "WITH-LOCK-HELD") 7 | (:export "TR" "WITH-LOCK-HELD")) 8 | (in-package "COM.INFORMATIMAGO.CLEXT.DEBUG") 9 | 10 | 11 | (defvar *tr-lock* (make-lock "trace")) 12 | (defvar *tr-output* (make-synonym-stream '*trace-output*)) 13 | (defun tr (fc &rest a) 14 | (bt:with-lock-held (*tr-lock*) 15 | (format *tr-output* "~&~30A: ~?~&" (thread-name (current-thread)) fc a))) 16 | 17 | 18 | (defmacro with-lock-held ((place) &body body) 19 | (let ((lock (gensym))) 20 | `(let ((,lock ,place)) 21 | (tr "will acquire lock ~A" (ccl:lock-name ,lock)) 22 | (unwind-protect 23 | (bt:with-lock-held (,lock) 24 | (tr "acquired lock ~A" (ccl:lock-name ,lock)) 25 | ,@body) 26 | (tr "released lock ~A" (ccl:lock-name ,lock)))))) 27 | 28 | 29 | ;;;; THE END ;;;; 30 | -------------------------------------------------------------------------------- /clext/pkcs11/Makefile: -------------------------------------------------------------------------------- 1 | all:ulong test-find-objects 2 | ulong:ulong.c 3 | gcc $(DEBUG_FLAGS) -I. -L. -o $@ $< 4 | run::ulong 5 | @ ./ulong && echo status = $$? 6 | clean:: 7 | -rm -f ulong test-find-objects 8 | -rm -f core 9 | -rm -f *.lx64fsl *.dx64fsl *.o 10 | 11 | DEBUG_FLAGS = -O0 -g3 -ggdb3 -g -ggdb -gdwarf 12 | INCLUDES = -I$(HOME)/opt/include -I/usr/local/include -I. -I/usr/include/pkcs11-helper-1.0 13 | LIBDIRS = -L$(HOME)/opt/lib -L/usr/local/lib -L. 14 | LIBRARIES = -ldl 15 | LDFLAGS += $(DEBUG_FLAGS) $(LIBDIRS) 16 | CFLAGS += $(DEBUG_FLAGS) $(INCLUDES) 17 | test-find-objects.o:test-find-objects.c 18 | gcc $(DEBUG_FLAGS) $(CFLAGS) -c -o test-find-objects.o test-find-objects.c 19 | test-find-objects:test-find-objects.o 20 | gcc $(DEBUG_FLAGS) $(LDFLAGS) -o test-find-objects test-find-objects.o $(LIBRARIES) 21 | run::test-find-objects 22 | gdb test-find-objects 23 | 24 | TEST_CERT_DIR=%TEST_CERT_DIR% 25 | TESTCERT=test-cert 26 | TESTKEY=test-key 27 | certificate: 28 | openssl req -config $(TESTCERT).options -new \ 29 | -x509 -sha256 -newkey rsa:2048 -nodes \ 30 | -keyout $(TESTKEY).pem -out $(TESTCERT).pem -days 3650 31 | openssl x509 -in $(TESTCERT).pem -text -noout 32 | 33 | @echo '# to install certificate use:' 34 | @echo cp "$(TESTCERT).pem" "$(TEST_CERT_DIR)/Test_x509_cert_info.pem" 35 | @echo cp Certificat-d-authentification1.pem "$(TEST_CERT_DIR)/Test_x509_cert_info.pem" 36 | -------------------------------------------------------------------------------- /clext/pkcs11/cert.options: -------------------------------------------------------------------------------- 1 | [req] 2 | distinguished_name = subject 3 | x509_extensions = v3_logon_cert 4 | prompt = no 5 | 6 | [req_distinguished_name] 7 | C = US 8 | ST = OR 9 | L = Portland 10 | O = MyCompany 11 | OU = MyDivision 12 | CN = www.mycompany.com 13 | 14 | [v3_req] 15 | keyUsage = critical, digitalSignature, keyAgreement 16 | extendedKeyUsage = serverAuth 17 | subjectAltName = @alt_names 18 | 19 | [alt_names] 20 | DNS.1 = www.mycompany.com 21 | DNS.2 = mycompany.com 22 | DNS.3 = mycompany.net 23 | 24 | [v3_logon_cert] 25 | keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment 26 | extendedKeyUsage = critical, clientAuth, emailProtection, msSmartcardLogin 27 | basicConstraints = critical, CA:FALSE 28 | subjectKeyIdentifier = hash 29 | authorityKeyIdentifier = keyid,issuer 30 | #authorityInfoAccess = @customerca_aia 31 | subjectAltName = otherName:msUPN;UTF8:testjean.testmartin.9999999@mintest.fr, email:testjean.testmartin@test.gouv.fr 32 | certificatePolicies=ia5org 33 | #certificatePolicies=ia5org,@rootca_polsect 34 | 35 | [rootca_polsect] 36 | 37 | [customerca_aia] 38 | 39 | [subject] 40 | 41 | C = FR 42 | O = MINISTERE DES TESTS 43 | OU = 0002 110014016 44 | OU = PERSONNES 45 | UID = 9999999 46 | GN = TESTJEAN 47 | SN = TESTMARTIN 48 | CN = TESTJEAN TESTMARTIN 9999999 49 | 50 | [issuer] 51 | 52 | C = FR 53 | O = MINISTERE DES TESTS 54 | OU = 0002 110014016 55 | CN = ADMINISTRATION CENTRALE DES TESTS 56 | -------------------------------------------------------------------------------- /clext/pkcs11/cffi-debug.lisp: -------------------------------------------------------------------------------- 1 | (defpackage "COM.INFORMATIMAGO.CLEXT.PKCS11.CFFI-DEBUG" 2 | (:use "COMMON-LISP" "CFFI") 3 | (:shadow "FOREIGN-ALLOC" "FOREIGN-FREE") 4 | (:export "FOREIGN-ALLOC" "FOREIGN-FREE" 5 | "*TRACE*")) 6 | (in-package "COM.INFORMATIMAGO.CLEXT.PKCS11.CFFI-DEBUG") 7 | 8 | (defparameter *allocated* (make-hash-table)) 9 | (defparameter *freed* (make-hash-table)) 10 | (defvar *trace* nil) 11 | 12 | (defun foreign-alloc (type 13 | &rest keyargs 14 | &key (initial-element nil) (initial-contents nil) 15 | (count 1) null-terminated-p) 16 | (declare (ignorable initial-element initial-contents null-terminated-p)) 17 | (let ((ptr (apply (function cffi:foreign-alloc) type keyargs)) 18 | (size (* (foreign-type-size type) count))) 19 | (setf (gethash (pointer-address ptr) *allocated*) size) 20 | (when *trace* 21 | (format *trace-output* "~&(foreign-alloc ~S ~{~S~^ ~}) -> ~S~%" 22 | type keyargs ptr)) 23 | ptr)) 24 | 25 | 26 | (defun foreign-free (ptr) 27 | (when *trace* (format *trace-output* "~&(foreign-free ~S)~%" ptr)) 28 | (let* ((address (pointer-address ptr)) 29 | (size (gethash address *allocated*))) 30 | (if size 31 | (progn 32 | (setf (gethash address *freed*) size) 33 | (remhash address *allocated*) 34 | (cffi:foreign-free ptr)) 35 | (let ((size (gethash address *freed*))) 36 | (if size 37 | (warn "Double free of ~S (size = ~S)" ptr size) 38 | (progn 39 | (warn "Freeing unallocated pointer ~S" ptr) 40 | (cffi:foreign-free ptr))))))) 41 | 42 | ;;;; THE END ;;;; 43 | -------------------------------------------------------------------------------- /clext/pkcs11/com.informatimago.clext.pkcs11.tests.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.clext.pkcs11.tests.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; System to test the com.informatimago.clext.pkcs11 package. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2018-09-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2018 - 2018 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | ;;;; 35 | 36 | (asdf:defsystem "com.informatimago.clext.pkcs11.tests" 37 | :description "PKCS11 wrapper tests." 38 | :author "Pascal J. Bourguignon" 39 | :version "0.0.0" 40 | :license "AGPL3" 41 | :depends-on ("com.informatimago.clext.pkcs11" 42 | "com.informatimago.common-lisp.interactive") 43 | :components ((:file "tests" :depends-on ("pkcs11")) 44 | (:file "debug" :depends-on ("pkcs11")))) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /clext/pkcs11/loader.lisp: -------------------------------------------------------------------------------- 1 | ;; (push #P"~/src/public/test/pkcs11/" asdf:*central-registry*) 2 | (ql:quickload :com.informatimago.clext.pkcs11) 3 | (com.informatimago.clext.pkcs11:load-library) 4 | -------------------------------------------------------------------------------- /clext/pkcs11/ulong.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | unsigned long x = ~0; 6 | unsigned long y = (unsigned long) -1; 7 | printf("%lu\n", x); 8 | printf("%lu\n", y); 9 | printf("%lu\n", ULONG_MAX); 10 | printf("%lu bytes\n", sizeof(x)); 11 | printf("%lu bits\n", sizeof(x) * CHAR_BIT); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /clext/run-program/com.informatimago.clext.run-program.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.clext.run-program.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; RUN-PROGRAM. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-03-15 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2013 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.clext.run-program" 36 | :description "An portable run-program function." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.0" 39 | :license "AGPL3" 40 | :depends-on ("com.informatimago.common-lisp.cesarum") 41 | :components ((:file "run-program")) 42 | #+asdf-unicode :encoding #+asdf-unicode :utf-8 43 | #+adsf3 :in-order-to #+adsf3 ((asdf:test-op (asdf:test-op "com.informatimago.clext.run-program.test")))) 44 | 45 | ;;;; THE END ;;;; 46 | -------------------------------------------------------------------------------- /clext/summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Summary 7 | 8 | 9 |

  • 10 | 11 | 12 | COM.INFORMATIMAGO.CLEXT.CLOSER-WEAK 13 |
    14 | Closer to Weak objects.
    15 | Implements the specification: http://clisp.cons.org/impnotes/weak.html
    16 | for Common Lisp implementations that have weak-pointers.
    17 | WEAK-OR-RELATION is a primitive that cannot be implemented propertly
    18 | without implementation support.
    19 | Currently work on:
    20 | clisp      full support
    21 | cmucl      partial support (missing WEAK-OR-RELATION)
    22 | sbcl       partial support (missing WEAK-OR-RELATION)
    23 | Read-time Features:
    24 | :WEAK-TEST    When testing, call the garbage collector
    25 | to break weak pointers sooner.
    26 | :DEBUG-WEAK   When compiling on clisp, use this implementation
    27 | instead of the native one.
    28 | 
  • -------------------------------------------------------------------------------- /clext/telnet/TODO.org: -------------------------------------------------------------------------------- 1 | * TODOS 2 | ** TODO [#A] implement receive-control -> AYT, INTERUPT, BREAK, etc. 3 | ** TODO [#A] check the situations (disconnect from client, disconnect from server, reconnect, etc) 4 | ** TODO [#A] hook the debugger. invoke-debugger calls sldb, instead of the REPL debugger on telnet terminal. 5 | ** TODO [#A] babel-extension.lisp: ;; TODO: Is it always the same for all encodings? 6 | ** TODO [#A] telnet-repl.lisp: ;; TODO: Securize the *readtable* and the *package* (cf. something like ibcl) 7 | ** TODO [#A] telnet-stream.lisp:*** TODO We need to check thread safety of the NVT and the TELNET-STREAM. 8 | ** TODO [#A] telnet-stream.lisp:(defgeneric stop-closure (client)) ;; TODO must be imported from telnet.repl 9 | ** TODO [#A] telnet-stream.lisp: ;; TODO: check if the new buffer size is enough for the buffer content, and keep the old buffered input. 10 | ** TODO [#A] telnet-stream.lisp: ;; TODO: negociate with remote for a new encoding. 11 | ** TODO [#A] telnet-stream.lisp: ;; TODO: check element-type first: 12 | ** TODO [#A] telnet-stream.lisp: ;; TODO: negociate with remote for a text or binary. 13 | ** TODO [#A] telnet-stream.lisp: (return-from stream-read-line (values line nil #|TODO: EOF is always NIL?|#))) 14 | ** TODO [#A] telnet-stream.lisp: ;; TODO: check whether sending CR LF is equivalent to send-control :cr :lf 15 | ** TODO [#A] telnet-stream.lisp: ;; TODO: can we buffer the :cr :lf control with the line? Is it done in the NVT? 16 | ** TODO [#A] telnet-stream.lisp: ;; TODO: check whether sending CR LF is equivalent to send-control :cr :lf 17 | ** TODO [#A] telnet-stream.lisp: ;; TODO: close a telnet-stream 18 | ** TODO [#A] telnet-stream.lisp: ;; TODO: how to wait for write-sequence completed? 19 | ** TODO [#A] telnet-stream.lisp: ;; TODO implement stream-write-byte 20 | ** TODO [#A] telnet-stream.lisp: ;; TODO implement stream-write-sequence 21 | ** TODO [#A] refactor as telnet-application and make telnet-repl an instance of telnet-application. 22 | -------------------------------------------------------------------------------- /clext/telnet/debug.lisp: -------------------------------------------------------------------------------- 1 | (bt:interrupt-thread (second (bt:all-threads)) (function break)) 2 | -------------------------------------------------------------------------------- /clext/telnet/stop.lisp: -------------------------------------------------------------------------------- 1 | (in-package "COM.INFORMATIMAGO.CLEXT.TELNET.REPL") 2 | (setf *repl-server* (com.informatimago.clext.telnet.repl:stop-repl-server *repl-server*)) 3 | (com.informatimago.tools.thread:list-threads) 4 | -------------------------------------------------------------------------------- /clisp/Makefile: -------------------------------------------------------------------------------- 1 | #***************************************************************************** 2 | #FILE: Makefile 3 | #LANGUAGE: make 4 | #SYSTEM: posix 5 | #USER-INTERFACE: none 6 | #DESCRIPTION 7 | # 8 | # This makefile compiles additionnal code for the clisp specific packages. 9 | # 10 | #AUTHORS 11 | # Pascal Bourguignon 12 | #MODIFICATIONS 13 | # 2010-06-27 Factorized out into ../implementations.mk 14 | # 2003-05-04 Added this header. 15 | #BUGS 16 | #LEGAL 17 | # AGPL3 18 | # 19 | # Copyright Pascal Bourguignon 2003 - 2016 20 | # 21 | # This program is free software: you can redistribute it and/or modify 22 | # it under the terms of the GNU Affero General Public License as published by 23 | # the Free Software Foundation, either version 3 of the License, or 24 | # (at your option) any later version. 25 | # 26 | # This program is distributed in the hope that it will be useful, 27 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | # GNU Affero General Public License for more details. 30 | # 31 | # You should have received a copy of the GNU Affero General Public License 32 | # along with this program. If not, see http://www.gnu.org/licenses/ 33 | #***************************************************************************** 34 | PREFIX = /usr/local 35 | 36 | all:: libraw-memory.so 37 | 38 | # Libraries are loaded at run-time, so they must be installed 39 | # in some public place, or distributed along with the applications. 40 | # There would be no point to keeping them in asdf-binary-location places. 41 | 42 | raw-memory-lib.o:raw-memory-lib.c 43 | $(CC) -shared -fPIC -g -O3 -c -o $@ $< 44 | 45 | libraw-memory.so:raw-memory-lib.o 46 | if [ $(shell uname) = Darwin ] ;\ 47 | then $(LD) -dynamic -o $@ $< ;\ 48 | else $(LD) -shared -fPIC -g -o $@ $< ;\ 49 | fi 50 | 51 | install:: 52 | -mkdir $(PREFIX)/lib 53 | install -m 644 libraw-memory.so $(PREFIX)/lib/libraw-memory.so 54 | 55 | #### THE END #### 56 | -------------------------------------------------------------------------------- /clisp/Makefile.depend: -------------------------------------------------------------------------------- 1 | # -*- mode: makefile -*- 2 | -------------------------------------------------------------------------------- /clisp/README: -------------------------------------------------------------------------------- 1 | .. comment: -*- mode:rst; coding:utf-8 -*- 2 | 3 | com.informatimago.clisp Common Lisp clisp Library 4 | ================================================= 5 | 6 | This library contains clisp-dependant packages. 7 | 8 | 9 | 10 | 11 | .. comment: 12 | 13 | ------------------------------------------------- 14 | --------------- 15 | - 16 | . 17 | 18 | -------------------------------------------------------------------------------- /clisp/VERSION.DAT: -------------------------------------------------------------------------------- 1 | major=1 2 | minor=0 3 | compilation=3 4 | -------------------------------------------------------------------------------- /clisp/clisp-ffi-howto.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/clisp/clisp-ffi-howto.txt -------------------------------------------------------------------------------- /clisp/clisp-ffi.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/clisp/clisp-ffi.txt -------------------------------------------------------------------------------- /clisp/post-clisp.awk: -------------------------------------------------------------------------------- 1 | BEGIN{ 2 | "/usr/local/bin/clisp -q -norc -ansi -x \"(princ(namestring (truename \\\"$(pwd)/\\\")))\""|getline pwd 3 | } 4 | 5 | /Compiling file /{ 6 | file=$4; 7 | if(substr(file,0,length(pwd))==pwd){ 8 | file=substr(file,1+length(pwd)); 9 | } 10 | next; 11 | } 12 | 13 | /; *Loading file /{ 14 | file=$4; 15 | if(substr(file,0,length(pwd))==pwd){ 16 | file=substr(file,1+length(pwd)); 17 | } 18 | next; 19 | } 20 | 21 | /WARNING in.*in lines/{ 22 | start=index($0,"WARNING in ")+length("WARNING in "); 23 | fn=substr($0,start,index($0," in lines ")-start); 24 | start=index($0," in lines ")+length(" in lines "); 25 | lines=substr($0,start,index(substr($0,start)," ")-1); 26 | split(lines,n,"\\."); 27 | w="WARNING"; 28 | next; 29 | } 30 | 31 | /ERROR.*in lines/{ 32 | start=index($0,"ERROR in ")+length("WARNING in "); 33 | fn=substr($0,start,index($0," in lines ")-start); 34 | start=index($0," in lines ")+length(" in lines "); 35 | lines=substr($0,start,index(substr($0,start)," ")-1); 36 | split(lines,n,"\\."); 37 | w="ERROR"; 38 | next; 39 | } 40 | 41 | { 42 | if(w!=""){ 43 | printf "%s:%s:1:\n%s:%s:2:%s in %s: %s\n",file,n[1],file,n[3],w,fn,$0; 44 | w=""; 45 | }else{ 46 | print $0; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /clisp/raw-memory-lib.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | FILE: raw-memory-lib.c 3 | LANGUAGE: c 4 | SYSTEM: POSIX 5 | USER-INTERFACE: NONE 6 | DESCRIPTION 7 | 8 | Peek and poke. 9 | 10 | AUTHORS 11 | Pascal J. Bourguignon 12 | MODIFICATIONS 13 | 2010-11-04 Beautified. Made use of uint*_t types from . 14 | 2004-12-05 Created. 15 | BUGS 16 | LEGAL 17 | GPL 18 | 19 | Copyright Pascal J. Bourguignon 2004 - 2010 20 | 21 | This program is free software; you can redistribute it and/or 22 | modify it under the terms of the GNU General Public License 23 | as published by the Free Software Foundation; either version 24 | 2 of the License, or (at your option) any later version. 25 | 26 | This program is distributed in the hope that it will be 27 | useful, but WITHOUT ANY WARRANTY; without even the implied 28 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 29 | PURPOSE. See the GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public 32 | License along with this program; if not, write to the Free 33 | Software Foundation, Inc., 59 Temple Place, Suite 330, 34 | Boston, MA 02111-1307 USA 35 | *****************************************************************************/ 36 | 37 | #include 38 | 39 | uint8_t peek8 (const uint8_t * address){ return(*address); } 40 | uint16_t peek16(const uint16_t* address){ return(*address); } 41 | uint32_t peek32(const uint32_t* address){ return(*address); } 42 | uint64_t peek64(const uint64_t* address){ return(*address); } 43 | 44 | void poke8 (uint8_t * address,uint8_t value){ (*address)=value; } 45 | void poke16(uint16_t* address,uint16_t value){ (*address)=value; } 46 | void poke32(uint32_t* address,uint32_t value){ (*address)=value; } 47 | void poke64(uint64_t* address,uint64_t value){ (*address)=value; } 48 | 49 | /**** THE END ****/ 50 | -------------------------------------------------------------------------------- /clisp/syslog.c: -------------------------------------------------------------------------------- 1 | #include "clisp.h" 2 | 3 | extern object module__syslog__object_tab[]; 4 | 5 | subr_t module__syslog__subr_tab[1]; 6 | uintC module__syslog__subr_tab_size = 0; 7 | subr_initdata_t module__syslog__subr_tab_initdata[1]; 8 | 9 | object module__syslog__object_tab[1]; 10 | object_initdata_t module__syslog__object_tab_initdata[1]; 11 | uintC module__syslog__object_tab_size = 0; 12 | 13 | extern void (openlog)(); 14 | extern void (syslog)(); 15 | extern void (closelog)(); 16 | 17 | void module__syslog__init_function_1(module) 18 | var module_t* module; 19 | { } 20 | 21 | void module__syslog__init_function_2(module) 22 | var module_t* module; 23 | { 24 | register_foreign_function(&openlog,"openlog",1024); 25 | register_foreign_function(&syslog,"syslog",1024); 26 | register_foreign_function(&closelog,"closelog",1024); 27 | } 28 | -------------------------------------------------------------------------------- /clisp/uffi.c: -------------------------------------------------------------------------------- 1 | #include "clisp.h" 2 | 3 | extern object module__uffi__object_tab[]; 4 | 5 | subr_t module__uffi__subr_tab[1]; 6 | uintC module__uffi__subr_tab_size = 0; 7 | subr_initdata_t module__uffi__subr_tab_initdata[1]; 8 | 9 | object module__uffi__object_tab[1]; 10 | object_initdata_t module__uffi__object_tab_initdata[1]; 11 | uintC module__uffi__object_tab_size = 0; 12 | 13 | 14 | void module__uffi__init_function_1 (module_t* module) 15 | { } 16 | 17 | void module__uffi__init_function_2 (module_t* module) 18 | { 19 | register_foreign_function((void*)&malloc,"malloc",1024); 20 | register_foreign_function((void*)&free,"free",1024); 21 | } 22 | -------------------------------------------------------------------------------- /clmisc/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile stub. 2 | PREFIX=/usr/local 3 | all:: 4 | install:: 5 | #### THE END #### 6 | -------------------------------------------------------------------------------- /clmisc/README: -------------------------------------------------------------------------------- 1 | .. comment: -*- mode:rst; coding:utf-8 -*- 2 | 3 | com.informatimago.clmisc Common Lisp Miscellaneous Library 4 | ========================================================== 5 | 6 | This library contains various CL packages. 7 | 8 | 9 | Notes 10 | ===== 11 | 12 | Here is a way to "mirror" the cliki page used by asdf-install. 13 | 14 | Darcs repository: http://darcs.informatimago.com/darcs/public/lisp/ 15 | 16 | File: http://darcs.informatimago.com/darcs/public/lisp/clmisc/asdf-system-tarball-location.lisp 17 | 18 | It add some functions to asdf-system to keep a local copy of the assoc 19 | between the system names and the tarball urls, and use it instead of 20 | accessing cliki to install an asdf system. 21 | 22 | :: 23 | (asdf:oos 'asdf:load-op :asdf-system) 24 | (load "PACKAGE:COM;INFORMATIMAGO;COMMON-LISP;PACKAGE.LISP") 25 | (push (function package:package-system-definition) 26 | asdf:*system-definition-search-functions*) 27 | (asdf:oos 'asdf:load-op :com.informatimago.clmisc) 28 | 29 | (asdf-install:asc-update-cliki-tarball-locations :verbose t) 30 | ;; Updates the local cache with the tarball locations on cliki. 31 | ;; This doesn't modify the personnal associations. 32 | 33 | (asc-list-systems) 34 | ;; gives a list of known asdf-installable system names. 35 | 36 | (lsasc) 37 | ;; Prints the same list, with the URL of the tarballs 38 | ;; (and the last response code obtained when finding the URL 39 | ;; when it's not 200), 40 | ;; and whether the asdf system is installed and/or loaded. 41 | 42 | (asc-system-tarball-location "split-sequence") 43 | ;; Returns the tarball URL (string). 44 | 45 | (setf (asc-system-tarball-location system-name) tarball-url) 46 | ;; Sets a personnal tarball URL. It may hide a cliki URL. 47 | 48 | 49 | 50 | .. comment: 51 | 52 | ------------------------------------------------- 53 | --------------- 54 | - 55 | . 56 | 57 | -------------------------------------------------------------------------------- /clmisc/VERSION.DAT: -------------------------------------------------------------------------------- 1 | major=1 2 | minor=0 3 | compilation=228 4 | -------------------------------------------------------------------------------- /clmisc/summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Summary 7 | 8 | 9 |
  • 10 | 11 | 12 | COM.INFORMATIMAGO.CLMISC.RESOURCE-UTILIZATION 13 |
    14 | Display resource utilisation summary.
    15 | 
    16 | This package exports a macro that gather resource utilization statistics
    17 | and report them.
    18 | 
    19 | Usage:
    20 | 
    21 | (reporting-sru (:job-origin (remote-client) :stream (remote-stream))
    22 | (do-something-lengthy))
    23 | 
    24 | (reporting-sru (:job-origin (remote-client) :stream (remote-stream)
    25 | :report-to (lambda (cpu-time sys-time device-i/o paging-i/o
    26 | job-origin &key (stream t))
    27 | (SUMMARY-RESOURCE-UTILIZATION
    28 | cpu-time sys-time device-i/o paging-i/o
    29 | job-origin :stream stream)))
    30 | (do-something-lengthy))
    31 | Example:
    32 | (reporting-sru (:job-origin "REPL")
    33 | (asdf-load :com.informatimago.clext))
    34 | prints:
    35 | Summary of resource utilization
    36 | -------------------------------
    37 | CPU time:       0.300 sec                Device I/O:      175
    38 | Overhead CPU:   0.012 sec                Paging I/O:        1
    39 | CPU model:   AMD Athlon(tm) Processor 6.4.2 1200.303 MHz (2402.66 bogomips)
    40 | Job origin:  REPL
    41 | 
  • -------------------------------------------------------------------------------- /common-lisp/VERSION.DAT: -------------------------------------------------------------------------------- 1 | major=1 2 | minor=1 3 | compilation=397 4 | -------------------------------------------------------------------------------- /common-lisp/bank/credit-card.txt: -------------------------------------------------------------------------------- 1 | The following table contains the mapping from card types to card number prefixes. This table is adapted from Wikipedia’s bank card number page, the most frequently updated public resource on this data. 2 | Card Type Card Number Prefix 3 | American Express 34, 37 4 | China UnionPay 62, 88 5 | Diners ClubCarte Blanche 300-305 6 | Diners Club International 300-305, 309, 36, 38-39 7 | Diners Club US & Canada 54, 55 8 | Discover Card 6011, 622126-622925, 644-649, 65 9 | JCB 3528-3589 10 | Laser 6304, 6706, 6771, 6709 11 | Maestro 5018, 5020, 5038, 5612, 5893, 6304, 6759, 6761, 6762, 6763, 0604, 6390 12 | Dankort 5019 13 | MasterCard 50-55 14 | Visa 4 15 | Visa Electron 4026, 417500, 4405, 4508, 4844, 4913, 4917 16 | -------------------------------------------------------------------------------- /common-lisp/bank/rib-es.vb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/bank/rib-es.vb -------------------------------------------------------------------------------- /common-lisp/cesarum/ecma048.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/cesarum/ecma048.txt -------------------------------------------------------------------------------- /common-lisp/cesarum/iso3166-cocucod.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/cesarum/iso3166-cocucod.html -------------------------------------------------------------------------------- /common-lisp/cesarum/iso4217.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/cesarum/iso4217.htm -------------------------------------------------------------------------------- /common-lisp/cesarum/lisp.indentations: -------------------------------------------------------------------------------- 1 | ;; -*- mode:lisp -*- 2 | 3 | (1 collecting-result 4 | defenum) 5 | 6 | -------------------------------------------------------------------------------- /common-lisp/cesarum/unit.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: unit.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Unit converter. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2018-07-24 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2018 - 2018 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (defpackage "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.UNIT" 35 | (:use "COMMON-LISP") 36 | (:export "FAHRENHEIT" 37 | "KELVIN" 38 | "CELCIUS" 39 | "RANKINE")) 40 | (in-package "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.UNIT") 41 | 42 | (defun fahrenheit (f) 43 | "Return f Fahrenheit in Kelvin." 44 | (* (- f 32.0) 5/9)) 45 | 46 | (defun kelvin (k) 47 | "Return k Kelvin in Kelvin." 48 | k) 49 | 50 | (defun celcius (c) 51 | "Return c Celcius in Kelvin." 52 | (+ c 273.15)) 53 | 54 | (defun rankine (r) 55 | "Return r Rankine in Kelvin." 56 | (fahrenheit (- r 459.67))) 57 | 58 | ;;;; THE END ;;;; 59 | -------------------------------------------------------------------------------- /common-lisp/compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ccl -n -e '(load "compile-with-asdf.lisp")' -e '(ccl:quit)' 4 | clisp -norc -x '(load "compile-with-asdf.lisp")' -x '(ext:quit)' 5 | ecl -norc -eval '(load "compile-with-asdf.lisp")' -eval '(ext:quit)' 6 | sbcl --no-userinit --eval '(load "compile-with-asdf.lisp")' --eval '(sb-ext:quit)' 7 | 8 | #### THE END #### 9 | -------------------------------------------------------------------------------- /common-lisp/csv/lisp.indentations: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp; coding:utf-8 -*- 2 | 3 | (1 while until) 4 | 5 | ;;;; THE END ;;;; 6 | 7 | -------------------------------------------------------------------------------- /common-lisp/data-encoding/ieee-754-test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/data-encoding/ieee-754-test -------------------------------------------------------------------------------- /common-lisp/data-encoding/ieee-754-test.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static void dump(unsigned char* mem,int length){ 4 | unsigned char* p=mem+length; 5 | printf("#x"); 6 | while(p!=mem){ 7 | p--; 8 | printf("%02x",(*p)); 9 | } 10 | } 11 | 12 | static void test_float(float f){ 13 | int* fp=(int*)(&f); 14 | dump((unsigned char*)fp,4); 15 | printf(" %f\n",f); 16 | } 17 | 18 | static void test_double(double d){ 19 | long* dp=(long*)(&d); 20 | dump((unsigned char*)dp,8); 21 | printf(" %lf\n",d); 22 | } 23 | 24 | int main(){ 25 | test_float(0.0e0f); 26 | test_float(1.0e30f); 27 | test_double(0.0e0); 28 | test_double(1.0e30); 29 | return(0); 30 | } 31 | -------------------------------------------------------------------------------- /common-lisp/ed/ed-tutorial.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/ed/ed-tutorial.txt -------------------------------------------------------------------------------- /common-lisp/heap/demo.lisp: -------------------------------------------------------------------------------- 1 | (defpackage "DEMO" 2 | (:use "CL" 3 | "COM.INFORMATIMAGO.COMMON-LISP.HEAP.MEMORY" 4 | "COM.INFORMATIMAGO.COMMON-LISP.HEAP.HEAP")) 5 | (in-package "DEMO") 6 | (defparameter *mem* (make-instance 'memory-vector-64 :base 0 :size 32768)) 7 | (common-initialize *mem*) 8 | (defcommon *fruits*) 9 | (setf *fruits* '((2 apple) (3 orange) (18 cherry))) 10 | (setf *fruits* '((10 apple) (2 orange) (19 cherry))) 11 | *fruits* ; -> ((10 apple) (2 orange) (19 cherry)) 12 | (macroexpand '*fruits*) ; -> (get-common '*fruits*) ; t 13 | com.informatimago.common-lisp.heap.heap::*defined-common-variables* ; -> (*fruits* *common-variables*) 14 | (subseq (com.informatimago.common-lisp.heap.memory::bytes *mem*) 0 8) ; -> #(4597283572347515282 0 2305843009213693960 72057594037927942 2594073385365405895 1008806316530995200 2594073385365405706 2594073385365405953) 15 | (dump *mem* 0 80 :stream *standard-output* :margin "" :byte-size 8) 16 | -------------------------------------------------------------------------------- /common-lisp/html-generator/html-generators-in-lisp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/html-generator/html-generators-in-lisp.txt -------------------------------------------------------------------------------- /common-lisp/obsolete-or-incomplete/espana--codigo-cif.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/obsolete-or-incomplete/espana--codigo-cif.html -------------------------------------------------------------------------------- /common-lisp/obsolete-or-incomplete/espana--codigo-nif.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/obsolete-or-incomplete/espana--codigo-nif.html -------------------------------------------------------------------------------- /common-lisp/obsolete-or-incomplete/graf.diagram2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/obsolete-or-incomplete/graf.diagram2.tar.gz -------------------------------------------------------------------------------- /common-lisp/obsolete-or-incomplete/iso15924-20030223.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/common-lisp/obsolete-or-incomplete/iso15924-20030223.pdf -------------------------------------------------------------------------------- /common-lisp/obsolete-or-incomplete/iso646.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | ;;;;*************************************************************************** 3 | ;;;;FILE: iso646.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; This package exports contants naming the ISO646 control codes. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2005-09-01 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2005 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see 33 | ;;;;*************************************************************************** 34 | -------------------------------------------------------------------------------- /common-lisp/obsolete-or-incomplete/repl.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- coding:utf-8 -*- 2 | 3 | #.((lambda () 4 | (let ((*standard-input* *query-io*) 5 | (*standard-output* *query-io*) 6 | (*error-output* *query-io*) 7 | (*query-io* *query-io*)) 8 | (format t "~%;; Enter: (QUIT [result]) to get out of this REPL.") 9 | (finish-output) 10 | (do ((hist 1 (1+ hist)) 11 | (+eof+ (gensym))) 12 | (nil) 13 | (format t "~%~A[~D]> " (package-name *package*) hist) 14 | (finish-output) 15 | (handler-case 16 | (progn 17 | (setf +++ ++ ++ + + - - (read *standard-input* nil +eof+)) 18 | (cond ((eq - +eof+) (return)) 19 | ((equalp - '(quit)) (return)) 20 | ((and (consp -) (equalp (car -) 'quit)) 21 | (return (ignore-errors (eval (second -)))))) 22 | (setf /// // // / / (multiple-value-list (eval -))) 23 | (setf *** ** ** * * (first /)) 24 | (format t "~& --> ~{~S~^ ;~% ~}~%" /)) 25 | (error (err) (format t "~S~%~A~%" err err))))))) 26 | -------------------------------------------------------------------------------- /common-lisp/rfc3548/lisp.indentations: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp; coding:utf-8 -*- 2 | 3 | (1 with-input-from-byte-vector 4 | with-output-to-byte-vector) 5 | 6 | (2 with-io) 7 | 8 | ;;;; THE END ;;;; 9 | -------------------------------------------------------------------------------- /description: -------------------------------------------------------------------------------- 1 | Informatimago's Common Lisp Libraries 2 | 3 | -------------------------------------------------------------------------------- /driver/test-ll/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all:hw1 hw2 hw3 3 | 4 | hw1:hw.lisp hello.lisp word.lisp 5 | ll -o hw1 hello.lisp word.lisp hw.lisp 6 | 7 | 8 | 9 | hw2:hw.lisp hello.ol word.ol 10 | ll -o hw2 hw.lisp -l hello.ol -l word.ol 11 | 12 | hw3:hello.lisp libhw.ol 13 | ll -o hw3 hello.lisp libhw.ol 14 | 15 | libhw.ol: hello.lisp word.lisp 16 | ll -o libhw.ol hello.lisp word.lisp 17 | 18 | hello.ol:hello.lisp 19 | ll -c -o hello.ol hello.lisp 20 | 21 | word.ol:word.lisp 22 | ll -c word.lisp 23 | -------------------------------------------------------------------------------- /driver/test-ll/hello.lisp: -------------------------------------------------------------------------------- 1 | (defpackage "H" 2 | (:use "CL") 3 | (:export "ELLO")) 4 | (in-package "H") 5 | (defun ello () 6 | (prin1 'hello)) 7 | -------------------------------------------------------------------------------- /driver/test-ll/hello.ol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/driver/test-ll/hello.ol -------------------------------------------------------------------------------- /driver/test-ll/hw.lisp: -------------------------------------------------------------------------------- 1 | 2 | (defun main () 3 | (h:ello) 4 | (w:ord)) 5 | 6 | -------------------------------------------------------------------------------- /driver/test-ll/word.lisp: -------------------------------------------------------------------------------- 1 | (defpackage "W" 2 | (:use "CL") 3 | (:export "ORD")) 4 | (in-package "W") 5 | (defun ord () 6 | (prin1 'ord)) 7 | -------------------------------------------------------------------------------- /driver/test-ll/word.lo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/driver/test-ll/word.lo -------------------------------------------------------------------------------- /editor/language.lisp: -------------------------------------------------------------------------------- 1 | ;;; -- not used -- 2 | (eval-when (:compile-toplevel :load-toplevel :execute) 3 | (setf *readtable* (copy-readtable nil))) 4 | 5 | (in-package "COMMON-LISP-USER") 6 | 7 | ;; while debugging: 8 | #-(and) 9 | (when (find-package "COM.INFORMATIMAGO.EDITOR") 10 | (delete-package "COM.INFORMATIMAGO.EDITOR")) 11 | 12 | ;;;--------------------------------------------------------------------- 13 | ;;; 14 | ;;; We put on *FEATURES* a keyword representing the language to use for 15 | ;;; documentation strings: 16 | ;;; 17 | 18 | (defvar *languages* '((:DK . :DANSK) 19 | (:DE . :DEUTSCH) 20 | (:EN . :ENGLISH) 21 | (:ES . :ESPAÑOL) 22 | (:FR . :FRANÇAIS) 23 | (:NL . :NEDERLANDS) 24 | (:RU . :РУССКИЙ)) 25 | "Maps the language code (in keyword) as used in the LANG environment variable, 26 | to language names (as keyword).") 27 | 28 | ;; Remove the old languages, if any. 29 | (setf *features* (set-difference *features* (mapcar (function cdr) *languages*))) 30 | 31 | ;; Push the new language. By default we use :ENGLISH. 32 | (pushnew (progn 33 | ;; In clisp, we use the custom:*current-language* variable: 34 | #+clisp (intern (string custom:*current-language*) "KEYWORD") 35 | ;; Otherwise if we have ASDF, we try to get the environment variable LANG: 36 | #+(and (not clisp) asdf) 37 | (let* ((lang (getenv "LANG")) 38 | (entry (assoc lang *languages* :test (function string-equal)))) 39 | (if entry 40 | (cdr entry) 41 | :english)) 42 | ;; otherwise we use English: 43 | #-(or clisp asdf) :english) 44 | *features*) 45 | 46 | ;;; In any case, if we don't have the documentation in the selected 47 | ;;; language, we fall back to docstrings in English. 48 | ;;; 49 | ;;;--------------------------------------------------------------------- 50 | 51 | 52 | -------------------------------------------------------------------------------- /future/cardano.lisp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/future/cardano.lisp -------------------------------------------------------------------------------- /future/clean-cl.el: -------------------------------------------------------------------------------- 1 | 2 | (defvar *rewrite-rules* '()) 3 | 4 | (defmacro define-rewrite-rule (name antecedent --> consequent) 5 | `(push ) 6 | ) 7 | 8 | 9 | (define-rewrite-rule setq-setf 10 | (setq (?n exprs (?+ ?ax))) 11 | --> `(setf ,@exprs)) 12 | 13 | (define-rewrite-rule setf-setf 14 | ((?n before (?* ?ax)) 15 | (setf (?n exprs1 (?+ ?ax))) 16 | (setf (?n exprs2 (?+ ?ax))) 17 | (?n after (?* ?ax))) 18 | --> `(setf ,@exprs1 ,@exprs2)) 19 | 20 | 21 | ( 22 | (map-sexps file 23 | (lambda (sexp start end) 24 | 25 | ) 26 | :deeply t 27 | :aton nil)) 28 | -------------------------------------------------------------------------------- /future/com.informatimago.future.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.future.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; This system loads what can be loaded of future Informatimago projects and sketches. 10 | ;;;; !!! This code is clearly not ready for consumption !!! 11 | ;;;; 12 | ;;;;AUTHORS 13 | ;;;; Pascal J. Bourguignon 14 | ;;;;MODIFICATIONS 15 | ;;;; 2014-12-23 Created. 16 | ;;;;BUGS 17 | ;;;;LEGAL 18 | ;;;; AGPL3 19 | ;;;; 20 | ;;;; Copyright Pascal J. Bourguignon 2013 - 2016 21 | ;;;; 22 | ;;;; This program is free software: you can redistribute it and/or modify 23 | ;;;; it under the terms of the GNU Affero General Public License as published by 24 | ;;;; the Free Software Foundation, either version 3 of the License, or 25 | ;;;; (at your option) any later version. 26 | ;;;; 27 | ;;;; This program is distributed in the hope that it will be useful, 28 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | ;;;; GNU Affero General Public License for more details. 31 | ;;;; 32 | ;;;; You should have received a copy of the GNU Affero General Public License 33 | ;;;; along with this program. If not, see . 34 | ;;;;************************************************************************** 35 | 36 | (asdf:defsystem "com.informatimago.future" 37 | :description "Future Informatimago Projects - Not ready for consumption." 38 | :author "Pascal J. Bourguignon" 39 | :version "1.2.0" 40 | :license "AGPL3" 41 | :depends-on () 42 | :components () 43 | #+adsf3 :in-order-to #+adsf3 ((asdf:test-op (asdf:test-op "com.informatimago.future.test")))) 44 | 45 | ;;;; THE END ;;;; 46 | -------------------------------------------------------------------------------- /future/com.informatimago.future.empty.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: empty.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test an empty ASDF system. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2014-12-13 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2014 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.future.empty" 36 | :description "Empty system." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.0" 39 | :license "AGPL3" 40 | :depends-on () 41 | :components () 42 | #+adsf3 :in-order-to #+adsf3 ((asdf:test-op (asdf:test-op "com.informatimago.future.empty.test")))) 43 | 44 | 45 | ;;;; THE END ;;;; 46 | -------------------------------------------------------------------------------- /future/export.lisp: -------------------------------------------------------------------------------- 1 | (in-package "COMMON-LISP-USER") 2 | 3 | (defun process-defuns (function form) 4 | (cond 5 | ((atom form)) 6 | ((member (car form) '(defun defmacro defgeneric defmethod)) 7 | (funcall function form)) 8 | (t 9 | (process-defuns function (car form)) 10 | (process-defuns function (cdr form))))) 11 | 12 | (defun defined-symbols (form) 13 | (let ((result '())) 14 | (flet ((collect (symbol) (push symbol result))) 15 | (process-defuns (lambda (form) 16 | (cond 17 | ((symbolp (second form)) 18 | (collect (second form))) 19 | ((and (consp (second form)) 20 | (eql 'setf (first (second form)))) 21 | (collect (second (second form)))))) 22 | (macroexpand-1 form)) 23 | (remove-duplicates result)))) 24 | 25 | (defun export-symbols (syms) 26 | `(:export ,@(sort (mapcar (function string) syms) (function string<)))) 27 | 28 | 29 | -------------------------------------------------------------------------------- /future/lisp-sexp/packages.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: packages.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; XXX 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2010-11-06 Extracted from source-form.lisp 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2010 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see 33 | ;;;;************************************************************************** 34 | 35 | ;;; Not used yet. 36 | 37 | ;;;; THE END ;;;; 38 | -------------------------------------------------------------------------------- /future/rivest-sexp/URLs: -------------------------------------------------------------------------------- 1 | https://www.ietf.org/archive/id/draft-hedberg-spocp-sexp-00.txt 2 | -------------------------------------------------------------------------------- /future/rivest-sexp/draft-hedberg-spocp-sexp-00.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/future/rivest-sexp/draft-hedberg-spocp-sexp-00.txt -------------------------------------------------------------------------------- /future/vfs/loader.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | 4 | (in-package "COMMON-LISP-USER") 5 | 6 | (cd (make-pathname :name nil :type nil :version nil 7 | :defaults (load-time-value *load-pathname*))) 8 | (pushnew (pwd) asdf:*central-registry*) 9 | 10 | (ql:quickload :com.informatimago.common-lisp.virtual-file-system) 11 | 12 | (in-package "VFS-USER") 13 | -------------------------------------------------------------------------------- /languages/c11/README: -------------------------------------------------------------------------------- 1 | Implement a parser for the language ISO/IEC 9899:2011 (C11). 2 | 3 | 4 | 5 | http://www.quut.com/c/ANSI-C-grammar-l-2011.html 6 | http://www.quut.com/c/ANSI-C-grammar-y.html 7 | 8 | n1570.pdf 9 | -------------------------------------------------------------------------------- /languages/c11/actions.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: actions.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; The actions of the C11 parser. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-07-02 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (in-package "COM.INFORMATIMAGO.LANGUAGES.C11.PARSER") 37 | 38 | 39 | (defun c-declaration (specifiers init-declarators semicolon) 40 | (print (list 'specifiers specifiers)) 41 | (print (list 'init-declarators init-declarators)) 42 | (finish-output) 43 | (list specifiers init-declarators semicolon)) 44 | 45 | (defun c-trace (&rest sentence) 46 | (print sentence) 47 | (finish-output) 48 | sentence) 49 | 50 | ;;;; THE END ;;;; 51 | -------------------------------------------------------------------------------- /languages/c11/tests/caste.c: -------------------------------------------------------------------------------- 1 | 2 | typedef int Lisp_Object; 3 | void typedef **intptr_t; 4 | const int DATA_SEG_BITS=42; 5 | extern long XLI(long); 6 | 7 | static void * ( XPNTR ) ( Lisp_Object a ) { 8 | return ( ( void * ) ( intptr_t ) ( ( XLI ( a ) & ( 1 ? - ( 1 << 3 ) : ( 2147483647 >> ( 3 - 1 ) ) ) ) 9 | | ( DATA_SEG_BITS & ~ ( 1 ? - ( 1 << 3 ) : ( 2147483647 >> ( 3 - 1 ) ) ) ) ) ) ; 10 | } 11 | -------------------------------------------------------------------------------- /languages/c11/tests/dense.cc: -------------------------------------------------------------------------------- 1 | namespace { 2 | __pragma(code_seg(push,"thunks")) 3 | struct functions { 4 | template 5 | __pragma(runtime_checks("",off)) 6 | static R __declspec(code_seg("thunks")) __cdecl fn_1_cdecl(A... arg) { 7 | std::function* f(reinterpret_cast*>(static_cast(0xdeadbeefbaadfood))); 8 | union converter_t { 9 | size_t raw_pointer;decltype(&std::function::oeprator()) cooked_pointer; 10 | }; 11 | converter_t converter={0xcafebabed15ea5e5}; 12 | return(f->*(converter.cooked_pointer))(args...); 13 | } 14 | __pragma(runtime_checks("",restore)) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /languages/c11/tests/fun.c: -------------------------------------------------------------------------------- 1 | int f(int x) 2 | { 3 | return x+1; 4 | } 5 | -------------------------------------------------------------------------------- /languages/cpp/tests/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | empty-macro: 3 | gcc -E -o - empty-macro.c 4 | include-macro: 5 | gcc -I.. -E -o - include-macro.h 6 | priority: 7 | gcc -E -o - priority.h 8 | concat: 9 | gcc -E -o - concat.c 10 | stringify: 11 | gcc -E -o - stringify.c 12 | recursive: 13 | gcc -E -o - recursive.c 14 | variadic: 15 | gcc -E -o - variadic.c 16 | shadow: 17 | gcc -E -o - shadow.c 18 | substitute: 19 | gcc -E -o - substitute.c 20 | built-ins: 21 | gcc -E -o - built-ins.c 22 | test: 23 | gcc -E -o - test.c 24 | trigraphs: 25 | gcc -E -o - -trigraphs trigraphs.c 26 | errors: 27 | gcc -E -o - errors.c 28 | line: 29 | gcc -E -o - line.c 30 | ifdef: 31 | gcc -E -o - ifdef.c | cat -s 32 | if: 33 | gcc -E -o - -Wundef if.c | cat -s 34 | if-embedded: 35 | gcc -E -o - if-embedded.c | cat -s 36 | line: 37 | gcc -E -o - line.c | cat -s 38 | 39 | -------------------------------------------------------------------------------- /languages/cpp/tests/built-ins.c: -------------------------------------------------------------------------------- 1 | 2 | char* built_in_strings[]={ 3 | __TIME__, 4 | __DATE__, 5 | __FILE__, 6 | __BASE_FILE__, 7 | __TIMESTAMP__, 8 | 0 9 | }; 10 | 11 | int built_in_ints[]={ 12 | __STDC__, 13 | __COUNTER__, 14 | __COUNTER__, 15 | __COUNTER__, 16 | __INCLUDE_LEVEL__ 17 | } 18 | -------------------------------------------------------------------------------- /languages/cpp/tests/comment.c: -------------------------------------------------------------------------------- 1 | /\ 2 | * 3 | */ # /* 4 | */ defi\ 5 | ne FO\ 6 | O 10\ 7 | 20 8 | 9 | int x=FOO; 10 | -------------------------------------------------------------------------------- /languages/cpp/tests/concat.c: -------------------------------------------------------------------------------- 1 | #include "concat.h" 2 | double(hello,kitty) DOUBLE(HELLO,KITTY); 3 | sharp_concat_o SHARP_CONCAT_O; 4 | sharp_concat_ind_o SHARP_CONCAT_IND_O; 5 | sharp_concat_f(object,entity) SHARP_CONCAT_F(object,entity); 6 | concat(a b,c d,e f) CONCAT(a b,c d,e f); 7 | sharp_sharp(a,b) SHARP_SHARP(a,b); 8 | // CONCAT(a b,< d >,e f) 9 | -------------------------------------------------------------------------------- /languages/cpp/tests/concat.h: -------------------------------------------------------------------------------- 1 | // #define DOUBLE(X,Y) X ## ## Y 2 | // #define DANGLING(X) X ## 3 | // #define STRINGY_DANGLING(X) # ## X 4 | // #define STRINGY_TOKEN(X) # ahah ## X // concat.h:4:24: error: '#' is not followed by a macro parameter 5 | #define S(X) #X 6 | #define C(A,B) A ## B 7 | #define DOUBLE(A,B) S(C(A,B)) 8 | #define SHARP_CONCAT_O # object ## entity 9 | #define SHARP_CONCAT_IND_O S( object ## entity ) 10 | #define SHARP_CONCAT_F(object,entity) S(object ## entity) 11 | #define CONCAT(A,B,C) A ## B ## C 12 | #define SHARP_SHARP(A,B) A ## ## B // valid because A ## empty = A 13 | 14 | -------------------------------------------------------------------------------- /languages/cpp/tests/data.h: -------------------------------------------------------------------------------- 1 | 11,22,33 2 | -------------------------------------------------------------------------------- /languages/cpp/tests/define.h: -------------------------------------------------------------------------------- 1 | #define EMPTY 2 | #define VOO 42 3 | #define OOO (X) 4 | #define FOO(X) ((X)+42) 5 | #define SOO(X) #X 6 | #define COO(X,Y) X##Y 7 | #define TO_BE_UNDEFINED_1 8 | #define TO_BE_UNDEFINED_2 X 9 | #define TO_BE_UNDEFINED_3(X) ((X)+(X)) 10 | #undef TO_BE_UNDEFINED_1 11 | #undef TO_BE_UNDEFINED_2 12 | #undef TO_BE_UNDEFINED_3 13 | -------------------------------------------------------------------------------- /languages/cpp/tests/emacs.c: -------------------------------------------------------------------------------- 1 | #define __asm(X) 2 | #define __attribute__(X) 3 | #define __inline__ inline 4 | 5 | typedef void* builtin_va_list; 6 | extern builtin_va_start(v,l); 7 | extern builtin_va_end(v); 8 | extern builtin_va_arg(v,l); 9 | extern builtin_va_copy(d,s); 10 | 11 | #define __builtin_va_list void* 12 | #define __builtin_va_start(v,l) builtin_va_start(v,l) 13 | #define __builtin_va_end(v) builtin_va_end(v) 14 | #define __builtin_va_arg(v,l) builtin_va_arg(v,l) 15 | #define __builtin_va_copy(d,s) builtin_va_copy(d,s) 16 | 17 | #define __builtin_offsetof(TYPE, MEMBER) ((size_t)(&((TYPE*)0)->MEMBER)) 18 | 19 | #include 20 | #include 21 | -------------------------------------------------------------------------------- /languages/cpp/tests/empty-macro.c: -------------------------------------------------------------------------------- 1 | #define EMPTY 2 | 3 | #ifdef EMPTY 4 | int empty_ifdef; 5 | #endif 6 | 7 | EMPTY 8 | -------------------------------------------------------------------------------- /languages/cpp/tests/errors.c: -------------------------------------------------------------------------------- 1 | #define PROC this-proc 2 | #warning "I warn you, in " PROC ", it won't be pretty." 3 | #error "I told you, there's a snafu in " PROC 4 | #pragma GCC warning "I warn you, it won't be pretty." 5 | #pragma GCC error "I told you, there's a snafu" 6 | #define W() _Pragma("GCC warning \"I warn you, it won't be pretty.\"") 7 | #define E() _Pragma("GCC error \"I told you, there's a snafu\"") 8 | W() 9 | E() 10 | #pragma GCC poison toto 11 | 12 | #else 13 | toto 14 | #endif 15 | -------------------------------------------------------------------------------- /languages/cpp/tests/if-embedded.c: -------------------------------------------------------------------------------- 1 | #define YES 1 2 | #define NO 0 3 | #define DEFINED 4 | #undef UNDEFINED 5 | 6 | #if YES 7 | good: yes; 8 | #if YES 9 | good: yes.yes; 10 | #elif defined(UNDEFINED) 11 | bad: yes.defined(UNDEFINED); 12 | #else 13 | bad: yes.no; 14 | #endif 15 | #else 16 | bad:no; 17 | #endif 18 | 19 | #ifdef YES 20 | good: yes; 21 | #ifdef YES 22 | good: yes.yes; 23 | #elif defined(UNDEFINED) 24 | bad: yes.defined(UNDEFINED); 25 | #else 26 | bad: yes.no; 27 | #endif 28 | #else 29 | bad:no; 30 | #endif 31 | 32 | #ifndef UNDEFINED 33 | good: yes; 34 | #ifndef UNDEFINED 35 | good: yes.yes; 36 | #elif defined(UNDEFINED) 37 | bad: yes.defined(UNDEFINED); 38 | #else 39 | bad: yes.no; 40 | #endif 41 | #else 42 | bad:no; 43 | #endif 44 | -------------------------------------------------------------------------------- /languages/cpp/tests/if.c: -------------------------------------------------------------------------------- 1 | #define DEFINED 2 | 3 | #if defined(UNDEFINED) 4 | defined.bad.1; 5 | #endif 6 | #if defined (UNDEFINED) 7 | defined.bad.2; 8 | #endif 9 | #if defined UNDEFINED 10 | defined.bad.3; 11 | #endif 12 | 13 | 14 | #if defined(DEFINED) // doesn't macroexpand DEFINED. 15 | defined.good.1; 16 | #endif 17 | #if defined (DEFINED) 18 | defined.good.2; 19 | #endif 20 | #if defined DEFINED 21 | defined.good.3; 22 | #endif 23 | 24 | #define GOOD_SYM GOOD_SYM 25 | #define DEF(X) defined(X) 26 | #if DEF(GOOD_SYM) // substitues GOOD_SYM as argument when macroexpanding DEF(GOOD_SYM) 27 | def.good; 28 | #endif 29 | #if DEF(UNDEFINED) 30 | def.bad; 31 | #endif 32 | 33 | 34 | #define STRANGE "Hello" 35 | 36 | #if STRANGE 37 | strange.bad.then; 38 | #else 39 | strange.good.else; 40 | #endif 41 | 42 | #if foo 43 | foo.bad.then; 44 | #else 45 | foo.good.else; 46 | #endif 47 | 48 | #define GOOD 1 49 | #if GOOD will 50 | good.good.then; 51 | #endif 52 | 53 | #define height 24 54 | #define width 80 55 | #if !((height-1)*(width/2) < 3<<4) || (1/0) 56 | expr.good.then; 57 | #else 58 | expr.bad.else; 59 | #endif 60 | 61 | #define a 1 62 | #define b 2 63 | #define c 3 64 | #define d 4 65 | #if (-a + +b + ~c + !d) - a - b + c + d * d / c % b << 3 - c >> 1 < a <= b > c >= d == a != b & c ^ d | a && 1 || 0 66 | guess.then; 67 | #else 68 | guess.else; 69 | #endif 70 | 71 | int x=defined(GOOD_SYM); 72 | int y=defined(GOOD); 73 | -------------------------------------------------------------------------------- /languages/cpp/tests/ifdef.c: -------------------------------------------------------------------------------- 1 | #define YES 2 | #define TRUE 1 3 | 4 | #ifdef YES 5 | ifdef.yes.good1; 6 | #endif 7 | 8 | #ifdef YES 9 | ifdef.yes.good2; 10 | #else 11 | ifdef.yes.bad2; 12 | #endif 13 | 14 | #ifdef YES 15 | ifdef.yes.good3; 16 | #else 17 | ifdef.yes.bad3; 18 | #else 19 | ifdef.yes.bad3b; 20 | #endif 21 | 22 | #ifdef YES 23 | ifdef.yes.good4; 24 | #elif TRUE 25 | ifdef.yes.bad4b; 26 | #else 27 | ifdef.yes.bad4c; 28 | #endif 29 | 30 | 31 | #ifdef NO 32 | ifdef.no.bad5; 33 | #endif 34 | no good5; 35 | 36 | #ifdef NO 37 | ifdef.no.bad6; 38 | #else 39 | ifdef.no.good6; 40 | #endif 41 | 42 | #ifdef NO 43 | ifdef.no.bad7; 44 | #else 45 | ifdef.no.good7; 46 | #else 47 | ifdef.no.bad7b; 48 | #endif 49 | 50 | #ifdef NO 51 | ifdef.no.bad8; 52 | #elif TRUE 53 | ifdef.no.good8b; 54 | #else 55 | ifdef.no.good8; 56 | #endif 57 | 58 | 59 | 60 | #ifndef NO 61 | ifndef.no.good1; 62 | #endif 63 | 64 | #ifndef NO 65 | ifndef.no.good2; 66 | #else 67 | ifndef.no.bad2; 68 | #endif 69 | 70 | #ifndef NO 71 | ifndef.no.good3; 72 | #else 73 | ifndef.no.bad3; 74 | #else 75 | ifndef.no.bad3b; 76 | #endif 77 | 78 | #ifndef NO 79 | ifndef.no.good4; 80 | #elif TRUE 81 | ifndef.no.bad4b; 82 | #else 83 | ifndef.no.bad4c; 84 | #endif 85 | 86 | 87 | #ifndef YES 88 | ifndef.yes.bad5; 89 | #endif 90 | no good5; 91 | 92 | #ifndef YES 93 | ifndef.yes.bad6; 94 | #else 95 | ifndef.yes.good6; 96 | #endif 97 | 98 | #ifndef YES 99 | ifndef.yes.bad7; 100 | #else 101 | ifndef.yes.good7; 102 | #else 103 | ifndef.yes.bad7b; 104 | #endif 105 | 106 | #ifndef YES 107 | ifndef.yes.bad8; 108 | #elif TRUE 109 | ifndef.yes.good8b; 110 | #else 111 | ifndef.yes.good8c; 112 | #endif 113 | 114 | 115 | -------------------------------------------------------------------------------- /languages/cpp/tests/include-macro.h: -------------------------------------------------------------------------------- 1 | #define S(X) SS(X) 2 | #define SS(X) # X 3 | #define C(X,Y,Z) X##Y##Z 4 | #define F(X,Y) S(X##Y) 5 | #include F(tests/def,ine.h) 6 | #include F(tests/def,\ 7 | ine.h) 8 | -------------------------------------------------------------------------------- /languages/cpp/tests/interface.c: -------------------------------------------------------------------------------- 1 | #define sym(package,name) package##_##name 2 | 3 | #define interface(package) \ 4 | typedef void* sym(package,t);\ 5 | extern sym(package,t) make_##package();\ 6 | extern int sym(package,count)(sym(package,t) self);\ 7 | extern void sym(package,put)(sym(package,t) self,char* key,void* object);\ 8 | extern void* sym(package,get)(sym(package,t) self,char* key); 9 | 10 | interface(dict) 11 | interface(list) 12 | interface(vector) 13 | 14 | -------------------------------------------------------------------------------- /languages/cpp/tests/line.c: -------------------------------------------------------------------------------- 1 | #define FLAG 1 2 | #if FLAG 3 | #line 42 "foo.c" 4 | #endif 5 | int yo; 6 | #line 100 "bar.c" 7 | line=100; 8 | line=101; 9 | #line 200 10 | line=200; 11 | line=201; 12 | #line 12 __BASE_FILE__ 13 | line=12; 14 | line=13; 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /languages/cpp/tests/priority.h: -------------------------------------------------------------------------------- 1 | #define C(X,Y) X ## Y 2 | #define S(X) SS(X) 3 | #define SS(X) # X 4 | #define M(X,Y) S(C(X,Y)) 5 | 6 | char* a=M(HELLO,KITTY); 7 | 8 | # 9 | 10 | #define VOO 42 11 | #define F(X) #X[X] 12 | 13 | F(33) 14 | F(VOO) 15 | F(C(VOO,VOO)) 16 | 17 | 18 | # 1 "hello" 19 | 20 | 21 | 22 | #define f(a,b,c) {a,b,c} 23 | f( 24 | #define aa 1 25 | #define bb 2 26 | #define cc 3 27 | aa, 28 | #if 0 29 | ) 30 | #endif 31 | bb, 32 | #undef cc 33 | cc) 34 | -------------------------------------------------------------------------------- /languages/cpp/tests/recursive.c: -------------------------------------------------------------------------------- 1 | #define VOO BAR + 1 2 | #define BAR VOO - 1 3 | 4 | #define f(x,y,z) x,f(y,z,x) 5 | #define G(x,y,z) g(y,z,x) 6 | #define g(x,y,z) x,G(x,y,z) 7 | 8 | int x=VOO; 9 | int[] y={f(1,2,3)}; 10 | int[] z={g(1,2,3)}; 11 | 12 | 13 | #define SUCC(X) (1+(X)) 14 | int f2=SUCC(SUCC(0)); 15 | 16 | #define TWO SUCC(SUCC(0)) 17 | int f3=SUCC(TWO); 18 | 19 | #undef FOO 20 | #undef BAR 21 | 22 | #define FOO BAR 23 | int i[]={ FOO, 24 | #undef BAR 25 | #define BAR 1 26 | FOO, 27 | #undef BAR 28 | #define BAR 2 29 | FOO }; 30 | 31 | 32 | #undef LEFT 33 | #undef RIGHT 34 | #undef FOO 35 | #undef F 36 | #define LEFT F("l", 37 | #define RIGHT ,"r") 38 | #define FOO LEFT "foo" RIGHT 39 | 0: FOO; /* ok */ 40 | #define F(a,b,c) a##b##c 41 | // 2: FOO; /* good: error: unterminated argument list invoking macro "F" */ 42 | 43 | #undef LEFT 44 | #undef RIGHT 45 | #undef FOO 46 | #undef F 47 | #define FOO(E) F(l,E,r) 48 | 1: FOO(foo); /* ok */ 49 | #define F(a,b,c) a##b##c 50 | 2: FOO(bar); /* ok */ 51 | #undef F 52 | 3: FOO( 53 | #define F(a,b,c) a##a 54 | baz 55 | #undef F 56 | #define F(a,b,c) c##c 57 | ); 58 | 4: FOO( 59 | #undef F 60 | #define F(a,b,c) a##a 61 | FOO(baz) 62 | #undef F 63 | #define F(a,b,c) c##c 64 | ); 65 | 66 | #undef F 67 | #define F(a,b,c) int z[]={a,b,c} 68 | 5:F( 69 | # include "data.h" 70 | ); 71 | -------------------------------------------------------------------------------- /languages/cpp/tests/shadow.c: -------------------------------------------------------------------------------- 1 | 2 | #define FOO 42 3 | #define BAR FOO 4 | #define BABAR G(FOO) 5 | #define G(BAZ) (BAZ,FOO,BAR) 6 | #define F(FOO) ((FOO)+G(FOO)+BAR,BABAR) 7 | 8 | F(33),FOO; 9 | // --> ((33)+(42)),42; 10 | -------------------------------------------------------------------------------- /languages/cpp/tests/stringify.c: -------------------------------------------------------------------------------- 1 | #include "stringify.h" 2 | 3 | STRINGIFY_PARAM(x) 4 | STRINGIFY_VARGS(x,y,z) 5 | -------------------------------------------------------------------------------- /languages/cpp/tests/stringify.h: -------------------------------------------------------------------------------- 1 | #define FOO foo 2 | #define STRINGIFY_PARAM(P) #P 3 | #define STRINGIFY_VARGS(A,P...) #P 4 | -------------------------------------------------------------------------------- /languages/cpp/tests/substitute.c: -------------------------------------------------------------------------------- 1 | #define F(X) [X] 2 | #define G(X) (X) 3 | #define H(M,X) M(X) 4 | 5 | H(F,42) 6 | // --> [42] 7 | H(G,33) 8 | // --> (33) 9 | -------------------------------------------------------------------------------- /languages/cpp/tests/test.c: -------------------------------------------------------------------------------- 1 | #include "test.h" 2 | 3 | int f(int x) 4 | BEGIN 5 | IF x==0 THEN 6 | return 1; 7 | ELSE 8 | return 2; 9 | END 10 | END 11 | -------------------------------------------------------------------------------- /languages/cpp/tests/test.h: -------------------------------------------------------------------------------- 1 | #define BEGIN { 2 | #define END } 3 | #define IF if( 4 | #define THEN ){ 5 | #define ELSE }else{ 6 | -------------------------------------------------------------------------------- /languages/cpp/tests/trigraphs.c: -------------------------------------------------------------------------------- 1 | int f(int* x)??< 2 | int s=0; 3 | for(int i=0;x??(i??);i++)??< 4 | s+=x??(i??)??'??-42; 5 | printf("??(??=sure???)??/n"); 6 | ??> 7 | ??> 8 | -------------------------------------------------------------------------------- /languages/cpp/tests/variadic.c: -------------------------------------------------------------------------------- 1 | #include "variadic.h" 2 | int poo(){ 3 | POO0("hello\n",); 4 | POO0("%d\n",1+1); 5 | POO1("hello\n"); 6 | POO1("%d %d\n",1+1,2*2); 7 | POO2("hello\n"); 8 | POO2("%d %d\n",1+1,2*(1+1,42)); 9 | POO3("hello\n",); 10 | // POO3("%d\n",1+1); 11 | } 12 | -------------------------------------------------------------------------------- /languages/cpp/tests/variadic.h: -------------------------------------------------------------------------------- 1 | #define POO0(format,arg) printf(format,arg) 2 | #define POO1(format, ...) printf(format, ## __VA_ARGS__) 3 | #define POO2(format, args...) printf(format, ## args) 4 | #define POO3(format, args) printf(format, ## args) // only works for variadic parameter. 5 | -------------------------------------------------------------------------------- /languages/languages-in-cl.txt: -------------------------------------------------------------------------------- 1 | There are a lot of languages that are implemented in Common Lisp. 2 | 3 | Now, unfortunately, it's often only the early implementation of a language that is written in Lisp. 4 | 5 | cl-python 6 | http://common-lisp.net/project/clpython/ 7 | 8 | There's a r4rs scheme implementation named Pseudo. 9 | http://www.cliki.net/PseudoScheme 10 | 11 | An early implementation of Yale Haskell. 12 | http://www.cliki.net/Yale%20Haskell 13 | 14 | "In ~2003, Mozilla's CVS tree still contains the original implementation of Javascript... written in Common Lisp." 15 | Well, the mozilla/js2/semantics/README that I just checked-out from mozilla CVS says: 16 | 17 | js/semantics contains experimental code used to generate LR(1) and LALR(1) 18 | grammars for JavaScript as well as compile and check formal semantics for 19 | JavaScript. The semantics can be executed directly or printed into either 20 | HTML or Microsoft Word RTF formats. 21 | 22 | You may also be interested in Zeta-C although it's not written in Common Lisp http://www.cliki.net/Zeta-C. 23 | 24 | maxima (which implements a mathematical language similar to macsyma, ie. similar to mathematica, octave or mathlab). 25 | http://maxima.sourceforge.net/ 26 | 27 | acl2 (which is a theorem prover) implements a lisp-like language in CL. 28 | http://www.cs.utexas.edu/~moore/acl2/ 29 | 30 | Qi is implemented in Common Lisp. 31 | http://en.wikipedia.org/wiki/Qi_%28programming_language%29 32 | 33 | Here is a toy implementation of BASIC in CL: 34 | http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/basic/ 35 | 36 | And the implementation L.S.E (Langage Symbolique d'Enseignement, a French programming language of the 70's): 37 | http://nasium-lse.ogamita.com/ 38 | http://fossil.nasium-lse.ogamita.com/nasium-lse/dir?ci=tip 39 | 40 | And a few more, see http://www.cliki.net/programming%20language 41 | 42 | -------------------------------------------------------------------------------- /languages/latex/lisp.indentations: -------------------------------------------------------------------------------- 1 | (1 scan-rules when-state) 2 | -------------------------------------------------------------------------------- /languages/linc/Makefile: -------------------------------------------------------------------------------- 1 | 2 | TEST_SEXPC = \ 3 | test-expressions.sexpc \ 4 | test-include.sexpc \ 5 | test-statements.sexpc \ 6 | test-types.sexpc \ 7 | test-macros.sexpc 8 | 9 | TEST_C = \ 10 | test-c-array.c \ 11 | test-c-empty-struct-union.c \ 12 | test-c-struct-bit.c 13 | 14 | TEST_C_GEN = \ 15 | $(TEST_SEXPC:.sexpc=.c) 16 | 17 | TEST_O = \ 18 | $(TEST_C:.c=.o) \ 19 | $(TEST_C_GEN:.c=.o) 20 | 21 | TEST_PROGRAMS = \ 22 | $(TEST_O:.o=) 23 | 24 | 25 | all:$(TEST_PROGRAMS) 26 | 27 | help: 28 | @printf "make clean\n" 29 | 30 | clean: 31 | -rm -rf *.o *.dSYM $(TEST_PROGRAMS) $(TEST_O) $(TEST_C_GEN) 32 | -rm -rf test-include-dummy.c 33 | 34 | $(TEST_C_GEN):$(TEST_SEXPC) 35 | ccl --load generate.lisp --eval '(quit)' 36 | 37 | .c.o: ; $(CC) -Werror -Wall -c -o $@ $^ 38 | 39 | test-c-array:test-c-array.o 40 | test-c-empty-struct-union:test-c-empty-struct-union.o 41 | test-c-struct-bit:test-c-struct-bit.o 42 | test-expressions:test-expressions.o 43 | test-include:test-include.o 44 | test-statements:test-statements.o 45 | test-types:test-types.o 46 | 47 | test-include.o:test-include.c 48 | cmp test-include.c test-include.expected 49 | echo 'int main(){return 0;}' > test-include-dummy.c 50 | $(CC) -Werror -Wall -c -o test-include.o test-include-dummy.c 51 | -------------------------------------------------------------------------------- /languages/linc/c-operators.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: c-operators.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; XXX 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2012-07-02 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2012 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC") 37 | 38 | (make-declare variable "A variable.") 39 | (make-declare class "A class.") 40 | (make-declare struct "A struct.") 41 | (make-declare union "A union.") 42 | (make-declare type "A type.") 43 | (make-declare enum "An enum.") 44 | (make-declare function "A function.") 45 | (make-declare macro "A preprocessor macro.") 46 | 47 | (gen-operators) 48 | 49 | ;;;; THE END ;;;; 50 | -------------------------------------------------------------------------------- /languages/linc/c-runtime.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC") 4 | (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC.C-RUNTIME") 5 | 6 | (defun initialize () 7 | (values)) 8 | -------------------------------------------------------------------------------- /languages/linc/c-sexp-compiler.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC") 4 | 5 | 6 | (defun compile-linc-file () 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /languages/linc/c-sexp-test.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC") 4 | 5 | (assert (string= (with-output-to-string (*c-out*) 6 | (generate (parse-pointer-type '(|pointer| |restrict| (|pointer| |const| |int|))))) 7 | "int * const * restrict")) 8 | -------------------------------------------------------------------------------- /languages/linc/example.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | Here is a little function 4 | */ 5 | string_t string_add(string_t a,string_t b){ 6 | { 7 | int av; 8 | int bv; 9 | string_t res=malloc(2+max(strlen(a),strlen(b))); 10 | 11 | sscanf(a,"%d",&av); 12 | sscanf(b,"%d",&bv); 13 | sprintf(res,"%d",a+b); 14 | return(res); 15 | } 16 | } 17 | /* 18 | Here is another function. 19 | Slightly bigger this time. 20 | (* 42 12) 21 | */ 22 | void test(){ 23 | if(nAllocation>1){ 24 | nData=BcMem_Allocate(sizeof(char)*nAllocation); 25 | if(copy){ 26 | nLength=MINIMUM(nAllocation-1,this->dlength); 27 | BcMem_Copy(this->data,nData,nLength*sizeof(char)); 28 | }else 29 | nLength=0; 30 | }else{ 31 | nAllocation=1; 32 | nData=BcMem_Allocate(sizeof(char)*nAllocation); 33 | nLength=0; 34 | } 35 | nData[nLength]=(char)0; 36 | BcMem_Deallocate((void**)&this->data); 37 | this->data=nData; 38 | this->dlength=nLength; 39 | this->allocation=nAllocation; 40 | { 41 | double test=(1+2+3+4)*5/4/3/2*(5-4-3-2)*+a*-b**c*~d*!e*+(1+a)*-(2+b)**(c+3)*~(4+d)*!(e<0); 42 | 43 | printf("%d\n",test); 44 | } 45 | return(this); 46 | } 47 | -------------------------------------------------------------------------------- /languages/linc/example.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/languages/linc/example.h -------------------------------------------------------------------------------- /languages/linc/generate.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | (in-package "COMMON-LISP-USER") 4 | (defvar *compile-linc-c-files* nil) 5 | (defparameter *this-directory* (make-pathname :name nil :type nil :version nil 6 | :defaults (or *load-truename* 7 | (error "This file must be loaded as source.")))) 8 | (cd cl-user::*this-directory*) 9 | (pushnew *this-directory* asdf:*central-registry* :test (function equalp)) 10 | (ql:quickload :com.informatimago.languages.linc) 11 | (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC") 12 | 13 | (defparameter *test-files* '("test-include.sexpc" 14 | "test-macros.sexpc" 15 | "test-types.sexpc" 16 | "test-expressions.sexpc" 17 | "test-statements.sexpc")) 18 | 19 | (defun call-dofiles (files thunk) 20 | (dolist (path files) 21 | (funcall thunk path 22 | ;; (make-pathname :name (pathname-name path) :type 23 | ;; (pathname-type path) :version 24 | ;; nil :defaults 25 | ;; cl-user::*this-directory*) 26 | ))) 27 | 28 | (defmacro dofiles ((var test-files) &body body) 29 | `(call-dofiles ,test-files (lambda (,var) ,@body))) 30 | 31 | (if cl-user::*compile-linc-c-files* 32 | (dofiles (test-sexpc *test-files*) 33 | (cl-user::cc (translate-linc-file test-sexpc :print t :verbose t) 34 | :output (make-pathname :type "o" :defaults test-sexpc :case :local) 35 | :to :object 36 | :options '("-Werror" "-Wall"))) 37 | (dofiles (test-sexpc *test-files*) 38 | (translate-linc-file test-sexpc :print t :verbose t))) 39 | -------------------------------------------------------------------------------- /languages/linc/lisp.indentations: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp -*- 2 | 3 | 4 | (0 with-indent) 5 | (1 in-parens 6 | in-continuation-lines 7 | define-module 8 | define-type 9 | with-parens 10 | pcond) 11 | 12 | (3 define-function) 13 | (4 define-statement) 14 | 15 | 16 | -------------------------------------------------------------------------------- /languages/linc/run.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | (in-package "COMMON-LISP-USER") 4 | (defparameter *compile-linc-c-files* t) 5 | 6 | (load (make-pathname :name "generate" :type "lisp" :version nil 7 | :defaults (or *load-truename* 8 | (error "This file must be loaded as source.")))) 9 | 10 | ;; (cc (translate-linc-file "test-expressions.sexpc" :print t :verbose t) 11 | ;; :output "test-expressions.o" :to :object :options '("-Werror" "-Wall")) 12 | -------------------------------------------------------------------------------- /languages/linc/test-c-array.c: -------------------------------------------------------------------------------- 1 | #include 2 | typedef int aint_t[3]; 3 | aint_t a={1,2,3}; 4 | int main(){ 5 | for(int i=0;i<3;i++){ 6 | printf("%d ",a[i]);} 7 | printf("\n"); 8 | return 0;} 9 | 10 | -------------------------------------------------------------------------------- /languages/linc/test-c-empty-struct-union.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef struct { 4 | } empty_struct; 5 | 6 | typedef union { 7 | } empty_union; 8 | 9 | 10 | int main(){ 11 | empty_union u; 12 | empty_struct s; 13 | printf("u=%p s=%p\n",&u,&s); 14 | return 0;} 15 | -------------------------------------------------------------------------------- /languages/linc/test-c-struct-bit.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef struct { 4 | int a:1,b:2,c:3; 5 | } s1; 6 | 7 | typedef struct { 8 | int a:1; 9 | int b:2; 10 | int c:3; 11 | } s2; 12 | 13 | int main(){ 14 | printf("sizeof(s1)=%lu\n",sizeof(s1)); 15 | printf("sizeof(s2)=%lu\n",sizeof(s2)); 16 | return 0;} 17 | -------------------------------------------------------------------------------- /languages/linc/test-ii.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC") 4 | 5 | (defclass a () 6 | ()) 7 | 8 | (defclass b () 9 | ((b :initarg :b :accessor b))) 10 | 11 | ;; (defmethod shared-initialize :before 12 | ;; ((self b) slot-names &rest initargs &key &allow-other-keys) 13 | ;; 14 | ;; (print `(= (slot-boundp ,self 'b) , (slot-boundp self 'b))) 15 | ;; (print `(shared-initialize :before ((,self b) ,slot-names &rest ,initargs &key &allow-other-keys))) 16 | ;; (print `(= (next-method-p) ,(next-method-p))) 17 | ;; (when (next-method-p) 18 | ;; (apply (function call-next-method) self slot-names 19 | ;; :b 2 (remf initargs :b)))) 20 | 21 | (defmethod initialize-instance :before ()) 22 | 23 | (inspect (make-instance 'b :b 1)) 24 | (inspect *) 25 | -------------------------------------------------------------------------------- /languages/linc/test-include.expected: -------------------------------------------------------------------------------- 1 | /* ------------------------- DO NOT EDIT! --------------------------------- */ 2 | /* WARNING: This file is generated automatically by LINC from the source */ 3 | /* file test-include.sexpc */ 4 | /* ------------------------- DO NOT EDIT! --------------------------------- */ 5 | 6 | #include "foo.h" 7 | #include 8 | #include "foo.h" 9 | #include "bar.h" 10 | #include 11 | -------------------------------------------------------------------------------- /languages/linc/test-include.sexpc: -------------------------------------------------------------------------------- 1 | 2 | (include "foo.h") 3 | (include ) 4 | (include "foo.h" "bar.h" ) 5 | 6 | (include) 7 | (include "foo\".h") 8 | (include bar.h>) 9 | (include "good1.h" "foo\".h" "good2.h") 10 | (include bar.h> ) 11 | 12 | -------------------------------------------------------------------------------- /languages/linc/test-macros.sexpc: -------------------------------------------------------------------------------- 1 | ;; -*- mode:list; package:com.informatimago.languages.linc.c -*- 2 | 3 | (include ) 4 | 5 | (define-macro BUFFER_SIZE "(1024)") 6 | (define-macro TRUNCATE (dividend divisor) "cons(integer((dividend)/(divisor)), integer((dividend)%(divisor)))") 7 | 8 | (declare-type object-t (struct (tag int) 9 | (data int))) 10 | (declare-type object (pointer object-t)) 11 | (declare-function integer ((value int)) object) 12 | (declare-function cons ((car object) (cdr object)) object) 13 | (declare-function car ((cons object)) object) 14 | (declare-function cdr ((cons object)) object) 15 | 16 | (define-function main () int 17 | (let* ((result object (TRUNCATE 10 3)) 18 | (buffer (array char BUFFER_SIZE) ())) 19 | (printf "%p; %p; %p\n" (car result) (cdr result) buffer) 20 | (return 0))) 21 | 22 | -------------------------------------------------------------------------------- /languages/linc/test-statements.sexpc: -------------------------------------------------------------------------------- 1 | ;; -*- mode:lisp; package:com.informatimago.languages.linc.c -*- 2 | 3 | (include ) 4 | 5 | (define-function main ((argc int) (argv (pointer (pointer char)))) int 6 | 7 | (let ((i int 0)) 8 | 9 | (while (< i 10) 10 | (goto start1) 11 | (+= i 2) 12 | (label start1) 13 | (++ i) 14 | (printf "i = %d\n" i) 15 | (if (< 5 i) 16 | (break) 17 | (continue)) 18 | (printf "Never printed!\n")) 19 | 20 | (= i 0) 21 | (do 22 | (goto start2) 23 | (+= i 2) 24 | (label start2) 25 | (++ i) 26 | (printf "i = %d\n" i) 27 | (if (< 5 i) 28 | (break) 29 | (continue)) 30 | (printf "Never printed!\n") 31 | while (< i 10)) 32 | 33 | (= i 0) 34 | (for ((= i 0) (< i 10) (++ i)) 35 | (switch i 36 | (case 0 37 | (printf "Zero\n") 38 | (break)) 39 | (case (+ 1 1) 40 | (printf "Two\n") 41 | (break)) 42 | (default 43 | (printf "Current %d\n" i) 44 | (break))) 45 | (if (== 0 (% i 3)) 46 | (+= i 2) 47 | (+= i 3))) 48 | 49 | (return 0))) 50 | -------------------------------------------------------------------------------- /languages/linc/utilities.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | (in-package "COM.INFORMATIMAGO.LANGUAGES.LINC") 4 | 5 | (defun find-in-tree (item tree) 6 | (cond 7 | ((null tree) nil) 8 | ((atom tree) (eql item tree)) 9 | (t (or (find-in-tree item (car tree)) 10 | (find-in-tree item (cdr tree)))))) 11 | -------------------------------------------------------------------------------- /languages/lua/lua-5_1-grammar.txt: -------------------------------------------------------------------------------- 1 | chunk ::= {stat [`;´]} [laststat [`;´]] 2 | 3 | block ::= chunk 4 | 5 | stat ::= varlist `=´ explist | 6 | functioncall | 7 | do block end | 8 | while exp do block end | 9 | repeat block until exp | 10 | if exp then block {elseif exp then block} [else block] end | 11 | for Name `=´ exp `,´ exp [`,´ exp] do block end | 12 | for namelist in explist do block end | 13 | function funcname funcbody | 14 | local function Name funcbody | 15 | local namelist [`=´ explist] 16 | 17 | laststat ::= return [explist] | break 18 | 19 | funcname ::= Name {`.´ Name} [`:´ Name] 20 | 21 | varlist ::= var {`,´ var} 22 | 23 | var ::= Name | prefixexp `[´ exp `]´ | prefixexp `.´ Name 24 | 25 | namelist ::= Name {`,´ Name} 26 | 27 | explist ::= {exp `,´} exp 28 | 29 | exp ::= nil | false | true | Number | String | `...´ | function | 30 | prefixexp | tableconstructor | exp binop exp | unop exp 31 | 32 | prefixexp ::= var | functioncall | `(´ exp `)´ 33 | 34 | functioncall ::= prefixexp args | prefixexp `:´ Name args 35 | 36 | args ::= `(´ [explist] `)´ | tableconstructor | String 37 | 38 | function ::= function funcbody 39 | 40 | funcbody ::= `(´ [parlist] `)´ block end 41 | 42 | parlist ::= namelist [`,´ `...´] | `...´ 43 | 44 | tableconstructor ::= `{´ [fieldlist] `}´ 45 | 46 | fieldlist ::= field {fieldsep field} [fieldsep] 47 | 48 | field ::= `[´ exp `]´ `=´ exp | Name `=´ exp | exp 49 | 50 | fieldsep ::= `,´ | `;´ 51 | 52 | binop ::= `+´ | `-´ | `*´ | `/´ | `^´ | `%´ | `..´ | 53 | `<´ | `<=´ | `>´ | `>=´ | `==´ | `~=´ | 54 | and | or 55 | 56 | unop ::= `-´ | not | `#´ 57 | -------------------------------------------------------------------------------- /languages/lua/lua-5_2-grammar.txt: -------------------------------------------------------------------------------- 1 | 2 | chunk ::= block 3 | 4 | block ::= {stat} [retstat] 5 | 6 | stat ::= ‘;’ | 7 | varlist ‘=’ explist | 8 | functioncall | 9 | label | 10 | break | 11 | goto Name | 12 | do block end | 13 | while exp do block end | 14 | repeat block until exp | 15 | if exp then block {elseif exp then block} [else block] end | 16 | for Name ‘=’ exp ‘,’ exp [‘,’ exp] do block end | 17 | for namelist in explist do block end | 18 | function funcname funcbody | 19 | local function Name funcbody | 20 | local namelist [‘=’ explist] 21 | 22 | retstat ::= return [explist] [‘;’] 23 | 24 | label ::= ‘::’ Name ‘::’ 25 | 26 | funcname ::= Name {‘.’ Name} [‘:’ Name] 27 | 28 | varlist ::= var {‘,’ var} 29 | 30 | var ::= Name | prefixexp ‘[’ exp ‘]’ | prefixexp ‘.’ Name 31 | 32 | namelist ::= Name {‘,’ Name} 33 | 34 | explist ::= exp {‘,’ exp} 35 | 36 | exp ::= nil | false | true | Number | String | ‘...’ | functiondef | 37 | prefixexp | tableconstructor | exp binop exp | unop exp 38 | 39 | prefixexp ::= var | functioncall | ‘(’ exp ‘)’ 40 | 41 | functioncall ::= prefixexp args | prefixexp ‘:’ Name args 42 | 43 | args ::= ‘(’ [explist] ‘)’ | tableconstructor | String 44 | 45 | functiondef ::= function funcbody 46 | 47 | funcbody ::= ‘(’ [parlist] ‘)’ block end 48 | 49 | parlist ::= namelist [‘,’ ‘...’] | ‘...’ 50 | 51 | tableconstructor ::= ‘{’ [fieldlist] ‘}’ 52 | 53 | fieldlist ::= field {fieldsep field} [fieldsep] 54 | 55 | field ::= ‘[’ exp ‘]’ ‘=’ exp | Name ‘=’ exp | exp 56 | 57 | fieldsep ::= ‘,’ | ‘;’ 58 | 59 | binop ::= ‘+’ | ‘-’ | ‘*’ | ‘/’ | ‘^’ | ‘%’ | ‘..’ | 60 | ‘<’ | ‘<=’ | ‘>’ | ‘>=’ | ‘==’ | ‘~=’ | 61 | and | or 62 | 63 | unop ::= ‘-’ | not | ‘#’ 64 | -------------------------------------------------------------------------------- /languages/ruby/ast-ruby: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # -*- mode:ruby; coding:utf-8 -*- 3 | 4 | class AstRuby 5 | class << self 6 | def checkVersion 7 | major,minor,bug=RUBY_VERSION.split('.').map{|s|s.to_i} 8 | if (major < 1) or ((major == 1) and (minor < 9)) then 9 | printf "%s needs ruby 1.9 at least (there are bugs in 1.8.7)\n",self.name 10 | exit 1 11 | end 12 | end 13 | end 14 | end 15 | 16 | AstRuby.checkVersion 17 | 18 | require 'ripper' 19 | 20 | ARGV.each do |path| 21 | printf "[:file,\"%s\",\n",path 22 | print Ripper.sexp_raw(File.open(path,"r"){|file| file.read}) 23 | printf "]\n" 24 | end 25 | -------------------------------------------------------------------------------- /lispdoc/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | ( echo '(ql:quickload :com.informatimago.lispdoc)' ;\ 3 | echo '(com.informatimago.lispdoc.run:doc)' ;\ 4 | echo '(ccl::quit)' ) | ccl 5 | 6 | textdoc: 7 | ( echo '(ql:quickload :com.informatimago.lispdoc)' ;\ 8 | echo '(com.informatimago.lispdoc.run:doc :doc-directory "/tmp/doc/" :target-class (quote com.informatimago.lispdoc.generate.text:text-documentation))' ;\ 9 | echo '(ccl::quit)' ) | ccl 10 | -------------------------------------------------------------------------------- /lispdoc/genrst.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: genrst.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Generate reStructuredText documentation. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-08-04 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; LLGPL 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This library is licenced under the Lisp Lesser General Public 22 | ;;;; License. 23 | ;;;; 24 | ;;;; This library is free software; you can redistribute it and/or 25 | ;;;; modify it under the terms of the GNU Lesser General Public 26 | ;;;; License as published by the Free Software Foundation; either 27 | ;;;; version 2 of the License, or (at your option) any later 28 | ;;;; version. 29 | ;;;; 30 | ;;;; This library is distributed in the hope that it will be 31 | ;;;; useful, but WITHOUT ANY WARRANTY; without even the implied 32 | ;;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 33 | ;;;; PURPOSE. See the GNU Lesser General Public License for more 34 | ;;;; details. 35 | ;;;; 36 | ;;;; You should have received a copy of the GNU Lesser General 37 | ;;;; Public License along with this library; if not, write to the 38 | ;;;; Free Software Foundation, Inc., 59 Temple Place, Suite 330, 39 | ;;;; Boston, MA 02111-1307 USA 40 | ;;;;************************************************************************** 41 | (eval-when (:compile-toplevel :load-toplevel :execute) 42 | (setf *readtable* (copy-readtable nil))) 43 | (in-package "COM.INFORMATIMAGO.LISPDOC.GENERATE.RST") 44 | 45 | 46 | (defclass rst-documentation (documentation-generator) 47 | ()) 48 | 49 | 50 | ;;;; THE END ;;;; 51 | -------------------------------------------------------------------------------- /lispdoc/openmcl.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/lispdoc/openmcl.tar.bz2 -------------------------------------------------------------------------------- /lispdoc/utility.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: utility.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Exports a few utility operators. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-08-04 Extracted from lispdoc.lisp 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; LLGPL 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This library is licenced under the Lisp Lesser General Public 22 | ;;;; License. 23 | ;;;; 24 | ;;;; This library is free software; you can redistribute it and/or 25 | ;;;; modify it under the terms of the GNU Lesser General Public 26 | ;;;; License as published by the Free Software Foundation; either 27 | ;;;; version 2 of the License, or (at your option) any later 28 | ;;;; version. 29 | ;;;; 30 | ;;;; This library is distributed in the hope that it will be 31 | ;;;; useful, but WITHOUT ANY WARRANTY; without even the implied 32 | ;;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 33 | ;;;; PURPOSE. See the GNU Lesser General Public License for more 34 | ;;;; details. 35 | ;;;; 36 | ;;;; You should have received a copy of the GNU Lesser General 37 | ;;;; Public License along with this library; if not, write to the 38 | ;;;; Free Software Foundation, Inc., 59 Temple Place, Suite 330, 39 | ;;;; Boston, MA 02111-1307 USA 40 | ;;;;************************************************************************** 41 | (eval-when (:compile-toplevel :load-toplevel :execute) 42 | (setf *readtable* (copy-readtable nil))) 43 | (in-package "COM.INFORMATIMAGO.LISPDOC.UTILITY") 44 | 45 | 46 | (define-modify-macro appendf (&rest args) 47 | append "Append onto list") 48 | 49 | 50 | ;;;; THE END ;;;; 51 | 52 | -------------------------------------------------------------------------------- /objcl/Makefile: -------------------------------------------------------------------------------- 1 | all:documentation.pdf 2 | 3 | documentation.pdf:documentation.rst 4 | rst2pdf documentation.rst 5 | 6 | documentation.html:documentation.rst 7 | rst2html documentation.rst > documentation.html 8 | 9 | showpdf show-pdfs:documentation.pdf 10 | open documentation.pdf 11 | 12 | 13 | html:documentation.html 14 | .PHONY:show-pdf showpdf html 15 | -------------------------------------------------------------------------------- /objcl/documentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/objcl/documentation.pdf -------------------------------------------------------------------------------- /objcl/gnu/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo "# choose:" 3 | @echo "make linux" 4 | 5 | linux:objc.lisp 6 | 7 | INCLUDES= -I. -I/usr/lib/gcc/x86_64-linux-gnu/4.7/include/ 8 | OPTS=-fPIC -g -c 9 | 10 | 11 | objc.lisp:objc.i Makefile 12 | swig $(INCLUDES) -Dobjc_EXPORT=extern -cffi -generate-typedef -swig-lisp objc.i 13 | ( sed \ 14 | -e 1i\\ -e '(in-package "COM.INFORMATIMAGO.OBJC.GNU")' \ 15 | -e 's/&body/cl:&/g' \ 16 | -e 's/#oL/0/g' \ 17 | -e 's/\([0-9]\+\)U\?L\+/\1/g' \ 18 | -e 's/(cl:- \([0-9]\+\) 1)/(cl:- -\1 1)/g' \ 19 | -e '/(cl:defconstant _C_/d' \ 20 | < objc.lisp ;\ 21 | sed \ 22 | -n \ 23 | -e 's/#define \(_C_[^ ]*\) *'\''\(.\)'\'' *$$/(cl:defconstant \1 #\\\2)/p' \ 24 | < /usr/lib/gcc/x86_64-linux-gnu/4.7/include/objc/runtime.h \ 25 | ) > objc.new && mv objc.new objc.lisp 26 | 27 | # objc_wrap.o:objc_wrap.c 28 | 29 | 30 | 31 | #### THE END #### 32 | 33 | -------------------------------------------------------------------------------- /objcl/gnu/com.ogamita.swig.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- 2 | 3 | #+(or (and ccl darwin) (and clisp macos)) 4 | (eval-when (:execute :compile-toplevel :load-toplevel) 5 | (pushnew :macosx *features*)) 6 | 7 | (asdf:defsystem "com.ogamita.swig" 8 | :description "This systems gathers CFFI packages generated by Swig." 9 | :author "Pascal J. Bourguignon " 10 | :version "1.2.0" 11 | :licence "AGPL3" 12 | :properties ((#:author-email . "pjb@informatimago.com") 13 | (#:date . "Spring 2011") 14 | ((#:albert #:output-dir) . "../documentation/com.ogamita.swig/") 15 | ((#:albert #:formats) . ("docbook")) 16 | ((#:albert #:docbook #:template) . "book") 17 | ((#:albert #:docbook #:bgcolor) . "white") 18 | ((#:albert #:docbook #:textcolor) . "black")) 19 | :depends-on ("cffi") 20 | :components (#-(and) (:file "packages") 21 | #-(and) (:file "xcb" :depends-on ("packages")) 22 | #+macosx (:file "coregraphics" :depends-on ("packages")) 23 | #-(and) (:file "packages-exports" :depends-on (#-(and) "xcb" 24 | #+macosx "coregraphics")) 25 | #-(and #|not yet|#) (:file "gnu") 26 | #-(and #|not yet|#) (:file "objc" :depends-on ("gnu")))) 27 | 28 | ;;;; THE END ;;;; 29 | -------------------------------------------------------------------------------- /objcl/gnu/objc.i: -------------------------------------------------------------------------------- 1 | %module objc 2 | // %include 3 | // %include 4 | // %include 5 | %include 6 | %include 7 | %include 8 | %include 9 | %include 10 | %include 11 | %include 12 | -------------------------------------------------------------------------------- /objcl/objc/Makefile: -------------------------------------------------------------------------------- 1 | all:objc.lisp 2 | 3 | # Darwin: 4 | SWIG=/usr/local/bin/swig 5 | OBJC_INCLUDES= 6 | DEFINES=-D__OBJC2__=1 -DOBJC2_UNAVAILABLE= 7 | 8 | 9 | # Linux: 10 | #SWIG=/usr/bin/swig 11 | #SWIG=/data/languages/swig/bin/swig 12 | # OBJC_INCLUDES=-I/usr/lib/gcc/x86_64-linux-gnu/4.4/include 13 | DEFINES= 14 | 15 | 16 | 17 | INCLUDES=-I/usr/include $(OBJC_INCLUDES) 18 | SWIG_OPTIONS=-cffi -swig-lisp -generate-typedef 19 | 20 | objc-raw.lisp:objc.i Makefile 21 | $(SWIG) $(SWIG_OPTIONS) $(INCLUDES) $(DEFINES) objc.i 22 | sed \ 23 | < objc.lisp > objc-raw.lisp 24 | rm objc.lisp 25 | 26 | objc.lisp:objc-raw.lisp Makefile lispify-objc 27 | ./lispify-objc < objc-raw.lisp > objc.lisp 28 | 29 | clean: 30 | - rm -f objc-raw.lisp 31 | 32 | 33 | CC=/opt/llvm/bin/objc -isysroot / 34 | CFLAGS= 35 | #CFLAGS=-v 36 | #CFLAGS=-fblocks 37 | # -I/opt/llvm/lib/objc/3.3/include 38 | LDFLAGS=-L/opt/llvm/lib -lobjc 39 | ast:ast.c Makefile 40 | @ true $(CC) $(CFLAGS) -I. -g3 -ggdb3 -E -o /dev/stdout ast.c 41 | @ $(CC) $(CFLAGS) -I. -g3 -ggdb3 -o ast ast.c $(LDFLAGS) 42 | 43 | test-ast:ast 44 | @ LD_LIBRARY_PATH=/opt/llvm/lib:$LD_LIBRARY_PATH ./ast --test example.c 45 | 46 | run-ast:ast 47 | @ LD_LIBRARY_PATH=/opt/llvm/lib:$LD_LIBRARY_PATH ./ast example.c 48 | 49 | #### THE END #### 50 | 51 | -------------------------------------------------------------------------------- /objcl/objc/objc.i: -------------------------------------------------------------------------------- 1 | %module objc 2 | %include 3 | // %include 4 | -------------------------------------------------------------------------------- /objcl/objcl.el: -------------------------------------------------------------------------------- 1 | ;; -*- mode:emacs-lisp -*- 2 | 3 | 4 | (defun cl-indent (symbol num-forms) 5 | " 6 | Put on the SYMBOL and its lower case and upper case variants 7 | a 'lisp-indent-function property set to NUM-FORMS. 8 | " 9 | (dolist (property '(lisp-indent-function common-lisp-indent-function)) 10 | (put symbol property num-forms) 11 | (put (intern (string-downcase (symbol-name symbol))) property num-forms) 12 | (put (intern (string-upcase (symbol-name symbol))) property num-forms))) 13 | 14 | 15 | (dolist (table (list lisp-mode-syntax-table lisp-interaction-mode-syntax-table)) 16 | (modify-syntax-entry ?\[ "(] " table) 17 | (modify-syntax-entry ?\] ")[ " table)) 18 | 19 | (cl-indent 'class 2) 20 | (cl-indent 'method 3) 21 | (cl-indent 'class-method 3) 22 | 23 | 24 | ;;;; THE END ;;;; 25 | -------------------------------------------------------------------------------- /objcl/scratch.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | 4 | (push (setf (ccl:current-directory) 5 | (setf *default-pathname-defaults* #p"/home/pjb/works/abalone-macosx/objcl/")) 6 | asdf:*central-registry*) 7 | 8 | 9 | (cl-user::asdf-load :com.informatimago.objcl) 10 | (in-package :cocoa-playground) 11 | (objcl:set-objective-cl-syntax) 12 | 13 | ;; (asdf:oos 'asdf:load-op :com.informatimago.objc) 14 | 15 | 16 | 17 | (progn 18 | (cl-user::asdf-delete-system :com.informatimago.objcl) 19 | (delete-package :com.informatimago.objective-cl) 20 | (delete-package :com.informatimago.objective-c.lower) 21 | (delete-package :com.informatimago.simple-test) 22 | (cl-user::asdf-load :com.informatimago.objcl)) 23 | 24 | 25 | 26 | (x86-darwin64::|class_getInstanceMethod| 27 | (ccl:with-cstrs ((class-name "NSView")) (x86-darwin64::|objc_lookUpClass| class-name)) 28 | (objc:\@selector "initWithFrame:")) 29 | # 30 | 31 | 32 | 33 | (in-package :cl-user) 34 | (map nil (function delete-file) 35 | (directory #p"~/.cache/common-lisp/galatea.lan.informatimago.com/ccl-1.6-f94-macosx-amd64/home/pjb/src/git/public/lisp/objcl/*.*")) 36 | (cd #p"/home/pjb/src/public/lisp/objcl/") 37 | (push #p"/home/pjb/src/public/lisp/objcl/" asdf:*central-registry*) 38 | (asdf-load :com.informatimago.objcl) 39 | (asdf-load :com.informatimago.cocoa-playground) 40 | (in-package :cocoa-playground) 41 | (objcl:set-objective-cl-syntax) 42 | 43 | 44 | (every (lambda (x) (typep x 'ns:ns-string)) '(@"summer" @"été" @"καλοκαίρι")) 45 | '(@"summer" @"été" @"καλοκαίρι") 46 | (mapcar (lambda (str) (cons str (com.informatimago.objective-cl:lisp-string str))) 47 | '(@"summer" @"été" @"καλοκαίρι")) 48 | -------------------------------------------------------------------------------- /objcl/test.lisp: -------------------------------------------------------------------------------- 1 | ;; -*- mode:lisp; coding:utf-8 -*- 2 | (eval-when (:compile-toplevel :load-toplevel :execute) 3 | (setf *readtable* (copy-readtable nil))) 4 | 5 | 6 | (eval-when (:compile-toplevel) 7 | (print @"ASCII test string.") 8 | (print @"ISO-8859-1 test string, c'est bientôt l'été.") 9 | (print @"Unicodde test string, λαμβδα!") 10 | (print (class-of @"ASCII test string.")) 11 | (print (class-of @"ISO-8859-1 test string, c'est bientôt l'été.")) 12 | (print (class-of @"Unicodde test string, λαμβδα!")) 13 | (print (find-method (function make-load-form) nil (list (class-of @"ASCII test string.")) nil)) 14 | (print (find-method (function make-load-form) nil (list (class-of @"ISO-8859-1 test string, c'est bientôt l'été.")) nil)) 15 | (print (find-method (function make-load-form) nil (list (class-of @"Unicode test string, λαμβδα!")) nil)) 16 | (terpri)) 17 | 18 | (defvar *test-1* @"ASCII test string.") 19 | 20 | (defvar *test-2* @"ISO-8859-1 test string, c'est bientôt l'été.") 21 | 22 | (defvar *test-3* @"Unicodde test string, λαμβδα!") 23 | -------------------------------------------------------------------------------- /pgl/examples/tierra-desde-luna.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/pgl/examples/tierra-desde-luna.jpg -------------------------------------------------------------------------------- /post-clisp.awk: -------------------------------------------------------------------------------- 1 | BEGIN{ 2 | "pwd"|getline pwd 3 | # "/usr/local/bin/clisp -q -norc -ansi -x \"(princ(namestring (truename \\\"$(pwd)/\\\")))\""|getline pwd 4 | } 5 | 6 | /Compiling file /{ 7 | file=$4; 8 | if(substr(file,0,length(pwd))==pwd){ 9 | file=substr(file,1+length(pwd)); 10 | } 11 | next; 12 | } 13 | 14 | /; *Loading file /{ 15 | file=$4; 16 | if(substr(file,0,length(pwd))==pwd){ 17 | file=substr(file,1+length(pwd)); 18 | } 19 | next; 20 | } 21 | 22 | /WARNING in.*in lines/{ 23 | start=index($0,"WARNING in ")+length("WARNING in "); 24 | fn=substr($0,start,index($0," in lines ")-start); 25 | start=index($0," in lines ")+length(" in lines "); 26 | lines=substr($0,start,index(substr($0,start)," ")-1); 27 | split(lines,n,"\\."); 28 | w="WARNING"; 29 | next; 30 | } 31 | 32 | /ERROR.*in lines/{ 33 | start=index($0,"ERROR in ")+length("WARNING in "); 34 | fn=substr($0,start,index($0," in lines ")-start); 35 | start=index($0," in lines ")+length(" in lines "); 36 | lines=substr($0,start,index(substr($0,start)," ")-1); 37 | split(lines,n,"\\."); 38 | w="ERROR"; 39 | next; 40 | } 41 | 42 | { 43 | if(w!=""){ 44 | printf "%s:%s:1:\n%s:%s:2:%s in %s: %s\n",file,n[1],file,n[3],w,fn,$0; 45 | w=""; 46 | }else{ 47 | print $0; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /rdp/README: -------------------------------------------------------------------------------- 1 | -*- mode:rst;coding:utf-8 -*- 2 | 3 | RDP 4 | ======================================== 5 | 6 | com.informatimago.rdp 7 | This system defines a simple Recursive Decent Parser generator, 8 | with a lisp generator. 9 | 10 | 11 | com.informatimago.rdp.example 12 | 13 | com.informatimago.rdp.basic 14 | com.informatimago.rdp.basic.example 15 | 16 | 17 | .. comment: the end. 18 | -------------------------------------------------------------------------------- /rdp/scratch.lisp: -------------------------------------------------------------------------------- 1 | (com.informatimago.rdp.example:parse-example 2 | " 3 | const abc = 123, 4 | pi=3.141592e+0; 5 | var a,b,c; 6 | procedure gcd; 7 | begin 8 | while a # b do 9 | begin 10 | if ab then a:=a-b 12 | end 13 | end; 14 | begin 15 | a:=42; 16 | b:=30.0; 17 | call gcd 18 | end.") 19 | 20 | (com.informatimago.rdp.example-without-action:parse-example-without-action 21 | " 22 | const abc = 123, 23 | pi=3.141592e+0; 24 | var a,b,c; 25 | procedure gcd; 26 | begin 27 | while a # b do 28 | begin 29 | if ab then a:=a-b 31 | end 32 | end; 33 | begin 34 | a:=42; 35 | b:=30.0; 36 | call gcd 37 | end.") 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /small-cl-pgms/aim-8/aim-8.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/small-cl-pgms/aim-8/aim-8.txt.gz -------------------------------------------------------------------------------- /small-cl-pgms/aim-8/diff.m: -------------------------------------------------------------------------------- 1 | -*- mode:m-expression; coding:utf-8 -*- 2 | 3 | diff=λ[[y;x]; 4 | [atom[y] 5 | ⎯⟶ [y=x ⎯⟶ ONE; 6 | 1 ⎯⟶ ZERO]; 7 | first[y]=PLUS 8 | ⎯⟶ combine[PLUS; 9 | maplist[rest[y];λ[[z];diff[first[z];x]]]]; 10 | first[y]=TIMES 11 | ⎯⟶ combine[PLUS; 12 | maplist[rest[y]; 13 | λ[[z]; 14 | combine[TIMES; 15 | maplist[rest[y]; 16 | λ[[w]; 17 | [z≠w ⎯⟶ first[w]; 18 | 1 ⎯⟶ diff[first[w];x]]]]]]]]] 19 | -------------------------------------------------------------------------------- /small-cl-pgms/basic/index.html.in: -------------------------------------------------------------------------------- 1 | 40 | -------------------------------------------------------------------------------- /small-cl-pgms/basic/test-gosub-read.basic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/small-cl-pgms/basic/test-gosub-read.basic -------------------------------------------------------------------------------- /small-cl-pgms/basic/test-gosub.basic: -------------------------------------------------------------------------------- 1 | 10 FOR I=0 TO 2:GOSUB 20+10*I:NEXT I 2 | 20 PRINT "ONE":RETURN 3 | 30 PRINT "TWO":RETURN 4 | 40 PRINT "THREE":STOP 5 | -------------------------------------------------------------------------------- /small-cl-pgms/basic/test1.basic: -------------------------------------------------------------------------------- 1 | 1 INPUT "What's your name? " NAME$ 2 | 2 PRINT "Welcome " + NAME$ + "!" 3 | 10 PRINT "hello" , "world" 4 | 20 I = 1 : II = I + 1 : III = II + I 5 | 30 FOR K = 1 TO 3 * III STEP II 6 | 40 PRINT "k=" ; K 7 | 50 NEXT K 8 | 60 IF I < 10 THEN A = 10 : B = 1 : ELSE J = 1 9 | 80 REM ESPACE , ; : < > <= = = = = = >= = = = = = = <> > > > > > + - * / ^ 10 | 100 N = 0 11 | 110 PRINT "---> n=" ; N 12 | 120 IF N < 5 THEN N = N + 1 : GOTO 110 13 | 130 PRINT "out" 14 | 200 N = 0 15 | 210 PRINT ">>>> n=" ; N 16 | 220 IF N > 5 THEN PRINT "out" : ELSE N = N + 1 : GOTO 210 17 | 250 RESTORE : I = 1 18 | 255 READ NOM$ , J , M , A 19 | 260 IF J = 0 THEN GOTO 280 20 | 265 PRINT I , ":" , NOM$ , J ; "/" ; M ; "/" ; A 21 | 266 I = I + 1 22 | 270 GOTO 255 23 | 300 DATA "Pascal" , 15 , 3 , 1964 24 | 301 DATA "Bernard" , 14 , 1 , 1966 25 | 302 DATA "Alain" , 3 , 7 , 1968 26 | 303 DATA "Fin" , 0 , 0 , 0 27 | 400 INPUT "Please enter a number:" N 28 | 405 IF N < 1 THEN STOP 29 | 410 RESTORE 299 + N 30 | 420 I = 1 : GOTO 255 31 | -------------------------------------------------------------------------------- /small-cl-pgms/basic/test2.basic: -------------------------------------------------------------------------------- 1 | 10 PRINT "toto" , "I" ; 2 | 20 I = 1 : II = I + 1 : III = II + I 3 | 30 FOR K = 1 TO 3 * III STEP II 4 | 40 PRINT "k=" ; K 5 | 50 NEXT K 6 | 60 IF I < 10 THEN A = 10 : B = 1 ELSE J = 1 7 | 80 REM ESPACE , ; : < > <= = >= = = <> > + - * / ^ 8 | -------------------------------------------------------------------------------- /small-cl-pgms/botihn/Makefile: -------------------------------------------------------------------------------- 1 | PREFIX=/usr/local 2 | all:: 3 | doc:: 4 | clean:: 5 | install:: 6 | 7 | CSS="/default.css" 8 | RSTHTMLOPT=\ 9 | --leave-comments \ 10 | --link-stylesheet --stylesheet=$(CSS) 11 | 12 | 13 | all::botihn 14 | 15 | botihn: com.informatimago.small-cl-pgms.botihn.asd botihn.lisp generate-application.lisp 16 | ccl -norc < generate-application.lisp 17 | 18 | install::botihn 19 | install -m 755 botihn /usr/local/sbin/botihn 20 | 21 | doc::html 22 | pandoc -f rst -t asciidoc < botihn.txt > botihn-fr.asc 23 | 24 | clean:: 25 | - rm -f botihn-fr.html botihn-fr.html.in botihn-fr.asc 26 | 27 | html::botihn-fr.html 28 | 29 | html.in::botihn-fr.html.in 30 | 31 | botihn-fr.html.in:botihn.txt 32 | rst2html $(RSTHTMLOPT) < botihn.txt | ../../tools/html-unwrap-document.lisp > botihn-fr.html.in 33 | botihn-fr.html:botihn-fr.html.in 34 | ../../tools/html-wrap-document.lisp < $< > $@ || rm $@ 35 | 36 | .PHONY:doc html 37 | #### THE END #### 38 | -------------------------------------------------------------------------------- /small-cl-pgms/botihn/com.informatimago.small-cl-pgms.botihn.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.small-cl-pgms.botihn.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Botihn: an IRC bot monitoring Hacker News. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-04-27 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2019 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.small-cl-pgms.botihn" 36 | :description "An IRC bot monitoring Hacker News." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.4.0" 39 | :license "AGPL3" 40 | :depends-on ("com.informatimago.common-lisp.cesarum" 41 | "com.informatimago.common-lisp.interactive" ; date uptime 42 | "cl-irc" "cl-json" "drakma" "split-sequence" "cl-ppcre") 43 | :components ((:file "botihn"))) 44 | 45 | ;;;; THE END ;;;; 46 | -------------------------------------------------------------------------------- /small-cl-pgms/botil/Makefile: -------------------------------------------------------------------------------- 1 | PREFIX=/usr/local 2 | all:: 3 | doc:: 4 | clean:: 5 | install:: 6 | 7 | CSS="/default.css" 8 | RSTHTMLOPT=\ 9 | --leave-comments \ 10 | --link-stylesheet --stylesheet=$(CSS) 11 | 12 | 13 | all::botil 14 | 15 | botil: com.informatimago.small-cl-pgms.botil.asd botil.lisp generate-application.lisp 16 | ccl -norc < generate-application.lisp 17 | 18 | disabled-doc::html 19 | pandoc -f rst -t asciidoc < botil.txt >botil-fr.asc 20 | 21 | clean:: 22 | - rm -f botil-fr.html botil-fr.html.in 23 | 24 | html::botil-fr.html 25 | 26 | html.in::botil-fr.html.in 27 | 28 | botil-fr.html.in:botil.txt 29 | rst2html $(RSTHTMLOPT) < botil.txt | ../../tools/html-unwrap-document.lisp > botil-fr.html.in 30 | botil-fr.html:botil-fr.html.in 31 | ../../tools/html-wrap-document.lisp < $< > $@ || rm $@ 32 | 33 | .PHONY:doc html 34 | #### THE END #### 35 | -------------------------------------------------------------------------------- /small-cl-pgms/botil/design/botil.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/small-cl-pgms/botil/design/botil.graffle -------------------------------------------------------------------------------- /small-cl-pgms/botil/design/f-botil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/small-cl-pgms/botil/design/f-botil.png -------------------------------------------------------------------------------- /small-cl-pgms/botil/design/o-botil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/small-cl-pgms/botil/design/o-botil.png -------------------------------------------------------------------------------- /small-cl-pgms/botil/loader.lisp: -------------------------------------------------------------------------------- 1 | (cd #P"/Users/pjb/src/public/lisp/small-cl-pgms/botil/") 2 | (push (pwd) asdf:*central-registry*) 3 | (ql:quickload :com.informatimago.small-cl-pgms.botil) 4 | (in-package :com.informatimago.small-cl-pgms.botil) 5 | (com.informatimago.small-cl-pgms.botil:main) 6 | -------------------------------------------------------------------------------- /small-cl-pgms/botvot/Makefile: -------------------------------------------------------------------------------- 1 | PREFIX=/usr/local 2 | all:: 3 | doc:: 4 | clean:: 5 | install:: 6 | 7 | all::botvot 8 | 9 | botvot: com.informatimago.small-cl-pgms.botvot.asd botvot.lisp generate-application.lisp 10 | ccl --no-init --load generate-application.lisp --eval '(ccl:quit)' 11 | 12 | install::botvot 13 | install -m 755 botvot /usr/local/sbin/botvot 14 | 15 | # pandoc -f org -t asciidoc < botvot.org > botvot-fr.asc 16 | 17 | .PHONY:doc html 18 | #### THE END #### 19 | -------------------------------------------------------------------------------- /small-cl-pgms/brainfuck/brainfuck-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: bf-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test bf.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.SMALL-CL-PGMS.BRAINFUCK.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.SMALL-CL-PGMS.BRAINFUCK") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.BRAINFUCK.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /small-cl-pgms/brainfuck/com.informatimago.small-cl-pgms.brainfuck.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: brainfuck.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; A Brainfuck Compiler.. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2014-12-23 Added asd file. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2005 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.small-cl-pgms.brainfuck" 36 | :description "Brainfuck Compiler." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.0" 39 | :license "GPL3" 40 | :depends-on () 41 | :components ((:file "brainfuck")) 42 | #+adsf3 :in-order-to #+adsf3 ((asdf:test-op (asdf:test-op "com.informatimago.small-cl-pgms.bf.test")))) 43 | 44 | ;;;; THE END ;;;; 45 | -------------------------------------------------------------------------------- /small-cl-pgms/brainfuck/fizzbuzz.bf: -------------------------------------------------------------------------------- 1 | FizzBuzz in Brainfuck 2 | >++++++++++[<++++++++++>-]<[>+>[-]>++++++++++[<++++++++++>-]<+<<[->>->+<<<]>>> 3 | [-<<<+>>>]<>>+++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[-]]>[-] 4 | <<<[[-]++++++++++[>++++++++++<-]>++.+++.[-]<[-]+++++++++++[>+++++++++++<-]>+.. 5 | [-]<[-]<<[-]>>]<>>+++++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[ 6 | -]]>[-]<<<[[-]+++++++++[>+++++++++++<-]>-.[-]<[-]+++++++++[>+++++++++++++<-]>. 7 | +++++..[-]<[-]<<[-]>>]<<[[-]>>++++++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>>[ 8 | >++++++++[<++++++>-]<.[-]]<>++++++++[<++++++>-]<.[-]<<<]>[-]++++++++++.[-]<[-] 9 | <-] 10 | -------------------------------------------------------------------------------- /small-cl-pgms/brainfuck/fizzbuzz.bfrun: -------------------------------------------------------------------------------- 1 | ;; -*- mode:lisp; coding:utf-8 -*- 2 | (ql:quickload :com.informatimago.small-cl-pgms.brainfuck) 3 | (funcall (com.informatimago.small-cl-pgms.brainfuck:bfcompile-file #P"~/fizzbuzz.brainfuck") 4 | (com.informatimago.small-cl-pgms.brainfuck:make-bfvm)) 5 | -------------------------------------------------------------------------------- /small-cl-pgms/brainfuck/index.html.in: -------------------------------------------------------------------------------- 1 |
    7 | 8 |

    Brainfuck in Lisp

    9 | 10 |

    This file contains: 11 |

      12 | 13 |
    • a brainfuck virtual machine in Lisp
    • 14 | 15 |
    • a brainfuck optimizing compiler, translates to lisp and compiles 16 | lisp to native code
    • 17 | 18 |
    • a sketch for an implementation of a lisp on brainfuck. Nothing 19 | much actually, some macros to generate brainfuck code from lisp, 20 | some lisp "vm" primitives. I kind of abandonned this, given the 21 | time complexity of any non-trivial brainfuck program and space 22 | limitations of the brainfuck virtual machine (however, this 23 | brainfuck to lisp compiler reduces the time complexities by using 24 | some random access to the memory, so it might be practical. Not 25 | that there is no limitation on the size of the 26 | programs...).
      Instead of implementing a lisp system over the 27 | brainfuck virtual machine, it might be more practical to implement 28 | a lisp compiler generating optimized brainfuck code.
    • 29 | 30 |
    31 |

    32 | 33 | 34 | 38 | 39 |
    40 | -------------------------------------------------------------------------------- /small-cl-pgms/brainfuck/simple-symbol.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | 4 | 5 | (defparameter bf$symbols '()) 6 | 7 | (defun bf$intern (name) 8 | (let ((ass (assoc name bf$symbols :test (function equal)))) 9 | (if ass 10 | (cdr ass) 11 | (let ((sym (cons :$symbol (list :pname name)))) 12 | (setf bf$symbols (cons (cons name sym) bf$symbols)) 13 | sym)))) 14 | 15 | (defun bf$set (sym value) 16 | (let ((slot (member :value (cdr sym)))) 17 | (if slot 18 | (setf (cadr slot) value) 19 | (setf (cdr sym) (list* :value value (cdr sym)))) 20 | value)) 21 | 22 | (defun bf$symbol-value (sym) 23 | (let ((slot (member :value (cdr sym)))) 24 | (when slot 25 | (cadr slot)))) 26 | 27 | 28 | 29 | (bf$intern "CAR") 30 | (bf$intern "ASSOC") 31 | (bf$set (bf$intern "X") 42) 32 | (bf$symbol-value (bf$intern "X")) 33 | (bf$symbol-value (bf$intern "ASSOC")) 34 | (bf$symbol-value (bf$intern "Y")) 35 | (bf$set (bf$intern "X") 24) 36 | (bf$symbol-value (bf$intern "X")) 37 | bf$symbols 38 | 39 | 40 | -------------------------------------------------------------------------------- /small-cl-pgms/clisp-fork/count-fork.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | static run=1; 7 | static void sh_stop(int signal){run=0;} 8 | int main(void){ 9 | long long counter; 10 | struct itimerval i; 11 | i.it_interval.tv_sec=0; 12 | i.it_interval.tv_usec=0; 13 | i.it_value.tv_sec=0; 14 | i.it_value.tv_usec=10000; 15 | signal(SIGVTALRM,sh_stop); 16 | setitimer(ITIMER_VIRTUAL,&i,0); 17 | counter=0; 18 | while(run){ 19 | if(fork()==0){ 20 | exit(0);} 21 | counter++;} 22 | printf("forked %lld times\n",counter); 23 | return(0);} 24 | -------------------------------------------------------------------------------- /small-cl-pgms/com.informatimago.small-cl-pgms.life.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.small-cl-pgms.life.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; This system loads a simple Conway's Life game. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2014-12-23 Added asd file. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2005 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.small-cl-pgms.life" 36 | :description "A simple Conway's Life game." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.0" 39 | :license "GPL3" 40 | :depends-on () 41 | :components ((:file "life")) 42 | #+adsf3 :in-order-to #+adsf3 ((asdf:test-op (asdf:test-op "com.informatimago.small-cl-pgms.life.test")))) 43 | 44 | ;;;; THE END ;;;; 45 | -------------------------------------------------------------------------------- /small-cl-pgms/com.informatimago.small-cl-pgms.quine.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.small-cl-pgms.quine.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; This system loads a few quines. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2014-12-23 Added asd file. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2005 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.small-cl-pgms.quine" 36 | :description "A few Quines." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.0" 39 | :license "GPL3" 40 | :depends-on () 41 | :components ((:file "quine")) 42 | #+adsf3 :in-order-to #+adsf3 ((asdf:test-op (asdf:test-op "com.informatimago.small-cl-pgms.quine.test")))) 43 | 44 | ;;;; THE END ;;;; 45 | -------------------------------------------------------------------------------- /small-cl-pgms/geek-day/README: -------------------------------------------------------------------------------- 1 | Get common/makedir makefiles with: 2 | 3 | cvs -z3 -d :pserver:anonymous@cvs.informatimago.com:/local/cvs/public/chrooted-cvs/cvs co common/makedir 4 | 5 | and then compile with: 6 | 7 | MAKEDIR=common/makedir make 8 | 9 | -------------------------------------------------------------------------------- /small-cl-pgms/geek-day/geek-day.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/small-cl-pgms/geek-day/geek-day.gif -------------------------------------------------------------------------------- /small-cl-pgms/intersection-r5rs-common-lisp-emacs-lisp/index.html.in: -------------------------------------------------------------------------------- 1 |
    7 | 8 |

    Intersection Common Lisp, Emacs Lisp and R5RS Scheme

    9 | 10 |

    intersection-cl-el-r5rs.lisp

    11 |

    This lisp source file can be loaded and run on: 12 |

      13 |
    • any Common Lisp conforming implementation,
    • 14 |
    • any R5RS implementation,
    • 15 |
    • GNU emacs (tested with emacs-23 and emacs-24).
    • 16 |
    17 |

    18 | 19 |

    Example: 20 |

    21 |         [pjb@kuiper :0 intersection-r5rs-common-lisp-emacs-lisp]$ make test-intersection-cl-el-r5rs
    22 | 
    23 | 
    24 | ;;======================================================================
    25 | ;; Test intersection-cl-el-r5rs
    26 | ;;
    27 | 
    28 | ;; Common Lisp
    29 | clisp -ansi -norc -q intersection-cl-el-r5rs.lisp
    30 | 
    31 | (booted a lisp over common-lisp)
    32 | ((fact 10) = 3628800)
    33 | 
    34 | ;; Emacs Lisp
    35 | emacs -Q --batch -l intersection-cl-el-r5rs.lisp -q
    36 | 
    37 | (booted a lisp over emacs-lisp)
    38 | ((fact 10) = 3628800)
    39 | 
    40 | ;; Scheme
    41 | bigloo -no-hello -q -w -load  intersection-cl-el-r5rs.lisp -eval '(quit)'
    42 | 
    43 | (booted a lisp over scheme)
    44 | ((fact 10) = 3628800)
    45 | [pjb@kuiper :0 intersection-r5rs-common-lisp-emacs-lisp]$
    46 | 47 |
    48 | -------------------------------------------------------------------------------- /small-cl-pgms/irclog-prompter/README: -------------------------------------------------------------------------------- 1 | This system fetches irc logs from the web, and displays updates at the 2 | next prompt. 3 | 4 | Default configuration: 5 | 6 | #+BEGIN_QUOTE 7 | com.informatimago.small-cl-pgms.irclog:*irclog-base-url* 8 | --> "https://ccl.clozure.com/irc-logs/" 9 | com.informatimago.small-cl-pgms.irclog:*channels* 10 | --> ("lisp") 11 | com.informatimago.small-cl-pgms.irclog:*ignore-commands* 12 | --> ("joined" "left" "quit") 13 | #+END_QUOTE 14 | 15 | We may put in the rc file: 16 | 17 | #+BEGIN_CODE 18 | (defun start-irclog () 19 | (ql:quickload "com.informatimago.small-cl-pgms.irclog") 20 | (uiop:symbol-call "COM.INFORMATIMAGO.SMALL-CL-PGMS.IRCLOG.MAIN" "START") 21 | (uiop:symbol-call "COM.INFORMATIMAGO.SMALL-CL-PGMS.PROMPTER" "ADD-PROMPT-FUNCTION" 'date) 22 | (values)) 23 | #+END_CODE 24 | 25 | and then once slime/swank is started, activate it with: 26 | 27 | #+BEGIN_CODE 28 | (start-irclog) 29 | #+END_CODE 30 | -------------------------------------------------------------------------------- /small-cl-pgms/irclog-prompter/loader.lisp: -------------------------------------------------------------------------------- 1 | 2 | (pushnew #P"~/src/public/lisp/small-cl-pgms/irclog-prompter/" asdf:*central-registry* :test (function equalp)) 3 | (ql:quickload "com.informatimago.small-cl-pgms.irclog") 4 | (require :cocoa) 5 | -------------------------------------------------------------------------------- /small-cl-pgms/irclog-prompter/main.lisp: -------------------------------------------------------------------------------- 1 | (defpackage "COM.INFORMATIMAGO.SMALL-CL-PGMS.IRCLOG.MAIN" 2 | (:use "COMMON-LISP") 3 | (:use "COM.INFORMATIMAGO.SMALL-CL-PGMS.IRCLOG" 4 | "COM.INFORMATIMAGO.SMALL-CL-PGMS.PROMPTER") 5 | (:documentation "This package fetches new lines from irclogs, 6 | and displays them before the next prompt.") 7 | (:export "START")) 8 | (in-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.IRCLOG.MAIN") 9 | 10 | (defun display-new-irc-messages () 11 | (let ((messages (get-new-messages))) 12 | (when messages 13 | (fresh-line) 14 | (loop :for (channel messages) :in messages 15 | :do (loop :for message :in messages 16 | :do (format t "#~A: ~A~%" channel message))) 17 | (force-output)))) 18 | 19 | (defun start () 20 | (install-prompt-functions) 21 | (add-prompt-function 'display-new-irc-messages) 22 | (values)) 23 | 24 | ;;;; THE END ;;;; 25 | -------------------------------------------------------------------------------- /small-cl-pgms/irclog-prompter/packages.lisp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /small-cl-pgms/irclog-prompter/prompter-test.lisp: -------------------------------------------------------------------------------- 1 | (defpackage "COM.INFORMATIMAGO.SMALL-CL-PGMS.PROMPTER.TEST" 2 | (:use "COMMON-LISP" 3 | "COM.INFORMATIMAGO.SMALL-CL-PGMS.PROMPTER")) 4 | (in-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.PROMPTER.TEST") 5 | 6 | (defun date (&optional (date (get-universal-time))) 7 | "Prints the date." 8 | (format t "~&~{~5*~4,'0D-~2:*~2,'0D-~2:*~2,'0D ~2:*~2,'0D:~2:*~2,'0D:~2:*~2,'0D~8*~}~%" 9 | (multiple-value-list (decode-universal-time date))) 10 | date) 11 | 12 | 13 | (assert (eq (ADD-PROMPT-FUNCTION 'date) 14 | 'date)) 15 | (assert (eq (REMOVE-PROMPT-FUNCTION 'date) 16 | 'date)) 17 | 18 | (let ((old (LIST-PROMPT-FUNCTIONS))) 19 | (dolist (fun old) 20 | (REMOVE-PROMPT-FUNCTION fun)) 21 | 22 | (unwind-protect 23 | (progn 24 | (assert (null (LIST-PROMPT-FUNCTIONS))) 25 | (assert (eq (ADD-PROMPT-FUNCTION 'date) 26 | 'date)) 27 | (assert (equal (LIST-PROMPT-FUNCTIONS) 28 | '(date)))) 29 | 30 | (dolist (fun (LIST-PROMPT-FUNCTIONS)) 31 | (REMOVE-PROMPT-FUNCTION fun)) 32 | (dolist (fun old) 33 | (ADD-PROMPT-FUNCTION fun)))) 34 | 35 | ;;;; THE END ;;;; 36 | -------------------------------------------------------------------------------- /small-cl-pgms/irclog-prompter/swank-slime.lisp: -------------------------------------------------------------------------------- 1 | (defpackage "COM.INFORMATIMAGO.SMALL-CL-PGMS.SLIME" 2 | (:use "COMMON-LISP") 3 | (:documentation "This package exports functions to evaluate expressions in emacs thru swank/slime.") 4 | (:export "EVAL-IN-EMACS")) 5 | (in-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.SLIME") 6 | 7 | (defparameter *emacs-readtable* 8 | (let ((rt (copy-readtable))) 9 | 10 | (setf (readtable-case rt) :preserve) 11 | (set-syntax-from-char #\> #\) rt) 12 | (set-dispatch-macro-character 13 | #\# #\< 14 | (lambda (stream subchar dispchar) 15 | `(emacs-unreadable ,@(read-delimited-list #\> stream t))) 16 | rt) 17 | ;; Probably more readtable patching would be in order. 18 | rt)) 19 | 20 | 21 | ;; We could define CLOS proxies for emacs objects for a more seamless 22 | ;; integration. swank::eval-in-emacs process the CL form to make it 23 | ;; "emacs" (eg. downcase symbols, etc). It could convert CLOS proxies 24 | ;; to emacs lisp forms returning the corresponding emacs object. 25 | 26 | (defun eval-in-emacs (form &optional nowait) 27 | (let ((result #+swank (swank::eval-in-emacs `(format "%S" ,form) nowait) 28 | #-swank (error "Swank not available")) 29 | (*readtable* *emacs-readtable*)) 30 | (with-input-from-string (in result) 31 | (let ((result (read in nil in))) 32 | result)))) 33 | 34 | ;;;; THE END ;;;; 35 | -------------------------------------------------------------------------------- /small-cl-pgms/rdp/index.html.in: -------------------------------------------------------------------------------- 1 |
    7 | 8 |

    A Quick and Dirty Recursive Descent Parser Generator

    9 | 10 |

    Here is a recursive descent parser generator, written in 11 | Common Lisp.

    12 | 13 |

    It generates the scanner and parser in lisp, or in a pseudo-basic. 14 | It is possible to add generation of the parser in other programming 15 | languages. 16 |

    17 | 18 |

    Files: 19 |

    30 | 31 | 32 |

    Note: those are old files, an ancient version of RDP. 33 | For real uses, get the current sources from gitorious; the RDP 34 | Generator is now included in the com.informatimago repository:

    35 |
    36 |     git clone https://git.gitorious.org/com-informatimago/com-informatimago.git
    37 |   
    38 | 39 |

    or you can just get it with quicklisp:

    40 |
    41 |     (ql:quicklisp :com.informatimago.rdp)
    42 |   
    43 | 44 |
    45 | -------------------------------------------------------------------------------- /small-cl-pgms/rdp/scratch.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | 4 | (com.informatimago.rdp.example:parse-example 5 | " 6 | const abc = 123, 7 | pi=3.141592e+0; 8 | var a,b,c; 9 | procedure gcd; 10 | begin 11 | while a # b do 12 | begin 13 | if ab then a:=a-b 15 | end 16 | end; 17 | begin 18 | a:=42; 19 | b:=30.0; 20 | call gcd 21 | end.") 22 | 23 | (com.informatimago.rdp.example-without-action:parse-example-without-action 24 | " 25 | const abc = 123, 26 | pi=3.141592e+0; 27 | var a,b,c; 28 | procedure gcd; 29 | begin 30 | while a # b do 31 | begin 32 | if ab then a:=a-b 34 | end 35 | end; 36 | begin 37 | a:=42; 38 | b:=30.0; 39 | call gcd 40 | end.") 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /small-cl-pgms/rpsls/rpcls.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | a>b rock paper scisors lizard spock 4 | rock = crushes crushes 5 | paper covers = disproves 6 | scisors cut = decapitate 7 | lizard eats = poisons 8 | spock vaporises smashes = 9 | 10 | -------------------------------------------------------------------------------- /small-cl-pgms/rpsls/rpsls-25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/informatimago/lisp/e2bc36ac8e560daa5707aeda6b67a91489c1ff76/small-cl-pgms/rpsls/rpsls-25.jpg -------------------------------------------------------------------------------- /small-cl-pgms/sedit/swap.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | 4 | (progn (defmacro comment (&rest ignore) 5 | (declare (ignore ignore)) 6 | (values)) 7 | (comment " 8 | This file demonstrate how one can add a command 9 | dynamically to sedit, thus demonstrating how sedit 10 | is an emacs. ;-) 11 | ") 12 | (defun previous-cell (list cell) 13 | (loop :for current :on list 14 | :until (eq (cdr current) cell) 15 | :finally (return current))) 16 | 17 | (defun sedit-swap (buffer) 18 | "swaps the expression before the selection with the selection." 19 | (with-buffer (buffer root selection) 20 | (let ((parent 21 | (selection-parent-list selection)) 22 | (selection-cell 23 | (sedit-find-object root selection))) 24 | (if (eq (car selection-cell) selection) 25 | (let ((previous-cell 26 | (previous-cell 27 | parent 28 | selection-cell))) 29 | (when 30 | (and previous-cell selection-cell) 31 | (rotatef 32 | (car previous-cell) 33 | (car selection-cell)))) 34 | (progn (comment "selection is a cdr.") 35 | (rotatef 36 | (car selection-cell) 37 | (cdr selection-cell))))))) 38 | (add-command 'w 39 | 'swap 40 | 'sedit-swap 41 | "swaps the expression before with the selection.")) 42 | -------------------------------------------------------------------------------- /small-cl-pgms/wang-cl.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | 4 | (shadow '(trace untrace)) 5 | (defun trace (functions) (eval `(cl:trace ,@functions))) 6 | (defun untrace (functions) (eval `(cl:untrace ,@functions))) 7 | 8 | (defun define (definitions) 9 | (dolist (def definitions) 10 | (eval (if (and (consp (second def)) (eq 'lambda (car (second def)))) 11 | `(progn (defun ,(first def) ,@(cdr (second def))) 12 | (defparameter ,(first def) ,(second def))) 13 | `(defparameter ,(first def) ,(second def)))))) 14 | 15 | (defun stop (arguments) (throw 'driver-end-of-deck nil)) 16 | (defun fin (arguments) (throw 'driver-end-of-deck nil)) 17 | (defun test (arguments) (princ arguments) (terpri)) 18 | 19 | 20 | (defun driver (path) 21 | (with-open-file (cards path) 22 | (catch 'driver-end-of-deck 23 | (loop (let ((first-char (read-char cards))) 24 | (if (char= #\* first-char) 25 | (read-line cards) ; comment 26 | (progn 27 | (unread-char first-char cards) 28 | (let* ((command (read cards)) 29 | (arguments (if (member command '(stop fin test)) 30 | (list (read-line cards)) 31 | (read cards)))) 32 | (print (apply command arguments)))))))))) 33 | 34 | (driver "wang.job") 35 | -------------------------------------------------------------------------------- /susv3/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile stub. 2 | PREFIX=/usr/local 3 | all:: 4 | install:: 5 | #### THE END #### 6 | -------------------------------------------------------------------------------- /susv3/README: -------------------------------------------------------------------------------- 1 | .. comment: -*- mode:rst; coding:utf-8 -*- 2 | 3 | com.informatimago.susv3 Common Lisp POSIX API 4 | ============================================= 5 | 6 | This library defines a POSIX SUSv3 API for Common Lisp. 7 | (Lisp Wrappers). 8 | 9 | 10 | .. comment: 11 | 12 | ------------------------------------------------- 13 | --------------- 14 | - 15 | . 16 | 17 | -------------------------------------------------------------------------------- /susv3/VERSION.DAT: -------------------------------------------------------------------------------- 1 | major=1 2 | minor=0 3 | compilation=3 4 | -------------------------------------------------------------------------------- /susv3/post-clisp.awk: -------------------------------------------------------------------------------- 1 | BEGIN{ 2 | "/usr/local/bin/clisp -q -norc -ansi -x \"(princ(namestring (truename \\\"$(pwd)/\\\")))\""|getline pwd 3 | } 4 | 5 | /Compiling file /{ 6 | file=$4; 7 | if(substr(file,0,length(pwd))==pwd){ 8 | file=substr(file,1+length(pwd)); 9 | } 10 | next; 11 | } 12 | 13 | /; *Loading file /{ 14 | file=$4; 15 | if(substr(file,0,length(pwd))==pwd){ 16 | file=substr(file,1+length(pwd)); 17 | } 18 | next; 19 | } 20 | 21 | /WARNING in.*in lines/{ 22 | start=index($0,"WARNING in ")+length("WARNING in "); 23 | fn=substr($0,start,index($0," in lines ")-start); 24 | start=index($0," in lines ")+length(" in lines "); 25 | lines=substr($0,start,index(substr($0,start)," ")-1); 26 | split(lines,n,"\\."); 27 | w="WARNING"; 28 | next; 29 | } 30 | 31 | /ERROR.*in lines/{ 32 | start=index($0,"ERROR in ")+length("WARNING in "); 33 | fn=substr($0,start,index($0," in lines ")-start); 34 | start=index($0," in lines ")+length(" in lines "); 35 | lines=substr($0,start,index(substr($0,start)," ")-1); 36 | split(lines,n,"\\."); 37 | w="ERROR"; 38 | next; 39 | } 40 | 41 | { 42 | if(w!=""){ 43 | printf "%s:%s:1:\n%s:%s:2:%s in %s: %s\n",file,n[1],file,n[3],w,fn,$0; 44 | w=""; 45 | }else{ 46 | print $0; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /susv3/summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Summary 7 | 8 | 9 |
  • 10 | 11 | 12 | COM.INFORMATIMAGO.SUSV3.TOOLS 13 |
    14 | Utilities for implementing SUSV3 API.
    15 | 
    16 | 
  • 17 |
  • 18 | 19 | 20 | COM.INFORMATIMAGO.SUSV3.DIRENT 21 |
    22 | SUSv3 dirent functions.
    23 | 
    24 | 
  • 25 |
  • 26 | 27 | 28 | COM.INFORMATIMAGO.SUSV3.IPC 29 |
    30 | An API over SUSV3-XSI IPC.
    31 | 
    32 | Note: The number of queues in a system is limited.
    33 | An application could use the message type as a recipient address.
    34 | cliini:  There's always another way to achieve the same thing.
    35 | But it's the lisp way to offer nice and intuitive interfaces
    36 | to achieve the stuff, otherwise we might all be using assembler.
    37 | [2005-01-02 20:30:53]
    38 | 
  • 39 |
  • 40 | 41 | 42 | COM.INFORMATIMAGO.SUSV3.PROCESS 43 |
    44 | Multiprocessing for clisp.
    45 | This package doesn't implement threads like in other Common-Lisp
    46 | implementations.  Rather it uses plain unix processes.
    47 | This has sever implications for IPC: there is no shared memory,
    48 | all inter-process communication must go thru pipes or sockets.
    49 | http://www.franz.com/support/documentation/7.0/doc/multiprocessing.htm
    50 | 
  • -------------------------------------------------------------------------------- /systems-for-quicklisp.sexp: -------------------------------------------------------------------------------- 1 | ( 2 | "com.informatimago.clext" 3 | "com.informatimago.clext.association" 4 | "com.informatimago.clisp" 5 | "com.informatimago.clmisc" 6 | "com.informatimago.common-lisp" 7 | "com.informatimago.common-lisp.apple-file" 8 | "com.informatimago.common-lisp.arithmetic" 9 | "com.informatimago.common-lisp.bank" 10 | "com.informatimago.common-lisp.cesarum" 11 | "com.informatimago.common-lisp.csv" 12 | "com.informatimago.common-lisp.data-encoding" 13 | "com.informatimago.common-lisp.diagram" 14 | "com.informatimago.common-lisp.ed" 15 | "com.informatimago.common-lisp.graphviz" 16 | "com.informatimago.common-lisp.heap" 17 | "com.informatimago.common-lisp.html-base" 18 | "com.informatimago.common-lisp.html-generator" 19 | "com.informatimago.common-lisp.html-parser" 20 | "com.informatimago.common-lisp.http" 21 | "com.informatimago.common-lisp.interactive" 22 | "com.informatimago.common-lisp.invoice" 23 | "com.informatimago.common-lisp.lisp" 24 | "com.informatimago.common-lisp.lisp-reader" 25 | "com.informatimago.common-lisp.lisp-sexp" 26 | "com.informatimago.common-lisp.lisp-text" 27 | "com.informatimago.common-lisp.lisp.ibcl" 28 | "com.informatimago.common-lisp.lisp.stepper" 29 | "com.informatimago.common-lisp.parser" 30 | "com.informatimago.common-lisp.picture" 31 | "com.informatimago.common-lisp.regexp" 32 | "com.informatimago.common-lisp.rfc2822" 33 | "com.informatimago.common-lisp.rfc3548" 34 | "com.informatimago.common-lisp.telnet" 35 | "com.informatimago.common-lisp.unix" 36 | "com.informatimago.languages.cxx" 37 | "com.informatimago.languages.lua" 38 | "com.informatimago.linc" 39 | "com.informatimago.lispdoc" 40 | "com.informatimago.objcl" 41 | "com.informatimago.rdp" 42 | "com.informatimago.rdp.basic" 43 | "com.informatimago.rdp.example" 44 | "com.informatimago.susv3" 45 | "com.informatimago.tools" 46 | "com.informatimago.tools.check-asdf" 47 | "com.informatimago.tools.make-depends" 48 | "com.informatimago.tools.manifest" 49 | "com.informatimago.tools.pathname" 50 | "com.informatimago.tools.quicklisp" 51 | "com.informatimago.tools.symbol" 52 | "com.informatimago.xcode" 53 | ) 54 | -------------------------------------------------------------------------------- /tools/Makefile: -------------------------------------------------------------------------------- 1 | all:download-asdf 2 | .PHONY:download-asdf 3 | download-asdf: 4 | mv asdf.lisp asdf.lisp~ 5 | wget --no-check-certificate https://common-lisp.net/project/asdf/archives/asdf.lisp 6 | 7 | -------------------------------------------------------------------------------- /tools/asdf-file-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: asdf-file-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test asdf-file.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.ASDF-FILE.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.ASDF-FILE") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.ASDF-FILE.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/asdf-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: asdf-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test asdf.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.ASDF.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.ASDF") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.ASDF.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/asdf.el: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (defun files-in-directory (directory file-type recursive) 5 | "Return a list of paths relative to `directory' of the files in the `directory'. 6 | `file-type' is the extension of the files returned. 7 | When `recursive' appends also the files in the sub-directory and in 8 | the sub-sub-directory. 9 | " 10 | (mapcar (lambda (path) 11 | (if (string= (subseq path 0 (length directory)) 12 | directory) 13 | (subseq path (length directory)) 14 | path)) 15 | (append (file-expand-wildcards (format "%s*.%s" directory file-type)) 16 | (when recursive 17 | (append 18 | (file-expand-wildcards (format "%s*%s*.%s" directory df file-type)) 19 | (file-expand-wildcards (format "%s*%s*%s*.%s" directory df df file-type))))))) 20 | 21 | 22 | (defun make-component-list (paths &optional dependencies) 23 | (mapcar (lambda (path) 24 | `(:file ,path ,@(let ((entry (assoc* path dependencies :test (function string=)))) 25 | (when entry (cdr entry))))) 26 | paths)) 27 | 28 | 29 | (defvar *source-file-type* "lisp") 30 | 31 | 32 | (defun insert-component-list (&optional recursive) 33 | (interactive "P") 34 | (loop with directory = (file-name-directory (buffer-file-name)) 35 | with df = (subseq (file-name-as-directory directory) 36 | (length (directory-file-name directory))) 37 | for component in (make-component-list 38 | (mapcar (function file-name-sans-extension) 39 | (files-in-directory directory *source-file-type* recursive))) 40 | for sep = "(" then "\n " 41 | initially (insert ":components ") 42 | finally (insert ")\n") 43 | do (insert (format "%s%S" sep component)))) 44 | 45 | 46 | -------------------------------------------------------------------------------- /tools/check-asdf-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: check-asdf-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test check-asdf.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.CHECK-ASDF.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.CHECK-ASDF") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.CHECK-ASDF.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/com.informatimago.tools.check-asdf.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: check-asdf.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Check asd file for circular dependencies. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2013-03-25 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2013 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.tools.check-asdf" 36 | :description "Checks ASD Files and reports circular dependencies." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.3.0" 39 | :license "AGPL3" 40 | :depends-on ("com.informatimago.common-lisp.cesarum" 41 | "com.informatimago.clext" 42 | "com.informatimago.tools.source" 43 | #-abcl "com.informatimago.tools.script") 44 | :components (#-abcl (:file "check-asdf" :depends-on ())) 45 | #+asdf-unicode :encoding #+asdf-unicode :utf-8) 46 | 47 | ;;;; THE END ;;;; 48 | -------------------------------------------------------------------------------- /tools/com.informatimago.tools.manifest.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.tools.manifest.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Produce a manifest of asdf systems. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2013-03-25 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2013 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.tools.manifest" 36 | :description "Produces a manifest of asdf systems." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.0" 39 | :license "AGPL3" 40 | :depends-on ("split-sequence" 41 | "com.informatimago.common-lisp.cesarum" 42 | "com.informatimago.clext.shell") 43 | :components ((:file "manifest")) 44 | #+asdf-unicode :encoding #+asdf-unicode :utf-8) 45 | 46 | 47 | ;;;; THE END ;;;; 48 | -------------------------------------------------------------------------------- /tools/com.informatimago.tools.pathname.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: pathname.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Pathname tools. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2013-12-06 Extracted from ~/rc/common.lisp 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2013 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.tools.pathname" 36 | :description "Pathname tools." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.0" 39 | :license "GPL3" 40 | :depends-on () 41 | :components ((:file "pathname")) 42 | #+asdf-unicode :encoding #+asdf-unicode :utf-8) 43 | 44 | ;;;; THE END ;;;; 45 | -------------------------------------------------------------------------------- /tools/com.informatimago.tools.reader-macro.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.tools.reader-macroasd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Symbol tools. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2013-12-06 Extracted from ~/rc/common.lisp 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2013 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.tools.reader-macro" 36 | :description "Reader-macro tools." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.0" 39 | :license "GPL3" 40 | :depends-on () 41 | :components ((:file "reader-macro")) 42 | #+asdf-unicode :encoding #+asdf-unicode :utf-8) 43 | 44 | ;;;; THE END ;;;; 45 | -------------------------------------------------------------------------------- /tools/com.informatimago.tools.script.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.tools.script.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; System to load the script package. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-25 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2013 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.tools.script" 36 | :description "Utilities for scripts." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.1" 39 | :license "AGPL3" 40 | :depends-on ("com.informatimago.common-lisp.cesarum") 41 | :components ((:file "script" :depends-on ())) 42 | #+asdf-unicode :encoding #+asdf-unicode :utf-8 43 | #+adsf3 :in-order-to #+adsf3 ((asdf:test-op (asdf:test-op "com.informatimago.tools.script.test")))) 44 | 45 | ;;;; THE END ;;;; 46 | -------------------------------------------------------------------------------- /tools/com.informatimago.tools.symbol.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: symbol.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Symbol tools. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2013-12-06 Extracted from ~/rc/common.lisp 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2013 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.tools.symbol" 36 | :description "Symbol tools." 37 | :author "Pascal J. Bourguignon" 38 | :version "1.2.0" 39 | :license "GPL3" 40 | :depends-on ("cl-ppcre" 41 | "com.informatimago.common-lisp.cesarum") 42 | :components ((:file "symbol")) 43 | #+asdf-unicode :encoding #+asdf-unicode :utf-8) 44 | 45 | ;;;; THE END ;;;; 46 | -------------------------------------------------------------------------------- /tools/com.informatimago.tools.undefmethod.asd: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: com.informatimago.tools.undefmethod.asd 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; System to load Shinmera's undefmethod macro. 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2014-12-26 Created asd file. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; GPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2014 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | 35 | (asdf:defsystem "com.informatimago.tools.undefmethod" 36 | :description "A macro that undefines the method instead of defining it." 37 | :author "irc://Shinmera@irc.freenode.org" 38 | :version "1.2.0" 39 | :license "GPL3" 40 | :depends-on () 41 | :components ((:file "undefmethod")) 42 | #+asdf-unicode :encoding #+asdf-unicode :utf-8) 43 | 44 | ;;;; THE END ;;;; 45 | -------------------------------------------------------------------------------- /tools/dependency-cycles-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: dependency-cycles-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test dependency-cycles.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.DEPENDENCY-CYCLES.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.DEPENDENCY-CYCLES") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.DEPENDENCY-CYCLES.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/generate.lisp: -------------------------------------------------------------------------------- 1 | (eval-when (:compile-toplevel :load-toplevel :execute) 2 | (setf *readtable* (copy-readtable nil))) 3 | ;; (quick-load-all) 4 | 5 | (defun save-program (name &key init-file main) 6 | #+ccl (ccl::save-application name 7 | :toplevel-function (when main 8 | (lambda () 9 | (handler-case 10 | (funcall main (rest ccl:*command-line-argument-list*)) 11 | (error (err) 12 | (finish-output *standard-output*) 13 | (finish-output *trace-output*) 14 | (format *error-output* "~%~A~%" err) 15 | (finish-output *error-output*) 16 | (ccl:quit 1))) 17 | (finish-output *standard-output*) 18 | (finish-output *trace-output*) 19 | (finish-output *error-output*) 20 | (ccl:quit 0))) 21 | :init-file init-file 22 | :mode #o755 23 | :prepend-kernel t 24 | :error-handler t) 25 | #-(or ccl) (error "Not implemented for ~A" (lisp-implementation-type))) 26 | -------------------------------------------------------------------------------- /tools/make-depends-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: make-depends-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test make-depends.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.MAKE-DEPENDS.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.MAKE-DEPENDS") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.MAKE-DEPENDS.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/make/Makefile: -------------------------------------------------------------------------------- 1 | NAME = make-print-vars 2 | TEST_MAKEFILE ?= /build/pbourguignon/work/build.devel/.makedump 3 | 4 | all:$(NAME) 5 | $(NAME) --help \ 6 | && $(NAME) --mangle $(TEST_MAKEFILE) > m.sed \ 7 | && $(NAME) $(TEST_MAKEFILE) > $(TEST_MAKEFILE)-vars 8 | 9 | $(NAME):$(NAME).lisp 10 | ccl < generate-exe.lisp >$(NAME).log 2>$(NAME).err || ( cat $(NAME).err ; exit 200 ) 11 | 12 | clean: 13 | -rm -f *.lx64fsl 14 | -rm -f *.out *.err 15 | -rm -f system-index.txt 16 | -------------------------------------------------------------------------------- /tools/make/com.informatimago.tools.make-print-vars.asd: -------------------------------------------------------------------------------- 1 | (asdf:defsystem "make-print-vars" 2 | ;; system attributes: 3 | :description "Generate Makefile print-vars rule" 4 | :long-description " 5 | 6 | This program reads a makefile and extract all variable name from 7 | variable definitions and generates a rule to print their value. 8 | 9 | " 10 | :author "Pascal J. Bourguignon " 11 | :maintainer "Pascal J. Bourguignon " 12 | :licence "AGPL3" 13 | ;; component attributes: 14 | :version "1.0.0" 15 | :properties ((#:author-email . "pjb@informatimago.com") 16 | (#:date . "Winter 2023") 17 | ((#:albert #:output-dir) . "../documentation/make-print-vars/") 18 | ((#:albert #:formats) . ("docbook")) 19 | ((#:albert #:docbook #:template) . "book") 20 | ((#:albert #:docbook #:bgcolor) . "white") 21 | ((#:albert #:docbook #:textcolor) . "black")) 22 | :depends-on (:com.informatimago.common-lisp.cesarum 23 | :com.informatimago.common-lisp.tools.make) 24 | :components ((:file "make-print-vars" :depends-on ())) 25 | #+asdf-unicode :encoding #+asdf-unicode :utf-8) 26 | 27 | 28 | -------------------------------------------------------------------------------- /tools/make/generate-make-print-vars.lisp: -------------------------------------------------------------------------------- 1 | (in-package "COMMON-LISP-USER") 2 | 3 | ;;; -------------------------------------------------------------------- 4 | ;;; Load the generator 5 | 6 | (load (make-pathname :name "generate" :type "lisp" :version nil 7 | :defaults (or *load-pathname* #P"./"))) 8 | 9 | ;;; -------------------------------------------------------------------- 10 | ;;; generate the program 11 | ;;; 12 | 13 | (defparameter *source-directory* (make-pathname :name nil :type nil :version nil 14 | :defaults (or *load-pathname* (truename (first (directory #P"./*.lisp")))))) 15 | (defparameter *asdf-directories* (mapcar (lambda (path) (make-pathname :name nil :type nil :version nil :defaults path)) 16 | (append (directory (merge-pathnames "**/*.asd" *source-directory* nil)) 17 | (list *source-directory*)))) 18 | (defparameter *release-directory* #P"HOME:bin;" "Where the executable will be stored." ) 19 | 20 | (generate-program :program-name "make-print-vars" 21 | :main-function "COM.INFORMATIMAGO.TOOLS.MAKEFILE.PRINT-VARS:MAIN" 22 | :system-name "make-print-vars" 23 | :system-list '() 24 | :init-file nil ;; "~/.make-print-vars.lisp" 25 | :version "1.0.0" 26 | :copyright (format nil "Copyright Pascal J. Bourguignon 2023 - 2023~%License: AGPL3") 27 | :source-directory *source-directory* 28 | :asdf-directories *asdf-directories* 29 | :release-directory *release-directory*) 30 | 31 | -------------------------------------------------------------------------------- /tools/make/package.lisp: -------------------------------------------------------------------------------- 1 | (defpackage "COM.INFORMATIMAGO.TOOLS.MAKE.PARSER" 2 | (:use "COMMON-LISP") 3 | (:export "PARSE-MAKEFILE")) 4 | -------------------------------------------------------------------------------- /tools/manifest-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: manifest-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test manifest.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.MANIFEST.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.MANIFEST") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.MANIFEST.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/quicklisp-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: quicklisp-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test quicklisp.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.QUICKLISP.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.QUICKLISP") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.QUICKLISP.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/source-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: source-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test source.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.SOURCE.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.SOURCE") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.SOURCE.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/summary-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: summary-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test summary.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.SUMMARY.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.SUMMARY") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.SUMMARY.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/symbol-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: symbol-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test symbol.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.SYMBOL.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.SYMBOL") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.SYMBOL.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | -------------------------------------------------------------------------------- /tools/thread-test.lisp: -------------------------------------------------------------------------------- 1 | ;;;; -*- mode:lisp;coding:utf-8 -*- 2 | ;;;;************************************************************************** 3 | ;;;;FILE: thread-test.lisp 4 | ;;;;LANGUAGE: Common-Lisp 5 | ;;;;SYSTEM: Common-Lisp 6 | ;;;;USER-INTERFACE: NONE 7 | ;;;;DESCRIPTION 8 | ;;;; 9 | ;;;; Test thread.lisp 10 | ;;;; 11 | ;;;;AUTHORS 12 | ;;;; Pascal J. Bourguignon 13 | ;;;;MODIFICATIONS 14 | ;;;; 2015-02-23 Created. 15 | ;;;;BUGS 16 | ;;;;LEGAL 17 | ;;;; AGPL3 18 | ;;;; 19 | ;;;; Copyright Pascal J. Bourguignon 2015 - 2016 20 | ;;;; 21 | ;;;; This program is free software: you can redistribute it and/or modify 22 | ;;;; it under the terms of the GNU Affero General Public License as published by 23 | ;;;; the Free Software Foundation, either version 3 of the License, or 24 | ;;;; (at your option) any later version. 25 | ;;;; 26 | ;;;; This program is distributed in the hope that it will be useful, 27 | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | ;;;; GNU Affero General Public License for more details. 30 | ;;;; 31 | ;;;; You should have received a copy of the GNU Affero General Public License 32 | ;;;; along with this program. If not, see . 33 | ;;;;************************************************************************** 34 | (eval-when (:compile-toplevel :load-toplevel :execute) 35 | (setf *readtable* (copy-readtable nil))) 36 | (defpackage "COM.INFORMATIMAGO.TOOLS.THREAD.TEST" 37 | (:use "COMMON-LISP" 38 | "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.SIMPLE-TEST" 39 | "COM.INFORMATIMAGO.TOOLS.KILL-THREAD") 40 | (:export "TEST/ALL")) 41 | (in-package "COM.INFORMATIMAGO.TOOLS.THREAD.TEST") 42 | 43 | (define-test test/all () 44 | :success) 45 | 46 | ;;;; THE END ;;;; 47 | --------------------------------------------------------------------------------