Logs: liberachat/#haskell
| 2021-06-01 06:40:37 | × | ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Quit: leaving) |
| 2021-06-01 06:41:39 | <[exa]> | kinda thinking, why'd they have the "show" in the definition? doesn't it totally obliterate any unicode in the error messages? |
| 2021-06-01 06:42:46 | × | pe200012_ quits (~pe200012@120.236.162.14) (Ping timeout: 264 seconds) |
| 2021-06-01 06:45:14 | × | rubin55 quits (sid175221@id-175221.stonehaven.irccloud.com) () |
| 2021-06-01 06:45:35 | → | rubin55 joins (sid175221@id-175221.stonehaven.irccloud.com) |
| 2021-06-01 06:45:56 | × | rubin55 quits (sid175221@id-175221.stonehaven.irccloud.com) (Client Quit) |
| 2021-06-01 06:46:24 | → | rubin55 joins (sid175221@id-175221.stonehaven.irccloud.com) |
| 2021-06-01 06:46:32 | → | holy_ joins (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) |
| 2021-06-01 06:47:24 | → | Cubic joins (~hannesste@ip5f5be453.dynamic.kabel-deutschland.de) |
| 2021-06-01 06:50:41 | <Guest6538> | comment = string "--" *> (manyTill anyChar newline) |
| 2021-06-01 06:50:47 | <Guest6538> | newSpaces = spaces <|> comment |
| 2021-06-01 06:51:27 | → | mc47 joins (~yecinem@89.246.239.190) |
| 2021-06-01 06:52:08 | <hololeap> | dy, is this what you were referring to by refinement types? https://hackage.haskell.org/package/refined |
| 2021-06-01 06:52:16 | <dy> | No, think Liquid Haskell |
| 2021-06-01 06:52:19 | <int-e> | > let x --> y = y in 2 --> 4 |
| 2021-06-01 06:52:20 | <lambdabot> | 4 |
| 2021-06-01 06:52:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-01 06:52:24 | <Guest6538> | Expected type: ParsecT String u Data.Functor.Identity.Identity () ; Actual type: ParsecT String u Data.Functor.Identity.Identity [Char]; In the second argument of ‘(<|>)’, |
| 2021-06-01 06:52:28 | <hololeap> | I've never used it |
| 2021-06-01 06:52:42 | <Guest6538> | where is wrong? |
| 2021-06-01 06:52:59 | <Axman6> | what is the type of: comment, spaces and <|> |
| 2021-06-01 06:53:24 | <int-e> | :t void |
| 2021-06-01 06:53:24 | <dy> | It looks like that refined package is a similar idea? Not entirely clear. Haven't seen it befofez |
| 2021-06-01 06:53:25 | <lambdabot> | Functor f => f a -> f () |
| 2021-06-01 06:53:32 | → | beka joins (~beka@104.193.170-254.PUBLIC.monkeybrains.net) |
| 2021-06-01 06:53:37 | <Axman6> | int-e: we'll get to that ;) |
| 2021-06-01 06:53:38 | <Guest6538> | oh, <|> ask the same type |
| 2021-06-01 06:53:42 | <int-e> | Axman6: I know |
| 2021-06-01 06:54:17 | <dy> | Untyped comments? In my Haskell? |
| 2021-06-01 06:54:26 | <dy> | "It's more likely than you think!" |
| 2021-06-01 06:55:03 | <int-e> | dy: "untyped", hmmmm. Sometimes it's better to not type a comment and let the code speak for itself. |
| 2021-06-01 06:55:28 | <int-e> | @where semantics |
| 2021-06-01 06:55:28 | <lambdabot> | I know nothing about semantics. |
| 2021-06-01 06:55:40 | <dminuoso> | That should be a quote. |
| 2021-06-01 06:55:52 | → | chele joins (~chele@user/chele) |
| 2021-06-01 06:56:42 | × | azeem quits (~azeem@dynamic-adsl-84-220-228-254.clienti.tiscali.it) (Quit: Quit) |
| 2021-06-01 06:56:51 | → | azeem joins (~azeem@dynamic-adsl-84-220-228-254.clienti.tiscali.it) |
| 2021-06-01 06:58:02 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 2021-06-01 06:58:23 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 2021-06-01 06:59:29 | <hololeap> | I also haven't seen it befofez |
| 2021-06-01 07:02:34 | <Guest6538> | comment = string "--" *> (manyTill anyChar newline) $> () |
| 2021-06-01 07:02:40 | <Guest6538> | newSpaces = spaces <|> comment |
| 2021-06-01 07:02:55 | <Guest6538> | dminuoso use this newSpaces intead of spaces is ok? |
| 2021-06-01 07:05:22 | <dminuoso> | Guest6538: Its not needed, `spaces` already covers this need. |
| 2021-06-01 07:06:04 | <dminuoso> | Guest6538: The idea is that `space` takes three lexers/consumers. One that consumes regular whitespace, one that consumes line comments and one that consumes block comments. |
| 2021-06-01 07:06:12 | <dminuoso> | So if we look at the implementation |
| 2021-06-01 07:06:41 | <dminuoso> | space sp line block = skipMany (choice [sp, line, block]) |
| 2021-06-01 07:07:00 | <dminuoso> | You can see this just munches all contiguous whitespace, line and block comments |
| 2021-06-01 07:07:29 | <dminuoso> | Ah naming confusion |
| 2021-06-01 07:08:05 | → | raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-06-01 07:08:18 | <dminuoso> | Guest6538: Its not enough |
| 2021-06-01 07:08:39 | <Guest6538> | dminuoso, but this `spaces` is from megaparsec? |
| 2021-06-01 07:08:55 | <dminuoso> | Guest6538: So lets avoid confusion now: |
| 2021-06-01 07:09:00 | <dminuoso> | I propose a simple combinator called: |
| 2021-06-01 07:09:13 | <Guest6538> | dminuoso what if the comment character is not '--' but '#' or '//'? |
| 2021-06-01 07:09:21 | <dminuoso> | munch sp line block = skipMany (choice [sp, line, block]) |
| 2021-06-01 07:09:41 | <dminuoso> | The implementation of `munch` mimics the implementation of `space` from megaparsec, it's unlike `space` from parsec. |
| 2021-06-01 07:09:47 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 2021-06-01 07:10:01 | <dminuoso> | Guest6538: This combinator is almost like your `newSpaces` but differs chiefly in 3 aspects. |
| 2021-06-01 07:10:13 | <dminuoso> | 1) Your combinator wont work if there's any further whitespace after the comment |
| 2021-06-01 07:10:23 | <dminuoso> | 2) Your combinator wont accept block comments (might be important to you or not) |
| 2021-06-01 07:10:34 | <dminuoso> | 3) Your combinator is fixed rather than parametrized |
| 2021-06-01 07:11:02 | × | tonyday quits (~user@202-65-93-249.ip4.superloop.com) (Remote host closed the connection) |
| 2021-06-01 07:12:13 | <dminuoso> | The idea is that you'd write something like `sc = munch spaces lineComment blockComment where lineComment = string "--" *> manyTill anyChar newline; blockComment = string "{-" *> manyTill anyChar (string "-}")` |
| 2021-06-01 07:12:25 | → | jakzale joins (uid499518@id-499518.charlton.irccloud.com) |
| 2021-06-01 07:12:28 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 2021-06-01 07:13:21 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 2021-06-01 07:14:20 | → | thiross joins (~user@173.242.113.143.16clouds.com) |
| 2021-06-01 07:14:28 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 2021-06-01 07:14:43 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 2021-06-01 07:17:43 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 2021-06-01 07:17:54 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 2021-06-01 07:17:57 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 2021-06-01 07:18:53 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 264 seconds) |
| 2021-06-01 07:20:37 | → | xprlgjf joins (~gavin@60.27.93.209.dyn.plus.net) |
| 2021-06-01 07:22:41 | <Guest6538> | dminuoso, I should copy `spaces` and `lexeme` from https://hackage.haskell.org/package/megaparsec-9.0.1/docs/src/Text.Megaparsec.Lexer.html#space ? |
| 2021-06-01 07:25:51 | → | dpl_ joins (~dpl@77-121-78-163.chn.volia.net) |
| 2021-06-01 07:26:25 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 2021-06-01 07:26:39 | × | ixlun quits (~user@109.249.184.235) (Remote host closed the connection) |
| 2021-06-01 07:26:49 | → | Shaeto joins (~Shaeto@94.25.234.213) |
| 2021-06-01 07:28:33 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 2021-06-01 07:35:04 | → | riatre joins (~quassel@2001:310:6000:f::5198:1) |
| 2021-06-01 07:36:07 | × | riatre_ quits (~quassel@2001:310:6000:f::5198:1) (Ping timeout: 272 seconds) |
| 2021-06-01 07:36:23 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 2021-06-01 07:36:32 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 2021-06-01 07:36:35 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 2021-06-01 07:36:53 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 2021-06-01 07:38:33 | × | holy_ quits (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) (Ping timeout: 268 seconds) |
| 2021-06-01 07:38:35 | × | river quits (~river@tilde.team/user/river) (Quit: Leaving) |
| 2021-06-01 07:41:06 | × | thiross quits (~user@173.242.113.143.16clouds.com) (Ping timeout: 264 seconds) |
| 2021-06-01 07:41:14 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 252 seconds) |
| 2021-06-01 07:44:32 | → | thiross joins (~user@173.242.113.143.16clouds.com) |
| 2021-06-01 07:45:28 | <albet70> | is there bot here? |
| 2021-06-01 07:45:32 | <dminuoso> | Yes. |
| 2021-06-01 07:45:58 | <albet70> | :t id |
| 2021-06-01 07:45:59 | <lambdabot> | a -> a |
| 2021-06-01 07:46:14 | <dminuoso> | We also have yahb, which can be triggered by % |
| 2021-06-01 07:46:16 | <dminuoso> | % :t id |
| 2021-06-01 07:46:16 | <yahb> | dminuoso: a -> a |
| 2021-06-01 07:46:36 | <albet70> | what it short for? |
All times are in UTC.