2025/01/31

Newest at the top

2025-01-31 02:34:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-01-31 02:32:24 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-01-31 02:27:42 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-01-31 02:26:00 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 264 seconds)
2025-01-31 02:25:58 +0100monochrmmonochrom
2025-01-31 02:25:58 +0100monochrom(trebla@216.138.220.146) (Ping timeout: 252 seconds)
2025-01-31 02:24:26 +0100monochrm(trebla@216.138.220.146)
2025-01-31 02:22:30 +0100otto_s(~user@p5de2fd05.dip0.t-ipconnect.de)
2025-01-31 02:20:44 +0100otto_s(~user@p5b0441ee.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2025-01-31 02:18:49 +0100rstromlund(~user@user/rstromlund) rstromlund
2025-01-31 02:16:32 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-01-31 02:12:20 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-01-31 02:12:12 +0100sprotte24(~sprotte24@p200300d16f0f520069bfd2b9cee1df34.dip0.t-ipconnect.de) (Quit: Leaving)
2025-01-31 02:03:18 +0100 <hololeap> nice, there we go
2025-01-31 02:03:12 +0100 <lambdabot> Int -> IO (String, Int)
2025-01-31 02:03:12 +0100 <hololeap> @unmtl StateT Int IO String
2025-01-31 02:02:24 +0100joeyadams(~joeyadams@syn-184-054-105-097.res.spectrum.com) (Quit: Leaving)
2025-01-31 02:01:09 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2025-01-31 01:56:47 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-01-31 01:56:40 +0100rstromlund(~user@user/rstromlund) (Ping timeout: 265 seconds)
2025-01-31 01:56:36 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 246 seconds)
2025-01-31 01:54:15 +0100xff0x(~xff0x@2405:6580:b080:900:704:c9bd:a645:9b1d) (Ping timeout: 276 seconds)
2025-01-31 01:53:06 +0100acidjnk_new3(~acidjnk@p200300d6e7283f4679216c0ad7f4b91d.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2025-01-31 01:52:41 +0100 <lambdabot> f a b = a (\ c -> c b)
2025-01-31 01:52:40 +0100 <int-e> @djinn ((((a -> r) -> r) -> r) -> r) -> (a -> r) -> r
2025-01-31 01:52:28 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-01-31 01:51:47 +0100rstromlund(~user@user/rstromlund) rstromlund
2025-01-31 01:51:10 +0100 <dminuoso> Anyway. This was just meant as a teaser.
2025-01-31 01:50:58 +0100 <dminuoso> euouae: This is an alternate description of (>>=), and it perhaps visualizes nicely that there's a sort of composition idea going on.
2025-01-31 01:50:03 +0100 <yahb2> join :: Monad m => m (m a) -> m a
2025-01-31 01:50:03 +0100 <dminuoso> % :t join
2025-01-31 01:50:01 +0100 <yahb2> <no output>
2025-01-31 01:50:01 +0100 <dminuoso> % import Control.Monad
2025-01-31 01:49:55 +0100 <yahb2> <interactive>:1:1: error: [GHC-88464] Variable not in scope: join
2025-01-31 01:49:55 +0100 <dminuoso> % :t join
2025-01-31 01:49:18 +0100 <dminuoso> Just keep that thought mind for the future
2025-01-31 01:48:53 +0100 <dminuoso> euouae: One last thing: That "funky composition" you talked about, that's where the monad lies. :-)
2025-01-31 01:48:52 +0100mange(~user@user/mange) mange
2025-01-31 01:46:30 +0100monochrmmonochrom
2025-01-31 01:46:29 +0100monochrom(trebla@216.138.220.146) (Ping timeout: 260 seconds)
2025-01-31 01:46:00 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-01-31 01:45:55 +0100 <euouae> But your example is very helpful, to keep in mind pure computation / IO stuff inside parsing
2025-01-31 01:45:40 +0100 <euouae> I think my composable state machine intuition is running into trouble with StateT. Transformers seem like a different beast, I'll have to think about it more.
2025-01-31 01:45:16 +0100monochrm(trebla@216.138.220.146)
2025-01-31 01:44:32 +0100 <euouae> I'm going to assume that it'll leak out the details of try
2025-01-31 01:44:15 +0100 <euouae> right
2025-01-31 01:43:29 +0100 <dminuoso> (Assuming you use `try` of course)
2025-01-31 01:43:15 +0100 <dminuoso> You can also use `ParsecT e s IO`, then you can suddenly do `liftIO (putStrLn "Hello world")` in the middle of your parser. Note, that because megaparsec will do backtracking this will have some interesting/strange behavior... which is non-determinism in fact.
2025-01-31 01:42:13 +0100 <dminuoso> type Parsec e s = ParsecT e s Identity
2025-01-31 01:42:06 +0100 <dminuoso> https://hackage.haskell.org/package/megaparsec-9.7.0/docs/Text-Megaparsec.html#t:Parsec