Praise and breaks.

51 views
Skip to first unread message

Heiko Henrich

unread,
Apr 28, 2012, 10:47:14 AM4/28/12
to program...@googlegroups.com

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

Tim

unread,
Apr 28, 2012, 12:25:12 PM4/28/12
to Programming 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).

My main areas of use for Nu now are general-purpose scripting, server-
side programming on MacOS, and as a scripting layer in a family of iOS
apps that I'm writing. I don't know how many people are using Nu, but
those that do usually take it and run with it with little trouble. For
example, I didn't hear about Martin Hedenfalk's http://www.vicoapp.com/
until it was released, which I took a good sign.

Thanks for your comments and for sharing your breakpoint library
(https://gist.github.com/2519124) - and thanks for hacking Nu!

Tim









On Apr 28, 7:47 am, Heiko Henrich <heiko.henr...@googlemail.com>
wrote:
> Heiko**

ksjogo

unread,
Apr 28, 2012, 2:31:48 PM4/28/12
to program...@googlegroups.com
Yeah, I agree that much more could be possible. Actually I ported the lazy functions from 'Land of Lisp' to Nu some long time ago.
Having some GCD wrappers for NuBlocks could allow some easy concurrency.

And I agree on the tabbed aspect, I come to like the parens and it is safer to explicitly use them with the preparser shortcuts. 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?

Heiko Henrich

unread,
Apr 29, 2012, 10:28:04 AM4/29/12
to program...@googlegroups.com
Hey Tim,
 thank you for replying
 
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).

Oh that's really a pitty, since "eierlegende Wollmilchsau" sounds so much nicer ....
 
 and thanks for hacking Nu!

Your welcome - you'are a very generous man, but you wouldn't be anymore, if you knew, what I have already done to your NuCell and NuParser classes ...

Btw,  I discovered and corrected error in breakpoints.nu, so it is possible now, to set up as many breakbable functions as you want with breakable-fun.

So long,
Heiko

Heiko Henrich

unread,
Apr 29, 2012, 10:56:09 AM4/29/12
to program...@googlegroups.com
Hey
 
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.

yes, that makes sense.
 
Further macros to support it are in plain nu files.

that's what I wanted to propose, as I read your post...
Here's what I did for parens saving:
 
An IDE would be really cool, why dont you just create a github project for it and let us work together on it?

That sounds good.
But give me some time to clean up the code and finish some thing's.
It's still a work in progress and the code (especially the Objective C part) is still a big mess.
Also it's not always self explaining, 
so I need some time to prepare...
Maybe I send you a zip file first at some time.

Heiko
Reply all
Reply to author
Forward
0 new messages