Live data from Hacker News

Nimrod: C + Macros + GC

nimrod-code.org

41–50 of 116 posts

Re: Nimrod: C + Macros + GC

#41
post #25
post #20

Earlier quoted context omitted.

Nobody can explain to a dedicated C++ programmer why a new language is better than C++. I have tried for more than a decade many times and all I have ever gotten across has apparently been a "wah wah wah" noise like the adults in Peanuts. Because C++ is multi-paradigm, all paradigms are possible within it (although they may not be syntactically easy or have reasonable error messages, etc etc). Therefore, either C++ i…

The problem is that many older timers, like myself, that know C++ since its origins are quite comfortable with it, despite all its warts. Nowadays I spend my consulting work in Java and .NET land, and actually I favour the Wirth family of languages over C and C++. However, C and C++ have a big tooling support in the industry, and history shows system programming languages are only successful when backed by OS vendors…

Exactly, writing code in the same language as the OS (and their source examples) is generally the best approach ... based on what you're doing of course.

Re: Nimrod: C + Macros + GC

#42
post #5

As anyone tried it for embedded code on microcontrollers ? It looks usable for soft realtime, almost keeping speed and control of C and adding ease (and fun) of coding. GC is tunable and there are compilation options for embedded systems ( http://nimrod-code.org/nimrodc.html#nimrod-for-embedded-syst... ).

I haven't tried this, but I see that the Nimrod 0.9.0 release notes (from about a year ago) include this item:

> The stdlib can now be avoided to a point where C code generation for 16bit micro controllers is feasible.

Re: Nimrod: C + Macros + GC

#43
post #39
post #19

This reminds me a lot of D. It's low-level, GCed, essentially intended as a nicer C/C++. But I think it suffers from the same fatal flaw that D does: you have to semi-manually translate C headers that you want to use. Like D, it provides an automated tool to help, but the translated headers will inevitably lag their original counterparts. As another commenter below noted, the var and proc thing is also redundant and…

> But I think it suffers from the same fatal flaw that D does: you have to semi-manually translate C headers that you want to use. Like D, it provides an automated tool to help, but the translated headers will inevitably lag their original counterparts. I can't think of a better alternative. Can you suggest one? The fact that Nimrod compiles to C already is a huge plus, it makes wrapping C code very easy.

[deleted]

Re: Nimrod: C + Macros + GC

#44
post #40
post #23

Earlier quoted context omitted.

Hi dom96. Thanks again for contributing the Jester tests! I hope you get some time to continue your work on Jester. We'd like to have Nimrod represented properly in the results. Are there other Nimrod web frameworks (and importantly, domain experts with those frameworks) that could be contributed for Round 7?

No problem! Thanks for accepting my contributions! I hope so too, but maybe with Nimrod's recent surge in popularity someone can give me a hand :) Sadly, I am not aware of any other web frameworks. Speaking of Round 7, do you have an ETA for it?

Not yet, we've been busy with other projects. But I want us to aim for mid-September.

Re: Nimrod: C + Macros + GC

#45
post #39
post #19

This reminds me a lot of D. It's low-level, GCed, essentially intended as a nicer C/C++. But I think it suffers from the same fatal flaw that D does: you have to semi-manually translate C headers that you want to use. Like D, it provides an automated tool to help, but the translated headers will inevitably lag their original counterparts. As another commenter below noted, the var and proc thing is also redundant and…

> But I think it suffers from the same fatal flaw that D does: you have to semi-manually translate C headers that you want to use. Like D, it provides an automated tool to help, but the translated headers will inevitably lag their original counterparts. I can't think of a better alternative. Can you suggest one? The fact that Nimrod compiles to C already is a huge plus, it makes wrapping C code very easy.

[deleted]

Re: Nimrod: C + Macros + GC

#46
There was something similar to this about two weeks ago here, with vars and lambdas in c99. It was less of a full blown language and more just functions and preprocessor definitions to be used in C. I am having trouble finding it now. Does anyone remember the name of this other project? I'd like to check these both out.

Re: Nimrod: C + Macros + GC

#47
post #46

There was something similar to this about two weeks ago here, with vars and lambdas in c99. It was less of a full blown language and more just functions and preprocessor definitions to be used in C. I am having trouble finding it now. Does anyone remember the name of this other project? I'd like to check these both out.

https://github.com/orangeduck/libCello

Re: Nimrod: C + Macros + GC

#48
post #36
post #19

This reminds me a lot of D. It's low-level, GCed, essentially intended as a nicer C/C++. But I think it suffers from the same fatal flaw that D does: you have to semi-manually translate C headers that you want to use. Like D, it provides an automated tool to help, but the translated headers will inevitably lag their original counterparts. As another commenter below noted, the var and proc thing is also redundant and…

Is "fatal flaw" the right term? I do not see any way to fix this. Even including a full C parser and preprocessor into the D/Nimrod compiler would not solve the problem.

Since I've written a C compiler, I know how to read C source files. The problem with automated conversion is you can do 90% of the job without any trouble, but there's that darned last 10% that doesn't map to D without some human decision making.

For example, there are the preprocessor macros. Most are straightforward, but it seems most C .h files succumb to the temptation at some point to do something wacky with them.

Re: Nimrod: C + Macros + GC

#50
On the Clay thread a while back, people liked my list of systems-oriented languages that I've been compiling for a while. I can't go a good copy-paste and edit job on my iPad, so I'll just link to the thread here: https://news.ycombinator.com/item?id=6117456 . A bunch of other people came in with updates and other entries for the list. Included were of course Clay, Nimrod, Rust, and D, but also Deca, BitC, ATS, Habit (a Haskell dialect), and others.
Post reply on HN