←back to thread

Four Years of Jai (2024)

(smarimccarthy.is)
166 points xixixao | 3 comments | | HN request time: 1.028s | source
Show context
TinkersW ◴[] No.43726834[source]
I have my doubts with Jai, the fact that Blow & co seems to have major misunderstandings with regards to RAII doesn't lend much confidence.

Also a 19,000 line C++ program(this is tiny) does not take 45 minutes unless something is seriously broken, it should be a few seconds at most for full rebuild even with a decent amount of template usage. This makes me suspect this author doesn't have much C++ experience, as this should have been obvious to them.

I do like the build script being in the same language, CMake can just die.

The metaprogramming looks more confusing than C++, why is "sin"/"cos" a string?

Based on this article I'm not sure what Jai's strength is, I would have assumed metaprogramming and SIMD prior, but these are hardly discussed, and the bit on metaprogramming didn't make much sense to me.

replies(4): >>43727697 #>>43731025 #>>43733282 #>>43736239 #
1. VyseofArcadia ◴[] No.43727697[source]
> Also a 19,000 line C++ program(this is tiny) does not take 45 minutes unless something is seriously broken

Agreed, 45 minutes is insane. In my experience, and this does depend on a lot of variables, 1 million lines of C++ ends up taking about 20 minutes. If we assume this scales linearly (I don't think it does, but let's imagine), 19k lines should take about 20 seconds. Maybe a little more with overhead, or a little less because of less burden on the linker.

There's a lot of assumptions in that back-of-the-envelope math, but if they're in the right ballpark it does mean that Jai has an order of magnitude faster builds.

I'm sure the big win is having a legit module system instead of plaintext header #include

replies(2): >>43729817 #>>43734788 #
2. MyOutfitIsVague ◴[] No.43729817[source]
It depends heavily on features used, too. C++ without templates compiles nearly as quickly as C.
3. Jyaif ◴[] No.43734788[source]
For 1 million lines of C++ to take 20 minutes you must be building using a single core.