Stuff tagged code
-
Clojure - Day One
There's been a brief hiatus in my Clojure week. Mostly due to me being knackered after some hardcore work days. In the last instalment I got my basic VimClojure environment set up. After that particular mission Day One’s excercises seemed almost trivial. I expect things to become more difficult in the next couple of sessions of course.
bigstr.clj Read More …- 2012-01-29T13:38:21Z
- Published: 13:38:21 on Sunday, 29 January
-
Clojure - Day Zero: VimClojure on Debian Squeeze
I spent quite a while trying to save time on getting a nice Clojure development setup working on my Debian Squeeze box. As it turned out I should have spent some extra moments doing the right thing rather than hoping a quick hack would work. Here's my notes on how to get VimClojure working on Squeeze. Note that I'd installed the debs from the usual repositories first, which installed libasm3-java. You may need to aptitude install that. Here's a screenshot of the finished product.
The Objective Read More …- 2012-01-15T20:48:13Z
- Published: 20:48:13 on Sunday, 15 January
-
Erlang - Day Three
Its the last day of 2011, the yuletide festivities are over and I am on a mission to get Erlang wrapped. Today's installment focussed on concurrency, message processing, some of the Erlang's process monitoring, and IPC. It was all a bit boggling for me. But sort of cool. The excercises introduced me to the OTP library which seemed actually a rather nicer way to do this sort of work than rolling one's own, you'll see that reflected in my answers, no doubt. For the first time I didn't get the bonus questions done in the alloted time. But I had fun nonetheless. I've grown rather fond of Erlang, but like 2011 it'll soon be time to move on (to Clojure, rather than to 2012 of course).
translator.erl Read More …- 2011-12-31T16:15:09Z
- Published: 16:15:09 on Saturday, 31 December
-
Erlang - Day Two
Erlang day two wasn't quite as swearing free as Erlang day one. You see I tend to swear when I'm stuck or baffled by syntax. And I git stuck a bit on the bonus problem. Turns out that putting []s round my variable made everything turn out nice. Who knew? Read More …
- 2011-12-18T20:21:03Z
- Published: 20:21:03 on Sunday, 18 December
-
Erlang - Day One
Bruce Tate introduces Erlang as making "hard things easy and easy things hard". Which isn't entirely fair I guess, given that the things it makes hard are hard for good reason. Mutability is hard, but something to be avoided in concurrent systems, which is the area where Erlang's sweet spot is located. He also compares Erlang to Agent Smith from the Matrix. I think its maybe a little early in my Erlang coding career to say much about that …
First impressions Read More …- 2011-12-15T14:31:29Z
- Published: 14:31:29 on Thursday, 15 December
-
UK Postcode Lookup - My First Drupal7 Module
I'm moonlighting on a project for an extremely cool client at the moment, it involves mapping and will be made out of Drupal. One of the things that it will need to do is to transform UK postcodes into latitude and longitude data, so my first cract at writing a Drupal module is to implement that. I've put up a tar.gz of the ukpostcodelookup module code, but it is far from tested as yet. You have been warned. Read More …
- 2011-11-19T23:11:04Z
- Published: 23:11:04 on Saturday, 19 November
-
Visualising RSS feeds with Perl and GraphViz::Data::Grapher
A few weeks back I was browsing round Perlmonks as is my wont, when I came across planetscape's post How can I visualize my complex data structure?. In that post, planetscape mentions the GraphViz::Data::Grapher module for doing a sort of visual equivalent of Data::Dumper. Read More …- 2011-06-14T09:31:18Z
- Published: 09:31:18 on Tuesday, 14 June
-
Video: FeedMash - A Perl/Catalyst RSS Masher-Upper and Twitter-izer
Update 2011-01-31: Well, life got in the way of getting this out in January, let's see if it will come out in Feb!Read More …
- 2011-05-19T11:23:20Z
- Published: 11:23:20 on Thursday, 19 May
-
Video: Turning MP3s back into ones and zeros
I've wanted to make some code to turn MP3s back into the ones and zeros from which they are made ever since reading Eben Moglen's Anarchism Triumphant. In that Moglen says: Read More …
- 2011-05-19T11:20:52Z
- Published: 11:20:52 on Thursday, 19 May
-
Muffet: A Perl Web Spider
Muffet is a web spider written in Perl and Moose that I've put up on github, under GPL. Read More …- 2011-05-12T15:56:51Z
- Published: 15:56:51 on Thursday, 12 May
-
Sack Boris 2012: Ruling class flim-flam-nonsense maker
I was chuffed to learn that the folks at Common People had been able to use the code I wrote for the What will George Osborne Cut Next random cut generator into a Boris Johnson flim-flam answer generator. You ask Boris a question and he talks errant ruling class nonsense. Just like the real thing! Read More …
- 2011-05-03T21:20:07Z
- Published: 21:20:07 on Tuesday, 3 May
-
Gmail de-ad greasemonkey script
NOTE Google changed the gmail API some time ago. I haven't been able to suss out how and they haven't documented it. So I'm no longer able to support this project. My apologies. Read More …
- 2011-04-11T20:15:15Z
- Published: 20:15:15 on Monday, 11 April
-
Geekery
Some useful snippets of technobabble, code and such for the discerning geeks and programmers amongst you. Read More …
- 2011-03-13T10:27:22Z
- Published: 10:27:22 on Sunday, 13 March
-
Fixed: Flickrshow NS_ERROR_INVALID_POINTER
I recently added a flickrshow to my cider reviews page, Ben Sekulowicz has done a great job with it, it worked exactly like I wanted, well almost. There was something breaking for me, showing up as this error in Firefox:
uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://www.flickrshow.com/static/scripts/flickrshow-7.1.js :: anonymous :: line 357" data: no] Line 0There was a useful post on Defective Semantics called Firefox NS_ERROR_INVALID_POINTER with innerHTMLwhich pointed me in the right direction: it was an character around line 357 that was breaking stuff! Whoulda thunk? Feel free to grab a copy of this version. It works on chromium and iceweasel on Debian squeeze and ie8 on a virtualbox.Read More …- 2011-03-12T15:55:29Z
- Published: 15:55:29 on Saturday, 12 March
-
My Drupal Life Aggregator
I have a slightly unhealthy obsession with RSS. Its just simple enough that you can make something in an evening. But just complex enough that the thing could potentially be a bit interesting. So, I set out to learn a bit more about Drupal, especially about theming it. Read More …- 2011-02-24T15:53:53Z
- Published: 15:53:53 on Thursday, 24 February
-
Flickr API and Grabbing Wedding Photos From A Group
My lovely friends Danny and Jess got married recently. I took some photos and so did lots of other people. So we put them all in a flickr group. But they wanted to get hold of everyone's pics to print or whatever. Problem. For some reason flickr have seen fit to disable the API key for the one tool that (Google says) could do the job of grabbing all the pics for us. What a pain! Read More …
- 2010-09-07T21:51:33Z
- Published: 21:51:33 on Tuesday, 7 September
-
Config::General arrayrefs and HTML::FormFu
I'm in the process of making a nicer backend for charlieharvey.org.uk using Catalyst (which is lovely BTW). One of the things I'm playing with is using HTML::FormFu for making the forms. But this morning I got proper stuck on the simple task of populating a select box with options from my Config::General config file. Read More …
- 2010-08-15T21:02:07Z
- Published: 21:02:07 on Sunday, 15 August
-
Charlieharvey.org.uk: Operator Userscript
I've just spent a couple of hours adding some basic microformat support to this site. You might have seen the Find Articles on New Internationalist-type Operator Userscript I made the other day. I thought I should make one for here too! So this is one that adds a "Find articles from Charlie" to your tagspaces options.Read More …
- 2010-08-09T17:53:35Z
- Published: 17:53:35 on Monday, 9 August
-
Getting Chandler Hub to send a daily agenda by email
I think that the OSAF's Chandler project is awesome and I've been using Chandler to organise my life for a while now. But one feature it was lacking was a daily email agenda update. Here's how I hacked one in perl. The code is at: Read More …
- 2010-08-01T00:00:00Z
- Published: 00:00:00 on Sunday, 1 August
-
Spinal Text
I wanted to learn how to write a firefox extension.
This is it!
Spinal Text - an extension to turn your text up to ELEVEN!
It won't work on all pages, after all its just a learning project. I'll probably redo it properly one day!
WTF? see the Spinal Tap fan site Read More …- 2007-10-04T16:28:44Z
- Published: 16:28:44 on Thursday, 4 October
-
ALF: Apache log filter
ALF is a filter for people using Apache logging to plain text logs, who still want the flexibility of being able to search their logs like a database. It relies heavily on Jeff Zucker's DBD::AnyData to do the clever stuff, and overlays that with a simple Gtk2 interface. Read More …
- 2007-03-31T18:45:21Z
- Published: 18:45:21 on Saturday, 31 March
-
Pong
This is a 2 person java version of the all time classic Pong. It's fairly simple, but it does require a >=1.2 java plugin. You can download the source code under the terms of the GNU General Public LicenceRead More …- 2006-12-01T00:00:00Z
- Published: 00:00:00 on Friday, 1 December
This is available as an atom feed for syndication. You can see all tags or a tag cloud if you want.