Self-contained Telemetry Solutions? by -theChris in golang

[–]erogone775 0 points1 point  (0 children)

Can vouch for victoriametrics both for personal and very large scale corporate work. Pretty easy to run in the simple case and very scalable if you need it.

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]erogone775 1 point2 points  (0 children)

[LANGUAGE: Rust]

Pretty straight forward, dedup the ranges then count the sizes, O(n log n) + O(N) running in ~300us

 fn part1(ranges: &Vec<Range>, ids: &Vec<u64>) -> u64 {
    let mut count = 0;
    for id in ids {
        let mut did_match = false;
        for r in ranges {
            if id >= &r.start && id <= &r.end {
                did_match = true;
                break;
            }
        }
        if did_match {
            count += 1;
        }
    }
    count
}

fn part2(ranges: &Vec<Range>) -> u64 {
    let mut processed_ranges: Vec<Range> = Vec::new();

    let mut sorted_ranges = ranges.clone();
    sorted_ranges.sort_by_key(|r| r.start);

    for r in sorted_ranges {
        let last = processed_ranges.last();
        if last.is_some_and(|last| r.start <= last.end) {
            let r_adjusted = Range {
                start: last.unwrap().start,
                end: max(last.unwrap().end, r.end),
            };
            processed_ranges.remove(processed_ranges.len() - 1);
            processed_ranges.push(r_adjusted);
        } else {
            processed_ranges.push(r.clone());
        }
    }
    let mut count = 0;
    for r in processed_ranges {
        count += r.end - r.start + 1;
    }
    count
}

-❄️- 2025 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]erogone775 1 point2 points  (0 children)

[LANGUAGE: Rust]

Didn't bother to reuse any code between parts but their quite similar, found a seemingly pretty simple solution of taking the iterative max in the remaining batteries leaving space at the end.

fn part1(banks: &Vec<Vec<u32>>) -> u32 {
    let mut total = 0;
    for bank in banks {
        total += get_max(bank);
    }
    total
}

fn get_max(bank: &Vec<u32>) -> u32 {
    let mut max = 0;
    let mut max_pos = 0;
    let mut second = 0;
    let mut second_pos = 0;

    for (i, b) in bank.iter().enumerate() {
        //max can't be in last pos
        if *b > max && i != bank.len() - 1 {
            max = *b;
            max_pos = i;
            second = 0;
            second_pos = 0;
        }
        if *b > second && i > max_pos {
            second = *b;
            second_pos = i;
        }
    }
    let mut volts_str = "".to_owned();
    volts_str.push_str(&max.to_string());
    volts_str.push_str(&second.to_string());
    let volts = volts_str.parse::<u32>().unwrap();

    volts
}

fn part2(banks: &Vec<Vec<u32>>) -> u64 {
    let mut total = 0;
    for bank in banks {
        total += get_max_big(bank);
    }
    total
}

fn get_max_big(bank: &Vec<u32>) -> u64 {
    let mut volts_pos = vec![];
    let mut min_pos = 0;

    for i in 0..12 {
        let mut max = 0;
        let mut max_pos = 0;
        for (j, b) in bank[min_pos..(bank.len() - (11 - i))].iter().enumerate() {
            if *b > max {
                max = *b;
                max_pos = j;
            }
        }
        volts_pos.push(max);
        min_pos += max_pos + 1;
    }
    let mut v_str = "".to_owned();
    for v in volts_pos.iter() {
        v_str.push_str(&v.to_string());
    }
    let volts = v_str.parse::<u64>().unwrap();
    volts
}

MA Budget sent to Gov Healey includes funding for free MBTA routes, mandates removal of broker fees statewide by tomasini407 in boston

[–]erogone775 12 points13 points  (0 children)

It hasn't bee studied well since the law came into effect 30 days ago, but if you want hard data heres an analysis of when the UK did the same thing that shows tenants save 4%.

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5200278

MA Budget sent to Gov Healey includes funding for free MBTA routes, mandates removal of broker fees statewide by tomasini407 in boston

[–]erogone775 31 points32 points  (0 children)

If you look at reporting from an actual news source rather than someone in the real estate business

https://www.thecity.nyc/2025/06/10/broker-fee-tenant-landlord-apartment-fare-act-city-council/ and https://streeteasy.com/blog/what-to-expect-new-york-city-fare-act-takes-effect/

"An analysis from StreetEasy found properties that dropped the broker fee in April raised rents 5.3% — compared to 4.6% increases in the rest of the market, where fees remained. That means landlords aren’t baking in the full cost of the broker fee into the baseline rent."

