News for hackers. Stuff that matters.
Re:Static search trees: 40x faster than binary search by kubb on Tuesday December 31, 2024 @08:12PM (#42563158)
Maybe, but should the author really cater to people who can’t overcome a language barrier? They probably won’t understand the concept anyway.
Re:Static search trees: 40x faster than binary search by ryao on Tuesday December 31, 2024 @09:02PM (#42563405)
The ACM for a time only accepted code examples in ALGOL because it was felt that there should be a standard language that everyone understood. ALGOL eventually gave way to C and others, but there is definite value in ensuring things are accessible to the largest possible audience.
Re:Static search trees: 40x faster than binary search by kubb on Tuesday December 31, 2024 @09:25PM (#42563498)
You're free to use ALGOL in your posts if you want. It reads like pseudocode used in algorithmic books, and should be familiar to anyone who used the Pascal family.

ALGOL gave way to C, and C is now giving way to Rust, Zig and others. You're playing the role of the people who wanted to keep the example snippets in ALGOL.

Re:Static search trees: 40x faster than binary search by ryao on Tuesday December 31, 2024 @09:33PM (#42563515)
The point was that examples should be in widely understood languages. The niche languages you list do not qualify as widely understood.

Estne melius scribere exempla latine?

Re:Static search trees: 40x faster than binary search by dxbydt on Tuesday December 31, 2024 @09:10PM (#42563438)
usaco explicitly nudges you towards C++ on the first page itself. problems are graded on running time, even with moderately large datasets, Python simply doesn’t make the cut. So most high schoolers end up using C++ for usaco, and Java for AP Comp Science.
Re:Static search trees: 40x faster than binary search by mplanchard on Wednesday January 01, 2025 @09:43AM (#42566268)
This is someone’s blog, not an ACM publication. Why hold it to the same standard? They can write in whatever they like. I have a hard time reading Haskell, but I don’t sit and kvetch about it anytime someone wants to use it in a blog post.
Re:Static search trees: 40x faster than binary search by mangamadaiyan on Tuesday December 31, 2024 @09:05PM (#42563421)
Erm, the concepts that you're referring to are independent of the language being used. The author is free to use whatever language they want. The GP (I think) was merely trying to make a point about making the article accessible to a wider audience that is capable of appreciating the concepts involved.
Re:Static search trees: 40x faster than binary search by kubb on Tuesday December 31, 2024 @09:21PM (#42563482)
If you can't understand the code snippets in this post, the concepts will most likely be lost on you, no matter what other language would be used for the code.
Re:Static search trees: 40x faster than binary search by mangamadaiyan on Wednesday January 01, 2025 @03:14AM (#42564682)
Isn't that precisely the point that the GP was trying to make, about the accessibility of the article?

Edit: Eytzinger layout, Cache lines, SIMD, et cetera are independent of the particular language used in the article. They're just as valid in C, for example. I don't understand your point about them being tied to Rust.

Re:Static search trees: 40x faster than binary search by ryao on Tuesday December 31, 2024 @09:42PM (#42563552)
You are correct.