Original text from http://lists.warhead.org.uk/pipermail/iwe/2005-July/000130.html
From: Mark Jason Dominus <mjd@plover.com>
Date: Jul 28, 2005 11:16 PM
Subject: Re: HOP -vs- SICP
| mark@mark-pc2:~/tmp/patterns$ cat Test.scala | |
| sealed trait Foo | |
| case object A extends Foo | |
| case object B extends Foo | |
| object Test { | |
| def f(foo: Foo) { | |
| foo match { | |
| case A if true => | |
| println("A") |
| ~/tmp/units-2.11$ make clean | |
| rm -f *.o units units.fn units.ky units.pg units.tp \ | |
| units.vr units.log units.dvi units.1 units.cp distname .chk \ | |
| units.toc units.aux units.cps units.op units_cur_inst units_cur | |
| ~/tmp/units-2.11$ time (./configure && make) | |
| checking for gcc... gcc | |
| checking whether the C compiler works... yes | |
| checking for C compiler default output file name... a.out | |
| checking for suffix of executables... |
| (ns exp.cache | |
| "I keep screwing myself up on this and need to write it out. | |
| Caching impl with these constraints: | |
| - caching is layered onto oblivious source fns | |
| - data to cache is some unparsed source data that is transformed in a non-trivial way | |
| - thr raw source data is not interesting to most users and shouln't mess up the api | |
| - caching the final transformed thing is not desireable since we often change the transformation fn | |
| - not all source data should be cached |
| (def person1 {:fname "John" :mname "Q" :lname "Doe"}) | |
| (def person2 {:fname "Jane" :mname "P" :lname "Doe"}) | |
| (defn fname-compare [p1 p2] | |
| (do | |
| (println "Comparing fname") | |
| (compare (:fname p1) (:fname p2)))) | |
| (defn lname-compare [p1 p2] | |
| (do |
| def time[R](block: => R): R = { | |
| val t0 = System.currentTimeMillis | |
| val result = block // call-by-name | |
| val t1 = System.currentTimeMillis | |
| println("Elapsed time: " + (t1 - t0) + "ms") | |
| result | |
| } | |
| val list1 = 1 to 10000 toList | |
| val ary1 = 1 to 10000 toArray |
Original text from http://lists.warhead.org.uk/pipermail/iwe/2005-July/000130.html
From: Mark Jason Dominus <mjd@plover.com>
Date: Jul 28, 2005 11:16 PM
Subject: Re: HOP -vs- SICP
| // ==UserScript== | |
| // @name Hide who to follow on twitter | |
| // @namespace http://blog.markfeeney.com | |
| // @version 0.1 | |
| // @description Hide the who to follow thing on twitter. | |
| // @match https://twitter.com/* | |
| // @copyright 2012+, Mark Feeney | |
| // ==/UserScript== | |
| // 2 seconds ought to be enough for anyone |
| #################################### | |
| # BASIC REQUIREMENTS | |
| # http://graphite.wikidot.com/installation | |
| # http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
| # Last tested & updated 10/13/2011 | |
| #################################### | |
| sudo apt-get update | |
| sudo apt-get upgrade |