Logs: liberachat/#haskell
| 2021-06-11 16:51:12 | → | welterde joins (welterde@thinkbase.srv.welterde.de) |
| 2021-06-11 16:51:14 | → | glguy_ joins (x@libera/staff/glguy) |
| 2021-06-11 16:51:17 | glguy_ | is now known as glguy |
| 2021-06-11 16:51:22 | → | ru0mad[m] joins (~ru0madmat@2001:470:69fc:105::9b2) |
| 2021-06-11 16:51:47 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 2021-06-11 16:51:55 | → | oak- joins (~oakuniver@2001:470:69fc:105::fcd) |
| 2021-06-11 16:52:25 | × | pretty_d1 quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2-rc1) |
| 2021-06-11 16:53:23 | jess | is now known as j |
| 2021-06-11 16:54:09 | → | mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) |
| 2021-06-11 16:54:57 | <safinaskar> | Please, SAVE THE WORLD from yet another (zillionth) parsing lib! I want monadic (or arrow based) parsing lib with unbiased choice. I didn't find one, so I am plan to write it and publish to hackage (this seems relatively easy for me, i already published libs to hackage in the past). So, please help me found lib I want, overwise I will have to write |
| 2021-06-11 16:54:58 | <safinaskar> | my own and publish it. This was THREAT! So, what I want? I want monadic (or arrow) parsing lib with unbiased choice. The lib should not merely output AST, instead it should allow post-processing the data interleaved with parsing. Also I want ability to generate errors and warnings with location info. See more here: https://paste.debian.net/1200885/ |
| 2021-06-11 16:55:49 | <int-e> | dminuoso: https://twitter.com/d_feldman/status/1399951777051598849 |
| 2021-06-11 16:56:27 | <dminuoso> | int-e: Haha! |
| 2021-06-11 16:57:02 | × | xff0x_ quits (~xff0x@185.65.135.235) (Ping timeout: 268 seconds) |
| 2021-06-11 16:57:32 | <exarkun> | Does Wai middleware have to do something special to handle error cases? |
| 2021-06-11 16:57:43 | → | boxscape joins (~boxscape@user/boxscape) |
| 2021-06-11 16:57:53 | <exarkun> | I tried to use Network.Wai.Middleware.Cors w/ Servant but it only does anything for success-case responses |
| 2021-06-11 16:58:05 | → | Andros joins (~Andros@176.116.80.1) |
| 2021-06-11 16:58:31 | → | xff0x_ joins (~xff0x@2001:1a81:5346:bf00:ada3:bdcd:e60c:3e25) |
| 2021-06-11 17:00:58 | <dminuoso> | exarkun: No, there's no special treatemnt of error cases. If that's the case, then that's how the middleware is written. |
| 2021-06-11 17:00:58 | → | kadoban joins (~kadoban@user/kadoban) |
| 2021-06-11 17:01:17 | <dminuoso> | Just out of curiosity, is this perhaps what you're looking for? https://hackage.haskell.org/package/wai-cors-0.2.7/docs/Network-Wai-Middleware-Cors.html#v:corsIgnoreFailures |
| 2021-06-11 17:01:25 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 2021-06-11 17:01:32 | <dminuoso> | Im not familiar with the library, it just looks like it's what you want perhaps. |
| 2021-06-11 17:02:15 | <dminuoso> | Ah no, that's something else. |
| 2021-06-11 17:02:17 | → | NieDzejkob joins (~quassel@195.149.98.3) |
| 2021-06-11 17:02:48 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 2021-06-11 17:02:55 | j | is now known as jess |
| 2021-06-11 17:03:00 | <exarkun> | now my test suite is giving me apparently conflicting information so I'm going to stare at it for a while and see if I can invent a consistent interpretation.. |
| 2021-06-11 17:04:15 | <dminuoso> | exarkun: Looking at the source code, it does not intercept responses. |
| 2021-06-11 17:04:26 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
| 2021-06-11 17:04:33 | → | siraben joins (~siraben@user/siraben) |
| 2021-06-11 17:04:34 | <dminuoso> | All the cors logic seems to happen before the request is handed off. |
| 2021-06-11 17:04:57 | <dminuoso> | See https://hackage.haskell.org/package/wai-cors-0.2.7/docs/src/Network.Wai.Middleware.Cors.html#cors |
| 2021-06-11 17:04:57 | → | img joins (~img@user/img) |
| 2021-06-11 17:06:39 | → | river joins (~river@tilde.team/user/river) |
| 2021-06-11 17:07:36 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 2021-06-11 17:08:21 | <safinaskar> | so? is there such parsing lib? (see my question above) |
| 2021-06-11 17:09:51 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 2021-06-11 17:10:14 | × | curiousgay quits (~quassel@178.217.208.8) (Read error: Connection reset by peer) |
| 2021-06-11 17:10:26 | × | jiribenes quits (~jiribenes@rosa.jiribenes.com) (Ping timeout: 265 seconds) |
| 2021-06-11 17:10:26 | × | NieDzejkob quits (~quassel@195.149.98.3) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 2021-06-11 17:10:46 | → | teaSlurper joins (~chris@81.96.113.213) |
| 2021-06-11 17:11:38 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 2021-06-11 17:11:50 | × | neceve quits (~quassel@2a02:c7f:607e:d600:a95a:ecd2:e57a:3130) (Ping timeout: 268 seconds) |
| 2021-06-11 17:12:44 | <exarkun> | meh seems like the middleware isn't doing _anything_ in the tests |
| 2021-06-11 17:13:03 | → | fgaz joins (~fgaz@2001:470:69fc:105::842) |
| 2021-06-11 17:13:46 | <dolio> | Is ReadP unbiased? |
| 2021-06-11 17:14:35 | <monochrom> | Yes. Its whole point. It also offers a biased <+++ |
| 2021-06-11 17:14:40 | <dolio> | Anything with `commit` instead of `try` is probably unbiased by default, too. |
| 2021-06-11 17:15:29 | <safinaskar> | for example? |
| 2021-06-11 17:15:43 | × | derelict quits (~derelict@user/derelict) (Ping timeout: 272 seconds) |
| 2021-06-11 17:16:09 | → | econo joins (uid147250@user/econo) |
| 2021-06-11 17:16:29 | × | Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
| 2021-06-11 17:18:23 | × | river quits (~river@tilde.team/user/river) (Quit: Leaving) |
| 2021-06-11 17:18:35 | <ski> | @hackage parsek -- also this |
| 2021-06-11 17:18:35 | <lambdabot> | https://hackage.haskell.org/package/parsek -- also this |
| 2021-06-11 17:19:26 | <dolio> | uu-parsinglib |
| 2021-06-11 17:19:31 | × | reumeth quits (~reumeth@user/reumeth) (Ping timeout: 272 seconds) |
| 2021-06-11 17:20:57 | → | haltux joins (~haltux@a89-154-181-47.cpe.netcabo.pt) |
| 2021-06-11 17:21:19 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2021-06-11 17:21:37 | → | hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com) |
| 2021-06-11 17:23:56 | <dolio> | The latter doesn't seem to have an explicit commit, just extra biased operators like ReadP. |
| 2021-06-11 17:24:45 | <safinaskar> | ski: function "parse" from Text-ParserCombinators-Parsek returns (Either (Err s) r) |
| 2021-06-11 17:24:52 | <safinaskar> | ski: you can see (r) here, not ([r]) |
| 2021-06-11 17:25:00 | <safinaskar> | ski: so, there is not unbiased choice |
| 2021-06-11 17:25:30 | <safinaskar> | ski: oops, i missed "allResults" |
| 2021-06-11 17:25:33 | <dolio> | That seems like a non sequitur. |
| 2021-06-11 17:25:39 | × | Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 272 seconds) |
| 2021-06-11 17:25:49 | → | lbseale_ joins (~lbseale@user/ep1ctetus) |
| 2021-06-11 17:26:14 | → | maralorn joins (~maralorn@2001:470:69fc:105::251) |
| 2021-06-11 17:26:32 | × | teaSlurper quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-06-11 17:27:13 | <safinaskar> | ski: but i don't see any way in "parsek" to report semantic error (i. e. "mismatched type") or embed some another monad into parsek |
| 2021-06-11 17:27:58 | → | psydroid joins (~psydroidm@2001:470:69fc:105::165) |
| 2021-06-11 17:28:33 | <dolio> | Type checking during parsing is a bad idea. |
| 2021-06-11 17:28:58 | <safinaskar> | dolio: i still want this |
| 2021-06-11 17:29:08 | × | lbseale quits (~lbseale@user/ep1ctetus) (Ping timeout: 264 seconds) |
| 2021-06-11 17:29:17 | <safinaskar> | dolio: i want to write some simple prover |
| 2021-06-11 17:29:34 | <safinaskar> | dolio: and i want to check various non-parsing errors during parsing |
| 2021-06-11 17:29:50 | <safinaskar> | parsec allows this |
| 2021-06-11 17:29:54 | → | hexfive joins (~eric@50.35.83.177) |
| 2021-06-11 17:29:54 | × | hexfive quits (~eric@50.35.83.177) (Client Quit) |
| 2021-06-11 17:31:24 | → | teaSlurper joins (~chris@81.96.113.213) |
| 2021-06-11 17:32:12 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 2021-06-11 17:32:46 | × | psydroid quits (~psydroidm@2001:470:69fc:105::165) (Changing host) |
| 2021-06-11 17:32:46 | → | psydroid joins (~psydroidm@user/psydroid) |
| 2021-06-11 17:32:53 | <ski> | hm, i guess you want to interleave some checking effects with the parsing (since otherwise i think you could just have the parse result be a function or an action) |
| 2021-06-11 17:33:58 | × | averell- quits (~averell@user/averell) (Remote host closed the connection) |
| 2021-06-11 17:34:09 | → | neceve joins (~quassel@2a02:c7f:607e:d600:a95a:ecd2:e57a:3130) |
| 2021-06-11 17:35:02 | × | gethuen quits (uid502979@id-502979.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
| 2021-06-11 17:35:06 | <safinaskar> | dolio: function "parse" from uu-parsinglib has very strange type: (P t a -> t -> a). so, this function cannot report errors at all?! |
| 2021-06-11 17:35:24 | <dolio> | Not sure, I'm not very familiar with it. |
| 2021-06-11 17:35:35 | × | teaSlurper quits (~chris@81.96.113.213) (Ping timeout: 244 seconds) |
| 2021-06-11 17:36:29 | <tomsmeding> | safinaskar: see the source of that function, it's partial |
| 2021-06-11 17:36:43 | <tomsmeding> | so I expect there to be a different function that exposes the error in a value |
| 2021-06-11 17:37:39 | <tomsmeding> | or... there is pErrors |
| 2021-06-11 17:37:41 | <tomsmeding> | this API is wacky |
| 2021-06-11 17:38:05 | <tomsmeding> | safinaskar: try using pEnd |
| 2021-06-11 17:40:09 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 2021-06-11 17:41:08 | → | agumonke` joins (~user@88.163.231.79) |
All times are in UTC.