logs | ||
solutions | ||
captains-log.lisp | ||
package.lisp | ||
README.md | ||
space-cadet.asd | ||
space-toilet.lisp | ||
welcome.lisp |
space-cadet
A workshop in Common Lisp
Getting started
- Download the Portacle text editor.
- After downloading and unpacking Portacle. You'll need to download this git repository and place it inside the folder
portacle/projects
. The resulting folder structure should look likeportacle/projects/spacecadet
- Proceed to fire up Portacle.
- The order of the assignments are as follows:
welcome.lisp
space-toilet.lisp
captains-log.lisp
Portacle survival tips
It's Emacs, so it can be bewildering to get used to. It's very much keyboard driven, and it's totally fine to use the mouse or touchpad to mark text and move your cursor around.
Useful notation to know about:
- C-c means pressing and holding CTRL and pressing c.
- M-c means pressing and holding ALT and pressing c.
Find and open file, there's at least two ways to do it:
- Type
C-x C-f
, this will trigger a prompt for a file-path to open. - Type
M-x
, and a prompt will appear at the bottom of the screen. Proceed to type "dired" and press enter, which will give you a file system exploration tool.
Undo: C-/
Copy: M-w
Cut: C-w
Paste: C-y
Cancel mini-buffer prompt: C-g
(mini-buffer prompts are the one's often started with M-x
.)
Change window focus: C-x o
Paredit survival tips
[Paredit is a Emacs mode that aims to supercharge how you edit lisp code. Still, it takes some getting used to.
Take a look at this animated tour of Paredit to get a lay of the land.
Try using M-<right arrow>
M-<left arrow>
inside Lisp code to get a feel of how you can navigate.
Common lisp survival tips
Common lisp is very feature-rich, so it can be easy to get lost in the weeds. Remember that you don't need to use every language feature on every problem.
See this page for an overview of CL's language constructs.
Slime survival tips
Evaluate lisp form: C-c C-c
Evaluate whole file: C-c C-l
Expand macro at cursor point: C-c RET
<-- RET means to press enter.
Other survival tips
Trivia
The title spacecadet is inspired by the space-cadet keyboard.
License
Except where otherwise noted, this repository is copyright Nils Norman Haukås 2024, and licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.