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
(bt:make-thread (lambda () | |
(sdl:with-init () | |
(sdl:window 1024 768) | |
(sdl:with-events () | |
(:quit-event () t) | |
(:idle () | |
(sdl:clear-display sdl:*black*) | |
(sdl:update-display)))))) |
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
#keyboard |
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
#hour-glass | |
#glass | |
#top-sand | |
#bottom-sand |
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
%span.add-new |
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 get-channel-users (nickname channel &key username password) | |
(let ((connection (irc:connect :nickname nickname | |
:username username | |
:password password))) | |
(unwind-protect | |
(with-timeout (60) | |
(irc:join connection channel) | |
(irc:add-hook connection 'irc:irc-rpl_endofnames-message | |
(lambda (msg) | |
(declare (ignore msg)) |
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
List below was obtained with the following code: | |
(let (syms) | |
(do-symbols (sym :cl) | |
(when (fboundp sym) | |
(push sym syms))) | |
(format t "~{~(~a~)~%~}" (sort syms #'string<))) | |
I've added the :destructive keyword to lines where the function | |
is known to be destructive. I haven't gone over this entire list, |
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
;;; Trying to instrument handled events as well as unhandled events by | |
;;; monkey patching cl-irc: | |
(in-package :cl-irc) | |
(defmethod irc-message-event (connection (message irc-message)) | |
(declare (ignore connection)) | |
(if (apply-to-hooks message) | |
(client-log (connection message) message "HANDLED-EVENT:") | |
(client-log (connection message) message "UNHANDLED-EVENT:"))) |
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 fold-left (op init seq) | |
(labels ((iter (result rest) | |
(if (null rest) | |
result | |
(iter (funcall op result (car rest)) (cdr rest))))) | |
(iter init seq))) |
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
(ps:ps | |
(let ((hash (ps:create :foo "bar" | |
:baz "foo"))) | |
(ps:@ hash :foo))) | |
;; => | |
"(function () { | |
var hash = { 'foo' : 'bar', 'baz' : 'foo' }; | |
return hash['foo']; |
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
(restas:define-module :hello-world-app | |
(:use :cl :cl-who)) | |
(in-package :hello-world-app) | |
(restas:define-route index ("/") | |
(with-html-output-to-string (s nil :prologue t :indent t) | |
(:html | |
(:head | |
(:title "Hello World!") |