Distributed purely functional programming, part 2

In a previous post, I introduced a framework called Girder (the code is on github), which aims to facilitate Plain Old Functional Programming on distributed systems. By POFP, I mean code that, as much as possible, consists of normal looking calls to normal looking functions, the only requirement for which is referential transparency: there are no side effects, and calls to the same function with the same arguments should always return the same value.

Functional programming, in my view, is dramatically less functional when you use a framework that requires you to cast your algorithm in terms of message passing ...

more ...

Quick tip on getting lein to recognize your new dependency

Ever realized you needed to modify some dependency (e.g. I needed to add weak cache support to core.cache), go a head with forking on github, lein install your new version, modify your project.clj to pick it up, and then... somehow... you still seem to get the old version? That's usually because some other dependency is explicitly requesting a version of that library. If you do lein classpath, you'll see your library show up, in two different versions, with the one you don't want first.

In my case, the relevant bit of classpath shows

   /Users ...
more ...

Beauty and the Beast - Distributed functional programming, part 1

OSS and Commercial Grids

Grid computing has always suffered the reputation of a buzzword that one suspects might not actually mean anything, but it has become especially ill-defined with the rise of open-source distributed computation frameworks like Spark, Storm and Grampa Hadoop. These extensively documented systems don't need much explanation from me, other than to note that they all basically pump data through a pre-designed graph, whose topology is often defined by map-reduce keys extracted from the input data.

Traditional, commercial grid products like Tibco Cloud, né DataSynapse, and Symphony are adapting, at least in terms of marketing, but ...

more ...

Yeah, yeah, I should have used perl


After reading my compelling post on a clojure Slack-bot, an astute reader1 pointed out that using the fullblown apparatus of compojure, jetty, jvm, etc. for something this silly is really only justified when the entire purpose of the exercise is procrastination. Well, dear astute reader, that was the entire purpose, but you're right. Ok, here it is in perl,

    #!/usr/bin/env perl
    use Mojolicious::Lite;
    use File::Slurp;
    my $token = read_file("TOKEN");
    my @lines = split(/\0/,read_file("LINES"));
    post '/slacks' => sub {
      my $c   = shift;
      my $t   = $c->param('token');
      if ($t eq $token) {
          $c->render(json ...
more ...

Procrastination with a clojure M-x yow slackbot


I really should be working on this obscure distributed RDF/FRP thing, but for various reasons my head isn't working properly write now. So I did this other stupid thing instead.


Once upon a time, M-x yow in emacs would deliver a nice random quote from Zippy the Pinhead. Nowadays, you just get

Yow!  Legally-imposed CULTURE-reduction is CABBAGE-BRAINED!

which has something to do with copyright law. More specifically, the file yow.lines in emacs' data-directory now contains only the opinion expressed above, rather than the original seven-hundred or so precious epigrams, delimited by \000 ...

more ...

Boyhood vs Little House Smackdown

She was glad that the cozy house, and Pa and Ma and the firelight and the music, were now. They could not be forgotten, she thought, because now is now. It can never be a long time ago.

Or, put another way, "It's constant, the moments, it's just - it's like it's always right now, you know?"

So little Laura figures it all out at the age of 5, while Mason comes to the realization only after implanting an ear gauge, leaving for college and getting high in a location of staggering natural beauty. But it's ...

more ...

Fortran, Clojure, Haskell and Julia are not at war


  • There was this dumb article in Ars Technica about replacing Fortran for scientific computation.
  • The main performance advantage of Fortran is that its restrictive data structures facilitate vector optimization.
  • There are many ways to match and even outperform Fortran, while using other languages.
  • But it's OK to use Fortran if you want to.
  • Ars Technica notwithstanding, Clojure, Haskell and Julia are not locked in competition to replace Fortran.
  • Ars Technica notwithstanding, Fibonacci sequences may be something we learned about once, but it is difficult to disguise their irrelevance to scientific computing.


Ten or fifteen pages into ...

more ...

Sign of the Times - Managing inhomogeneously bitemporal data with Datomic and Clojure

Time is confusing. Sometimes, it's so confusing that our thinking about it changes... over time. Which makes it triply confusing, or something. In this post, I want to talk about two aspects of temporal data, both common, useful and often misunderstood:

  • Homogeneous vs Inhomogeneous
  • Temporal vs Bitemporal

Homogeneous Temporal Data

The first thing to stress is that we're talking about homogeneous data, because "homogenous" means something completely different.

In a homogeneous, temporal data set, one column will contain a known sequence of discrete time values, and the other columns will contain whatever information is associated with those times ...

more ...

Orders of Magnitude for Free!

In honor of !!con, I was trying to think of programming-relevant uses of double exclamation marks. Other than denoting the end of a particularly funny programming joke (for example, a mangled homage to a famous paper), it seemed the best place to look might be in the world of double factorials. As it turns out, that wasn't as fruitful as I'd hoped, but I learned something interesting on the way to finding that out, and here it is.


You can learn interesting things about the order of complexity of an algorithm without knowing anything about how ...

more ...

Scala for Beginners - The secret information "they" don't want you to know.

Marcus Ljungblad is going to give an amazing Scaladays talk about the process of learning Scala, and he put out a call to his fellow hackerschoolers for suggestions. I was glad to chip in, because I enjoy the opportunity to blurt out opinions without the obligation to structure them eloquently, and talking in front of people is scary, so it's awesome to have somebody else do it. Still, I kind of like my suggestions, and with Marcus' permission, I'm going to offer them here. This isn't a getting started guide, and it certainly isn't a ...

more ...