CameronDev

joined 2 years ago
MODERATOR OF

Its not a race, its a journey! Keep it up!

[โ€“] CameronDev@programming.dev 7 points 1 week ago (1 children)

Interesting, thanks! Is drinking a film of it okay? I assumed not, but I am immunocompromised, so I'm happy to play it safe.

[โ€“] CameronDev@programming.dev 21 points 1 week ago* (last edited 1 week ago) (4 children)

Don't drink it though, the our drier tub likes to grow pink ~~mold~~ bacteria.

Edit: fixed inaccuracies.

Thats true of all datacenters though, not just AI. 1RU fans are just crazy noisy.

Rust

Its not Christmas, but this one was a gift :D. Merry Christmas all, thanks for everyone who has contributed solutions!

Rest easy little advent bot, your work is done now.

spoiler

    struct Tree {
        w: u32,
        h: u32,
        presents: Vec<u32>,
    }

    fn is_solveable(tree: &Tree) -> bool {
        if tree.h * tree.w < tree.presents.iter().sum::<u32>() * 9 {
            return false;
        }
        true
    }

    #[test]
    fn test_y2025_day12_part1() {
        let input = include_str!("../../input/2025/day_12.txt");
        let parts = input.split("\n\n").collect::<Vec<_>>();

        let trees: Vec<Tree> = parts
            .last()
            .unwrap()
            .lines()
            .map(|line| {
                let parts: (&str, &str) = line.split_once(": ").unwrap();
                let [w, h] = parts
                    .0
                    .split("x")
                    .map(u32::from_str)
                    .map(Result::unwrap)
                    .collect::<Vec<_>>()[..]
                else {
                    unreachable!()
                };
                let num_presents = parts
                    .1
                    .split(" ")
                    .map(u32::from_str)
                    .map(Result::unwrap)
                    .collect::<Vec<_>>();
                Tree {
                    w,
                    h,
                    presents: num_presents,
                }
            })
            .collect();

        let mut solvable = 0;
        for tree in trees {
            if is_solveable(&tree) {
                solvable += 1;
            }
        }
        println!("solvable: {}", solvable);
    }

[โ€“] CameronDev@programming.dev 2 points 1 week ago (1 children)

spoilerI had an feeling it would be trivial, but didnt think it would be that trivial. I got the answer without even parsing the shapes, just called them all 9.

I bet heated seats cost more in terms of power usage. Pointless worrying about the computer...

WSL (at least WSL2) is Linux in a VM, so it is real Linux.

[โ€“] CameronDev@programming.dev 8 points 1 week ago (3 children)

There are no ads, no corporate content

I wish that were true, but if you haven't seen any, thank your moderators.

Well, this feels dirty, but good work reddit.

[โ€“] CameronDev@programming.dev 2 points 1 week ago (1 children)

I was leaning on chatgpt for z3 rust code, and it was terrible. It kept generating code for an old version of the library, but I had no idea which one. Tried to correct it and it starts hallucinating library "features".

Really need better docs for z3 rust.

I find it helpful to use a library to get the solution, and then work backwards to replace the library. I got rid of geo and got mine down to milliseconds.

1
Cutting Garolite (G10) (programming.dev)
submitted 2 years ago* (last edited 2 years ago) by CameronDev@programming.dev to c/3dprinting@lemmy.ml
 

I posted here a while back when my glass bed failed. One of the suggestions was to replace with Garolite or G10. My sheet finally arrived and i set about cutting it down to size.

...

Within 4cm, my basically unused jigsaw blade was worn flat, and by the end of the first cut (20cm), there is basically no more teeth.

For the second side, I tried using a multitool cutter, and within a few millimeters it was visibly blunt (plastic and metal tools). Finished it off with a standard wood hand saw, which seemed to go better.

So warning to anyone considering garolite, dont use power tools, it will fuck them up.

 

Day 25: Snowverload

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

 

Day 24: Odds

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

 

Day 22: A Long Walk

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

 

Day 22: Sand

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

 

Day 21: Step

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

 

Day 20: Pulse

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

 

Day 19: Aplenty

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

 

Day 18: Lavaduct Lagoon

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

 

Day 17: Clumsy Crucible

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

 

I have been printing with PETG on glass for a little while now, and have gone through almost an entire roll. Yesterday I had my first print stick so hard that it delaminated the glass :(. I stopped using hairspray as it made the prints not stick at all, and printing bare glass was just fine. But something about yesterdays print made the glass give up. Is this how PETG + Glass normally fails? Works perfectly for years, and then suddenly fails?

view more: โ€น prev next โ€บ