Live data from Hacker News

Porting 58k lines of D and C++ to Jai

yet-another-blog.com

1–10 of 264 posts

Re: Porting 58k lines of D and C++ to Jai

#2
Can't wait to see how this progresses. So far the only source of knowledge have been Blow's streams, but he's the author, and he knows his language inside and out. It will be immensely interesting to see other people's experiences.

Re: Porting 58k lines of D and C++ to Jai

#3
I find the "slow compile time" complaint of D interesting; overall I find ldc2 to be one of the faster compilers out there. I suppose the combination of features and metaprogramming used by the author is responsible for the 3-minute compile times in debug mode. While jai is evidently expected to be substantially faster (author estimates 5 sec for this codebase???), other choices like Rust would be far, far slower than D.

Re: Porting 58k lines of D and C++ to Jai

#4
It's worth mentioning that DMD is a reference compiler and not meant as a production tool. DMD is for fast compile time during dev cycles and testing new language features early.

You've got the LLVM and GCC compilers for production.

The problem with lack of debug info on Windows in D is solved by using LDC with LLDB/GDB to debug

You can also ask the compiler to emit CodeView debugging info if you want to stick with Microsoft stuff

Re: Porting 58k lines of D and C++ to Jai

#5

I find the "slow compile time" complaint of D interesting; overall I find ldc2 to be one of the faster compilers out there. I suppose the combination of features and metaprogramming used by the author is responsible for the 3-minute compile times in debug mode. While jai is evidently expected to be substantially faster (author estimates 5 sec for this codebase???), other choices like Rust would be far, far slower tha…

> author estimates 5 sec for this codebase???

This expectation comes from jai compile times for the game Jonathan Blow is developing: https://www.twitch.tv/j_blow It takes about 2.5 seconds to compile and link over 168k lines of code in debug mode.

See e.g. https://www.twitch.tv/videos/1659970118 at around 30 seconds in

Re: Porting 58k lines of D and C++ to Jai

#6
I'm really interested to see Jai in the wild, but I have to say I find the Jai v.s. Rust comparison here...unconvincing to say to least. It's particularly funny to be excited about "being able to do anything during compilation" using Jai and then complain to that the #1 problem in programming is "culturally tolerated and even encouraged complexity."

Re: Porting 58k lines of D and C++ to Jai

#7
post #6

I'm really interested to see Jai in the wild, but I have to say I find the Jai v.s. Rust comparison here...unconvincing to say to least. It's particularly funny to be excited about "being able to do anything during compilation" using Jai and then complain to that the #1 problem in programming is "culturally tolerated and even encouraged complexity."

Complexity often arises from restrictions on "anything", rather than people actually doing anything.

Re: Porting 58k lines of D and C++ to Jai

#10
post #4

It's worth mentioning that DMD is a reference compiler and not meant as a production tool. DMD is for fast compile time during dev cycles and testing new language features early. You've got the LLVM and GCC compilers for production. The problem with lack of debug info on Windows in D is solved by using LDC with LLDB/GDB to debug You can also ask the compiler to emit CodeView debugging info if you want to stick with M…

I don't think "DMD is a reference compiler and not meant as a production tool" is a great way to characterize it. There are certainly valid reasons for choosing LLVM and GCC for "production", but also valid reasons for choosing DMD.
Post reply on HN