Off-and-on trying out an account over at @tal@oleo.cafe due to scraping bots bogging down lemmy.today to the point of near-unusability.

  • 652 Posts
  • 12.7K Comments
Joined 3 years ago
cake
Cake day: October 4th, 2023

help-circle
  • Well, some of them are made for larger cars.

    I think that the real problem is gonna be lane space. Like, most parking lots could be repainted without too much cost, but widening highways is another story.

    I guess if everyone switches to computer-driven cars, that could let them drive at what would maybe be unsafely-close-for-human-driver levels and squeeze a bit more space out, though then everyone would have to buy new cars.


  • tal@lemmy.todaytoPython@programming.dev•A plea not to use uv-build for Python
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    2 hours ago

    I don’t use Gentoo or uv-build, but I don’t get the problem.

    Gentoo builds packages from source for each user. Okay.

    But I assume that it can’t be building the entire toolchain from scratch for each package. It can’t be rebuilding, say, GNU autotools for each package that uses it during its build. It’s presumably either packaging the toolchain dependencies and not updating them between packages or caching the build.

    Why can’t Gentoo just do whatever it does there for this uv-build thing?

    EDIT: Here’s a Hacker News thread on this same article, which I turned up in trying to get some context:

    https://news.ycombinator.com/item?id=50076048

    I discovered partway through that I don’t care as much about Python or Gentoo build expectations as some of the people involved, enough to fully understand it, but it sounds like, from a quick skim, that some people feel that there are unspecified expectations from the Python build environment. Some people feel that an unspecified dependency version means that one must use the latest verson as of time of build, and since Gentoo typically builds packages for a given user at different times, this entails using different versions of the build tool. Others do not feel that way.

    Some snippets:

    UV maintainer asking why Gentoo doesn’t just pick a version and freeze there and then some responses

    (I am one of uv’s maintainers.)

    …I don’t understand why Gentoo needs to rebuild every single release of uv-build. It doesn’t change as much as uv itself, and it’s intentionally compatible across uv versions. Why not set a policy of only updating once weekly, or even less frequently, with exceptions for important breaking changes or bug fixes?

    Because if you don’t pin a version of uv-build in your project, that means “use the latest version available”. Gentoo can’t second guess you–even if it were able to verify somehow that the new version of uv-build that just got released will end up producing an identical wheel for your project as the previous version, without actually using the new version of uv-build.

    Other distros don’t necessarily have quite the same problem because, if they include packages of Python projects, they don’t normally track the build backend as a dependency. So if uv-build pushes an update, the distro would push an updated package for uv-build, but they wouldn’t look at every Python project they package to see if it used uv-build as a build backend and rebuild it if it did. It’s the “rebuild from source every time” aspect of Gentoo that forces that connection.

    i guess gentoo is rolling-release, vs something like debian where every package is frozen in time (+ backports), and debian does seem to largely solve the coordination problem by making everything on the system use a fixed version of some package; with rare situations allowing >1 version of the package at a time.

    my take on linux distros being annoyed by their own policies is that perhaps they should change the policy. in this case, perhaps they should pretend uv-build updates once a month or something.


  • Car bloat is causing parking problems in the US too.

    In parking lots near me with smaller slots, I frequently see people just using alternating spaces now.

    Earlier this week, I had someone in a large SUV come back to their SUV when I was parked on their passenger side and be unable to have the passengers enter the SUV. I was in my car and offered to pull out so that the passengers could get in, and the driver said no, that he could still get in the other side. He got in, pulled out into the lane down the parking lot, and his passengers boarded there. I have to wonder how frequently this story is playing out elsewhere.






  • It’s quite a serious problem, and in China’s case, due to its size, the impact that immigration can have to mitigate it is limited.

    But…China also isn’t the only one facing demographic issues from a decreasing fertility rate. The US has long been notable for being both wealthy and maintaining a high fertility rate, which is somewhat unusual, but it’s been below replacement fertility in recent years now. It’s better off than a lot of countries, but it’s still going to have to try to grapple with it too, even if it’s not in as severe a position.

    And some countries in the West, like Germany or Italy, have been low for quite some time. Japan and South Korea have been pretty low, with South Korea in a really serious place.

    https://data.worldbank.org/indicator/SP.DYN.TFRT.IN?locations=US-CN-DE-IT-KR-JP

    In general, social changes in past decades have led to really low fertility rates, and that leads to longer term economic problems.


  • Huh. Apparently there was actually a real dispute over the name, with people wanting Mount Ranier to be renamed Mount Tacoma (I mean, with a number of the “facts” in the satirical article not holding):

    https://en.wikipedia.org/wiki/Mount_Rainier

    George Vancouver named Mount Rainier in honor of his friend, Rear Admiral Peter Rainier.[23] The map of the Lewis and Clark expedition of 1804–1806 refers to it as “Mt. Regniere”. Although Rainier had been considered the official name of the mountain, Theodore Winthrop referred to the mountain as “Tacoma” in his posthumously published 1862 travel book The Canoe and the Saddle. For a time, both names were used interchangeably, although residents of the nearby city of Tacoma preferred Mount Tacoma.[24][25]

    In 1890, the United States Board on Geographic Names declared that the mountain would be known as Rainier.[26] Following this in 1897, the Pacific Forest Reserve became the Mount Rainier Forest Reserve, and the national park was established three years later. Despite this, there was still a movement to change the mountain’s name to Tacoma, and Congress was considering a resolution to change the name as late as 1924.[27][28]


  • I am laughing at both the text:

    If I leave the corner, Hector from Lehigh Avenue has it inside of an hour. Hector sells the same tranq dope at the same price, with zero offsets and a pit bull named Dollar. The counterfactual to me is not “no fentanyl at Kensington and Somerset.” It’s fentanyl without malaria nets. Every person who wants me gone, including Officer Ruiz, who arrested me in August and asked whether I understood what I was doing, is functionally campaigning for Hector. I told Ruiz I’d modeled it extensively. He did not want to see the model.

    And at the user comments.

    And it looks like this website is full of articles like this.









  • Upon searching, it looks like the ancient Greeks discovered the method I described, and it’s called Heron’s method, and is indeed a special case of Newton’s method:

    https://en.wikipedia.org/wiki/Square_root_algorithms#Heron’s_method

    The first explicit algorithm for approximating   S is known as Heron’s method, after the first-century Greek mathematician Hero of Alexandria who described the method in his AD 60 work Metrica.[3]

    This is equivalent to using Newton’s method to solve x² − S = 0. This algorithm is quadratically convergent: the number of correct digits of x sub n roughly doubles with each iteration.[5]



  • tal@lemmy.todaytoCyanide & Happiness@discuss.online•2011-08-06
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    1 day ago

    2⁸=256, so √256=√2⁸=2⁴=16
    2⁷=128, so √128=√2⁷=2³×√2=8×√2

    √2 is going to be an irrational number, so that’s probably the most-concisely-represented simplified answer. You can’t write the thing in shorter form as a fraction and decimal form will go on forever.

    But…you might want a decimal approximation.

    It used to be, back in the slide rule era, that people were taught how to get decimal approximations of square roots by hand. That predates me. I don’t know whether it’s the method they taught—might be that they have something more-efficient than this—but I remember thinking about how to compute a square root manually as a kid, and I’d think that one should be able to approach the square root of a number using just long division by picking some divisor, dividing the starting number (here, 128) by it and averaging the two, and repeating. One can get arbitrarily close to the actual square root of a number, though one won’t ever actually get there.

    I’m not going to do the long division by hand, but in Python (starting at 11, since that’s probably something in the neighborhood of 8×√2) :

    $ python -q
    >>> a=11
    >>> b=128/a;print(b);a=(b+a)/2;
    11.636363636363637
    >>> b=128/a;print(b);a=(b+a)/2;
    11.309236947791165
    >>> b=128/a;print(b);a=(b+a)/2;
    11.313707614983098
    >>> b=128/a;print(b);a=(b+a)/2;
    11.313708498984726
    

    And we can check that in Maxima:

    $ maxima -q
    
    (%i1) 128^.5;
    
    (%o1)                         11.313708498984762
    (%i2) 
    

    So looks good.

    I think that that iterative approach amounts to basically a simplified form of Newton’s method, which is a generalized method of iteratively finding numeric approximations for functions. Normally, that’s got a few extra steps, but for square root, we can just find f(x)=y and then use the average of y and x as our next x.