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
(defun event-p (x) t) ;; constantly t | |
(defun key-p (x) t) ;; constantly t | |
;; w/o defpattern | |
(match event | |
((and (sdl:event- (type (eq :key-down-event))) | |
;;^^^^^^^^^^ this specify the container type | |
;;^^^^ this is a slot | |
;; ^^^^^^^^^^^^^^^^^^ and this specifies the type of the slot. | |
(sdl::key- (key (eq :sdl-key-z)) state))) |
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
(defun run-sleep (n) | |
(sb-ext:run-program | |
"sleep" (list (princ-to-string n)) | |
:search t :wait nil :output t :error :output)) | |
;; assume fiveam | |
(test async-shell | |
;; pass! |
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
(use-syntax :annot | |
(cl-syntax:use-syntax (%_!$&=~^-[]+*?/<>.:annot)) | |
(cl-syntax:use-syntax (%_!$&=~^-[]+*?/<>.:annot aaa) aaa) | |
`(cl-syntax:use-syntax (`,%_!$&=~^-[]+*?/<>.:annot aaa) aaa) | |
(defun (defun (cl:defun aaa (aaa) bbb))) | |
(defo (defun (cl:defun aaa (aaa) bbb))) | |
(use-defo (defun (cl:defun aaa (aaa) bbb))) |
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
#!/bin/bash | |
dir=$(dirname $(readlink -ef $0)) | |
cg=/sys/fs/cgroup | |
mem=250000 # 250MB | |
maxmem=2000000 # 2GB: *8 | |
time=225 # 3.75 min = 30/4 | |
maxtime=1800 # 30 min | |
options= | |
debug=false |
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
(defun run () | |
(tagbody | |
(handler-bind ((condition | |
(lambda (c) | |
(declare (ignore c)) | |
(go :escape)))) | |
(restart-bind ((my-continue | |
(lambda () |
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
.PHONY: all clean | |
# .PRECIOUS: %.i1 %.i2 %.i3 | |
LD = -I/usr/include -I/usr/include/linux | |
headers = $(shell ls *.h) | |
$(info $(headers)) | |
lisp = $(patsubst %.h,%.lisp,$(headers)) |
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
(defun %length-distribution (&optional used) | |
(let ((path | |
(merge-pathnames | |
(format nil "output/~(~{~a-~}dist~@[-used~]~).pdf" | |
*set-dirs* used))) | |
(*solver-blacklist* '(fffd fffdtl mv2 mv2tl))) | |
(includegraphics (namestring path)) | |
(let ((hist (associative-array 2))) | |
(dolist (s (solvers)) | |
(dolist (d (domains)) |
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
(with-typevar <coordinate> (<t>) (<vector-+>) | |
(defstruct <coordinate> | |
(x 0 :type <t>) | |
(y 0 :type <t>)) | |
(declaim (ftype (function (<coordinate> <coordinate>) <coordinate>) <vector-+>)) | |
(defun <vector-+> (v w) | |
(match* (v w) | |
(((<coordinate> x1 y1) (<coordinate> x2 y2)) | |
(<coordinate> (+ x1 x2) (+ y1 y2)))))) |
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
; (definstance (ord string) | |
; (defun = (x y) (string= x y)) | |
; (defun > (x y) (string> x y))) | |
(PROGN | |
(FTYPE =/STRING/STRING STRING STRING BOOLEAN) | |
(DEFUN =/STRING/STRING (X Y) (STRING= X Y)) | |
(DEFINE-COMPILER-HINT = | |
(X Y &ENVIRONMENT #:ENV1822) | |
(STRING STRING BOOLEAN) | |
(IF (AND (FORM-TYPEP X 'STRING #:ENV1822) (FORM-TYPEP Y 'STRING #:ENV1822)) |
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
typedef union | |
{ | |
struct | |
{ | |
int __lock; | |
unsigned int __futex; | |
unsigned long long int __total_seq; | |
unsigned long long int __wakeup_seq; | |
unsigned long long int __woken_seq; | |
void *__mutex; |