Skip to content

Instantly share code, notes, and snippets.

View spacepluk's full-sized avatar

Oscar Morante spacepluk

  • Berlin
  • 00:39 (UTC +01:00)
View GitHub Profile
@ofan
ofan / lisp.cpp
Last active October 23, 2024 10:37
Lisp interpreter in 90 lines of C++
Lisp interpreter in 90 lines of C++
I've enjoyed reading Peter Norvig's recent articles on Lisp. He implements a Scheme interpreter in 90 lines of Python in the first, and develops it further in the second.
Just for fun I wondered if I could write one in C++. My goals would be
1. A Lisp interpreter that would complete Peter's Lis.py test cases correctly...
2. ...in no more than 90 lines of C++.
Although I've been thinking about this for a few weeks, as I write this I have not written a line of the code. I'm pretty sure I will achieve 1, and 2 will be... a piece of cake!
@spion
spion / a-warning.md
Last active August 24, 2024 13:09
C++ versus V8 versus luajit versus C benchmark - (hash) tables

Warning

This benchmark has been misleading for a while. It was originally made to demonstrate how JIT compilers can do all sorts of crazy stuff to your code - especially LuaJIT - and was meant to be a starting point of discussion about what exactly LuaJIT does and how.

As a result, its not indicative of what its performance may be on more realistic data. Differences can be expected because

  1. the text will not consist of hard-coded constants
@defunctzombie
defunctzombie / browser.md
Last active July 15, 2024 04:13
browser field spec for package.json
@mrflip
mrflip / tuning_storm_trident.asciidoc
Last active October 8, 2024 15:18
Notes on Storm+Trident tuning

Tuning Storm+Trident

Tuning a dataflow system is easy:

The First Rule of Dataflow Tuning:
* Ensure each stage is always ready to accept records, and
* Deliver each processed record promptly to its destination
@sandys
sandys / T430S configuration
Last active December 21, 2017 00:25
super lean and fast Ubuntu 12.04 install. It doesnt hang and with firefox open, it consumes 500 mb of RAM ! - Now works with Ubuntu 14.04/Trusty Tahr!
# http://nodebox.metaforix.net/articles/debian-on-lenovo-thinkpad-t420
#create new file /usr/share/X11/xorg.conf.d/99-my.conf
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
@branneman
branneman / better-nodejs-require-paths.md
Last active October 18, 2024 20:29
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@pascalpoitras
pascalpoitras / config.md
Last active October 7, 2024 01:35
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@aeroevan
aeroevan / mutt 1.5.22 kyotocabinet
Created March 12, 2014 14:48
kyoto-cabinet support for mutt
From d05824c53dfeb99fd2f6846e4b8331dee10f96c9 Mon Sep 17 00:00:00 2001
From: Evan McClain <[email protected]>
Date: Wed, 12 Mar 2014 10:14:09 -0400
Subject: [PATCH] mutt: kyoto-cabinet support.
---
configure.ac | 30 +++++++++++++++++++++++++++++-
hcache.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+), 1 deletion(-)
@domenic
domenic / removing-module-x-from-y.md
Last active August 29, 2015 14:02
Practical implications of removing `module x from "y"`

Practical Implications of Removing module x from "y"

Background

According to this gist, the modules break-out session at TC39 (a subset of the larger committee) decided to remove the

module x from "y";

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post