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
(defpackage #:snippets/new-project | |
(:use #:cl) | |
(:export | |
#:*projects-directory* | |
#:new-project)) | |
(in-package #:snippets/new-project) | |
(defvar *projects-directory* | |
(merge-pathnames |
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
(defpackage #:snippets/stable-matching | |
(:use #:cl) | |
(:shadowing-import-from | |
#:fset #:empty-map #:reduce #:with #:set #:union #:image #:empty-set | |
#:lookup #:includef #:excludef #:find-if #:notevery)) | |
(in-package #:snippets/stable-matching) | |
(defstruct (person (:constructor make-person (name preference-list))) | |
name |
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
(defpackage #:snippets/slot-values | |
(:use #:cl)) | |
(in-package #:snippets/slot-values) | |
(defun slot-values* (object &rest slot-names) | |
(mapcar (lambda (slot-name) (slot-value object slot-name)) | |
slot-names)) | |
(defun (setf slot-values*) (new-values object &rest slot-names) |
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
;;;; +----------------------------------------------------------------+ | |
;;;; | Advent of Code 2017 | | |
;;;; +----------------------------------------------------------------+ | |
(defpackage #:snippets/aoc2017/day4 | |
(:use #:cl) | |
(:import-from #:split-sequence #:split-sequence) | |
(:export | |
#:day4)) |
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
;;;; +----------------------------------------------------------------+ | |
;;;; | Advent of Code 2017 | | |
;;;; +----------------------------------------------------------------+ | |
(defpackage #:snippets/aoc2017/day6 | |
(:use #:cl) | |
(:export | |
#:day6)) | |
(in-package #:snippets/aoc2017/day6) |
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 with-list-properties (((&rest vars) plist &key modify) &body forms) | |
(if modify | |
(once-only (plist) | |
(let* ((keys (mapcar #'make-keyword vars)) | |
(bindings (mapcar (lambda (var key) | |
`(,var (getf ,plist ,key))) | |
vars keys))) | |
`(symbol-macrolet ,bindings | |
,@forms))) | |
`(destructuring-bind (&key ,@vars &allow-other-keys) ,plist |
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
TEST> (disasm (let ((seg (make-segment))) | |
(assemble (seg) | |
(loop repeat 2 | |
do (assemble () | |
(inst jmp L0) | |
(inst nop) | |
L0 | |
(inst nop)))) | |
(finalize-segment seg) | |
(segment-contents-as-vector seg))) |
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
Finished running tests. | |
Status: | |
Expected failure: threads.pure.lisp / (WAIT-ON-SEMAPHORE SEMAPHORE-NOTIFICATION LP-1038034) | |
Expected failure: full-eval.impure.lisp / INLINE-FUN-CAPTURES-DECL | |
Failure: gc.impure.lisp / CODE/DATA-SEPARATION | |
Expected failure: packages.impure.lisp / USE-PACKAGE-CONFLICT-SET | |
Expected failure: packages.impure.lisp / IMPORT-SINGLE-CONFLICT | |
Failure: run-program.impure.lisp / IS-/BIN/ED-INSTALLED? | |
Failure: run-program.impure.lisp / (RUN-PROGRAM /BIN/ED) | |
Failure: run-program.impure.lisp / (RUN-PROGRAM INHERIT-STDIN) |
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
From a07ad9d65805c63e33e5376c9cda97d6962b8900 Mon Sep 17 00:00:00 2001 | |
From: death <death@adeht.org> | |
Date: Sun, 10 Dec 2017 04:55:15 +0200 | |
Subject: [PATCH] assembler: Make sure to process all back-patches | |
--- | |
src/compiler/assem.lisp | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
diff --git a/src/compiler/assem.lisp b/src/compiler/assem.lisp |
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
;;;; +----------------------------------------------------------------+ | |
;;;; | Advent of Code 2017 | | |
;;;; +----------------------------------------------------------------+ | |
(defpackage #:snippets/aoc2017/day10 | |
(:use #:cl) | |
(:import-from #:alexandria #:iota) | |
(:import-from #:constantia #:outs #:out) | |
(:export | |
#:day10)) |