profile picture

14 pages tagged with "clojure"

Clojure Performace and the Billion Row Challenge

January 21, 2024 - 2254 words - 12 mins
I recently discovered The One Billion Row Challenge and thought i'd give it a shot using Clojure. TLDR: the solution I ended up with is ~41% faster than the Java baseline provided by the challenge. The problem is described as: Write a Java program for retrieving temperature measurement values from … read more

Pong in ClojureScript

April 23, 2022 - 125 words - 1 mins
Click to start! I'm working predominantly with Clojure at work these days, but I wanted to spend some time with ClojureScript, so I figured making a pong clone would be a fun weekend project. Every time the ball hits a paddle it increases in speed and it's direction is set to a randomized unit v… read more

Create a Clojure AWS Lambda function in Docker and deployed via AWS SAM

October 17, 2021 - 1704 words - 9 mins
In this post I will cover using Clojure to write an AWS Lambda function that will run on a schedule of once per minute. It will be deployed via the AMS SAM CLI tool and use the Docker runtime. The complete code is available at this GitHub repo. I'll start with a simple Lambda function that just writ… read more

Creating an Apache Commons Daemon using Component with Clojure

October 29, 2015 - 1029 words - 6 mins
Introduction One way to write a long running server application that runs on the JVM with proper start/stop semantics is to the the Apache Commons Daemon. In this post we'll see how we can do so in Clojure and also use the Component framework to structure our application. The full source for this po… read more

Exploring Stack Exchange data with Clojure using Apache Spark and Flambo

July 07, 2015 - 1861 words - 10 mins
Introduction Apache Spark is a is a fast and general engine for large-scale data processing (as in terabytes or larger data sets), and Flambo is a Clojure DSL for working with Spark. Stack Exchange is a network of question and answer websites with a variety of topics (the most popular one being Stac… read more

Adventures in Clojure with core.async - Part 2 - Timeouts and Working with Multiple Channels via Parking and alts!

May 27, 2015 - 847 words - 5 mins
Introduction In part 1 of this series we looked at the basics of core.async via channels and messages. In part 2 we will explore timeouts and working with multiple channels using examples of calling out to web APIs. We will be using the example of a web site that wants to display weather informati… read more

Adventures in Clojure with core.async - Part 1 - Channels and Messages

April 15, 2015 - 1067 words - 6 mins
Introduction In part 1 of this series we will look at the basics of core.async via channels and messages. In part 2 we explore timeouts and working with multiple channels using examples of calling out to web APIs. core.async is a Clojure/ClojureScript library to facilitate asynchronous programming… read more

Writing a Kafka Producer and High Level Consumer in Clojure

January 14, 2015 - 985 words - 5 mins
Introduction Kafka is a platform for handling real-time data feeds. In some ways it is like a database that exposes semantics of a messaging system. The Kafka documentation provides an excellent overview which I have provided an extract from: Kafka is a distributed, partitioned, replicated commit lo… read more

Running a Dockerized Clojure Web App on CoreOS

December 06, 2014 - 1628 words - 9 mins
Introduction In the previous post we created a Clojure web service and ran it in a Docker container. Here we will deploy that container on a 3 node CoreOS cluster running in Vagrant on a local development machine. CoreOS CoreOS is a minimal version of Linux meant for large scale server deployments. … read more

Dockerizing a Clojure, Compojure, and HTTP Kit Web Application

November 29, 2014 - 583 words - 3 mins
Docker is "an open platform for developers and sysadmins to build, ship, and run distributed applications. With Docker, developers can build any app in any language using any toolchain. Dockerized apps are completely portable and can run anywhere - colleagues’ OS X and Windows laptops, QA serve… read more

Clojure on the BeagleBone part 4 - Digital Input with ClojureScript

October 23, 2014 - 1000 words - 5 mins
Intro In part 1 of this series we saw how to install Java and Leiningen on a BeagleBone. In part 2 we used the BeagleBone to blink an LED on a breadboard using Clojure. In part 3 we blinked an LED using ClojureScript. In part 4 we read digital inputs via polling and interrupts. The BeagleBone is a… read more

Clojure on the BeagleBone part 3 - Blinking an LED with ClojureScript

July 14, 2014 - 778 words - 4 mins
Intro In part 1 of this series we saw how to install Java and Leiningen on a BeagleBone. In part 2 we used the BeagleBone to blink an LED on a breadboard using Clojure. In part 3 we will blink an LED using ClojureScript. In part 4 we will read digital inputs via polling and interrupts. The BeagleB… read more

Clojure on the BeagleBone part 2 - Blinking an LED with Clojure

May 25, 2014 - 492 words - 3 mins
Intro In part 1 of this series we saw how to install Java and Leiningen on a BeagleBone. In part 2 we use the BeagleBone to blink an LED on a breadboard using Clojure. In part 3 we will blink an LED using ClojureScript. In part 4 we will read digital inputs via polling and interrupts. This is insp… read more

Clojure on the BeagleBone part 1 - Installing Java, Leiningen, and Emacs 24

May 24, 2014 - 568 words - 3 mins
Intro In part 1 of this series we see how to install Java and Leiningen on a BeagleBone. In part 2 we use the BeagleBone to blink an LED on a breadboard using Clojure. In part 3 we will blink an LED using ClojureScript. In part 4 we will read digital inputs via polling and interrupts. The BeagleBo… read more