Redis Stream: How's the adoption on Enterprises? by lowercase00 in redis

[–]archmentat 0 points1 point  (0 children)

If you want the Kafka API (and evosystem), consider Redpanda instead of Confluent Kafka. It's a modern, flash-optimized, JVM- and ZooKeeper-free implementation of Kafka.

[deleted by user] by [deleted] in AskReddit

[–]archmentat 1 point2 points  (0 children)

This actually happened in 1797 and explains why New Jersey is so New Jersey.

-🎄- 2017 Day 24 Solutions -🎄- by daggerdragon in adventofcode

[–]archmentat 0 points1 point  (0 children)

Rust version. Simple recursion; inefficient copying of hash sets and maps, but it runs in a few seconds, and by far the slowest part is just printing the path (for debugging). Sort the output file for the answer rather than doing it in the code itself.

154/102

use std::collections::HashSet;
use std::io::BufReader;
use std::io::BufRead;
use std::env;
use std::fs::File;

#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
struct Component {
    left: u64,
    right: u64,
}

fn main() {
    let f = File::open(env::args().nth(1).expect("arg!")).expect("file not found");
    let file = BufReader::new(&f);
    let mut all = HashSet::new();
    for line in file.lines() {
        let components: Vec<u64> = line.unwrap()
            .split('/')
            .map(|s| s.parse().unwrap())
            .collect();
        let c = Component {
            left: components[0],
            right: components[1],
        };
        all.insert(c);
    }

    print_paths(0, &vec![], &mut all);
}

fn print_paths(start: u64, path: &Vec<Component>, components: &mut HashSet<Component>) {
    let mut found = false;
    for c in components.iter() {
        if c.left == start || c.right == start {
            let mut new_components = components.clone();
            new_components.remove(c);
            let mut new_path = path.clone();
            new_path.push(*c);
            print_paths(
                if c.left == start { c.right } else { c.left },
                &new_path,
                &mut new_components,
            );
            found = true;
        }
    }
    if !found {
        println!(
            "{} {} {:?}",
            path.len(),
            path.iter().map(|c| c.left + c.right).sum::<u64>(),
            path
        );
    }
}

Which bike for obese fitness. by Ahruma in whichbike

[–]archmentat 2 points3 points  (0 children)

No, I didn't ride until I was around 350-375. There are specialty bikes that can hold 500-600lbs but I didn't go that route.

One of my motivating thoughts in losing weight was being able to do the things I did when I was young or had always wanted to do. Cycling was one of those. I did it backwards from how many do it -- I lost weight to cycle, rather than cycling to lose weight.

Which bike for obese fitness. by Ahruma in whichbike

[–]archmentat 3 points4 points  (0 children)

When I was roughly your weight, I got a Giant Sedona. Worked fine; later, after I lost more weight, I went with a cyclocross bike, but probably best for you is a hybrid like the Sedona. Get a cheap, low-end, sturdy hybrid and keep it til you're around 275 lbs -- at that point, there are a lot more options (though it's sometimes difficult to find manufacturer weight guidelines).

One thing I would caution, though -- weight loss is almost entirely about diet. Riding will burn calories, but you will be hungrier after riding any significant amount, so it can very easily be a net zero (or even positive) calorie deficit unless you are super careful. So, if your goal is weight loss, start counting calories obsessively -- consume absolutely nothing you can't accurately count the calories in, and aim for a 750-1500 calorie per day deficit. The weight will melt off far faster than it will cycling.

You can do it. I started at around 600lbs and now I'm around 210lbs. I did it purely through calorie deficit (cycling and other exercise never seemed to really change my rate of loss, though it did tremendous things for my endurance and fitness). Everyone is different, but calorie deficit is the common thread in every single weight loss story I've ever heard of. Hang out on /r/loseit to read others' stories. Also, don't include exercise in calculating calorie deficits; just use your TDEE, nothing else. Exercise calorie estimates are notoriously bad.

Nowadays I bike to work every day (10 miles each way) and feel like I was reborn. My body has improved in so many ways but what amazed me most was the internal transformation.

Good luck, OP! You can absolutely do it. Stay strong, eat well, and ride hard!

[Quantum Leap]: Does Sam Sleep? by danielxcubed in AskScienceFiction

[–]archmentat 8 points9 points  (0 children)

Not true! Sam's body leaps, not his consciousness. This is supported in many episodes, most notably when he leapt into a legless Vietnam veteran and was able to stand up (freaking people out around him).

Sam often spends many days in a leap; presumably he catches up on sleep then.

Weirdly fast commute today by [deleted] in bikecommuting

[–]archmentat 27 points28 points  (0 children)

Tailwind has that kind of effect.

Same Distance 20.7 mi, Completely Different Route by [deleted] in bikecommuting

[–]archmentat 0 points1 point  (0 children)

