Skip Navigation
Jump
How can we progress to Star Fleet and the Federation now?!?
  • With this event's non-occurence, the thread of prophecy is severed. Restore a saved game to restore the weave of fate, or persist in the doomed world you have created.

    51
  • Jump
    My new m.2 ssd
  • SATA= Slow (Max 6 Gbps) PCIe = Fast (Max > 100 Gbps in theory)

    This is the maximum rate from the drive to the motherboard. Many drives are fast enough that SATA works become the bottleneck. With PCIe, the drive can run at its full speed, whatever that may be.

    1
  • Jump
    Do you skip Star Trek intros when streaming?
  • Rarely. A good intro gives me a moment to set aside real-life worries and get into the right mindset to enjoy the show. TNG, DS9, VOY, and SNW are all bangers.

    12
  • Crossposted from https://lemmy.world/post/12012321

    12
    https:// github.com /ooterness/AdventOfCode/tree/main/aocfetch

    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.

    2

    Reddit users will prevail but also be injured so badly they need life support for 10,000 years. (It's a metaphor.)

    1