Logs: freenode/#haskell
| 2020-10-12 08:48:48 | <dminuoso> | % infixr 6 `f`; f = f |
| 2020-10-12 08:48:48 | <yahb> | dminuoso: |
| 2020-10-12 08:49:00 | → | graf_blutwurst joins (~user@2a02:168:49bc:0:60e6:a793:624b:d03a) |
| 2020-10-12 08:49:00 | <dminuoso> | % f :: Int; infixr 6 `f`; f = f |
| 2020-10-12 08:49:00 | <yahb> | dminuoso: |
| 2020-10-12 08:49:13 | → | xff0x joins (~fox@217.110.198.158) |
| 2020-10-12 08:49:38 | <bahamas> | merijn: what do you mean by "I mean even in the absense of `otherwise`"? |
| 2020-10-12 08:50:06 | dminuoso | wonders whether merijn forgot to press enter on some message |
| 2020-10-12 08:50:09 | → | akegalj joins (~akegalj@93-138-187-99.adsl.net.t-com.hr) |
| 2020-10-12 08:50:10 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 2020-10-12 08:54:59 | × | kl1xto quits (~klixto@130.220.8.149) (Quit: WeeChat 2.9) |
| 2020-10-12 08:55:07 | <merijn> | Nah, I got distracted by work |
| 2020-10-12 08:56:08 | <merijn> | bahamas: I meant that this is perfectly fine: https://paste.tomsmeding.com/bYa6W8My |
| 2020-10-12 08:56:21 | <merijn> | If the 2 guards fail, it will simply fall through to the 2nd pattern |
| 2020-10-12 09:00:01 | × | blardo quits (~blardo@195.206.169.184) () |
| 2020-10-12 09:01:00 | → | thir joins (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de) |
| 2020-10-12 09:01:13 | <dminuoso> | Useful to know, you can define let bindings in guards. :) |
| 2020-10-12 09:01:26 | <dminuoso> | Took me a while to figure that one out |
| 2020-10-12 09:01:45 | <merijn> | dminuoso: Or, you just use pattern guards :p |
| 2020-10-12 09:01:57 | <merijn> | Pattern guards are the most underrated feature of Haskell2010 |
| 2020-10-12 09:02:48 | <kuribas> | merijn: I found a solution for the json representation problem. I made a DSL for rewriting the JSON before parsing it using generics. |
| 2020-10-12 09:03:09 | <kuribas> | https://gist.github.com/kuribas/9826b1fb9f2907a5c40baff1d7bbcb83 |
| 2020-10-12 09:03:18 | <kuribas> | it's typesafe |
| 2020-10-12 09:03:20 | <merijn> | Not sure I wanna click that xD |
| 2020-10-12 09:03:55 | <dminuoso> | merijn: pattern guards are more limited though |
| 2020-10-12 09:04:04 | <merijn> | dminuoso: How so? |
| 2020-10-12 09:04:13 | <dminuoso> | Can you set up recursive bindings with them? |
| 2020-10-12 09:04:21 | <merijn> | ah...probably not? |
| 2020-10-12 09:05:16 | × | thir quits (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
| 2020-10-12 09:05:57 | → | GyroW_ joins (~GyroW@d54c03e98.access.telenet.be) |
| 2020-10-12 09:05:57 | × | GyroW_ quits (~GyroW@d54c03e98.access.telenet.be) (Changing host) |
| 2020-10-12 09:05:57 | → | GyroW_ joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-12 09:05:58 | <dminuoso> | merijn: And at the same time, why would I use `Foo r <- bar` over `let Foo r = bar`? |
| 2020-10-12 09:06:25 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 240 seconds) |
| 2020-10-12 09:06:28 | <dminuoso> | Non-simple bindings are already part of Haskel2010 |
| 2020-10-12 09:06:28 | × | xff0x quits (~fox@217.110.198.158) (Ping timeout: 260 seconds) |
| 2020-10-12 09:07:02 | <dminuoso> | I mean, pattern guards have their use for when you want to *filter* out based on non-match |
| 2020-10-12 09:07:05 | → | cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it) |
| 2020-10-12 09:07:10 | <dminuoso> | but they dont seem like a good alternative to let just for the sake of it |
| 2020-10-12 09:07:12 | → | snakemas1 joins (~snakemast@213.100.206.23) |
| 2020-10-12 09:07:30 | <bahamas> | merijn: do you have an example of pattern guards usage? |
| 2020-10-12 09:08:14 | <dminuoso> | bahamas: https://gist.github.com/dminuoso/0da790d5ac72f0cfab1e451a306ca064 |
| 2020-10-12 09:08:19 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-xtrudmadhpdzbuzh) (Quit: Connection closed for inactivity) |
| 2020-10-12 09:08:24 | → | xff0x joins (~fox@217.110.198.158) |
| 2020-10-12 09:09:50 | → | plutoniix joins (~q@175.176.222.7) |
| 2020-10-12 09:10:48 | <kuribas> | merijn: it's pretty easy |
| 2020-10-12 09:11:09 | <kuribas> | merijn: you give the destination field, and the path to the origin field. |
| 2020-10-12 09:11:26 | <kuribas> | merijn: and the destination field is typechecked against the given type. |
| 2020-10-12 09:11:30 | → | chaosmasttter joins (~chaosmast@p200300c4a72cce019c42f7589bbe6c59.dip0.t-ipconnect.de) |
| 2020-10-12 09:11:41 | <bahamas> | dminuoso: thanks |
| 2020-10-12 09:11:56 | <kuribas> | merijn: and there is a Maybe variant for possible empty fields. |
| 2020-10-12 09:12:16 | <kuribas> | merijn: and the generator does the opposite operation. |
| 2020-10-12 09:13:02 | × | knupfer quits (~Thunderbi@dynamic-046-114-150-219.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
| 2020-10-12 09:13:07 | <kuribas> | merijn: here is the implementation: https://gist.github.com/kuribas/5c617ecf025ccb37467a23556cbe963e |
| 2020-10-12 09:13:11 | × | cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Read error: Connection reset by peer) |
| 2020-10-12 09:13:37 | → | cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it) |
| 2020-10-12 09:14:19 | → | dyeplexer joins (~lol@unaffiliated/terpin) |
| 2020-10-12 09:14:33 | <kuribas> | merijn: and you simply apply the transformation before/after parsing/toJSON |
| 2020-10-12 09:18:19 | → | supercoven joins (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) |
| 2020-10-12 09:24:00 | → | totte joins (~totte@chakra/totte) |
| 2020-10-12 09:25:15 | → | jedws joins (~jedws@121.209.161.98) |
| 2020-10-12 09:25:23 | <kuribas> | merijn: this substantially reduces the amount of boilerplate required when writing manual instances. |
| 2020-10-12 09:25:36 | × | supercoven quits (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Ping timeout: 272 seconds) |
| 2020-10-12 09:25:56 | <kuribas> | merijn: and also solves the problem that manual instances aren't guaranteed to be consistend, when going to and from JSON. |
| 2020-10-12 09:28:03 | × | jedws quits (~jedws@121.209.161.98) (Client Quit) |
| 2020-10-12 09:28:09 | <kuribas> | I am not saying this solves every usecase, for everyone, but it works great for ours. |
| 2020-10-12 09:28:19 | × | snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 246 seconds) |
| 2020-10-12 09:29:03 | → | jedws joins (~jedws@121.209.161.98) |
| 2020-10-12 09:29:57 | × | jedws quits (~jedws@121.209.161.98) (Client Quit) |
| 2020-10-12 09:30:11 | → | supercoven joins (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) |
| 2020-10-12 09:30:49 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 256 seconds) |
| 2020-10-12 09:32:43 | → | snakemas1 joins (~snakemast@213.100.206.23) |
| 2020-10-12 09:39:55 | × | supercoven quits (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 2020-10-12 09:41:22 | → | Guest18 joins (567e8866@gateway/web/cgi-irc/kiwiirc.com/ip.86.126.136.102) |
| 2020-10-12 09:41:53 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Remote host closed the connection) |
| 2020-10-12 09:43:18 | → | supercoven joins (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) |
| 2020-10-12 09:44:25 | × | snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 256 seconds) |
| 2020-10-12 09:45:00 | → | snakemas1 joins (~snakemast@213.100.206.23) |
| 2020-10-12 09:45:14 | × | yoja quits (~yoel.jaco@89.237.104.52) (Ping timeout: 272 seconds) |
| 2020-10-12 09:47:19 | → | esp32_prog joins (yoann@gateway/vpn/protonvpn/esp32prog/x-46565127) |
| 2020-10-12 09:49:00 | → | proofofme joins (~proofofme@184-96-74-65.hlrn.qwest.net) |
| 2020-10-12 09:49:41 | → | ensyde joins (~ensyde@2600:1702:2e30:1a40:7dd1:8fed:5e86:6369) |
| 2020-10-12 09:50:34 | × | proofofme quits (~proofofme@184-96-74-65.hlrn.qwest.net) (Remote host closed the connection) |
| 2020-10-12 09:51:32 | × | supercoven quits (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Max SendQ exceeded) |
| 2020-10-12 09:51:49 | → | supercoven joins (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) |
| 2020-10-12 09:52:03 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 2020-10-12 09:52:58 | hackage | mu-schema 0.3.1.0 - Format-independent schemas for serialization https://hackage.haskell.org/package/mu-schema-0.3.1.0 (AlejandroSerrano) |
| 2020-10-12 09:53:55 | × | ensyde quits (~ensyde@2600:1702:2e30:1a40:7dd1:8fed:5e86:6369) (Ping timeout: 240 seconds) |
| 2020-10-12 09:54:06 | → | Stanley|00 joins (~stanley00@unaffiliated/stanley00) |
| 2020-10-12 09:54:41 | → | bitmagie joins (~Thunderbi@200116b80693b700305a6826a7578388.dip.versatel-1u1.de) |
| 2020-10-12 09:54:45 | → | inkbottle joins (~inkbottle@alagny-155-1-18-83.w83-200.abo.wanadoo.fr) |
| 2020-10-12 09:54:53 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-1-116.w83-200.abo.wanadoo.fr) (Ping timeout: 260 seconds) |
| 2020-10-12 09:55:53 | → | slopjong joins (~slopjong@195.206.169.184) |
| 2020-10-12 09:56:05 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds) |
| 2020-10-12 09:56:27 | hackage | mu-rpc 0.4.0.0 - Protocol-independent declaration of services and servers. https://hackage.haskell.org/package/mu-rpc-0.4.0.0 (AlejandroSerrano) |
| 2020-10-12 09:58:39 | × | cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone) |
| 2020-10-12 10:00:10 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-4-38.w83-200.abo.wanadoo.fr) |
| 2020-10-12 10:00:36 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 2020-10-12 10:00:58 | hackage | mu-lens 0.3.0.0 - Lenses for @mu-schema@ terms https://hackage.haskell.org/package/mu-lens-0.3.0.0 (AlejandroSerrano) |
| 2020-10-12 10:01:13 | → | oisdk joins (~oisdk@2001:bb6:3329:d100:40aa:f743:137e:9f96) |
All times are in UTC.