Newest at the top
2024-05-21 11:34:43 +0200 | noumenon | (~noumenon@113.51-175-156.customer.lyse.net) |
2024-05-21 11:34:34 +0200 | <tomsmeding> | those are the easy ones |
2024-05-21 11:34:31 +0200 | <tomsmeding> | it is |
2024-05-21 11:34:10 +0200 | <ski> | replication is sensible for pointwise operations |
2024-05-21 11:32:50 +0200 | <tomsmeding> | though that's a very questionable definition for fromInteger on arrays |
2024-05-21 11:32:25 +0200 | <tomsmeding> | ski: okay I concede that one, but what about toInteger :p |
2024-05-21 11:31:53 +0200 | <tomsmeding> | *decodeFloat |
2024-05-21 11:31:53 +0200 | <ski> | fromInteger = pure . fromInteger |
2024-05-21 11:31:47 +0200 | <tomsmeding> | (decldeFloat :: a -> (Integer, Int) ?) |
2024-05-21 11:31:25 +0200 | <tomsmeding> | and everything breaks down once you get to Real, RealFrac and RealFloat |
2024-05-21 11:31:00 +0200 | <tomsmeding> | goes wrong at Num(fromInteger) already |
2024-05-21 11:30:42 +0200 | <tomsmeding> | okay that typechecks as-is but it's not a valid definition of toInteger :p |
2024-05-21 11:30:24 +0200 | <lambdabot> | [1,2] |
2024-05-21 11:30:22 +0200 | <tomsmeding> | > liftA toInteger [1,2] |
2024-05-21 11:30:12 +0200 | <tomsmeding> | the numeric classes lift straightforwardly into applicative? |
2024-05-21 11:27:53 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-05-21 11:24:45 +0200 | <int-e> | I'll give you that it is /a/ (non-commutative) ring. |
2024-05-21 11:24:27 +0200 | <mauke> | WYGIWYG |
2024-05-21 11:22:51 +0200 | <int-e> | is that what you want though :) |
2024-05-21 11:22:39 +0200 | <lambdabot> | [11,21,12,22] |
2024-05-21 11:22:38 +0200 | <int-e> | > liftA2 (+) [1,2] [10,20] |
2024-05-21 11:22:29 +0200 | Flow | (~none@gentoo/developer/flow) (Ping timeout: 240 seconds) |
2024-05-21 11:21:38 +0200 | <mauke> | so [a] works fine :-) |
2024-05-21 11:21:29 +0200 | <mauke> | the numeric classes lift straightforwardly into Applicative |
2024-05-21 11:07:46 +0200 | <ski> | it's a mess |
2024-05-21 11:06:14 +0200 | danse-nr3 | (~danse-nr3@151.35.171.208) |
2024-05-21 11:06:11 +0200 | <tomsmeding> | if you squint on fromInteger you can maybe make Num work, but that's as far as you get |
2024-05-21 11:05:41 +0200 | <tomsmeding> | there's no sensible way to make arrays an instance of the numeric hierarchy |
2024-05-21 11:05:32 +0200 | <tomsmeding> | I guess my actual X question is: why are all the numeric classes specifically for single scalars |
2024-05-21 11:05:20 +0200 | danse-nr3 | (~danse-nr3@151.35.171.208) (Ping timeout: 260 seconds) |
2024-05-21 11:05:04 +0200 | <ncf> | well i guess not decidably so |
2024-05-21 11:05:02 +0200 | <tomsmeding> | you have a point |
2024-05-21 11:04:45 +0200 | <ncf> | the reals are ordered aren't they |
2024-05-21 11:04:07 +0200 | <tomsmeding> | why is Ord a superclass of Real? |
2024-05-21 10:57:59 +0200 | danse-nr3 | (~danse-nr3@151.35.171.208) |
2024-05-21 10:54:08 +0200 | danse-nr3 | (~danse-nr3@151.35.171.208) (Ping timeout: 260 seconds) |
2024-05-21 10:49:59 +0200 | lxsameer | (~lxsameer@Serene/lxsameer) |
2024-05-21 10:48:06 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2024-05-21 10:47:04 +0200 | ubert | (~Thunderbi@2a02:8109:ab8a:5a00:6584:33d2:35a2:fd74) |
2024-05-21 10:46:06 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds) |
2024-05-21 10:43:13 +0200 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2024-05-21 10:42:30 +0200 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
2024-05-21 10:37:59 +0200 | <ski> | .. which i guess is another reason i've semi-recently been interested in grokking ordered logic (also for its own sake, e.g. for use as a logic programming language, or a logical framework) |
2024-05-21 10:36:59 +0200 | <ski> | the type system for this requires keeping track of an *ordered* context/environment of variable typings .. |
2024-05-21 10:34:22 +0200 | <ski> | and i'm not too sure how more generally useful it would be .. but it seems like an interesting idea to explore, regardless, to see how far one can push it, how much it can make sense, and perhaps how much can be incorporated in such a system |
2024-05-21 10:33:26 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-05-21 10:33:23 +0200 | <ski> | .. it's a bit weird and unusual to think in these terms |
2024-05-21 10:33:04 +0200 | ft | (~ft@p508db8fc.dip0.t-ipconnect.de) (Quit: leaving) |
2024-05-21 10:32:46 +0200 | <vladl> | ah yes that makes sense now |
2024-05-21 10:30:34 +0200 | <ski> | note that, in the `Cons' case of `concat', because `l1' is plural, in the first argument of `append' (whose domain is a (lifted) product, not a composition), `l1' refers to the first list (which is pointed out by the `(||)', in the pattern). wihle in the second argument of `append', `l1' refers to all the other lists, living under the `l0' list structure |