Hadn’t read this before, link for anyone else interested: https://georgerrmartin.com/notablog/2010/04/10/trial-of-seven/
Jaimie besting Rand doesn’t really make sense there tbh, even with the conceit of taking away Saidin
Hadn’t read this before, link for anyone else interested: https://georgerrmartin.com/notablog/2010/04/10/trial-of-seven/
Jaimie besting Rand doesn’t really make sense there tbh, even with the conceit of taking away Saidin
I just had a POS machine recommend 20%, 25%, or 30% for percentages. It seems like it’s increasing
There’s at least one example you can look at, the Jenkins CI project had code like that (if (name.startsWith("windows 9")) {
):
https://issues.jenkins.io/secure/attachment/18777/PlatformDetail
Microsoft, for all their faults, do (or at least did) take backwards compatibility very seriously, and the option of “just make devs fix it” would never fly. Here’s a story about how they added special code to Windows 95 to make SimCity’s broken code work on it:
Windows 95? No problem. Nice new 32 bit API, but it still ran old 16 bit software perfectly. Microsoft obsessed about this, spending a big chunk of change testing every old program they could find with Windows 95. Jon Ross, who wrote the original version of SimCity for Windows 3.x, told me that he accidentally left a bug in SimCity where he read memory that he had just freed. Yep. It worked fine on Windows 3.x, because the memory never went anywhere. Here’s the amazing part: On beta versions of Windows 95, SimCity wasn’t working in testing. Microsoft tracked down the bug and added specific code to Windows 95 that looks for SimCity. If it finds SimCity running, it runs the memory allocator in a special mode that doesn’t free memory right away. That’s the kind of obsession with backward compatibility that made people willing to upgrade to Windows 95.
In case anyone hasn’t seen it yet:
https://neal.fun/infinite-craft/
It’s pretty fun. Similar to OP, I was able to get all the way to crafting specific Mario Kart DS courses.
The collect
’s in the middle aren’t necessary, neither is splitting by ": "
. Here’s a simpler version
fn main() {
let text = "seeds: 79 14 55 13\nwhatever";
let seeds: Vec<_> = text
.lines()
.next()
.unwrap()
.split_whitespace()
.skip(1)
.map(|x| x.parse::<u32>().unwrap())
.collect();
println!("seeds: {:?}", seeds);
}
It is simpler to bang out a [int(num) for num in text.splitlines()[0].split(' ')[1:]]
in Python, but that just shows the happy path with no error handling, and does a bunch of allocations that the Rust version doesn’t. You can also get slightly fancier in the Rust version by collecting into a Result
for more succinct error handling if you’d like.
EDIT: Here’s also a version using anyhow
for error handling, and the aforementioned Result
collecting:
use anyhow::{anyhow, Result};
fn main() -> Result<()> {
let text = "seeds: 79 14 55 13\nwhatever";
let seeds: Vec<u32> = text
.lines()
.next()
.ok_or(anyhow!("No first line!"))?
.split_whitespace()
.skip(1)
.map(str::parse)
.collect::<Result<_, _>>()?;
println!("seeds: {:?}", seeds);
Ok(())
}
I find it pretty amazing how someone figured out how to make cassava edible. It’s got enough cyanide to kill you unless it goes through some complex process of mashing and boiling. Who thought to themselves “this killed Greg, but maybe it’ll be delicious if I boil it for a little longer”?
Undoubtedly. It’s getting harder to tell, though.
What was the prompt for this?
For anyone else wondering, this is a medal given to the Chernobyl liquidators
Get pissed at NVIDIA. They’re the problem.
Ignoring the downvotes, what do you mean? I can’t parse what you’re trying to say. Is it a joke of some sort?
To be pedantic, all of the parts were written to be unisex
The crew is unisex and all parts are interchangeable for men or women.
You probably wouldn’t be committing this, unless you’re backing up a heavily WIP branch. The issue is that if you’re developing locally and need to make a temporary change, you might comment something out, which then requires commenting another now-unused variable, which then requires commenting out yet another variable, and so on. Go isn’t helping you here, it’s wasting your time for no good reason. Just emit a warning and allow CI to be configured to reject warnings.
This is the best explanation I’ve ever seen of monads: https://www.adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html
For some reason, you’ll find a lot of really bad explanations of monads, like “programmable semi-colons”. Ignore those, and check out the link.
It’s not a half-arsed copy, it’s borrowing a limited subset of HKT for a language with very different goals. Haskell can afford a lot of luxuries that Rust can’t.
That’s 👏 what 👏 CI 👏 is 👏 for
Warn in dev, enforce stuff like this in CI and block PRs that don’t pass. Go is just being silly here, which is not surprising given that Rob Pike said
Syntax highlighting is juvenile. When I was a child, I was taught arithmetic using colored rods. I grew up and today I use monochromatic numerals.
The Go developers need to get over themselves.
It was actually Sonic
Russia can stop this at any time by just not invading them