Experience: Awesome productivity with ClojureScript’s REPL

Re-posted from Telia’s tech blog. What’s the deal with ClojureScript? How can you justify picking such a “niche” language? I have recently experienced a “wow” session, demonstrating the productivity gains of ClojureScript and the interactive development it enables thanks to its REPL. I would like to share the experience with you. (If you have neverContinue reading “Experience: Awesome productivity with ClojureScript’s REPL”

Storytelling as a Vehicle of Change: Introducing ClojureScript for the Heart and Mind

People don’t really like changes yet change we must in this fast-developing world. How to introduce a change, or rather how to inspire people to embrace a change? That is one of the main questions of my professional life. I have recently talked about Functional programming (FP) in JavaScript and compared it to ClojureScript, whichContinue reading “Storytelling as a Vehicle of Change: Introducing ClojureScript for the Heart and Mind”

Refactoring & Type Errors in Clojure: Experience and Prevention

While refactoring a relatively simple Clojure code to use a map instead of a vector, I have wasted perhaps a few hours due to essentially type errors. I want to share the experience and my thoughts about possible solutions since I encounter this problem quite often. I should mention that it is quite likely thatContinue reading “Refactoring & Type Errors in Clojure: Experience and Prevention”

Most interesting links of July ’14

Recommended Readings Video: The Unreasonable Effectiveness of Dynamic Typing for Practical Programs – a static-typing zealot turned friend of dynamic typing under the experience of real-world projects and problems shares thoughts about the limits of type systems (f.ex. both energy and torque are measured in N*m yet cannot be combined) and their cost: according toContinue reading “Most interesting links of July ’14”

Fixing clojurescript.test failing with “ReferenceError: Can’t find variable: cemerick”

ClojureScript.test (0.3.0; cemerick.cljs.test) may fail with this confusing exception: due to couple of reasons: Your test namespaces do not require cemerick.cljs.test (and thus it is missing from the compiled .js; requiring macros is not enough) cljsbuild has not included any of your test files (due to wrong setup etc.; this is essentially another form ofContinue reading “Fixing clojurescript.test failing with “ReferenceError: Can’t find variable: cemerick””

ClojureScript/Om: Spurious “Minified exception occured” With Advanced Optimizations

After having upgraded to Om 0.6.3. and ClojureScript 2197, I suddenly got the following error in the browser when loading the .js compiled with :optimizations :advanced: Uncaught Error: Minified exception occured; use the non-minified dev environment for the full error message and additional helpful warnings. In the dev mode, i.e. without any optimizations, the codeContinue reading “ClojureScript/Om: Spurious “Minified exception occured” With Advanced Optimizations”

core.async: “Can’t recur here” in ClojureScript but OK in Clojure

With the latest core.async and ClojureScript (core.async “0.1.303.0-886421-alpha” and clojurescript “0.0-2202” as well as the older core.async “0.1.267.0-0d7780-alpha” and clojurescript “0.0-2173”), the following function compiles just fine in Clojure but fails in ClojureScript: The error in ClojureScript is Workaround: replace (go-loop ..) with (go (loop ..)). Another fun fact: ClojureScript’s core.async lacks (at least) alt!Continue reading “core.async: “Can’t recur here” in ClojureScript but OK in Clojure”

Most interesting links of April ’14

Recommended Readings The economics of reuse – developing code for reuse costs much more than for one need – it might cost 300% more to develop and save you 75% of work when (re)using it instead of developing from scratch (if one of the factors goes down, the other one typically goes down too). Summary:Continue reading “Most interesting links of April ’14”

Kioo: How to Troubleshoot Template Processing

So you have created an Om/Reagent/React component using a Kioo template and the result is not as you expected, perhaps just an empty element? Let me share what I have discovered about troubleshooting this (though I am no expert). You will se how to invoke the underlying Clojure function component* manually, how to expand theContinue reading “Kioo: How to Troubleshoot Template Processing”

Kioo: How To Replace The Whole Body

This whole post in unnecessary since it is simply possible to use a snippet directly without a template, as kindly explained by Creighton Kirkendall. Kioo, the enlive-inspired templating library for React.js and derived libs such as Om, normally works by matching selectors against elements inside <body> and transforming the matched elements while also keeping allContinue reading “Kioo: How To Replace The Whole Body”