3 ms·
I'd be keen to see a simple example of this pattern in Lisp (or another language). Does anybody have a good link?
by konamicode 8y ago
I'd be keen to see a simple example of this pattern in Lisp (or another language). Does anybody have a good link?
- pavlov 8y agoI use it by default for new Node.js projects (most of which are experiments but some end up in production, and have been running without problems for years). It's a simple pattern to implement. To make it a bit easier to use repeatedly, I've got a small helper class called JournaledCollection. You pass it serialize+deserialize callbacks for your item type, and it takes care of persistence in event logs. For a while I was thinking about releasing my helpers as a project called LAUF, short for "Lame-Ass Un-Framework". Then one could say: "Most of my projects are LAUFable, I don't need anything more serious." (Awful dad jokes are a solid reason to publish open source, right?) Never got around to it though, but if you're interested, I could put together an example.
- chrisweekly 8y agoI like the name -- and it sounds worth sharing!
- michaelmcmillan 8y agoHere's one I'm currently using in node (wrote it as another comment): https://news.ycombinator.com/item?id=19499799 https://news.ycombinator.com/item?id=19499799
- stevelosh 8y agosjl at alephnull in ~/Desktop ><((°> sbcl [SBCL] CL-USER> (defparameter *name* "World") *NAME* [SBCL] CL-USER> (defun foo () (format t "Hello, ~A~%" *name*)) FOO [SBCL] CL-USER> (sb-ext:save-lisp-and-die "session.core") sjl at alephnull in ~/Desktop ><((°> sbcl --core session.core [SBCL] CL-USER> (foo) Hello, World NIL