Email or username:

Password:

Forgot your password?
77 posts total
Michał Górny

As @martin_kirch pointed out, the #uv project is working on adding its own #PEP517 builder.

This is just terrifying! Please consider joining me in raising concerns about it.

uv is a great tool! I do love it as a #Python package manager. But it is not very portable (even less portable than #RustLang in general, e.g. I'm still working on getting it fixed for PPC), and it is very heavy. And its popularity means that a lot of pure Python packages will now have a dependency on this non-pure, non-portable, heavy build backend that they don't really need.

This is going to be a true nightmare for downstreams. Just imagine me filing bugs, repeatedly asking people "please don't use this build backend, we can't build your package anymore because uv is non-portable!" And this will surely result in a lot of frustration, negativity, knee-jerk reactions and downstream patching just to keep things installable.

github.com/astral-sh/uv/issues

As @martin_kirch pointed out, the #uv project is working on adding its own #PEP517 builder.

This is just terrifying! Please consider joining me in raising concerns about it.

uv is a great tool! I do love it as a #Python package manager. But it is not very portable (even less portable than #RustLang in general, e.g. I'm still working on getting it fixed for PPC), and it is very heavy. And its popularity means that a lot of pure Python packages will now have a dependency on this non-pure, non-portable,...

Michał Górny

Packaging non-Rust stuff: sometimes having to fix bugs in the package, sometimes in its dependencies.

Packaging #RustLang stuff: often having to fix the same bugs, over and over again, in one or more of the vendored crates.

#Gentoo

Michał Górny

Rewriting #Python packages in #RustLang is going great, right?

That's why for almost a year now #CEPH users have a problem, because Rust parts of Cryptography are clashing with Rust parts of BCrypt. But it's great!

And the best thing is Cryptography authors' attitude — #PyO3 has to deal with it, let's close the bug and lock comments. We really should have more critical packages like that.

bugs.gentoo.org/920906
github.com/pyca/bcrypt/issues/
github.com/pyca/cryptography/i

#Gentoo

Rewriting #Python packages in #RustLang is going great, right?

That's why for almost a year now #CEPH users have a problem, because Rust parts of Cryptography are clashing with Rust parts of BCrypt. But it's great!

And the best thing is Cryptography authors' attitude — #PyO3 has to deal with it, let's close the bug and lock comments. We really should have more critical packages like that.

zombiewarrior

@mgorny well you know it's always a good idea to take a thing that works, and then to make it better, break it completely
this is true performance

zombiewarrior

@mgorny "if this code worked it would theoretically be 0.5% faster"

theoretical performance matters

Michał Górny

Idea: instead of trying to fix #y2k38 problem, let's just roll the calendar back to 1970. The XXI century sucks anyway, everything is going downhill. Really no point in keeping it.

Michał Górny

How about one of the many alternative #Python #AsyncIO implementations that keeps causing trouble, yet people use it because it claims to be "ultra fast". Except that the claim is based on benchmarks… from 2018. Done on Python 3.5. Against other implementations whose versions weren't given. And last year, someone already reported they can't reproduce the numbers.

#Gentoo

Michał Górny

Two hours later, and we have an unbundled #CramJam in #Gentoo.

gitweb.gentoo.org/repo/gentoo.

All it took was to:

• add an artificial pkg-config file for bzip2, as bzip2-sys requires it, yet vanilla bzip2 distribution doesn't supply one (github.com/alexcrichton/bzip2-)
• set an environment variable for zstd-sys
• pass appropriate "feature" to activate system lib in blosc2-sys
• patch lz4-sys to support system lib, using a patch that's being ignored by the author for months now (github.com/10XGenomics/lz4-rs/)
• patch libcramjam to allow system library in libdeflate-sys and liblzma-sys (via passing appropriate features)
• patch libcramjam not to force linking to static blosc2 in blosc2-sys
• patch blosc2-sys and libdeflate-sys not to force an exact version of the system library (in the case of blosc2-sys, a broken version, I must add)

So, well, #RustLang and #Cargo are going great. I recall that somebody posted a matching variant of the Scooby Doo meme. Except that I'd modify it a bit, to show that underneath your average`*-sys` crate, there's actually a vendored, old and broken version of a C library. And even if system libraries are actually supported, you have to put a lot of effort to make them work. And on top of that, if they don't, nobody even bothers printing a message and telling you why. It's all guesswork and reading the code.

Now we just have to check and patch all the remaining Rust packages in Gentoo…

