Clojure/West 2012

Table of Contents

Overview

Schedule

The Datomic Architecture and Data Model, Rich Hickey

This talk will discuss the design of Datomic, and the connections to the ideas behind Clojure.

Data is about time

"Datom "

RDF + Time

Entities/Attributes/Values/Time

Namespaces, Symbols, and Vars, Oh My!, Craig Andera

Even people who have been programming in Clojure for a while now can get confused by some of the constructs at the core of the language: namespaces, vars, and symbols. In this talk, we'll dive into how these things relate, and how they are processed by the read and eval phases of compilation. Understanding them better will allow you to more easily understand why Clojure code does the things it does.

ns: require syntax

Example: Hello World

hello.clj
Read in and look at symbols and keywords
require = load
Process: conversion: quoted form to filesystem
Require: read, evaluate

The whole vector of the require needs to be quotes since many things evaluate to themselves.

What is a symbol

Look at the source.

Namespace
"var quote" is the REPL for printing out the n
Use ns-map on user/

This covers all associated with the associated ns-*.

(ns-map 'user)

refer requires no namespace
(ns some.where)
(require 'net.other.more)
(refer 'net.other.more)
(render ...) ; from net.other.more

Can do this for only specific values:

(refer '[blah.watever :only (bar bar)])
Clean namespace
(in-ns foo) ; + wouldn't work
(refer 'clojure.core)

Changes ns local.

Base flow for ns
  • ns macro + name: creates new, empty, ns
  • :require -> load
  • :use = require + refer
  • :refer-clojure
  • import all of java.lang and refers clojure.core

Symbol evaluation

  • has slash
  • is package
  • is local definition
  • * is part of namespace

Clojure Koans Hackfest, Colin Jones

The Clojure Koans are a great way to dive into the language for the first time: no experience necessary! This unsession aims to get budding Clojurians ramped up quickly, but also to provide an opportunity for more experienced Clojure developers to expand and improve the koans.

Purpose

Start with minimal syntax:

  • s-expressions
  • list maps vectors

Using clojure-koans

Reviewing

Problem in /Users/jwalsh/sandbox/clojure-koans/src/koans/functions.clj
---------------------
Assertion failed!
Functions are often defined before they are used
(= __ (multiply-by-ten 2))

What sucks about Clojure…and why you'll love it anyway, Chas Emerick

Many a programmer fantasy and breathless blog post is rooted in the search for the perfect programming language, that sublime medium that will accentuate our talents, mitigate our failings, guide us to succinctly define our processes yet get out of our way when we wish — all while letting us deploy our creations in the environments we care about.

Namespaces

ns / load-file / require / refer / refer-clojure / use / import .

declare

Shouldn't have to baby-sit the compiler.

Dynamic scope

You will read source

JVM

Load testing with Clojure, Andy Kriger

Experiences from the field building automated integration and load testing using The Grinder, Clojure, Pallet, and a continuous integration system. The Grinder is a Java load testing tool that supports scripted tests written in Clojure or Python. Starting with a simple web application, we will explore the possibilities and tricks of using the Grinder to run integration and load tests; spawning an on-demand test-bed with Pallet; running tests and generating reporting with continuous integration.

Adopting Continuous Testing in Clojure, Bill Caputo

"We seek, not to build guard rails, but to paint lines on the road. This way we can go faster, others can use the road too and we have waypoints to help us when things get 'foggy'. You still have to know how to drive." ~ Ben Rady, author of "Continuous Testing with Ruby." This presentation will discuss how teams can adopt (and adapt) Continuous Testing (CT) practices for clojure.

Project setup

% lein new clw-ct

Using the REPL

user=> (interpose "," [1 2 3])
(1 "," 2 "," 3)

Installing autoexpect

% lein deps                                                                                                                                              0   15:37:06
% lein autoexpect                                                                                                                                        0   15:37:12
Copying 2 files to /Users/jwalsh/sandbox/clw-ct/lib
Copying 5 files to /Users/jwalsh/sandbox/clw-ct/lib/dev
*********************************************
 *************** Running tests ***************

Ran 0 tests containing 0 assertions in 0 msecs
0 failures, 0 errors.

Bootstrapping Clojure at Groupon, Tyler Jennings

This story starts out literally like a movie - millions of dollars on the line and the clock is ticking. We had a large dataset we needed to run expensive calculations on and our existing tools couldn't cut it. Clojure came to our rescue with its wonderful combination of simplicity and performance. But that's just the beginning. I'll also tell the tale of how our little Clojure script grew up. I'll talk about how we constructed our test suite, our experience refactoring Clojure, and the delicate art of introducing new developers to their first Lisp.

Covers

Several examples for fraud detection and building a team to support Clojure.

Engineering(,) A Path to Science: "I don’t want to die in a language I can’t understand", Richard Gabriel

I’m going to talk about one, old paper: “Mixin-based Inheritance,” by Gilad Bracha and William Cook, published in 1990. Bracha is now one of Google’s Dart guys. I will draw two observations from that paper in its context, one trivial but difficult for some to believe, and one complex whose implications might surprise.

Paper

Mixin-based inheritance http://dl.acm.org/citation.cfm?id=97982

Why Prismatic goes faster with Clojure, Bradford Cross

Prismatic delivers realtime newsfeeds for thousands of learned topics based on your interests and social networks. The Prismatic backend requires many custom abstractions, sophisticated machine learning techniques, data crawling, and graph analysis algorithms. We discuss how our small backend team (just four engineers) built this stack in record time using a unique design philosophy facilitated by Clojure. In a nutshell, our problem-solving approach prefers lightweight composable custom abstractions for problems rather than monolithic open-source frameworks (e.g., Hadoop).

Clojure, JRuby on Rails, and You, Allen Rohner

At circleci.com, we're running clojure and jruby on rails in the same process. We wrote __, (soon to be released) a library for calling jruby from clojure, and vice versa. We'll cover

  • Calling JRuby from Clojure
  • Calling Clojure from JRuby
  • Using the Clojure REPL to speed up Rails development
  • Starting multiple ruby runtimes inside the same JVM to speed up testing

"Don't share models"

Composing Statistical Graphics On the Web, Kevin Lynagh

Statistical graphics illuminate by mapping abstract data to visual primitives like dots, lines, and color. Excellent statistical graphics first and foremost show the data. Likewise, the tools for making such graphics should emphasize essential data-visual mappings and hide the implementation details of looping, painting, and layout.

Example: hipmonk.

Background d3

Unify

Richer data structures

c2 is a complete rewrite of d3 rather than leveraging

Beyond Ninjas: DOM manipulation with ClojureScript and Domina, Luke VanderHart

ClojureScript is awesome. Unfortunately, applying that awesome to make pretty things happen on your website takes a little more work than just throwing up a script tag pointing to jquery.js. In this talk, I’ll introduce Domina (a new DOM manipulation library), and show how in combination with a few other useful libraries, you can write dynamic web code that will elevate you to new levels of mastery over the content of your apps and pages. You’ll never want to go back.

Working in the browser is still hard

Still working with a document approach.

Google Closure

(doseq [n (dom/getElementsByClass "my-class")]...)

jayq

https://github.com/ibdknox/jayq

(-> ($ :.my-class)...)

Enfocus

https://github.com/ckirkendall/enfocus

Deserves additional review. Follows enlive…

DomContent:nodes|single-node

Building Libraries for ClojureScript - Learning to Love Google Closure, Creighton Kirkendall

The purpose of this talk is to get people excited about building new libraries for ClojureScript. It will cover some of the challenges that exist when designing libraries in ClojureScript and provide an overview of the Google Closure libraries. We will also take a tour of some current ClojureScript libraries and show how Clojure's abstractions can simplify and smooth the rough edges of client side development.

Cover Google Closure

Has the core set of tools for mocking and unit testing in JavaScript.

ClojureScript Anatomy, Michael Fogus

This would be a deep dive into the inner workings of ClojureScript's analysis, compilation, and runtime phases. The talk will focus specifically on the way that traditional JavaScript abstractions thwart code-size and efficiency and how ClojureScript avoids such pitfalls. Finally, I will tell a couple "war stories" about some of the specific challenges met by the Clojure/core team during the development of the compiler and runtime.

Notes

TODO Cascalog + Hadoop

TODO PostGIS + Clojure API

Author: Jason Walsh

j@wal.sh

Last Updated: 2025-07-30 13:45:27

build: 2025-12-23 09:11 | sha: a10ddd7