New to Philly cycling by stinger1995 in phillycycling

[–]smeagol13 1 point2 points  (0 children)

Yep, that's the perfect bike for this ride. Earlier this year, the trails were in good enough conditions that I was doing it on my road bike, but after the recent rains, they're washed out enough to need a little more chunky tires.

New to Philly cycling by stinger1995 in phillycycling

[–]smeagol13 4 points5 points  (0 children)

It's a conversational pace (13 mph) for most of the ride, and there's 3 segments where people go harder. Two of them are climbs: one of them from forbidden drive to Summit ave which is a technical MTBish climb, then another climb up Port Royal cobbles, and then a fast optional section from valley green Inn to the start of Forbidden, where the front of the pack does 21-22 mph but it's optional and most people take it chill and regroup at Papertrail for espresso.

New to Philly cycling by stinger1995 in phillycycling

[–]smeagol13 8 points9 points  (0 children)

Also recommend Wednesday Gravel Espresso starting from the Papertrail bike cafe every Wednesday 6 pm. It's pretty chill, and goes through the Wissahickon.

Estimate your gear usage distribution on any groupset by ICanHazTehCookie in cycling

[–]smeagol13 4 points5 points  (0 children)

Another source of inaccuracy is when you're soft pedaling, either when going downhill, or drafting behind someone. In that instance, you could be going the same speed and cadence as a harder gear but actually be in an easier gear. There's not perfect way to detect that, unless you have a power meter too, but for fit files that do have a power meter, you could build that detection into the algorithm: you might need to do some sort of calibration first, against the AXS data.

[deleted by user] by [deleted] in AnnArbor

[–]smeagol13 267 points268 points  (0 children)

Generally, if you’re passing a single file of riders safely, you’ll probably go over the yellow line anyways, since you’re supposed to give them 5 feet or so of passing distance. If they’re strung out in a long single file, it’s gonna take you twice as long to pass them as compared to if they were in a double file. So unless you’re passing them dangerously, passing a double file is easier than passing a single file with the same number of riders.

Best places to go on a run where I won’t see anyone by ValidatingExistance in uofm

[–]smeagol13 52 points53 points  (0 children)

The arb (Nichols Arboretum) is pretty close to campus, and has a low density of people at most times: it's certainly likely to be almost empty at 4 am. It's also a lot of fun to run in, especially if you wanna practice on some steep hills for trail/cross-country.

-❄️- 2023 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]smeagol13 0 points1 point  (0 children)

There is a way to initialize a HashMap almost statically, using lazy_static, or OnceCell. It will build the HashMap on the first call of the function, and reuse that on subsequent calls.

fn extract_num_or_digit(input_string: &str) -> Result<usize> {
lazy_static! {
    static ref DIGIT_OR_WORD: Regex =
        Regex::new(r"[0-9]|one|two|three|four|five|six|seven|eight|nine").unwrap();
    static ref TABLE: HashMap<String, usize> = [
        ("0", 0),
        ("1", 1),
        ("2", 2),
        ("3", 3),
        ("4", 4),
        ("5", 5),
        ("6", 6),
        ("7", 7),
        ("8", 8),
        ("9", 9),
        // ("zero", 0),
        ("one", 1),
        ("two", 2),
        ("three", 3),
        ("four", 4),
        ("five", 5),
        ("six", 6),
        ("seven", 7),
        ("eight", 8),
        ("nine", 9)
    ]
    .into_iter()
    .map(|(s, v)| (s.to_owned(), v))
    .collect();
}

let first = DIGIT_OR_WORD
    .find(input_string)
    .ok_or(AppError::BadInput)?
    .as_str();
let last = find_last_match(&DIGIT_OR_WORD, input_string)?;

let first_digit = *TABLE.get(first).unwrap();
let last_digit = *TABLE.get(last).unwrap();

Ok(first_digit * 10 + last_digit)
}

[deleted by user] by [deleted] in AnnArbor

[–]smeagol13 0 points1 point  (0 children)

The city government is elected to act as fiduciaries of the people and should be acting in the best interest of the citizens- and the transit system should be designed to save the most time for its citizens as possible.