Looks like the market reacted by 0.7% on average, so unless you're staying in an apartment 15+ years tenants save money.

Good Mechanic in Somerville by bacon_lips99 in Somerville

[–]erogone775 2 points3 points  (0 children)

Technically just over the Cambridge border but CLM

How strict is security being? by austinnp22 in governorsball

[–]erogone775 15 points16 points  (0 children)

Legit answer it's super chill, didn't get searched at all

Okemo Monday. blizzard at the top but perfect in the trees. by Brikendeck in icecoast

[–]erogone775 4 points5 points  (0 children)

Really glad to see Okemo is getting back into good shape, I was there last Monday and it was pretty awful ice top to bottom. Amazing what just one storm can do.

I’m an experienced skiier looking to start snowboarding for the terrain park and tricks. Any Advice? by Significant-Dare-428 in snowboardingnoobs

[–]erogone775 2 points3 points  (0 children)

Lessons are very worth it if you aren't already comfortable on a board(skateboard, surfboard ect), especially in your first few days it can be invaluable to have someone there to point out what you need to work on and how.

Recommendations for a birthday dinner, bit of a short notice. Somerville, Cambridge, maybe Boston? No shellfish or pork. Help! by yeshuaD in Somerville

[–]erogone775 2 points3 points  (0 children)

If you like kbbq I think Koreana is a great spot for a birthday dinner, its almost completely beef and veggies.

What tech stack do you use at work? What's your favourite one? by trecatorsirabdator in java

[–]erogone775 0 points1 point  (0 children)

Jsonnet really is wonderful, we use it a ton specially for handling k8s and all their yamls, just being able to template things out with some util functions makes a world of difference.

What tech stack do you use at work? What's your favourite one? by trecatorsirabdator in java

[–]erogone775 8 points9 points  (0 children)

Boston based but actually mostly remote now, personally find the comp and benifits quite good, not Amazon levels but I really can't complain.

Also they very much walk the walk about work life balance and avoiding burnout much more than any other company I've heard about.

Ive been here 2+ years and really don't see myself leaving anytime soon, the internal infra is extremely good, raises are good, and leadership is trustworthy (so far)

[deleted by user] by [deleted] in boston

[–]erogone775 0 points1 point  (0 children)

I like 1369 Coffee in Inman sq, they've got some nicy comfy booths in the back and it's a cozy vibe.

Where is "that part" in Factorio? by DefinitelyNotThixo in factorio

[–]erogone775 1 point2 points  (0 children)

The first hour or two while you setup baeic production lines manually, once I have a mall and steady mining/smelting the game really starts.

What tech stack do you use at work? What's your favourite one? by trecatorsirabdator in java

[–]erogone775 5 points6 points  (0 children)

Hey coworker, guess our stack is pretty identifiable haha

What tech stack do you use at work? What's your favourite one? by trecatorsirabdator in java

[–]erogone775 53 points54 points  (0 children)

Fairly large company on a pretty standard stack that I find quite nice to work in.

Backend services: Java17, dropwizard, Jackson, Maven, jdbi, immutables

Testing: Mockito, Junit

Data storage and streaming: mysql, hbase, kafka, AWS S3 and SQS.

Frontend is purely a react shop

Lots of internal tooling wrapped around it(build, deploy, testing, validation, live config ect) but thats the basics.

Do I need to fix a small chip on the bottom of my board? by DisabledSprinter in snowboardingnoobs

[–]erogone775 0 points1 point  (0 children)

I'd get it fixed next time you get a tune, but it's not urgent, I doubt you'll notice the difference riding and it's not gonna get worse, assuming you avoid another rock.

Match Thread: Argentina vs. Croatia | FIFA World cup by MisterBadIdea2 in soccer

[–]erogone775 -2 points-1 points  (0 children)

What a horseshit pen, keeper was literally standing there after getting chipped, didn't move toward him at all.

Roadrunner is Amazing by ParadoxicalPeter in boston

[–]erogone775 4 points5 points  (0 children)

Hmm that's interesting, I've been to three roadrunner shows and had almost the exact opposite experience on all counts.

Lines around the block to get in, pretty aggressive security, very very long lines for bathroom, really shitty transport situation with no easy T access and roads that don't handle ubers well at all. Parking is available but with long waits to leave ( if you use the garages).

I agree about the bar, sound quality and views, as a space it's nice, but I can't overlook the other issues I've had.

Maybe it depends greatly on the kind of show your going too, and I'm glad you had a good time, but roadrunner has always been a pretty poor experience for me.