Remix.run Logo
einpoklum 4 days ago

It's very C-like, heavy use of macros, prefixes instead of namespaces, raw pointers for arrays etc. Technically you're compiling C++, but... not really.

No negative or positive comment on its usability though, I'm not an ML/Neural Network simulation person.

caned 4 days ago | parent | next [-]

I've found adherence to C++ conventions in low-level software to be a rather contentious issue, mostly recently when working in an ML compiler group. One set abhorred the use of macros, the other any kind of polymorphism or modern C++ feature.

Coming from a background of working with OS kernels and systems software, I don't mind the kind of explicit "C++ lite" style used by the OP. Left to my own devices, I usually write things that way. I would think twice if I was trying to design a large framework, but ... I try to avoid those.

einpoklum 3 days ago | parent [-]

If you think that, I encourage you to check out this presentation:

https://www.youtube.com/watch?v=zBkNBP00wJE

About writing a Commodore C64 game in modern(ish) C++

maybe it will sway you a bit :-)

caned 2 days ago | parent [-]

That is impressive. It certainly shows what is possible _if_ you are familiar enough with the intricacies of modern C++. I'm not sure how I feel about a workflow where one needs to continually address "overhead" introduced by the language environment.

nirw4nna 4 days ago | parent | prev [-]

Yes! This was actually one of my initial goals! I actually like to work in a C-style-C++ let's say where I turn off C++ features I don't need and just use the one I actually need like templates, objects ecc... I find this style to be easy to reason about when it comes to performance.

pjmlp 4 days ago | parent [-]

The proper way to reason about performance is to use a profiler, not second guessing what C like code generates.