Skip to content

Instantly share code, notes, and snippets.

View lispnik's full-sized avatar
💭
Buggered if I know

lispnik

💭
Buggered if I know
View GitHub Profile
@ghoseb
ghoseb / ns-cheatsheet.clj
Last active April 11, 2024 05:28 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
@lispnik
lispnik / gist:5b26719f0847ebfa0970f676c7b7982e
Created June 30, 2019 19:27
listener from hell with chanl
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload '("iup" "chanl" "bordeaux-threads")))
(defpackage #:iup-examples.listener
(:use #:common-lisp)
(:export #:listener))
(in-package #:iup-examples.listener)
(defvar *idle-action-lock* (bt:make-lock "idle-action"))
@klang
klang / what-parens-all-I-see-is-the-program.el
Created September 1, 2010 06:46
What parens? All I see is the program. (the Clojure color part of http://briancarper.net/blog/492/emacs-clojure-colors in one convenient place. Just dimming the parens: http://www.davep.org/emacs/parenface.el --- from: http://briancarper.net/blog/492/emac
(defun lisp-enable-paredit-hook () (paredit-mode 1))
(add-hook 'clojure-mode-hook 'lisp-enable-paredit-hook)
(defmacro defclojureface (name color desc &optional others)
`(defface ,name '((((class color)) (:foreground ,color ,@others))) ,desc :group 'faces))
(defclojureface clojure-parens "DimGrey" "Clojure parens")
(defclojureface clojure-braces "#49b2c7" "Clojure braces")
(defclojureface clojure-brackets "SteelBlue" "Clojure brackets")
(defclojureface clojure-keyword "khaki" "Clojure keywords")