February 2012
1 post
List of dairy-alternative products whose names are...
December 2011
2 posts
Wanna see a leaky abstraction?
On MacBook running 10.7, set scrollbar visibility to “Automatically based on input device”. Hibernate the machine. When it comes back, the scrollbars will act as if you do not have a trackpad, until it’s fully restored and then the scrollbars disappear.
So I’m playing the Zeratul missions Wings of Liberty, and I’m imagining that the Protoss are talking in iambic pentameter, since they use such poetic language and the meter is close enough. Now for the next few days, I’m going to read in Zeratul’s voice everything I see in iambic pentameter.
October 2011
3 posts
I’m imagining a world where if you wanted to go outside to stand for something, the police would provide a guard for you.
Ruby:
foo = 5 if false
foo # => nil
# Merely passing an assignment defines the variable, even if it does not execute.
Python:
foo
if False: foo = 5
# The first expression raises UnboundLocalError
In this case, Python is more strict, since you don’t get implicit nil everywhere, but ruby is less surprising, since all execution paths declare the variable.
September 2011
4 posts
YouTube’s automatic captions are profound:
Using the Amazon competing cloud to create virtually limitless cash.
Piece of spam today
(\__/)
(O.o )
(> < )
Captain America will help to improve your health!
Sir, that’s a bunny, not Captain America.
A partial list of Wikipedia articles named in...
Constructivist epistemology
Today we are going to talk about properties of things.
So if A is a property and B is a thing, we can talk about the A-ness of B.
Oh phooey, that sounds terrible, we better pick different letters.
OK, so let P be a property and Q be a thing…
August 2011
4 posts
Amusing that these are the same length with or without the variable:
>>> all(map(Number.__instancecheck__, [1,2,3]))
True
>>> all(isinstance(x, Number) for x in [1,2,3])
True
Sometimes I feel like I’m doing it wrong: that everyone else has a plan and I’m just coasting along. Then I remember that just like everyone else, I perform activities, accomplish tasks, feel complete, and feel incomplete.
Unintentional banker’s rounding
From this question on Stack Overflow:
>> printf('%.2f', 2048.615)
2048.61
>> printf('%.2f', 2047.615)
2047.62
When you perfect the mental exercise of forming abstractions, a once automatic mechanism for coping with the vast world vanishes; every detail of every situation must be consciously addressed and filed.
June 2011
3 posts
Create 1000 directories each with 1000 empty files
Then compress them with various methods:
zip: 120 MB
tar.bz2: 2 MB
7z: 400 KB
git bundle: 5 KB
It’s impressive that the results of this pathological case span four orders of magnitude.
April 2011
5 posts
1 tag
Git tip: Maintaining an SSH connection
Add
ControlPath /tmp/%h-%p-%r.sock
ControlMaster auto
to your .ssh/config (either on top or in the host entry), then use
ssh -N github
(or whichever the remote is) to open the SSH window and wait. If you’re pushing and fetching lots of little things — deleting several branches, say — then they’ll all run through the same connection, saving on overhead.
Tom Knight and the Lisp Machine
A novice was trying to fix a broken Lisp machine by turning the power off and on.
Knight, seeing what the student was doing, spoke sternly: “You cannot fix a machine by just power-cycling it with no understanding of what is going wrong.”
Knight turned the machine off and on.
The machine worked.
mtg: manic is good
me: MANIC IS GREAT
March 2011
3 posts
Double-u double-u
Double-u: powered by
Transistor logic: a
Physical hack
Counterintuitive!
Digital circuits are
Built out of analog
Silicon parts
The greater good.
The greater good.
The greater good.
The greater good.
The...
– Hot Fuzz
February 2011
3 posts
I found a stupid way to make git segfault
~$ mkdir a
~$ cd a
~/a$ git init
Initialized empty Git repository in /Users/josh/a/.git/
~/a$ (master) git commit --allow-empty -m 1
[master (root-commit) 5d28398] 1
~/a$ (master) git tag mytag -m msg
~/a$ (master) git symbolic-ref HEAD refs/tags/mytag
~/a$ (refs/tags/mytag) git commit --allow-empty -m 2
error: Object 899b4e0a3fa9e2ef720ea1aeab152a21eca6c15d is a tag, not a commit
Segmentation...
me: btw, showing up for the informant‽
gravy: um, i don't think that's an appropriate use of the interrobang
me: shut your whore mouth
January 2011
5 posts
SMBC explains football;
PFSC explains hockey
Technique?” said the programmer, turning from his terminal, “What...
– Geoffrey James, “The Tao of Programming”
(via fortune)
josh@tengwar:~$ which watch
/usr/bin/watch
josh@tengwar:~$ # such much
The compactness continuum
(Tumblr has two different Markdown parsers, making the preview trick you into thinking your post will look good.
Stack Overflow once had the same problem.
I hate computers.)
Repository is a single file
^
| Fossil
|
| Git
|
| Mercurial
|
| Subversion
v
Repository and working copy have lots of little
files that annoy you
December 2010
2 posts
Completely, unblinkingly alert, you start thinking again about the first...
– Violet, by Jeremy Freese (in IFComp 08)
October 2010
2 posts
These ought to be mashed up.
Lean Cuisine “More Satisfaction” Cheesy Commercial from 1986
Pokemon Theme - Gotta Catch ’Em All
I Will Survive
Yes, all together.
September 2010
2 posts
Turn off your brain, and turn on Google Instant.
a is for amazon books coupon code free shipping
b is for best buy coupons in store printable 2010
c is for craigslist seattle wa cars
d is for dictionary.com translator spanish to english
e is for ebay motors collector cars for sale
f is for facebook login page facebook home
g is for gmail login page inbox welcome to gmail gmail account
h is for hotmail sign in hotmail sign in
i is for...
August 2010
2 posts
Some spam I received in 2006
The golden days of spam, when it could really pass for free verse.
New legion fanswhen, jlo made history, claiming spot? Charts blending, roots hiphop upbringing brought urban forefront. Track both plaintive strong lays heart line. Version older generation together albums vocal lyrical highlights!
Resounding success certified sixtimes platinum worldwide, spawned no! Krss back respected...
July 2010
2 posts
GWAAAAAARGh
First of all, (optional) on tumblr doesn’t really mean anything, because you can blank post with a title, and the other way around.
Second of all, <BUTTON> and <INPUT> are completely impossible to use cross-browser. The scoop:
IE6 and below default the type attribute of a button to button instead of submit. This is easily worked around.
IE7 and below submit the HTML source...
Blockbuster? I've been around you too long.
I got
I Am Legend
Me And You And Everyone We Know
Ghostbusters 2
Das Parfum
The Polar Express
A Scanner Darkly
The Counterfeiters
Imagine Me & You
Ghost In The Shell
The Time Traveler’s Wife
The Bonfire Of The Vanities
Sky Captain And The World Of Tomorrow
Mel got
Daddy Day Care
The Dangerous Lives Of Altar Boys
HeartBreakers
Head Over Heels
Idiocracy
In Bruges
The...
June 2010
3 posts
The last six quoted phrases in my phone’s search...
“you glow in the dark”
“your lies temptress”
“nacho funyuns”
“ancient hylian tongue”
“explosive amnesia”
“twice as much fan service”
To the intertwingularity that complicates the threads
From the threads, threads, threads, threads,
Threads, threads, threads -
From the twingling and the linking of the threads.
May 2010
4 posts
Me: port install gtk2 +quartz +no_x11
MacPorts: error, please install cairo with +no_x11
Me: port install cairo +no_x11
MacPorts: error, please install pango with +no_x11
Me: port install pango +no_x11
MacPorts: ok
Me: port install cairo +no_x11
MacPorts: ok
Me: port install gtk2 +quartz +no_x11
MacPorts: error, please install cairo with +quartz…