My fizzbuzz:
https://bitbucket.org/iopq/fizzbuzz-in-rust/src/master/src/l...
there's just no more refactors I can do because of the limitations of Rust
3,183 karma · joined September 30, 2012
My fizzbuzz:
https://bitbucket.org/iopq/fizzbuzz-in-rust/src/master/src/l...
there's just no more refactors I can do because of the limitations of Rust
If you write some code and you don't know how it works, it's most likely not correct in some edge cases.
Code that is written to be so simple it's obviously doing the right thing is better than battle tested mess of if statements.
I've given interviews of fizzbuzz and even though developers usually recognize they need a separate case for 15, they don't always do the else ifs right (maybe test for the 15 case last when you've already hit the divisible by 3 case first, or similar silly mistakes). In that case, doing the string accumulation refactor makes it clear that the code has no mistakes because it for sure adds a Fizz first and a Buzz second in the 15 case. It's also a good refactor for extending to Bazz (divisible by 7) as well, so it's something you will want to do when you want to add that feature
The most popular book in the world is the Bible and I never found it very interesting
When there was a real insatiable demand for GPUs AMD actually did make money hand over fist
The problem with that definition is it allows commercial distribution of said software, which futo's license prohibits on purpose since you could bundle the futo software with ads and call it your own software. The futo license prohibits commercial distribution of its software by others
just ALL videos on my system are broken, I can't play back video past like half speed so the sound gets really choppy
Thanks, Nvidia
https://www.fool.com/earnings/call-transcripts/2023/08/01/ad...
it's literally ALL AI, server, enterprise talk - AI is mentioned 64 times
AMD literally doesn't care about gaming anymore, server is their primary focus
Which is literally only 1% of users anyway
Even my 4GB RX 570 from years ago gives a better experience doing this. You just install OBS from flathub, Wayland works, everything works without any setup or tinkering. You click record and you can record your gameplay footage.
On Desktop you have to worry about things like... UIs, sound, Wine, etc.
Or rather, I install no versions of libraries because NixOS will put them all in the store in different folders, and will compile the executable to use the correct path (or patch the elf when needed)
it has an issue with pip because it's allergic to just randomly executing things as part of package management, but pip in general is wtf
Rust has a more powerful type system that actually fixes MOST of the memory bugs in production
if you get the static type system wrong once, there's no going back
Take for example, Rust: mut, Send, Copy, Drop, Debug, dyn have all their warts because they are special and you can't fix them because you'll break previous code.
In a gradual typing language you could potentially bolt-on your own type system as a package where it just runs the type checker if you want one. It just so happens people who favor these gradual typing systems don't do a good job of creating those typing systems because they are not that into types in the first place.
But in theory, this kind of a system would let you not worry about types when prototyping the system, then put some bounds later based on your requirements.
https://arstechnica.com/gadgets/2023/08/fairphone-5-sets-a-n...