ooterness

joined 1 year ago
[–] [email protected] 15 points 1 day ago (1 children)

Now explain PartialEq, and why it's mandatory.

[–] [email protected] 5 points 1 week ago

Lead-based solder is preferred for high-reliability electronics (space, nuclear, military, etc.) because it's easier to rework, easier to verify by visual inspection, and it's not vulnerable to tin whiskers.

[–] [email protected] 23 points 1 week ago (4 children)

Here's the relevant safety guides from Stanford and MIT.

In short, if you do a lot of soldering, there are long-term occupational hazards from both lead oxides and rosin. Both guides agree that the main hazards are the fumes (workstation should have a fume extractor or suitable filter) and residue on your hands (wash hands with soap and water before eating).

I couldn't find any numbers on how much material is removed by washing, but every reference emphasized that soap and water are vitally important.

[–] [email protected] 17 points 2 weeks ago

IF YOU DON'T RULE AND STONE, YOU AIN'T COMING HOME!

[–] [email protected] 10 points 2 weeks ago

"WAAAAAAAAAGGH!" is what the 10-foot monster yells while charging at you.

[–] [email protected] 5 points 2 weeks ago (1 children)

Does that require admin access? It wasn't their machine, it was one the school provided for the auditorium.

[–] [email protected] 7 points 2 weeks ago (1 children)

This wasn't their machine, it was one the school provided for the auditorium.

[–] [email protected] 26 points 2 weeks ago (8 children)

I saw that happen once in a big presentation.

There was a team of students presenting their work to ~200 people. Right in the middle, a pop-up says updates are finished and the computer needs to restart. It has a helpful 60-second countdown, but “cancel” is grayed out, so all they can do is watch.

I was only in the audience and I still have nightmares.

[–] [email protected] 3 points 3 weeks ago (2 children)
  1. Do you know anybody from "Ohio"?
  2. Have you ever been to "Ohio"?
  3. Do you know anybody who has ever been to "Ohio"?
[–] [email protected] 9 points 1 month ago

Not the hero we need, but the hero we deserve.

[–] [email protected] 24 points 1 month ago* (last edited 1 month ago)

We are the Cube Rule. Lower your shields and surrender your ships. We will add your food's biological and technological distinctiveness to our own. Your food categories will adapt to service us. Resistance is futile.

1
submitted 11 months ago* (last edited 11 months ago) by [email protected] to c/[email protected]
 

If you're writing Advent of Code solutions in Rust, then I've written a crate that can fetch the user input data directly from the main website.

Long story short, you provide it a login token copied from your browser cookies, and it can fetch the input data by year and day. Inputs are cached locally, so it'll only download it once for a given problem. This was heavily inspired by the PyPi advent-of-code-data package.

Unlike other AoC-centric Rust crates, that's all it does. The other crates I've seen all want the code structured in a specific way to add timing benchmarks, unit testing, and other features. I wanted something lightweight where you just call a function to get the input; no more and no less.

To use the crate:

  • Follow the AoCD instructions to set the AOC_SESSION environment variable.
    This key is used for authentication and should not be shared with anyone.
  • Add the aocfetch crate to your Cargo.toml [dependencies] section:
    aocfetch = { git = "https://github.com/ooterness/AdventOfCode.git" }
  • Import the crate and call aocfetch::get_data(year, day) to fetch your input data.

An example:

use aocfetch;

fn main() {
    let input = aocfetch::get_data(2023, 1).unwrap();
    println!("My input data: {}", input);
    println!("Part 1 solution: 42");    // TODO
    println!("Part 2 solution: 42");    // TODO
}

If this goes well I will submit it to crates.io, but I wanted to open this up for beta-testing first.

view more: next ›