Logs: freenode/#haskell
| 2021-05-11 18:46:08 | → | minoru_shiraeesh joins (~shiraeesh@109.166.58.80) |
| 2021-05-11 18:46:34 | <monochrom> | sortBy (comparing (\n -> ack n n)) |
| 2021-05-11 18:46:52 | <xe4> | can I get assistance with this basic quickcheck function? |
| 2021-05-11 18:46:57 | <xe4> | https://gist.github.com/xe-4/ba47bc1ae4ff747e5bcef6eeb88888bb |
| 2021-05-11 18:47:13 | × | CuPenguin quits (~CuPenguin@207.38.239.235) (Quit: WeeChat 3.1) |
| 2021-05-11 18:47:30 | → | nolrai joins (4c1bcada@c-76-27-202-218.hsd1.or.comcast.net) |
| 2021-05-11 18:47:49 | × | minoru_shiraeesh quits (~shiraeesh@109.166.58.80) (Remote host closed the connection) |
| 2021-05-11 18:48:54 | → | minoru_shiraeesh joins (~shiraeesh@109.166.58.80) |
| 2021-05-11 18:49:37 | <lyxia> | xe4: add an Arbitrary instance for NonEmpty |
| 2021-05-11 18:49:47 | <tomsmeding> | xe4: instance Arbitrary a => Arbitrary (NE.NonEmpty a) where arbitrary = (:|) <$> arbitrary <*> arbitrary |
| 2021-05-11 18:50:39 | → | notzmv joins (~zmv@unaffiliated/zmv) |
| 2021-05-11 18:52:03 | → | dpl_ joins (~dpl@77-121-78-163.chn.volia.net) |
| 2021-05-11 18:53:00 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 2021-05-11 18:53:09 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds) |
| 2021-05-11 18:53:15 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-05-11 18:56:29 | ← | jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client") |
| 2021-05-11 18:56:53 | → | CuPenguin joins (~CuPenguin@207.38.239.235) |
| 2021-05-11 18:58:26 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds) |
| 2021-05-11 19:04:48 | → | epicte7us joins (~epictetus@ip72-194-54-201.sb.sd.cox.net) |
| 2021-05-11 19:05:02 | × | CuPenguin quits (~CuPenguin@207.38.239.235) (Quit: WeeChat 3.1) |
| 2021-05-11 19:05:34 | × | carlomagno quits (~cararell@148.87.23.13) (Remote host closed the connection) |
| 2021-05-11 19:05:49 | → | carlomagno joins (~cararell@148.87.23.13) |
| 2021-05-11 19:06:34 | → | CuPenguin joins (~CuPenguin@207.38.239.235) |
| 2021-05-11 19:08:05 | × | ep1ctetus quits (~epictetus@ip72-194-54-201.sb.sd.cox.net) (Ping timeout: 268 seconds) |
| 2021-05-11 19:10:36 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 2021-05-11 19:11:42 | × | hypercube quits (~hypercube@137.112.239.172) (Quit: WeeChat 3.1) |
| 2021-05-11 19:12:15 | <thblt> | I'm reading /Thinking in Types/, and I'm learning a lot of *very* cool things, but it's kinda funny that the more advanced the book gets, the more it focuses on defeating what's usually marketed as the best features of Haskell. |
| 2021-05-11 19:12:53 | × | CuPenguin quits (~CuPenguin@207.38.239.235) (Quit: WeeChat 3.1) |
| 2021-05-11 19:13:00 | → | aerona_ joins (~aerona@2600:6c54:4600:f300:a087:e5ac:bbaa:7d1c) |
| 2021-05-11 19:13:01 | × | oxide quits (~lambda@unaffiliated/mclaren) (Ping timeout: 260 seconds) |
| 2021-05-11 19:13:16 | <thblt> | “See, with this very advanced features you can have purely dynamic types that make your program explode at runtime if you make a single mistake.” |
| 2021-05-11 19:15:43 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 2021-05-11 19:15:55 | → | hypercube joins (~hypercube@137.112.239.172) |
| 2021-05-11 19:16:10 | → | CuPenguin joins (~CuPenguin@207.38.239.235) |
| 2021-05-11 19:16:16 | → | oxide joins (~lambda@unaffiliated/mclaren) |
| 2021-05-11 19:16:31 | × | aerona quits (~aerona@2600:6c54:4600:f300:a087:e5ac:bbaa:7d1c) (Ping timeout: 276 seconds) |
| 2021-05-11 19:17:10 | × | CuPenguin quits (~CuPenguin@207.38.239.235) (Client Quit) |
| 2021-05-11 19:21:38 | × | aramend quits (~aramend@5.186.113.246.cgn.fibianet.dk) (Quit: Leaving) |
| 2021-05-11 19:22:00 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 2021-05-11 19:22:11 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 2021-05-11 19:22:45 | <ski> | @type GHC.Exts.sortWith |
| 2021-05-11 19:22:46 | <lambdabot> | Ord b => (a -> b) -> [a] -> [a] |
| 2021-05-11 19:24:00 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 2021-05-11 19:24:37 | <tomsmeding> | ah and that uses the sortBy implementation, cool |
| 2021-05-11 19:25:52 | × | jgt_ quits (~jgt@92-247-237-116.spectrumnet.bg) (Ping timeout: 240 seconds) |
| 2021-05-11 19:26:29 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 2021-05-11 19:26:47 | × | son0p quits (~ff@181.136.122.143) (Ping timeout: 246 seconds) |
| 2021-05-11 19:27:52 | × | nolrai quits (4c1bcada@c-76-27-202-218.hsd1.or.comcast.net) (Quit: Connection closed) |
| 2021-05-11 19:28:05 | → | Wizek joins (uid191769@gateway/web/irccloud.com/x-marzjbfjxkdjkaeq) |
| 2021-05-11 19:28:48 | → | jgt_ joins (~jgt@92-247-237-116.spectrumnet.bg) |
| 2021-05-11 19:28:58 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-05-11 19:30:15 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 2021-05-11 19:31:09 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds) |
| 2021-05-11 19:31:14 | <ski> | % :set -XTransformListComp |
| 2021-05-11 19:31:14 | <yahb> | ski: |
| 2021-05-11 19:31:35 | <ski> | % [w | w <- words "The quick brown fox jumps over the lazy dog",then GHC.Exts.sortWith by length w] -- iirc, it's in there, because of this |
| 2021-05-11 19:31:35 | <yahb> | ski: ["The","fox","the","dog","over","lazy","quick","brown","jumps"] |
| 2021-05-11 19:32:54 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 2021-05-11 19:33:10 | <ski> | % [w | w <- words "The quick brown fox jumps over the lazy dog",then group by length w using GHC.Exts.groupWith] |
| 2021-05-11 19:33:10 | <yahb> | ski: [["The","fox","the","dog"],["over","lazy"],["quick","brown","jumps"]] |
| 2021-05-11 19:33:26 | × | dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 260 seconds) |
| 2021-05-11 19:33:36 | <tomsmeding> | ah you're right |
| 2021-05-11 19:33:41 | <tomsmeding> | does anybody ever use that |
| 2021-05-11 19:38:49 | <ski> | % [(GHC.Exts.the len,w) | w <- words "The quick brown fox jumps over the lazy dog",let len = length w,then group by len using GHC.Exts.groupWith] |
| 2021-05-11 19:38:49 | <yahb> | ski: [(3,["The","fox","the","dog"]),(4,["over","lazy"]),(5,["quick","brown","jumps"])] |
| 2021-05-11 19:39:01 | <ski> | not sure it's used that often |
| 2021-05-11 19:40:46 | <ski> | <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/exts/generalised_list_comprehensions.html> |
| 2021-05-11 19:41:10 | → | safinaskar joins (~user@109-252-90-136.nat.spd-mgts.ru) |
| 2021-05-11 19:41:14 | <xerox_> | that's beautiful |
| 2021-05-11 19:43:26 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 2021-05-11 19:44:11 | → | stree joins (~stree@68.36.8.116) |
| 2021-05-11 19:44:31 | → | Rudd0^ joins (~Rudd0@185.189.115.103) |
| 2021-05-11 19:45:44 | <safinaskar> | is there parser libraries with unbiased choice? i. e. i want <|> to take both brances. And if final parse tree is ambiguous, I want parser library to tell me that. As opposed to Parsec (Parsec uses biased choice, and it will not detect ambiguities.) Package "Earley" uses unbiased choice and it detect ambiguities, but it has another problem: I want check for semantic errors (i. e. "undeclared |
| 2021-05-11 19:45:50 | <safinaskar> | identifier" or "type mismatch") as a side effect of parsing. So, I need either function "get current position" (so I can check semantic error and save current position for error reporting) or function "fail with semantic error", which should save position and report error. "Earley" (as opposed to Parsec) does not have this functions. So, is there other solutions? |
| 2021-05-11 19:46:33 | × | Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 240 seconds) |
| 2021-05-11 19:48:03 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-05-11 19:49:11 | × | Rudd0^ quits (~Rudd0@185.189.115.103) (Ping timeout: 260 seconds) |
| 2021-05-11 19:49:51 | × | epicte7us quits (~epictetus@ip72-194-54-201.sb.sd.cox.net) (Quit: Leaving) |
| 2021-05-11 19:50:24 | <monochrom> | Text.ParserCombinators.ReadP has an unbiased choice. (It also has a biased choice.) |
| 2021-05-11 19:50:42 | × | hololeap quits (hololeap@gateway/vpn/protonvpn/hololeap) (Quit: Bye) |
| 2021-05-11 19:51:04 | <monochrom> | I forgot which one it chose for <|> but you can always use its +++ to be sure. |
| 2021-05-11 19:51:24 | → | hexfive joins (~hexfive@50.35.83.177) |
| 2021-05-11 19:51:45 | <ski> | maybe `parsek' ? |
| 2021-05-11 19:52:21 | <monochrom> | ReadP is really designed and implemented with ambiguities in mind. "It parses all alternatives in parallel, so it never keeps hold of the beginning of the input string, a common source of space leaks with other parsers." |
| 2021-05-11 19:52:36 | <ski> | seems it has <https://hackage.haskell.org/package/parsek-1.0.4.0/docs/Text-ParserCombinators-Parsek-Position.html#v:getPosition> |
| 2021-05-11 19:53:57 | <monochrom> | Ah, ReadP doesn't have getPosition. |
| 2021-05-11 19:54:26 | <geekosaur> | or error reporting, really |
| 2021-05-11 19:55:33 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 2021-05-11 19:56:08 | → | neiluj joins (~jco@91-167-203-101.subs.proxad.net) |
| 2021-05-11 19:56:09 | × | neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host) |
| 2021-05-11 19:56:09 | → | neiluj joins (~jco@unaffiliated/neiluj) |
| 2021-05-11 19:56:19 | <ski> | (the need for `the' with `group by .. using ..' annoys me, but i'm not sure how/if one could do better) |
| 2021-05-11 19:56:57 | × | bitmagie quits (~Thunderbi@200116b806b92e00b8b7218edf9a11f7.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2021-05-11 19:57:26 | → | dpl_ joins (~dpl@77-121-78-163.chn.volia.net) |
| 2021-05-11 19:57:42 | → | m_shiraeeshi joins (~shiraeesh@109.166.59.168) |
| 2021-05-11 19:58:15 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 2021-05-11 19:58:40 | <monochrom> | "the" is a technicality function that got a wannabe-intuitive name |
| 2021-05-11 19:59:09 | × | minoru_shiraeesh quits (~shiraeesh@109.166.58.80) (Ping timeout: 260 seconds) |
| 2021-05-11 19:59:34 | <safinaskar> | ski: ok, i will try |
| 2021-05-11 20:00:22 | <monochrom> | Overall TransformListComp found a way of covering all desired use cases by going overly general (because the use cases are too different, really), and so we need a few of these technicality bridging functions. |
All times are in UTC.