This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- mode: lisp -*- | |
;; | |
;; A quick and dirty tree shaker for SBCL. Basically, it destroys the | |
;; package system and does a gc before saving the lisp image. Gives | |
;; about a 40% reduction in image size on a basic hello world test. | |
;; Would like to hear how it works on larger projects. | |
;; | |
;; Original idea from: https://groups.google.com/d/msg/comp.lang.lisp/6zpZsWFFW18/WMy4PyA9B4kJ | |
;; | |
;; Burton Samograd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// run here: http://jsfiddle.net/6mt3ffpe/ | |
module Bounce where | |
import DOM | |
import Graphics.Canvas | |
import Control.Monad.Eff | |
import Control.Monad.Eff.Ref | |
import Control.Monad.Trans | |
import Control.Monad.RWS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tabimages plugin for Tkabber | |
# Written by Renji | |
# jabber id: [email protected] | |
# e-mail: [email protected] | |
namespace eval tabimages { | |
set space [namespace current] | |
::msgcat::mcload [file join [file dirname [info script]] msgs] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro $ (&rest rest) `(funcall ,@rest)) | |
(defstruct builder | |
combine | |
bind | |
return | |
return-from | |
yield | |
yield-from | |
using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro monadic (&body statements) | |
`(let ((m *monad*)) | |
(statements-of (monad m) ,@statements))) | |
(defun monad-example (ma mb) | |
(monadic | |
(get x ma) | |
(get y mb) | |
(val z (+ x y)) | |
(ret (list x y z)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module KV where | |
open import Data.Nat hiding (_⊔_) | |
open import Data.Unit | |
open import Data.List using (List; []; _∷_) | |
open import Data.Empty | |
open import Data.Maybe | |
open import Data.Product | |
open import Function | |
open import Relation.Binary.Core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun split-str (string &optional (separator " ")) | |
(split-str-1 string separator)) | |
(defun split-str-1 (string &optional (separator " ") (r nil)) | |
(let ((n (position separator string | |
:from-end t | |
:test #'(lambda (x y) | |
(find y x :test #'string=))))) | |
(if n | |
(split-str-1 (subseq string 0 n) separator (cons (subseq string (1+ n)) r)) |