June 12, 2013

Clojure Weekly, June 12th, 2013

Welcome to another issue of Clojure weekly, my small routine blog contribution to the Clojure sphere! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

dgrnbrg/spyscope · GitHub Spyscope takes tools.logging “spy” function to the next level. Spyscope allows to pretty print partial results of a computation like a normal logging tool does, but it can be injected at the reader level and put into your lein profile. At that point #spy reader macros are available in development mode on all your projects and repl sessions.

fogus/marginalia · GitHub Marginalia is the documentation generation tool behind so many beautiful “read docs” links on Clojure projects. It is normally better used as leon marg using the corresponding leiningen plugin and it generates a “docs” folder with a ready to read html inside. Documentation is generated starting from normal Clojure block comments on namespaces or functions. The layout put the documentation just beside the source code in the final document.

kumarshantanu/lein-sub · GitHub I was looking into Pedestal and I noticed the use of lein sub. The lein sub plugin is useful when your project is getting bigger and you need sub-projects to keep it clean. The concept is similar to Maven submodules but more “functional”: lein sub will apply the command you pass in (the “function”) to the collection of submodules.

Handy tmux.sh to add to your new Clojure project I’m finally moving my old vimclojure setup to the new shiny vim-fireplace. I think fireplace is more robust and generally more modern than the venerable and ground-breaking vimclojure, but I was missing the possibility to open up a vim pane with a REPL. With tmux and some scripting you can make it a default setup, including running Midje autotesting interactively (that is you can still use the REPL). The other neat thing is that vimclojure is connected to the same REPL session, so all changes are reflected both sides.

clojure.repl - Clojure v1.5 API documentation Wow, how it comes I never noticed this little function in the Repl-tools! You probably notices that a (find-doc “searchme”) can return quite a big number of results that are difficult to navigate. But sometimes you just need to see the name of that function that you now don’t remember instead of reading pages of documentation. In that case (apropos “searchmenow”) just shows the list of matching function and offers the possibility to open one by typing its number. Handy.

Comments (View)
May 29, 2013

Clojure Weekly, May 29th, 2013

Welcome to another issue of Clojure weekly, my small routine blog contribution to the Clojure sphere! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

flatMap(Oslo) Just a quick one to signal that most of the FlatMap Oslo videos are now available. There is quite a good selection of presentation, both Scala and Clojure plus other topics.

Lisp in Summer Projects - welcome Here’s a different style of competition where Clojure is welcome. In comparison with clojurecup.com which is more a sprint inspired by railsrumble.com, Lisp summer of code allows much more time to complete, more similar to Google summer of code. Even ClojureScript is welcome or anything else homoiconic. If you’re interested signup opens 1st of June and development the 24th. Happy hacking!

SICP in Clojure SICP in Clojure website is the ambitious project to create a version of SICP in Clojure. There are countless github sicp clojure ports of exercises and chapters, but the goal of this website seems to be to provide an online form of the entire book where snippets of Scheme are replaced by Clojure. In theory I don’t see why this shouldn’t be possible. At the moment only formatting and syntax highlighting is working, but the book is still total Scheme. Keeping an eye on it for future reference while I’m doing my exercises in Clojure on the SICP.

