Tag Archives: Clojure

Lambdatron: Clojure(ish) interpreter in Swift

via austinzheng/Lambdatron · GitHub.

An interpreter for a dialect of Clojure, implemented in Swift. The interpreter endeavors to match Clojure’s behavior as closely as possible. The eventual goal is a library that can be used independently of the REPL front-end.

Integrating Test.Check and Javascript

via Integrating Test.Check and Javascript – Ashton Kemerling.

I was recently on The Cognicast with Craig Andera where we discussed using Generative Testing on a large non-Clojure(script) codebase, in particular Ruby on Rails and Backbonejs. If you haven’t listened to the show yet I highly recommend it first.

As I promised on the show, I’d like to share how we used Test.Check to test our Backbone.js code base. Our overall strategy for testing Javascript is going to be:

  1. Compile JS into one file (just like prod).
  2. Compile tests into a single file.
  3. Combine them in a PhantomJS process.
  4. Let the tests do their thing.

While we have been super pleased with the results of Generative Testing, there have been some hurdles for getting it to work for us. In this post I’m going to go over how to setup Test.Check to work with your Javascript app, and how to dodge all the pitfalls I found.

Here are the challenges that lie between us and Generative Testing bliss.

  1. Picking the right library
  2. Setting up Leiningen & Cljsbuild
  3. Dodge PhantomJS issues
  4. Avoid mangling your app, and defeating dueling dependencies

Generating Permutations: Clojure or F#: Part 2

Marching on from the last post. Lazy Sequences This is my favorite feature ever. If I want to generate just a few of 10! (nobody even knows how much that is) permutations, I could: provided, the function is defined (as described in the first post): Here I am not sure which language I like more. […]


Modelling Stochastically Independent Processes with F# Computation Expressions: Part 1

The idea for doing this is not new. There is an excellent series of posts closely tracing an article on applications of functional programming to probability. A colleague of mine has recently called my attention to his own post of two years ago, where he describes a monad that models stochastically independent events in Clojure. […]


Scala Tutorials

Bad Programming in Java Is Dangerous

via Bad Programming in Java is Dangerous – Naildrivin’ ❺.

Saw a blog post this morning titled Why Functional Programming in Java is Dangerous. Author Elliotte Rusty Harold sets up the world’s worst straw man I’ve seen. He talks about Uncle Bob’s post on the advantages of functional programming. Elliotte’s thesis is that Java and JVM just can’t handle this sort of thing, and then sets out to prove this with some terrible code that, unsurprisingly, is terrible. He takes this bit of Clojure

Collaborative Programmable Music.

via overtone/overtone.

Overtone is an Open Source toolkit for designing synthesizers and collaborating with music. It provides:

  • A Clojure API to the SuperCollider synthesis engine
  • A growing library of musical functions (scales, chords, rhythms, arpeggiators, etc.)
  • Metronome and timing system to support live-programming and sequencing
  • Plug and play MIDI device I/O
  • A full Open Sound Control (OSC) client and server implementation.
  • Pre-cache – a system for locally caching external assets such as .wav files
  • An API for querying and fetching sounds from http://freesound.org
  • A global concurrent event stream