Clojure for Beginners
At the moment on the Clojure mailing list there is a large rambling discussion about Clojure needing to be easier for beginners. There is some merit to this idea but I find this type of discussion doesn’t actually produce anything worthwhile. Despite the large amount of hot air a couple of people have stepped forward with some [...]
Gradle
I’ve been an Ant user for a long time. Ant has many flaws as a build tool but it does have the advantage of being simple, predictable and reasonably well documented. Maven has been around for a long time however while I liked the fact that it gives you lots of functionality out [...]
Oracle Breaking Old Links
This is sad to see. Oracle really should be putting more effort into preserving links to the old pages from Sun. Searching for this:
Provides a link to this:
Bleh!
Simple Macro Followup
Nguyen (sorry wordpress stuffed up your name) offered up a simplified version of the cond macro. Behold:
(defmacro condd [pred & clauses]
`(letfn [(predd# [test-expr# expr#]
(->> test-expr# ~pred))]
[...]
Simple Macro
I recently had a requirement for a version of cond that took a predicate expression and passed the clause as a parameter. While condp was close it didn’t really match what I was trying to do. Macros are still new to me so this was a good learning experience.
Here’s an example of the code I [...]
Self running clojure batch file.
I picked this up from the mailing list. I didn’t want to forget about it so I’m posting it here as a reminder.
:x (comment
@echo off
java -cp d:/products/clojure/clojure.jar clojure.main "%~f0" %*
goto :eof
)
(println "Hi!" *command-line-args*)
Very handy.
Functional Thinking
I ran across an interesting blog post the other day from Jeff Gortatowsky. He has been trying to learn clojure and was having a hard time thinking in a functional manner. It resonated with me because I’ve also found that aspect of clojure to the the most difficult to learn. For the most [...]
Train wrecks in functional languages
Recently @Steve_Hayes twittered the following:
Why are functional trainwrecks good and oo ones bad? What’s the conceptual difference?
Since twitter is a little inadequate to answer this question directly I’ll attempt to outline my view of the difference on this blog. I’ll first put forward the disclaimer that I’m certainly not an expert in functional languages. [...]
Fun with Clojure
I really like playing around with new languages but usually I don’t stick with them too long. My day job is coding Java/Javascript and there are few opportunities at work to play around with other languages. As a result most of my experimentation ends up being after hours. Once Ive learned a [...]
Nested Ant Properties
Ant doesn’t support nested properties (directly). After some searching I came across this solution. I’m putting it here mainly as a reminder to myself if I ever need to do this gain.
Just to define the problem… say I want to set the version number to be dependent on the project. Naturally you might think to [...]