├── .github └── workflows │ └── publish.yml ├── .gitignore ├── CONTRIBUTING.org ├── README.org ├── chicken ├── README.org └── init.el ├── clojure ├── README.org └── init.el ├── common-lisp ├── README.org ├── flake.lock ├── flake.nix ├── init.el └── manifest.scm ├── gambit ├── README.org └── init.el ├── guile ├── README.org └── init.el ├── janet ├── README.org ├── flake.lock ├── flake.nix ├── init.el └── manifest.scm ├── publish.el └── scheme └── README.org /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish to GitHub Pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | publish: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Check out 13 | uses: actions/checkout@v1 14 | 15 | - name: Install Emacs 16 | uses: purcell/setup-emacs@master 17 | with: 18 | version: 29.3 19 | 20 | - name: Build the site 21 | run: | 22 | echo "Building the website" 23 | pwd 24 | emacs -q --script ./publish.el 25 | 26 | - name: Publish generated content to GitHub Pages 27 | uses: JamesIves/github-pages-deploy-action@v4 28 | with: 29 | branch: gh-pages 30 | folder: public 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .packages 2 | public -------------------------------------------------------------------------------- /CONTRIBUTING.org: -------------------------------------------------------------------------------- 1 | #+title: Contributing Guidelines 2 | #+date: [2024-08-20 Tue] 3 | 4 | * How can I contribute? 5 | The goal of this project is to enrich the Lisp ecosystem with more resources to help people getting started in the Lisp family of languages. 6 | There are a lot of ways you can contribute to this project. We welcome contributions from all levels and of all kinds. 7 | 8 | ** Provide Feedback and Suggestions 9 | - *Constructive Feedback*: 10 | You can provide constructive feedback on how to make this content more approachable, beginner-friendly and comprehensive. 11 | 12 | 13 | - *Report Issues*: 14 | If you find broken links or outdated information, please create and issue so we can fix it. 15 | 16 | 17 | - *Start Discussions*: 18 | Use the issue tracker to discuss topics, suggest new resources, or propose changes. 19 | 20 | ** Share Resources 21 | - *Resource Sharing*: 22 | If you know of valuable resources related to any Lisp dialect or general programming concepts, please share them. Resources can include websites, articles, books, or videos. 23 | 24 | 25 | - *Submit Resources*: 26 | Create an issue or pull request with your recommended resources, ensuring they fit well within the existing structure. 27 | 28 | ** Write or Modify content 29 | - *Create New Content*: 30 | If you’re knowledgeable about a specific Lisp dialect(s) or programming concept, consider writing new content. 31 | 32 | 33 | - *Improve Existing Content*: 34 | If you spot content that could be clearer or more informative, feel free to edit it. We encourage you to create a Pull Request with your changes. 35 | 36 | 37 | - *Writing Format*: 38 | We use [[https://orgmode.org/][Org Mode]] as a writing format for this project that is then generated into a static website. You can generate the website locally using Emacs (> 29.3) by running the following command in the project root directory. 39 | 40 | #+begin_src shell 41 | emacs -q --script publish.el 42 | #+end_src 43 | 44 | This will create folder named =public= that you can then serve to check how the website will be rendered. 45 | 46 | ** Spread the word 47 | Share the link to this project with more people to help them know about Lisp(s) and how to getting started. Also, you can share it with other Lispers who already know a Lisp or two and are interested in trying others. 48 | 49 | 50 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+title: The Lisp Spectrum 2 | #+author: Omar Bassam 3 | #+date: [2024-08-07 Wed] 4 | #+startup: nonum 5 | 6 | This project aims to explore the extensive spectrum of the Lisp family of languages. Lisp is renowned for its high flexibility and great control, offering programmers a powerful toolset. However, the abundance of available options can be overwhelming, leading to choice fatigue. Therefore, this project seeks to compile essential information about the major Lisp dialects, detailing their unique features, tools, and learning resources. The project tries to provide beginner friendly guide for Lisp in general and for each dialect as well. It should be understandable and useful to the reader whether they are new to programming, with or without experience in a lisp dialect. 7 | 8 | The Lisps we will be exploring: 9 | - [[file:common-lisp/][Common Lisp]] 10 | - uLisp 11 | - Emacs Lisp 12 | - [[file:scheme/][Scheme]] 13 | - Chez Scheme 14 | - Racket 15 | - Chibi Scheme 16 | - [[file:chicken//][Chicken Scheme]] 17 | - [[file:gambit/][Gambit Scheme]] 18 | - Gerbil Scheme 19 | - [[file:guile/][Guile Scheme]] 20 | - LIPS 21 | - [[file:clojure/][Clojure]] 22 | - ClojureScript 23 | - Fennel 24 | - [[file:janet/][Janet]] 25 | - Jank 26 | 27 | * Why Lisps 28 | ** Syntax 29 | Lisp has a simple syntax that can be learned in a day. All code is written as expressions, known as S-Expressions, which are lists with prefix notation. The first element is the operator, and the rest are arguments. 30 | 31 | #+begin_src lisp 32 | (+ 1 2 3 4) 33 | (list 1 2 (list 3 4)) 34 | (defun foo (a b c d) (+ a b c d)) 35 | #+end_src 36 | 37 | ** REPL 38 | The REPL is a major selling point for Lisp, allowing for interactive, incremental program development. This feature has influenced many modern languages to offer similar interactive experiences. 39 | ** Code as data 40 | Lisp code has the same structure as lists, enabling the creation of macros with list-processing functions. This facilitates the development of Domain-Specific Languages (DSLs). 41 | * Lisp Resources 42 | - [[http://www-formal.stanford.edu/jmc/recursive.pdf][John McCarthy Original Paper on LISP: Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I]] 43 | - [[https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf][Lisp 1.5 Manual]] 44 | - [[https://web.mit.edu/6.001/6.037/sicp.pdf][Book: Structure and Interpretation of Computer Programs]] 45 | 46 | * Editor Configuration 47 | ** Emacs 48 | Emacs is the de facto standard for working with Lisps. This is due to the fact that it partly written and configurable with Emacs Lisp, another lisp dialect similar to Common Lisp. For every lisp you'll find an =init.el= file that you can use as an example for a quick setup to work with each lisp in Emacs out of the box. However there are some common packages that are worth mentioning here that will make your life much easier when working with lisps in Emacs: 49 | *** Structural Editing 50 | **** Paredit 51 | - [[http://danmidwood.com/content/2014/11/21/animated-paredit.html][The Animated Guide to Paredit]] 52 | **** Parinfer 53 | - [[https://shaunlebron.github.io/parinfer/][Official Website]] 54 | *** UI Enhancements 55 | **** Rainbow Delimiters 56 | A UI Enhancement to auto color pairs of parenthesis 57 | 58 | * Comparison Criteria 59 | ** Installation and Setup 60 | We explore the different ways of installing every lisp such as: 61 | - The availability of official packages in different package managers. 62 | - Install from a script. 63 | - Installing from source code. 64 | 65 | We will also look into the first time setup for every lisp. 66 | 67 | ** Resources 68 | The availability of learning resources is crucial for any programming language. We will try to gather the most helpful resources for every lisp including: 69 | - Documentation 70 | - Books 71 | - Videos 72 | - Tutorials 73 | - Community channels 74 | 75 | ** REPL 76 | Ease and speed of interacting with the REPL, including the possibility of connecting to a remote REPL. 77 | 78 | ** Editor Integration 79 | While Emacs is the de facto standard for working with Lisps, some have their own IDEs (e.g., Dr. Racket for Racket) or support through plugins in other editors. We will explore available editor options for each Lisp. 80 | 81 | ** Package and Project management 82 | - Tools for managing packages and projects. 83 | - Ease of installing/uninstalling packages. 84 | - Possibility of installing a specific version for a package. 85 | - Package installation scopes (global, project-level, or both). 86 | 87 | ** Standard Library and Ecosystem 88 | We will discuss the built-in libraries for each Lisp and their usability. Additionally, we will explore the ecosystem for each Lisp, including where to find and download packages. 89 | 90 | ** Performance 91 | This is very subjective as every lisp compiles to a different target(s). So, it's hard to decide whether the comparison of performance is between the lisp implementations or the target platforms. 92 | 93 | ** Interoperability with target platform(s) 94 | Most lisps offer a way of interoperability with their target platform(s) or with other platforms as well. This can differ from one lisp to another, so this won't be a comparison but rather exploring the different options. 95 | 96 | * Contributing 97 | If you would like to contribute to this project please check the [[file:CONTRIBUTING.org][Contribution guidelines]] for more information. 98 | 99 | -------------------------------------------------------------------------------- /chicken/README.org: -------------------------------------------------------------------------------- 1 | #+title: Chicken 2 | #+author: Omar Bassam 3 | #+date: [2024-08-08 Wed] 4 | #+startup: nonum 5 | 6 | Chicken is a Scheme Dialect that produces portable and efficient C and supports the R5RS and R7RS standards. 7 | 8 | * Resources 9 | ** Documentation 10 | - [[https://call-cc.org/][Official website]] 11 | - [[http://wiki.call-cc.org/man/5/The%20User%27s%20Manual][Chicken User Manual]] 12 | ** Books 13 | ** Videos 14 | ** Community 15 | 16 | * Installation 17 | 18 | ** Debian/Ubuntu 19 | #+begin_src shell 20 | apt install chicken-bin 21 | #+end_src 22 | ** Arch 23 | #+begin_src shell 24 | pacman -S chicken 25 | #+end_src 26 | ** Nix 27 | #+begin_src shell 28 | nix shell nixpkgs#chicken 29 | #+end_src 30 | 31 | ** Guix 32 | #+begin_src shell 33 | guix shell -p chicken 34 | #+end_src 35 | 36 | * REPL 37 | - [[https://www.youtube.com/watch?v=eXB3I3S3vJc&t=222s][video: Practical Chicken Scheme with Emacs: hello-world webserver]] 38 | 39 | You can enter the chicken REPL using the =csi= command. When you enter the REPL, you can enter the =,?= command to learn about the available commands. This will display a list of special commands that you can use to debug your code. 40 | 41 | * Running scripts 42 | You can use the =csi= command to run scripts by adding the =-ss= flag followed by the =.scm= file then optionally followed by the arguments that you would like to pass to this script. 43 | 44 | #+begin_src shell 45 | csi -ss scripfile.scm 46 | #+end_src 47 | * Compiling 48 | You can use the =csc= command to compile your code to an executable: 49 | 50 | #+begin_src shell 51 | csc csc -o outputname inputfile.scm 52 | # then you can run the executable 53 | ./outputname 54 | #+end_src 55 | 56 | Or you can compile to a shared library file that you can use within other programs: 57 | 58 | #+begin_src shell 59 | csc -shared file.scm 60 | #+end_src 61 | 62 | * Editor Configuration 63 | 64 | ** Emacs 65 | - [[https://wiki.call-cc.org/emacs][Using Chicken with Emacs]] 66 | 67 | Chicken support requires some additional steps: 68 | 69 | 1. Install the necessary support eggs. 70 | 71 | #+begin_src shell 72 | chicken-install -s apropos chicken-doc 73 | #+end_src 74 | 75 | For Chicken 5, you’ll also need SRFI-18. 76 | 77 | #+begin_src shell 78 | chicken-install -s srfi-18 79 | #+end_src 80 | 2. Update the Chicken documentation database. 81 | 82 | #+begin_src shell 83 | cd `csi -p '(chicken-home)'` 84 | curl http://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx 85 | #+end_src 86 | 87 | With Chicken 5, this process has changed slightly: 88 | 89 | #+begin_src shell 90 | cd `csi -e '(import (chicken platform)) (display (chicken-home))(newline)'` 91 | curl https://3e8.org/pub/chicken-doc/chicken-doc-repo-5.tgz | sudo tar zx 92 | #+end_src 93 | 94 | You can use the provided =init.el= by running the command ~emacs -Q -l init.el~ to run emacs with the minimal configuration to get you started. 95 | 96 | *** Geiser 97 | - [[https://gitlab.com/emacs-geiser/chicken][geiser-chicken]] 98 | 99 | #+begin_src elisp 100 | (use-package geiser-chicken 101 | :ensure t) 102 | #+end_src 103 | 104 | * Dependencies Management 105 | Chicken can be extended by additional libraries called "eggs" that can be easily installed by the command =chicken-install=. 106 | 107 | - [[http://wiki.call-cc.org/chicken-projects/egg-index-5.html][List of Available eggs]] 108 | 109 | #+begin_src shell 110 | chicken-install EXTENSIONNAME 111 | #+end_src 112 | 113 | The default location where eggs are installed is usually =/usr/local/lib/chicken/=. You can change the location where you want eggs to be isntalled by running setting the environment variable =CHICKEN_REPOSITORY=: 114 | 115 | #+begin_src shell 116 | export CHICKEN_REPOSITORY=~/myeggs/lib/chicken/ 117 | #+end_src 118 | 119 | or if you want to install eggs somewhere other than the default or your environment variable, you can use 120 | 121 | #+begin_src shell 122 | chicken-install -p ~/myeggs 123 | #+end_src 124 | 125 | - [[http://wiki.call-cc.org/man/4/Extensions#changing-repository-location][Changing repository location]] 126 | 127 | * Project Management 128 | * Ecosystem 129 | -------------------------------------------------------------------------------- /chicken/init.el: -------------------------------------------------------------------------------- 1 | ;; The Lisp Spectrum Project 2 | 3 | ;; This is a minimal Emacs configuration to get you started with chicken 4 | ;; You can use this configuration as an example for your own configuration or 5 | ;; you can use this configuration directly by running "emacs -Q -l init.el". 6 | 7 | (package-initialize) 8 | 9 | (load-theme 'modus-vivendi t) 10 | (tool-bar-mode -1) 11 | 12 | (use-package geiser-chicken 13 | :ensure t) 14 | 15 | ;; Paredit for structural editing 16 | (use-package paredit 17 | :ensure t 18 | :hook ((scheme-mode 19 | geiser-repl-mode) 20 | . paredit-mode) 21 | :bind 22 | (:map paredit-mode-map 23 | ;; allow using of "RET" normally in geiser 24 | ("RET" . nil))) 25 | 26 | (use-package rainbow-delimiters 27 | :ensure t 28 | :hook ((prog-mode 29 | geiser-repl-mode) 30 | . rainbow-delimiters-mode)) 31 | 32 | -------------------------------------------------------------------------------- /clojure/README.org: -------------------------------------------------------------------------------- 1 | #+title: Clojure 2 | #+author: Omar Bassam 3 | #+date: [2024-08-08 Wed] 4 | #+startup: nonum 5 | 6 | * Resources 7 | ** Documentation 8 | - [[https://clojure.org/][clojure.org]] 9 | ** Books 10 | - [[https://www.braveclojure.com/ ][Clojure for the brave and true]] 11 | ** Videos 12 | - [[https://www.youtube.com/watch?v=SxdOUGdseq4]["Simple Made Easy" - Rich Hickey (2011)]] 13 | ** Community 14 | - [[http://clojurians.net/][Clojurians Slack channel]] 15 | - [[https://www.reddit.com/r/Clojure/][Clojure Subreddit]] 16 | * Installation 17 | 18 | * Editor Configuration 19 | ** Emacs 20 | The standard way to interact with the REPL in clojure is cider. To start a cider REPL, just run the command =cider-jack-in-clj= in Emacs. 21 | 22 | *** Cider 23 | - [[https://cider.mx/][Official website]] 24 | *** clj-refactor 25 | - [[https://github.com/clojure-emacs/clj-refactor.el][github repo]] 26 | 27 | Offers powerful refactoring functionalitie for clojure code. 28 | 29 | * Dependencies and Project Management 30 | ** built-in deps.edn 31 | ** Leiningin 32 | * Ecosystem 33 | * Notable Projects 34 | 35 | -------------------------------------------------------------------------------- /clojure/init.el: -------------------------------------------------------------------------------- 1 | ;; The Lisp Spectrum Project 2 | 3 | ;; This is a minimal Emacs configuration to get you started with common lisp 4 | ;; You can use this configuration as an example for your own configuration or 5 | ;; you can use this configuration directly by running "emacs -Q -l init.el". 6 | 7 | (package-initialize) 8 | 9 | (load-theme 'modus-vivendi t) 10 | (tool-bar-mode -1) 11 | 12 | ;; clojure-mode a major mode for .clj(s) files 13 | (use-package clojure-mode 14 | :ensure t) 15 | 16 | ;; REPL interaction for clojure 17 | (use-package cider 18 | :ensure t) 19 | 20 | ;; powerful refactoring functionality 21 | (use-package clj-refactor 22 | :ensure t) 23 | 24 | ;; Paredit for structural editing 25 | (use-package paredit 26 | :ensure t 27 | :hook ((clojure-mode 28 | cider-repl-mode) 29 | . paredit-mode)) 30 | 31 | (use-package rainbow-delimiters 32 | :ensure t 33 | :hook ((prog-mode 34 | cider-repl-mode) 35 | . rainbow-delimiters-mode)) 36 | 37 | -------------------------------------------------------------------------------- /common-lisp/README.org: -------------------------------------------------------------------------------- 1 | #+title: Common Lisp 2 | #+author: Omar Bassam 3 | #+date: [2024-08-08 Wed] 4 | #+startup: nonum 5 | 6 | Common Lisp is the modern, multi-paradigm, high-performance, compiled, ANSI-standardized, most prominent (along with Scheme) descendant of the long-running family of Lisp programming languages. 7 | 8 | * Resources 9 | ** Documentation 10 | - [[https://www.lispworks.com/documentation/HyperSpec/Front/Contents.htm][LispWorks HyperSpec]] 11 | - [[https://cl-community-spec.github.io/pages/index.html][Common Lisp Community Spec]] 12 | - [[http://novaspec.org/cl/][Nova Spec]] 13 | - [[https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node1.html][Common Lisp the Language 2nd edition]] 14 | - [[https://lispcookbook.github.io/cl-cookbook/][The Common Lisp Cook Book]] 15 | 16 | ** Books 17 | - [[https://gigamonkeys.com/book/][Practical Common Lisp]] 18 | - [[http://www.paulgraham.com/acl.html][ANSI Common Lisp Paul Graham]] 19 | - [[https://leanpub.com/lovinglisp/read#leanpub-auto-cover-material-copyright-and-license][Loving Common Lisp, or the Savvy Programmer's Secret Weapon]] 20 | 21 | ** Videos 22 | - [[https://www.youtube.com/watch?v=4NO83wZVT0A&t=1789s][Practical Common Lisp]] 23 | - [[https://www.youtube.com/watch?v=IrmHp1rRQ68][Common Lisp Object Standard]] 24 | - [[https://www.youtube.com/watch?v=cKK-Y1-jAHM&t=10046s][freecodecamp: Lisp in Four Hours for Beginners]] 25 | 26 | ** Community 27 | - [[https://www.reddit.com/r/Common_Lisp/][Common Lisp Subreddit]] 28 | 29 | ** Other 30 | - [[https://wiki.archlinux.org/title/Common_Lisp][archwiki: Common Lisp]] 31 | 32 | * Implementations 33 | Common lisp is just a standard, you will need to choose the implementation(s) according to your needs. Below is a simple table that gives you a brief idea of the implementations available. 34 | 35 | | Implementation | Installation | Target(s) | License | 36 | |----------------+-----------------------+---------------+---------------| 37 | | SBCL | apt,pacman ,nix, guix | Machine Code | Public Domain | 38 | | ABCL | apt,pacman ,nix, guix | JVM byte code | GNU GPL3 | 39 | | Clozure (CCL) | | native code | LLGPL | 40 | | ECL | apt, nix, guix | C | GNU LGPL2.1 | 41 | | CLASP | | LLVM | LGPL2.1 | 42 | | LispWorks | | | Proprietary | 43 | | Allegro | | | Proprietary | 44 | | CLISP | | | | 45 | | SICL | | | | 46 | 47 | ** Steel Bank Common Lisp (SBCL) 48 | The most popular FOSS implementation with the highest comptability. 49 | 50 | - [[https://www.sbcl.org/][Official website]] 51 | - [[https://www.sbcl.org/manual/][SBCL User Manual]] 52 | 53 | ** Armed Bear Common Lisp (ABCL) 54 | - [[https://armedbear.common-lisp.dev][Official website]] 55 | ** Clozure CL (CCL) 56 | - [[https://ccl.clozure.com/][Official website]] 57 | ** ECL 58 | - [[https://ecl.common-lisp.dev/main.html][Official Website]] 59 | ** Clasp 60 | - [[https://clasp-developers.github.io/][Official website]] 61 | * Installation 62 | *** Roswell 63 | Roswell allows you to install multiple implementations and change smoothly between them. 64 | It also already includes quicklisp for you so you don't have to manually install it (there's an option to disable quicklisp if you want). 65 | 66 | - [[https://github.com/roswell/roswell/wiki/Roswell-as-an-implementation-manager][Roswell as an implementation manager]] 67 | 68 | **** Install Roswell 69 | Roswell is available in many package managers on many Linux Distributions. 70 | ***** Ubuntu/Debian 71 | You will need to install roswell manually: 72 | #+begin_src shell 73 | curl -L https://github.com/roswell/roswell/releases/download/v23.10.14.114/roswell_23.10.14.114-1_amd64.deb --output roswell.deb 74 | 75 | sudo dpkg -i roswell.deb 76 | #+end_src 77 | ***** Arch 78 | #+begin_src shell 79 | pacman -Syu roswell 80 | #+end_src 81 | ***** Void 82 | #+begin_src shell 83 | sudo xbps-install -S roswell 84 | #+end_src 85 | ***** Gentoo 86 | #+begin_src shell 87 | emerge --ask dev-lisp/roswell 88 | #+end_src 89 | ***** FreeBSD 90 | Roswell is available in the FreeBSD ports tree. To install it system-wide 91 | 92 | #+begin_src shell 93 | cd /usr/ports/devel/roswell 94 | sudo make install 95 | #+end_src 96 | 97 | To avoid system-wide installation, simply define a PREFIX (must be an absolute path) 98 | 99 | #+begin_src shell 100 | cd /usr/ports/devel/roswell 101 | sudo make PREFIX=/usr/home//.local install 102 | #+end_src 103 | ***** Nix 104 | The =roswell= package is availabe in nixpkgs and you can refer to the [[id:a7266bfa-1beb-4e7d-852b-228b8cbdb503][instructions]] below for more detailed instructions on how to setup lisp with Nix. 105 | ***** Guix 106 | The =roswell= package is availabe in Guix and you can refer to the [[id:aa50b926-ae64-4447-badb-49a63cfff374][instructions]] below for more detailed instructions on how to setup lisp for Guix. 107 | **** Install implementation(s) 108 | 109 | To install an implementation: 110 | #+begin_src shell 111 | ros install sbcl-bin 112 | ros install ccl-bin # or any other implementation 113 | #+end_src 114 | 115 | Then to make an implementation the default for roswell: 116 | #+begin_src shell 117 | ros use sbcl 118 | #+end_src 119 | 120 | You can always manually set the implementation you want to use without changing the default implementation: 121 | #+begin_src shell 122 | ros run -L ccl-bin 123 | #+end_src 124 | 125 | *** Debian/Ubuntu 126 | The implementations sbcl, abcl, ecl are available with the =apt= package manager 127 | #+begin_src shell 128 | apt-get install 129 | #+end_src 130 | 131 | *** Arch 132 | 133 | #+begin_src shell 134 | pacman -Sy sbcl 135 | #+end_src 136 | 137 | *** Nix 138 | :PROPERTIES: 139 | :ID: a7266bfa-1beb-4e7d-852b-228b8cbdb503 140 | :END: 141 | The following implementations are availabe as nix packages: 142 | - sbcl 143 | - abcl 144 | - ecl 145 | - ccl 146 | - clasp-common-lisp 147 | - gcl (GNU Common Lisp) 148 | - clisp 149 | - roswell 150 | 151 | **** Nix OS 152 | You can add the implementation packge to your =environment.systemPacakges= to install it system wide. 153 | 154 | For dealing with external libraries. You shoud include the =.dev= suffix to the library name to make sure the library path is added to the search path. for example for openssl you should add the package =openssl.dev= to your system packages 155 | 156 | **** Home Manager 157 | For dealing with external libraries. you need to add the absolute path of the required libraries to the =LD_LIBRARY_PATH= environment variable. While you can do that on your home environent level, it is highly not recommended. A work around is to wrap your implementation package with a simple shell script to make sure the installed libraries are added to =LD_LIBRARY_PATH= for your implementation. Here's an example for sbcl but you can do the same for the other implementations or for roswell. 158 | 159 | #+begin_src nix 160 | #+end_src 161 | 162 | **** Nix Shell 163 | We included a =flake.nix= file that you can use by running the command =nix develop= to enter a shell were you can get started right away with all the available implementations. 164 | 165 | The =LD_LIBRARY_PATH= should be set to include the absolute path for the libraries needed. To do so we use the helper functions =makeLibraryPath= to build the path for us and set it in our development shell. 166 | 167 | *** Guix 168 | :PROPERTIES: 169 | :ID: aa50b926-ae64-4447-badb-49a63cfff374 170 | :END: 171 | The following implementations are availabe as guix packages: 172 | - sbcl 173 | - abcl 174 | - ecl 175 | - ccl 176 | - gcl 177 | - clasp-cl 178 | - clisp 179 | - roswell 180 | 181 | **** Guix OS 182 | **** Guix Home 183 | **** Guix Shell 184 | We included a =manifest.scm= file that you can use by running the command =guix shell -m manifest.scm= to enter a shell were you can get started with all the available implementations and tools mentioned in this guide. 185 | * Init file 186 | 187 | 188 | * REPL 189 | Normally, running the command for you implementation will get you into the REPL. If you are using Roswell, running the command =ros run= will get you into the REPL for the default implementation or you can specify a specific implementation by running the command =ros run -L = 190 | 191 | However, Most REPLs don't allow you to go back in history. To that you will need to use [[https://github.com/hanslub42/rlwrap][rlwrap]], a command line utility that help you navigate the history of you REPL commands. To use it just prefix your implementation command by =rlwrap= for example =rlwrap sbcl=. This will allow you to navigate the history of your REPL commands using the up and down arrow keys. 192 | 193 | * Editor Setup 194 | ** Emacs 195 | The main packages that allow interaction with the REPL are slime and sly. SLY is a fork or slime and adds more features to it. You can use the provided =init.el= by running the command ~emacs -Q -l init.el~ to run emacs with the minimal configuration to get you started. Make sure to change the =inferior-lisp-program= in before running the command to run with your implemenation of choice. You can also customize the variable =lisp-repl= to shoose either sly or slime. 196 | Alternatively, you can follow the guides below to learn how to add these packages to you emacs configuration. 197 | 198 | Remember that Sly and Slime are conflicting. If you decide to install one remember to uninstall the other. 199 | 200 | *** SLIME 201 | - [[https://slime.common-lisp.dev/][Official Website]] 202 | 203 | Add the following to your emacs configuration init file. 204 | #+begin_src elisp 205 | (use-package slime 206 | :ensure t) 207 | #+end_src 208 | 209 | *** Sly 210 | - [[https://github.com/joaotavora/sly][github page]] 211 | - [[http://joaotavora.github.io/sly/][Sly User Manual]] 212 | 213 | Add the following to your emacs configuration init file. 214 | #+begin_src elisp 215 | (use-package sly 216 | :ensure t) 217 | #+end_src 218 | 219 | ** Vim and NeoVim 220 | 221 | *** slimv 222 | - [[https://github.com/kovisoft/slimv][github repo]] 223 | 224 | *** vlime 225 | - [[https://github.com/vlime/vlime][github repo]] 226 | 227 | ** VSCode 228 | 229 | *** Alive 230 | - [[https://marketplace.visualstudio.com/items?itemName=rheller.alive][Extension page]] 231 | - [[https://lispcookbook.github.io/cl-cookbook/vscode-alive.html][Using VSCode with Alive]] 232 | 233 | ** LEM 234 | - [[https://lem-project.github.io/][Official website]] 235 | 236 | * Package, System and Dependencies 237 | * System Definition 238 | ** ASDF 239 | - [[https://asdf.common-lisp.dev][Official website]] 240 | 241 | ASDF, or Another System Definition Facility, is a build system: a tool for specifying how systems of Common Lisp software are made up of components (sub-systems and files) 242 | The def system form 243 | Example of =hello-lisp.asd= 244 | 245 | #+begin_src lisp 246 | ;; Usual Lisp comments are allowed here 247 | (defsystem "hello-lisp" 248 | :description "hello-lisp: a sample Lisp system." 249 | :version "0.0.1" 250 | :author "Author Name " 251 | :licence "Public Domain" 252 | :depends-on ("optima.ppcre" "command-line-arguments") 253 | :components ((:file "packages") 254 | (:file "macros" :depends-on ("packages")) 255 | (:file "hello" :depends-on ("macros")))) 256 | #+end_src 257 | 258 | You can then load this system in the REPL as follows: 259 | 260 | #+begin_src lisp 261 | (asdf:load-system :hello) 262 | #+end_src 263 | 264 | * Dependencies Management 265 | ** QuikLisp 266 | - [[https://www.quicklisp.org/beta/][Official website]] 267 | 268 | #+begin_src sh 269 | curl -O https://beta.quicklisp.org/quicklisp.lisp 270 | # replace sbcl with your implementation 271 | sbcl --load quicklisp.lisp 272 | #+end_src 273 | 274 | If you are using roswell, quicklisp comes already included you don't need to install it manually. 275 | 276 | ** Qlot 277 | 278 | * Roswell 279 | Roswell is a Common Lisp implementation installer/manager, launcher. You can use it to install multiple implementations, run REPL and install binaries. It already comes with quicklisp pre-installed. 280 | 281 | - [[https://roswell.github.io/][Official website]] 282 | - [[https://github.com/roswell/roswell/wiki/Installation][Roswell installation guide]] 283 | 284 | * Ecosystem 285 | ** Extensions libraries 286 | - [[https://alexandria.common-lisp.dev/draft/alexandria.html][alexandria]] 287 | - [[https://github.com/ruricolist/serapeum][serapeum]] 288 | - [[https://github.com/slburson/fset][fset]] 289 | 290 | ** Web Development 291 | - [[http://edicl.github.io/hunchentoot/][hunchentoot]] 292 | - [[https://github.com/fukamachi/woo][woo]] 293 | - [[https://github.com/ruricolist/spinneret][spinneret]] 294 | - jzon 295 | 296 | ** GUI 297 | - [[https://github.com/rabbibotton/clog][CLOG]] 298 | 299 | * Notable Projects 300 | - [[https://github.com/rabbibotton/clog][CLOG]] 301 | - [[https://lem-project.github.io/][Lem]] 302 | - [[http://stumpwm.github.io/][StumpWM]] 303 | - [[https://nyxt.atlas.engineer/][Nyxt]] 304 | - [[https://github.com/Shirakumo/kandria][Kandria]] 305 | - [[https://github.com/ciel-lang/CIEL][CIEL]] 306 | - [[https://interlisp.org/][Interlisp]] 307 | -------------------------------------------------------------------------------- /common-lisp/flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1724224976, 6 | "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", 7 | "owner": "nixos", 8 | "repo": "nixpkgs", 9 | "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "nixos", 14 | "ref": "nixos-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "root": { 20 | "inputs": { 21 | "nixpkgs": "nixpkgs" 22 | } 23 | } 24 | }, 25 | "root": "root", 26 | "version": 7 27 | } 28 | -------------------------------------------------------------------------------- /common-lisp/flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = " 3 | A minimal flake to get you started with Common Lisp 4 | Created by the Lisp Spectrum Project 5 | You can run a development shell using the command 'nix develop'"; 6 | 7 | inputs = { 8 | nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; 9 | }; 10 | 11 | outputs = { self, nixpkgs }: 12 | let 13 | system = "x86_64-linux"; # Change if using something other than linux 14 | pkgs = nixpkgs.legacyPackages.${system}; 15 | in { 16 | devShells.${system} = { 17 | default = pkgs.mkShell { 18 | packages = with pkgs; [ 19 | # Emacs is the defacto standard for working with Lisp 20 | emacs 21 | 22 | # Roswell: Implentation and Dependancy management 23 | roswell 24 | 25 | # Implementations 26 | sbcl # Steel Banks Common Lisp 27 | abcl # Armed Bear Common Lisp 28 | ccl # Clozure Common Lisp 29 | ecl # Embeded Common Lisp 30 | ]; 31 | 32 | EDITOR = "emacs"; 33 | 34 | # We need to provide the paths to the libraries needed by some packages that use CFFI 35 | LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs;[ 36 | openssl # for hunchentoot 37 | libev # for woo 38 | ]); 39 | }; 40 | }; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /common-lisp/init.el: -------------------------------------------------------------------------------- 1 | ;; The Lisp Spectrum Project 2 | 3 | ;; This is a minimal Emacs configuration to get you started with common lisp 4 | ;; You can use this configuration as an example for your own configuration or 5 | ;; you can use this configuration directly by running "emacs -Q -l init.el". 6 | 7 | (package-initialize) 8 | 9 | (load-theme 'modus-vivendi t) 10 | (tool-bar-mode -1) 11 | 12 | ;; set your inferior-lisp command here which is basically your implementation 13 | ;; executable. If you are using Roswell change this to "ros run" to run Roswell 14 | ;; with the default implementation. 15 | (setq inferior-lisp-program "sbcl") 16 | 17 | ;; Choose either 'sly or 'slime 18 | (setq lisp-repl 'sly) 19 | 20 | ;; Sly and Slime have conflicting configurations. 21 | ;; That's why when we install one we have to uninstall the other 22 | (cond 23 | ;; Use Sly for Interaction with the REPL 24 | ((eq lisp-repl 'sly) 25 | (message "Removing SLIME and installing Sly") 26 | (remove-hook 'lisp-mode-hook 'slime-lisp-mode-hook) 27 | (use-package sly :ensure t) 28 | (use-package sly-repl-ansi-color :ensure t)) 29 | ;; Use Slime for Interaction with the REPL 30 | ((eq lisp-repl 'slime) 31 | (message "Removing Sly and installing SLIME") 32 | (remove-hook 'lisp-mode-hook 'sly-editing-mode) 33 | (use-package slime :ensure t) 34 | (use-package slime-repl-ansi-color 35 | :ensure t 36 | :hook (slime-repl-mode . (lambda () (slime-repl-ansi-color-mode 1)))) 37 | )) 38 | 39 | ;; Paredit for structural editing 40 | (use-package paredit 41 | :ensure t 42 | :hook ((lisp-mode 43 | emacs-lisp-mode 44 | lisp-interaction-mode 45 | slime-repl-mode 46 | sly-repl-mode) 47 | . paredit-mode)) 48 | 49 | (use-package rainbow-delimiters 50 | :ensure t 51 | :hook ((prog-mode 52 | sly-repl-mode 53 | slime-repl-mode) 54 | . rainbow-delimiters-mode)) 55 | 56 | ;; Start Scratch buffer in Lisp mode 57 | (add-hook 'emacs-startup-hook 58 | (lambda () 59 | (with-current-buffer "*scratch*" 60 | (lisp-mode)))) 61 | -------------------------------------------------------------------------------- /common-lisp/manifest.scm: -------------------------------------------------------------------------------- 1 | ;; What follows is a "manifest" created by the Lisp Spectrum project to help you 2 | ;; get started with Common Lisp and all the packages you need. You can use this 3 | ;; file using this command: "guix shell -m manifest.scm". 4 | 5 | (use-modules (guix packages) 6 | (gnu packages lisp) 7 | (gnu packages emacs) 8 | (gnu packages java) ;; for ABCL 9 | (gnu packages tls) ;; for openssl 10 | (gnu packages libevent)) ;; for libev 11 | 12 | ;; To set LD_LIBRARY_PATH Environment variable 13 | (define ld-library-path (search-path-specification 14 | (variable "LD_LIBRARY_PATH") 15 | (separator ":") 16 | (files (list "lib")))) 17 | 18 | (define (expose-library-path p) 19 | "A helper function to set the LD_LIBRARY_PATH environment variable for installed 20 | libraries in shell" 21 | (package 22 | (inherit p) 23 | (native-search-paths (list ld-library-path)))) 24 | 25 | ;; Change to your editor of choice To force guix shell to read 26 | ;; environment variables run "guix shell -m manifest.scm --rebuild-cache" 27 | (setenv "EDITOR" "emacs") 28 | 29 | (packages->manifest 30 | (append 31 | (list 32 | ;; Emacs is the de facto standard to working with Lisp(s) 33 | emacs 34 | 35 | ;; Roswell (Recommended) 36 | ;; Implementations and Dependency management 37 | roswell 38 | 39 | ;; Implementations 40 | sbcl ;; Steel Bank Common Lisp 41 | abcl ;; Armed Bear Common Lisp 42 | ccl ;; Clozure Common Lisp 43 | ecl ;; Embedded Common Lisp 44 | ) 45 | (map expose-library-path 46 | (list 47 | libev ;; for WOO 48 | openssl ;; for Hunchentoot 49 | )))) 50 | -------------------------------------------------------------------------------- /gambit/README.org: -------------------------------------------------------------------------------- 1 | #+title: Gambit 2 | #+author: Omar Bassam 3 | #+date: [2024-08-08 Wed] 4 | #+startup: nonum 5 | 6 | * Resources 7 | ** Documentation 8 | ** Books 9 | ** Videos 10 | ** Community 11 | * Installation 12 | * Editor Configuration 13 | ** Emacs 14 | *** geiser 15 | * Dependenies and Project Management 16 | ** built-in deps.edn 17 | ** Leiningin 18 | * Ecosystem 19 | * Notable Projects 20 | -------------------------------------------------------------------------------- /gambit/init.el: -------------------------------------------------------------------------------- 1 | ;; The Lisp Spectrum Project 2 | 3 | ;; This is a minimal Emacs configuration to get you started with gambit 4 | ;; You can use this configuration as an example for your own configuration or 5 | ;; you can use this configuration directly by running "emacs -Q -l init.el". 6 | 7 | (package-initialize) 8 | 9 | (load-theme 'modus-vivendi t) 10 | (tool-bar-mode -1) 11 | 12 | (use-package geiser-gambit 13 | :ensure t) 14 | 15 | ;; Paredit for structural editing 16 | (use-package paredit 17 | :ensure t 18 | :hook ((scheme-mode 19 | geiser-repl-mode) 20 | . paredit-mode) 21 | :bind 22 | (:map paredit-mode-map 23 | ;; allow using of "RET" normally in geiser 24 | ("RET" . nil))) 25 | 26 | (use-package rainbow-delimiters 27 | :ensure t 28 | :hook ((prog-mode 29 | geiser-repl-mode) 30 | . rainbow-delimiters-mode)) 31 | 32 | -------------------------------------------------------------------------------- /guile/README.org: -------------------------------------------------------------------------------- 1 | #+title: Guile 2 | #+author: Omar Bassam 3 | #+date: [2024-08-08 Wed] 4 | #+startup: nonum 5 | 6 | * Resources 7 | ** Documentation 8 | ** Books 9 | ** Videos 10 | ** Community 11 | 12 | * Installation 13 | * REPL 14 | - [[https://www.youtube.com/watch?v=nkP4RAEUh_A][video: Hacking with Guile Or how I stopped worrying and learned to love the REPL]] 15 | * Editor Configuration 16 | ** Emacs 17 | *** Geiser 18 | *** arei 19 | * Dependenies Management 20 | * Project Management 21 | * Ecosystem 22 | 23 | -------------------------------------------------------------------------------- /guile/init.el: -------------------------------------------------------------------------------- 1 | ;; The Lisp Spectrum Project 2 | 3 | ;; This is a minimal Emacs configuration to get you started with guile 4 | ;; You can use this configuration as an example for your own configuration or 5 | ;; you can use this configuration directly by running "emacs -Q -l init.el". 6 | 7 | (package-initialize) 8 | 9 | (load-theme 'modus-vivendi t) 10 | (tool-bar-mode -1) 11 | 12 | (use-package geiser-guile 13 | :ensure t) 14 | 15 | ;; Paredit for structural editing 16 | (use-package paredit 17 | :ensure t 18 | :hook ((scheme-mode 19 | geiser-repl-mode) 20 | . paredit-mode) 21 | :bind 22 | (:map paredit-mode-map 23 | ;; allow using of "RET" normally in geiser 24 | ("RET" . nil))) 25 | 26 | (use-package rainbow-delimiters 27 | :ensure t 28 | :hook ((prog-mode 29 | geiser-repl-mode) 30 | . rainbow-delimiters-mode)) 31 | 32 | -------------------------------------------------------------------------------- /janet/README.org: -------------------------------------------------------------------------------- 1 | #+title: Janet 2 | #+author: Omar Bassam 3 | #+date: [2024-08-30 Wed] 4 | #+startup: nonum 5 | 6 | * Resources 7 | - [[https://janet-lang.org/][Official Website]] 8 | 9 | ** Documentation 10 | - [[https://janet-lang.org/docs/index.html][Official Documentation]] 11 | - [[https://janet-lang.org/api/index.html][Core API]] 12 | - [[https://janetdocs.com/][Janet Docs]] 13 | 14 | ** Books 15 | - [[https://janet.guide/][Janet for Mortals]] 16 | 17 | ** Videos 18 | - [[https://www.youtube.com/watch?v=f5KZHGGogbc][Janet: A Practical, Embeddable Lisp - System Crafters Live!]] 19 | 20 | ** Community 21 | - [[https://github.com/ahungry/awesome-janet][Awesome Janet]] 22 | 23 | * Installation 24 | 25 | ** Debian/Ubuntu 26 | ** Arch 27 | ** Nix 28 | ** Guix 29 | 30 | * Editor Configuration 31 | ** Emacs 32 | *** janet-mode or janet-ts-mode 33 | - [[https://github.com/ALSchwalm/janet-mode][janet-mode]] 34 | - [[https://github.com/sogaiu/janet-ts-mode][janet-ts-mode]] 35 | 36 | *** janet-emacs-trial-kit 37 | - [[https://github.com/sogaiu/janet-emacs-trial-kit/tree/master][github repo]] 38 | 39 | *** ajrepl 40 | - [[https://github.com/sogaiu/ajrepl][github repo]] 41 | 42 | *** ijanet-mode 43 | - [[https://github.com/SerialDev/ijanet-mode][github repo]] 44 | * Dependencies and Project Management 45 | ** JPM 46 | Janet Project Manager 47 | *** Installation 48 | * EcoSystem 49 | * Notable Projects 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /janet/flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1724819573, 6 | "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", 7 | "owner": "nixos", 8 | "repo": "nixpkgs", 9 | "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "nixos", 14 | "ref": "nixos-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "root": { 20 | "inputs": { 21 | "nixpkgs": "nixpkgs" 22 | } 23 | } 24 | }, 25 | "root": "root", 26 | "version": 7 27 | } 28 | -------------------------------------------------------------------------------- /janet/flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = " 3 | A minimal flake to get you started with Common Lisp 4 | Created by the Lisp Spectrum Project 5 | You can run a development shell using the command 'nix develop'"; 6 | 7 | inputs = { 8 | nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; 9 | }; 10 | 11 | outputs = { self, nixpkgs }: 12 | let 13 | system = "x86_64-linux"; # Change if using something other than linux 14 | pkgs = nixpkgs.legacyPackages.${system}; 15 | in { 16 | devShells.${system} = { 17 | default = pkgs.mkShell { 18 | packages = with pkgs; [ 19 | # Emacs is the defacto standard for working with Lisp 20 | emacs 21 | 22 | janet 23 | jpm 24 | 25 | ]; 26 | 27 | EDITOR = "emacs"; 28 | 29 | JANET_LIBPATH = pkgs.lib.makeLibraryPath [ pkgs.janet ]; 30 | 31 | }; 32 | }; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /janet/init.el: -------------------------------------------------------------------------------- 1 | ;; The Lisp Spectrum Project 2 | 3 | ;; This is a minimal Emacs configuration to get you started with janet 4 | ;; You can use this configuration as an example for your own configuration or 5 | ;; you can use this configuration directly by running "emacs -Q -l init.el". 6 | 7 | (package-initialize) 8 | 9 | (load-theme 'modus-vivendi t) 10 | (tool-bar-mode -1) 11 | 12 | ;; janet-mode or janet-ts-mode 13 | (use-package janet-mode 14 | :ensure t) 15 | 16 | ;; janet repl 17 | (unless (package-installed-p 'ajrepl) 18 | (package-vc-install "https://github.com/sogaiu/ajrepl.git")) 19 | (use-package ajrepl 20 | :ensure t 21 | :hook ((janet-mode janet-ts-mode) . ajrepl-interaction-mode)) 22 | 23 | ;; flycheck-janet 24 | (unless (package-installed-p 'flycheck-janet) 25 | (package-vc-install "https://github.com/sogaiu/flycheck-janet.git")) 26 | (use-package flycheck-janet 27 | :ensure t 28 | :init 29 | (global-flycheck-mode 1)) 30 | 31 | ;; Paredit for structural editing 32 | (use-package paredit 33 | :ensure t 34 | :hook ((janet-mode ajrepl-mode) 35 | . (lambda () 36 | (paredit-mode 1) 37 | (setq ;; To use # for comments 38 | paredit-comment-prefix-code "#" 39 | paredit-comment-prefix-margin "#" 40 | paredit-comment-prefix-toplevel "#"))) 41 | :config 42 | (defun +fix-paredit-@ () 43 | (when (char-equal ?@ (char-before (- (point) 2))) 44 | (backward-char) 45 | (paredit-backward-delete) 46 | (forward-char))) 47 | :bind 48 | (:map paredit-mode-map 49 | ("{" . (lambda () 50 | (interactive) 51 | (paredit-open-curly) 52 | (+fix-paredit-@))) 53 | ("}" . paredit-close-curly) 54 | ("[" . (lambda () 55 | (interactive) 56 | (paredit-open-bracket) 57 | (+fix-paredit-@))))) 58 | 59 | (use-package rainbow-delimiters 60 | :ensure t 61 | :hook ((prog-mode arepl-mode) 62 | . rainbow-delimiters-mode)) 63 | 64 | -------------------------------------------------------------------------------- /janet/manifest.scm: -------------------------------------------------------------------------------- 1 | ;; What follows is a "manifest" created by the Lisp Spectrum project to help you 2 | ;; get started with Common Lisp and all the packages you need. You can use this 3 | ;; file using this command: "guix shell -m manifest.scm". 4 | 5 | (use-modules (guix packages) 6 | (gnu packages emacs) 7 | (gnu packages lisp)) 8 | 9 | ;; Change to your editor of choice To force guix shell to read 10 | ;; environment variables run "guix shell -m manifest.scm --rebuild-cache" 11 | (setenv "EDITOR" "emacs") 12 | 13 | (packages->manifest 14 | (append 15 | (list emacs ;; Emacs is the de facto standard to working with Lisp(s) 16 | janet 17 | jpm ;; Janet Project Manager 18 | ))) 19 | -------------------------------------------------------------------------------- /publish.el: -------------------------------------------------------------------------------- 1 | ;; The Lisp Spectrum project website 2 | ;; To publish the website run the command "emacs -Q -l publish.el" 3 | ;; You can then serve the website from the created public folder 4 | 5 | (require 'package) 6 | 7 | ;; Download packages in a local folder 8 | (setq package-user-dir (expand-file-name "./.packages")) 9 | 10 | (setq package-archives '(("melpa" . "https://melpa.org/packages/") 11 | ("elpa" . "https://elpa.gnu.org/packages/"))) 12 | 13 | ;; Initialize the package system 14 | (package-initialize) 15 | (unless package-archive-contents 16 | (package-refresh-contents)) 17 | 18 | ;; Install dependencies 19 | (package-install 'htmlize) 20 | 21 | (require 'ox-publish) 22 | 23 | ;; Customize the HTML output 24 | (setq org-html-validation-link nil ;; Don't show validation link 25 | org-html-head-include-default-style nil ;; Use our own styles 26 | org-html-head "") 27 | 28 | (defun rename-project-files (from-regex to) 29 | (dolist (from-file (directory-files-recursively "./public" from-regex)) 30 | (let ((to-file-name (replace-regexp-in-string from-regex to 31 | from-file t))) 32 | (message (format "renaming %s to %s" from-file to-file-name)) 33 | (rename-file from-file to-file-name t)))) 34 | 35 | 36 | (setq org-publish-project-alist 37 | (list 38 | (list 39 | "lisp-spectrum" 40 | :base-directory "." 41 | :base-extension "org" 42 | :publishing-directory "./public" 43 | :publishing-function 'org-html-publish-to-html 44 | :recursive t 45 | :with-toc nil 46 | :headline-levels 6 47 | :with-author nil 48 | :with-creator nil 49 | :with-date nil 50 | :with-timestamps nil 51 | :time-stamp-file nil 52 | :section-numbers nil 53 | ;; function to be called after publishing the project 54 | :completion-function (lambda (_) 55 | (rename-project-files "README" "index") 56 | (message "Project is now published"))))) 57 | 58 | (defun publish () 59 | (org-publish-all t)) 60 | 61 | (publish) 62 | -------------------------------------------------------------------------------- /scheme/README.org: -------------------------------------------------------------------------------- 1 | #+title: Scheme 2 | #+author: Omar Bassam 3 | #+date: [2024-08-08 Wed] 4 | #+startup: nonum 5 | 6 | Scheme is a standard that aims to be very minimalistic in nature. That leads to a sheer amount on in-compatible implementations. That's why in this page is only for Scheme as a standard and the common concepts among all implementations. Every Dialect/Implementation deserves it's own page where we discuss it's unique features, standard conformance and ecosystem. 7 | 8 | * Resources 9 | ** Documentation 10 | - [[https://www.scheme.org/][scheme.org]] 11 | ** Books 12 | - [[https://docs.scheme.org/sicp/][SICP Structure and Interpretation of Computer Programs]] 13 | ** Videos 14 | - [[https://www.youtube.com/playlist?list=PL7BcsI5ueSNFPCEisbaoQ0kXIDX9rR5FF][playlist: SICP Structure and Interpretation of Computer Programs]] 15 | - [[https://www.youtube.com/playlist?list=PLgyU3jNA6VjRMB-LXXR9ZWcU3-GCzJPm0][playlist: Introduction to the scheme programming language]] 16 | - [[https://www.youtube.com/watch?v=OyfBQmvr2Hc][video: William Byrd "The Most Beautiful Program Ever Written"]] 17 | 18 | ** Community 19 | 20 | * Standards 21 | 22 | ** R7RS 23 | - [[https://r7rs.org/][r7rs.org]] 24 | 25 | * SRFI 26 | Scheme Request for Implementation 27 | --------------------------------------------------------------------------------