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

  • Haskell is a delightful language full of surprises. But a week of study and half-a-book later, I still struggle to write simple programs. 4 hours ago
  • Goodbye and good riddance NewsCorp: http://bit.ly/2QDe4S Game theoretically, you can either lose or you can lose. 6 hours ago
  • Wow ! TED has built quite a media brand. @Conrad Black, @Rupert Murdoch: Your agenda setting days are over. New media controls Flock2.0 now. 1 week ago
  • Desynchronosis traveling east is worse than going west. Yet, Melatonin is a super market drug in the US and unavailable in Ireland. Aarrgh. 1 week ago
  • Soap bubbles calculating Steiner Trees is no proof of P=NP. Physical processes arent proven Church-Turing reducible. Remember, "Hypothesis"? 1 week ago

Archives