Skip to content

Instantly share code, notes, and snippets.

View mathias's full-sized avatar

Matt Gauger mathias

View GitHub Profile
For all major modes:
52317 31.82% self-insert-command €..ÿ
17695 10.76% next-line C-n, <down>
15124 9.20% previous-line C-p, <up>
11891 7.23% left-char <left>
11699 7.12% paredit-backward-delete
11364 6.91% right-char <right>
4378 2.66% delete-backward-char
4336 2.64% mwheel-scroll <C-wheel-down>, <S-wheel-down>, <wheel-down>, <C-wheel-up>, <S-wheel-up>, <wheel-up>
1] pry(main)> Integer("1")
=> 1
[2] pry(main)> "1".to_i
=> 1
[3] pry(main)> Integer("lol")
ArgumentError: invalid value for Integer(): "lol"
from (pry):3:in `Integer'
[4] pry(main)> "lol".to_i
=> 0
Compiling app.js...
CLJS options:
{:main boot.cljs.app,
:target :nodejs,
:output-to
"/Users/mathiasx/.boot/cache/tmp/Users/mathiasx/dev/boot-with-node/1wtr/xaiggh/app.js",
:optimizations :none,
:output-dir
"/Users/mathiasx/.boot/cache/tmp/Users/mathiasx/dev/boot-with-node/1wtr/xaiggh/out",
:asset-path "out"}
var path = require("path");
try {
require("source-map-support").install();
} catch(err) {
}
require(path.join(path.resolve("."),"out","goog","bootstrap","nodejs.js"));
require(path.join(path.resolve("."),"out","cljs_deps.js"));
goog.global.CLOSURE_UNCOMPILED_DEFINES = {"cljs.core._STAR_target_STAR_":"nodejs"};
goog.require("boot.cljs.app");
goog.require("cljs.nodejscli");
@mathias
mathias / #symbolics-code-of-conduct.md
Last active August 29, 2015 14:27
#symbolics Code of Conduct

Code of Conduct

The #symbolics IRC channel is dedicated to providing a harassment-free experience for everyone, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of participants in any form. Sexual language and imagery is not appropriate without discussion and pre-approval from a moderator. Participants violating these rules may be sanctioned or expelled from the group at the discretion of @mathiasx or another moderator.

Harassment includes offensive verbal comments related to gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, religion, sexual images in public spaces, deliberate intimidation, stalking, following, harassing photography or recording, sustained disruption of discussion, inappropriate contact, and unwelcome sexual attention.

Participants asked to stop any harassing behavior are expected to comply immediately.

If a par

[1] pry(main)> require 'uri'
=> true
[2] pry(main)> uri = URI.parse("http://google.com")
=> #<URI::HTTP:0x007f83a90df848 URL:http://google.com>
[3] pry(main)> uri.port
=> 80
lval* builtin_join_str(lenv* e, lval* a) {
for(int i = 0; i < a->count; i++) {
LASSERT_TYPE("join", a, i, LVAL_STR);
}
lval* x = lval_pop(a, 0);
while (a->count) {
lval* y = lval_pop(a, 0);
char* concatted = malloc(strlen(x->str) + strlen(y->str) + 1);
(defun {uncurry f & xs} {f xs})
()
lispy> (uncurry head 5 6 7)
{5}
lispy> (def {add-mul} (\ {x y} {+ x (* x y)}))
()
lispy> add-mul 10 20
210
lispy> add-mul 10
(\ {y} {+ x (* x y)})
lispy> (def {add-mul-ten} (add-mul 10))
()
lispy> add-mul-ten 50
510
lispy> def {x} 100
()
lispy> x
100
lispy> def {a b} 5 6
()
lispy> a
5
lispy> b
6