Logs: liberachat/#haskell
| 2025-11-21 03:42:21 | <monochrom> | I'm over-philosophizing and over-economicsizing it, but scarce resource and simplifying things are highly correlated! :) |
| 2025-11-21 03:42:42 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 03:43:39 | → | peterbecich joins (~Thunderbi@172.222.148.214) |
| 2025-11-21 03:43:54 | <monochrom> | But, say, very fantasizingly, if one day some big shot started using Curry for GPUs, I'm sure single-precision float would be added right away. :) |
| 2025-11-21 03:44:21 | × | trickard quits (~trickard@cpe-90-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-21 03:44:25 | <monochrom> | So it's like "no one needs anything else, let's chill". |
| 2025-11-21 03:45:42 | <EvanR> | maybe a compiler flag which changes the backend from double to float |
| 2025-11-21 03:46:01 | <EvanR> | choose your own semantics |
| 2025-11-21 03:46:28 | <monochrom> | heh |
| 2025-11-21 03:46:52 | → | trickard joins (~trickard@cpe-90-98-47-163.wireline.com.au) |
| 2025-11-21 03:47:28 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2025-11-21 03:47:28 | <monochrom> | You are evil. The last thing we need is an ecosystem that fulfills the prophecy "floating point semantics is unpredictable". |
| 2025-11-21 03:48:57 | × | marlino quits (~marlino@96-8-193-95.block0.gvtc.com) (Quit: WeeChat 4.7.1) |
| 2025-11-21 03:49:59 | → | marlino joins (~marlino@96-8-193-95.block0.gvtc.com) |
| 2025-11-21 03:52:17 | × | trickard quits (~trickard@cpe-90-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-21 03:55:26 | <EvanR> | we don't need to limit our evil choices to floating point |
| 2025-11-21 03:55:52 | <EvanR> | select what integers mean, select what function application means, select what defining equations means |
| 2025-11-21 03:57:42 | → | trickard_ joins (~trickard@cpe-90-98-47-163.wireline.com.au) |
| 2025-11-21 03:58:15 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 04:03:04 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2025-11-21 04:05:43 | × | jmcantrell quits (~weechat@user/jmcantrell) (Ping timeout: 264 seconds) |
| 2025-11-21 04:06:49 | <davean> | EvanR: we do select what integer means every time we compile Haskell. |
| 2025-11-21 04:08:19 | <EvanR> | ummmmmmmmmmm |
| 2025-11-21 04:08:39 | <EvanR> | GMP and the other implementation of Integer ought to morally result in the same semantics? |
| 2025-11-21 04:09:02 | <EvanR> | for all practical purposes a platonic ideal |
| 2025-11-21 04:09:49 | <haskellbridge> | <Zemyla> We need a non-GMP Integer implementation that uses ByteArrays like GMP. |
| 2025-11-21 04:13:03 | <davean> | EvanR: morally, sure |
| 2025-11-21 04:13:27 | <davean> | IIRC they had some variation on how they errored with improper operations |
| 2025-11-21 04:13:40 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 04:15:20 | <EvanR> | that's the incentive to wrote error free code |
| 2025-11-21 04:15:56 | × | chromoblob quits (~chromoblo@user/chromob1ot1c) (Read error: Connection reset by peer) |
| 2025-11-21 04:16:27 | <davean> | Tell that to Vincent |
| 2025-11-21 04:17:08 | → | chromoblob joins (~chromoblo@user/chromob1ot1c) |
| 2025-11-21 04:18:10 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
| 2025-11-21 04:20:12 | → | werneta joins (~werneta@71.83.160.242) |
| 2025-11-21 04:20:44 | → | Googulator46 joins (~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu) |
| 2025-11-21 04:20:45 | × | Googulator96 quits (~Googulato@2a01-036d-0106-0231-4475-80b4-5cdc-43d6.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-11-21 04:22:39 | <EvanR> | Divide by zero -- You can't divide by zero on a computer. Some kind of math thing. Don't worry too much about understanding why. Just don't do it. (EXAPUNKS zine 1 page 12) |
| 2025-11-21 04:24:01 | <fgarcia> | :D |
| 2025-11-21 04:27:29 | <chromoblob> | AArch64 gives you 0 as result of division by zero. i also wanted to make it like this in my language (because dividing 0 by anything gives 0, so 0 / 0 should be 0 too, and since x / 0 for x ≠ 0 is undefined, might as well just check for dividend = 0, regarding other cases as UB) |
| 2025-11-21 04:27:47 | <chromoblob> | i mean, in integer division |
| 2025-11-21 04:28:52 | <haskellbridge> | <Zemyla> x / 0 should be 0 if division is total, because 0 is the pseudoinverse of zero. The pseudoinverse of x is y such that xyx = x and yxy = y. |
| 2025-11-21 04:28:59 | <EvanR> | it is "interesting" that you would mix a nonsense result on one hand with undefined behavior on the other |
| 2025-11-21 04:29:01 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 04:29:14 | → | Dhark8 joins (~Shark8@c-174-56-102-109.hsd1.nm.comcast.net) |
| 2025-11-21 04:29:25 | <EvanR> | if you are going to make it total make it total really and define all behavior |
| 2025-11-21 04:29:28 | <jreicher> | EvanR what's the nonsense result? |
| 2025-11-21 04:29:33 | <EvanR> | 0 / 0 = 0 |
| 2025-11-21 04:29:39 | <geekosaur> | Zemyla, I actually started work on that (adding bsdmp as a backend), but decided it would be easier to port its multiplication optimizations than to work around its violation of ghc bignum invariants |
| 2025-11-21 04:29:57 | <jreicher> | EvanR what should it be? (I'm not saying it should be 0; I'm just curious what you think) |
| 2025-11-21 04:30:06 | <geekosaur> | haven't really had time to work on it though |
| 2025-11-21 04:30:17 | <EvanR> | it should clearly be 7 because this one time that would make sense |
| 2025-11-21 04:30:22 | <chromoblob> | <s>0.5</s> |
| 2025-11-21 04:30:27 | <EvanR> | lol |
| 2025-11-21 04:30:51 | <fgarcia> | oh, somewhere i have written 0.0 / 0.0 because i wanted Not a Number as a result |
| 2025-11-21 04:31:04 | <jreicher> | But it is a number. You just don't know which one. :p |
| 2025-11-21 04:31:18 | <EvanR> | that be the realm of float "logic" |
| 2025-11-21 04:31:50 | <EvanR> | they should have made a signed NaN in case you divide negative zero by zero |
| 2025-11-21 04:31:57 | × | marlino quits (~marlino@96-8-193-95.block0.gvtc.com) (Quit: WeeChat 4.7.1) |
| 2025-11-21 04:32:09 | × | Shark8 quits (~Shark8@c-174-56-102-109.hsd1.nm.comcast.net) (Ping timeout: 244 seconds) |
| 2025-11-21 04:32:40 | <jreicher> | Signed zero in the first place should not be a thing. :( |
| 2025-11-21 04:32:45 | <EvanR> | lol |
| 2025-11-21 04:33:40 | <EvanR> | for numbers of the form mantissa times 2^e signed zero isn't a thing xD |
| 2025-11-21 04:33:47 | <EvanR> | or any kind of zero for that matter |
| 2025-11-21 04:33:52 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2025-11-21 04:34:50 | <EvanR> | whatever you need to do do it in the range 1 <= x < 2 |
| 2025-11-21 04:34:59 | <fgarcia> | i am not smart. would they have thought it would be somehow useful for limits approaching from >0 and <0 ? |
| 2025-11-21 04:36:40 | <geekosaur> | actually it was bsdnt, which seems to have disappeared |
| 2025-11-21 04:36:42 | <EvanR> | a negative zero happens when a computation would be negative but too small to represent |
| 2025-11-21 04:37:05 | × | werneta quits (~werneta@71.83.160.242) (Quit: Lost terminal) |
| 2025-11-21 04:37:11 | <geekosaur> | as apparently has libtommath which was my first idea (then found something pointing to bsdnt instead) |
| 2025-11-21 04:37:11 | <EvanR> | so you end up with partial information |
| 2025-11-21 04:37:54 | <geekosaur> | fgarcia, yes, and it happens when you're working with trig functions in a plane |
| 2025-11-21 04:37:55 | <EvanR> | by the same logic negative NaN accomplishes the same thing |
| 2025-11-21 04:38:05 | → | Pseudonym joins (~Pseudonym@194-223-46-47.tpgi.com.au) |
| 2025-11-21 04:38:09 | <geekosaur> | losing the "negative" switches which quadrant you're in |
| 2025-11-21 04:38:26 | <fgarcia> | i think wikipedia has some writing about this |
| 2025-11-21 04:38:51 | <fgarcia> | "It is claimed that the inclusion of signed zero in IEEE 754 makes it much easier to achieve numerical accuracy in some critical problems, in particular when computing with complex elementary functions. On the other hand, the concept of signed zero runs contrary to the usual assumption made in mathematics that negative zero is the same value as zero. Representations that allow negative zero can be |
| 2025-11-21 04:38:53 | <fgarcia> | a source of errors in programs, if software developers do not take into account that while the two zero representations behave as equal under numeric comparisons, they yield different results in some operations." |
| 2025-11-21 04:40:02 | <jreicher> | That's really interesting. I object to it on mathematically purist grounds, which I'm only half-serious about, but that actually looks like it matters. |
| 2025-11-21 04:40:04 | <chromoblob> | you should never test "real" numbers for equality, it's not meaningful in computers |
| 2025-11-21 04:40:13 | <EvanR> | attempting to use math on a computer is a source of errors in programs. avoidance recommended |
| 2025-11-21 04:40:33 | <EvanR> | chromoblob, this is false for floats, and is the correct thing to do in some cases |
| 2025-11-21 04:40:47 | <EvanR> | exact real numbers, yes |
| 2025-11-21 04:44:30 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 04:48:39 | × | Pseudonym quits (~Pseudonym@194-223-46-47.tpgi.com.au) (Quit: Leaving) |
| 2025-11-21 04:49:06 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2025-11-21 04:50:36 | → | democritus joins (~democritu@2600:1700:ba69:10:ad1b:59dc:c894:12ec) |
| 2025-11-21 04:53:31 | × | vardhan quits (~vardhan@122.172.85.147) (Ping timeout: 246 seconds) |
| 2025-11-21 04:55:06 | trickard_ | is now known as trickard |
| 2025-11-21 05:00:03 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 05:04:32 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-11-21 05:07:03 | → | vardhan joins (~vardhan@122.172.85.147) |
| 2025-11-21 05:15:43 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 05:20:19 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds) |
| 2025-11-21 05:22:09 | <monochrom> | EvanR: Haha define what function application means. I like that. I propose 5 choices: call by value left-to-right, call by value right-to-left, call by need (lazy), call by name, TeX-like macro |
| 2025-11-21 05:23:19 | <monochrom> | (Difference between lazy and by name: lazy memoizes, by-name doesn't.) |
| 2025-11-21 05:24:18 | <monochrom> | (Difference between by-name and macro expansion: The latter suffers variable capture issues!) |
| 2025-11-21 05:31:06 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-21 05:31:15 | → | weary-traveler joins (~user@user/user363627) |
All times are in UTC.