Logs: freenode/#haskell
| 2020-10-02 10:28:15 | <tomjaguarpaw> | If you could go to the PR and explain why that would be a good start :) |
| 2020-10-02 10:28:45 | × | snakemasterflex quits (~snakemast@213.100.206.23) (Ping timeout: 240 seconds) |
| 2020-10-02 10:29:16 | → | shatriff joins (~vitaliish@178-133-29-105.mobile.vf-ua.net) |
| 2020-10-02 10:30:10 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-02 10:31:36 | → | snakemasterflex joins (~snakemast@213.100.206.23) |
| 2020-10-02 10:32:28 | → | hekkaidekapus joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 2020-10-02 10:32:56 | → | ph88 joins (~ph88@46.183.103.8) |
| 2020-10-02 10:33:25 | × | ph88 quits (~ph88@46.183.103.8) (Remote host closed the connection) |
| 2020-10-02 10:33:27 | hackage | th-lego 0.1.0.3 - Template Haskell construction utilities https://hackage.haskell.org/package/th-lego-0.1.0.3 (NikitaVolkov) |
| 2020-10-02 10:33:55 | × | alp quits (~alp@2a01:e0a:58b:4920:b4e0:35e5:8ad8:3e24) (Ping timeout: 240 seconds) |
| 2020-10-02 10:34:24 | → | ericsagnes joins (~ericsagne@2405:6580:0:5100:85dd:325e:8566:f6fa) |
| 2020-10-02 10:34:50 | × | niko quits (~niko@freenode/staff/ubuntu.member.niko) (Ping timeout: 619 seconds) |
| 2020-10-02 10:34:51 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-10-02 10:36:15 | → | dhil joins (~dhil@11.29.39.217.dyn.plus.net) |
| 2020-10-02 10:36:44 | <maralorn> | dminuoso: Does interact split line by line or does it rely on lazyness? |
| 2020-10-02 10:36:51 | → | ph88 joins (~ph88@46.183.103.8) |
| 2020-10-02 10:36:51 | <phadej> | dminuoso, tomjaguarpaw for whole of september I was concentrating on polishing 3.4 release, there are still some (but I hope only one in Cabal-the-lib), and GHC-9.0-alpha1 is already out |
| 2020-10-02 10:36:59 | <phadej> | so sorry for not context switching |
| 2020-10-02 10:37:28 | <hc> | context switching is bad anyway. (I do it everytime I am waiting for the compiler to finish, though ;p ) |
| 2020-10-02 10:37:34 | <maralorn> | Also, I would like a solution that preserves terminal controlcode formating. |
| 2020-10-02 10:37:50 | × | snakemasterflex quits (~snakemast@213.100.206.23) (Ping timeout: 258 seconds) |
| 2020-10-02 10:38:29 | <hc> | maralorn: interact relies on lazyness |
| 2020-10-02 10:39:43 | <maralorn> | Other question how can I build a state machine based parser? |
| 2020-10-02 10:40:25 | → | jgt joins (~jgt@188.239.64.32) |
| 2020-10-02 10:40:50 | → | draliana joins (draliana@bl6-172-220.dsl.telepac.pt) |
| 2020-10-02 10:41:14 | <maralorn> | Right now I parse a line that could be one of many things with megaparsec and I do it very terribly by having one parser for every possible variant and "try" them one after the otherr. |
| 2020-10-02 10:41:20 | → | HaskellYogi joins (~vivekrama@49.207.202.80) |
| 2020-10-02 10:41:59 | × | shatriff quits (~vitaliish@178-133-29-105.mobile.vf-ua.net) (Remote host closed the connection) |
| 2020-10-02 10:42:04 | <ski> | perhaps you could try Happy |
| 2020-10-02 10:42:30 | → | Guest18 joins (567e8866@gateway/web/cgi-irc/kiwiirc.com/ip.86.126.136.102) |
| 2020-10-02 10:44:10 | → | kuribas joins (~user@ptr-25vy0i9v0yveatz4g8h.18120a2.ip6.access.telenet.be) |
| 2020-10-02 10:45:08 | <maralorn> | Is the documentation for happy rendered somewhere? The webpage linked on hackage apparently hasn‘t been updated since 2010 (!) https://www.haskell.org/happy/ |
| 2020-10-02 10:46:25 | × | ericsagnes quits (~ericsagne@2405:6580:0:5100:85dd:325e:8566:f6fa) (Ping timeout: 240 seconds) |
| 2020-10-02 10:48:18 | × | HaskellYogi quits (~vivekrama@49.207.202.80) (Remote host closed the connection) |
| 2020-10-02 10:48:56 | → | HaskellYogi joins (~vivekrama@49.207.202.80) |
| 2020-10-02 10:49:43 | <tomjaguarpaw> | phadej: No problem at all. |
| 2020-10-02 10:49:48 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-02 10:50:02 | × | cpressey quits (~cpressey@88.144.70.46) (Quit: WeeChat 1.9.1) |
| 2020-10-02 10:50:48 | <phadej> | s/some/some bugs |
| 2020-10-02 10:51:28 | × | Wamanuz quits (~wamanuz@78-70-34-81-no84.tbcn.telia.com) (Remote host closed the connection) |
| 2020-10-02 10:51:54 | <ski> | @hackage happy |
| 2020-10-02 10:51:55 | <lambdabot> | https://hackage.haskell.org/package/happy |
| 2020-10-02 10:52:04 | → | ph88^ joins (~ph88@46.183.103.8) |
| 2020-10-02 10:52:20 | <ski> | perhaps |
| 2020-10-02 10:52:22 | <ski> | @where bnfc |
| 2020-10-02 10:52:22 | <lambdabot> | BNF Converter, http://bnfc.digitalgrammars.com/ |
| 2020-10-02 10:52:34 | <ski> | could also be useful, depending on what you want to do |
| 2020-10-02 10:52:44 | <ski> | (it uses Happy) |
| 2020-10-02 10:53:08 | → | alp joins (~alp@2a01:e0a:58b:4920:1515:91a6:893c:5718) |
| 2020-10-02 10:54:19 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds) |
| 2020-10-02 10:54:27 | × | HaskellYogi quits (~vivekrama@49.207.202.80) (Ping timeout: 260 seconds) |
| 2020-10-02 10:55:27 | × | ph88 quits (~ph88@46.183.103.8) (Ping timeout: 240 seconds) |
| 2020-10-02 10:55:33 | → | HaskellYogi joins (~vivekrama@49.207.202.80) |
| 2020-10-02 10:55:53 | → | perdent joins (~blah@101.175.84.75) |
| 2020-10-02 10:55:55 | <maralorn> | ski: happy seems a bit of an overkill for my purpose. Especially because I want to look at an input stream, see if something in there parses and if not take that line as "raw" and proceed to the next line. |
| 2020-10-02 10:56:04 | <perdent> | For all the the integers in the interval [100, 1400] which are a multiple of 20, find the numbers that have a digit sum of 14. The solution to the challenge is the average of all the resulting numbers, rounded up to an integral value. The digit sum of a number is the sum of all decimal digits. For example, the digit sum of 324 is 3+2+4=9. |
| 2020-10-02 10:56:29 | → | mmohammadi98120 joins (~mmohammad@5.238.160.203) |
| 2020-10-02 10:58:25 | × | mmohammadi9812 quits (~mmohammad@2.178.202.133) (Ping timeout: 264 seconds) |
| 2020-10-02 10:58:33 | → | Wamanuz joins (~wamanuz@78-70-34-81-no84.tbcn.telia.com) |
| 2020-10-02 10:59:08 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 2020-10-02 10:59:41 | <maralorn> | Or phrased differently: ski, how do I deal with a grammar where a certain input can have multiple generators? |
| 2020-10-02 10:59:57 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-02 11:00:02 | → | mmohammadi9812 joins (~mmohammad@2.178.165.42) |
| 2020-10-02 11:00:13 | <ski> | dunno what you mean by "multiple generators" ? |
| 2020-10-02 11:00:16 | <tomsmeding> | maralorn: how hard is it to determine what case the line falls in from looking at the line? |
| 2020-10-02 11:00:27 | × | HaskellYogi quits (~vivekrama@49.207.202.80) (Ping timeout: 265 seconds) |
| 2020-10-02 11:00:29 | <ski> | you mean the grammar is ambiguous ? |
| 2020-10-02 11:00:31 | <tomsmeding> | like, would case-switching on head (words line) work? :p |
| 2020-10-02 11:00:39 | <ski> | perdent : is it Haskell-related ? |
| 2020-10-02 11:01:04 | <perdent> | No ignore it |
| 2020-10-02 11:01:09 | → | HaskellYogi joins (~vivekrama@49.207.202.80) |
| 2020-10-02 11:01:42 | <maralorn> | tomsmeding: It's not that easy. |
| 2020-10-02 11:01:44 | <ski> | (you mean you sent it in here, by mistake ?) |
| 2020-10-02 11:02:14 | <tomsmeding> | maralorn: okay, what algorithm did you have in mind then, ignoring complexity of implementation? |
| 2020-10-02 11:02:23 | × | mmohammadi98120 quits (~mmohammad@5.238.160.203) (Ping timeout: 265 seconds) |
| 2020-10-02 11:03:05 | <perdent> | Yeah |
| 2020-10-02 11:03:08 | → | mmohammadi98126 joins (~mmohammad@2.178.216.171) |
| 2020-10-02 11:03:52 | <maralorn> | tomsmeding: Right now I do this: Look at the line, does it match a) if yes process if no does it match b) if yes ... until if it does not match anything at all process as "raw" |
| 2020-10-02 11:04:14 | <maralorn> | The problem is that some of the cases have long common prefixes. |
| 2020-10-02 11:04:22 | <tomsmeding> | ah |
| 2020-10-02 11:04:31 | <tomsmeding> | long as in? |
| 2020-10-02 11:04:32 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-10-02 11:04:52 | <ski> | maralorn : could you reasonably left-factor those cases ? |
| 2020-10-02 11:05:10 | <maralorn> | long as in I don‘t have a performance problem at all, my program works I just want it to be pretty.^^ |
| 2020-10-02 11:05:18 | <tomsmeding> | :D |
| 2020-10-02 11:05:25 | <maralorn> | ski: I am not sure I know what that means. |
| 2020-10-02 11:05:34 | × | mmohammadi9812 quits (~mmohammad@2.178.165.42) (Ping timeout: 272 seconds) |
| 2020-10-02 11:05:49 | × | HaskellYogi quits (~vivekrama@49.207.202.80) (Ping timeout: 258 seconds) |
| 2020-10-02 11:06:01 | <tomsmeding> | what ski said, or perhaps use an applicative parser library that includes a decent optimiser (I don't know if that exists)? |
| 2020-10-02 11:06:10 | <maralorn> | I have actually solved the trickiest one by having a Parser (Either MatchA MatchB) … |
| 2020-10-02 11:06:44 | → | HaskellYogi joins (~vivekrama@49.207.202.80) |
| 2020-10-02 11:07:03 | <tomsmeding> | I take it that ski meant going from try (string "prefixA" >> return 1) <|> try (string "prefixB" >> return 2) to the following: try (string "prefix" >> ((char 'A' >> return 1) <|> (char 'B' >> return 2)) |
| 2020-10-02 11:07:28 | <maralorn> | Ah, nice. |
| 2020-10-02 11:07:36 | <ski> | yes |
| 2020-10-02 11:08:01 | <tomsmeding> | modulo syntactic details :p |
| 2020-10-02 11:08:13 | × | mmohammadi98126 quits (~mmohammad@2.178.216.171) (Ping timeout: 260 seconds) |
| 2020-10-02 11:08:46 | <tomsmeding> | but I think that if you can express your parsers in applicative form, a good optimiser would be able to perform that left-factoring automatically |
| 2020-10-02 11:08:59 | → | noobhaskell joins (6763cd07@103.99.205.7) |
| 2020-10-02 11:09:06 | <tomsmeding> | but I don't know whether that's actually true, and also I don't know whether such a good library exists |
| 2020-10-02 11:09:15 | <maralorn> | Does megaparsec do something like that? |
All times are in UTC.