- J. Gibbons, “Origami programming.”, The Fun of Programming, Palgrave, 2003
- C. McBride & R. Paterson, “Applicative programming with effects”, Journal of Functional Programming, vol. 18, no. 01, pp. 1-13, 2008.
- [E. Meijer, “Functional Programming with Bananas , Lenses , Envelopes and Barbed Wire”, 1991.][3]
- [W. Swierstra, “Data types à la carte”, Journal of Functional Programming, vol. 18, no. 04, pp. 423–436, Mar. 2008.][4]
- [L. Augusteijn, “Sorting morphisms” pp. 1–23. 3rd International Summer School on Advanced Functional Programming, volume 1608 of LNCS, 1998.][5]
- [V. Vene, “Functional Programming with Apomorphisms (Corecursion)” pp. 147–161, 1998.][6]
- [T. Uustalu & V. Venu, “Primitive (Co)Recursion and Course-of-Value (Co)Iteration, Categorically” Informatica, Vol. 10, No. 1, 5–26, 1999.][7]
This file contains 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
# gccmock - generate exploding link stubs from linker error messages | |
# | |
# Usage: gcc [files] 2>&1 | ruby gccmock.rb > [filename].c | |
LINK_SYMBOL = /"_([_a-z0-9]*)",/ | |
puts "#include <assert.h>" | |
puts "#define EXPLODE(name) void name() { assert(!\"unexpected call\"); }" | |
puts *ARGF.read.scan(LINK_SYMBOL).map { |a| "EXPLODE(#{a[0]})" }.sort.uniq |
This file contains 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
(def screen-width 100) | |
(def screen-height 30) | |
(defn scaled-x [x] | |
(- (* (/ x screen-width) 3.5) 2.5)) | |
(defn scaled-y [y] | |
(- (* (/ y screen-height) 2) 1)) | |
(defn mandel [x y iteration x0 y0 max-iteration] |
This file contains 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
(ns noize.core | |
(:use [overtone.live :exclude [midi->hz sharp flat scale run pitch shift]])) | |
(definst harps# [freq 440] | |
(let [duration 1] | |
(* | |
(line:kr 1 1 duration FREE) | |
(pluck (* (white-noise) (env-gen (perc 0.001 5) :action FREE)) 1 1 (/ 1 freq) (* duration 2) 0.25)))) | |
(def midi-0 8.1757989156) |
See furigana-shim instead.
This file contains 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
#!/bin/sh | |
convert -threshold 30% $1 pnm:- | gocr - | tr 'OI' '01' | tr 'A-Z' 'a-z' |
This file contains 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
(function(){ | |
var isGridActive = false; | |
var lineHeight = function(){ | |
return parseInt(window.getComputedStyle(document.body).lineHeight, 10); | |
}; | |
var gridDataURL = function(){ | |
var size = lineHeight(); |
This file contains 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
~ > cat /etc/fstab | |
proc /proc proc defaults 0 0 | |
/dev/mmcblk0p1 /boot vfat defaults 0 0 | |
/dev/mmcblk0p2 / ext4 defaults,noatime,nodiratime 0 0 | |
#/dev/mmcblk0p3 none swap sw 0 0 |
This file contains 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
#!/bin/sh | |
# Expose ssh on port 2222; solr on 8983; HTTP on 8001. | |
qemu-system-i386 \ | |
-m 1024 \ | |
-hda my-disk.img \ | |
-daemonize \ | |
-nographic \ | |
-net nic \ |
This file contains 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
1.9.3 | |
>> require "bigdecimal" | |
=> true | |
>> b = BigDecimal.new("1234") | |
=> #<BigDecimal:27c05e0,'0.1234E4',9(18)> | |
>> BigDecimal.new(b) | |
=> #<BigDecimal:27c0c70,'0.1234E4',9(18)> | |
1.9.2 |