A Lazy Sequence


Authentication is machine learning

…I’ve observed that as authentication systems develop they gradually merge with other abuse-fighting systems dealing with various forms of spam (email, account creation, link, etc.) and phishing. Authentication eventually loses its binary nature and becomes a fuzzy classification problem.

Via Chas Emerick.

18 December 2012

Moving away from Noir

It’s time to deprecate Noir and ask that people focus on Compojure instead

For new websites, please use Compojure and lib-noir. This is pretty much just as batteries included as Noir itself ever was! You just have to learn how to write routes with Compojure. It’s easy and just as concise as it was in Noir. You don’t have to use ring-jetty-adapter and stuff, just use the lein-ring plugin to start your server. Also, if you took advantage of Noir including hiccup by default, you’ll have to have an explicit dependency on it now. No biggy, right? Right!

13 December 2012

A Logic Programming reading list

[Logic programming is] an incredibly rich field with decades worth of research that’s still being actively explored from many different perspectives. The following list will reflect my biases - I’m as interested in implementation as I am in its practical use.

6 December 2012

Space leak zoo

There are a few different types of space leak here, but they are quite different and a visitor would do well not to confuse them (the methods for handling them if encountered in the wild vary, and using the wrong technique could exacerbate the situation).

A taxonomy of memory consumption bugs specifically in terms of Haskell, but many apply to other garbage collected languages as well.

26 November 2012

Native CSS feature detection via the @supports rule

@supports takes the form of an at-rule block, which performs a test and then executes normal CSS rules placed inside the block depending on whether the test returns true or not. In this case, the test is always one or more CSS declarations, and the browser returns true if it supports the indicated declaration(s)

21 November 2012

FizzBuzz, a deep navel to gaze into

At this point, you wouldn't think there was anything left to say about FizzBuzz. Turns out Haskell programmers have a different opinion.

15 November 2012

Mobile rendering with optimizeLegibility

There are actually significant, effectively fatal performance problems (such as 30-second loading delays, or longer) on mobile devices when using optimizeLegibility for long pages…

15 November 2012

The Incident: the music

Cabel Sasser on the music he created for the faux-8bit iOS game The Incident.

To match the 8-bit visuals, I returned to my roots: I plopped out a Bootcamp partition with Windows XP, installed a copy of Famitracker — a music app that emulates the original Nintendo sound chip — and started typing…

…It was nerdy-cool to think that this music could actually be compiled and played on an original Nintendo if someone so desired. In other words, there’s no post-production trickery here…

The acoustic guitar cover of the theme, Incidente y El Tema del Amor, is particularly excellent.

13 November 2012

Unifying programming and math – The dependent type revolution

Dependant Types are something I keep hearing of, but almost never about. This article is fairly abstract but explains loosely how dependant types are related to logic via the Curry-Howard Isomorphism and goes on to explain some potential advantages of the model.

12 November 2012

Written? Kitten!

Written? Kitten! is an amusing, browser based, writing productivity tool. Every 100 (configurable) words you write, you are rewarded with a new picture of a kitten that is displayed beside the text field. I tried it out briefly, and its surprisingly effective; I spent more time producing words and less time fussing about editing myself.

12 November 2012

Thinking functionally with Haskell

Monads are highly useful for some aspects of programming work, but they are certainly not an essential or core part. You will probably find that most large, well-written Haskell programs contain about 50-80% code that does not involve monads at all—the bulk is just pure data manipulation. Of the remainder, the monad use is mostly straightforward and follows certain common idioms. Real scary stuff is pretty rare.

A great, and clear, introduction to monads from the ground up, without resorting to category theory or math along the way. Via Tavis Rudd.

12 November 2012

Break Room sessions: Charlie Hunter [video]

Blues guitarist Charlie Hunter plays a few songs and talks about guitar at Premier Guitar. I had never heard of him before and his playing (and guitar – bananas!) are amazing.

9 November 2012

DIY optical tremelo effect project

A remarkably simple optical tremelo instrument effect unit project from Make magazine. Includes a video showing how to build it, and all the plans and patterns required.

4 November 2012

You're missing the point of promises

Promises are a very nice abstraction for managing asyncronous events without a callback nightmare. This article covers common misunderstandings around promises in Javascript land. It is particularly relevant for anyone who has used promises in jQuery. Via David Nolen.

22 October 2012

Demystifying garbage collectors

There seems to be a lot of confusion among developers on how garbage collectors actually work. They really aren’t as magical as some people think; in many ways, some garbage collectors are actually quite crude…

I’ll try to shed some light on how GCs work in a way that (hopefully) any developer can understand…

This is a nice high level look at the conceptual basics of Garbage Collection, general implementation strategies and pitfalls. It contrasts different platforms and languages throughout. Worth reading.

22 October 2012

Retrospective thoughts on BitC

This article went past on twitter ages ago, but I've finally got round to reading it in my Instapaper queue. BitC is a systems programming language, and the Shapiro has an interesting perspective on programming language design and the needs of systems languages in particular.

19 October 2012

Functional programming in C++

John Carmack of id Software writes about functional programming. He talks specifically about C++ but his comments are equally valid in other imperative languages. This is a really good read on why functional programming is valuable from a pragmatic point of view.

