2025/12/16

Newest at the top

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 .
2025-12-16 11:37:28 +0100 <[exa]> so if this would be a typeclass, it would make sense (not completely a Monad) but it would be more like an efficiency upgrade of Selectives for this exact case, not actual new functionality
2025-12-16 11:37:08 +0100merijn(~merijn@77.242.116.146) merijn
2025-12-16 11:36:30 +0100 <[exa]> thanks
2025-12-16 11:36:28 +0100 <[exa]> good
2025-12-16 11:36:26 +0100 <[exa]> okay
2025-12-16 11:36:24 +0100 <[exa]> ahhhhhhhhh ok I think I get the whole problem now
2025-12-16 11:36:03 +0100 <dminuoso> So it works on things that are not enumerable.
2025-12-16 11:35:54 +0100 <dminuoso> Monad can do it without having to enumerate.
2025-12-16 11:35:44 +0100 <[exa]> ah okay good
2025-12-16 11:35:35 +0100 <dminuoso> Monad is strictly more powerful.
2025-12-16 11:35:32 +0100 <dminuoso> This is not an arbitrary monad.
2025-12-16 11:35:17 +0100 <dminuoso> [exa]: That is, you enumerate all possible numbers into a parser tree, and with `select` you can navigate one branch at a time.
2025-12-16 11:34:58 +0100 <dminuoso> [exa]: Selective gives you the power to branch. To find a number, you would have to essentially enumerate that branching until you arrive at a branch that matches that precise number/
2025-12-16 11:34:51 +0100 <[exa]> as in, not "how to simulate this with selectives" but "how does this allow you to run an arbitrary monad"
2025-12-16 11:33:45 +0100 <[exa]> dminuoso: yeah that is true, I'm more like searching for a theoretical argument
2025-12-16 11:33:39 +0100 <dminuoso> [exa]: So its not just about being finite, but being enumerable.
2025-12-16 11:33:17 +0100 <dutchie> ty, that's sorted it
2025-12-16 11:32:40 +0100 <dminuoso> [exa]: Like I said, in principle you could recurse over anything enumerable with something like `bindEither :: (Enum a, Selective f) => f (Either a b) -> (a -> f b) -> f b`, but it would result in terrible performance
2025-12-16 11:32:14 +0100 <dutchie> ah i think that's about the only quotation mode i've not tried lol
2025-12-16 11:31:57 +0100 <tomsmeding> "-with-rtsopts=-N -I0"
2025-12-16 11:31:51 +0100 <tomsmeding> dutchie: you have to put the quotes around the entire thing
2025-12-16 11:31:48 +0100 <[exa]> dminuoso: Is that precisely the Monad jump though? I somehow felt that having the integers always finite would degrade the capabilities of the stuff a little (as in, you can't encode actual turing machine into that computation, right?)
2025-12-16 11:31:34 +0100 <dutchie> how can i pass multiple flags to -with-rtsopts?
2025-12-16 11:31:20 +0100 <dutchie> I'm having trouble with quoting ghc-options in cabal files. In my .cabal I have: `ghc-options: -Wall -with-rtsopts="-N -I0"` but when I build, I get a warning `Warning: [misplaced-c-opt] Instead of 'ghc-options: -I0"' use 'include-dirs: 0"'` and then my program errors out complaining that the rts option `"-N` is unexpected
2025-12-16 11:28:59 +0100haritz(~hrtz@user/haritz) haritz
2025-12-16 11:28:59 +0100haritz(~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8) (Changing host)
2025-12-16 11:28:59 +0100haritz(~hrtz@2a01:4b00:bc2e:7000:d5af:a266:ca31:5ef8)
2025-12-16 11:25:35 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 240 seconds)
2025-12-16 11:25:27 +0100trickard_(~trickard@cpe-81-98-47-163.wireline.com.au)
2025-12-16 11:25:14 +0100trickard(~trickard@cpe-81-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-12-16 11:24:26 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2025-12-16 11:21:25 +0100xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 246 seconds)
2025-12-16 11:21:15 +0100merijn(~merijn@77.242.116.146) merijn
2025-12-16 11:09:19 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 240 seconds)
2025-12-16 11:09:18 +0100humasect_(~humasect@dyn-192-249-132-90.nexicom.net) (Ping timeout: 260 seconds)
2025-12-16 11:06:28 +0100mangoiv(~mangoiv@user/mangoiv) mangoiv
2025-12-16 11:04:52 +0100merijn(~merijn@77.242.116.146) merijn
2025-12-16 11:04:41 +0100humasect_(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2025-12-16 11:00:10 +0100poscat(~poscat@user/poscat) poscat
2025-12-16 10:58:07 +0100fp1(~Thunderbi@wireless-86-50-140-165.open.aalto.fi) (Ping timeout: 240 seconds)
2025-12-16 10:58:05 +0100fp(~Thunderbi@130.233.70.102) (Ping timeout: 250 seconds)
2025-12-16 10:57:49 +0100 <dminuoso> This.
2025-12-16 10:57:47 +0100 <dminuoso> `bindEither :: (Enum a, Selective f) => f (Either a b) -> (a -> f b) -> f b`
2025-12-16 10:57:08 +0100 <dminuoso> Ah no, not quite.
2025-12-16 10:57:03 +0100poscat0x04(~poscat@user/poscat) (Remote host closed the connection)
2025-12-16 10:56:30 +0100chromoblob✌️ ski
2025-12-16 10:56:30 +0100 <dminuoso> I think you should be able to write `>>= :: (Enum a, Selective f) => f a -> (a -> f b) -> f b`
2025-12-16 10:55:30 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
2025-12-16 10:55:07 +0100 <dminuoso> This should be a fun excercise, let me try this.