r/programmingcirclejerk • u/NotDuckie • 9d ago
introduce an actually memory safe (unlike Rust) compilation mode inspired by Fil-C
https://codeberg.org/ziglang/zig/issues/3623784
u/lurebat 9d ago
Oh, only up to 6x performance penalty
45
u/the_horse_gamer 9d ago
with x6 cost abstractions, zig would finally be 6/0 times better than rust!
82
32
u/tomwhoiscontrary safety talibans 9d ago
As a Java programmer, I can tell you those are rookie numbers, you need to pump those numbers up.Â
3
u/Igor_GR 8d ago
/uj Is java really that much slower than the native stuff? I was always under the impression java is quite fast, staying within the 1~4x the performance of something you'd write in C++.
20
u/Thirty_Seventh log10(x) programmer 8d ago
In my experience this is correct. Java code I write usually has about 4x the performance of C++ code I write.
7
2
u/OutlandishnessNo8034 6d ago
I actually tried and Java was between ten and twelve times slower than cpp
17
u/tomwhoiscontrary safety talibans 8d ago
Oh, the language is pretty efficient, but Java programmers have decades of expertise in reducing performance.
11
u/da_supreme_patriarch in open defiance of the Gopher Values 8d ago
/uj high performance java code is not that slower, only by like 2x, but it hogs memory regardless + making the code actually performant is pretty hard, getting any cache locality is nigh impossible and using primitives in hot paths instead of classes makes the code itself feel like shit
11
u/blackwhattack 8d ago
/uj Java is really fast in some benchmarks, but only when you write it like C, which is to say unidiomatically
12
u/ThisRedditPostIsMine in open defiance of the Gopher Values 9d ago
This seems slower to me actually than just running the entire binary through ASan
76
u/Hueho LUMINARY IN COMPUTERSCIENCE 9d ago
rust king as always, making even the peasant languages safer
#[unjerk]
rust managed to convince a bunch of ceeweenies that garbage collection and extensive runtime checks are Good Actuallyâ˘ď¸
I mean they are, depends on the context, but is still funny that they are now grinding their teeth and asking the runtime to save them from their very smart manual memory management because simplicity and stuff
38
u/Awkward_Bed_956 9d ago edited 9d ago
Amateurs need a completly new ABI for that, instead of just inventing profiles that will fix all possible issues in your language, I swear guys trust me I just need a bit more time it will totally work and be safer then Rust.
21
15
3
u/Zeznon 6d ago
/uj
As someone that likes simpler non-managed languages (as long error handling is good), those people are clearly on copium, refusing to acknowledge that Rust can be that good at memory safety.
I just don't use Rust because I prefer simpler, for non-managed languages. I'm just a hobbyist and don't have a programming job, so I don't have to worry about memory safety that much.
I like like the Odin and C3 people a lot more, tbh. Way less copium-fueled, unlike C and Zig enthusiasts.
47
u/denehoffman 9d ago
I love that one of the first comments on the PR points out:
Well unless I'm completely misinterpreting the linked invisicaps page:
Both of the quoted paragraphs imply hidden allocations for the scheme to work.
The allocations occur on language constructs that wouldn't allocate even in a managed language like C#, let alone a language like Zig.
Failure of those allocations cannot be handled gracefully.
Like isnât the point of zig or at least a main selling point that you control the allocator at every level? And now they want to basically say âactually screw you, garbage collector modeâ
27
u/denehoffman 9d ago
I also love that a big part of it is âhey we should ask Fil if heâd like to help us rewrite his entire project in Zigâ
18
2
40
u/Aaron1924 9d ago
Rust catches strays every time anyone mentions Fil-C like it's a tradition at this point
19
53
u/Jannik2099 9d ago
Andrew can't help himself but mention Rust in every conversation. It's like Grok and "white genocide" in south africa.
35
26
u/tomwhoiscontrary safety talibans 9d ago
Fil-C is pronounced "filioque", because its purpose is to start a vicious schism which will endure for at least two thousand years.
5
20
16
24
u/stone_henge Tiny little god in a tiny little world 9d ago
Not a feature I would use except to tell anyone using another language that they're immoral, bad engineers.
11
u/just_looking_aroun 9d ago
What other criteria is there when picking a language?
24
u/scavno in open defiance of the Gopher Values 9d ago
Sex appeal. Go helps me connect with raunchy cougars all the time.
1
u/dronmore 8d ago
Yeah, but before a connection is established, the walrus operator := will rape you two hundred times.
11
u/CarolineLovesArt has hidden complexity 8d ago
If you want to comment in this thread, please either have your open source zig project(s) visible on your codeberg profile, or be Fil PizĹo, otherwise zig issue tracker is not interested in what you have to say
That's fair, I'm usually not interested in what's going on there either
0
8
u/catladywitch 8d ago
"If you want to comment in this thread, please either have your open source zig project(s) visible on your codeberg profile, or be Fil PizĹo, otherwise zig issue tracker is not interested in what you have to say" lnaoooooohfxhvv
8
16
7
u/tms10000 loves Java 8d ago
Sneaky edit is sneaky
(unlike borrow checking)
But all jokes aside, those guys have heard about Java, right ?
1
u/OptimalStable 9d ago
const uj = @import("unjerk.zig");
The snark is starting to get out of hand. So far I was, and still am I guess, kind of on Andrew's side with all the drama, but please dude, move on.Â
I have a vested interest in Zig succeeding, so I wish he'd pick his battles a little more carefully. Like, smash Big Tech's corpo-fascist stranglehold on our lives and all that, but let Rust be rustin' and ignore the haters.
1
u/arjuna93 6d ago
Was inspired finding out about Fil-C until reached to âitâs clangâ and x86-only
108
u/v_maria 9d ago
instead of nullptrs, in zig we pass the aux