No description
Find a file
2024-03-14 07:49:20 +01:00
logs completed captains log example 2024-03-12 20:02:23 +01:00
solutions create solutions folder 2024-03-14 07:49:20 +01:00
captains-log.lisp create solutions folder 2024-03-14 07:49:20 +01:00
package.lisp finish example about the space-toilet 2024-03-13 12:18:20 +01:00
README.md prepare tasks for workshop 2024-03-14 07:37:56 +01:00
space-cadet.asd finish example about the space-toilet 2024-03-13 12:18:20 +01:00
space-toilet.lisp prepare tasks for workshop 2024-03-14 07:37:56 +01:00
welcome.lisp create solutions folder 2024-03-14 07:49:20 +01:00

space-cadet

Please don't upload to GitHub

A workshop in Common Lisp

Getting started

  1. Download the Portacle text editor.
  2. 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 like portacle/projects/spacecadet
  3. Proceed to fire up Portacle.
  4. The order of the assignments are as follows:
    1. welcome.lisp
    2. space-toilet.lisp
    3. 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.

Slime docs manual.

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.