17 October 2012

Source Code Pro

Source Code Pro is an open sourced monospaced typeface from Adobe designed for source code. I've switched to it in all my text editors and I have been very impressed with how crisp it renders, and the clarity of the glyphs. Via Matt Wilson.

8 October 2012

On spinlocks and sleep()

The Webkit project recently got a 3.7X speedup in their parallel garbage collector by removing a call to sleep(). Nerds being nerds, a big deal was made of this. As you might expect for a project that is so performance and benchmark sensitive, this is more complex that it first appears. This article goes into detail about why the call was added in the first place, and the fix. Short version: concurrency is still hard.

25 September 2012

To choose is to surrender choice

Dramatic characters retain control of their destinies until they activate them, by making crucial decisions they can’t take back. Then the narrative machinery kicks into place, carrying them toward inevitable realization…

This idea contravenes a central roleplaying assumption, that players must retain control and freedom of action for their characters at all times.…

Robin Laws' looks at the role of consequences and character control in RPGs. Definately worth a read.

24 September 2012

Inside Call of Cthulhu 7th Ed

There is a new revision of the venerable Call of Cthulhu RPG underway, and surprisingly it looks like the rules are actually getting revised! The authors, Mike Mason and Paul Fricker, did a seminar on the that was recorded by yog-sothoth.com, and Shane Ivey at The Unspeakable Oath has gone through and compiled a comprehensive summary for the hour or so of audio.

“It’s still Cthulhu as you know it,” Mike says. “It still plays the same, in a sense. What we’ve done is hung some bells and whistles, and tweaked some bits that we felt didn’t work so well. It’s the same game. We didn’t set out to write a new rulebook. We set out to refresh the rulebook.”

Interesting responses from CoC luminaries such as Dan Harms and John Scott Tynes in the comments too. The changes made to the game might be small compared to the typical revisions RPGs recieve, but the CoC community is relatively conservative and isn't fond of anyone messing with their game. It will be interesting to see how this revision is recieved.

25 July 2012

Flim flam

Another great article for Call and Trail of Cthulhu from Adam Gauntlett.

Most Cthulhu adventures, whether Trail or Call, assume that the events the protagonists are meant to be investigating are all basically true. Very rarely adventures … tackle the fraudulent side of hauntings and occult phenomena…

This looks at using fraudulant occultists and materials in your Cthulhu game, with a particular focus on Bookhounds of London.

15 July 2012

Loading Typekit asynchronously

Typekit is a great servive, but apparently it has the potential to kill your site if it is ever unreachable due to the suggested synchronous loading of it's scripts. This article suggests a nice solution that uses Modernizr.

Typekit have their own solution, but its frankly a bit squirrelly if you already use modernizr.

Via Tim Kelleher.

13 July 2012


JSTween is a javascript library intended to replace jQuery's built in animate function. JSTween provides more fine grained control without much extra verbosity, as well as significantly better performance. Via Matt Wilson.

22 June 2012

Raptor rich text editor

Raptor is an interesting looking, and relatively contemporary, rich text editor for embeding into a webpage, e.g. like TinyMCE or other horrors. From brief experimentation it appears to be a reasonable candidate.

12 June 2012

Opentype features in web browsers

Typotheque has a detailed article about coming high and low level opentype features support in CSS, along with compatibility tables. It looks like significantly more advanced web typography is just around the corner. I get all my links from Tim Kelleher.

10 June 2012

A closer look at font rendering

A good indepth article about the implications of various font rendering systems across multiple OSes and the impact of different font formats with respect to webfonts. Via Tim Kelleher.

2 May 2012

JVM bytecode parsing monad.

Jim Duey's latest Monads in Clojure post looks at writing a parser for JVM bytecodes. This is a great practical example of using the state monad as the basis for a DSL. Don't miss the Performance note at the bottom.

2 May 2012

Reading for the rushed

Fogus's suggestions on how to improve your reading throughput. The suggestion to “Be willing to abandon bad books” is something I need to get better at.

22 February 2012

MetaWeblog API with Clojure

I've added a recipe for implementing a basic MetaWeblog server endpoint in Clojure to the necessary-evil github wiki. It's bare bones and uses a dummy store that does the bare minimum. Because so much of the detail of MetaWeblog is dependant on the backend and model you use, it's not much more than the public interface.

23 January 2012

ClojureScript One

Clojure/core have released a guide and sample project for producing web applications based on Clojure and ClojureScript. As a bonus the project is an excellent example of using Marginalia for documentation.

11 January 2012

Matt Gemmell on the blog comments

Matt Gemmell recently kicked the discussion around blog comments back to life, first by disabling comments on his own site and then by posting a short followup piece. He has now compiled a comprehensive set of the responses to his initial post. The cloud of discussion around this issue has generated a broad range of points of view that are worth the time to read.

I discarded comments here on A Lazy Sequence back in 2009 and have no regrets. I have found that Twitter, Hacker News, and Reddit provide much better forums for discussing articles I have posted than I could have provided here.

11 January 2012


Mercury is a statically typed Logical programming language. It's type system includes agebraic data types, “modes” (whether an predicates parameters may be inputs or outputs), and definitions of the determinism a predicate provides (the number of values it generates on outputs).