Skip to content

Instantly share code, notes, and snippets.

@guicho271828
guicho271828 / case.lisp
Last active May 5, 2018 18:51
case -> jump table (see fcase8, fcase9)
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
(progn ;;init forms
(ros:ensure-asdf)
#+quicklisp (ql:quickload '(:alexandria :trivia :iterate) :silent t))
(defpackage :ros.script.case.3724474528
@lukego
lukego / pbook in sed
Created October 24, 2012 13:10
Format program listings for Markdown
sed -E -e 's/^/ /g' -e 's/^ --- ?//g' | pandoc -o listing.pdf -
That expression is a cheap literate programming system for Markdown.
Start commentary lines with '--- ' and they will be
markdown-formatted, the rest will be code. (Uses Lua comment syntax.)
Finally the right implementation of this idea:
http://fresh.homeunix.net/~luke/misc/emacs/pbook.pdf (program)
http://fresh.homeunix.net/~luke/misc/erlang/regtest.pdf (better example)
@ifesdjeen
ifesdjeen / global_catch_exception.clj
Created June 26, 2012 14:47
Global Exception catching
;; That will actually catch exception within inner thread, too. And within inner thread of inner thread. Etc.
(Thread/setDefaultUncaughtExceptionHandler (proxy [Thread$UncaughtExceptionHandler] []
(uncaughtException [t e]
;;
;; Your fancy Exception logging here
;;
(println "Throwable: " + (.getMessage e))
(println (.toString t)))))
(.start (Thread. (cast Runnable
(fn []