News for hackers. Stuff that matters.
Re:Static search trees: 40x faster than binary search by ryao on Tuesday December 31, 2024 @08:56PM (#42563369)
I have not studied Rust and find its syntax alien. It looks like a cross between a functional language and C++. Trying to read it is like forcing myself to read Italian. I don’t know Italian, but have studied Spanish and Latin. I can sort of figure things out if I put in effort, but there is always uncertainty when I do. That is the problem with reading Rust.

This could be addressed if I just learned Rust (much like my difficulty with Italian could be addressed by studying Italian). However, I already know at least 10 programming languages. I am unwilling to learn the latest fashionable language unless it can promise me that the language will not change and there will never be another fashionable language for me to learn. Given that Rust rejected the standardization process that C and C++ embraced, and Zig is expected to replace Rust one day, I doubt Rust can make such assurances.

As for Python, it is often used for teaching CS and everything except the assembly code is doable in it. Using low level assembly from Python would require using the FFI. Also, Python has nothing to do with LLVM.

Re:Static search trees: 40x faster than binary search by unrealhoang on Tuesday December 31, 2024 @09:08PM (#42563435)
Suck to be you, I guess? If you don’t care enough then you don’t care. You wouldn’t bitch when there’s an article written in Italian with good knowledge inside: “but Italian”. You either trying to read using translation tool or ignore it entirely.

I didn’t say python has anything to do with LLVM, it’s just a technique, read about it, or not.

Re:Static search trees: 40x faster than binary search by quotemstr on Tuesday December 31, 2024 @08:59PM (#42563383)
> Zig is expected to replace Rust one day

That's a bold prediction considering that Zig is unsafe and Rust is safe.

If Zig's idioms make it safe, then modern C++ is safe too.

Re:Static search trees: 40x faster than binary search by ryao on Tuesday December 31, 2024 @09:10PM (#42563439)
Zig replacing Rust is not my prediction. It is what I am hearing from the Zig enthusiast I know. I have also seen others express the sentiment that the next fashionable language after Rust will be Zig. Regardless of whether it is Zig, there will be another. Rust is just one part of a never ending cycle of people trying to reinvent programming.
Re:Static search trees: 40x faster than binary search by nicoburns on Tuesday December 31, 2024 @10:04PM (#42563632)
> Rust is just one part of a never ending cycle of people trying to reinvent programming.

This is true of every single programming language.

Re:Static search trees: 40x faster than binary search by ryao on Tuesday December 31, 2024 @10:28PM (#42563736)
That is my complaint against the next fashionable language. Once you have some level of proficiency in around 10 languages, adding more to the list is a chore. It lacks the enjoyment that came from the first few. At least, that is my experience. That is why I am resistant to learning new languages unless software I want to modify is already written in it. Then, I am forced to learn and time spent on it is time that actually needed to be spent, unlike my brief time spent teaching myself FORTRAN in college, which was largely a waste of time.
Re:Static search trees: 40x faster than binary search by Sharlin on Wednesday January 01, 2025 @04:22AM (#42564944)
> Zig enthusiasts

Yeah, don’t you think they might be perhaps just slightly biased? I have some news for you about your average technology enthusiast…

Anyone who claims Zig is going to replace Rust knows nothing about either Zig, Rust, or both. Zig is designed to solve none of the problems that Rust solves. Trillion-dollar corporations are rewriting things in Rust because it solves problems that really matter to them.

The US government strongly recommends writing all new mission-critical code in memory-safe languages. Guess which one of Rust and Zig is memory-safe?

I have nothing against Zig, it looks like a very nice better C, and the comptime stuff is both cool and useful. But its priorities are not Rust’s priorities.

Re:Static search trees: 40x faster than binary search by nottorp on Wednesday January 01, 2025 @09:56AM (#42566342)
Of course, Rust evangelists are also more than slightly biased.
Re:Static search trees: 40x faster than binary search by Sharlin on Thursday January 02, 2025 @03:49AM (#42572811)
Of course.
Re:Static search trees: 40x faster than binary search by kllrnohj on Wednesday January 01, 2025 @10:00AM (#42566371)
There's approximately a 0% chance of Zig seeing non-trivial adoption anywhere other than maybe the embedded world.

It otherwise solves basically nobodies problems in the real world and is just a love letter to C. It's cute, kinda, but that's about it.

Re:Static search trees: 40x faster than binary search by quotemstr on Wednesday January 01, 2025 @12:08PM (#42567349)
Zig is like the Vulcan Centaur next to Starship.
Re:Static search trees: 40x faster than binary search by nipah on Monday January 06, 2025 @10:52AM (#42611574)
> Rust is just one part of a never ending cycle of people trying to reinvent programming.

Which is good. Programming is an open field, ideas are constantly popping in and out and you sometimes need to reinvent things to prove that they are worth it. More languages is a good thing, the bizarre tribalism around them is dangerous, but it is not possible to prevent it, people gotta be people.

Re:Static search trees: 40x faster than binary search by rurban on Wednesday January 01, 2025 @03:03AM (#42564649)
Both are unsafe, just zig is usually safer than rust.

And also so more readable, ie. maintainable

Re:Static search trees: 40x faster than binary search by Sharlin on Wednesday January 01, 2025 @04:18AM (#42564928)
That’s one crazy claim to make.