Two hours later, and we have an unbundled #CramJam in #Gentoo.

gitweb.gentoo.org/repo/gentoo.

All it took was to:

• add an artificial pkg-config file for bzip2, as bzip2-sys requires it, yet vanilla bzip2 distribution doesn't supply one (github.com/alexcrichton/bzip2-)
• set an environment variable for zstd-sys
• pass appropriate "feature" to activate system lib in blosc2-sys
• patch lz4-sys to support system lib,...

Michał Górny

I'm slowly working on a new blog post. In the meantime, I've looked closer at the #y2k38 problem, and I'd like to share some observations with you.

It seems that the problem is mostly considered from the "overflow" in 32-bit programs angle — i.e. that we're suddenly going to move back in time from 2038 to 1901, and there will be some "funny" effects of that. However, in reality we're probably going to see different kinds of problems.

Firstly, `stat()` stops working on files whose timestamps can't be expressed in 32-bit `time_t` (the files can still be opened, though). It is quite counterintuitive; we usually assume that opening files is more restrictive. In the most absurd case, a program would be able to use a file only once. Once used, timestamps will get updated and `stat()` will start failing.

Secondly, `time()` returns an error. Many developers (myself included) doesn't even consider that `time()` can fail. Yet after 2038, every single call is going to return `-1`. What does that mean? A "well-written" software will just fail with an error. Other programs will just be "stuck" 1 second prior to midnight of December 31, 1969. And I believe that could be worse than returning an "overflowed" time counter, as every call will return the same value.

What could the consequences be? Clocks showing the same date and time all the time. Waiting loops based on wall clock time hanging immediately. Events never getting triggered. Clock-seeded pseudorandom number generators (`srand(time(NULL))`) always returning the same sequence of numbers.

This will affect all proprietary software on 32-bit platforms. If we wanted to play an old game, we're going to have quite a fight ahead of us. What's even worse, even faketime doesn't suffice here — it will adjust the time returned by `time()` calls, but not file timestamps.

#portability #32bit #Linux #Gentoo

I'm slowly working on a new blog post. In the meantime, I've looked closer at the #y2k38 problem, and I'd like to share some observations with you.

It seems that the problem is mostly considered from the "overflow" in 32-bit programs angle — i.e. that we're suddenly going to move back in time from 2038 to 1901, and there will be some "funny" effects of that. However, in reality we're probably going to see different kinds of problems.

Michał Górny

On the eastern shore of #Kórnik Lake, there's a promenade dedicated to Wisława #Szymborska, the poet born in these parts. There, you can find some of her poems pinned to a fence, but also a bench dedicated to her. It includes a part of her poem, illustrated with a #cat figure.

"""
(…)
Here someone was and was,
then suddenly disappeared
and now is stubbornly absent.
All the closets were peered into.
The shelves were walked through.
The rug was lifted and examined.
Even the rule about not scattering
papers was violated.
What more is to be done?
Sleep and wait.

Let him return,
at least make a token appearance.
Then he'll learn
that one shouldn't treat a cat like this.
He will be approached
as though unwillingly,
slowly,
on very offended paws.
With no spontaneous leaps or squeals at first.
"""
(Wisława Szymborska, A Cat in an Empty Apartment, translated by Walter Whipple, babelmatrix.org/works/pl/Szymb)

openstreetmap.org/node/3066107

#park #statue #hiking #poetry

On the eastern shore of #Kórnik Lake, there's a promenade dedicated to Wisława #Szymborska, the poet born in these parts. There, you can find some of her poems pinned to a fence, but also a bench dedicated to her. It includes a part of her poem, illustrated with a #cat figure.

