2024/11/13

Newest at the top

2024-11-13 19:55:54 +0100 <EvanR> in lieu of a mutable vector
2024-11-13 19:55:23 +0100 <EvanR> this is where immutable IntMap can clean things up a lot
2024-11-13 19:55:03 +0100 <EvanR> but when you are thinking in OOP terms and everything is based on a mutable object, you can get into an IO trap
2024-11-13 19:54:41 +0100 <EvanR> many operations don't need IO
2024-11-13 19:54:36 +0100 <EvanR> you're right to question every function in the program returning an IO type, that sounds ridiculous
2024-11-13 19:54:32 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2024-11-13 19:53:38 +0100 <EvanR> and definitely not monad-less
2024-11-13 19:53:25 +0100 <EvanR> having an App monad which extends / is based on IO is popular, presumably not missing that point you refer to. But it's also not IO-less
2024-11-13 19:47:49 +0100mari-estel(~mari-este@user/mari-estel) mari-estel
2024-11-13 19:44:15 +0100 <tomsmeding> which may _optionall_ include IO, as an explicit effect
2024-11-13 19:44:07 +0100 <tomsmeding> which are ~all monads over IO, but the only methods you can use are the ones from the effects you're handling
2024-11-13 19:43:50 +0100 <tomsmeding> that design is essentially behind ~every effects library in haskell
2024-11-13 19:43:29 +0100 <bailsman> Well presumably putting your entire codebase in an IO monad would be missing some kind of point. But I wonder if making your own monad with a very clearly defined set of operations is not as bad.
2024-11-13 19:42:45 +0100Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla
2024-11-13 19:42:38 +0100 <tomsmeding> whether it makes sense to encapsulate access to the vector in a monad if you could also just have the vector as a separate object that you can manipulate in ST, depends on your application
2024-11-13 19:41:59 +0100 <tomsmeding> bailsman: but yes, having a monad over ST, where the ST part is hidden, is perfectly fine and sensible haskell
2024-11-13 19:41:22 +0100 <tomsmeding> (and https://hackage.haskell.org/package/linear-base-0.4.0/docs/Data-Array-Mutable-Linear.html )
2024-11-13 19:41:04 +0100 <tomsmeding> bailsman: also consider `newtype LinearState s a = LinearState (s %1-> (s, a))` with -XLinearTypes
2024-11-13 19:40:42 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2024-11-13 19:40:31 +0100 <bailsman> The one thing I find "concerning" is that this means every function that operates on your data is inside your monad, but maybe that's just good and proper and how things are done.
2024-11-13 19:40:03 +0100 <bailsman> Can it make sense to encapsulate a mutable vector in a state transformer monad whose version of runState internally does something with runST? That way the 'pure world' doesn't really need to know or care how you implemented things internally. You just get an interface against which you can do defined operations on the monad.
2024-11-13 19:40:02 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-11-13 19:37:42 +0100athostFI(~Atte@176-93-56-50.bb.dnainternet.fi) (Ping timeout: 252 seconds)
2024-11-13 19:28:48 +0100red-snail(~snail@static.151.210.203.116.clients.your-server.de) red-snail
2024-11-13 19:27:54 +0100red-snail1(~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in)
2024-11-13 19:25:12 +0100alexherbo2(~alexherbo@2a02-8440-3117-f07c-156a-8e41-bb43-7316.rev.sfr.net) (Remote host closed the connection)
2024-11-13 19:21:36 +0100alexherbo2(~alexherbo@2a02-8440-3117-f07c-156a-8e41-bb43-7316.rev.sfr.net) alexherbo2
2024-11-13 19:20:25 +0100alexherbo2(~alexherbo@2a02-8440-3117-f07c-59a9-a91e-4d8c-de8d.rev.sfr.net) (Remote host closed the connection)
2024-11-13 19:18:17 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-11-13 19:13:54 +0100wootehfoot(~wootehfoo@user/wootehfoot) wootehfoot
2024-11-13 19:06:51 +0100ft(~ft@p4fc2a216.dip0.t-ipconnect.de) ft
2024-11-13 19:05:37 +0100chele(~chele@user/chele) (Remote host closed the connection)
2024-11-13 19:05:07 +0100JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2024-11-13 19:02:22 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) tzh
2024-11-13 19:01:15 +0100Pixi(~Pixi@user/pixi) Pixi
2024-11-13 19:01:13 +0100acidjnk_new3(~acidjnk@p200300d6e7283f7100fa0b96aa6639bf.dip0.t-ipconnect.de)
2024-11-13 18:49:00 +0100acidjnk_new3(~acidjnk@p200300d6e7283f71b028663737269d4f.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2024-11-13 18:48:52 +0100 <systemfault> EvanR: I'm definitely faulty :)
2024-11-13 18:48:38 +0100 <EvanR> says "systemfault"
2024-11-13 18:37:09 +0100Guest|73(~Guest|73@eduroam-int-pat-8-252.ucl.ac.uk) (Client Quit)
2024-11-13 18:37:02 +0100Guest|73(~Guest|73@eduroam-int-pat-8-252.ucl.ac.uk)
2024-11-13 18:34:20 +0100 <systemfault> Blame the user of the OS, not the OS itself :P
2024-11-13 18:30:46 +0100statusbot(~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) statusbot
2024-11-13 18:30:37 +0100statusbot6(~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Remote host closed the connection)
2024-11-13 18:29:37 +0100tomsmedingis happy to not use emacs, then :p
2024-11-13 18:28:51 +0100 <hellwolf> emacs <--
2024-11-13 18:28:38 +0100 <tomsmeding> how do you accidentally paste a png and send it
2024-11-13 18:28:14 +0100 <tomsmeding> how did that even happen O.o
2024-11-13 18:27:11 +0100 <haskellbridge> <hellwolf> sorry, my bad.
2024-11-13 18:26:54 +0100 <hellwolf> ���mE%�4(E��ɰˠ�q�8(m�� �u_�����Zk�M?P��Ь�G��y�)��|�ޏ��hج