F#'s strongest year yet
.net fsharp monoTradition 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...
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...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...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...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...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.
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.
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...