2026/04/06

Newest at the top

2026-04-06 15:08:57 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-04-06 15:04:08 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 14:57:17 +0000 <TMA> EvanR: my understanding now is: haskell has no I/O. it has IO instead and that's dark magic I don't want to touch
2026-04-06 14:55:22 +0000 <ski> they're stepping stones
2026-04-06 14:53:40 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
2026-04-06 14:51:32 +0000puke(~puke@user/puke) puke
2026-04-06 14:48:20 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 14:45:20 +0000chromoblob(~chromoblo@user/chromob1ot1c) chromoblob\0
2026-04-06 14:40:35 +0000 <EvanR> RealWorld and [Response] -> [Request] both seems like dead ends in IO enlightenment
2026-04-06 14:39:55 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-04-06 14:34:44 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 14:33:07 +0000 <EvanR> my understanding of I/O started when threading RealWorld stopped xD
2026-04-06 14:30:37 +0000somemathguy(~somemathg@user/somemathguy) (Quit: WeeChat 4.1.1)
2026-04-06 14:24:02 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-04-06 14:20:25 +0000traxex(traxex@user/traxex) (Ping timeout: 272 seconds)
2026-04-06 14:18:55 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 14:08:09 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-04-06 14:03:08 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 13:56:03 +0000 <TMA> my understanding of I/O in Haskell stopped with threading RealWorld through everything
2026-04-06 13:55:59 +0000bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2026-04-06 13:52:30 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds)
2026-04-06 13:48:49 +0000tromp(~textual@2001:1c00:340e:2700:8cf8:7bb7:a0e:7cfa)
2026-04-06 13:47:21 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 13:42:09 +0000synchromesh(~john@2406:5a00:2412:2c00:75ab:7cb0:db12:1e18) synchromesh
2026-04-06 13:41:32 +0000 <lambdabot> newtype Cont r a = Cont { runCont :: (a -> r) -> r }
2026-04-06 13:41:32 +0000 <ski> @src Cont
2026-04-06 13:41:13 +0000 <lambdabot> (Char -> Dialogue) -> Dialogue
2026-04-06 13:41:13 +0000 <ski> @unmtl Cont Dialogue Char
2026-04-06 13:41:03 +0000 <ski> (btw, this `(Char -> Dialogue) -> Dialogue' can be expressed as a "continuation monad", `Cont Dialogue Char', and similarly `Cont Dialogue ()' for the output case)
2026-04-06 13:40:50 +0000synchromesh(~john@2406:5a00:2412:2c00:75ab:7cb0:db12:1e18) (Read error: Connection reset by peer)
2026-04-06 13:40:35 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-04-06 13:40:04 +0000 <ski> in this case, there'd be a thin run-time driver, which inspects the requests from the dialogue, performs it, and then generates the corresponding response for the dialogue to receive
2026-04-06 13:37:16 +0000 <ski> where you pass a "continuation" dialogue for what to do (which will generate the remaining requests and process the corresponding responses), after the character you've outputted, or inputted
2026-04-06 13:35:45 +0000 <ski> hGetChar h c_cont resps0 = HGetChar h : case resps0 of HCharGot c:resps -> c_cont c resps
2026-04-06 13:35:12 +0000 <ski> hGetChar :: Handle -> (Char -> Dialogue) -> Dialogue
2026-04-06 13:35:00 +0000 <ski> and
2026-04-06 13:34:57 +0000 <ski> hPutChar h c cont resps0 = HPutChar h c : case resps0 of HCharPut:resps -> cont resps
2026-04-06 13:33:53 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-04-06 13:33:46 +0000 <ski> hPutChar :: Handle -> Char -> Dialogue -> Dialogue
2026-04-06 13:33:28 +0000 <ski> and then you can define helper functions like
2026-04-06 13:33:17 +0000terrorjack(~terrorjac@static.27.101.55.162.clients.your-server.de) terrorjack
2026-04-06 13:33:03 +0000Pozyomka(~pyon@user/pyon) (Quit: bbml)
2026-04-06 13:32:58 +0000 <ski> data Response = FileOpened Handle | HCharGot Char | HCharPut | ...
2026-04-06 13:32:22 +0000 <ski> data Request = OpenFile FilePath IOMode | HGetChar Handle | HPutChar Handle Char | ...
2026-04-06 13:32:07 +0000somemathguy(~somemathg@user/somemathguy) somemathguy
2026-04-06 13:31:18 +0000 <ski> something like
2026-04-06 13:31:09 +0000 <ski> iowy, you write a function which returns a lazy list of I/O requests, and then (after generating the current request), you look at the current response
2026-04-06 13:30:13 +0000 <ski> type Dialogue = [Responses] -> [Requests]
2026-04-06 13:30:00 +0000 <ski> where
2026-04-06 13:29:59 +0000 <ski> main :: Dialogue