code,tips
17 November 2008 | 0 Comments
Firefox 3 was running very slow for me, so I desperately tried this, thinking that it wouldn’t make much difference. I was wrong; there was a noticeable speed improvement. From a bash shell: find ~/.mozilla -iname ‘*.sqlite’ -execdir sqlite3 {} ‘vacuum;’ \;
Tagged in code, short, snippet, snippets, 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
code,university
15 October 2008 | 3 Comments
Here is a simple program showing socket programming with Haskell, created for a University assignment. It allows half-duplex (one way at a time) communication between two (or fewer ) computers: import Network import Data.Char (toLower) import Text.Regex.Posix ((=~)) import System.IO (hGetLine,hClose,hPutStrLn,hSetBuffering,BufferMode(..),Handle,stdout) port = 8001 — a nice port number main = withSocketsDo $ [...]
Tagged in code, Haskell, program, sockets
code
25 September 2008 | 3 Comments
This is a post in response to this question over at the newly-spawned StackOverflow. Essentially: If we have a sorted list of numbers, how can we efficiently get a sorted list of the sums of every pair of numbers in that list? My initial reply is also there. I decided that, since I have a [...]
Tagged in algorithm, code, Haskell