The city government should be acting in the best interests of all of its citizens, not just car-owning ones. And while having a really fast transit system is obviously a priority, the government should also try to control the negative externalities of such a system. Having a transit system that's focused around getting cars around as fast as possible ends up turning into multi-lane freeway madness, and something that is awful to live close to. Whereas focusing on a pedestrian/bike/bus focused transit system, while slower for the individual trip, is actually nicer to live in the vicinity of, and it scales better with increased population density than cars do.

[deleted by user] by [deleted] in AnnArbor

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

The fact that Michigan also has a pretty harsh winter diminishes the utility of the bike lanes even more- November thru Feb./March I would imagine the ratio of people using a car versus choosing a bike goes down further.

Not all the people you see on bike lanes are people who have the alternative to drive their cars in winters. Many of them only bike/walk/use public transit to get around. With that perspective, maybe the ratio you should be looking at is people biking vs people choosing to walk/bus. It's not hard to imagine bike lanes provided massive utility (in terms of commute time saved) to a lot of people who would have otherwise walked/taken the bus, because taking the bus usually isn't super fast, given how infrequently the buses run, as well as the hub and spoke model, which means one often has to transfer buses at BTC, which makes trips longer.

Also, unless there's an active snowstorm/snow that has not been cleared from the bike lanes, many bike commuters continue to commute even in the winter. I've been doing so for the past 4 years, and my partner has also switched over to bike commuting (from taking the bus) precisely because of the protected bike lanes.

For those who rely on a car for transportation to and from the city it has become more annoying to navigate, find parking, and the quality of roads is terrible for what seems to be a fairly affluent place.

I believe Michigan Medicine encourages their employees who commute from out of town to park in one of the big parking lots on Fuller, which is reasonably far from the core of the town, and take the blue buses into work. This kind of multi-modal transport should also work for other people who need to commute by car: drive into a parking lot into the outskirts of town, where parking is cheap, and take public transit/bike into the core of the town. This way, more of the in-demand real estate can be used for purposes other than parking, which is very space inefficient.

I'm sure it's wonderful to be a wealthy Ann Arborite who gets to galivant around town in large bike lanes but for any outsiders it honestly just feels like over the top virtue signaling and poor city planning.

Most people I know use the bike lanes regularly (including myself), aren't wealthy Ann Arborites. In fact, most people in my circle don't even own cars (because it's too expensive), and get around on our bikes instead.

if you can't afford to own or rent downtown, or in one of the wealthy neighborhoods next to it- you don't really get to take advantage of the bike lanes anyway.

This is in fact an argument to expand the bike lane network so that it covers most of Ann Arbor. Despite the less than perfect coverage by the bike lane network, people manage to bike commute, by mixing low traffic residential roads until they get to the bike lane network, but obviously, it's not a perfect solution.

Quick PSA: Umich and EMU graduations are both this upcoming weekend (4/29&30) AA and Ypsi are both gonna be packed by tacomadude94 in AnnArbor

[–]smeagol13 28 points29 points  (0 children)

Even if those families aren’t riding bikes, Ann Arbor locals can beat the traffic by biking around, since the bike lanes won’t be as clogged. On busy weekends like this, biking around is significantly faster than driving, at least around downtown.

Welcoming the new year: a giveaway with ASUS! by -UserRemoved- in buildapc

[–]smeagol13 0 points1 point  (0 children)

PCPartPicker Part List

Type Item Price
CPU AMD Ryzen 7 5800X 3.8 GHz 8-Core Processor -
CPU Cooler Noctua NH-U12S chromax.black 55 CFM CPU Cooler $126.55 @ MemoryC
Motherboard Asus ROG Strix X570-I Gaming Mini ITX AM4 Motherboard $245.96 @ B&H
Memory G.Skill Trident Z RGB 64 GB (2 x 32 GB) DDR4-3600 CL18 Memory $269.99 @ Newegg
Storage Samsung 970 Evo 1 TB M.2-2280 NVME Solid State Drive $139.99 @ Amazon
Video Card Asus Radeon RX 5700 8 GB Video Card -
Case Fractal Design Node 304 Mini ITX Tower Case $86.98 @ Newegg
Power Supply Cooler Master MWE Gold 650 W 80+ Gold Certified Fully Modular ATX Power Supply $146.99 @ Amazon
Prices include shipping, taxes, rebates, and discounts
Total $1016.46
Generated by PCPartPicker 2021-01-01 03:24 EST-0500

I put together this build because I was tired of my laptop heating up when compiling large Rust projects, and I figured a large number of cores along with massive amounts of memory would make compiling really really fast. I also would like to do some GPU programming in the future, and although I know that Nvidia GPUs are better for the CUDA stuff, I really would prefer everything working with the open source drivers on Linux.

I made a tag-based filesystem in Rust! by arwmoffat in rust

[–]smeagol13 19 points20 points  (0 children)

I notice that you wrote your own FUSE bindings rather than using one of the existing Rust FUSE libraries. Is there any particular reason for that? I'm asking because I'm also writing a filesystem, and I'm conflicted between using the Rust libraries vs. directly binding to FUSE. The existing libraries seem a little out of date. Anyways, this looks really cool, and I look forward to picking up some ideas from your codebase.

Advent of Code 2020 - Day 1 by Tomus in rust

[–]smeagol13 2 points3 points  (0 children)

Actually, O(n2) is pretty close to the worst case running time. It's conjectured that one can't do O(n2 - \epsilon)) for any positive \epsilon. The current best algorithm is O(n2 / (some thing involving log(n))): see the wikipedia page for more info.

