Easily Reloading your Clojure Project in Spacemacs

I’ve long been a fan of Stuart Sierra’s reloaded workflow. When I’m working on a ClojureScript project that doesn’t use Figwheel or another tool to assist with live code reloading, this is the pattern I reach for to help manage iterative and interactive development. Read more on Easily Reloading your Clojure Project in Spacemacs…

Clojure Development in Spacemacs

I’ve recently been doing some basic Clojure development, and it’s been a huge blast. I’ve played around with it in the past, but never bothered to fully set up a development environment. This time, however, I decided to spend a few evenings perfecting my workflow and becoming familiar with the tools available, focusing on my editor of choice: Spacemacs.
Read more on Clojure Development in Spacemacs…

Rigging up Sublime Text for Clojure Development

I recently started working on a project using Clojure. Since it’s my first experience with the language, I decided to invest a bit a of time setting up Sublime Text so that my editor would be tuned to conquer the oh-so-many parens and the build-and-test workflow provided via Leiningen. I wanted to capture and share this setup to help others get off the ground more quickly, since it took a bit of hunting for plugins and fiddling with Sublime. Read more on Rigging up Sublime Text for Clojure Development…

Pitfalls to Avoid When Moving from Clojure to ClojureScript

I’ve been excited about ClojureScript, its community, and the new tools and libraries that have been appearing, but I’ve only recently started working with it. Using ClojureScript to power a web (or mobile) client to a Clojure backend service seems really compelling. It’d allow for easily sharing code or logic between the different components, as well as a well-designed implementation of modern UI development, via Om Next. It’s also a fun and enjoyable language.

However, while exploring ClojureScript, I’ve run into some areas that left me feeling frustrated. Read more on Pitfalls to Avoid When Moving from Clojure to ClojureScript…

Exploring Logic Programming in Clojure’s core.logic – Overview & Understanding Palindromes

Ever since I saw William Byrd and Dan Friedman present on miniKanren at Clojure/conj a few years ago, I’ve been distantly interested in the topic of logic programming. Recently, my interest has intensified, so I picked up a copy of The Reasoned Schemer and have been working through it.
Read more on Exploring Logic Programming in Clojure’s core.logic – Overview & Understanding Palindromes…

Understanding Homoiconicity in Clojure

For my recent LambdaJam workshop on learning Clojure macros from first principles, I created a set of materials exploring the basic concepts. To really understand macros, you first need to have a good understanding of what makes them so powerful — homoiconicity. In this post, we’ll explore that property of the language.

Read more on Understanding Homoiconicity in Clojure…

Behind the Scenes with CHICKEN Scheme (Part 1)

For the past couple years, I’ve been playing with the Lisp family of languages, namely Common Lisp, Clojure, and Scheme. One of my favorite languages for hobby coding is CHICKEN Scheme, a mature, high-performance implementation of Scheme that compiles to portable C code. CHICKEN’s variety of built-in features and downloadable libraries, excellent FFI support, and helpful community make it a very appealing language.

Recently, I came across SPOCK, a compiler and runtime system for compiling Scheme code into JavaScript. As it turns out, SPOCK and CHICKEN have the same creator: Felix Winkelmann, a software developer in Göttingen, Germany. Intrigued, I got in touch with Felix to ask him about CHICKEN, SPOCK, how he got started, and what keeps him motivated to keep working on CHICKEN after more than a decade.

In this first part of the interview, we discuss how Felix became interested in Scheme and programming, why he created and maintains CHICKEN, and what makes it special. In part 2 (coming soon), we’ll cover SPOCK, how it relates to CHICKEN, and the origins of the names “CHICKEN” and “SPOCK”.

Read more on Behind the Scenes with CHICKEN Scheme (Part 1)…

Experimenting with Clojure’s PersistentHashMap in JRuby

Over the last few months, I have written two blog posts that mention using Hamster (Efficient, Immutable, Thread-Safe Collection) classes in JRuby: Preventing JRuby Concurrency Errors with Hamster and Making Refs in Ruby Using Celluloid Actors.

The latter post was commented on by Mike Busch he mentioned his evaluation of Hamster and comparing it to using Clojure’s persistent data structures in JRuby. He even linked to a simple benchmark for select he had done comparing the two.

Intrigued, I decided to to do some of my own experimentation and ended up extending Hamsterdam so it could use either Hamster Hashes or Clojure Maps internally. The results were mixed. The Clojure Map did turn out to be faster, but there are some (potentially annoying and confusing) side effects of using a Java collection as a primary data structure in JRuby.

Read more on Experimenting with Clojure’s PersistentHashMap in JRuby…

Clojure Conj 2012: Logic Programming, ClojureScript, and the Importance of Small Services

The third Clojure Conj, a conference dedicated to the Clojure community, was held in Raleigh, NC the second weekend in November. I was in attendance, along with fellow atoms Drew Colthorp and Scott Vokes.

For those unaware, Clojure is a modern dialect of Lisp that was built on top of the Java Virtual Machine. Clojure, being a relatively young language, still has a nascent, close-knit community of talented computer scientists.

Logic Programming

One of the major themes at this year’s conference was logic programming. Nearly a third of the talks involved logic programming in some regard. Some were more esoteric than others, such as William Byrd and Daniel Friedman’s talk about writing logic to find examples of quines (even multiquines!) in Scheme. Another talk by Daniel Gregoire showed a practical side of logic programming by using it in web tests, e.g., expressing your test as logical requirements, rather than imperatively.

Read more on Clojure Conj 2012: Logic Programming, ClojureScript, and the Importance of Small Services…