Logs: freenode/#haskell
| 2020-10-13 10:24:35 | × | alp quits (~alp@2a01:e0a:58b:4920:1dcd:3fff:5840:1f3a) (Ping timeout: 272 seconds) |
| 2020-10-13 10:24:42 | → | lemmih_ joins (~lemmih@2406:3003:2072:44:9dc:f2e9:a002:8d1a) |
| 2020-10-13 10:24:53 | × | noctux quits (~noctux@unaffiliated/noctux) (Ping timeout: 260 seconds) |
| 2020-10-13 10:25:27 | → | noctux joins (~noctux@unaffiliated/noctux) |
| 2020-10-13 10:26:14 | → | petersen joins (~petersen@redhat/juhp) |
| 2020-10-13 10:26:31 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 2020-10-13 10:26:38 | × | L29Ah quits (~L29Ah@unaffiliated/l29ah) (Ping timeout: 260 seconds) |
| 2020-10-13 10:27:45 | × | ericsagnes quits (~ericsagne@2405:6580:0:5100:85d4:43d9:8dee:59a0) (Ping timeout: 272 seconds) |
| 2020-10-13 10:28:55 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 244 seconds) |
| 2020-10-13 10:29:36 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 2020-10-13 10:30:10 | → | lucid_0x80 joins (~lucid_0x8@85.132.73.6) |
| 2020-10-13 10:32:57 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 258 seconds) |
| 2020-10-13 10:33:52 | → | da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com) |
| 2020-10-13 10:33:54 | → | dcoutts_ joins (~duncan@33.14.75.194.dyn.plus.net) |
| 2020-10-13 10:35:34 | → | solonarv joins (~solonarv@anancy-651-1-202-101.w109-217.abo.wanadoo.fr) |
| 2020-10-13 10:37:57 | hackage | matchable-th 0.1.1.1 - Generates Matchable instances using TemplateHaskell https://hackage.haskell.org/package/matchable-th-0.1.1.1 (viercc) |
| 2020-10-13 10:38:19 | × | lucid_0x80 quits (~lucid_0x8@85.132.73.6) (Ping timeout: 258 seconds) |
| 2020-10-13 10:38:24 | → | ggole joins (~ggole@2001:8003:8119:7200:dcc4:683f:59f7:9d48) |
| 2020-10-13 10:39:54 | → | ericsagnes joins (~ericsagne@2405:6580:0:5100:dca2:e278:5c94:78bf) |
| 2020-10-13 10:41:58 | × | bliminse quits (~bliminse@host217-42-95-37.range217-42.btcentralplus.com) (Ping timeout: 256 seconds) |
| 2020-10-13 10:42:17 | → | bliminse joins (~bliminse@host217-42-95-37.range217-42.btcentralplus.com) |
| 2020-10-13 10:42:27 | → | L29Ah joins (~L29Ah@unaffiliated/l29ah) |
| 2020-10-13 10:42:41 | <Uniaika> | god damnit |
| 2020-10-13 10:43:34 | <Uniaika> | I'm having this JSON format to parse and I can't seem to make sense of what to do |
| 2020-10-13 10:43:49 | <Uniaika> | I have *two* top-level field, that are to be unified in a sum type in Haskell-land |
| 2020-10-13 10:45:44 | <Uniaika> | so naturally I'm writing such an instance https://ghostbin.co/paste/r64hne2 |
| 2020-10-13 10:46:30 | <Uniaika> | (surprise, doesn't compile) |
| 2020-10-13 10:47:00 | × | bliminse quits (~bliminse@host217-42-95-37.range217-42.btcentralplus.com) (Ping timeout: 256 seconds) |
| 2020-10-13 10:47:30 | × | L29Ah quits (~L29Ah@unaffiliated/l29ah) (Ping timeout: 272 seconds) |
| 2020-10-13 10:47:44 | → | bliminse joins (~bliminse@host217-42-95-37.range217-42.btcentralplus.com) |
| 2020-10-13 10:49:13 | → | p8m joins (p8m@gateway/vpn/protonvpn/p8m) |
| 2020-10-13 10:49:25 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) () |
| 2020-10-13 10:49:58 | × | p8m_ quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 260 seconds) |
| 2020-10-13 10:50:25 | → | thir joins (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de) |
| 2020-10-13 10:52:43 | <fendor> | Uniaika, in the example, aren't you missing the unifying sum type? |
| 2020-10-13 10:55:05 | <Uniaika> | >_> sorry, I'll edit the snippet |
| 2020-10-13 10:55:12 | × | thir quits (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-10-13 10:55:40 | <Uniaika> | fendor: reload, it's been added |
| 2020-10-13 10:55:54 | × | rprije quits (~rprije@203.214.95.251) (Ping timeout: 265 seconds) |
| 2020-10-13 10:56:48 | <fendor> | Uniaika, and why doesn't it compile? Code-snippet looks roughly good to me |
| 2020-10-13 10:58:38 | × | John20 quits (~John@82.46.59.122) (Ping timeout: 258 seconds) |
| 2020-10-13 11:01:08 | <merijn> | heh |
| 2020-10-13 11:01:21 | <Uniaika> | fendor: https://ghostbin.co/paste/r64hne2 |
| 2020-10-13 11:01:24 | <Uniaika> | here is the error |
| 2020-10-13 11:01:25 | <merijn> | "maybe" is exported from Prelude? |
| 2020-10-13 11:01:31 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 2020-10-13 11:01:38 | <Uniaika> | merijn: yes, I think so |
| 2020-10-13 11:01:56 | <Uniaika> | fendor: also, I think I have a hard time expressing the fact that they may be null, but not at the same time? |
| 2020-10-13 11:02:17 | × | xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Remote host closed the connection) |
| 2020-10-13 11:02:24 | <Uniaika> | I mean, if it were an object, I'd use (.:?) |
| 2020-10-13 11:02:31 | <nshepperd> | this looks like a job for Alternative |
| 2020-10-13 11:02:50 | → | xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 2020-10-13 11:03:00 | <Uniaika> | hmm |
| 2020-10-13 11:03:04 | <Uniaika> | sounds like it yeah |
| 2020-10-13 11:03:30 | <Uniaika> | but every tutorial under the sun seems to be operating on an object, and not with top-level values, so I don't know how much they apply? |
| 2020-10-13 11:03:33 | → | lemmih__ joins (~lemmih@218.186.157.57) |
| 2020-10-13 11:03:34 | <Uniaika> | hmm. |
| 2020-10-13 11:03:41 | <Uniaika> | I'll try something |
| 2020-10-13 11:03:58 | <Uniaika> | (thanks for being rubber ducks, it's incredibly helpful to be able to lay down my thoughts) |
| 2020-10-13 11:04:28 | <fendor> | Uniaika, I think the type for field2 is wrong, too. Don't you need Data.UUID.fromText ? |
| 2020-10-13 11:04:57 | <Uniaika> | fendor: well, since there is already a FromJSON instance for UUID, I thought it would work out-of-the-box? |
| 2020-10-13 11:05:07 | × | chaosmasttter quits (~chaosmast@p200300c4a711b00135524723c22b3f52.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-10-13 11:05:13 | <nshepperd> | what exactly do you mean by a top level field |
| 2020-10-13 11:05:37 | <nshepperd> | value, whatever |
| 2020-10-13 11:05:41 | <Uniaika> | I'll add the desired JSON representation to the snippet |
| 2020-10-13 11:05:55 | × | lemmih_ quits (~lemmih@2406:3003:2072:44:9dc:f2e9:a002:8d1a) (Ping timeout: 240 seconds) |
| 2020-10-13 11:06:28 | hackage | git-mediate 1.0.8.1 - Tool to help resolving git conflicts https://hackage.haskell.org/package/git-mediate-1.0.8.1 (EyalLotem) |
| 2020-10-13 11:06:32 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 265 seconds) |
| 2020-10-13 11:06:34 | <fendor> | Uniaika, I don't think `withText` gives you a text and then you have to specify a value parser for that text. Doesnt use the instance automatically |
| 2020-10-13 11:07:04 | <nshepperd> | that usage of withText doesn't look right anyhow |
| 2020-10-13 11:07:12 | <fendor> | indeed |
| 2020-10-13 11:07:27 | <nshepperd> | The first argument is only used for the error message |
| 2020-10-13 11:08:50 | <Uniaika> | fendor, nshepperd : https://ghostbin.co/paste/r64hne2 |
| 2020-10-13 11:09:04 | <merijn> | Uniaika: I recommend using a different pastebin, that one is terrible |
| 2020-10-13 11:09:09 | <Uniaika> | ah shit |
| 2020-10-13 11:09:10 | <Uniaika> | sorry |
| 2020-10-13 11:09:15 | <Uniaika> | dpaste? |
| 2020-10-13 11:09:19 | <merijn> | It apparently requires me enabling cookies AND solving a captcha to read things |
| 2020-10-13 11:09:21 | <merijn> | screw that |
| 2020-10-13 11:09:23 | <Uniaika> | I think hpaste is dead now, right? |
| 2020-10-13 11:09:25 | <dminuoso> | https://paste.tomsmeding.com/ |
| 2020-10-13 11:09:32 | <dminuoso> | Is the spiritual hpaste successor |
| 2020-10-13 11:09:41 | <Uniaika> | https://paste.tomsmeding.com/QMFidUu1 |
| 2020-10-13 11:09:45 | <Uniaika> | dminuoso: thx |
| 2020-10-13 11:09:49 | <fendor> | well, for Foo, it could be something like: `parseJSON v = Field1 <$> v .: "field1" <|> Field2 <$> v .: "field2"` |
| 2020-10-13 11:09:52 | <merijn> | tomsmeding is the hero #haskell needed ;) |
| 2020-10-13 11:10:04 | → | John20 joins (~John@82.46.59.122) |
| 2020-10-13 11:10:10 | <merijn> | He resurrected ircbrowse too, so now I can be self-concious about how much time I spend here :p |
| 2020-10-13 11:10:18 | <Uniaika> | fendor: ooooh |
| 2020-10-13 11:10:30 | <merijn> | tomsmeding: oh, maybe you should send a mail to Haskell Weekly to publicize those two? |
| 2020-10-13 11:10:36 | × | snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 260 seconds) |
| 2020-10-13 11:11:27 | hackage | http-conduit-downloader 1.1.0 - HTTP downloader tailored for web-crawler needs. https://hackage.haskell.org/package/http-conduit-downloader-1.1.0 (VladimirShabanov) |
| 2020-10-13 11:11:49 | → | mmohammadi981266 joins (~mmohammad@188.210.103.147) |
| 2020-10-13 11:12:04 | × | mmohammadi981266 quits (~mmohammad@188.210.103.147) (Client Quit) |
| 2020-10-13 11:12:14 | <Uniaika> | fendor: but (.:) is expecting a HashMap right? |
| 2020-10-13 11:12:25 | <tomsmeding> | merijn: I'm not sure it would be a good idea to publicise ircbrowse that way, given that it's not my project... :p |
| 2020-10-13 11:12:53 | <dminuoso> | Uniaika: No. |
| 2020-10-13 11:12:56 | <merijn> | tomsmeding: It's open source, you just forked/maintained it |
| 2020-10-13 11:13:05 | <dminuoso> | (.:) :: FromJSON a => Object -> Text -> Parser a |
| 2020-10-13 11:13:06 | <tomsmeding> | true |
All times are in UTC.