Wow, the #rust community really is amazing! I posted a fairly beginner question on r/rust just now, and within 10 minutes I got 8 comments—7 of them were attempted solutions, 6 of them were *correct* solutions, and 2 of them had full, running code samples/diffs.
And *none* of them called me dumb or implied I don't know how to program—even though I made a classic beginner mistake (solving ownership issues with excessive use of `clone()` instead of by understating my code better)
@codesections genuinely considering going rust just to be treated be like human when programming I'm happy for you!
@codesections It's a good thing that some programming communities are treating beginners with respect.
@codesections again, some improvements to your (new version of) code: https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=e4e9953cc7919d0d9a44e809ffa264e2 (notes inline)
On my machine it is about 10% faster than your version, must be because it doesn't do the conversions between usize/i32/Option<i32> everywhere.
And again the Rust and JS versions are doing a similar number of allocations, that is why the performance is similar.
Thanks! I took your changes and ran with them—new code here: https://gist.github.com/codesections/9959d4ddaf23be19078802754482874d.
@codesections What? Not even a "RTFMP"?
@codesections I love the community but can leave the language. Great role model for any other language or community.
@DistroJunkie just curious: what don't you like about the language?
@codesections I just don't. Don't like many of the new languages and have grown tired of them. Seems like we're constantly making new languages that supposedly do new and wonderful things but they really don't. Then my coworkers make the argument that if we used this new language, we'll be able to do wonderful things. We do, and then don't and then must fix new and horrible things. I contend that any one of many of our old languages will fit the bill. I vote for C. Old Graybeard.😃
@codesections Also, I hate garbage collection. It's garbage. It's a crutch. I can use a language that has or had a garbage collector but I find the fact that it has one repulsive.
@codesections Just look at all of the trendy languages that have come and gone over the years. Seems like they come and go faster and faster as the years go by. I wish we'd pick one mature universal language and run with it. And stop it with the new versions of languages. If we have to update it (read fix it), it probably wasn't all that good to begin with. Sorry, I've turned this into a rant. I'll stop now.😃
Those are all opinions I can respect, even if I don't entirely agree.
And if your objection is based on change, I can certainly understand not liking a language that's committed to a new release every six weeks!
Of course, I'm coming from the web dev world, and from that perspective, rust seems positively traditional—at least the ecosystem doesn't turn over every ~18 months!
@codesections I'm not opposed to change with a definite purpose and reason. Change for change's sake, not so much a fan.
To me, the real power of Rust is crates. Fortunately, they have many converts to give them staying power.
Much like buying new trendy golf clubs is not going to improve a bad golfer's game, using the newest trendy programming language is not going to improve a bad programmer's code. Unless they are reusing good code from other programmers.😃
Fosstodon is a Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.