Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lerno
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
61.
▲
by
lerno
11mo ago
Ultima 4 was good story wise, but the combat was extremely tedious with each in your party only being able to take a single step per turn. This was particularly annoying when facing easy to beat foes. The SSI AD&D games which only came
62.
▲
by
lerno
11mo ago
Over 25 years ago I was doing ny final thesis on string theory for my Masters degree. The more I read, the more I went ”this could not possibly be right”. I ended up taking a break to work to get perspective on things and decide whether I w
63.
▲
by
lerno
11mo ago
Maybe this, where a Zig user tries out C3? https://alloc.dev/2025/05/29/learning_c3
64.
▲
C3 vs. C: A cleaner C for 2025? [video]
(youtube.com)
1 points
by
lerno
11mo ago
|
2 comments
65.
▲
by
lerno
11mo ago
I answered above.
66.
▲
by
lerno
11mo ago
If you are comparing Zig to Rust and C++, which are very well known to be difficult to learn, then that is not really saying anything about the ease of learning it. Compare it to Swift, D or Odin. Is it "incredibly simple" compare
67.
▲
by
lerno
11mo ago
Embergen is 400kloc Odin, it compiles in about 2s. No incremental compilation or caching to speed it up. And this is with LLVM as backend.
68.
▲
by
lerno
11mo ago
This is just a convenient excuse. If Zig is to be fast to compile, it doesn’t help to make excuses for it. Saying something it ”fast enough” because one is comparing with even slower languages is likely what made both Rust and Swift so slow
69.
▲
by
lerno
11mo ago
”Zig builds C faster than most C compilers” is a nonsense statement, which I don’t know how to answer. The fact is simply that despite Zig uses LLVM as a backend in the same way Odin and C3 does, it compiles much slower. Exactly why that is
70.
▲
by
lerno
11mo ago
It uses LLVM as the backend yes.
71.
▲
by
lerno
11mo ago
Odin, Jai, C3, C.
72.
▲
by
lerno
11mo ago
I have never heard anyone calling Zig "famously simple" before. In fact, people tend to say it has quite the learning curve. Of course, caveats apply: it is certainly simple compared to some languages, but certainly not compared t
73.
▲
Zig and the design choices within
(blueberrywren.dev)
129 points
by
lerno
11mo ago
|
180 comments
74.
▲
by
lerno
11mo ago
I feel qualified to offer a guess as to why: in Zig (and Odin) reuse is mainly done through what basically is templates. This reduces the need for vtables only when true ”plugin” type of objects are the only solution. For Zig and Odin, the
75.
▲
by
lerno
1y ago
I should add that there are a few candidates: 1. Zig uses three(!) frontend IRs, Odin and C3 only one. 2. Zig relies heavily on comptime to provide most of its language features. C3, which has a similar set of features, doesn’t encourage ex
76.
▲
by
lerno
1y ago
While LLVM certainly is a problem, consuming over 90% of compile times both for C3 and Odin, it should be noted that both languages compile MUCH faster than Zig, achieving in general sub second compile times while using LLVM and without
77.
▲
C3 Language 0.7.6 adds generic inference and shebang compatibility
(c3-lang.org)
7 points
by
lerno
1y ago
|
1 comments
78.
▲
by
lerno
1y ago
This release adds shebang support, and simple generic parameter inference (which doesn't have that much use in C3 compared to languages that have per function/type generics, rather than generic modules). There are some convenience
79.
▲
by
lerno
1y ago
It is well known that Swift set out in design without any prior knowledge of the language it was replacing (Objective-C), with only the most junior in the team having used it to any greater extent. Instead Swift was designed around the use-
80.
▲
by
lerno
1y ago
I can't speak for Zig users, but an interesting alternative to just new/delete or malloc/free and various garbage collection strategies is pervasive use of temp allocation using arenas, such as Jai and Odin's temp alloca
81.
▲
by
lerno
1y ago
Unfortunately Swift is a mess of a language, trying to put as many language features in there as possible. While still not getting close to being a good replacement for Objective-C. AND it's the slowest language to compile among langua
82.
▲
by
lerno
1y ago
I find some of Rust dev reactions to this article pretty embarrassing. As if memory safety was some holy grail only provided by Rust. Here is a bunch of more memory safe languages that are more popular than Rust: Python, Java, JS ... should
83.
▲
by
lerno
1y ago
What is "incredibly dangerous"? Having contracts that can catch errors at compile time?
84.
▲
by
lerno
1y ago
"Incremental compilation is fast", is something people only talk about when normal compilation speeds are abysmal. Sadly, C++ set the expectations here, which made both Rust and Swift think that compilation times in the minutes is
85.
▲
by
lerno
1y ago
Ok then I understand what you mean (I couldn't respond directly to your answer, maybe there is a limit to nesting in HN?). Let me respond in some more detail then to at least answer why C3 doesn't have RAII: it tries to the follow
86.
▲
by
lerno
1y ago
Alloca would not allow you to pass data from the current scope up to a parent scope.
87.
▲
by
lerno
1y ago
All of that is out of scope for a C-like though. Once you set the constraints around C, there will be trade-offs. Rust is a high level language.
88.
▲
by
lerno
1y ago
Let me paste the introduction in the post, and let's see how much it claims that C3 has memory safety: Modern languages offer a variety of techniques to help with dynamic memory management, each one a different tradeoff in terms of per
89.
▲
by
lerno
1y ago
What destructor?
90.
▲
by
lerno
1y ago
*see
More ›