Not to have but to be.
The black heart of the poppy,
O to lie there as seed.

To become the belovéd.
As the world ends, to enter
the last note of its music.

Denise Levertov

«There is a realm of time where the goal is not to have but to be, not to own but to give, not to control but to share, not to subdue but to be in accord. Life goes wrong when the control of space, the acquisition of things of space, becomes our sole concern.»
Abraham Joshua Heschel

Generations of stifled words, reaching out through you
Aching for utterance, dying on lips
That have died of hunger,
Hunger not to have, but to be.
Generations as yet unuttered, dumb, inchoate,
Unuttered by me and mine
In you I see them coming to be ....
John Dewey

Posted Fri 02 Nov 2012 21:49:44 GMT

How does that saying go? "When in doubt —". Let's ask the internet! The internet says:

When in doubt, don't
When in doubt, have friends over for dinner
When in Doubt... Roast
When in doubt, eat potatoes?
When in doubt, eat a cupcake
When in Doubt, Add Butter
When In Doubt, Add More Salt
When In Doubt, Use Parsley
When in Doubt, Leave it Out
When in Doubt, Open Your Mouth
When in doubt, wink, peace and pout
When in Doubt, Make Belief
When in Doubt, Register for Disaster Assistance
When In Doubt, Obliviate
When In Doubt, Wear Purple
When In Doubt, Wear Red
When in doubt, disaggregate
When in Doubt, Use Proxies
when in doubt, use Caslon
When in doubt, reboot?
When In Doubt, Simplify
When in Doubt, Think
When in Doubt, Read!
When In Doubt, Swab
When in Doubt, Seduce
When in doubt, suck
When In Doubt, Sing
When In Doubt, Swing
When in Doubt, Spend
When in doubt, shout
When In Doubt, Mumble
When in doubt, dither
When in doubt, look intelligent
When in doubt, just twirl
When in doubt, just hire a lobbyist
When In Doubt, Tell the Truth
When in Doubt, Smear the Dead Kid
When in Doubt, Bank on Love
When in doubt.... throw penguins
When in doubt, throw it out
When in Doubt, Cut It Out
When in Doubt, Spit It Out
when in doubt, whip it out
When In Doubt, Flop It Out
When in doubt, hug it out
When In Doubt, Fuck It
When In Doubt, Peel Out
When in Doubt: Get out
When in doubt, ROCK OUT!
When In Doubt, Recycle
When In Doubt, Don't "Toss It Out"
When in Doubt...Take them Out!
When in Doubt, Spin It Out
When in doubt, pinky out
When in doubt, work out!
WHEN IN DOUBT, WORKOUT
When In Doubt, Keep Pedaling
When in Doubt, Step on the Gas
When in Doubt, Put It in Flacourtiaceae
When in Doubt, Just Add a Million
When in Doubt... Leave it at 350
When in doubt, go higher
When in Doubt, Go for a Handshake
When in doubt, go with your gut
When in doubt, punt
When in Doubt, Insure
When In Doubt... Pray!
When In Doubt, Do Right
When in doubt, blame the Nargles
When in Doubt, Blame the Singer's Girlfriend
When in doubt, blame the Tea Party!
When In Doubt, Blame Obama
When in Doubt, Blame Congress
When In Doubt, Blame The Media
WHEN IN DOUBT... BLAME A JEW!
When in doubt, there's always Islamophobia
When in Doubt, Fire the Manager
When In Doubt, Ask a Pats Fan!
When in Doubt, Check Him Out
WHEN IN DOUBT, KISS CRAIG!
When In Doubt, Make It Public
When in doubt, tell the truth
When In Doubt, Shoot
when in doubt, shoot first, compose later
When in Doubt, Send Plain Text Email, Not Fancy HTML
When in Doubt, Breathe Deeply
When in doubt, go left!
When In Doubt, Have Joseph Gordon-Levitt Take His Shirt Off
When in doubt, take a sack
When in doubt, go to the library
When In Doubt, Map It
When In Doubt, Cite It
When in doubt, GOOGLE that shit