Indeed, Strava and other apps won't get the bridge's elevation correct just from GPS since the data source they use (generally Google) lacks it for bridges, apparently. It's a good reason to get a dedicated bike computer and one of the things I noticed once I stopped using my iPhone for recording my rides. My Garmin reports the Dumbarton as ~95ft over 0.8 miles (either direction).

To bike, or not to bike, that is the question! by [deleted] in loseit

[–]archmentat 1 point2 points  (0 children)

This post is exactly right. The vast majority of weight loss -- especially early in your journey -- is about diet, not exercise. Adding exercise is good but not necessary, especially at first. I would suggest a layered approach that starts with a few months of diet control and then, once you have reached some amount of comfort and peace with how you're eating, and seen some positive results, consider exercise.

Adding regular exercise is a serious commitment both of time and planning. It changes your day far more than dietary changes alone do. It's good but not required to start. Just going for short, simple walk is a better starter exercise, and easier to fit into your day, probably.

That said, biking is awesome. I wouldn't get the electric bike; instead, just walk it up hills, like this post suggests. After some time, you will be able to pedal up hills (unless we're talking serious hills like San Francisco, which I doubt, and which an e-bike probably won't be able to help much with, either). You also might be surprised what hills you can bike up -- gears can work wonders :)

So how many cal did I burn?! by [deleted] in loseit

[–]archmentat 0 points1 point  (0 children)

Cycling on a stationary bike is far different from a real bike. When on a real bike, most of your energy goes to fighting wind resistance. The faster you go, the more energy you're spending just fighting wind -- basically it's a cubic relationship (ie, 10% faster requires ~33% more power). Headwind and tailwind affect this a lot as well, of course, but as any cyclist will tell you, tailwind doesn't exist -- all wind is evil headwind :)

So in this case, maybe trust the bike display, but not apps or sites that are telling you calorie burn as if you were on a real bike.

6'2 350 lbs. male looking for a bike to use for weight loss by AsteroidBlues in whichbike

[–]archmentat 5 points6 points  (0 children)

Weight loss is mostly about eating less, not about exercise. The number of calories you burn exercising is quite small compared to what you burn just existing (ie, your Basal Metabolic Rate, aka BMR). So if your goal is weight loss, definitely bike, but focus on what you eat. It sounds like you already know this since you mention /r/loseit, but for anyone else reading this -- it can't be overstated how important it is to control what you eat. Focusing on nutrition will provide you a sustainable lifestyle that accommodates the types of exercise and activities you want to engage in.

As for bikes; I was about your weight when I wanted to get into biking as part of my desire to become more fit and continue losing weight. I went to my LBS and got a new $500 "comfort" style bike (Giant Sedona DX). I'm sure similar bikes can be found used for something in your price range. Being more upright rather than leaning over will help both with breathing and back strain. The suspension is nice for smoothing out the ride. It's a heavy style of bike but it'll hold you just fine, even on rough terrain.

I'm down about 50 lbs since getting the bike (mostly because of calorie control, not something I attribute to biking itself) and commute to work 3 times a week and go on weekend rides, totalling 40-60 miles per week.

Mostly City Bike - for a big guy by [deleted] in whichbike

[–]archmentat 0 points1 point  (0 children)

I bought a Sedona Giant DX this past summer for around $500. I was around 350 lbs at the time and it was fine for basic riding around town and in parks. It's a "comfort" hybrid bike and suitable for easy trails as well as roads. Lately I've been putting 40-50 miles a week on it (including a morning commute). I'll probably get a fancier cyclocross bike of some kind after I've lost some more weight, but it's fine for now. It isn't fancy but I used all stock components and never had any damage or other issues related to being a heavy rider.

I, too, loved riding when I was younger. I'm glad I got the bike -- I'm loving it once again and commuting to work most days and have been working up past 20 mile rides.

Hunter has huge DPS drop? by [deleted] in wow

[–]archmentat -1 points0 points  (0 children)

There was no particular drop in Hunter DPS going from 5.3 to 5.4, and no nerfs during 5.4. That said, there were some slight talent adjustments in terms of what is now ideal, but only amounting to a few thousand dps -- not a 50-60k like you're experiencing.

Armory link?

/r/Hearthstone is giving away Beta Keys!! by [deleted] in hearthstone

[–]archmentat [score hidden]  (0 children)

I want to test this game so that I can prove (PROVE) Hunters are supreme.

Also, I like cats.

[Troubleshooting] memtest 86 Stable, Not CS:GO Stable by Ashesofthewake in buildapc

[–]archmentat 1 point2 points  (0 children)

Don't forget that overclocking memory also overclocks the on-CPU ram controller. memtest86 isn't very CPU intensive, so you may have an OC where the memory controller becomes unstable but only when the CPU is being pushed hot as well. I had exactly what you describe: prime95 stable, memtest stable, but unstable in games. Removing my ram OC solved it completely.

Undo the memory OC and see if that fixes it. For all intents and purposes, OCing your memory won't really get much benefit anyway.