Newest at the top
2024-04-29 19:23:33 +0200 | manwithluck | (manwithluc@gateway/vpn/protonvpn/manwithluck) |
2024-04-29 19:22:44 +0200 | manwithluck | (manwithluc@gateway/vpn/protonvpn/manwithluck) (Ping timeout: 268 seconds) |
2024-04-29 19:21:03 +0200 | machinedgod | (~machinedg@d173-183-246-216.abhsia.telus.net) |
2024-04-29 19:20:55 +0200 | ocra8 | (ocra8@user/ocra8) |
2024-04-29 19:20:15 +0200 | demon-cat | (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) (Ping timeout: 256 seconds) |
2024-04-29 19:18:32 +0200 | sawilagar | (~sawilagar@user/sawilagar) (Quit: Leaving) |
2024-04-29 19:15:50 +0200 | demon-cat | (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) |
2024-04-29 19:12:08 +0200 | andrewboltachev | (~andrewbol@178.141.238.156) |
2024-04-29 19:00:38 +0200 | gaff | (~gaff@49.207.216.126) () |
2024-04-29 18:58:51 +0200 | demon-cat | (~demon-cat@dund-15-b2-v4wan-169642-cust1347.vm6.cable.virginm.net) (Ping timeout: 256 seconds) |
2024-04-29 18:56:54 +0200 | Square | (~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 +0200 | Square3 | (~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 +0200 | tri | (~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 +0200 | justsomeguy | (~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 +0200 | tri | (~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 +0200 | Lears | (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
2024-04-29 18:47:11 +0200 | noumenon | (~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 +0200 | rvalue | (~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 +0200 | rvalue | (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
2024-04-29 18:42:34 +0200 | remedan | (~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` |
2024-04-29 18:41:24 +0200 | jumper149 | (~jumper149@base.felixspringer.xyz) (Quit: WeeChat 4.2.1) |
2024-04-29 18:40:09 +0200 | <gaff> | here is an example: `f = do { s <- get; let (a, b) = g s; put b; return a }` and similar stuff in perhaps other functions as well. |
2024-04-29 18:39:53 +0200 | gmg | (~user@user/gehmehgeh) |
2024-04-29 18:39:52 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2024-04-29 18:39:38 +0200 | chiselfuse | (~chiselfus@user/chiselfuse) |
2024-04-29 18:38:47 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2024-04-29 18:38:46 +0200 | chiselfuse | (~chiselfus@user/chiselfuse) (Read error: Connection reset by peer) |