Skip to content

Instantly share code, notes, and snippets.

@svetlyak40wt
Last active July 16, 2023 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svetlyak40wt/a99d8ed760284b6cb0e476df0c80f3dd to your computer and use it in GitHub Desktop.
Save svetlyak40wt/a99d8ed760284b6cb0e476df0c80f3dd to your computer and use it in GitHub Desktop.
Some advices about Common Lisp in reply to the https://www.youtube.com/watch?v=jLkqYVTqM38&lc=UgxECAkwcplTdFWvwit4AaABAg comment

...saw all your videos until this day. Thanks so much, cleared up alot of questions! Best tutorials out there for getting a overview on workflows! Still struggling with a couple of things

  1. QLOT vs (push "./" asdf:central-registry) workflow often you (push "./" asdf:central-registry) in the repl. Here you use qlot and it does that automatically as I understand Then you start $qlot exec ros emacs

So my questions are

  • what is the right flow or do I need both often ?
  • when exactly to choose which one.?

No. Usually I do (push "./" *asdf:central-registry*) only when start lisp without qlot, using ros emacs (or somehow else). Also, sometimes I do (push "~/projects/foo-bar/" *asdf:central-registry*) even when I've started lisp using qlot exec. I do this in case if I'm having a fork of the library which I intend to patch. It is possible to clone a library into .qlot/local-projects/ but I prefer having them in ~/projects/ folder just in case if I'll decide to delete .qlot folder or recreate it.

  • Is there any special configuration on emacs side so that sly connects to the right ros qlot common lisp (sbcl ccl)?

I don't know solution other than manually running a separate lisp process and connecting to it from Emacs using sly-connect command. This separate lisp process should load SLYNK and do SLYNK:CREATE-SERVER. Usually I'm using this wrapper https://40ants.com/slynk/ in my projects to start slynk only if SLYNK_PORT environment variable was given.

  • seems like you have to restart emacs often with the qlot flow. also I would expect a restart of the sly repl from within emacs would break everything
  • Is there a way to start emacs first and then use the qlot functionality with project-local ql-repo? Or would I just then always have to (push "./" asdf:central-registry) in the repl first.

You can load QLOT ASDF system and then use qlot:with-local-quicklisp. But I don't recommend to load different qlot environments into the same Lisp image because there might be some conflicts between ASDF systems.

So maybe I am asking for a video on how to use emacs sly to efficiently work on multiple projects. Maybe its just best practice to start emacs instance dedicated per project?

Usually I'm using emacs from console and just starting a separate emacs instance per-project. Often these emacs instances are running on the virtual machine in the cloud under Tmux (terminal multiplexor). This way I'm not mixing environments and can switch between them very easily.

  1. Workflow for existing and complex projects This is a video wishlist to explain
  • fixing error flows and explaining the debugger feedback more
  • clone existing project that uses qlot and start debugging code
  • how to deal with projects that dont use qlot whould really help ** Do you modify cloned projects that you work on to use qlot? How would that flow look like?

No, usually I just do something like that:

echo 'dist ultralisp http://dist.ultralisp.org' > qlfile
qlot install
qlot exec ros emacs

Then quickload the project's ASDF system and inspect it's external symbols using autocomplete. That is it.

** jumping around code of a complex project like kandria dand start debugging into it

On some of these questions you will find answers in this video: https://www.youtube.com/watch?v=WlXJi6aOb2M&list=PLU9el9dzWDmwJYKrjX6Af96PldudPJuQi&index=8

Hope this is a inspiration and would be happy to donate somehow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment