44 karma · joined Apr 2, 2009 (17y ago) · 12 submissions
comment 15y ago · link · parent
Networking through it also often leads to people from neighbouring groups, including artists, academics, entrepreneurs, politicians, activists and so on (many of whom might not self-identify as hackers/makers).
comment 17y ago · link · parent
comment 17y ago · link · parent
There's a lot of unnecessary state, where refs are initialized to nil, then only updated to a fixed value. There's side effects in transactions (mostly around the Timer). Not one function is defined with parameters, which ought to raise alarms. The flow resembles Java code rewritten in Clojure, rather than a functional Clojure program.
Besides that, much of the code is either non-idiomatic or primitive: the 'ns' macro should be used instead of 'import'; 'alter' can be better than 'ref-set'; 'when' is better than 'if' without an else form; the proxy identation is wrong.
The AWT/Swing interaction is excusable, as is the poor readability given the brevity constraint for this exercise, but there are still some elementary problems.
comment 17y ago · link · parent
Generally, lisps are not necessarily functional, though some dialects are, to varying degrees. Common Lisp isn't very functional at all; Scheme is much more functional; and Clojure is quite strongly functional.
comment 17y ago · link · parent
It's true there is no one link, but his examples suffer a related problem -- no links are provided to Jython, IronPython, JRuby, etc., which is misleading if marginally more convenient.
That said, do people typically download releases, even of Perl, Python or Ruby implementations? I've only used distro packages or RCS checkouts of any of those systems. Is this mainly an issue for Windows or Mac users?
comment 17y ago · link · parent
(Σ (fn [i] (* (p i) (log (p i)))) x)
The tradeoff with your macro version is that when you want to leverage Σ as a first-class function (say, with comp or partial), you will end up with #() or (fn..) in the calling code. You can't escape it -- it's a natural way to write functional Lisp code.It's no less readable than the rest of Clojure's API. You can reasonably expect a Clojure user to understand functions as arguments.