"""
(…)
Here someone was and was,
then suddenly disappeared
and now is stubbornly absent.
All the closets were peered into.
The shelves were walked through.
The rug was lifted and examined.
Even the rule about not scattering

A bench with two figures in a park, standing on a circular paved area.

To the left, a figure of a smiling old lady. The joy is visible both in her smile and her eyes. Her face is wrinkled. She's wearing a narrow-brimmed hat and a long mantle, buttoned all the way up except for the top-most button. There, the flaps are bent to sides, and a scarf is visible inside it. She's wearing simple, mid-height shoes. She is leaning on the bench with her left hand, with her right hand bent behind her back.

On the right end of the bench, there's a figure of a cat sitting on two crossed pieces of paper. I will describe it on the other photograph. The lady is looking at it.

On both sides of the bench, there are two large begonia plants. They have big green and yellowish green leaves, and big rose-colored flowers. In the back, there are trees with monochromatic photographs of women of various age. On a central tree, there's a plate carrying a large title of "100/100", and some small text below. Behind them, grass, then another row of trees just in front of a lake. Behind them, some high grass and the lake.
A close-up of the cat figure. It's sitting with its back to the observer, but its head is turned towards them. It seems to have a sad look on its face. The eyes seem closed, ears pointy, there are slight suggestions of whiskers carved into the face. The paws are all in the front of it (i.e. back of the figure). The tail is curved along the back, in clockwise direction. The head and a distinct suggestion of spine on its back are tinted gold.

Below the cat, there are carved three sheets of paper, crossing one another. On them, fragments of the poem cited in the main text. On the left sheet the beginning, on the right sheet the end with name of the author.
Michał Górny

Today's #MusicRecommendation quite laid-back, though the topic is quite important:

Отава Ё - У кошки четыре ноги

Or that the #cat has four legs, and that's the kind of information definitely something worth sharing.

redirect.invidious.io/watch?v=
open.spotify.com/track/3WOWFdY
navigatorrecords.bandcamp.com/

#FolkRock

Michał Górny

One more photo from #Caturday.

Mr Ek in the 87 cm tail-to-paws mode. I'm sure he could manage more if he wanted to.

#cat #CatsOfMastodon

A gray-gingerish tabby cat is lying maximally outstretched on a blue pillow, on a garden swing. It's lying with its top to the observer, with his front paws outstretched, its head slightly turned up, its back paws almost straight and its tail lying straight back. Below the swing, passing tiles in various shades between orange and brown.
Michał Górny

I can't bump #uv in #Gentoo again, because it — once again — switched to requiring the very newest #RustLang compiler, released not even a week ago. Of course, the new release of the compiler breaks some crates. Of course, since everything is pinned in Rust, we now have to go through tremendous effort patching stuff before we'll be able to get the new version in.

But no, Rust is going great. Also, don't forget that it's Python breaking backwards compatibility all the time.

Also, this is why gccrs will never work. What's the advantage of having an alternative compiler when it will need to catch up with the reference implementation within days of release?

github.com/gentoo/gentoo/pull/

I can't bump #uv in #Gentoo again, because it — once again — switched to requiring the very newest #RustLang compiler, released not even a week ago. Of course, the new release of the compiler breaks some crates. Of course, since everything is pinned in Rust, we now have to go through tremendous effort patching stuff before we'll be able to get the new version in.

Show previous comments
Bastardino di pesce

@mgorny

Rust breaking Mozilla stuff is the reason I didn't bump it yet. But at least for this direction there is rustup.

"Every laguage ecosystem repeats every error of their predecessors"

#uv #Gentoo #RustLang #issuecomment

Molly

@mgorny Are they always using the newest features or are the requiring the newest compiler just because? If the later, maybe they can be persuaded to give it a bit of time?

Andreas Grois

@mgorny Crates tracking the latest toolchain is a major annoyance - also for Rust devs that don't develop for PC and are stuck with whatever rustc version the SDK for their target offers. One of my projects is probably still stuck with Rust 1.52...

Imho rustup was a mistake.

Michał Górny

Oh no, someone revived #nose. Seriously, why people can't let the dead rest?!

pypi.org/project/pynose/

#Gentoo #Python

Miro Hrončok :fedora: :python:

@mgorny They apparently also decided to say the project is now MIT-licensed (nose was LGPL) and they fail to understand that's impossible. github.com/mdmintz/pynose/issu

Michał Górny

His Ek-cellency, Mr. Ek can make himself at home in any situation.

"Did you just put the furniture on the window sill to mop the floor, human? Now it's mine. (It always were.)"

#cat #caturday #CatsOfMastodon

Mr. Ek is lying down on a wool pillow, on the window sill. His left paw is raised up and put on the edge of a pouf (that's standing on the window sill as well). He's looking at me as if were stupid. His for is gray-brown and striped. His whiskers are white. Green plants can be seen through the window.
Michał Górny

What's the best thing you can do while waiting for a train? That's patting a #StationCat, of course.

Today, the friendly #cat of Iłowiec station, in Greater Poland.

#CatsOfMastodon

A little cat walking next to a bike stand. It's got a spotted brown-gray fur, with white legs, mane and snout. White whiskers and brown eyes. A brown striped tail is straightened against the vertical pipe. Paws slightly apart, snout partially turned towards the camera.
Go Up