Real World Haskell for Free 0

Posted by devin

Anyone interested in learning Haskell will be happy to know that O'Reilly is providing the book's content in its entirety online-- for free!

Well, what are you waiting for? Get some functional programming in your life.

On a similar note-- I would be remiss if I didn't mention the main reason I became interested in Haskell is an incredible tiling window manager (written in 400 lines of Haskell) by the name of xmonad. I'll probably write up a post on it in the near future to give some hints on setup and how to use it, so check back if you're interested. Keep hacking.

MATH AND ALCOHOL DO NOT MIX! 0

Posted by devin

Please, don't drink and derive.

Paid for by Mathematicians Against Drunk Deriving

Truth 0

Posted by devin

eleventh grade

Remember the Hype Cycle 0

Posted by devin

Hype Cycle.

RubyCurses On GitHub 0

Posted by devin

The Accidental Rubyist created a neat little bag of tricks for making command line curses apps. It's worth a look if you're interested in prettifying your scripts. Check it out over at GitHub.

Two Good Quotes 0

Posted by devin

“Do not go where the path may lead; go instead where there is no path and leave a trail." --Ralph Waldo Emerson

Another take on the same quote:

"Wherever everybody else looks, look somewhere else and go do something different." --Charles Elachi

Merlin Mann on Maximizing Your Time 0

Posted by devin

Stevie Wonder # => Talk Box 1

Posted by devin

Clojure && Rubato: Expressive Typing 0

Posted by devin

Another attempt at articulating what I'm talking about! Forget TSO; I've changed a few things and am calling TSO "Rubato" instead. The aim is to give the user the ability to craft sequences by simply typing words, sentences, paragraphs, and so on. I've drawn a bit of inspiration from what rubato means by definition:

Rubato (roo-BAH-toe) A practice common in Romantic compositions of taking part of the duration from one note and giving it to another. It involves the performer tastefully stretching, slowing, or hurrying the tempo as she/he sees fit, thus imparting flexibility and emotion to the performance.

My last post on Rubato sheds a bit of light on how I plan to glean semi-valuable output from sentences. I would like to outline what I believe are going to play an integral role in further developing the project:

Clojure What the heck is Clojure? Clojure is a purely functional programming language that uses many of the ideas of Lisp, but goes one step further to integrate with the JVM. The benefits of which are not limited to better concurrency on quad-core machines, and of course the idea of code as data. From my research on languages like Haskell, Erlang, OCaml, Lisp, etc. I believe Clojure will provide the right combination of extensibility and performance. In fact, in the performance department it might be a little overkill, but as I get the feature creep-- more and more interesting pathways for Rubato are shaping up. Clojure also allows metadata with are attributes, not properties-- and these can be hidden from view if need be. The context of a particular word in a sentence, for instance, might include its original contextual metadata, to preserve its original state as it evolves.

With that said, a few ideas to produce the best "quality" representation of the user's input:

  1. Taking a page from the current research being done in linguistics, I plan to use generative grammar to model real human sentences as trees. Clojure will prove very useful in this process with many of the wonderful AI ideas borrowed from Lisp.
  2. I've considered using formant analysis on words within the user's input as a possible avenue for enumerating which probabilities I will apply.
  3. Genetic algorithms present a very interesting way of molding input-- I read an article published in 2007 in Nature I believe about a researcher using linguistic hierarchies to talk about music. Another example of this idea is another research group whose name also escapes me at the moment-- who built a genetic algorithm that would create Bach fugues from a set of initial random values. Obviously there was a whole lot going on underneath the surface that I don't yet understand-- but I think a generative best fit analysis on the data Rubato produces will unveil some of the mystery in how we can shape and bend the user's input without say, 5,000 generations.
  4. Interface!!! You know, it's always fun to sit around thinking about what we can do, but the primary goal of this project is to provide end users some means of artistic expression that does not feel cold and lifeless. The interface in this instance is the user's initial input. However, I've been thinking about ways in which I might incorporate real-time editing capabilities. If you only get to throw one big bucket of paint at the canvas, you're not an artist, you're a pretentious MOMA gallery.

All kidding aside, I have some hopes and dreams with regard to the interface, but like most of the ideas in this article -- we'll see what sticks after I get the bones dancing in Clojure.

  1. I'd like to make this a collaborative process if at all possible. Think: writing poetry that creates music in real-time with another human. In addition, I think it might be interesting as a sort of psychology experiment to take a user's paragraph, and have another subject describe the qualities, important aspects that could be turned into musical expression. From there we would apply those qualities and move it along until we reach some kind of consensus on a fair representation of the original user's input.
  2. iPhone? Something tells me the processing power is not going to be enough to handle Rubato in its finished form, but perhaps a stripped down version would be interesting work with.
  3. Command-line interface. Edit in your favorite editor and listen to the changes in real-time.

One more thing ASCII Rave! Written in Haskell, purely functional, incredibly cool.

TSO: Text to Sound Objects

Posted by devin

I’ve obsessed for the past few years over a project that basically involves turning letters into tones, words into chords, sentences into melodies, and paragraphs into complete musical thoughts. It’s difficult to know where to begin, but here is an example of what I imagine:

