I heard from Nu in 2009, and after switching to the Mac several months ago, I have the opportunity to code with Nu. I wanted to take the chance now to praise this somehow crazy peace of software called Nu and say thank you to Tim Burks for developping it.
I know, I am about 5 years too late and it looks like there is just a (very) small community working and supporting Nu (left?). This is difficult to understand, because (as far as I can judge) Nu is a real miracle:
As everyone
knows, Nu merges the three different worlds of Ruby, Objective C and Lisp.
It has the
fast prototyping capabilities and the easiness of Ruby, he depth, flexibility
and the (possible) functional approach of Lisp and of course the power
and all that mighty frameworks of Objective C, making it usable in the real
world, beyond servers and geeky command line tools, with millions of iOS- and OSX devices. In German
we would say this is a “eierlegende Wollmilchsau” – vaguely translated to “an egg
laying, milk and wool pig”, which has a slight negative connotation of trying
everything and not satisfying anyone.
But this isn’t the case with Nu. I think (again, as far as I can judge) the potential of Nu is really huge and maybe 10% is used now. Most people seem to use Nu as an easy prototyping and scripting language, and Nu does a great job with that. So most people apparently like the Ruby and Objective C part of Nu.
For me, sometimes
the lisp part seems a bit underestimated, but I think, that’s the part where
the true capabilities of Nu are.
Lisp is
strange, sometimes difficult to read and the parentheses are annoying. But the
true power of lisp is, that it is a language whose syntax is as easy to
understand for humans as it is for the machine, or in terms of Nu: every part
of the program (after the parser has
eaten it up) is an object, not different from any data object the program
generated.
I had my moment, when I looked after the main eval loop in the source code – I couldn’t find it. There were just classes to produce objects, that were capable to evaluate themselves to other objects with more objects as arguments! I don’t know, I am not a language expert, so maybe this is something xxx had already done with yyy 30 years ago (assign the values to the symbols xxx and yyy and please tell me). It looks so simple, but imho it’s brilliant and ingenius.
I could understand then, what lispers mean, when they say, code and data are the same (though it’s implemented differently in most lisps, as far as I know). This simple principle can lead to programs, that can program themselves and to algorithms and programming concepts, which are pretty mighty, though sometimes difficult to understand.
So the annoying syntax has a reason. Though I liked the tabbed approach ksjogo introduced here some weeks ago, very much, I think it could lead in the wrong direction. People, who are looking for a nice language replacement for objective C with convenient syntax are much better off with the Smalltalk derivate FScript, which seems to get really successful lately.
On the other hand, I don’t think, Nu will ever attract “true” lispers, who are addicted to there ugly Common Lisp (sorry, I can’t help it). I don’t think anyone of the big lisp community will take Nu seriously – it’s just not lispy enough. (And admittedly the backdoor introduction of infix operators through messages isn’t really lispy, it is Nu)
But I think it could be possible to create with Nu something similar to Clojure, whose functional approach is very tempting for people, who are looking for a fresh approach to programming. Someone really dedicated to it, could implement things like lazy sequences, an easy to use concurrency API and so on, for or even with Nu, maybe as a pure functional subset fo it in no time. Nu in combination with objective C has all the means.
Ok enough blah blah, I just wanted to say, that I like Nu very much and having a lot of fun with it.
I had so much fun, that I felt urged to start developing a kind of IDE for (and with) Nu. It is already working with code highlighting, parens highlighting, auto completion, auto indentation and other stuff, as a (let’s say) prove of concept, so I can write my IDE with my own IDE, which is a crazy kind of fun. (Somehow almost like I had in the olden days with my Sinclair ZX Spectrum.) I don’t do coding for a living, so I have to go in my own pace – that means, it won’t be finished tomorrow. And - don’t expect too much.
A small goody: Currently I am working on a debugger, so I’ve written a small breakpoint library:
https://gist.github.com/2519124
It doesn’t work in every situation, and is not tested thoroughly, so if you find some bugs, please tell me.
Have fun with Nu,
Heiko
Nu continues to be my eierlegende Wollmilchsau, and I suppose it's
fortunate that I didn't know that phrase in 2007 (since "Nu" is so
much easier to spell).
and thanks for hacking Nu!
Nut is used (on my side) to allow a kind of easy readable/writeable, scriptable, super-charged, inheritance supporting json to allow high speed level editing and customisation. Without the parens I can just give the self explaining file to my designers and they have no problem to edit files.
Further macros to support it are in plain nu files.
An IDE would be really cool, why dont you just create a github project for it and let us work together on it?