I love Rosetta Code, partly because I love Ye Original Wiki idea in which being “half-done” is a compliment, and partly because I’m really interested in programming language syntax (so sue me).
I clicked “random page” and the very first example looked AI generated. Would a human add a dependency to find out what zero is for an i32? Maybe I’m being too harsh.
extern crate num;
use num::traits::Zero;
fn equilibrium_indices(v: &[i32]) -> Vec<usize> {
// [...]
let mut left = i32::zero();
// [...]
}
I know it’s a wiki and can be vetted by humans, but fixing AI code doesn’t seem fun. Neither does cheating these challenges with AI.
Yes, maybe I was too presumptive. Perhaps the author started with a generic impl Zero function and decided later to just use i32, forgetting to remove the dependency.
Not sure why this was submitted without any comment. I’ve always thought of it as a sort of half-done Wikipedia/Learn-X-in-Y-minutes of programming language examples, with a chaotic mix of “show an example that prints hello world to the console” and “show an example that is a 3d first person shooter game with support for modern GPU shaders and Vulcan, DirectX, and OpenGL.” (Which is to say that some of the problems are beyond simple, and some are fairly complex.)
I love Rosetta Code, partly because I love Ye Original Wiki idea in which being “half-done” is a compliment, and partly because I’m really interested in programming language syntax (so sue me).
I think you win on both counts :)
I like the Rosetta Code Data project, where you have all the programs in a single repo. Wiki interface is far from convinent.
I clicked “random page” and the very first example looked AI generated. Would a human add a dependency to find out what zero is for an
i32? Maybe I’m being too harsh.I know it’s a wiki and can be vetted by humans, but fixing AI code doesn’t seem fun. Neither does cheating these challenges with AI.
Would an AI add such a dependency? Remember that LLMs don’t know anything, they just follow whatever patterns were in their training data.
Yes, maybe I was too presumptive. Perhaps the author started with a generic
impl Zerofunction and decided later to just usei32, forgetting to remove the dependency.That’s from 2021, so definitely a human (if not an expert human).
Not sure why this was submitted without any comment. I’ve always thought of it as a sort of half-done Wikipedia/Learn-X-in-Y-minutes of programming language examples, with a chaotic mix of “show an example that prints hello world to the console” and “show an example that is a 3d first person shooter game with support for modern GPU shaders and Vulcan, DirectX, and OpenGL.” (Which is to say that some of the problems are beyond simple, and some are fairly complex.)
I find it quite funny that apparently nobody has ever thought to submit Rosetta code before