🇨🇦 tunetardis

  • 0 Posts
  • 21 Comments
Joined 2 months ago
cake
Cake day: June 8th, 2025

help-circle





  • I ride my ebike on mixed use paths on my way to work. My personal policy is to treat it as a class 1 in that case, and not exceed 24 kph. When passing pedestrians, this drops to 20 or lower, depending on the circumstances (e.g. can I get their attention with the bell, are small children/unleashed dogs involved, etc.).

    Yesterday, I saw someone shoot past me on an ordinary bike. I briefly sped up to match his speed and checked my speedometer. He was doing 36 kph. In fairness, regular bikes don’t tend to come with speedometers, so he may have had no idea how fast he was moving.

    I have also seen ebikes going well over 32 kph though. Mine is software limited to top out at that for electric assist, but the cap can easily be lifted with the phone app. I have elected not to do so. I’m a commuter. I just want to get to work. Not trying to win any races.


  • I think my most common use case is with dictionary lookups.

    if (val := dct.get(key)) is not None:
        # do something with val
    

    I’ve also found some cases where the walrus is useful in something like a list comprehension. I suppose expanding on the above example, you you make one that looks up several keys in a dict and gives you their corresponding values where available.

    vals =  [val for key in (key1, key2, key3) if (val := dct.get(key)) is not None]
    

  • I’m type 2 diabetic and noticed my blood sugar tends to peak around half an hour after eating. So I now try to time any exercise I do for that window. And actually it feels good. Like I feel an urge to get up and move around at about that point, so I guess the body is trying to tell you something?

    Since most of my exercise involves cycling, if I’m say eating out someplace and can afford the time, I relax for about half an hour at the restaurant before hitting the road.

    I told this to my diabetic councillor. She said such a regimen is approximately equivalent in therapeutic value to taking a metformin pill, so this is clearly a good thing for me, but I imagine it’s not bad idea in general?










  • As with most script languages, you can hit the ground running in a very procedural sort of way, as you don’t even have to define a main entry point. You just start coding.

    But Python certainly has an object model. If I’m not mistaken, everything in Python is an object. Like even functions.

    I suppose there are some aspects of the class implementation that feel a little tacked on? Like the way you need to manage the self reference manually where it may be implicitly handled for you in other languages. At least the way you call super() now is a lot less kludgy.

    One thing I miss a bit in Python is method overloading. In a general sense, function overloading is not an OOP feature per se, but I find it useful in OOP, particularly with object initializers. You can sort of achieve it with @functools.singledispatch but it’s pretty janky. For initialization, I prefer keeping the __init__ method pretty rudimentary and writing factory functions to do more complex initializations. And with @dataclass, you can forego writing an __init__ altogether if you do it that way.


  • Ok, here’s my question for an agoraphobe.

    Let’s say we one day decide to build a space colony, but it’s sort of a one-way trip since the lower gravity would acclimatize your body in such a way that it would be difficult to ever return to Earth after several years on the Moon/Mars/wherever. And you would most likely live in an underground habitat where you would maybe make the occasional trip up to the surface to walk around outside, but it would be a hassle since you’d have to get all suited up. So most of the time you would be just chilling in your man cave or what have you.

    As an agoraphobe, would you make the ideal pioneer on such a frontier?


  • For instance, if an AI model could complete a one-hour task with 50% success, it only had a 25% chance of successfully completing a two-hour task. This indicates that for 99% reliability, task duration must be reduced by a factor of 70.

    This is interesting. I have noticed this myself. Generally, when an LLM boosts productivity, it shoots back a solution very quickly, and after a quick sanity check, I can accept it and move on. When it has trouble, that’s something of a red flag. You might get there eventually by probing it more and more, but there is good reason for pessimism if it’s taking too long.

    In the worst case scenario where you ask it a coding problem for which there is no solution—it’s just not possible to do what you’re asking—it may nevertheless engage you indefinitely until you eventually realize it’s running you around in circles. I’ve wasted a whole afternoon with that nonsense.

    Anyway, I worry that companies are no longer hiring junior devs. Today’s juniors are tomorrow’s elites and there is going to be a talent gap in a decade that LLMs—in their current state at least—seem unlikely to fill.