News for hackers. Stuff that matters.
Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by zephjc on Saturday July 03, 2010 @11:53PM (#1485081)
I don't think the "clojure for cocoa" description is apt.

1. All the examples I saw on the git tutorials we're basically just imperative programming with parentheses instead of ObjC's brackets (actually some of the examples remind me more of Smalltalk).

2. Clojure seems to be finding a niche in the web app world, whereas Nu is targeted at Cocoa app programming, i.e. end-user GUI apps.

[deleted]
Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by zephjc on Sunday July 04, 2010 @12:18AM (#1485117)

    I would disagree with the bit about Clojure being about
    web-apps though; it's really good for data processing and
    analysis, as well as enterprise apps (soon, I bet).
    Web-apps are just another fun way to hack with it.
I'll concede that. What I meant is that, in general, Clojure is typically being used for things other than end-user GUI apps, i.e. server-side or data-related programming.
Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by jared314 on Sunday July 04, 2010 @12:14AM (#1485115)
Has anyone tried to port Clojure to obj-c? They have one for .Net.
Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by sigh400 on Sunday July 04, 2010 @12:31AM (#1485129)
I think any real effort aside from the .Net one is waiting on Clojure-in-clojure to move forward.
Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by Scriptor on Sunday July 04, 2010 @01:14AM (#1485192)
Any reason why it hasn't? What parts of the language are the biggest obstacles?
Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by sigh400 on Sunday July 04, 2010 @03:27AM (#1485316)
I can't speak of the biggest obstacles but Clojure was bound to the JVM pretty early (hence the j) -- I personally have no real interest in getting off the JVM so I have not followed it close at all. Bootstrapping would be the obvious answer though.
Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by hga on Sunday July 04, 2010 @09:33AM (#1485642)
There are no obstacles, rather there are several subtantial blocks of work to do, at least one of them non-urgent (rewriting the current Java compiler in Clojure).
Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by jashmenn on Sunday July 04, 2010 @12:46AM (#1485151)
I'm the OP, and I'm not really sure what the source of let-down is here.

Nu has closures, anonymous functions, supports currying etc. It uses the Cocoa classes and they claim it can even be compiled onto the iPhone.

So while the examples in git may be "imperative" I would guess its only because they are trying to show how to be interoperable with Cocoa objects which, not being functional, causes imperative constructs to creep back into your code. The same thing happens when you try to use existing Java objects in Clojure. This seems to be a limitation only of the examples and not of the language itself.

Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by itistoday on Sunday July 04, 2010 @01:16AM (#1485196)
Lisp for Cocoa would have been a better title.

Clojure is quite a different Lisp, and to say that this is "Clojure for Cocoa" implies it has something in common with Clojure other than also being a member of the Lisp family, which it really doesn't.

Clojure is very functional, Nu is not. Clojure's language is designed to make it safe and simple to write multithreaded code. Nu is just an imperative Lisp with smalltalk syntax so that it can interface with Cocoa/Objective-C. Clojure takes a departure from all Lisps by treating lists as just any other datastructre, and therefore has literal syntax for arrays, hashtables, and sets, Nu has no such thing. Clojure places a huge emphasis on "data abstractions" like Seqs and builds its core functions around that. Clojure is compiled, Nu is interpreted, etc...

Don't get me wrong, I think Nu is really cool, but I can't think of a single thing that Nu shares with Clojure that is exclusive to Clojure and not Lisp.

Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by jwr on Sunday July 04, 2010 @04:55AM (#1485408)
Agreed. It has little in common with Clojure.

But it is an interesting effort. I would like to be able to write Mac apps in Lisp, closures come in very handy in GUI programming.

Re:Nu: Lisp on Objective C. (think Clojure for Cocoa) by itistoday on Sunday July 04, 2010 @03:26PM (#1486180)
Objective-C has closures, they're called blocks.