background preloader

Clojure

Facebook Twitter

Unity3D

The Weird and Wonderful Characters of Clojure. A reference collection of characters used in Clojure that are difficult to "google". Descriptions sourced from various blogs, StackOverflow, Learning Clojure and the official Clojure docs - sources attributed where necessary. Type the symbols into the box below to search (or use CTRL-F).

Sections not in any particular order but related items are grouped for ease. If I'm wrong or missing anything worthy of inclusion tweet me @kouphax or mail me at james@yobriefca.se. # - Dispatch macro You'll see this macro character beside another e.g. #( or #" . # is the dispatch macro, a reader macro that tells the Clojure reader (the thing that takes a file of Clojure text and parses it for consumption in the compiler) to go and look at another read table for the definition of the next character - in essence this allows extending default reader behaviour. Clojure doesn't provide support for creating reader macros but it is possible through a bit of hackery. #{ - Set macro Clojure Documentation: Sets >!!

Videos

Invoking Clojure code from Java. Spectrograms with Overtone. Spectrograms are fascinating: the ability to visualise sound in terms of its constituent frequencies. I’ve been playing with Overtone lately, so decided to create a mini-library to produce spectrograms from Overtone buffers. Here’s a sample output: This particular image is a visualisation of part of a trumpet fanfare. I like it because you can clearly see the punctuation of the different notes, and the range of strong harmonics above the base note.

Read on for some more details on how this works. Setup I’m using Overtone ( which is an amazing open source audio programming environment. The source code for my spectrogram experiment can be found here: Getting The Data The first thing we need to do is get a sample. Next we need to transform this into a double array. Applying the FFT Now we need to run the FFT on the double array to get the raw spectrogram data. I used the following code to do this: Visualisation Possible Extensions. Imagez – image processing for Clojure. Enter The Matrix. Posted: December 7, 2013 in matrix Tags: array, clojure, Conj, core.matrix, data This was a presentation I gave at the 2013 Clojure Conj, focusing on core.matrix and related libraries.

Some quick thoughts and comments on the experience and feedback I received: There was clearly a lot of interest in array programming at the Conj – I think this was largely driven by the number of people experimenting in data science and machine learning using Clojure.People seemed to really like the approach of separating the API from the implementations via protocols.There was some interest in making core.matrix work with ClojureScript as well as Clojure. This appears to be feasible (though not really my area of expertise)I came away with lots of new ideas and use cases to implement… so watch this space!! Overall, attending the Conj was a great experience and I really enjoyed the great discussions with fellow Clojurians. Hopefully I’ll be able to make it again next year! Like this: Like Loading...