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…
Nimrod: A new approach to metaprogramming
11–20 of 58 posts
Re: Nimrod: A new approach to metaprogramming
#12Also, Nimrod has a very nice library. Definitely has enough "batteries" in it to get started.
http://nimrod-lang.org/lib.html
Just a few impressive ones: http client, server, json parsing, actor support, redis db driver, zmq, cairo graphics, OpenGL wrappers, even Lua and Python support.
That looks very appealing, anyone using, what is your experience with it?
Re: Nimrod: A new approach to metaprogramming
#13Cool 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
#14Impossible to navigate the site on mobile . For some reason it says swipe so it is supposed to work well on mobile device.
Re: Nimrod: A new approach to metaprogramming
#15Some 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…
What do you mean by "Nimrod is where Python should be"? The two languages are aimed at very different use cases.
Re: Nimrod: A new approach to metaprogramming
#16Earlier quoted context omitted.
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.
It's deferred reference counting, so the 1-2ms claim is perfectly reasonable because all it has to scan is the stack (though if they want to break cycles they will have to do something costlier). The downsides are all of the downsides of reference counting, plus the fact that last I looked Nimrod's GC is not thread safe. That last one is a huge downside IMHO. I think DRC is interesting but I'm not much of a fan of it…
Re: Nimrod: A new approach to metaprogramming
#17Some 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
#18Some 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…
I guess you meant "what I wanted Python to be".
I don't see how Nimrod is a natural evolution of Python. Static types and meta-programming by templates are far from anything Python proposes. I believe not even the syntax comparison applies too much, it's syntax is more reminiscent of Pascal than Python itself.
Re: Nimrod: A new approach to metaprogramming
#19Earlier quoted context omitted.
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 )
Thanks - but your example is Python code ??
Edit: Apparenetly not...there are alot more modes in there but the UI exposing them is easy to miss
Re: Nimrod: A new approach to metaprogramming
#20Cool 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.