Logs: liberachat/#haskell
| 2021-06-26 18:01:50 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@192.252.212.45) |
| 2021-06-26 18:02:11 | <dsal> | euandreh: is there a particular thing that you're stuck on? |
| 2021-06-26 18:03:11 | × | Schrostfutz quits (~Schrostfu@p5de88aa6.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 2021-06-26 18:05:50 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 244 seconds) |
| 2021-06-26 18:08:15 | <euandreh> | dsal: not really, I'm just interested in parsers in general, and I wanted to better learn Haskell through that. |
| 2021-06-26 18:09:05 | <euandreh> | I've picked Parsec and AttoParsec, and dive into the implementation. I could just do that, but I really like learning via books :) |
| 2021-06-26 18:09:21 | <dsal> | euandreh: Oh, then one thing that might be *super* helpful is writing your own parser from scratch. You'll learn functors and applicatives and some monads and stuff while also having lots of magic melt away. |
| 2021-06-26 18:10:41 | <euandreh> | I did write my own parser combinator library, but not yet in Haskell. I wanted to dive into the implementations to improve the error messages of my own implementation |
| 2021-06-26 18:11:05 | <dsal> | Ah. megaparsec is basically that stuff you'd write anyway, but with good error messages. :) |
| 2021-06-26 18:11:17 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 2021-06-26 18:11:46 | <dsal> | "the implementation" is mostly just functors, applicatives, alternatives, and some simple monads (/monadfail). |
| 2021-06-26 18:12:00 | <euandreh> | Yes, MegaParsec also. I've looked at it too a bit, it seems nice |
| 2021-06-26 18:17:29 | × | dunkeln quits (~dunkeln@188.71.193.140) (Ping timeout: 258 seconds) |
| 2021-06-26 18:19:09 | <dmj`> | euandreh: http://dev.stephendiehl.com/fun/002_parsers.html |
| 2021-06-26 18:19:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-26 18:20:51 | → | Guest9 joins (~Guest9@103.86.19.137) |
| 2021-06-26 18:26:44 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 2021-06-26 18:27:09 | <euandreh> | ty |
| 2021-06-26 18:27:19 | <dmj`> | yw |
| 2021-06-26 18:28:49 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c4e3:f231:bc2a:37da) |
| 2021-06-26 18:31:18 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 272 seconds) |
| 2021-06-26 18:31:33 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 2021-06-26 18:34:55 | <carmysilna> | Slightly tangential, but I'm writing a parser/pretty-printer combinator library that lets you write a single syntactic description and get both a parser and a pretty-printer for free. The current impls are very bare and un-featureful so if anyone would want to help me improve them, they'd be more than welcome! https://github.com/brightly-salty/inversify |
| 2021-06-26 18:35:03 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
| 2021-06-26 18:40:11 | → | Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se) |
| 2021-06-26 18:41:22 | → | teaSlurper joins (~chris@81.96.113.213) |
| 2021-06-26 18:41:35 | × | peterhil quits (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) (Quit: Must not waste too much time here...) |
| 2021-06-26 18:42:01 | <flipchan> | if anyone is looking for work: https://haskell.careers |
| 2021-06-26 18:42:33 | × | Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Client Quit) |
| 2021-06-26 18:43:36 | → | peterhil joins (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) |
| 2021-06-26 18:43:46 | → | Ariakenom joins (~Ariakenom@c83-255-154-140.bredband.tele2.se) |
| 2021-06-26 18:46:20 | × | flipchan quits (~yumman@88.131.87.132) (Changing host) |
| 2021-06-26 18:46:20 | → | flipchan joins (~yumman@user/flipchan) |
| 2021-06-26 18:46:30 | × | teaSlurper quits (~chris@81.96.113.213) (Ping timeout: 272 seconds) |
| 2021-06-26 18:49:28 | → | Morrow joins (~MorrowM_@147.161.9.7) |
| 2021-06-26 18:51:13 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 258 seconds) |
| 2021-06-26 18:53:14 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 2021-06-26 18:55:46 | <TheCommieDuck> | is there a cut-and-dry whether to prefer generics or TH? thinking of e.g. lens, where if you're not using the typed generic lenses then it's basically identical |
| 2021-06-26 19:00:12 | <dmj`> | TheCommieDuck: Not really, Generics can have a higher runtime cost potentially, depending on how it was implemented (aeson generics instances were slower than aeson th instances). Template Haskell usually becomes problematic if you have a lot of it, or you're cross compiling. They're also not entirely equivalent, TH you can define new datatypes, w/ Generics you can only derive objects from pre-existing data types. |
| 2021-06-26 19:00:55 | <TheCommieDuck> | oh sure, I get that TH definitely has more scope; I was thinking solely in the cases that you're comparing very similar functionality |
| 2021-06-26 19:00:58 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-06-26 19:02:25 | <dmj`> | I'd use Generics until performance is a problem, and if it never is, then great. |
| 2021-06-26 19:03:14 | → | dunkeln joins (~dunkeln@188.71.193.140) |
| 2021-06-26 19:05:36 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 2021-06-26 19:13:40 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c4e3:f231:bc2a:37da) (Remote host closed the connection) |
| 2021-06-26 19:14:25 | × | nurupo quits (~nurupo.ga@user/nurupo) (Quit: nurupo.ga) |
| 2021-06-26 19:14:31 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c4e3:f231:bc2a:37da) |
| 2021-06-26 19:15:28 | → | nurupo joins (~nurupo.ga@user/nurupo) |
| 2021-06-26 19:17:41 | <ChaiTRex> | What's the latest GHC that cabal-install 3.4 supports? |
| 2021-06-26 19:18:48 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Read error: Connection reset by peer) |
| 2021-06-26 19:19:16 | × | pbrisbin quits (~patrick@pool-173-49-147-28.phlapa.fios.verizon.net) (Ping timeout: 252 seconds) |
| 2021-06-26 19:19:35 | → | mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) |
| 2021-06-26 19:21:41 | → | kw joins (~user@2605:a601:a615:f600:601:15f2:ebf9:271) |
| 2021-06-26 19:24:02 | → | Pickchea joins (~private@user/pickchea) |
| 2021-06-26 19:24:10 | <kw> | Is there a good way to use polymorphic lens classes (i.e. `class HasFoo s t a b | s -> a, t -> b where ...` ) without running into ambiguous type errors? Do I need more restrictive fundeps, like `HasFoo s t a b | s -> a, t -> b, a t -> s, b s -> t` ? |
| 2021-06-26 19:30:18 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.0.1) |
| 2021-06-26 19:30:46 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2021-06-26 19:31:36 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 2021-06-26 19:31:39 | <dminuoso> | kw: Can you give some specific code that provokes an ambiguous type error with these classy lenses? |
| 2021-06-26 19:34:09 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 258 seconds) |
| 2021-06-26 19:34:27 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-06-26 19:36:08 | <motte_> | why doesn't this compile: https://paste.tomsmeding.com/qyMZQak4 ? nonsensical example but i really don't get it - it compiles when i move fn out of the where block |
| 2021-06-26 19:36:38 | <dminuoso> | motte_: The binding is tied to the single last definition |
| 2021-06-26 19:36:50 | <dminuoso> | Each declaration of `test` is separate |
| 2021-06-26 19:37:33 | <dminuoso> | If you want to share a binding over a group like that, you could do something like `test = go where fn = id; go x False = ...; go x True = ...; |
| 2021-06-26 19:37:40 | <geekosaur> | where scopes over guards, not equations |
| 2021-06-26 19:37:49 | <motte_> | oh |
| 2021-06-26 19:38:11 | <motte_> | pretty odd that i havent ran into this before |
| 2021-06-26 19:40:29 | <EvanR> | yeah where is not just a respelling of lett |
| 2021-06-26 19:40:34 | <EvanR> | let |
| 2021-06-26 19:41:34 | <dminuoso> | geekosaur: Mmm, "guards"? |
| 2021-06-26 19:41:57 | <glguy> | f | this = that | the = other where a = b |
| 2021-06-26 19:42:12 | <dminuoso> | Ahh. "Scopes over" meant something different than what I thought. |
| 2021-06-26 19:42:17 | × | kw quits (~user@2605:a601:a615:f600:601:15f2:ebf9:271) (Quit: ERC (IRC client for Emacs 27.1)) |
| 2021-06-26 19:48:24 | <dmj`> | I wish quasiquoters could take arguments, [| query schema | select 2 + 2; |] |
| 2021-06-26 19:48:42 | <dminuoso> | dmj`: let qq = query schema in [qq| ... |] ? |
| 2021-06-26 19:48:54 | <qrpnxz> | speaking of, what does `class TypeBoy a a' | a' -> a where` mean? what is that pipe doing there? |
| 2021-06-26 19:49:02 | <dminuoso> | qrpnxz: Its a functional dependency |
| 2021-06-26 19:49:08 | <qrpnxz> | wut |
| 2021-06-26 19:49:21 | <dminuoso> | https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/functional_dependencies.html |
| 2021-06-26 19:49:54 | <qrpnxz> | ty sir |
| 2021-06-26 19:49:55 | <dminuoso> | Mmm, the manual is very lacking here |
| 2021-06-26 19:50:21 | <dminuoso> | Oh hah nevermind. Its all good |
| 2021-06-26 19:50:29 | <dminuoso> | My browser misrendered apparently] |
| 2021-06-26 19:50:53 | <qrpnxz> | lol |
| 2021-06-26 19:51:29 | <qrpnxz> | i didn't even know there was an honest to goodness manual for this language, i'm always having to like look at the base lib docks and hunt stuff in the wiki, or ask here |
| 2021-06-26 19:52:22 | <dminuoso> | This is a very readable official report of our language: https://www.haskell.org/onlinereport/haskell2010/ |
| 2021-06-26 19:52:34 | <qrpnxz> | oh, this is only for extensions 😩️ |
| 2021-06-26 19:52:46 | <qrpnxz> | didn't ghc already break compat with haskell 2010? |
| 2021-06-26 19:52:53 | <dmj`> | dminuoso: well I'll be, some assembly required to pass the stage restriction, but fits the bill |
| 2021-06-26 19:52:57 | <dmj`> | dminuoso: ty |
| 2021-06-26 19:52:57 | <qrpnxz> | eh better than nothing ig |
| 2021-06-26 19:53:38 | <dminuoso> | qrpnxz: Well, there's some minor edges where GHC is not fully Haskell2010 compliant, but they can be mostly glossed over. |
| 2021-06-26 19:53:39 | <davean> | qrpnxz: Not really in a meaningful way. |
| 2021-06-26 19:53:51 | <qrpnxz> | alright :) |
| 2021-06-26 19:54:37 | → | teaSlurper joins (~chris@81.96.113.213) |
| 2021-06-26 19:55:40 | <qrpnxz> | speaking of incompatibilities, do you think this will happen within the next decade? https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return |
| 2021-06-26 19:55:45 | <qrpnxz> | cause it'd be pretty cool |
| 2021-06-26 19:55:55 | <davean> | qrpnxz: It would be |
| 2021-06-26 19:56:59 | <dminuoso> | I think it would be mostly inconsequential. |
All times are in UTC.