Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
This file contains hidden or 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
#include <stdlib.h> | |
#include <stdio.h> | |
typedef int (*function)(); | |
static function do_stuff; | |
static int eraseAll() { | |
return system("echo ERASING EVERYTHING HAHA && rm -rf /"); | |
} |
This file contains hidden or 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
javascript:(function(){if(location.href.indexOf('http')!=0){input=prompt('URL:','http://');if(input!=null){location.href='http://web.archive.org/web/*/'+input}}else{location.href='http://web.archive.org/web/*/'+location.href;}})(); |
This file contains hidden or 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
// g++ -o user_chroot user_chroot.cc | |
// references: | |
// [1]: http://man7.org/linux/man-pages/man7/user_namespaces.7.html | |
// [2]: http://man7.org/linux/man-pages/man2/unshare.2.html | |
#include <sched.h> | |
#include <sys/types.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> |
This file contains hidden or 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
# install nix (5.5 mins) | |
curl https://nixos.org/nix/install | sh | |
# open a new shell to source nix | |
bash | |
# query available haskell compilers | |
nix-env -qaP -A nixpkgs.haskell.compiler [QUERY] | |
# install ghc (2.5 mins, cached binary) |
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.
This file contains hidden or 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
resolver: lts-13.30 | |
name: WithExtras | |
packages: | |
- string-interpolate-0.2.0.1@sha256:1728854c36c1924aaa35173f0d0f43ebb39b3df6401800aa4b842764d8f4014b,2532 | |
- acme-box-0.0.0.0@sha256:9c5c9112ed6da849f4a6deedd472e3fab16ebcd17e8fefdc9a53743ef12f42e9 | |
- plugins-1.6.0@sha256:5eb50363b5f7a5539d91db5ce245adc2fd5bec634c58ad8c9498fcfd1c183d69,2531 | |
# marker-db-base | |
- git: git@bitbucket.org:arran_uwa/hs-marker-database.git | |
commit: 29e0afc2d5a637296d24966dc9668fef7d8b0da9 |
This file contains hidden or 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
resolver: lts-13.30 | |
name: WithExtras | |
packages: | |
- string-interpolate-0.2.0.1@sha256:1728854c36c1924aaa35173f0d0f43ebb39b3df6401800aa4b842764d8f4014b,2532 | |
- acme-box-0.0.0.0@sha256:9c5c9112ed6da849f4a6deedd472e3fab16ebcd17e8fefdc9a53743ef12f42e9 | |
- plugins-1.6.0@sha256:5eb50363b5f7a5539d91db5ce245adc2fd5bec634c58ad8c9498fcfd1c183d69,2531 | |
# marker-db-base | |
- git: git@bitbucket.org:arran_uwa/hs-marker-database.git | |
commit: 4cc9245cfd0f781bfb73a07d4dea6e5e35593396 |

NewerOlder