Skip to content

Instantly share code, notes, and snippets.

; script to reproduce:
#!/usr/bin/sbcl --script
(load "~/quicklisp/setup.lisp")
;(asdf:load-system "weir")
(ql:quickload "png")
#!/usr/bin/sbcl --script
;do something similar to
(load "~/quicklisp/setup.lisp")
(ql:quickload :sdl2)
(ql:quickload :cl-opengl)
(defun debug-log (msg &rest args)
"Output and flush MSG to STDOUT with arguments ARGS"
@inconvergent
inconvergent / lets-write-a-dsl.lisp
Last active February 22, 2025 18:59
let's write a dsl code example
#!/usr/local/bin/sbcl --script
; this is the full DSL example described in this blog post:
; https://inconvergent.net/2023/lets-write-a-dsl/
; the code is explained in more detail in the post
(defun mkstr (&rest args)
(with-output-to-string (s)
(dolist (a args) (princ a s))))
#!/usr/local/bin/sbcl --script
; example code described in this blog post:
; https://inconvergent.net/2023/vectors-as-symbols
; GENERIC UTILS
(defun mkstr (&rest args)
(with-output-to-string (s)
(dolist (a args) (princ a s))))
#!/usr/bin/env python3.11
import re
import pandas as pd
flags = re.MULTILINE|re.UNICODE|re.IGNORECASE|re.DOTALL
def strip_dot(s):
return ''.join(s.split('.'))