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
I'm going to tell you my unconventional stack, and the reasoning for | |
it. You may or may not agree with it, but let's give it a try. | |
Most of the modern backend web frameworks were started maybe 15-20 | |
years ago, and the same patterns have continued to be used. But things | |
have changed since then: | |
* Disk is a lot faster (NVMe) | |
* Disk is a lot more robust (EBS Io2) | |
* RAM is super cheap |
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 decompile (lines) | |
(let ((lines (mapcar (lambda (x) | |
(read-from-string (format nil "(~a)" x))) | |
lines))) | |
(let ((expr `(when (= z 0) | |
(return-from do-run choices))) | |
(inp 0)) | |
(loop for line in (reverse lines) do | |
(destructuring-bind (cmd a &optional b) line | |
(let ((decl `(declare (type fixnum ,a)))) |
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
(let ((points (mapcar #'parse-integer (str:split "," (car (uiop:read-file-lines "~/builds/web/input")))))) | |
(let ((state (make-array 10 :initial-element 0))) | |
(loop for point in points do | |
(incf (aref state point))) | |
(loop for day below 256 do | |
(progn | |
(let ((new (aref state 0))) | |
(loop for i from 0 below 8 do | |
(setf (aref state i) | |
(aref state (1+ i)))) |
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
sdfsdfds | |
sdfsd | |
fsdf | |
dsf | |
sdf | |
sdfsd | |
fsd | |
fsd | |
fsd | |
fsdf |