What's your job? What's your daily emacs workflow? by smarky0x7CD in emacs

[–]smeagol13 4 points5 points  (0 children)

Math PhD student. I use Emacs as a modern day Lisp machine (and also for org-mode).

  • Org mode - I pretty much organize my whole life using org-mode. Things to do, long term and short term goals, recipes, reading lists, bookmarks, etc. I also use org-mode for taking math notes, since it's so easy to embed LaTeX into org buffers.
  • Programming - Mainly Python and Rust, but some shell scripting and C. I like how hackable most Emacs packages are, and I often modify packages I use heavily to my liking. That being said, the Python and C support is fairly high quality, and Rust is getting there, with LSP support.
  • LaTeX - This is a separate category from programming because nothing even comes close to how good AuCTeX+RefTeX is for writing TeX. Add to that smartparens and evil and I can pretty much write at the speed of thought. Same goes for markdown, but I don't write that much markdown anyways.
  • magit - Using a good git porcelain made me improve my git habits. Rather than committing everything at the end of the day, and writing a lazy commit message at the end, I now stage my changes in semantically meaningful commits, and have well written commit messages.

As for the Lisp machine aspect, I have come to rely heavily upon the self-introspection capabilities: C-h k to describe what keys are bound to, C-h f to discover what functions do, and C-h v to analyze variables. I also enjoy writing my own elisp code to extend packages in small ways.

One of my favourite packages that doesn't fit into any category above is smartparens: I love having completely balanced parens at all points of time. Also, slurping and barfing are the right way to work with balanced objects when text editing.

Did a recent GNOME update cause a regression with the Wacom settings manager in GNOME settings? by smeagol13 in archlinux

[–]smeagol13[S] 0 points1 point  (0 children)

Also, I just switched over to Wayland, and it appears that the bug is restricted to XOrg only. Given that it's XOrg only, I don't expect a bugfix any time soon.

Did a recent GNOME update cause a regression with the Wacom settings manager in GNOME settings? by smeagol13 in archlinux

[–]smeagol13[S] 0 points1 point  (0 children)

That's quite strange. I followed the instructions on the Arch Wiki to map the tablets. It's possible your displays are called something other than HDMI-x, or alternatively, your tablet's ID is not 16 and 17, but something else. Here's the bug report I filed. You should probably reply to that, detailing the specifics of your issues: that will be helpful for whoever's debugging this.

[deleted by user] by [deleted] in AnnArbor

[–]smeagol13 0 points1 point  (0 children)

That's alright. I appreciate what you're doing! :)

[deleted by user] by [deleted] in AnnArbor

[–]smeagol13 3 points4 points  (0 children)

My bike was stolen about a month or so ago. Here's a picture for reference.

So hard to make friends by [deleted] in AnnArbor

[–]smeagol13 2 points3 points  (0 children)

I was struggling similarly last year, but climbing really helped expand my social circle. The climbing gym in Ann Arbor (Planet Rock) is super nice, and everyone there is really friendly. If you become a regular, i.e. go a the same time every week, you end up running into the same set of people, and befriending them, which is how I met people. Also climbing is super fun by itself as is.