This file contains 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 m (&environment env) | |
(sb-int:eval-in-lexenv '(n) env)) | |
(macrolet ((n () "Hello!")) (m)) | |
; => "Hello!" |
This file contains 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
(in-package :cl-user) | |
(#+sbcl | |
sb-walker:walk-form | |
#+allegro | |
excl::walk-form | |
`(let ((x 1)) | |
(declare (fixnum x)) | |
:marker) | |
nil |
This file contains 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
(when (require 'session nil t) | |
(mapatoms | |
(lambda (symbol) | |
(let ((name (symbol-name symbol))) | |
(when (and (string-match "^anything-" name) | |
(string-match session-globals-regexp name)) | |
(pushnew symbol session-globals-exclude)))))) |
This file contains 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
#include <stdio.h> | |
#include <memory.h> | |
#include <jit/jit.h> | |
struct bf_loop { | |
jit_label_t start; | |
jit_label_t end; | |
struct bf_loop *parent; | |
}; | |
typedef struct bf_loop *bf_loop_t; |
This file contains 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
diff --git a/popwin.el b/popwin.el | |
index 2d8619e..2c628b7 100644 | |
--- a/popwin.el | |
+++ b/popwin.el | |
@@ -496,6 +496,8 @@ the popup window will be closed are followings: | |
(and other-window-selected | |
(not minibuf-window-p) | |
(not popwin:popup-window-stuck-p))) | |
+ (setq this-command 'popwin:close-popup-window) | |
+ (run-hooks 'pre-command-hook) |
This file contains 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
DBCollection.prototype.sample = function () { | |
return this.find().skip(Math.floor(Math.random() * this.count())).limit(1).next(); | |
} |
This file contains 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
class Try | |
(instance_methods - [:object_id, :__send__, :to_s]).each {|m| undef_method m } | |
def initialize(object) @object = object end | |
def method_missing(method, *args, &block) | |
return nil unless @object.respond_to? method | |
@object.send(method, *args, &block) | |
end | |
end |
This file contains 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
(in-package :cl-user) | |
(eval-when (:compile-toplevel :load-toplevel :execute) | |
(when (find-package :quicklisp) | |
(quicklisp:quickload '(:anaphora :cl-ppcre))) | |
(require :yacc)) | |
(defpackage :calc | |
(:use :cl :anaphora :excl.yacc)) | |
(in-package :calc) |
This file contains 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
(in-package :cl-user) | |
(defmacro my-macrolet (&environment env bindings &body body) | |
(let* ((local-macros | |
(loop for (name lambda-list . body) in bindings | |
for macro-lambda = (sb-cltl2:parse-macro name lambda-list body) | |
for macro-fun = (sb-cltl2:enclose macro-lambda env) | |
collect `(,name ,macro-fun))) | |
(new-env (sb-cltl2:augment-environment env :macro local-macros))) | |
(sb-cltl2:macroexpand-all `(locally ,@body) new-env))) |
This file contains 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
#-*-ruby-*- | |
device /AT Translate|HHKB/ | |
key C-M-S-q { quit } | |
# swap number keys | |
key[_1] = exclam, _1 | |
key[_2] = at, _2 | |
key[_3] = numbersign, _3 |