2024/04/29

Newest at the top

2024-04-29 19:56:42 +0200demon-cat(~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net)
2024-04-29 19:50:53 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-04-29 19:37:12 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-04-29 19:36:39 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-04-29 19:36:20 +0200cashew(~cashewsta@65.17.175.150) (Remote host closed the connection)
2024-04-29 19:33:43 +0200ec(~ec@gateway/tor-sasl/ec)
2024-04-29 19:26:26 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 268 seconds)
2024-04-29 19:23:33 +0200manwithluck(manwithluc@gateway/vpn/protonvpn/manwithluck)
2024-04-29 19:22:44 +0200manwithluck(manwithluc@gateway/vpn/protonvpn/manwithluck) (Ping timeout: 268 seconds)
2024-04-29 19:21:03 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net)
2024-04-29 19:20:55 +0200ocra8(ocra8@user/ocra8)
2024-04-29 19:20:15 +0200demon-cat(~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) (Ping timeout: 256 seconds)
2024-04-29 19:18:32 +0200sawilagar(~sawilagar@user/sawilagar) (Quit: Leaving)
2024-04-29 19:15:50 +0200demon-cat(~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net)
2024-04-29 19:12:08 +0200andrewboltachev(~andrewbol@178.141.238.156)
2024-04-29 19:00:38 +0200gaff(~gaff@49.207.216.126) ()
2024-04-29 18:58:51 +0200demon-cat(~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) (Ping timeout: 256 seconds)
2024-04-29 18:56:54 +0200Square(~Square@user/square)
2024-04-29 18:56:03 +0200 <gaff> ncf: thanks
2024-04-29 18:55:47 +0200 <ncf> let's go with no
2024-04-29 18:54:26 +0200 <EvanR> outlook unclear call again
2024-04-29 18:54:12 +0200Square3(~Square4@user/square) (Ping timeout: 252 seconds)
2024-04-29 18:54:11 +0200 <ncf> :(
2024-04-29 18:53:55 +0200 <lambdabot> Unknown command, try @list
2024-04-29 18:53:55 +0200 <ncf> @8ball
2024-04-29 18:52:35 +0200tri(~tri@ool-18bbef1a.static.optonline.net) (Ping timeout: 260 seconds)
2024-04-29 18:52:15 +0200 <gaff> Consider the following example. you are writing a bunch of parser combinators, and many of these combinators use `get` and `put`. Is that circumventing the State monad?
2024-04-29 18:52:07 +0200 <ncf> i mean you are asking for a general yes/no answer to something that is essentially a value judgement (bookkeeping) and highly context-dependent
2024-04-29 18:50:28 +0200 <gaff> ncf: I am not really clear what you meant there.
2024-04-29 18:49:44 +0200 <ncf> but other than that get and put are just part of the normal State interface
2024-04-29 18:49:14 +0200 <ncf> if you end up using get and put in between every function call then i would say you are bookkeeping and defeating the purpose of State
2024-04-29 18:48:55 +0200justsomeguy(~justsomeg@user/justsomeguy)
2024-04-29 18:48:26 +0200 <ncf> that's not a well-defined concept, just a vibe
2024-04-29 18:47:57 +0200tri(~tri@ool-18bbef1a.static.optonline.net)
2024-04-29 18:47:53 +0200 <gaff> ncf: well, I want to be clear about what is state "bookkeeping" (which you would have to do if you didn't use the State monad) vs the use of these functions `get` and `put`.
2024-04-29 18:47:50 +0200Lears(~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
2024-04-29 18:47:11 +0200noumenon(~noumenon@113.51-175-156.customer.lyse.net) (Quit: Leaving)
2024-04-29 18:46:46 +0200 <EvanR> I say*
2024-04-29 18:46:39 +0200 <EvanR> you say boilerplate and say can you move the boilerplate to a function which can be called
2024-04-29 18:46:38 +0200 <geekosaur> the state monad would be pretty useless if you couldn't access or update the state
2024-04-29 18:45:33 +0200 <ncf> why else would they be exported
2024-04-29 18:45:10 +0200 <ncf> sure
2024-04-29 18:44:26 +0200rvalue(~rvalue@user/rvalue)
2024-04-29 18:44:25 +0200 <gaff> ncf: thanks. I know. But i am asking that structure I presented, or more generally the use of `get` and `put`, are expected monadic operations in code dealing with the State monad?
2024-04-29 18:43:56 +0200rvalue(~rvalue@user/rvalue) (Read error: Connection reset by peer)
2024-04-29 18:42:34 +0200remedan(~remedan@ip-78-102-118-253.bb.vodafone.cz)
2024-04-29 18:42:11 +0200 <ncf> f = state g
2024-04-29 18:41:52 +0200 <lambdabot> MonadState s m => (s -> (a, s)) -> m a
2024-04-29 18:41:51 +0200 <ncf> :t state
2024-04-29 18:41:50 +0200 <ncf> in that specific case you could perhaps just use `state`