Performing Code Katas | 8th Light Katas in software development are short sessions of programming completely dedicated at the refinement of a technique or exploration of a theme. The goal of performing the kata is to abstract away from the usual business problems to concentrate on how to improve understanding and execution of common programming routines. More or less in the middle of this article FizzBuzz is performed in Clojure (http://vimeo.com/65902219) using a possible top-down approach, where you comment out outer levels of expectations until you reach the bottom and start developing your way up again. Although I understand the process, I don’t like commenting out pieces of acceptance criteria that in much more complicated situations could be potentially checked in. I prefer the Midje approach of marking as unfinished what stays one level below and use “provided” to stub out results. I have a question for Micah though: how katas fit into the company process? Is your 20% spent on that? Or is it more like testing where you don’t ask customers for permission, but just use it as a tool to provide quality code?

Technology Radar May 2013 | ThoughtWorks It is worth mentioning that in the last issue of the ThoughtWorks technology radar, languages like Clojure or Scala entered the “adopt” section. Very innovative databases like Datomic are still considered young technology and thus going into the “assess” section. I’d probably say, no big surprises here!

Comments (View)
May 22, 2013

Clojure Weekly, May 22nd, 2013

Welcome to another issue of Clojure weekly, my small routine blog contribution to the Clojure sphere! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

Test-driven to REPL-driven development - Google Groups Sorry to quote myself, but I’m trying to understand all the fuss about REPL driven development I’m hearing in the Clojure community. Dear Clojure weekly reader, consider to comment below to point me to the right direction. Unfortunately, I don’t have enough experience pairing with somebody who practice the process to understand exactly what’s going on, so I’m searching for something like the bowling kata step by step explanation to see what exactly happens at the REPL console, how that replaces the red-green-refactor TDD microcycle and how that drives the design. This discussion from the London Clojurians Google group highlight some of the aspect of it but fails (at least for me) to completely explain in which way the new process is better than the old.

Clojurls - news and bits about Clojure I’d like to signal another Clojure news aggregator. Compared to PlanetClojure, Clojurls also aggregates other source of information that I personally check often: stackoverflow, google groups, blogs and twitter, all related to Clojure stuff. Added to my newsfeed.

Clojure Inside Out - O’Reilly Media A great series of video lectures on Clojure by Neal Ford and Stuart Halloway. I still have to go through all of them (5h+ of material) but the beginning seems quite promising. Watching this videos is like attending an half a day workshop on Clojure in glorious HD quality. Actually it is like they’ve been recorded during some sort of workshop for real. It comes at a price tag of 70$ so it is something you want to ponder a bit before buying. Promo videos are available also on youtube http://www.youtube.com/watch?v=EVzv5kMkOfo.

clojure/tools.nrepl · GitHub nREPL is service build on top of Clojure evaluation with a set of API that makes it IDE and tools friendly. It somehow replaces the venerable NailGun, a more generic remote Java executor service that was used in the past for similar features. nREPL is more flexible and better designed for this specific purpose, hence why most of the tools today are already using it. If you happen to develop Clojure on a VIM stack, vim-fireplace is what you may want to have a look at for Clojure evaluation under vim, since it connects by default on a running nREPL. Emacs people probably already know about https://github.com/kingtim/nrepl.el

Flexible multi consumer/producer pipelines This is an interesting little lib, something that resembles Storm but running on a single JVM. There are times when the kind of computation workflow naturally maps into a graph, especially when highly computational intensive processes are involved or big-data parallelisation is required. This blog post from the author explains in which cases it can be useful: if your workflow is a like pipeline and steps of the pipeline need orchestration then you might give Pipejine a try.

Comments (View)
May 14, 2013

Clojure Weekly, May 14th, 2013

Welcome to another issue of Clojure weekly, my small routine blog contribution to the Clojure sphere! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

Prismatic’s “Graph” at Strange Loop — Prismatic Blog The team at Prismatic is putting a lot of effort in open sourcing their common solution to recurring problems (aka patterns). Graph is part of the Prismatic tool-belt. Basically, it is a way to express a functional composition in terms of a graph based data structure. Instead of a function with a lot of outgoing dependencies to lower level abstraction (and those functions may also be calling into each other) Graph allows to declare what output of which function should be the input into another function. I can see some relevant cases where this can be useful, for example composing chains of responsibilities that otherwise would result in big monster let-blocks at the beginning of a function. At the same time I fail to see how the same problem could not be solved by a better composition and abstraction of functions. I have the impression that if a function is calling into many other functions I might be missing a layer of abstraction and that would be my first attempt at refactoring instead of using graph.

michalmarczyk/flexvec · GitHub Here’s an example of how an interesting and efficient algorithm that improves the current 32-way branching tree used in Clojure vectors can make it as a contrib and maybe to core one day. Relaxed radix balanced trees (hence “flex” because the constrain about the branching is relaxed) are an alternative implementation for balanced trees that allows more efficient concatenation in log(n). The pay a small performance price just after the first concatenation for simple addition operation, but if the vector is never concatenated you get exactly the same B-Tree behaviour of the current Clojure implementation. It was discussed initially in clojure-ML http://tinyurl.com/cs6tuyl and quickly after in clojure-dev http://tinyurl.com/bvby85s and finally ended up in contrib. This data structure can be useful in all cases where concatenation of immutable vectors is used heavily: fork-join kind of operations or simple map-reducing operations producing a vector instead of a scalar.

Dashboard [Hudson] All of Clojure and Clojure contributions are continuously integrated in a Jenkins instance running at the link above. It is kind of interesting to see when it was last built and when it was last failing. For Clojure for example you need to go way back to see a failure (on an external Ant task). The http://build.clojure.org/job/clojure-test-matrix/ job tests Clojure on several JDK versions and you can see that JDK 1.5 was lost in February and seems unrecoverable.

jaycfields/jry · GitHub Jry is a library of helper functions. I trust the source of them (Jav Fields) so I’m going to keep an eye on the functions there for the future. There are a few things I had to copy paste from snippets from somewhere else present here (like update-values in a map or keys) plus some ideas for names I never thought about like -> to denote transform-this->to-that.

Excision | Datomic Datomic is designed following the principle that information is a stream of events that happen and events are never really removed from history. But there are some cases where data are explicit required to not exist anymore, for privacy reasons or other non-technical related requirements. For this reason Datomic can be requested to forget about data using the excise attribute on a specific ID in a transaction. Excision can be based on a specific time window as well. The funny part is that Datomic can’t forget that you asked to forget. So the excision attribute allows to track what was excised but it can’t be excised itself.

Comments (View)
May 7, 2013

Clojure Weekly, May 7th, 2013

Welcome to another issue of Clojure weekly, my small routine blog contribution to the Clojure sphere! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

Keynote - Jim Weirich - Big Ruby 2013 In this talk by Jim Weirich you’ll find a nice cross language comparison between concurrency frameworks, like the single-thread event-based programming with NodeJs, or the Erlang inspired Celluloid framework written in Ruby, or the Clojure STM. All of that to build a Drone management console application for a customer (hey Jim, please let us know your clients, we want to create applications for them too!). Overall I enjoyed the analysis of single VS multithreaded approached to concurrency and the share memory or share-nothing distinction of Erlang actors. Jim clearly states that the Clojure STM is the most elegant of them all but at the same time it is intimately connected to a side-effect free language like Clojure. The Ruby based solution he explained in this talk is not that different although it requires Ruby implementations supporting OS-based threads (JRuby or Rubinius).

Prismatic/dommy · GitHub The Prismatic team has just released Dommy, an idiomatic ClojureScript wrapper for jQuery and DOM manipulation library in general. Dommy is one of the first library to explore the power of macros to generate JavaScript and the results are exciting. By controlling the compilation step, macros allow for optimised direct access to the relevant DOM api to select elements instead of the corresponding runtime jQuery selector. Dommy provides several other enhancements over jQuery by making use of Clojure syntactic sugar, like sequence manipulation or Protocols. Have a look at the end of this blog post http://tinyurl.com/dxczqkm for more examples.

REPL bootstrap pimpage Welcome to the Clojure REPL world! The Ruby community which is definitely older than the Clojure community, already developed a culture of IRB extensions and tricks. Clojure is following with similar enhancements to the REPL that makes developer life easier. Here’s a list of things you can add to your REPL from Jon Pither’s team ready for copy and paste or reuse.

Erlang (and Go) in Clojure (and Java) This article is quite a technological ride and full of wisdom. Continuations style programming is possible in java using bytecode instrumentation. The solution is not elegant or flexible, but it is one key ingredient for the actor-like solution in Clojure described in this post. It’s also an experiment in bytecode manipulation of clojure generated classes which poses some challenges during the selection of the instrumentation points. Results seem promising with the possibility of implementing “light” threads that can be suspended and resumed. Light threads allow fast context switching and the fork-join scheduler allows for scheduling of tasks off a queue, resulting in a fast jvm-based actor framework. As the author said, Clojure is more suitable for a local actor-like implementation in the small while Erlang implements that better in larger systems.

Comments (View)
April 30, 2013

Clojure Weekly, April 30th, 2013

Welcome to another issue of Clojure weekly, my small routine blog contribution to the Clojure sphere! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

Bug in locals-clearing in Clojure 1.5? - Clojure 1.5.1 released. What happens when a critical bug is found in Clojure? Here’s a fascinating example of spot-on diagnosis and troubleshooting. It appears that a change to allow loop/recur in catch and finally (https://github.com/clojure/clojure/commit/ddc65a96fdb1163b) generated a memory leak that was spotted from the guys at Prismatic updating Clojure to the latest and greatest. Of course, no apparent connection between the commit and the effects until you test that out in the correct context. It is also evident that Clojure can be treated as a chain of generated languages down to the VM byte code: Clojure generates Java that generates byte code. Sometimes it can be useful to understand this and how to do it yourself especially if the problem is a memory leak. So, now you also know what is the reason for releasing 1.5.1.

Software transactional memory - Wikipedia, the free encyclopedia Clojure implements the elements of STM thanks to the core immutable data structures and concurrency control models like agent atoms or refs. But more in general, STM is an optimistic concurrency model of computation where conflicting changes are handled by re-attempting the same transaction over again. With such a model, locks are not needed. But STM assumes new state is just a function of the past and all the original variations in between are logged and available. Of course this is the definition of pure function in a functional language, so for Clojure (and other FP languages) the STM fits very well. This wikipedia entry explains in a simple way what is STM in general and why in general it can perform better.

Convert Maven pom.xml file to Lein project.clj A juicy handy GIST to convert a pom.xml to a project.clj ready for leiningen. Uhm why would you need such a thing? Say you have this nice Java project at work and you want to start using some Clojure bits with it. Fine, there are all the maven plugins ready for this and it will just work fine. But say that now that you have some Clojure bit in your maven based Java project you would also like to build it using a real building tool like leiningen? Why not, use this converter to create a project.clj ready for that.

Why using Maven for Clojure builds is a no-brainer | cemerick As the title say, Clojure integrates very well with your existing Maven setup. There are projects were leiningen is not an option (which is bad) but at least you can survive with a Maven setup and maybe have your Clojure files developed from inside an IDE that understands Clojure (all the usual suspects). I think this is a very good way to start using Clojure in a Java environment: bring in the maven plugin, have some Clojure developed and let your current Java project talk with the Clojure side for specialized tasks.

Comments (View)
April 24, 2013

Clojure Weekly, April 24th, 2013

Welcome to another issue of Clojure weekly, my small routine blog contribution to the Clojure sphere! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

(def newsletter) - A Weekly Clojure Newsletter - Home If you enjoy this Clojure Weekly, you might also enjoy another couple of options to receive weekly updates about your favourite language. Today we talk about (def newsletter) that similarly to http://www.clojuregazette.com is promising to “spam” you with good Clojure content every week. Clojure Gazette in particular is different because it has a theme each week around which the links are selected. Thanks to Planet Clojure aka http://clojure.in I enjoy the Gazette anyway. Unfortunately I’m not one of those person who enjoy another email in the mailbox: even if it is great content I just tend to skip them. In that case stick to Clojure Weekly that is delivered to your door through your favourite news reader.

Real Life Clojure Application - Interrupted It’s always a good exercise to learn from the code of others. Notify Me shows a solid Clojure web stack, with Compujure, Clojurescript and Midje for testing, plus a lot more goodies, to send mass sms or emails. It also includes manuals and installation instructions, something that is definitely required for a project that should be used in real-life.

Truly concurrent user interfaces Concui is an UI library built on top of openGL primitives. What makes Concui maybe unique, is the fact that it operates with pure function at its core, a function that given the state of the UI it renders the the actual graphics raprsenting them. It is different from the majority of UI rendering approaches because there is no graph of object hodling the state of the UI but a gigantic structure that is rendered 60 times a second. If you are interested into functional approaches to UI rendering go checkout this project.

Economies of Scala | blog.iterate.no This article is a quick analysis of data coming from online sources and specific questions made to the Java development community in Norway. Although it cannot be representative of the world-wide software developers population is still statistically significant. It basically tell us that: 1. If a developer in Norway is asked what languages would you select for work (not because you like them) Java is coming first, with some scripting languages coming next, Scala somewhere in the middle. 2. If a developer in Norway is asked then what languages would you prefer to use (independently from the market request) then Java goes down the list and Scala is first, followed by Clojure and Python. The bad news for us “clojurians” is that wherever I look, I always find the same situation, with more than half of team already looking into or working with Scala and some people with an interest in Clojure. Is the Clojure community fighting a loosing battle?

Comments (View)
April 18, 2013

Clojure Weekly, April 18th, 2013

Skipped a week, but here’s another issue of Clojure weekly! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

The Pragmatic Bookshelf | Functional Programming Patterns in Scala and Clojure I’d like to highlight a new potential addition for your functional bookshelf. The book by Michael Bevilacqua-Linn explores OO patterns translation to the functional world (a parallelism that has been attempted over and over with mixed results, starting from is a non-sensical exercise to you can replace them all in FP with a few simpler ones, see Peter Norvig http://www.norvig.com/design-patterns/) and purely functional pattern, like lazy sequences, tail recursion and memoization. I didn’t read the book myself, but I was wondering if the listed patterns are really what I consider functional patterns: many of them are implementable in OO as well. I would like to see explored instead things at a lower level, like introduce binding, wrapping or http://programmers.stackexchange.com/questions/116395/what-is-the-good-explanation-of-tennents-correspondence-principle

Affordance and Concision | Digital Digressions by Stuart Sierra Another discussion about the dreaded “contains?” function in Clojure. I’ve written already about it and I’ve been bitten several times by expressions like (contains? [1 2 3] 3) => false. Stuart Sierra had that modified with http://dev.clojure.org/jira/browse/CLJ-932 to throw an exception if the collection is not associative. I second that, the previous behaviour sounded more like an hack for some corner case than a real feature of contains?. Now the same problem happens with get on non associative collections: (get [1 2 3] 3) => nil. Of course once you know the rule everything sounds simpler, but it definitely generates confusion. Stuart Sierra is proposing to have the same behaviour for get, throwing an exception instead of returning a nil.

Clojure - java_interop - Type Hints First rule of type hinting in Clojure is that you should only use it when working on pure performance improvement. That means to have in place acceptance criteria for performances in your application, look at time taken to perform some action, maybe some profiling and then decide that type hinting is going to help you out. Type hinting in Clojure is not that bad, but certainly is not as readable as non-type hinted code. It goes even worse when you use overloaded functions for Java primitive types (such as aget, aset on Java arrays type). Having said that, the Clojure compiler is smart enough to understand a ramification of type hints from an originating one, that is, if you type hint the return of a function, the compiler is going to track usages of the returned values and create overridden internal functions accordingly instead of using Reflection.

Clojure libraries for MongoDB, Riak, RabbitMQ, validations, Neo4J, ElasticSearch, Memcached, Apache Cassandra, Kestrel and more Look no further if you’re searching for a Clojure wrapper around a popular service library or utility. It might be already in ClojureWerkz, a toolbox of swiss army knives that is well documented, tested and coded on github. Amongst the others: Langohr (RabbitMQ), Elastisch (AWS Elastic Search), Quartzite (scheduler based on Quartz) and so on.

Comments (View)
April 2, 2013

Clojure Weekly, April 2nd, 2013

Welcome to another issue of Clojure weekly, my small routine blog contribution to the Clojure sphere! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

Dissecting Reducers In this talk recorded at Skillsmatter during the last London Clojurians meetup, yours truly is going to show you through a live coding session how we can formulate a simple mapping reducer from the ground-up. In the process you’ll see why high order functions are so important in building powerful abstractions.

Illegal Argument - Typed Clojure I listened to this podcast a couple of times already, but I still have to digest it completely. The topic is maybe controversial, or, how to type Clojure, a work Ambrose Bonnaire Sergeant in his spare time while doing his dissertation. I have to admit that after I attended Simon Peyton Jones talking about funky Haskell typing tricks at the last Functional Programming eXchange I see language typing as yet another programming challenge, not an inviolable rule a language must grow with. Core.typed is one of those challenges, how the Clojure compiler can be decorated with type information that can then be used for performance optimisation and of course static type checking. There is still a lot of work to do and Ambrose does his best at describing what the challenges are in this podcast.

Nightweb Nightweb is a p2p network for Android mostly written in Clojure. It demonstrate some decent level of complexity implementing a Clojure app and also Android interop. There are a few challenges still to run the Clojure runtime on Android, like the startup slowness and memory consumption but it also shows the possibility of Clojure on mobile devices. On the other side, Clojure demonstrates solid server multi-threading capabilities as it should be expected. Also look into this project to drive torrent-based p2p networks.

Clochure - A Better Clojure It’s April 1st in Clojure community, so here’s a brand new replacement for Clojure called Clochure that finally solves the number one annoyance in Clojure so far: parenthesis. Try to imagine to program in Clojure without the need to see those tedious parenthesis and imagine instead a world where all that curvilinear non-sense is replaced by square brackets. This is Clochure, give it some love.

Strata 2013: Nathan Marz, “Human Fault-tolerance” - YouTube Here’s Nathan Marz (he was still at Twitter here) with a quick 8 minutes overview about how a system designed to accommodate human failure should work. Immutability should be the “source of truth” of your system, not a mutable database as it has been for the last few decades. Today this is possible (look at Datomic) and advisable. When the source of truth is immutable catastrophic failures can be recovered by playing the same actions over the last snapshot of data. Enjoyed the talk which clearly echoes some of the Rich Hickey’s mantras.

Clojure and ‘Why calculating is better than scheming’ Leonardo Borges does a good job here at summarising why Clojure can be better than a Lisp (in this case Scheme) starting from a paper that Phil Wadler wrote discussing what Scheme is missing as a teaching language compared to Miranda (that along with KRC is one of the main influences behind Scheme). Scheme is of course the driving language behind SICP, one of the principal books for teaching programming for the last decades. Pattern matching and laziness are amongst them but Clojure does a great job at them with core sequences and macros (kind of compensating for the lack of pattern matching). There are others example like this that makes this an interesting reading.

Comments (View)
March 26, 2013

Clojure Weekly, March 26th, 2013

Welcome to another issue of Clojure weekly, my small routine blog contribution to the Clojure sphere! These are just a few links, normally 4/5 urls, pointing at articles, documentation, screencasts, podcasts or anything else that attracts my attention. I add a small comment so you can decide if you want to look at the whole thing or not. That’s it, enjoy!

clojure/src/clj/clojure/core/reducers.clj at master · clojure/clojure · GitHub A monoid definition is not as scary as it sounds. It is a set where elements obey three simple rules given an operation that we are going to call “dot”: closure, associativity and identity. It turns out mathematic and computer science are full of such set and if you really want to go deeper, they come with a full blown theory that you can lost years of your life to learn. Clojure call monoid a much simpler concept, a function that creates a function of [op ctor] that when given no arguments invokes (ctor) and with two arguments returns a function of a,b where (op a b) is called. The monoid function is useful to combine back results from a fold in its two argument form and it also works as a custom identity function for reduce.

Refactoring Java using Clojure with the Eclipse Java development tools (JDT) | Maurits thinks aloud Is refactoring easy to implement by a modern IDE? It’s not at all and depending on the grammar you’re dealing with it can be a moderate difficult up to a hugely complicated task. This article describes a simplified version of an already very simple refactoring to remove useless parenthesis from a return call. It targets Java and it requires knowledge about how to create an AST and how to manipulate it. The setup and manipulation on top of Java Eclipse ADT framework is done through Clojure, simplifying the thing with some more terse syntax. An interesting experiment.

bbatsov/clojure-style-guide · GitHub Got this link from @javame on twitter, a nice collection of dos and donts for clojure. The first part is core style that for me is almost completely covered by tooling in vim-clojure. The second part is a collection of interesting idiomatic clojure tips that is worth reading with care (and exercise as much as possible). Probably worth creating a constrained kata of some sort of them.

Programming languages ranked by expressiveness – Donnie Berkholz’s Story of Data Ranking languages by expressiveness is an hard task. This article should be considered an rough approximation for expressiveness based on a few assumptions: commits are based of unit of completed functionalities, a completed functionality has sort of the same scope in all languages, number of lines of codes is a measure for expressiveness (the more lines to express a functionality the less expressive the language) and finally the less lines of code the better is the maintenance of the sources. And it makes all sort of sense really, maybe this is the reason of the few surprises in the results: Clojure is amongst the most used expressive languages, as is CoffeeScripts. Other very popular languages are in the middle and Java is toward the bottom of the scale. Take this statistics with a grain of salt. Of course.

Comments (View)