Is paru still a reasonable choice of #AUR helper for #archlinux ?
Before I used yay and trizen, both of which became unmaintained. I just noticed that paru hasn't been updated in over 1 year...
Is paru still a reasonable choice of #AUR helper for #archlinux ?
Before I used yay and trizen, both of which became unmaintained. I just noticed that paru hasn't been updated in over 1 year...
@zelphirkaltstahl It works with standard IEEE 754 floats, yes.
The problem with doing (a - b) is that you might get 1000.0 or you might get 0.001. Depending on the magnitude of a and b, both might represent an expected rounding error in the least significant bits of a float.
A codebase I'm working on had arbitrary epsilon constants: 1e-6 for floats and 5e-15 for doubles. Such absolute thresholds are only reasonable for values in a narrow range (for example 0.1..10.0).
@Maryam It compares all 32 bits of the floats (there's no masking), but it allows the difference to be up to 4 ULPs = 2 least significant bits.
For more information, consult your local encyclopedia:
https://en.wikipedia.org/wiki/Single-precision_floating-point_format
Of course this also works with double and long double.
My production version of almost_equals() is templated using C++20 concepts and the nicer "auto" syntax:
bool almost_equals(std::floating_point auto a, std::floating_point auto b) {
auto abits = to_bits(a);
auto bbits = to_bits(a);
return distance(abits, bibits) < 4;
}
@timlocke Oops! Somehow I managed to forget the beginning of your post by the time I started replying to it. I clearly need some rest 😞
The question on my mind was: does this give the correct distance even around the boundary of an exponent bump?
And yes: mantissa and exponent are arranged in such a way that adding 1 to the binary form always yields the next float:
>>> import struct
>>> to_float = lambda i: unpack(">f", i.to_bytes(4))[0]
>>> to_float(0x3FFFFFFF)
1.9999998807907104
>>> to_float(0x40000000)
2.0
>>> to_float(0x40000001)
2.000000238418579
I came across a clever method for approximate float comparison which exploits their binary representation:
bool almost_equal(float a, float b) {
uint32_t abits = to_bits(a);
uint32_t bbits = to_bits(b);
return abits - bbits < 4;
}
Where 4 is the tolerance in "units in the last place".
to_bits() isn't a simple bit_cast. It also does some magic with the sign bit. But for now let's only consider positive floats...
@globalc Good catch!
These are my photos of the event:
https://photos.app.goo.gl/fwFeWidp2yTuzYXW8
@timlocke @witewulf @320x200 With today's wisdom, it's kind of horrifying to think the number of vulnerabilities we were exposing to dialup users 😂
Were you also part of FidoNet? AmigaNet? Using Trapdoor?
Duncan: "How many robots did you destroy?"
何体のロボットを破壊した?
nan-tai no robotto o hakai shita?
This time, instead of 何人 (nan-nin) = how many people, Duncan uses 何体 (nan-tai) = how many bodies.
I would have expected 何台 (nan-dai, how many machines), but I guess dead robots are bodies too 🙂
The butler politely replies that "Robot Laws forbid me from harming humans":
ロボット法により
人間を傷つけることは
禁じられています
robotto hou ni yori
ningen o kizutsukeru koto wa
kinji rarete imasu
In this scene of #PLUTO, the blind musician Duncan asks his robot butler:
何人殺した?
nan-nin koroshita?
How many people did you kill?
@witewulf @320x200 I *loved* hearing the handshake sound of users connecting to my modems, and most of the time I was able to guess the CONNECT string from the sound.
@witewulf @320x200 More screenshot of my DLG Pro board:
https://www.codewiz.org/wikiedit/Pictures/amiga/SystemShockBBS/Screenshots
#amiga #bbs #fidonet #asciiart
@witewulf @320x200 Here's the only Amiga ASCII art I ever made. It's the banner of my BBS running on an Amiga 4000.
Unfortunately, the font I was using with Term at the time is (probably) Topaz 11, which lacks the "cohesive" look of the old Topaz 8.
^--- look at this, @nickmofo!
@realhackhistory @320x200 Amazing!
Litterae Finis by Trauma (2012)
https://solhsa.com/litterae/
Perhaps not the most visually impressive demo with a title in Latin, but the soundtrack by !Cube is just fantastic.
If you don't like ASCII art, you can still enjoy it with your eyes closed. And if you also don't like #synth sound... well, then perhaps the #demoscene isn't for you! 😜
@jherazob Here it says that the #manga is worth reading before watching the #anime:
https://www.cbr.com/the-apothecary-diaries-manga-worth-reading-before-anime-arrives/
🇮🇹 → 🇺🇸 → 🇯🇵 → 🇹🇭 → 🚀Nomadic Linux developer, currently in Los Angeles.#linux #rust #anime #spacex #cycling #travel #vegan #retrocomputing #amiga #fedi22𝑨𝑴𝑰𝑮𝑨 :amiga:
Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.
All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.