Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cyber1
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
cyber1
2mo ago
Valid point, but unsafe in Rust is more dangerous than unsafe in C, bcs of aliasing. For example PG is compiled with -fno-strict-aliasing.
2.
▲
by
cyber1
2mo ago
The concept of lifetimes was invented long before Rust borrow checker was even "scratched on paper." Of course, people who understand what they are they doing have known about these concepts for decades and have built their archit
3.
▲
by
cyber1
2mo ago
What I mentioned is only a tiny part of the entire software, which has been successfully written in C, C++, and now in Zig as well, and is used daily by people around the world.
4.
▲
by
cyber1
2mo ago
For 99.99% of cases, you're reading and writing this under an operating system whose kernel is written in a language without send/sync, and inside a browser that also largely written in languages without send/sync, because th
5.
▲
by
cyber1
2mo ago
Why?
6.
▲
by
cyber1
2mo ago
If you use Rust the way it was designed to be used, rather than relying on countless "unsafe" blocks, you need to redesign the entire codebase architecture to make it compatible with the borrow checker rules.
7.
▲
by
cyber1
2mo ago
How is Bun codebase connected to Zig codebase?
8.
▲
by
cyber1
2mo ago
To me, this whole effort of rewriting Bun from Zig to Rust looks like a big marketing move. The question is: if Anthropic AI is really that powerful, why not just fix the bugs and give it the more ambitious task of redesigning the existing
9.
▲
by
cyber1
2mo ago
2664 "unsafe {", 1835 "unsafe fn". This is completely unsafe. It doesn't look like a rewrite that understands what's actually going on or how the architecture should be redesigned to take advantage of Rust stre
10.
▲
by
cyber1
10mo ago
I also hope that WG14 eventually adopts successful features from Zig, such as comptime, and reduces the use of ugly macros and _Generic.
11.
▲
by
cyber1
10mo ago
The biggest advantages of Zig for me are that everything is explicit (no hidden features like overloads or implicit conversions) and that its metaprogramming is powerful, easy to use, and easy to understand.
12.
▲
Implementing OpenMP for Zig to enable its use in HPC context
(arxiv.org)
7 points
by
cyber1
1y ago
|
0 comments
13.
▲
by
cyber1
1y ago
Just look at this: https://pvs-studio.com/en/blog/posts/cpp/1129/ - 11 parts about C++ undefined behavior from people who specialize in finding this stuff. And that’s only the tip of the iceberg. I
14.
▲
by
cyber1
1y ago
No, it does. "The only two features in the language that do not follow the zero-overhead principle are runtime type identification and exceptions, and are why most compilers include a switch to turn them off." - https://
15.
▲
Go SIMD dev branch
(github.com)
2 points
by
cyber1
1y ago
|
0 comments
16.
▲
by
cyber1
1y ago
At first glance, when I looked through the Zig reference, I didn’t like a lot about its syntax (though syntax isn’t the most important thing for me). But when I tried writing in it, I changed my mind - it’s a concise and convenient language
17.
▲
by
cyber1
1y ago
"func" is fine; "function" is too long. "fn" is also good, but for example, Go was designed with "func," and it's one of the most successful, readable languages in the world, so why not?
18.
▲
by
cyber1
1y ago
This is true. I agree with this statement. It's the holy cow of C. However, the problem with generic programming and metaprogramming isn't going away, and many people continue to struggle with it. Introducing something like compil
19.
▲
by
cyber1
1y ago
I'm currently at a crossroads: C++ or Zig. One is very popular with a large community, amazing projects, but has lots of ugly design decisions and myriad rules you must know (this is a big pain, it seems like even Stroustrup can't
20.
▲
by
cyber1
1y ago
Hey, I understand you and know this stuff well, having worked with it for many years as a C dev. To be honest, this isn't how things should generally be done. Macros were invented for very simple problems. Yes, we can abuse them as muc
21.
▲
by
cyber1
1y ago
Many C programmers need proper generic programming mechanisms (perhaps something like Zig's comptime) in C, but macros are the worst possible approach, and they don't want to switch to a different language like C++. As a result, t
22.
▲
by
cyber1
1y ago
Glory to Ukraine! Slava Ukraini!
23.
▲
by
cyber1
1y ago
"Safe" Rust is generally a simple language compared to C++. The borrow checker rules are clean and consistent. However, writing in it isn't as simple or intuitive as what we've seen in decades of popular systems language
24.
▲
by
cyber1
1y ago
No, this is not Zig comptime at all. Zig's comptime work is on another level, and it's amazing.
25.
▲
by
cyber1
1y ago
Unfortunately, the standardization committee plays around with macros and _Generic instead of investing their time in modern metaprogramming ideas
26.
▲
C-Language.org
(c-language.org)
6 points
by
cyber1
2y ago
|
0 comments
27.
▲
C++, Complexity, and Compiler Bugs
(azeemba.com)
3 points
by
cyber1
2y ago
|
0 comments
28.
▲
Safer C++
(alexgaynor.net)
7 points
by
cyber1
2y ago
|
0 comments
29.
▲
Performance Evaluation of C/C++, MicroPython, Rust and TinyGo on ESP32
(mdpi.com)
3 points
by
cyber1
2y ago
|
2 comments
30.
▲
C versus C++: Fight
(starfighter.acornarcade.com)
3 points
by
cyber1
2y ago
|
1 comments
More ›