HackerTrans
TopNewTrendsCommentsPastAskShowJobs

listeria

no profile record

comments

listeria
·قبل 11 يومًا·discuss
killing a process which is using SQLite shouldn't corrupt the database, same as pulling the plug.
listeria
·قبل 15 يومًا·discuss
When I first found out about bit fields in C, I was left wondering what the order of bits was in a byte, eventually I convinced myself it doesn't matter, since the byte is the smallest I/O unit, and lived with the fact that casting between bitfields and bytes was UB (or unspecified, I can't remember), and as such, was another thing I wasn't suppossed to do when writing C.

All this to say that Zig just keeps cleaning up and giving well-defined semantics to warts I learned to live with in C.
listeria
·الشهر الماضي·discuss
(1) fails for negative numbers

(2) fails for (x % 32 in [1, 2]) due to UB

(3) fails for x == 2

(4) crashes for x == 0

(5) is the same polynomial, only factorized

(6) always returns 0

(7) is the same polynomail reordered

But this works for any value of x:

  x<2==2-x
or for something shorter:

  x<3&x>0
but that's not bery obfuscated
listeria
·قبل شهرين·discuss
This reminds me of two excellent articles[1][2] by Paul Khuong, in which he talks about using size-specialized binary search for power-of-two sized arrays (special-casing the first iteration for other sizes).

He uses conditional moves and defines the number of iterations in advance to ellide the often mispredicted branch, and in the second article goes on to fix cache aliasing issues for large vectors using ternary search.

[1]: https://pvk.ca/Blog/2012/07/03/binary-search-star-eliminates...

[2]: https://pvk.ca/Blog/2012/07/30/binary-search-is-a-pathologic...
listeria
·قبل 4 أشهر·discuss
Apparently there was some talk a few years ago about adding the project to the python standard library[1] and the maintainer seems really[2] interested[3] in that.

But I don't think the standard library maintainers would want to incorporate it considering the way in which the relicensing took place, the controversy, and the implications on software licences in general. So his motivations for the license change seem moot. I certainly wouldn't touch it with a 10-foot pole.

[1]: https://github.com/chardet/chardet/issues/36#issuecomment-76... [2]: https://github.com/chardet/chardet/issues/327#issuecomment-4... [3]: https://github.com/chardet/chardet/issues/327#issuecomment-4...
listeria
·قبل 4 أشهر·discuss
Have you tried bringing it up with HR? If you explain why you try to avoid her while she's wearing them, they might ask her to stop wearing them to work.

Meta's own guidelines[1] say that you should "Power off in private spaces."

You can't always tell if you're being recorded since they can be tampered with to disable the LED. And from what I gather, the LED only serves to indicate of video recording, and not necessarily audio.

[1]: https://www.meta.com/ai-glasses/privacy/
listeria
·قبل 4 أشهر·discuss
But the definition of economically active differs between the two: Finland includes people from ages 15-89, while in Spain you need to be 16 or older. And judging from what I read the rise in unemployment in Finland is attributed to more people entering the workforce.
listeria
·قبل 5 أشهر·discuss
If you look at the solar radiation spectrum chart in the section "Why isn’t the sky violet?", you can see that sunlight is not evenly distributed along the visible spectrum--it emit more blue than red, and at sea level it's closer to evenly distributed. So the light that reaches the clouds is still mostly white light.
listeria
·قبل 5 أشهر·discuss
Global aliases are a zsh feature and not avaliable in bash. So if you want:

  openssl ,v
to expand to...

  openssl --version
readline seems like the way to go.

Then again most of the examples OP gave are usually available as short options, and aliasing ,s to sudo is certainly possible. So the only one which makes sense to me is ,,=$. But it's probably not worth the trouble to my muscle memory.
listeria
·قبل 6 أشهر·discuss
and risk having them interpret it as a declaration of war?
listeria
·قبل 6 أشهر·discuss
may I introduce you to the nodiscard attribute[1]?

  enum (class)? [[nodiscard]] Error {
    Ok,
    NoMem,
    ...
  };
[1]: https://en.cppreference.com/w/cpp/language/attributes/nodisc...
listeria
·قبل 6 أشهر·discuss
Firefox will read it if it exists[1]. You could use the /usr/lib/firefox/distribution directory (or whatever the installation directory may be), but that may be overwritten by an update.

There doesn't seem to be any way to set per-user group policies, so unless you're installing firefox in a user-controlled directory, it will require elevated privileges.

[1]: https://support.mozilla.org/en-US/kb/customizing-firefox-usi...
listeria
·قبل 7 أشهر·discuss
> The books were translated years ago anyway.

Translated books lack the nuance or tone of the originals, which you would be missing out of, and most of the time you don't even realise.
listeria
·قبل 8 أشهر·discuss


  sh: 1: [[: not found
listeria
·قبل 8 أشهر·discuss
That's all well and good, except the README clearly states:

> rústico (Spanish for Rust)

which is plain wrong.
listeria
·قبل 8 أشهر·discuss
I was immediately put off by the Spanish version when I saw it was called "rústico", which does not translate to rust at all, it means rustic. The Spanish word for rust would be "óxido".
listeria
·قبل 8 أشهر·discuss
you can see at the top of the page it says:

  STATUS AS AT : 30-10-2025 09:16:00 EDT
and the date of the signature says 25 Oct 2025.
listeria
·قبل 8 أشهر·discuss
full list of signatories: https://treaties.un.org/Pages/ViewDetails.aspx?src=TREATY&mt...
listeria
·قبل 8 أشهر·discuss
in the b=2 case, you get:

  1 / 1 = 1 = b - 1
  1 % 1 = 0 = b - 2
they are the other way around, see for example the b=3 case:

  21 (base 3) = 7
  12 (base 3) = 5
  7 / 5 = 1 = b - 2
  7 % 5 = 2 = b - 1
listeria
·قبل 9 أشهر·discuss
Maybe it should be called "lest"? As in a less/most replacement written in rust. Although it does divert from the theme of more/less/most.