Thermal Noise

Icon

The Adventures Of A Unix Programmer

Haskell ?

I have been looking at various options for learning a new secondary programming language (Primary still being “C”) in the past few weeks. The main intent is having a lot fun, exploring new concepts and maybe switch to it in the very distant future. Python was a LOT of fun, powerful, partly gives me a day job and so on, but I haven’t been able to do anything profoundly new with it in the last few months. I have looked at Erlang, Haskell and Scala so far (Functional Programming and Concurrency were big motivators).

Read the rest of this entry »

Filed under: Computer Science, Programming

Don Vinci Code

For someone not used to literate programming, CWEB is a pain in the ass. But the dataset that comes with GraphBase makes up for it. Please make CWEB half as much fun as your datasets Don Knuth.

For the illiterate:

Of course the author does not pretend that the location of “highlights” in da Vinci’s painting, one per row and one per column, has any application to art appreciation. However, this program does seem to have pedagogic value, because the relation between pixel values and shades of gray allows us to visualize the data underlying this special case of the assignment problem; ordinary matrices of numeric data are much harder to perceive. The non-random nature of pixels in a work of art may also have similarities to the “organic” properties of data in real-world applications.

(From graphbase/assign_mona.w)

Filed under: DEK, Programming, Rants

Scapegoat Tree

Paper by Rivest et al:

http://cg.scs.carleton.ca/~morin/teaching/5408/refs/gr93.pdf

And the mandatory sucky applet:

http://people.ksp.sk/~kuko/bak/index.html

Found this out while lifelessly grokking around boost:

http://www.boost.org/doc/libs/1_35_0/doc/html/intrusive/sg_set_multiset.html

Balanced Trees are better than unbalanced because of bounded worst-case O(log n) search time. And AVL is the simplest balanced tree. Red-Black is better than AVL because worst-case O(1) rebalancing during insertions are guaranteed. But Scapegoats are even better because they gaurantee O(1) rebalancing AND don’t need the extra field for storing the color of the node. Strange that I have not even heard of a 1993 data structure that sounds practical enough.

Filed under: Computer Science, Programming

Exploring Python Bytecode

For the past month or so, I’ve been trying to understand what appears to be a black art mostly because of lacking documentation – Python bytecode generation and peephole optimization. Some notes from the study for the benefit of IRC-mate ‘jstatm’ and anyone else living on similar planes of insanity.
Read the rest of this entry »

Filed under: Open Source, Programming, Python

Netbeans with GTK Widgets

Netbeans users on Solaris and Linux, who hate, detest and despise the horrible looking default Java UI, ought to add this line to ~/.bash_profile

alias netbeans=’/opt/netbeans/bin/netbeans -laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel’

Update: Netbeans 6.0 users should type “–laf” instead “-laf” (Two hyphens before ‘laf’ instead of one)

Netbeans - Solaris GTK LAF Screenshot

Read the rest of this entry »

Filed under: Programming, Solaris

Quote

    "The rule is, jam tomorrow and jam yesterday. But never jam today."

Twitter

  • Food Prices, Carbon Emission, Financial Crisis ? Its all China's fault. Commie Bastards. Oh wait, no it isn't: http://bit.ly/80zVNg 3 hours ago
  • Borrow from an Oppressive Chinese regime and feed a corrupt government in Afghanistan: http://bit.ly/7IiHjD - Democracy has a high price. 3 days ago
  • Paradox: I hate lua and yet picked up deep internals in 20 hours. I love Haskell and see little progress after days and weekends of work. 6 days ago
  • The few hundred lines of Lua i was forced to write today flushed out all the nice Haskell crammed in my brain. Lua's design seems dreadful. 1 week ago
  • Steven Pinker at his usual best: http://bit.ly/7ZM4lU | My Android is really a truth verifying device pretending to be a hand-held computer. 1 week ago

Archives