;;;--- Following https://www.quicklisp.org/beta/ and ;;; https://common-lisp.net/project/linedit/ (via Quicklisp) $ curl -O https://beta.quicklisp.org/quicklisp.lisp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 57144 100 57144 0 0 39890 0 0:00:01 0:00:01 --:--:-- 209k $ curl -O https://beta.quicklisp.org/quicklisp.lisp.asc % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 882 100 882 0 0 4236 0 --:--:-- --:--:-- --:--:-- 4323 $ gpg --verify quicklisp.lisp.asc quicklisp.lisp gpg: Signature made Wed Jan 28 16:13:26 2015 EST using RSA key ID 028B5FF7 gpg: Can't check signature: public key not found // // Oops, missing the public key for this signature. Getting it, as the website // described. Installing without checking is possible, but I prefer not to, // being a security person :) $ wget https://beta.quicklisp.org/release-key.txt --2016-04-07 11:11:18-- https://beta.quicklisp.org/release-key.txt Resolving beta.quicklisp.org (beta.quicklisp.org)... 54.230.36.220, 54.230.36.223, 54.230.36.58, ... Connecting to beta.quicklisp.org (beta.quicklisp.org)|54.230.36.220|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 6270 (6.1K) [text/plain] Saving to: ‘release-key.txt’ release-key.txt 100%[====================================================>] 6.12K --.-KB/s in 0s 2016-04-07 11:11:18 (142 MB/s) - ‘release-key.txt’ saved [6270/6270] $ gpg --import release-key.txt gpg: key 028B5FF7: public key "Quicklisp Release Signing Key " imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u $ gpg2 --verify quicklisp.lisp.asc quicklisp.lisp gpg: Signature made Wed Jan 28 16:13:26 2015 EST using RSA key ID 028B5FF7 gpg: Good signature from "Quicklisp Release Signing Key " [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: D7A3 489D DEFE 32B7 D0E7 CC61 3079 65AB 028B 5FF7 $ sbcl --load quicklisp.lisp This is SBCL 1.3.3, an implementation of ANSI Common Lisp. More information about SBCL is available at . SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. ==== quicklisp quickstart 2015-01-28 loaded ==== To continue with installation, evaluate: (quicklisp-quickstart:install) For installation options, evaluate: (quicklisp-quickstart:help) * (quicklisp-quickstart:install) ; Fetching # ; 0.82KB ================================================== 838 bytes in 0.00 seconds (818.36KB/sec) ; Fetching # ; 240.00KB ================================================== 245,760 bytes in 0.18 seconds (1318.68KB/sec) ; Fetching # ; 4.94KB ================================================== 5,054 bytes in 0.00 seconds (4935.55KB/sec) ; Fetching # ; 194.07KB ================================================== 198,729 bytes in 0.17 seconds (1128.32KB/sec) ; Fetching # ; 0.40KB ================================================== 408 bytes in 0.00 seconds (132.81KB/sec) Installing dist "quicklisp" version "2016-03-18". ; Fetching # ; 332.00KB ================================================== 339,965 bytes in 0.30 seconds (1110.36KB/sec) ; Fetching # ; 255.88KB ================================================== 262,023 bytes in 0.18 seconds (1398.26KB/sec) ==== quicklisp installed ==== To load a system, use: (ql:quickload "system-name") To find systems, use: (ql:system-apropos "term") To load Quicklisp every time you start Lisp, use: (ql:add-to-init-file) For more information, see http://www.quicklisp.org/beta/ * (ql:add-to-init-file) I will append the following lines to #P"/Users/user/.sbclrc": ;;; The following lines added by ql:add-to-init-file: #-quicklisp (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) (when (probe-file quicklisp-init) (load quicklisp-init))) Press Enter to continue. #P"/Users/user/.sbclrc" ;;;--- Now I want an environment that gives me nice line editing & tab completion ;;; It's called linedit * (ql:system-apropos "linedit") # * (ql:quickload "linedit") To load "linedit": Load 2 ASDF systems: asdf uiop Install 9 Quicklisp releases: alexandria babel cffi linedit madeira-port osicat terminfo trivial-features uffi ; Fetching # ; 175.69KB ================================================== 179,908 bytes in 0.45 seconds (386.99KB/sec) ; Fetching # ; 12.29KB ================================================== 12,587 bytes in 0.00 seconds (12291.99KB/sec) ; Fetching # ; 10.26KB ================================================== 10,510 bytes in 0.00 seconds (10263.67KB/sec) ; Fetching # ; 248.03KB ================================================== 253,987 bytes in 0.53 seconds (469.76KB/sec) ; Fetching # ; 234.48KB ================================================== 240,107 bytes in 0.51 seconds (461.57KB/sec) ; Fetching # ; 52.89KB ================================================== 54,158 bytes in 0.05 seconds (1037.03KB/sec) ; Fetching # ; 4.73KB ================================================== 4,844 bytes in 0.00 seconds (0.00KB/sec) ; Fetching # ; 48.78KB ================================================== 49,955 bytes in 0.04 seconds (1108.73KB/sec) ; Fetching # ; 33.88KB ================================================== 34,690 bytes in 0.03 seconds (1209.89KB/sec) ; Loading "linedit" [package madeira-port]............................ [package alexandria.0.dev]........................ .................................................. [package babel-encodings]......................... [package babel]................................... .................................................. [package cffi-sys]................................ [package cffi].................................... .................................................. [package cffi-features]........................... [package uffi].................................... [package osicat-sys].............................. [package osicat-posix]; cc -m64 -I /opt/local/include/ -o /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/basic-unixint__grovel-tmpGHU3ALSV -I/Users/user/quicklisp/dists/quicklisp/software/cffi_0.17.1/ /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/basic-unixint__grovel.c ; /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/basic-unixint__grovel /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/basic-unixint__grovel.grovel-tmp.lisp ..; cc -m64 -I /opt/local/include/ -o /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/unixint__grovel-tmpAAURSO1 -I/Users/user/quicklisp/dists/quicklisp/software/cffi_0.17.1/ /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/unixint__grovel.c /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/unixint__grovel.c:857:6: warning: ordered comparison between pointer and integer ('void *' and 'long long') if(_64_BIT_VALUE_FITS_SIGNED_P(MAP_FAILED)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/user/quicklisp/dists/quicklisp/software/cffi_0.17.1/grovel/common.h:18:54: note: expanded from macro '_64_BIT_VALUE_FITS_SIGNED_P' #define _64_BIT_VALUE_FITS_SIGNED_P(value) ( (value) <= 0x7FFFFFFFFFFFFFFFLL ) ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ 1 warning generated. ; /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/unixint__grovel /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/unixint__grovel.grovel-tmp.lisp ..............; cc -m64 -I /opt/local/include/ -o /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/wrappers__wrapper-tmp5GEXGEG5.o -c -fPIC -I/Users/user/quicklisp/dists/quicklisp/software/cffi_0.17.1/ /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/wrappers__wrapper.c ; cc -m64 -I /opt/local/include/ -o /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/libosicat-tmpAR3FSGEY.dylib -dynamiclib /Users/user/.cache/common-lisp/sbcl-1.3.3-macosx-x64/Users/user/quicklisp/dists/quicklisp/software/osicat-20160318-git/posix/wrappers__wrapper.o ............ .................................................. [package osicat-mach]............................. [package osicat].................................. [package linedit]..................... ("linedit") * (quit) ;;;--- Now putting LinEdit in the startup configuration file for SBCL. Adding the following: ----------------------[ begin ~/.sbclrc quote ]---------------------- ;;; Check for --no-linedit command-line option. (if (member "--no-linedit" sb-ext:*posix-argv* :test 'equal) (setf sb-ext:*posix-argv* (remove "--no-linedit" sb-ext:*posix-argv* :test 'equal)) (when (interactive-stream-p *terminal-io*) (require :sb-aclrepl) (require :linedit) (funcall (intern "INSTALL-REPL" :linedit) :wrap-current t :eof-quits t ))) ----------------------[ end ~/.sbclrc quote ]---------------------- $ vim ~/.sbclrc ;;;--- Now I want to get an HTML parser. In SBCL, looking for it: * (ql:system-apropos "html") # # # # # ; <-- I want this one. # # # # # # # # # # # # # # # # # # # # # # # # # # # ;;;--- Loading it. Next time, it won't require fetching, as it will ;;; load from the downloaded version in ~/quicklisp/ * (ql:quickload "cl-html-parse") To load "cl-html-parse": Install 1 Quicklisp release: cl-html-parse ; Fetching # ; 22.84KB ================================================== 23,389 bytes in 0.01 seconds (1522.72KB/sec) ; Loading "cl-html-parse" [package if-star-for-cl-html-parse]............... [package net.html.parser]........... ("cl-html-parse") * (quit) ;;;--- Finding and loading LTK the windowing GUI kit, http://www.peter-herth.de/ltk/ ;;; Read the docs http://www.peter-herth.de/ltk/ltkdoc.pdf and try the test. ;;; You will need "port install tk" first, to install the Tk library. :~ user$ sbcl This is SBCL 1.3.3, an implementation of ANSI Common Lisp. More information about SBCL is available at . SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. WARNING: No definition for CFLAG-VSWTC WARNING: No definition for TTY-IUCLC WARNING: No definition for TTY-OLCUC Linedit version 0.17.5, smart mode, ESC-h for help. CL-USER(1): (ql:quickload "ltk") To load "ltk": Load 1 ASDF system: ltk ; Loading "ltk" ("ltk") ;;;--- Here's me running the test and clicking on various buttons CL-USER(2): (ltk:ltktest) Prepare stirred eggs. Prepare cooked eggs. Prepare fried eggs. Hallo Welt Evaluation took: 27.226 seconds of real time 0.754619 seconds of total run time (0.690331 user, 0.064288 system) [ Run times consist of 0.006 seconds GC time, and 0.749 seconds non-GC time. ] 2.77% CPU 81,673,193,204 processor cycles 84,491,568 bytes consed content of entry: Hallo Prepare stirred eggs. 0 CL-USER(3): ;;;------------------------------------------------------------------------------- Actually, there was something about Linedit that I hated: it would print a Unicode "bell" emoji instead of beeping the shell's bell (which I also hate and disable). So I went into the code and patched it, commenting out the stupid beeping. $ diff -u quicklisp/dists/quicklisp/software/linedit-20150709-git/terminal.lisp~ quicklisp/dists/quicklisp/software/linedit-20150709-git/terminal.lisp --- quicklisp/dists/quicklisp/software/linedit-20150709-git/terminal.lisp~ 2016-04-08 20:43:04.000000000 -0400 +++ quicklisp/dists/quicklisp/software/linedit-20150709-git/terminal.lisp 2016-04-07 12:36:26.000000000 -0400 @@ -96,8 +96,10 @@ (defmethod beep ((b terminal)) (declare (ignore b)) - (and (write-char #\Bell *error-output*) - (force-output *error-output*))) +) +;;;SB: This prints an emoji bell, very annoying +;;; (and (write-char *error-output*) +;;; (force-output *error-output*))) (defmethod page ((backend terminal)) (write-string "--more--") Now the SBCL command line has excellent tab completion, and is silent, as shells should be.