Search
1000 results for “mgorny”
-
Odkryłem ciekawy bug w #ZBar, debugując błąd testów paczki #SegNo (generator #QRCode w Pythonie), na #Gentoo, z #musl libc.
SegNo domyślnie próbuje kodować ciągi znaków jako ISO-8859-1, jeżeli jest to możliwe. ZBar domyślnie próbuje w pierwszej kolejności dekodować je jako Big5. Zazwyczaj wszystko działa.
Weźmy przykładowy ciąg znaków z testów ZBar: "Märchenbücher". Kiedy kodujemy go jako ISO-8859-1, otrzymamy dwie sekwencje kodowe (wysoki bajt, niski bajt): E4 72 dla "är", i FC 63 dla "üc". Ta druga wchodzi na "zdefiniowany przez użytkownika" znak w Big5, i glibc odmawia konwersji. Natomiast musl radośnie to konwertuje. Tak więc, ZBar dekoduje ciąg znaków jako Big5, "M酺chenb𡡷her".
Można tu argumentować, że musl działa niepoprawnie. Ale należy zwrócić uwagę, że pierwsza sekwencja jest poprawnym kodowaniem Big5. Tak więc jeśli skrócimy ciąg do "Märchen", glibc radośnie zdekoduje nasze ISO-8859-1 jako Big5, i da nam "M酺chen". I tak, po wstawieniu takiego ciągu znaków w SegNo, dostaję QRCode, przy pomocy którego mogę odtworzyć ten problem na glibc.
Czy ZBar działa niepoprawnie? Czy może SegNo powinno unikać kodowania ISO-8859-1, i zamiast tego pójść w bezpieczniejsze UTF-8?
https://bugs.gentoo.org/923233
https://github.com/heuer/segno/issues/134
https://github.com/mchehab/zbar/issues/281 -
Fun bug in #ZBar discovered while debugging a #SegNo (#Python #QRCode generator library) test failure on #Gentoo with #musl libc.
SegNo defaults to attempting to encode strings as ISO-8859-1 if possible. ZBar defaults to trying to decode them as Big5 first. Most of the time everything works fine.
Let's take a test string from ZBar: "Märchenbücher". When we encode it as ISO-8859-1, we're going to get two high-byte, low-byte sequences: E4 72 for "är" and FC 63 for "üc". The latter sequence maps to a "user defined" character in Big5, and therefore glibc refuses to convert it. However, musl converts it just fine. As a result, ZBar decodes the string as Big5, to "M酺chenb𡡷her".
You could argue that musl behaves wrong. However, note that the former sequence is valid in Big5. So if you shorten the string to just "Märchen", glibc would happily decode its ISO-8859-1 #encoding as Big5, giving you "M酺chen". And yes, if I put that test string into SegNo, I get a QRCode that reproduces the problem on a glibc system.
Does ZBar behave wrong here? Or perhaps SegNo should avoid ISO-8859-1 altogether, and use safer UTF-8 encoding?
https://bugs.gentoo.org/923233
https://github.com/heuer/segno/issues/134
https://github.com/mchehab/zbar/issues/281 -
W dawnych pojazdach #Pesa umywalki były okej.
W Elfach 2 postanowili zrobić stylowe umywalki, w postaci wąskiej kraty przy samej ścianie. Nie dość, że mycie dłoni przy samej ścianie jest niekomfortowe, to jeszcze trudno nie rozlać na podłogę.
W nowszych wersjach poprawili to. Znaczy, dali wielką umywalkę, tyle że kran został przy samej ścianie, więc nadal nie da się z tego komfortowo korzystać.
A Darty to coś pomiędzy. Tam umywalka jest duża i kran oddalony — na tyle, że przy dużym ciśnieniu wody nie da się nie rozlać na podłogę.
-
W dawnych pojazdach #Pesa umywalki były okej.
W Elfach 2 postanowili zrobić stylowe umywalki, w postaci wąskiej kraty przy samej ścianie. Nie dość, że mycie dłoni przy samej ścianie jest niekomfortowe, to jeszcze trudno nie rozlać na podłogę.
W nowszych wersjach poprawili to. Znaczy, dali wielką umywalkę, tyle że kran został przy samej ścianie, więc nadal nie da się z tego komfortowo korzystać.
A Darty to coś pomiędzy. Tam umywalka jest duża i kran oddalony — na tyle, że przy dużym ciśnieniu wody nie da się nie rozlać na podłogę.
-
W dawnych pojazdach #Pesa umywalki były okej.
W Elfach 2 postanowili zrobić stylowe umywalki, w postaci wąskiej kraty przy samej ścianie. Nie dość, że mycie dłoni przy samej ścianie jest niekomfortowe, to jeszcze trudno nie rozlać na podłogę.
W nowszych wersjach poprawili to. Znaczy, dali wielką umywalkę, tyle że kran został przy samej ścianie, więc nadal nie da się z tego komfortowo korzystać.
A Darty to coś pomiędzy. Tam umywalka jest duża i kran oddalony — na tyle, że przy dużym ciśnieniu wody nie da się nie rozlać na podłogę.
-
W dawnych pojazdach #Pesa umywalki były okej.
W Elfach 2 postanowili zrobić stylowe umywalki, w postaci wąskiej kraty przy samej ścianie. Nie dość, że mycie dłoni przy samej ścianie jest niekomfortowe, to jeszcze trudno nie rozlać na podłogę.
W nowszych wersjach poprawili to. Znaczy, dali wielką umywalkę, tyle że kran został przy samej ścianie, więc nadal nie da się z tego komfortowo korzystać.
A Darty to coś pomiędzy. Tam umywalka jest duża i kran oddalony — na tyle, że przy dużym ciśnieniu wody nie da się nie rozlać na podłogę.
-
W dawnych pojazdach #Pesa umywalki były okej.
W Elfach 2 postanowili zrobić stylowe umywalki, w postaci wąskiej kraty przy samej ścianie. Nie dość, że mycie dłoni przy samej ścianie jest niekomfortowe, to jeszcze trudno nie rozlać na podłogę.
W nowszych wersjach poprawili to. Znaczy, dali wielką umywalkę, tyle że kran został przy samej ścianie, więc nadal nie da się z tego komfortowo korzystać.
A Darty to coś pomiędzy. Tam umywalka jest duża i kran oddalony — na tyle, że przy dużym ciśnieniu wody nie da się nie rozlać na podłogę.
-
Czy wspominałem kiedyś, że xz-utils 5.4.0+ obsługuje dekompresję plików .lz? Obydwa formaty są bardzo zbliżone, więc udało nam się wpakować do #xz wsparcie drugiego formatu przy minimalnych zmianach, i w ten sposób oszczędzić wam konieczności instalowania drugiego programu!
A dlaczego to ważne? Bo oznacza to, że możecie teraz używać lepszego formatu #lzip, nie martwiąc się, że wasi użytkownicy będą musieli instalować lzipa, by wypakować te pliki! Unpacker.eclass w #Gentoo już korzysta z tego dobrodziejstwa.
-
Did I ever mention that since xz-utils 5.4.0+ supports decompressing .lz files? Since the two formats are very similar, we could get #xz to support the other format with minimal overhead, and save you from having to use two tools!
Why is this important? Because it means that you can now use the superior #lzip format without having to worry that your users will have to install lzip to unpack them! Unpacker.eclass #Gentoo is already taking advantage of that.
-
And here's a fun #weir in #Głowno. Photograph from early February.
https://www.openstreetmap.org/?mlat=51.96427&mlon=19.71861#map=15/51.96427/19.71861
-
#TIL, że słowo "piznąć" w Godce nie jest wulgarne.
-
-
A long time ago, when I've used the #Opera browser (the real one), I've discovered mouse #gestures. Even though I've only used the basic ones like back / forward / reload / close tab, I've found them brilliant. To this day, I can't comprehend why not only modern browsers rejected this feature, but also why it didn't become widespread across desktop GUIs.
But then, today the peak application #UX is a website packed in a vulnerable low quality embedded browser. And designers are blindly trying to copy bad mobile designs into desktop PC applications, with no consideration how ill fit they are.
-
A long time ago, when I've used the #Opera browser (the real one), I've discovered mouse #gestures. Even though I've only used the basic ones like back / forward / reload / close tab, I've found them brilliant. To this day, I can't comprehend why not only modern browsers rejected this feature, but also why it didn't become widespread across desktop GUIs.
But then, today the peak application #UX is a website packed in a vulnerable low quality embedded browser. And designers are blindly trying to copy bad mobile designs into desktop PC applications, with no consideration how ill fit they are.
-
A long time ago, when I've used the #Opera browser (the real one), I've discovered mouse #gestures. Even though I've only used the basic ones like back / forward / reload / close tab, I've found them brilliant. To this day, I can't comprehend why not only modern browsers rejected this feature, but also why it didn't become widespread across desktop GUIs.
But then, today the peak application #UX is a website packed in a vulnerable low quality embedded browser. And designers are blindly trying to copy bad mobile designs into desktop PC applications, with no consideration how ill fit they are.
-
A long time ago, when I've used the #Opera browser (the real one), I've discovered mouse #gestures. Even though I've only used the basic ones like back / forward / reload / close tab, I've found them brilliant. To this day, I can't comprehend why not only modern browsers rejected this feature, but also why it didn't become widespread across desktop GUIs.
But then, today the peak application #UX is a website packed in a vulnerable low quality embedded browser. And designers are blindly trying to copy bad mobile designs into desktop PC applications, with no consideration how ill fit they are.
-
A long time ago, when I've used the #Opera browser (the real one), I've discovered mouse #gestures. Even though I've only used the basic ones like back / forward / reload / close tab, I've found them brilliant. To this day, I can't comprehend why not only modern browsers rejected this feature, but also why it didn't become widespread across desktop GUIs.
But then, today the peak application #UX is a website packed in a vulnerable low quality embedded browser. And designers are blindly trying to copy bad mobile designs into desktop PC applications, with no consideration how ill fit they are.
-
So, remember how all the cool kids dumped #Sphinx and went for the shiny #MkDocs thing? And then used the shiny Material for MkDocs theme?
Well, apparently MkDocs 1.x is dead, and MkDocs 2.0 is coming with no support for plugins, incompatible theming system, closed contribution model and unclear licensing.
So which hype train are the cool kids jumping to these days?
https://squidfunk.github.io/mkdocs-material/blog/2026/02/18/mkdocs-2.0/
-
So the correct answer is 5 rounding directions, though the last one was added in #C23:
FP_INT_UPWARD / ceil()
FP_INT_DOWNWARD / floor()
FP_INT_TOWARDZERO / trunc()
FP_INT_TONEARESTFROMZERO / round()
FP_INT_TONEAREST / roundeven() (C23) -
#Superpower wish list: an inexhaustible portable source of toilet paper that I don't have to restock.
-
Let's talk about #diacritics in #Polish.
There are 9 letters with diacritics. These are:
ą, ć, ę, ł, ń, ó, ś, ź, ż.
They are generally transliterated into ASCII by losing the diacritics, and replacing with the resulting basic Latin letters:
a, c, e, l, n, o, s, z, z.
In lexical ordering, they are placed in this order after the respective basic Latin, i.e. the Polish alphabet is:
a, ą, b, c, ć, …, z, ź, ż.
As you can see, there are actually two diacritical variants of "z". In the commonly used "programmer's" Polish keyboard layout, all characters except for "ź" are obtained by combining AltGr with the Latin letter — "ź" is moved to the next key, "x". That is:
AltGr + a → ą
AltGr + c → ć
…
AltGr + x → ź
AltGr + z → żNow, many on-screen keyboards actually don't follow that design and place both "ź" and "ż" under "z". I personally find this annoying, and for my phone, I've specifically chosen a keyboard that placed "ź" under "x".
Another curious problem is that losing the diacritics sometimes causes collision with another word. Probably the most famous example is the sentence:
"Łaski mi nie robisz" → "It's not like you are doing me any favors"
"Laski mi nie robisz" → "You're not making me a blowjob"Some people have been trying to do better than plain ASCII transliteration. I've mentioned before that some "Western European" layouts include "ó", so you may use that. Back in the day, a certain Polish version of Heroes of Might and Magic II (I think) used "t" in place of "ł". Then, you could try combining some characters on a typewriter (here I recommend playing with @mwichary 's Typewriter simulator: https://shifthappens.site/typewriter/).
Oh, and there's also the possibility of writing "ƶ" instead of "ż" (especially in uppercase, where the dot might make the letter undesirably tall), though some people apparently write "ƶ" in place of "z" instead (to make it distinctive from "2").
Phonetics next. I'm not going to go over the whole Polish phonetics, because I have neither the space nor the skills to do that. But let's go over the diacritical letters and consider their phonetic equivalents.
ą, ę → nasal o, e
They are phonetically similar to "om", "on" and "em", "en" respectively, sometimes leading to spelling errors. You could have words such as "romb" /rɔ̃mp/ (= rhombus) and "rąb" /rɔ̃mp/ (= chop!).
ć, ń, ś, ź → apparently these are palatal versions of c, n, s, z, whatever that means (I don't think these sounds are possible in English)
They are phonetically similar to some pronunciations of "cI", "ni", "si", "zi" (but not all, enjoy good spelling system). For example, the "ci" in "cień" /ʨ̑ɛ̇̃ɲ/ (= shadow) is pronounced the same as "ć" in "ćma" /ʨ̑ma/ (= moth), but "ci" in "cis" /ʨ̑is/ (= yew) is more like "ć" + explicit "i", and then you have "cirrus" with hard "c" and "i" /ˈt͡sir.rus/.
ł → well, it's the Polish /w/ ("w" is the Polish /v/)
Sometimes "u" is actually read as "ł", e.g. in the onomatopoeia "miau" (= meow). In some cases of Internet slang, people are actually replacing "ł" to "u"… to look cuter, I guess? Then there's "miał" /mjaw/ (= powder, also past form of "to have").
ó → it's actually the same as "u" (it's called "u closed")
Apparently, historically it was a long "o", but eventually transformed into plain "u". It's another spelling nightmare for school pupils, seemingly randomly spread between words such as "bród" /brut/ (= ford) and "brud" /brut/ (= filth).
ż → something like the "si" in "vision"
For funs, in some words this is also written as a digraph "rz". Again, pupils can enjoy distinguishing between "żyć" /ʐɨt͡ɕ/ (= to live) and "rzyć" /ʐɨt͡ɕ/ (= arse).
Well, there's much more where that came from (say, "ch" vs. "h"), but why am I talking about this particular aspect of diacritics? Because a curious (but horrible, just don't do that) idea of transliterating diacritical letters is to replace them with their phonetic equivalents, or approximations. So, instead of:
Zażółć gęślą jaźń
one could write:
Zarzuuci gensilom jazini
Except that nobody could read this properly, and also it just occurred to me that I've mapped both "ł" and "ó" into "u". Well, let's pretend you didn't see that.
https://en.wikipedia.org/wiki/Polish_alphabet#Letters:_aspect,_name,_value
-
-
-
Zawsze mnie będzie fascynowało, że producenta (a może kupującego? Nie wiem, kto odpowiada za naklejki) pojazdu szynowego za kilka milionów nie stać na profesjonalne tłumaczenie.
EN63H-002.
Wyjaśnienie: angielska wersja mówi mniej-więcej, żeby nie "zamykać" drzwi na klucz/zamek, i reszta zdania też średnio gramatyczna.
-
Ciekawostka: w języku angielskim, nazwy kierunków świata są również częściowo powiązane z porami dnia, ale nie w tak oczywisty sposób, jak w polskim.
Najwyraźniej "west", czyli zachód, ma wspólne korzenie ze słowem oznaczającym "wieczór", natomiast "east", czyli wschód ze słowem oznaczającym "świt".
"South", czyli południe, miałoby być powiązane ze "słońcem" (tu już łatwiej dostrzec podobieństwo do "sun"), a "połnóc" wywodziłaby się z "po lewej stronie od wchodzącego słońca".
-
A wiecie, że angielskie imiona Jacob i James mają wspólną etymologię? Oba odpowiadają polskiemu Jakubowi.
Pierwsze wywodzi się z wcześniejszej łacińskiej formy "Iacobus", a drugie ze zmodyfikowanej formy "Iacomus" w potocznej łacinie. Zaczęło się od podmiany jednej litery.
https://en.m.wiktionary.org/wiki/Jacob
https://en.m.wiktionary.org/wiki/James -
Tej, macie pomysł, jak po angielsku napisać, że "ludziom się w dupach poprzewracało"?
-
Anglojęzyczna ciekawostka: "twain" to nie "pociąg" w wymowie Elmera Fudda, lecz archaiczna forma "two", czyli dwójki. Może oznaczać też "parę" (w sensie dwójki, też bez związku z lokomotywami).
"""
Słowo przetrwało rozpad rodzajów w języku średnioangielskim i przetrwało jako alternatywna forma dwójki, zwłaszcza kiedy używana jest po rzeczowniku. Jej utrwaleniu we współczesnych czasach pomogło użycie w "Biblii króla Jakuba", ceremonii małżeństwa, poezji (często używana dla rymu) i w mowie, wówczas, gdy konieczne jest uniknięcie pomyłki z "to" albo "too".
"""