Newest at the top
| 2025-12-16 11:50:22 +0100 | <tomsmeding> | (Enum is useful as a base for [..] syntax, but that's not under discussion here) |
| 2025-12-16 11:49:53 +0100 | somemathguy | (~somemathg@user/somemathguy) somemathguy |
| 2025-12-16 11:49:47 +0100 | <tomsmeding> | because Rational is very countable indeed |
| 2025-12-16 11:49:38 +0100 | <tomsmeding> | but that just shows that the Enum class is nonsense, not any kind of enumerability of Rational |
| 2025-12-16 11:49:23 +0100 | <tomsmeding> | no, because Rational is at least as large as Integer, and Integer is bigger than Int, and you must define fromEnum |
| 2025-12-16 11:48:38 +0100 | <tomsmeding> | Enum is nothing, essentially, as it has no sensible laws and the methods are nonsense too (can you only enumerate things that are Int-large?) |
| 2025-12-16 11:48:21 +0100 | <dminuoso> | Is Rational Enum? |
| 2025-12-16 11:48:16 +0100 | <dminuoso> | Is `Enum` the typeclass of things that are countable? |
| 2025-12-16 11:48:03 +0100 | <dminuoso> | So this is an interesting question. |
| 2025-12-16 11:47:45 +0100 | <tomsmeding> | so if the question is just whether the thing being branched on is countable, then the difference between Selective and Monad would only be one of performance and memory use |
| 2025-12-16 11:46:34 +0100 | <tomsmeding> | in computer science, everything is |
| 2025-12-16 11:46:29 +0100 | <dminuoso> | Not everything is. |
| 2025-12-16 11:46:25 +0100 | Googulator | (~Googulato@2a01-036d-0106-01cb-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-12-16 11:46:24 +0100 | <tomsmeding> | well everything is countable |
| 2025-12-16 11:46:20 +0100 | <dminuoso> | Or does it? |
| 2025-12-16 11:46:14 +0100 | <dminuoso> | It just matters whether its countable. |
| 2025-12-16 11:46:07 +0100 | <tomsmeding> | because the branching tree would be infinitely large |
| 2025-12-16 11:45:58 +0100 | <tomsmeding> | only if the selective functor itself is lazy, I guess? |
| 2025-12-16 11:45:55 +0100 | <dminuoso> | Integer is countable |
| 2025-12-16 11:45:48 +0100 | <dminuoso> | Assuming infinite memory. |
| 2025-12-16 11:45:44 +0100 | <dminuoso> | tomsmeding: Even without cosmology arguments, it's very trivial to enumerate over all Integer? |
| 2025-12-16 11:45:42 +0100 | Googulator71 | (~Googulato@2a01-036d-0106-01cb-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) |
| 2025-12-16 11:45:30 +0100 | merijn | (~merijn@77.242.116.146) merijn |
| 2025-12-16 11:45:18 +0100 | <dminuoso> | There is `toEnum :: Enum a => Int -> a` but Im not sure about its semantics |
| 2025-12-16 11:45:11 +0100 | <tomsmeding> | you can also simulate `(>>=) @_ @Int`, with a branching tree that has 2^64 leaves, and a cosmological computer |
| 2025-12-16 11:44:48 +0100 | <dminuoso> | Im thinking that perhaps we need at least one bound, or some base case. Enum doesnt seem to have `zero :: Enum a => a` |
| 2025-12-16 11:44:25 +0100 | <tomsmeding> | (you can simulate `(>>=) @_ @Bool` trivially using Either () ()) |
| 2025-12-16 11:44:06 +0100 | <tomsmeding> | but can you simulate `(>>=) @_ @Integer` with Selective? |
| 2025-12-16 11:43:30 +0100 | <dminuoso> | `Enum Integer` is a thing |
| 2025-12-16 11:43:09 +0100 | <tomsmeding> | (ignoring cosmology arguments) |
| 2025-12-16 11:42:59 +0100 | <tomsmeding> | is Integer enumerable? |
| 2025-12-16 11:42:54 +0100 | <dminuoso> | It's just about enumerability I think? |
| 2025-12-16 11:42:48 +0100 | <dminuoso> | Finiteness is a red herring. |
| 2025-12-16 11:42:33 +0100 | <tomsmeding> | and give an infinite list of branches? |
| 2025-12-16 11:42:10 +0100 | <[exa]> | I probably just want an actual marker there into the selective tree that tells me "this selection is numeric" |
| 2025-12-16 11:42:03 +0100 | <dminuoso> | enumerable? |
| 2025-12-16 11:41:58 +0100 | <dminuoso> | Of course, if we applied some black hole theory and cosmology, one could argue that all possible executions are enumeratable - the entropy of the visible universe is finite. |
| 2025-12-16 11:41:43 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 264 seconds) |
| 2025-12-16 11:41:07 +0100 | <tomsmeding> | yes :) |
| 2025-12-16 11:41:02 +0100 | <dminuoso> | It's literally baked into this type. :) |
| 2025-12-16 11:40:59 +0100 | <yahb2> | (>>=) :: Monad m => m a -> (a -> m b) -> m b |
| 2025-12-16 11:40:58 +0100 | <dminuoso> | % :t (>>=) |
| 2025-12-16 11:40:49 +0100 | <dminuoso> | tomsmeding: Sure. And with `monad` the parse structure is potentially completely unknown, as it can depend on effect results. |
| 2025-12-16 11:40:40 +0100 | <tomsmeding> | whereas with Monad, the branches can be decided on _after_ seeing values, which corresponds to a possibly infinite branching tree if you'dd need to specify it all statically |
| 2025-12-16 11:40:14 +0100 | <[exa]> | yeah, I wanted this more for the static analysis, the extra action would be somewhat of a kleene star, but you'd know exactly what you need to compute to know how many repetitions are there |
| 2025-12-16 11:39:54 +0100 | <tomsmeding> | I guess you can formulate it as: with Selective you can have branching on previously-computed values, but the whole branching tree must be known before seeing any values |
| 2025-12-16 11:39:28 +0100 | <dminuoso> | With no extra typeclass |
| 2025-12-16 11:39:24 +0100 | <dminuoso> | [exa]: The prescribed `bindEither` above should be writable. |
| 2025-12-16 11:39:08 +0100 | <dminuoso> | [exa]: And no, not a separate typeclass |
| 2025-12-16 11:37:51 +0100 | <dminuoso> | [exa]: One good way to think about selective is to imagine that `Applicative` gives you a kind of diamond that acts "in parallel" (but I mean that in a reall loose sense), whereas `Selective` gives you a diamond that acts as a conditional branch . |