The house is red. It has a window, a door, and a chimney. Three people live there. It’s in a nice neighborhood.

Let’s take the first sentence, and map the key of C to it:

T h e  h o u s e  i s  r e d.
A B C  B D G B C  F B  E C D.

So how do we make this work? This stage isn’t really all that complicated. What becomes interesting now is interpreting the random values we’re assigning to this sentence using various perspectives from the music theory side of things, to make a sound structure to build upon. Our first sentence defines domain in which other words and sentences will be interpreted.

A B C could be played in any variation as single notes, in harmony (A C would probably sound most recognizable), or perhaps we’ll just pick one note from that word and use it. How “house” will act in this context brings another level of complexity to the table. “The” defines the starting point arbitrarily, and “house” must use what it contains to work with “The”. Depending on the type of music you’re trying to reproduce, there are many many paths one might take in deciding what “house” will mean to “The”. I’ve only taken a limited amount of college level music theory, but I’ll take a stab at how I might proceed. For the purposes of demonstration, let’s call “The” a chromatic A B C musical phrase.

B D G B C contains a G chord (G B D (the V chord in the key of C)). If no possible chord existed in this case we could do the same as we did with “The”, only this time, it would be keeping in mind what “The” represents musically. Our domain is a little more narrowly defined now that we have a starting point. I could give you a bunch of examples of how we could proceed, but I’m going to try and keep this post quick and dirty. Let’s call “house” a G chord.

Our current work at this point in case I’m losing you:

A B C (G chord)

Now we tackle “is” in this context (F B). B is the leading tone in the key of C, and happens to come before the final word in the sentence, so let’s use it.

A B C (G chord) B

Finally, “red” translates to E C D. We’re heading home with the leading tone, so let’s use C and E in harmony.

If you’re still reading, we have a sentence!

A B C (G chord) B (C E).

Check out how it sounds by listening to midi representation.

I’m going to put this to bed for the night and edit to include the details I know I’m forgetting. This idea has been in my head for a long time and committing all of those fleeting thoughts to paper is going to be a challenge. Thanks for reading. I hope anyone who has experience or thoughts on this subject will comment. Input is much appreciated.

A World of Ideas

Posted by devin

a world of ideas is a huge archive of lectures on all sorts of interesting topics. For those of you who know me: When I say something that sounds really pretentious like "I saw a lecture the other day about [fill in the blank]", this is probably where I found it.

Toss anything you found particular interesting down in the comments and I'll be sure to check it out.

Randy Pausch: Last Lecture

Posted by devin

More evidence I know absolutely nothing about life:

I would be remiss to not mention: Link

For those of you who have seen the video above, the book is certainly better. It's a quick read and I highly recommend it.

Reading C Type Declarations, wmii3, and Camping

Posted by devin

A quick rundown of interesting links I've been perusing the past week:

  • Here is a great article about reading C type declarations.
  • Camping Explained is a series about all of the neat meta programming going on inside of the tiny camping web framework.
  • _Why gives us a few hacks for playing with my favorite dynamic tiling window manager: wmii3.

Kurt Vonnegut: Kilgore Trout's Stories

Posted by devin

It was about a planet where the language kept turning into pure music, because the creatures there were so enchanted by sounds. Words became musical notes. Sentences became melodies. They were useless as conveyors of information, because nobody knew or cared what the meanings of words were anymore. So leaders in government and commerce, in order to function, had to invent new and much uglier vocabularies and sentence structures all the time, which would resist being transmuted to music.

Check the rest of them out here.

Hackers the Movie in IRC Format

Posted by devin

Someone decided to pick up the old hackersmovie.com domain and turn the entire script into IRC format. The result is good fun.

Observe:

 *** Hacker (hacker@some.hacker) has joined channel #OTVSystem
 <Dade:#DadesRoom> hey!
 <Hacker:#OTVSystem> U HAVE TREAD UPON MY DOMAIN & MUST NOW SUFFER
 <Hacker:#OTVSystem> WHO R U?
 <Dade:#DadesRoom> zero
 <Dade:#DadesRoom> no uh wait.
 *** Dade is now known as CrashOverride
 <CrashOverride:#OTVSystem> CRASH OVERRIDE.
 <CrashOverride:#OTVSystem> WHO WANTS TO KNOW?
 *** Hacker is now known as AcidBurn
 <AcidBurn:#OTVSystem> ACID BURN
 <CrashOverride:#DadesRoom> unbelievable!
 <CrashOverride:#DadesRoom> a hacker!
 <AcidBurn:#OTVSystem> ACID BURN SEZ LEAVE B 4 U R EXPUNGED
 <CrashOverride:#DadesRoom> yeah ok Acid Burn
 <CrashOverride:#DadesRoom> thats enough
 <AcidBurn:#OTVSystem> I WILL SWAT U LIKE THE FLY U R
 <AcidBurn:#OTVSystem> I WILL SNAP YOUR BACK LIKE A TOOTHPICK
 <CrashOverride:#OTVSystem> MESS WITH THE BEST DIE LIKE THE REST
 <AcidBurn:#OTVSystem> YOU ARE TERMINATED
 *** CrashOverride has been kicked off channel #OTVSystem by AcidBurn (CONNECTION TERMINATED)