Newest at the top
2025-10-06 06:29:53 +0200 | <Leary> | dcpagan: Just write `recip` or `invert` or `inverse` and be done with it. It doesn't matter if it isn't standard if it can be understood at a glance. |
2025-10-06 06:28:48 +0200 | <jreicher> | Mathematicians don't usually write parsers. And I'm not joking; I think that's the real difference in what you're doing. Means you have literals for the elements. |
2025-10-06 06:27:20 +0200 | <dcpagan> | I have Serge Lang's Algebra with me right now, and even he uses (^-1). |
2025-10-06 06:26:44 +0200 | <jreicher> | When you first asked your question I grabbed my copy of Concrete Mathematics. I thought if anyone was going to be fussy about notation, Knuth would be... |
2025-10-06 06:26:17 +0200 | <dcpagan> | Which is why the lack of a sane unary prefix for the reciprocal so vexes me. |
2025-10-06 06:26:09 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-10-06 06:25:48 +0200 | <EvanR> | dennis ritchie's phd thesis? then it's canon |
2025-10-06 06:25:39 +0200 | <dcpagan> | I deliberatively took out the minus and divide operators in my monad to base it on abstract algebraic terms. |
2025-10-06 06:24:38 +0200 | <dcpagan> | That looks like a partial obelus. |
2025-10-06 06:23:50 +0200 | <jreicher> | https://en.wikipedia.org/wiki/Monus |
2025-10-06 06:23:23 +0200 | <dcpagan> | What's a monus? |
2025-10-06 06:23:14 +0200 | <jreicher> | EvanR: yeah I've come across monus with Church numerals. |
2025-10-06 06:23:11 +0200 | <dcpagan> | Divide is the right inverse partial group operator of the field. |
2025-10-06 06:22:46 +0200 | <dcpagan> | Algebraically speaking, the minus operator is the right inverse additive group operator. |
2025-10-06 06:22:20 +0200 | <dcpagan> | But I primarily wrote this sandbox to grok how delimited continuations manipulate computations by designing a simple field monad to structure those computations. |
2025-10-06 06:22:14 +0200 | <EvanR> | monus |
2025-10-06 06:22:06 +0200 | <EvanR> | jreicher, there exists abstraction "monoid with minus operation" |
2025-10-06 06:21:11 +0200 | <dcpagan> | Omitting units would require parsing 0's and 1's into their respective units, and reformatting the format to an histomorphism to peer deeper into the recursive structure. |
2025-10-06 06:19:56 +0200 | <jreicher> | I quite like your idea of /2, /3, etc. It's got some solid parallels. 0 is the additive identity, and we omit zero in 0-3, and omit both the zero and the operator in 3-0. 1 is the multiplicative identity, and if we omit both the 1 and the operator in 3/1, it's a solid parallel to omit the number in /3 |
2025-10-06 06:18:55 +0200 | <dcpagan> | My delimited continuation program prints this: "(* (* 3 /2) (* 5 /2))" |
2025-10-06 06:18:33 +0200 | <dcpagan> | And I need to format these field expressions to see how delimited continuations manipulate expressions. |
2025-10-06 06:18:00 +0200 | trickard_ | (~trickard@cpe-49-98-47-163.wireline.com.au) |
2025-10-06 06:17:47 +0200 | trickard_ | (~trickard@cpe-49-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
2025-10-06 06:15:12 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-10-06 06:14:59 +0200 | <dcpagan> | Prefix unary notations parse and format nicely |
2025-10-06 06:14:43 +0200 | <dcpagan> | Yes, I am. |
2025-10-06 06:13:24 +0200 | <jreicher> | Right? |
2025-10-06 06:13:17 +0200 | <jreicher> | That even more convinces me you're not after an operator; you're after a syntactically nice literal notation for certain elements |
2025-10-06 06:10:59 +0200 | <dcpagan> | Here is my sandbox: https://github.com/DCPagan/haskell-sandbox.git |
2025-10-06 06:10:54 +0200 | <dcpagan> | I want an elegant notation standard for formatting the reciprocal. |
2025-10-06 06:10:52 +0200 | jmcantrell | (~weechat@user/jmcantrell) (Ping timeout: 246 seconds) |
2025-10-06 06:10:40 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-10-06 06:10:31 +0200 | <dcpagan> | The context of this question on notation is that I'm playing around with delimited continuations, and I had to program a monad to structure field operations. |
2025-10-06 06:07:28 +0200 | <jreicher> | dcpagan: you've really got me thinking about negation now. I actually don't think it's an operator at all. It's an angle. |
2025-10-06 05:59:40 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
2025-10-06 05:59:07 +0200 | <jreicher> | I'm not sure it's much worse than moving from multiplication as repeated addition (which requires one number to be a positive integer) to the situation where neither of the numbers are positive integers. Multiplication becomes detached from the intuitive meaning at that point and is just an algebraic operation. |
2025-10-06 05:56:48 +0200 | <EvanR> | like average number of 2.2 kids |
2025-10-06 05:56:11 +0200 | <EvanR> | that makes no sense |
2025-10-06 05:55:17 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-10-06 05:54:31 +0200 | <jreicher> | EvanR: I think it amounts to the same if you allow for a fractional number of applications of an operator (e.g. fractional derivative generalises -1 as the antiderivative) |
2025-10-06 05:51:51 +0200 | <EvanR> | and it doesn't just mean reciprocal it's inverse |
2025-10-06 05:51:20 +0200 | dostoevsky | (~dostoevsk@user/dostoevsky) (Quit: Leaving) |
2025-10-06 05:51:17 +0200 | karenw | (~karenw@user/karenw) (Ping timeout: 260 seconds) |
2025-10-06 05:50:20 +0200 | EvanR_ | EvanR |
2025-10-06 05:50:14 +0200 | <EvanR_> | though it is consistent with exponents e.g. 3.14 * 10^-1 |
2025-10-06 05:49:56 +0200 | <EvanR_> | dcpagan, postfix -1 is not necessarily an "exponent" |
2025-10-06 05:49:10 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
2025-10-06 05:48:10 +0200 | peterbecich | (~Thunderbi@47-149-198-150.fdr01.slbh.ca.ip.frontiernet.net) peterbecich |
2025-10-06 05:45:45 +0200 | <fgidim> | i think haskell kind of supports this with sections. don't know if it is readable though. (1/) |
2025-10-06 05:45:31 +0200 | <jreicher> | Square root kind of is through omission of the number, but not even squaring is a unary operator |