Tuesday, January 11, 2011

View Data from the Clojure REPL

Here's a nice debugging feature in Clojure. The inspect module lets you look at variables in a popup JFrame. The two examples below show how you quickly view data in a table or tree format. This is really handy to quickly view data from the REPL.

(require 'clojure.inspector)

(clojure.inspector/inspect-tree '(1 (a b) 2 (c d) 3 (e f )))

(clojure.inspector/inspect-table '((1 2 3) (a b c) (e f g)))

Wednesday, December 15, 2010

F# vs C#

Nice article comparing directly some code written in C# vs one in F#


What's interesting is that now that VM's are starting to become the new platforms, we are starting to be less restricted by language choice. When it's native code with hand crafted memory management you want, it has to be C++.

But when you start to look at the JDK and the .Net VM's, the language choice has far less impact on performance... after all you're using the same garbage collector, same base libraries and so on.

This is great news for those of us with more peculiar tastes in language (I like Clojure and Common Lisp for example).

Although I think it will be a few years until AAA console games run on VM's, if ever, due to the nature of that business. Memory is always at a premium, and the goal is to choke every last hz of CPU performance.