Logs: freenode/#haskell
| 2020-10-15 12:23:27 | <dminuoso> | Or is there some weird Haskell semantics that justify the above diagnostic? |
| 2020-10-15 12:24:41 | → | elliott_ joins (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) |
| 2020-10-15 12:25:49 | × | nyd quits (~lpy@unaffiliated/elysian) (Quit: nyd) |
| 2020-10-15 12:26:27 | <Ariakenom> | tinga, maybe im misunderstanding but. "I just want to add a real 1 to a complex number" your code does that if u change the type to "f :: RealFloat a => Complex a -> Complex a" |
| 2020-10-15 12:27:00 | × | nbloomf quits (~nbloomf@2600:1700:83e0:1f40:e531:b955:8b3c:f641) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-15 12:28:21 | <merijn> | dminuoso: heh, which GHC is that? |
| 2020-10-15 12:28:35 | <merijn> | dminuoso: eh, wait |
| 2020-10-15 12:28:47 | <merijn> | dminuoso: Is there an actual V_3GPP type anywhere? |
| 2020-10-15 12:28:58 | <dminuoso> | merijn: No, I forgot to import it. |
| 2020-10-15 12:28:59 | → | bitmagie joins (~Thunderbi@200116b806495000583b859276a8aad8.dip.versatel-1u1.de) |
| 2020-10-15 12:29:10 | <Ariakenom> | but that doesnt work if u want Int in particular |
| 2020-10-15 12:29:15 | <merijn> | Do you have DataKinds enabled? |
| 2020-10-15 12:29:38 | <dminuoso> | % :set -XNoDataKinds |
| 2020-10-15 12:29:38 | <yahb> | dminuoso: |
| 2020-10-15 12:29:41 | <dminuoso> | % data Foo = Foo1 Foo1 |
| 2020-10-15 12:29:41 | <yahb> | dminuoso: ; <interactive>:17:17: error:; Not in scope: type constructor or class `Foo1'; A data constructor of that name is in scope; did you mean DataKinds?; Perhaps you meant `Foo' (line 17) |
| 2020-10-15 12:29:47 | <dminuoso> | merijn: That's it! Thanks! |
| 2020-10-15 12:29:48 | <merijn> | oom |
| 2020-10-15 12:29:51 | <merijn> | *boom |
| 2020-10-15 12:29:53 | <dminuoso> | Good catch. :) |
| 2020-10-15 12:30:08 | × | bitmagie quits (~Thunderbi@200116b806495000583b859276a8aad8.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-15 12:30:08 | <merijn> | I'm a genius at debugging intuition ;) |
| 2020-10-15 12:30:15 | <dminuoso> | heh |
| 2020-10-15 12:30:22 | <dminuoso> | I mean it was obvious the moment you mentioned it |
| 2020-10-15 12:30:37 | → | proofofme joins (~proofofme@184-96-74-65.hlrn.qwest.net) |
| 2020-10-15 12:31:49 | <dminuoso> | I have a pretty cool usecase of data kinds now. :) |
| 2020-10-15 12:32:13 | × | proofofme quits (~proofofme@184-96-74-65.hlrn.qwest.net) (Remote host closed the connection) |
| 2020-10-15 12:33:10 | → | dyeplexer joins (~lol@unaffiliated/terpin) |
| 2020-10-15 12:35:22 | → | thir joins (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de) |
| 2020-10-15 12:35:23 | <merijn> | Inscrutable errors? :p |
| 2020-10-15 12:35:26 | × | fryguybob quits (~fryguybob@cpe-74-65-31-113.rochester.res.rr.com) (Remote host closed the connection) |
| 2020-10-15 12:36:46 | → | nbloomf joins (~nbloomf@2600:1700:83e0:1f40:ece1:4d72:7859:59d1) |
| 2020-10-15 12:36:50 | × | dcoutts_ quits (~duncan@33.14.75.194.dyn.plus.net) (Ping timeout: 272 seconds) |
| 2020-10-15 12:37:01 | → | chaosmasttter joins (~chaosmast@p200300c4a711b001c4478125cc0e8bf4.dip0.t-ipconnect.de) |
| 2020-10-15 12:38:54 | → | AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl) |
| 2020-10-15 12:39:40 | <dminuoso> | merijn: Nah. So I have lots of nullary sum types. To avoid name clashing, they are prefixed by the attribute name |
| 2020-10-15 12:39:57 | <dminuoso> | So I have `ASA_WebVPN_SSL_VPN_Client_Keep_Installation_Enabled` `ASA_WebVPN_Port_Forwarding_Exchange_Proxy_Enable_Enabled` etc |
| 2020-10-15 12:40:07 | <dminuoso> | It's much easier to just say #Enabled instead. :) |
| 2020-10-15 12:40:31 | × | thir quits (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 2020-10-15 12:41:02 | <dminuoso> | And use generated IsLabel instances |
| 2020-10-15 12:41:24 | <AWizzArd> | In Snap I can encode variable parts of a route via colon: `:id`. Are query parameters also encoded in the route? Or are they exclusively captured via rqQueryParams? |
| 2020-10-15 12:41:27 | <dminuoso> | Or `fromLabel @"Foo-Bar"` if you dont want to use OverloadedLabels, or can it |
| 2020-10-15 12:41:31 | <dminuoso> | *or cant |
| 2020-10-15 12:42:01 | <dminuoso> | So that gives rise to some cool combinators together with the optics library |
| 2020-10-15 12:42:03 | <dminuoso> | like |
| 2020-10-15 12:42:30 | <dminuoso> | whenM (Acct_Authentic ./= #RADIUS) (...) |
| 2020-10-15 12:43:10 | <dminuoso> | Err, that should start with an understore. :) |
| 2020-10-15 12:43:23 | <merijn> | dminuoso: I'm a luddite who is still not using optics :p |
| 2020-10-15 12:44:03 | <phadej> | Kowainik :) |
| 2020-10-15 12:44:30 | → | OmegaDoug joins (8e750cd2@lnsm3-torontoxn-142-117-12-210.internet.virginmobile.ca) |
| 2020-10-15 12:44:51 | × | nbloomf quits (~nbloomf@2600:1700:83e0:1f40:ece1:4d72:7859:59d1) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-15 12:45:08 | <phadej> | merijn: are you using lens? |
| 2020-10-15 12:45:21 | <merijn> | phadej: I meant no optics at all |
| 2020-10-15 12:45:39 | <merijn> | regardless of package |
| 2020-10-15 12:45:48 | <phadej> | then it's fine. |
| 2020-10-15 12:46:07 | <merijn> | I mean, I think I have 5 lines of microlens to interact with persistent, but that's it :p |
| 2020-10-15 12:46:43 | <phadej> | interacting with swagger2 using OverloadedLabels and optics is very nice |
| 2020-10-15 12:47:01 | <phadej> | specifically after I fixed the VIM highlighting for overloadedlabels :) |
| 2020-10-15 12:47:01 | <dminuoso> | Indeed, we use that as well. :) |
| 2020-10-15 12:47:34 | <merijn> | phadej: Out of curiosity, are you secretly a bunch of androids who don't need sleep? |
| 2020-10-15 12:47:37 | <dminuoso> | But I didn't start optics/lens them until we started working on this SDN compiler. That project had very deeply nested data, and there were very repeating pattern themes. |
| 2020-10-15 12:48:00 | <dminuoso> | Though, I must admit, ever since I started, optics has appeared popping up in some projects here |
| 2020-10-15 12:48:05 | <phadej> | merijn: I in fact sleep 9+ hours a day |
| 2020-10-15 12:48:22 | <merijn> | phadej: At this rate you're outputting more code than edwardk >.> |
| 2020-10-15 12:48:48 | <dminuoso> | merijn: edwardk's capacitity to put out code is limited by the influx of articles on ncatlab. |
| 2020-10-15 12:49:06 | <merijn> | :p |
| 2020-10-15 12:49:52 | <merijn> | my capacity is limited by "cat petting" having priority over coding >.> |
| 2020-10-15 12:50:01 | → | ensyde joins (~ensyde@2600:1702:2e30:1a40:f09c:a012:516e:b253) |
| 2020-10-15 12:50:02 | <dminuoso> | since when do you have a cat? |
| 2020-10-15 12:50:06 | → | nbloomf joins (~nbloomf@2600:1700:83e0:1f40:1d95:d5fb:2f0c:fa1f) |
| 2020-10-15 12:50:17 | <merijn> | mid-2016? |
| 2020-10-15 12:50:41 | <merijn> | Ironically, most of my Haskell is after mid-2016 |
| 2020-10-15 12:51:01 | <merijn> | OTOH, before this year I spent most of my day at work, where there's no cat... :p |
| 2020-10-15 12:51:11 | <phadej> | is your cat named Haskell |
| 2020-10-15 12:51:34 | <phadej> | or Hask |
| 2020-10-15 12:52:16 | <merijn> | Usually she just gets called panther princess :p |
| 2020-10-15 12:53:27 | <absence> | what's the right way to deal with duplicate record fields across modules? https://repl.it/repls/GruesomeTrustyLocation |
| 2020-10-15 12:54:03 | <merijn> | 1) don't have those, 2) only import them qualified, 3) some complicated mess of extensions and voodoo |
| 2020-10-15 12:54:37 | <merijn> | oh, 4) don't have record field accessors at all (not implemented yet, afaik) |
| 2020-10-15 12:54:42 | × | ensyde quits (~ensyde@2600:1702:2e30:1a40:f09c:a012:516e:b253) (Ping timeout: 260 seconds) |
| 2020-10-15 12:55:22 | <absence> | merijn: the thing is that if i put everything in the same module, it just works, so i thought maybe i was missing something "obvious" |
| 2020-10-15 12:55:33 | <phadej> | enable DuplicateRecordFields in a module you use them too? |
| 2020-10-15 12:55:51 | <absence> | phadej: i tried that, but it doesn't make a difference unfortunately |
| 2020-10-15 12:56:20 | <merijn> | having accesors was a mistake, -XNoFieldSelectors + -XNamedFieldPuns is the way forward! |
| 2020-10-15 12:56:40 | <merijn> | (you know, once NoFieldSelectors finally ships...) |
| 2020-10-15 12:56:56 | <phadej> | also naming types.hs Types.hs will help GHC find it |
| 2020-10-15 12:57:04 | <hpc> | -XBasicallyJustRustADTs |
| 2020-10-15 12:57:44 | <merijn> | hpc: I dunno how those work? how do they differ from ADTs in haskell? |
| 2020-10-15 13:00:01 | <hpc> | mechanically they're practically the same as strict haskell would be, but that combination of extensions makes pattern matching syntax on them very similar as well |
| 2020-10-15 13:00:29 | <tinga> | Ariakenom, yes, I was imprecise, I just meant a non-complex number (add 1 to the real part) and I wanted to write a function that would work for any `a` in `Complex a` |
| 2020-10-15 13:01:33 | <tinga> | Why is it that with type classes the type restriction holds for the whole class instead of just the methods where the restriction is relevant? |
| 2020-10-15 13:01:51 | <merijn> | tinga: What do you mean? |
| 2020-10-15 13:02:00 | × | Gerula quits (~Gerula@unaffiliated/gerula) (Quit: Leaving) |
| 2020-10-15 13:02:42 | <tinga> | Num covers (+), (-), abs, etc., but the RealFloat restriction only exists because of `abs`. |
| 2020-10-15 13:02:43 | <phadej> | because if you would want different restrictons, you'd rather have separate classes :) |
| 2020-10-15 13:02:53 | × | xff0x quits (~fox@217.110.198.158) (Ping timeout: 260 seconds) |
| 2020-10-15 13:03:15 | <phadej> | better question is "wnhy Num has abs", which has a very boring question: Because in '90s that sounded like a good idea |
| 2020-10-15 13:03:22 | <tinga> | merijn, So if I wanted to only ever use + and - from Num, the RealFloat restriction doesn't matter for me. |
| 2020-10-15 13:03:36 | <phadej> | sorry, boring answer |
| 2020-10-15 13:03:37 | <merijn> | Which RealFloat restriction? |
All times are in UTC.