Posted Wed 31 Oct 2012 01:52:28 GMT

Cyclist is an experiment I made in generating sound by describing samples directly as a function of time. This is easier to demonstrate than to explain.

<video type='video/webm; codecs="vp8.0, vorbis"' src="http://rhydd.org/~daf/misc/cyclist.webm" controls="true" width="640" height="368"

Video of a cyclist session.

Cyclist expressions are composed of simple arithmetical expressions (multiplication, division, addition, subtraction, exponentiation, modulus) and the functions sin() and saw(). t is a special variable denoting time; the expression is implicitly a definition of a function f(t). Free variables become implicit parameters the values of which are controlled by sliders.

Frequency and amplitude modulation can be expressed quite simply. Things get really interesting when you do higher-order modulations, as you can see in the video.

I wrote a MIDI input mode to Cyclist (piano.py). This makes it behave sort of like a programmable synthesiser such as the DX-7, except that there's no way to represent releasing a key, so it doesn't behave much like a keyboard. Connecting parameters to MIDI knobs would be easy.

Cyclist is written in in Python; expressions are evaluated by being translated to LLVM and JITted. This is probably overkill, but doing it this way was interesting and it meant that speed has never been a problem. Something like Theano or just plain NumPy would probably work fine.

I ended up writing a combinatoric parsing library when I couldn't work out why my original SimpleParse-based parser was incredibly slow. But that's another story.

Code: git repository

Posted Mon 09 Jan 2012 07:45:41 GMT Tags:

When I lived in another Cambridge, opposite the blank tape shop, I had a radio alarm clock left in my room by its previous occupant. Radio 4 would mingle with my dreams and eventually wake me up.

Alas, in this Cambridge the Beeb does not roam the airwaves. But we can lure it across the ocean subaquatically.

till -s 10:00 && get-iplayer --stream 12826 --player="audioramp"
Posted Sun 01 Jan 2012 00:33:28 GMT Tags:

When a test that compares a complex expected value to a complex actual value fails, it can be tricky to work out what went wrong. A standard equality assertion (such as assertEquals in Python's unittest or @=? in Haskell's HUnit) that prints the expected and actual values in full can be rather unhelful, leaving you to manually compare two large chunks of text for minute differences.

A few times I've ended up writing new assertions that perform a diff when the expected and actual values don't match; this week I found myself writing one for HUnit using the Diff and pretty-show packages.

a @==? b = do
  when (a /= b) $ assertFailure diff

   where
     diff = diffStr (getDiff (lines $ ppShow b) (lines $ ppShow a)) ""
     diffStr xs _ = '\n' : concatMap
                    (\(di, s) -> diChar di : ' ' : s ++ "\n") xs

     diChar B = ' '
     diChar F = '-'
     diChar S = '+'

And of course you can define (@?==) = flip (@==?).

Python's doctests have this feature built in, but doctests are considered harmful. It's not too difficult to implement something similar using difflib.

Posted Mon 26 Dec 2011 06:36:48 GMT

One things I've missed in zsh coming from bash is the "help" command, which is handy for quickly looking up built-in shell commands.

$ help pwd
pwd: pwd [-LP]
     Print the name of the current working directory.
...

zsh has the zshbuiltins(1) man page, but it's tedious to find the documentation for the command you're interested in. sed to the rescue!

help()
{
    man zshbuiltins | sed -ne "/^       $1 /,/^\$/{s/       //; p}"
}
Posted Sun 27 Nov 2011 20:05:02 GMT Tags:

The Catalonians have a saying that goes “Menjar be i cagar fort / I no tingues por de la mort”, which is translated as “Eat well and shit strongly / And you won't fear death”, or sometimes as “And don't fear death”.

This advice is borne out by nutrition research that links greater bowel movement regularity and greater stool size to lower incidences of a number of diseases.

Posted Wed 16 Nov 2011 10:03:07 GMT Tags: