Feed on
Posts
Comments

Archive for the 'programming' Category

I wrote this post partly as an advocacy piece and partly to put down a bunch of things I’ve learnt about the factor compiler over the last few weeks. I should point out that I’m no expert in this area and so there are probably inaccuracies and omissions - hopefully Slava or one of the […]

Read Full Post »

Yesterday I was musing over why it took me so much longer to get going with Factor compared to the other languages I’ve learnt over the years. I came up with this:
Factor’s base language is very fundamental and primitive in nature. Programming it is similar to programming with assembler language: you have to keep track […]

Read Full Post »

Dan Ehrenberg completes a second short post on garbage collection, expanding on his excellent ‘Quick intro to garbage collection‘ post. Although Dan’s focus is on research prior to implementing a better collector for the factor language, the lucid explanations and chatty style make this a must-read for anybody with a passing interest in language runtime […]

Read Full Post »

Is it just me or do whitebox unit tests really bog you down?
I do pretty much all my coding in a test-first stylee; it’s the only way to code if you’re snatching 20mins here and there for spare time projects. Much of the time these tests serve as scaffolding to keep me on the […]

Read Full Post »

Tidying up factor code

A little utility I wrote for clearing up code: words-not-used. You give it a word and a vocabulary and it tells you all the definitions in the vocab that aren’t used by the execution of the word. It’s handy for clearing up old code that is no longer used.
(n.b. the word doesn’t have to be […]

Read Full Post »

Jeff Atwood’s blog is a good source for collected quotes. He’s at it again in his latest post: Are you a Doer or a Talker?:
In software, some developers take up residence on planet architecture.’
‘Working code attracts people who want to code. Design documents attract people who want to talk about coding.’
In my experience talkers gravitate […]

Read Full Post »

It’s been a couple of months and I’m still slower writing code in Factor than in Python or Scheme. So why am I still writing code in Factor? Well it turns out that the problem is also the attraction:
You can’t hack in factor.
In python you can hack out code in multi-line functions, parking results […]

Read Full Post »

I’ve been playing with Factor for a couple of weeks. I’m finding that it takes me quite a bit longer to write stuff with factor than with other languages, but the process is enjoyable and I get the feeling that I’m learning something useful each time. The question is: will programming speed improve with experience. […]

Read Full Post »

I got round to writing my first factor module tonight: a csv parser.
Actually there’s already a csv parser written in factor by Daniel Ehrenberg, but it’s been removed from the latest factor releases. I found a copy of that code here but I don’t know for how long it’ll stay there.
Unfortunately I had two […]

Read Full Post »

Last year I embarked on somwhat of a journey to find a better language for my home projects after getting a bit frustrated by python’s lack of blocks and general cruftyness. After a couple of months of trying various different things I settled on Gambit Scheme for my spare-time data indexing project. A minimal core […]

Read Full Post »

Gambit scheme lacks a profiler that can profile scheme with embedded C code. (There’s statprof, but unfortunately it doesn’t profile embeded C). I needed to do this pretty desperately for my triple indexing stuff so I’ve written a simple macro which takes wall clock timings of functions and accumulates them.
You replace ‘define’ with ‘define-timed’ […]

Read Full Post »

I’ve been struggling to motivate myself recently. I spent a lot of my spare time in my twenties programming free stuff after work with no trouble at all, but now in my thirties the energy and enthusiasm seems a little harder to come by. Plus Claire and I are expecting a baby any day now […]

Read Full Post »

One of the first issues I had when evaluating scheme as a possible replacement for Python as my hobby language was its apparent lack of module/library/namespace system. How do people possibly build big programs? I wondered.
Now it turns out most (all?) scheme implementations have features to deal with modules and libraries. Gambit’s is particularly nebulous […]

Read Full Post »

Somebody asked me about gambit-c the other day, and why I was using that as opposed to some other language or runtime for my own-time coding stuff.
Despite the scheme language being all cool, the thing that really made his eyes light up was the C features in gambit (it is called gambit-c for a reason). […]

Read Full Post »

I found this SQL Injection Cheat-Sheet today (thanks reddit!). A must-read for anybody writing (or hacking into) web applications with a database.

Read Full Post »

For the computer scientists in the room:
Google techtalks rock, and this one about recent advances in retrieval techniques was especially interesting to me.
In particular it includes a remarkable recent observation for the improvement of hash tables: Hash table loading and performance can be dramatically improved simply by using more than one hash algorithm in […]

Read Full Post »

Pascal Costanza nails the point of macros.
(and illustrates why lispers actually like lisp’s strange syntax so much)

Read Full Post »

First up, Ridiculous Fish’s article on shared-memory multithreading makes a good case for why testing often isn’t likely to find mt bugs.
This is one of those ‘how deep does the rabbit-hole go?’ kind of posts, and is well worth a read.
The characterisation of modern CPUs being vastly optimised for single-threaded code is one I hadn’t […]

Read Full Post »

I recently had my work laptop nicked while I was in paris, so I’ve had to reconstruct my linux development environment on another laptop. That reminded me that I intended to document this stuff since I had to dig around a bit for it when I first picked up scheme a few months ago.
Things I […]

Read Full Post »

Michael Feathers makes, I think, an important step forward in assisting fruitful programming language debates by providing new vocabulary to talk about simplicity.
He adds another dimension (literally!) by introducing a continuum between ‘low simplicity’ and ‘high simplicity’.

Read Full Post »

Next »