Since no one has said anything about it -- I really admire the willingness to post a recording of oneself attempting to use someone else's code. A lot of people would shy away from this because viewers might have arbitrary unrelated criticism ("you type so slow!"). This type of thing could be really useful to authors who can notice if a certain concept isn't grasped right away or if documentation didn't immediately solve someone's need.<p>This is used regularly in UX labs with two-way mirrors and cameras watching how users interact with design -- why should it not be useful to programming as well?
A perhaps naive question: could this sort of thing tap into Clojure's type hints rather than using external annotations? So rather than writing the example in the post:<p>(ann my-inc [Number -> Number])<p>(defn my-inc [n]
(let [internal-number (Integer/parseInt "1")]
(+ n internal-number)))<p>one could write this:<p>(defn ^Number my-inc [^Number n]
(let [internal-number (Integer/parseInt "1")]
(+ n internal-number)))<p>...and then run a type checker that reads and analyzes the hints?<p>Of course, the core.typed annotations could preserve whatever information they need in the compiled output, whereas the type hints aren't preserved past the compile phase (as far as I can tell.) Is that the limitation that requires defining type information in separate annotations?
For truly typed lisp you should also check Shen. Its type system is built in and very advanced and flexible (based on sequent calculus). You can write programs in both type checked and unchecked mode. One of the supported platforms is also Java.<p>Project is still young and in an early phase, but definitely promising.
Damn it - another unique Racket feature stops being unique.<p>I hoped that in 2020 Racket will be around 5th position in "the most popular language" rankings with Clojure in the first ten too. Now it looks like Clojure is taking the lead - maybe Racket2 will change this again.<p>But hey, either way that's a popular, mainstream Lisp! That's unprecedented!
Admittedly, I'm only a novice at clojure (working on it), but I find that type error really unfriendly. It doesn't provide any clearly actionable information, something like "+ expects it's 2nd argument to be Integer, but internal-number is a Number"
This looks really nice.<p>I've been wanting to get into clojure (mainly for the web aspect of it) for a while, but as someone who hasn't done much lisp and really loves Haskell's type system I've been hanging back a bit.<p>I'm assuming that clojurescript will also work fine with this?
Forgive me for being the nitpicker on this article, but, dear author: check the CSS font-family on your <pre> tags. You have some proportional fonts in there, and for me on Linux, your code snippets are showing up as proportional fonts which makes them not line up.<p>Specifically, I'd recommend changing<p><pre><code> font-family: Monaco,Bitstream Vera Sans Mono,Lucida Console,Terminal;
</code></pre>
to<p><pre><code> font-family: Monaco,Bitstream Vera Sans Mono,Lucida Console,Terminal,monospace;
</code></pre>
The "monospace" at the end is generic and will always produce a fixed-width font.<p>Great post anyway, thanks!
Is not Rich Hickey in opposition to typing systems?
<a href="http://www.reddit.com/r/programming/comments/lirke/simple_made_easy_by_rich_hickey_video/c2u1t1n" rel="nofollow">http://www.reddit.com/r/programming/comments/lirke/simple_ma...</a>