Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lthms
Last active June 25, 2018 09:34
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 lthms/9833f4851843119c966917775b4c4180 to your computer and use it in GitHub Desktop.
Save lthms/9833f4851843119c966917775b4c4180 to your computer and use it in GitHub Desktop.
My Lisp Journey #1
(cl:defpackage :lysk.bundle
(:use :cl)
(:export #:deliver))
(cl:in-package :lysk.bundle)
(defun deliver ()
(gamekit.distribution:deliver :lysk 'lysk:app))
(asdf:defsystem lysk
:description "Lykan Game Client"
:author "lthms"
:license "GPLv3"
:version "0.0.1"
:serial t
:depends-on (trivial-gamekit)
:components ((:file "package")
(:file "lysk")))
(asdf:defsystem lysk/bundle
:description "Bundle the Lykan Game Client"
:author "lthms"
:license "GPLv3"
:version "0.0.1"
:serial t
:depends-on (trivial-gamekit/distribution lysk)
:components ((:file "bundle")))
(cl:in-package :lysk)
(gamekit:defgame app () ()
(:fullscreen-p 't))
(defmethod gamekit:post-initialize ((app app))
(gamekit:bind-button :mouse-left :released
(lambda () (gamekit:stop))))
(defun run ()
(gamekit:start 'app))
run:
@sbcl --eval "(ql:quickload :lysk)" \
--eval "(lysk:run)"
bundle:
@echo -en "[ ] Remove old build"
@rm -rf build/
@echo -e "\r[*] Remove old build"
@echo "[ ] Building"
@sbcl --eval "(ql:quickload :lysk/bundle)" --eval "(lysk.bundle:deliver)" --quit
@echo "[*] Building"
.PHONY: bundle run
(defpackage :lysk
(:use :cl)
(:export run app))
@vindarel
Copy link

vindarel commented Jun 25, 2018

Hello, thanks for sharing the article !

new Quicklisp projects have to be located inside ${HOME}/quicklisp/local-projects

You can put it somewhere else and compile the asd file (C-c C-k in Slime) and then quickload it. Or create a symlink, or again use ql:*local-projects-directories*: https://stackoverflow.com/questions/51008845/how-to-arrange-for-quicklisp-to-load-the-local-version-of-a-given-library

You used sbcl's repl bare bones, hugh :p cl-repl is pretty new but fine.

Then see Portacle to have a working Emacs + CL + everything in two clicks. See https://lispcookbook.github.io/cl-cookbook/getting-started.html

Carry on sharing your progress :)

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