Skip to content

Instantly share code, notes, and snippets.

View elcritch's full-sized avatar

Jaremy Creechley elcritch

View GitHub Profile
@favila
favila / bootstrap-txes-0-9-5173.edn
Created June 1, 2015 20:51
Find the bootstrap transactions for a datomic database. Bootstrap transactions are the first few transactions which create all the datoms necessary for datomic to work (e.g., the initial partitions, types, attributes, and tx functions). They are not accessible directly via the transaction log.
;; Result of bootstrap-txes function above under datomic 0.9.5173
;; Bootstrap transactions are 0,
;; More bootstrap transactions or datoms may be added in later datomic versions.
;; First non-bootstrap transaction is always T >= 1000.
;; Format is [[t [[e a v tx added] ...] ...] ...]
[[0
[[0 10 :db.part/db 13194139533312 true]
[1 10 :db/add 13194139533312 true]
[2 10 :db/retract 13194139533312 true]
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active March 29, 2024 19:56
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@martijnvermaat
martijnvermaat / gitlab-ipython-notebook.md
Last active May 8, 2023 00:53
View IPython notebooks in GitLab

Viewing IPython notebooks in GitLab

GitLab is open source software to collaborate on code (a GitHub clone to run on your own server). Clicking a blob (a file in a repository) in GitLab shows a nice rendering if GitLab supports the file type (e.g., images, Markdown documents), or its content as plain text otherwise. The patch described here adds support to GitLab for rendering IPython notebooks (.ipynb files).