===================
== Martin Trojer ==
Programming Blog

===================

F#'s strongest year yet

.net fsharp mono

Tradition demands that I write down some subjective thoughts on how my old friend F# is doing. So here we go again (for the 4th year running).

All I can really say is this; wow, what a year.

Read more...

Kebab-case keywords in nested Clojure data structures

clojure
Read more...

Clojure and Emacs without Cider

clojure emacs

I’ve been hacking Clojure for many years now, and I’ve been happy to rekindle my love for Emacs. The Clojure/Emacs tool-chain has come a long way during this time, swank-clojure, nREPL, nrepl.el and now Cider. The feature list is ever growing, and every-time you look there are some new awesome shortcut that will ‘make your day’.

Read more...

Book Review: Clojure Cookbook

clojure review
The Clojure Cookbook is part of the O’Reilly cookbook series. I’d describe this format as a ‘curated wiki in print’. The wiki analogy is especially true for this volume since its contents was contributed by some 60 different developers. It’s packed with small bite-sized recipes for solving common problems in Clojure. This is useful for developers in the entire spectrum from beginner to expert. The content is organized into 11 chapters each containing a number of recipes. Read more...

The Clojure REPL; a blessing and a curse

clojure

All Clojure developers swear by their REPL, its one of the most powerful tools in our arsenal. Coming from traditional edit/compile/launch languages it also a great productivity boost. The Clojure community takes non-aot (ahead of time compilation) to the extreme. By default, we ship Clojure source code in our development and production jars and thus leave compilation to the very last minute (when the program launches). This gives us lots of power and flexibility, if you ever navigated into a library in Emacs and fixed a bug, re-evaled the form and carried on working you know what I’m talking about.

Read more...

Working with core.async: Blocking calls

clojure core.async

You can’t do anything even remotely blocking inside go-blocks. This is because all the core.async go blocks share a single thread pool, with a very limited number of threads (go blocks are supposed to be CPU bound). So if you have hundreds / thousands of go blocks running conurrently just having a few (a handful really) block – all go blocks will stop! For a more in-depth explanation see this previous post.

Read more...

Working with core.async: Chaining go blocks

clojure core.async go

One particularly annoying difference between the core.async and Go is that you can’t wrap function calls with the go macro. This is due to implementation details of core.async, which can only see the body ‘inside’ the macro and not the functions it may call. This is obviously not a problem if the called function doesn’t interact with any channels, but if it does when you might be in trouble. I’ve touched on this subject in a previous post.

Read more...

Working with core.async: Exceptions in go blocks

clojure core.async

Dealing with exceptions in go blocks/threads is different from normal clojure core. This gotcha is very common when moving your code into core.async go blocks – all your exceptions are gone! Since the body of a go block is run on a thread pool, it’s not much we can do with an exception, thus core.async will just eat them and close the channel. That’s what happened in the second snippet in this post. The nil result is because the channel we read from is closed.

Read more...

This year in F#

.net jvm csharp fsharp mono ocaml

For the third year running, here’s my annual (and extremely subjective) review of the state of the F# language, its community and other loosely connected things. How would I sum up the noises coming from F# the last year? Pretty darn awesome. Alot of what’s been happening was on my wish-list outlined in last year’s post. What are the highlights?

Read more...

Testing an API with Simulant

clojure
tl;dr I present a new Simulant example project, testing a simple web API. All programs are simulation tested, atleast once. — Stu Halloway Simulating testing is an interesting field that has a lot going for it. While most web site/api developers write many tests at the unit level (an old Rails habit) testing and understanding a whole system is often not done. Most systems we build nowadays consists of many (mega/micro) services/databases glued together. Read more...
Previous Page 2 of 7 Next Page