From 934ce0e0cbb01b60dcbae8f256ddd7f4fac843c0 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Sun, 19 Mar 2023 20:41:33 +0100 Subject: [PATCH] Install more `sly' and `sbcl' packages including `sbcli' --- README.org | 48 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/README.org b/README.org index 47c8c3c..75031b7 100644 --- a/README.org +++ b/README.org @@ -4094,7 +4094,7 @@ Listing [[lst:sbcl-core-for-sly]] tangles to a script to dump such a [[http://ww #+caption: Configure =sly=. #+name: lst:configure-sly #+begin_src emacs-lisp -n :results silent -(when (ensure-package-installation 'sly) +(when (ensure-package-installation 'sly 'sly-named-readtables) (with-eval-after-load 'sly ;; Set `sly-default-lisp' instead of `inferior-lisp-program', ;; because `sly' uses `inferior-lisp-program' only as a backwards @@ -4504,18 +4504,31 @@ git clone git@github.com:ageldama/cl-state-machine.git #+caption: Register and load local =quicklisp= projects with dependencies. #+name: lst:register-load-local-projects #+begin_src lisp -n :eval never-export :results none :tangle no +;; SBCL on Darwin fails to run cl-cffi-gtk: +;; https://lisp-journey.gitlab.io/blog/gui-programming-in-common-lisp-part-3-of-5-gtk3/ +;; https://www.crategus.com/books/cl-cffi-gtk/ +;; https://www.crategus.com/books/cl-gtk/gtk-tutorial.html (ql:register-local-projects) (ql:quickload "cs325") -(ql:quickload "cl-state-machine") -(ql:quickload "cl-state-machine-examples") -(ql:quickload "cl-state-machine-graphing") -(ql:quickload "cl-state-machine-test") +(ql:quickload "named-readtables") +(ql:quickload "nodgui") ;; requires https://www.tcl.tk/software/tklib/ +(ql:quickload "rutils") +(ql:quickload "rutilsx") +(ql:quickload "try") ;; "try" is a "named-readtables/test" requirement. +(ql:quickload "ucons") +(when (some #'identity (mapcar (lambda (x) + (let ((*default-pathname-defaults* x)) + (probe-file "cl-state-machine"))) + ql:*local-project-directories*)) + (ql:quickload "cl-state-machine") + (ql:quickload "cl-state-machine-examples") + (ql:quickload "cl-state-machine-graphing") + (ql:quickload "cl-state-machine-test")) #+end_src -#+caption[A =quicklisp= sbclrc file]: #+caption: A =quicklisp= sbclrc file. #+name: lst:quicklisp-sbclrc-file -#+begin_src lisp -n :eval never-export :tangle ~/.sbclrc +#+begin_src lisp -n :eval never :tangle ~/.sbclrc ;;; Hey Emacs, this is my -*- lisp -*- .sbclrc file. ;;; The following lines added by ql:add-to-init-file: @@ -4532,6 +4545,27 @@ git clone git@github.com:ageldama/cl-state-machine.git ;; (setq *package* (find-package :cs325-user))) #+end_src +#+caption[Install =sbcli=]: +#+caption: Install =sbcli=. +#+name: lst:install-sbcli +#+begin_src emacs-lisp -n :eval never-export :lexical t :tangle no +(let ((url "https://raw.githubusercontent.com/hellerve/sbcli/master/repl.lisp") + (file "~/bin/sbcli")) + (url-copy-file url file 'ok-if-already-exists) + (set-file-modes file #o700)) +#+end_src + +#+caption[Tangle a =sbcli= resource file]: +#+caption: Tangle a =sbcli= resource file. +#+name: lst:write-sbslirc +#+begin_src lisp -n :eval never :tangle ~/.sbclirc +(setf *repl-name* "Gerard's custom REPL for SBCLI") +;; The style option fails: +;; (setf *pygmentize* (merge-pathnames ".pyenv/shims/pygmentize" +;; (user-homedir-pathname))) +;; (defvar *pygmentize-options* (list "-s" "-l" "lisp" "-O" "style=zenburn")) +#+end_src + ** [[info:eintr#Top][Emacs Lisp Programming (info)]] :PROPERTIES: :CUSTOM_ID: sec:emacs-lisp-programming