Live data from Hacker News

Nimrod: A new approach to metaprogramming

nimrod-lang.org

1–10 of 58 posts

Re: Nimrod: A new approach to metaprogramming

#2
Very interesting work. By the way, I'm planning to work on the project with the close purposes, but I have started with a more low-level tool first. My first work is a library to construct incremental parsers: https://github.com/Eliah-Lakhin/papa-carlo The idea is that the language's compiler based on this library will be easier integrated into the exist code editors and IDEs. Maybe we should somehow unite our efforts with the author of Nimrod?

Re: Nimrod: A new approach to metaprogramming

#6
This looks really neat!

Looks like a cross-platform language thats an even more acceptable lisp than ruby (hello macros!), with multiple build-language targets including C/javascript/C++ and a fast garbage collector? Like Go, but even cooler?

Re: Nimrod: A new approach to metaprogramming

#7
post #4

Cool project. How does it accomplish the realtime GC max pauses of 1-2 ms after compiling to javascript? Wouldn't the js implementation's GC have the final say on GC pauses? Thanks.

Just being optimistic, probably. You could write a fairly trivial program that builds and discards massive trees that will force GC to take greater than 1-2ms simply on freeing memory. Maybe they mean in regular operation or something - but then what is regular? I guess they have to claim impossible feats to get interest given just how many languages there are already.

Re: Nimrod: A new approach to metaprogramming

#8
Some very interesting features of Nimrod which I would like to emphasize:

- clean Pythonic syntax (whitespace relevant but tabs are forbidden)

- native Perl syntax for regular expressions (slide 42)

- subrange types as in Ada

- set types as in Pascal

- strings as case (switch) selectors

- easy C interface with automatic type conversion (only functions as parameters need additional compiler pragmas)

- typed macros (templates)

- object code: native, C, Javascript (probably more to come)

I am working with Nimrod right now, and it is really one of the most productive languages that I ever encountered. It seems to mix the best features of other popular languages. Nimrod actually is where Python should be. I wonder if it is suitable for small embedded systems also.

By the way, one important difference to Perl regular expressions is that re"..." always parses the whole expression where Perl parses partially. Fortunately Perl's behavior can easily be simulated with a template.

Re: Nimrod: A new approach to metaprogramming

#9
post #8

Some very interesting features of Nimrod which I would like to emphasize: - clean Pythonic syntax (whitespace relevant but tabs are forbidden) - native Perl syntax for regular expressions (slide 42) - subrange types as in Ada - set types as in Pascal - strings as case (switch) selectors - easy C interface with automatic type conversion (only functions as parameters need additional compiler pragmas) - typed macros (te…

For embedded use it's probably ok, anywhere C is ok. It statically links the bits of the stdlib you use but dead code elimination seems to work pretty well.

A simple word counting script I just wrote compiles down to about 52k on 64bit OS X.

(Src: https://gist.github.com/tylereaves/7711302)

Re: Nimrod: A new approach to metaprogramming

#10
post #4

Cool project. How does it accomplish the realtime GC max pauses of 1-2 ms after compiling to javascript? Wouldn't the js implementation's GC have the final say on GC pauses? Thanks.

I believe the JS target is considered a bit of a demo/toy - e.g. large swathes of the stdlib are unavailable.
Post reply on HN