7 ms·
Performance of Nimrod is very impressive. There was another post a year or two back, where someone was making a small game and found Nimrod to be the winner, a
by rdtsc 12y ago
Performance of Nimrod is very impressive.
There was another post a year or two back, where someone was making a small game and found Nimrod to be the winner, after C/C++ (sorry lost the link).
Garbage collection is also pretty interesting.
http://nimrod-lang.org/gc.html http://nimrod-lang.org/gc.html
There is a real-time feature to it, it basically says "collect garbage but not more than X microseconds a time". That would be useful for some applications like games, hardware controllers, low latency audio or signal processing.
I wish some big company (Google or Mozilla) would have taken a look at Nimrod before going and building their own language and then promoted and marketed it. I guess that almost never happens. Is that arrogance, not invented here syndrome, legal issues with copyright...?
And as much as I like Nimrod, I feel there also a bit of language-fatigue in the community. There are so many new-(ish) platforms and languages (Go, Rust, Swift, Dart, Clojure, Scala, Julia, Elixir). Yes they all have cool things and are slightly different but I wish there were less new languages and more stable languages, with better documentation, and a large library ecosystem.
- djur 12y agoWell, the two Google languages you mention there are philosophically _very_ different than Nimrod. Dart has always been specifically targeted as a Javascript alternative/successor, and Go has a strongly minimalist, "one way to do it" inherited from its Plan 9 heritage. Also, Google hasn't done very much to promote either Go or Dart. Neither of them are alternate languages for the Android platform, for instance. Chrome doesn't natively support Dart, even though the functionality exists (in Dartium). They're more like open-source projects originating in and supported by Google, as opposed to official Google products. The history of biological evolution is marked with periods of rapid diversification followed by mass extinctions and consolidation of remaining lineages. I think programming languages follow the same trend. We're in a period of diversification right now, and at some point in the future a handful of today's newcomer languages will be the hoary old relics that people are trying to get away from.
- pcwalton 12y ago> I wish some big company (Google or Mozilla) would have taken a look at Nimrod before going and building their own language and then promoted and marketed it. I guess that almost never happens. Is that arrogance, not invented here syndrome, legal issues with copyright...? Rust has different goals than Nimrod (memory safety without garbage collection and data race freedom—both of which are important for writing a parallel browser engine).
- jimmaswell 12y agoWhy is the absence of garbage collection particularly important for a web browser engine? I've had good experiences with a few intensive games and programs that use GC'd environments such as the .NET runtime, so I don't think performance would be much of a reason that you can't have GC with a web browser. Is it security (old data left visible in ram)?
- pcwalton 12y agoTo be precise, global garbage collection is the big problem: when one tab is collecting garbage we don't want to stall the other tabs. At the same time, we need to be able to share objects between threads in a fully memory-safe manner. Desirable is the ability to do this without any runtime overhead compared to C++ (e.g. barriers or pauses), because any browser engines will be compared head-to-head in terms of performance against engines that pass raw pointers around during layout, etc. I know of no GC algorithm that is memory-safe and thread-safe, avoids stopping all threads, is barrier-free, can deal with cycles, runs on commodity consumer hardware without a kernel extension, and is competitive in performance with typical C++ memory management schemes. Besides, once you have data race freedom (important for us) you are already most of the way to memory safety without garbage collection. (For more, see [1]). [1]: http://smallcultfollowing.com/babysteps/blog/2013/06/11/on-the-connection-between-memory-management-and-data-race-freedom/ http://smallcultfollowing.com/babysteps/blog/2013/06/11/on-t...
- seanmcdirmid 12y agoThe link sounded like linear types, which they talk about at the end. There are plenty of apps that don't need full on C++ performance and can't afford the dev costs anyways. Garbage collection isn't the big problem for these apps; getting the code to work is. The analogy between memory management and data race avoidance is apt, but not in just the way you're thinking. We can also build slower garbage collection-like systems for automatically handling data races, further improving programmer productivity [1]. In this case, unrestricted sharing is still allowed, and the run time just takes care of it (for a price, of course). [1] http://research.microsoft.com/en-us/people/smcdirm/managedtime.aspx http://research.microsoft.com/en-us/people/smcdirm/managedti...
- pnathan 12y agoSwift and Rust have similarities. Swift is, I believe, designed with an eye towards interop with Objective C. Rust pcwalton has already addressed. - Dart is for JS - Clojure is a GC'd JVM Lisp - Scala is a GC'd JVM type-safe language - Julia is specifically for scientific computing - Elixir is an Erlang wrapper, afaik.
- klibertp 12y ago> but I wish there were less new languages and more stable languages, with better documentation, and a large library ecosystem. Um... Pick one of those and write a library or docs for it? Languages with google-level financial support will live no matter what (as long as the company behind them exists), but even in case of those languages any help is always welcome. For languages like Nimrod, which IIRC is done entirely by just one guy, you can make a real difference with 15 minutes of your time per week. There's always so much to do, and since no one is paid to do it, some things (docs, in particular) are often lacking, that's true. But the only one who can make your wish true is you: just start contributing to one of the languages. As a side note, this is why I love new, small, niche languages. Even relatively simple contribution to them makes a visible difference and with some more work you can really influence the shape of the language. And you can really be the first to do something meaningful, like http client/server library. Writing such things is fun, but in every other language they are written already and reinventing them would be a waste of time. Not so in languages like Nimrod or Julia, where they would be valuable contributions. Anyway, just pick one of the languages, learn it and contribute to it and you'll see it mature quickly (it will still take years, but thanks to you not decades).
- dom96 12y agoCouldn't agree with what you have said more. I wish more people looked at things this way. I personally have had a lot of fun contributing to Nimrod because like you said it is very easy to contribute something meaningful. I wrote a lot of the standard library modules, including http client/server modules and more. It wasn't only fun but it was also a very good learning experience and because the community is still quite small getting real-time help from the creator of Nimrod is very easy. So instead of writing the 100th ORM for Python write the first one for Nimrod :)
- pjmlp 12y ago> And as much as I like Nimrod, I feel there also a bit of language-fatigue in the community. There are so many new-(ish) platforms and languages ... Welcome to the 80-90's, before the likes of C, C++, C# and Java kind of wiped the others out of most corporations radars. I like being brought back into those days.
- blt 12y agoPeople act surprised when a compiled language approaches C performance. I don't understand why. Any language that compiles to machine code, doesn't store every object on a GC heap, and has C-like function call semantics should be bound by the performance of its optimizer and not anything inherent in the language. Nimrod transpiles to C so it gets the C compiler's optimizer. Rust uses a LLVM backend so it gets the LLVM optimizer. It should be surprising if these languages don't approach C performance.