## Archive for the ‘Uncategorized’ Category

Well, use Rails, then. It seems to me that’s how I’d do a web app right now — the meaty logic would be in Haskell, and who cares about the rest anyway? At least Rails scaffolds it away.

Filed under: Uncategorized | 2 Comments

Quoth qftblog: At first, everything goes well. He’s impressed by the fact that you don’t have to constantly compile code to see the effects of your program. But after using the REPL as a calculator for a few minutes, he decides to check out how you write Hello World. This is where things start going […]

Filed under: Uncategorized | 8 Comments

What is this … person… going on about? She decries teaching some mathematical reasoning (“cluster methods”) in elementary school and wants to emphasize rote algorithm drill-and-kill work instead? She blames 18-year-olds not being able to handle logical reasoning on them not having memorized traditional arithmetic algorithms? She equates “maths” with “rote arithmetic”? It annoys me […]

Filed under: Uncategorized | 15 Comments

While examining ways to refactor the PFP library, it struck me that its strategy of storing repeated values and dealing with displaying them as an aggregate later was somewhat generalizable. This is a first stab at a counter datatype with constant-time update and (probably) O(m) lookup — where m is the sum of counts. The […]

Filed under: Uncategorized | 8 Comments

Much of statistical modelling involves shuffling around operations on stochastic variables — i.e. on their probability distributions. This can be tricky stuff: it either involves loads of manual lifting with fully discrete distributions or clever analytic methods for continuous ones. This is complicated enough that most of basic and intermediate-level applied statistical analysis is done […]

Filed under: Uncategorized | 9 Comments

### Yet more silly text

Mikael Johansson (whom I admire enough to have mentioned in my “about” page as one of the people I’d like to be more like, but am not) took the silly text generator from that post from a few hours ago and changed it to select random word bigrams, hence producing apparently more meaningful text. Not […]

Filed under: Uncategorized | 1 Comment

In the spirit of keeping a hacking journal — and toning the “functional john dvorak” tone — we exhibit a silly probabilistic text generator I worked on this morning. module Main where import Probability import Data.Char import Control.Monad Probabilityis Martin Erwig’s Probabilistic Functional Programming. I’m cleaning it up, haddockizing it and might cabalize it sometime […]

Filed under: Uncategorized | 6 Comments

###
`for`

Whom The Bell Tolls

The debate about adding closures to Java has spawned a curious debate about the role of explicit loops, recursion and higher-order list combinators. I wonder why no one has stepped up in defense of GOTO yet. Misguided Java snob Elliot Harold harangues fist and teeth against progress in computer languages: I don’t know what it […]

Filed under: Uncategorized | 8 Comments

### The 20-minute parser

Even a complete idiot like me can write a simple parser in 20 minutes in Haskell. While basically killing off time, it struck me that I wanted an english-to-nadsat translator. Wikipedia pointed me to this page, where there is a translator for Windows. The very same page has the dictionary it uses, in the following […]

Filed under: Uncategorized | 19 Comments