Advertisement · 728 × 90

Posts by Samiyel F

Yall fw cyberpunk i love cyberpunk

10 months ago 0 0 0 0

Ah cool, that makes sense. Very unfortunate timing tho lol

1 year ago 0 0 0 0

One bad apple spoils the barrel, changing the barrel into a box and leaving the bad apple changes nothing. You need to get rid of the apple.

1 year ago 2 0 0 0

This is like when a guy joins the police thinking hes gonna end racism in the police force. You cant repair it, once the bourgeois sinks their teeth in something, they wont "let go"

1 year ago 3 0 1 0

Mug check

1 year ago 2 0 0 0

Ngl, im one of those people. How does it actually work? Ive never been a youtuber lol

1 year ago 5 0 1 1

Haskell is such a cool language and then it looks like that and its like... Come on man ...

1 year ago 0 0 0 0

I love my echo chamber

1 year ago 0 0 0 0
Advertisement

Oh yeah definitely, people blow everything out of proportion lol. imo the *bad* thing here is apple itself; i wouldnt trust them with anything. And after the windows recall BS you cant be surprised that people would (over)react over AI, pictures, and server in the same sentence

1 year ago 0 0 0 0

I mean this ones kinda valid cus they send the photo to an apple server, its not locally processed

1 year ago 2 0 1 0
Video

The Knack™ strikes again

1 year ago 1 0 0 0

Harass people online for using closed source software

1 year ago 354 63 11 1

The only thing keeping me from staying here full time is i miss my friends

1 year ago 0 0 0 0

bluesky add fleets

1 year ago 10 1 0 1

My bad

1 year ago 1 0 0 0

I am constantly plagued by cheap sensors why is 50% of my time programming spent compensating for bad readings

1 year ago 0 0 0 0

The stupid robot is doing its job yippie

1 year ago 0 0 0 0
Advertisement

Encapsulation would be nice but not having inheritance is great

1 year ago 0 0 0 0

oop is so good when its rust oop.. a group of data with functions, some of which might be commonly found in other data groups

1 year ago 0 0 1 0

all of physics is functions and equations, but none of that matters if objects dont use those functions.

1 year ago 0 0 0 0

fp or oop is stupid. the universe runs on fp and is made of oop. your code should too.

1 year ago 0 0 1 0

Update: The stupid robot still will not do its job

1 year ago 0 0 0 1

Its always the guys that leave circles they dont like that shout "echo chamber". Its like the inverse of the "you are not welcome here" comic

1 year ago 8 0 0 0

in 2025 I will probably go on the computer

1 year ago 347 76 12 3

STUPID ROBOT WON'T DO ITS JOB

1 year ago 0 0 0 1
Post image
1 year ago 215 24 5 3
Advertisement

Sucks that they called it lazygit and not gitlazy

1 year ago 0 0 0 0
use reqwest;
fn get_input(url: &str, session: &str) -> Result<String, Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let response = client
        .get(url)
        .header("Cookie", format!("session={}", session))
        .send()?.text()?;
    Ok(response)
}

fn main() {
    let url = "https://adventofcode.com/2024/day/1/input";
    let session = "";

    let (mut l, mut r): (Vec<i32>, Vec<i32>) = get_input(url,session).expect("No data found").lines().filter_map(|line| {
        let mut parts = line.split_whitespace();
        let left = parts.next()?.parse::<i32>().ok()?;
        let right = parts.next()?.parse::<i32>().ok()?;
        Some((left, right))
    }).unzip();
    l.sort();
    r.sort();

    let distances: i32 = l.iter().zip(r.iter()).map(|(a,b)| (a-b).abs()).sum();
    let similarity: i32 = l.iter().map(|&x| x*r.iter().filter(|&&n| n == x).count() as i32).sum();
    println!("Distance: {}",distances);
    println!("Similarity: {}", similarity);
}

use reqwest; fn get_input(url: &str, session: &str) -> Result<String, Box<dyn std::error::Error>> { let client = reqwest::blocking::Client::new(); let response = client .get(url) .header("Cookie", format!("session={}", session)) .send()?.text()?; Ok(response) } fn main() { let url = "https://adventofcode.com/2024/day/1/input"; let session = ""; let (mut l, mut r): (Vec<i32>, Vec<i32>) = get_input(url,session).expect("No data found").lines().filter_map(|line| { let mut parts = line.split_whitespace(); let left = parts.next()?.parse::<i32>().ok()?; let right = parts.next()?.parse::<i32>().ok()?; Some((left, right)) }).unzip(); l.sort(); r.sort(); let distances: i32 = l.iter().zip(r.iter()).map(|(a,b)| (a-b).abs()).sum(); let similarity: i32 = l.iter().map(|&x| x*r.iter().filter(|&&n| n == x).count() as i32).sum(); println!("Distance: {}",distances); println!("Similarity: {}", similarity); }

how we feeling abt this

1 year ago 1 0 0 0

my first time taking data from a website, not as hard as i thought it'd be

1 year ago 0 0 0 0

I just completed "Historian Hysteria" - Day 1 - Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/1

1 year ago 1 0 1 0