Newest at the top
2025-04-11 22:52:02 +0200 | <EvanR> | or, an unparsing (e.g. in another language, assuming the languages would allow it) |
2025-04-11 22:51:14 +0200 | <tomsmeding> | if you put the processing inside the parser, you don't get automatic laziness -- you are instead forced to manually compute a little part of the result each time a little part of the expression becomes available |
2025-04-11 22:51:13 +0200 | <EvanR> | or something |
2025-04-11 22:51:11 +0200 | <EvanR> | like size of expression |
2025-04-11 22:51:04 +0200 | wootehfoot | (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
2025-04-11 22:50:38 +0200 | <EvanR> | but something that could be done lazily |
2025-04-11 22:50:16 +0200 | <EvanR> | arithmetic might be a long shot because of reasons |
2025-04-11 22:49:59 +0200 | <tomsmeding> | I've seen students do that when told to write a parser that just produces a syntax tree (their parser only ever produced the AST node for a literal number -- the evaluated expression) |
2025-04-11 22:49:21 +0200 | <tomsmeding> | as in, instead of parsing an arithmetic expression, parse the evaluation of that expression? |
2025-04-11 22:48:52 +0200 | <EvanR> | I seem to remember some suggestion from ski a million years ago ... like ... put the processing within the parser or something |
2025-04-11 22:48:12 +0200 | <tomsmeding> | you cannot catch asynchronous exceptions without IO, so no |
2025-04-11 22:48:02 +0200 | <EvanR> | ok that sounds pretty good but could you somehow do it without IO |
2025-04-11 22:46:14 +0200 | <tomsmeding> | ah no, I'm misremembering: it was using `String -> Expr` and throwing `error` on an error, then catching that in IO |
2025-04-11 22:46:12 +0200 | <EvanR> | IO... lazily... huh |
2025-04-11 22:45:34 +0200 | <tomsmeding> | IO, and throw an IO exception (the error case is actually quite fast here) |
2025-04-11 22:45:09 +0200 | <EvanR> | is there a type for that |
2025-04-11 22:44:45 +0200 | <EvanR> | while taking some big performance trade off if there really is an error |
2025-04-11 22:44:14 +0200 | <EvanR> | but if it is the case that the likelihood of an error is very low, and you want to start processing the Expr lazily |
2025-04-11 22:43:35 +0200 | <EvanR> | in classic parser with external interface String -> Either Error Expr what's probably happening is a big expression is built up and you can only access it after it is known there was no error somewhere (result finally evaluates to Right something) |
2025-04-11 22:42:02 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-04-11 22:37:42 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-04-11 22:28:18 +0200 | michalz | (~michalz@185.246.207.205) (Remote host closed the connection) |
2025-04-11 22:27:28 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds) |
2025-04-11 22:24:08 +0200 | rekahsoft | (~rekahsoft@bras-base-orllon1103w-grc-15-174-95-4-83.dsl.bell.ca) rekahsoft |
2025-04-11 22:23:05 +0200 | cheater | (~Username@user/cheater) cheater |
2025-04-11 22:19:38 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-04-11 22:10:51 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-04-11 22:09:22 +0200 | vanishingideal | (~vanishing@user/vanishingideal) (Remote host closed the connection) |
2025-04-11 22:08:10 +0200 | rvalue- | rvalue |
2025-04-11 22:06:00 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-04-11 22:02:19 +0200 | tromp | (~textual@2001:1c00:3487:1b00:d08a:2428:1bec:2dd5) |
2025-04-11 22:00:23 +0200 | rvalue | (~rvalue@user/rvalue) (Ping timeout: 265 seconds) |
2025-04-11 21:59:25 +0200 | rvalue- | (~rvalue@user/rvalue) rvalue |
2025-04-11 21:58:44 +0200 | acidjnk_new | (~acidjnk@p200300d6e71c4f3781d551119ad8c4a9.dip0.t-ipconnect.de) acidjnk |
2025-04-11 21:58:30 +0200 | acidjnk_new | (~acidjnk@p200300d6e71c4f3760e43f0ee11d5618.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2025-04-11 21:56:47 +0200 | sayurc_ | (~sayurc@177.136.41.195) (Ping timeout: 244 seconds) |
2025-04-11 21:56:46 +0200 | sayurc | (~sayurc@169.150.203.34) sayurc |
2025-04-11 21:55:37 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds) |
2025-04-11 21:52:19 +0200 | notdabs | (~Owner@2600:1700:69cf:9000:a8ba:1089:2e3e:b3d1) |
2025-04-11 21:52:02 +0200 | Owner_ | (~Owner@2600:1700:69cf:9000:a8ba:1089:2e3e:b3d1) (Quit: Leaving) |
2025-04-11 21:50:13 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-04-11 21:49:26 +0200 | jmcantrell_ | (644f1bed9a@user/jmcantrell) jmcantrell |
2025-04-11 21:49:13 +0200 | __jmcantrell__ | jmcantrell |
2025-04-11 21:49:13 +0200 | Guest8428 | (644f1bed9a@user/jmcantrell) (Killed (silver.libera.chat (Nickname regained by services))) |
2025-04-11 21:49:13 +0200 | jmcantrell | Guest8428 |
2025-04-11 21:49:09 +0200 | __jmcantrell__ | (~weechat@user/jmcantrell) jmcantrell |
2025-04-11 21:45:30 +0200 | euleritian | (~euleritia@95.90.214.149) |
2025-04-11 21:44:56 +0200 | euleritian | (~euleritia@ip5f5ad695.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2025-04-11 21:42:04 +0200 | notdabs | (~Owner@2600:1700:69cf:9000:5926:6835:ef1d:9af3) (Ping timeout: 260 seconds) |
2025-04-11 21:40:01 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds) |