News for hackers. Stuff that matters.

arb

> You're at a party talking to a member of the attractive sex.

For some, there can be more than one attractive sex.

Re:It’s time for Python 2.7 on Monday October 10, 2011 @05:51AM (#3093059)
And Ubuntu LTS.
Local hackerspace draws an eclectic crowd. Hardly like-minded in most ways, but always interesting. (http://tangleball.org.nz)

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).

Re:The weekly read eval podcast loop on Monday December 06, 2010 @08:24PM (#1977623)
That sounds useful, but I'm unfamiliar with iTunes and its store, and would rather not register with them or use their software. Is there some easier way to do it?
Re:Clojure Cheat Sheet [pdf] on Thursday October 01, 2009 @04:34PM (#855768)
Re:Pong (130 lines in Clojure) on Saturday September 12, 2009 @11:55PM (#819794)
It's unnecessarily ugly.

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.

Re:Before you start learning Lisp... on Tuesday September 08, 2009 @10:02PM (#812393)
I've added a note at the top disambiguating the term too. Thanks for the feedback. :-)
Re:Before you start learning Lisp... on Tuesday September 08, 2009 @06:11PM (#812080)
The nomenclature goes something like this. The common noun "lisp" refers to the family of languages; the proper noun "Lisp" refers to Common Lisp; and "LISP" refers to obsolete lisp dialects from long before Lisp's time.

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.

Re:Lisp: No easy download on Sunday September 06, 2009 @06:09AM (#807662)
There are at least five links on the first page of results searching Google for "common lisp download": http://sbcl.sourceforge.net/platform-table.html http://clisp.cons.org/ http://ftp.gnu.org/gnu/gcl/ http://www.franz.com/downloads/ http://www.lispworks.com/downloads/

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?

Re:Can your programming language do this? on Wednesday July 08, 2009 @06:13PM (#694831)
Perhaps it's the function shorthand syntax that resembles Perl. This is closer to your macro's surface syntax:

    (Σ (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.

Re:Can your programming language do this? on Wednesday July 08, 2009 @04:58PM (#694674)
You can. For instance, SBCL introduced support for it around version 0.8 or so (years ago).
Re:A JavaScript Curiosity Regarding addEventListener on Thursday April 02, 2009 @12:37PM (#543585)
It looks like standard behaviour defined by event cancelation and default actions in the W3C DOM2 Events spec. Whether this is cross-browser or not isn't obvious. Suppressing default actions with event.preventDefault() seems to work in Firefox, at least.