Newest at the top
2025-08-04 08:25:51 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-08-04 08:17:40 +0200 | Frostillicus | (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 252 seconds) |
2025-08-04 08:14:58 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
2025-08-04 08:14:06 +0200 | <euouae> | c_wraith: any other hints I'll take. I'll look into megaparsec's getInput and setInput tomorrow. |
2025-08-04 08:12:49 +0200 | Frostillicus | (~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) |
2025-08-04 08:10:48 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-08-04 08:10:44 +0200 | <euouae> | lambda calculus doesn't have state |
2025-08-04 08:10:39 +0200 | poscat | (~poscat@user/poscat) poscat |
2025-08-04 08:10:32 +0200 | <euouae> | ah okay, I understand |
2025-08-04 08:10:25 +0200 | <c_wraith> | yes, that part was for how lambda calculus is different. |
2025-08-04 08:10:25 +0200 | <euouae> | how do you convert `foo()r()` to tree? |
2025-08-04 08:10:10 +0200 | <euouae> | okay, but you said "convert to tree" |
2025-08-04 08:09:51 +0200 | poscat0x04 | (~poscat@user/poscat) (Remote host closed the connection) |
2025-08-04 08:09:11 +0200 | <c_wraith> | ah. definitely a system intended to torture the user |
2025-08-04 08:07:23 +0200 | <euouae> | To be concrete, it's GNU M4. |
2025-08-04 08:07:11 +0200 | <c_wraith> | What you're describing is closer to a full term rewriting system like mathematica, I suppose. |
2025-08-04 08:06:51 +0200 | <euouae> | Are we talking about lambda calculus now or my problem? |
2025-08-04 08:05:59 +0200 | <c_wraith> | Except that you can convert it to a tree and do your evaluation outside of the *input* space. |
2025-08-04 08:05:04 +0200 | <euouae> | Lambda calculus isn't much different |
2025-08-04 08:04:23 +0200 | <c_wraith> | That sounds like a system you'd only design that way to torture its users |
2025-08-04 08:04:02 +0200 | <euouae> | To answer "why", because that's what I'm modelling :P |
2025-08-04 08:03:49 +0200 | <euouae> | i.e. `foo()r()` --> `bar()` --> `42` |
2025-08-04 08:03:42 +0200 | biberu | (~biberu@user/biberu) biberu |
2025-08-04 08:03:28 +0200 | CiaoSen | (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) CiaoSen |
2025-08-04 08:03:28 +0200 | <euouae> | imagine if `foo` expands to `ba` and there's an `r` next in input and a `bar` macro |
2025-08-04 08:03:15 +0200 | <c_wraith> | Why? |
2025-08-04 08:03:10 +0200 | <euouae> | No, input needs to be rewritten when `foo` is expanded to `42` |
2025-08-04 08:02:45 +0200 | <c_wraith> | But the important part is that you don't need to rewrite input to handle updating a mapping table. |
2025-08-04 08:02:11 +0200 | <c_wraith> | Maybe State, maybe ReaderT IO with an IORef, whatever. |
2025-08-04 08:01:47 +0200 | <c_wraith> | Well, that particular thing is probably better handled by using ParsecT around something else that maintains a mapping for you. |
2025-08-04 08:00:28 +0200 | trickard_ | (~trickard@cpe-56-98-47-163.wireline.com.au) |
2025-08-04 08:00:15 +0200 | trickard_ | (~trickard@cpe-56-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
2025-08-04 08:00:13 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds) |
2025-08-04 07:55:24 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-08-04 07:46:18 +0200 | harveypwca | (~harveypwc@2601:246:d080:f6e0:27d6:8cc7:eca9:c46c) HarveyPwca |
2025-08-04 07:44:24 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-08-04 07:42:52 +0200 | <euouae> | (if I understood you correctly) |
2025-08-04 07:42:42 +0200 | <euouae> | There is no distinction between "here I'm parsing" and "here there's effects" because to parse is to cause effects |
2025-08-04 07:42:08 +0200 | <euouae> | I'll give an example. Suppose I have `define(foo, 42) foo`. The first command expands to "" (empty string), but now the macro table includes foo -> 42. Then foo itself is consumed; it expands to "42", and that is prepended to the input data stream. Finally, 42 is consumed, and it outputs itself. |
2025-08-04 07:41:07 +0200 | <euouae> | Why is it weird that effects are inside the parser? |
2025-08-04 07:40:02 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-08-04 07:38:56 +0200 | <Axman6> | it feels weird to me that you effects would be _inside_ your parser, I was definitely looking for the partial result stuff other libraries offer |
2025-08-04 07:37:07 +0200 | euouae | will give this a try |
2025-08-04 07:37:03 +0200 | <euouae> | Oh, getInput would be the remainder, then I can setInput. Hm... Thanks for that hint! |
2025-08-04 07:36:34 +0200 | <euouae> | c_wraith: hm, perhaps? That might be a good point. I wonder how I'd know how much has been consumed. |
2025-08-04 07:31:07 +0200 | caubert | (~caubert@user/caubert) caubert |
2025-08-04 07:28:59 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-08-04 07:25:38 +0200 | poscat | (~poscat@user/poscat) (Ping timeout: 248 seconds) |
2025-08-04 07:25:12 +0200 | <c_wraith> | euouae: is that a thing you could fake with getInput and setInput? |
2025-08-04 07:23:56 +0200 | poscat0x04 | (~poscat@user/poscat) poscat |