code,commentary,replies,utility
28 January 2009 | 3 Comments
Introduction David R. MacIver has recently written this blog post about cleaning up a set of tags. This blog post, on the other hand, is about a nice old Unix tool called ‘awk’. Awk is one of those programs that is often overlooked. It is really a small domain-specific language for processing text. In some [...]
Tagged in awk, code, inflammatory, Linux, Programming, Ruby, tutorial, Unix
code,tips
10 December 2008 | 0 Comments
Just a small tip on this: When you add an argument to a function that already exists you should check the existing usage of the function. Say you have this: f x y z = … … and you want: f x y z w = … First of all you should check the contexts [...]
Tagged in code, Functional programming, Haskell, Programming, refactoring, short, tips
code,university
24 October 2008 | 4 Comments
This post brought to you as part of fulfilling the requirements for Massey University’s 143.363. The brief was to write both an additive and subtractive synthesizer, in addition to an effects processor. I generalized this a little bit so that you can combine random parts together, so the additive/subtractive synthesizers aren’t really separate any more. [...]
Tagged in code, massey, matlab, music, Programming, sound
replies
27 February 2008 | 0 Comments
Douglas, you’re not alone. import Data.List (sortBy) import Data.Function (on) import Data.Maybe (mapMaybe) import Control.Monad.Instances gizzabuzz pairs combiner = zipWith ($) (cycle funcs) [1..] where sortedPairs = sortBy (compare `on` fst) pairs funcs = map (\n -> display $ mapMaybe (filterOut n) sortedPairs) [1..foldr1 lcm $ map fst $ sortedPairs] display [] = show [...]
Tagged in fizzbuzz, Haskell, horrid, humour, overengineered, Programming