Vasily Kirichenko's blog articles

0
comment
on 11/17/2012 11:44 PM
Micah Martin has done the Coin Change Kata in Clojure. His collegue did it in Ruby (presented in the end of the Micah's post). I don't like either of the solutions. The Clojure one is almost unreadable - it's extreamly hard to understand what's really going on - take, map, mapcat, repeat - it's just too many too general constructs for such a simple problem. The Ruby one is readable and straitforward, though it's imperative and uses mutable vars, which I don't like very much these days.So, let's look at wha[...]
>> Read the full article
.
0
comment
on 11/13/2012 8:56 AM
F# supports writing custom monads very well. Take a look at (famous :) maybe monad which is just 6 lines of code:
>> Read the full article
.
0
comment
on 11/6/2012 9:31 AM
One guy suggested to use -> macro as often as possible instead of ->>. However, his final code doesn't look as clear as it should be (yes, it *should* be: we're coding in clojure). <p>I think, this is a great opportunity to use wonderful thread-it macro from "Clojure in Action" book: <p><script src="https://gist.github.com/4026186.js?file=gistfile1.clj"></script>
>> Read the full article
.
0
comment
on 11/1/2012 3:19 AM
Let's measure how much multimethods are slower that protocols: multimethods are roughly as fast as protocols clojure maps as fast as records "class" notation is in order of magnitude slower than "map" notation
>> Read the full article
.
0
comment
on 10/12/2012 4:22 AM
OK, it's time for Clojure (again). Let's look at the (now famous :) Fibonacci function:It took ~9 seconds which's not so good as would be (however, I'm not very frustrated about that :)What about the language itself, it feels very 'tired' - it has little build-in constructs and, I believe, it's extremely flexible. Time will tell if I'm right... :)However, there's one annoying thing - lazy sequences, which I almost hate in C# (IEnumerable) because they must not be mixed with any side effects, which is rathe[...]
>> Read the full article
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper