News for hackers. Stuff that matters.
Re:Learning C3 by mustermannBB on Thursday May 29, 2025 @11:01AM (#44126779)
Problem with Hare is that it is (or at least was last time I checked) Linux/Unix only and so by design. That kinda makes it DOA for many.
Re:Learning C3 by plainOldText on Thursday May 29, 2025 @11:58AM (#44127341)
Indeed. There’s a port for macOS though.

And yet out all these newer C-like languages, it looks like Hare probably takes the crown for simplicity. Among other things, Hare uses QBE[1] as a backend compiler, which is about 10% the complexity of LLVM.

[1] https://c9x.me/compile/

Re:Learning C3 by sitkack on Thursday May 29, 2025 @12:06PM (#44127416)
QBE is an art project. Read the source.
Re:Learning C3 by orthoxerox on Thursday May 29, 2025 @01:17PM (#44128106)
I tried. It's not at Arthur Whitney's levels of terseness, but compared to the source of, say, Redis it's a pain to read.
Re:Learning C3 by lerno on Thursday May 29, 2025 @01:48PM (#44128403)
The downside of QBE is that it then requires an assembler and a linker. And QBE's only input and output is still text.

Plus the "frontend -> QBE -> assembler -> binary" process is slower than "frontend -> LLVM -> binary". And LLVM is known for being a fairly slow compiler.

Re:Learning C3 by stevefolta on Thursday May 29, 2025 @04:50PM (#44130277)
The downside of QBE is that it doesn't have a way to generate debug symbols. But I still love and use it.
Re:Learning C3 by YorickPeterse on Thursday May 29, 2025 @09:23PM (#44131918)
The most recent release has the ability to generate basic debugging information (see "new experimental dbgfile and dbgloc directives. " from the release notes) as Hare needed that (and IIRC a Hare contributor added it). Unfortunately, there's no documentation on it, and last I checked to see how to use it I had to go spelunking in the Hare source code.
Re:Learning C3 by atiedebee on Saturday May 31, 2025 @11:05AM (#44144744)
It's funny how they say they are at 10% of the code of LLVM in their marketing, when it is actually closer to 0.1%. Throwing LLVM version 20.1 through wc (just the subdirectory llvm/lib) results in 2.3 million lines for all .c and .cpp files. QBE was around 14k last time I checked.
Re:Learning C3 by alpaca128 on Friday May 30, 2025 @03:47PM (#44139361)
That and no multithreading.