Logs on 2022-05-29 (liberachat/#haskell)
| 00:01:10 | × | king_gs quits (~Thunderbi@187.201.97.18) (Read error: Connection reset by peer) |
| 00:01:13 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 00:01:13 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 00:01:13 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:02:27 | → | king_gs joins (~Thunderbi@2806:103e:29:5eb8:48de:d3eb:9d44:3d55) |
| 00:04:33 | × | JannisO quits (~JannisO@89.233.86.138) (Ping timeout: 276 seconds) |
| 00:09:38 | × | CiaoSen quits (~Jura@p200300c95731a0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 00:11:37 | → | Hafydd joins (~Hafydd@user/hafydd) |
| 00:11:46 | → | foul_owl joins (~kerry@23.82.194.92) |
| 00:16:35 | × | mtjm quits (~mutantmel@2604:a880:2:d0::208b:d001) (Remote host closed the connection) |
| 00:16:50 | × | gurkenglas quits (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
| 00:17:39 | → | mtjm joins (~mutantmel@2604:a880:2:d0::208b:d001) |
| 00:20:02 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5051:4e02:b5d9:aa15) |
| 00:30:04 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
| 00:30:32 | × | inversed quits (~inversed@176.248.27.211) (Quit: Connection error?!) |
| 00:42:18 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 00:42:54 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 276 seconds) |
| 00:42:57 | → | inversed joins (~inversed@176.248.27.211) |
| 00:43:32 | Lord_of_Life_ | is now known as Lord_of_Life |
| 00:58:47 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 00:58:59 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 01:03:24 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 01:05:15 | tremon | is now known as tremon_ |
| 01:08:57 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 260 seconds) |
| 01:09:37 | <hololeap> | I've asked this before, but I didn't understand the answer. what's the proper way to do this using QuantifiedConstraints? |
| 01:09:39 | <hololeap> | deriving instance (forall x. Ord x => Ord (f x), Ord a) => Ord (ParseResultT f a) |
| 01:10:37 | <hololeap> | I get: [typecheck] • Could not deduce (Ord x) arising from the superclass of an instance declaration... |
| 01:19:45 | <jackdk> | How far does that forall bind? Is `(forall x. (Ord x => Ord (f x), Ord x), Ord a => Ord (ParseResultT f a)` materially different? |
| 01:25:23 | → | king_gs1 joins (~Thunderbi@187.201.97.18) |
| 01:27:06 | × | king_gs quits (~Thunderbi@2806:103e:29:5eb8:48de:d3eb:9d44:3d55) (Ping timeout: 258 seconds) |
| 01:27:07 | king_gs1 | is now known as king_gs |
| 01:27:44 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 244 seconds) |
| 01:32:05 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 258 seconds) |
| 01:35:25 | × | king_gs quits (~Thunderbi@187.201.97.18) (Quit: king_gs) |
| 01:38:06 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 01:43:38 | → | money_ joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 01:44:13 | × | money_ quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Changing host) |
| 01:44:13 | → | money_ joins (~Gambino@user/polo) |
| 01:44:17 | money_ | is now known as POLO |
| 01:47:31 | × | POLO quits (~Gambino@user/polo) (Remote host closed the connection) |
| 01:47:57 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 01:54:48 | → | money_ joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 01:57:10 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 01:57:56 | → | andrey_ joins (~andrey@p200300dbcf3e8c0056be00b84949243d.dip0.t-ipconnect.de) |
| 02:00:27 | × | andrey__ quits (~andrey@p200300dbcf2e1000eb0596aaa95b8a32.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 02:01:20 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 02:02:54 | <hololeap> | jackdk: the (forall x. Ord x => Ord (f x)) is a special kind of constraint introduced by QuantifiedConstraints. it's saying that (f x) must be a member of Ord if x is. |
| 02:04:46 | <hololeap> | but there's some weirdness with it around typeclass heirarchies, and I can't remember what you do to convince the compiler that 'x' is also a member of Eq |
| 02:05:45 | <jackdk> | I don't grok QuantifiedConstraints, but by analogy to logic, isn't your version of the instance declaration only demanding the "implication" ∀x. Ord x -> Ord (f x) and not actually demanding the premise? |
| 02:06:29 | <hololeap> | probably |
| 02:07:34 | <hololeap> | oh, they actually mention this in the docs. I just didn't see it: https://downloads.haskell.org/~ghc/9.0.2/docs/html/users_guide/exts/quantified_constraints.html#superclasses |
| 02:09:25 | <Bulby[m]> | if I have a `LxNumber Float` and a parser that wants to match that, how would I rewrap that Float |
| 02:09:39 | <Bulby[m]> | `LxNumber Float` -> `LValNum Float` |
| 02:12:21 | <hololeap> | @hoogle LxNumber |
| 02:12:21 | <lambdabot> | No results found |
| 02:12:54 | <Bulby[m]> | it's not real - just a type constructor |
| 02:13:15 | × | money_ quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:14:00 | <hololeap> | coerce? |
| 02:14:05 | <jackdk> | case-match? |
| 02:14:13 | → | money_ joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 02:14:30 | <Bulby[m]> | hm let me debug other parts and think about it |
| 02:15:00 | <hololeap> | if LxNumber and LValNum are just newtypes around the same inner part, you can `coerce` them |
| 02:15:14 | <Bulby[m]> | not newtypes |
| 02:15:20 | <Bulby[m]> | so i'll figure it out |
| 02:17:51 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 244 seconds) |
| 02:25:40 | × | shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Ping timeout: 248 seconds) |
| 02:38:01 | × | money_ quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:43:40 | × | mzan quits (~quassel@mail.asterisell.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 02:44:29 | → | mzan joins (~quassel@mail.asterisell.com) |
| 02:44:58 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving) |
| 02:45:17 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 02:47:25 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 02:51:34 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 03:02:11 | × | Me-me quits (~me-me@v.working.name) (Remote host closed the connection) |
| 03:04:51 | → | Me-me joins (~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) |
| 03:08:13 | × | Me-me quits (~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) (Changing host) |
| 03:08:13 | → | Me-me joins (~me-me@user/me-me) |
| 03:15:27 | → | money joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 03:15:39 | money | is now known as Guest4684 |
| 03:23:03 | × | gabiruh quits (~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in) |
| 03:23:25 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 03:28:27 | × | gabiruh quits (~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in) |
| 03:28:41 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 03:34:30 | × | Guest4684 quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Changing host) |
| 03:34:30 | → | Guest4684 joins (~Gambino@user/polo) |
| 03:34:34 | Guest4684 | is now known as POLO |
| 03:42:53 | → | benin joins (~benin@183.82.177.185) |
| 03:54:33 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 03:56:06 | → | nate1 joins (~nate@98.45.169.16) |
| 04:00:17 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 246 seconds) |
| 04:01:09 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 276 seconds) |
| 04:02:40 | → | coot joins (~coot@213.134.190.95) |
| 04:07:53 | POLO | is now known as Gambino |
| 04:13:53 | → | money joins (~Gambino@2600:100d:be0c:f21:d9ab:d842:8779:59d6) |
| 04:14:11 | money | is now known as Guest2841 |
| 04:14:31 | × | Guest2841 quits (~Gambino@2600:100d:be0c:f21:d9ab:d842:8779:59d6) (Changing host) |
| 04:14:31 | → | Guest2841 joins (~Gambino@user/polo) |
| 04:14:33 | Guest2841 | is now known as POLO |
| 04:15:00 | × | Gambino quits (~Gambino@user/polo) (Ping timeout: 258 seconds) |
| 04:15:16 | POLO | is now known as GAMBIO |
| 04:15:23 | GAMBIO | is now known as GAMBINO |
| 04:16:19 | GAMBINO | is now known as POLO |
| 04:16:57 | POLO | is now known as Rosati |
| 04:17:42 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 04:17:57 | × | cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds) |
| 04:19:20 | × | gabiruh quits (~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in) |
| 04:19:47 | → | _xor joins (~xor@72.49.198.103) |
| 04:20:41 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 04:22:08 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 04:23:15 | Rosati | is now known as GAMBINO |
| 04:24:58 | GAMBINO | is now known as Rosati |
| 04:25:03 | Rosati | is now known as STYNER |
| 04:26:44 | STYNER | is now known as ROSATI |
| 04:27:47 | → | cheater joins (~Username@user/cheater) |
| 04:28:22 | ROSATI | is now known as POLO |
| 04:32:28 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 04:35:52 | → | money joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 04:36:09 | × | money quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Changing host) |
| 04:36:09 | → | money joins (~Gambino@user/polo) |
| 04:36:11 | × | POLO quits (~Gambino@user/polo) (Killed (erbium.libera.chat (Nickname regained by services))) |
| 04:36:11 | money | is now known as POLO |
| 04:39:15 | × | POLO quits (~Gambino@user/polo) (Client Quit) |
| 04:41:19 | → | money joins (~Gambino@user/polo) |
| 04:42:32 | → | obabo joins (~obabo@563BF107.catv.pool.telekom.hu) |
| 05:02:21 | → | mbuf joins (~Shakthi@122.164.194.119) |
| 05:04:45 | → | bahamas joins (~lucian@84.232.141.167) |
| 05:04:47 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 240 seconds) |
| 05:06:22 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 258 seconds) |
| 05:10:59 | × | tremon_ quits (~tremon@83-84-18-241.cable.dynamic.v4.ziggo.nl) (Ping timeout: 246 seconds) |
| 05:11:58 | → | christiansen joins (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) |
| 05:12:40 | → | tremon_ joins (~tremon@83-84-18-241.cable.dynamic.v4.ziggo.nl) |
| 05:17:47 | money | is now known as polo |
| 05:21:59 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 05:22:38 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Client Quit) |
| 05:28:07 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::ba9a) |
| 05:32:11 | → | nate1 joins (~nate@98.45.169.16) |
| 05:38:01 | × | absence_ quits (torgeihe@hildring.pvv.ntnu.no) (Remote host closed the connection) |
| 05:39:39 | → | Guest|93 joins (~Guest|93@103.144.149.142) |
| 05:40:40 | × | Guest|93 quits (~Guest|93@103.144.149.142) (Client Quit) |
| 05:51:44 | → | Hurrrdurr joins (~Hurrrdurr@S01069050ca4e3573.cg.shawcable.net) |
| 05:54:39 | → | Infinite joins (~Infinite@49.39.115.148) |
| 05:58:07 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 258 seconds) |
| 05:59:11 | × | polo quits (~Gambino@user/polo) (Quit: Textual IRC Client: www.textualapp.com) |
| 06:07:47 | × | monochrom quits (trebla@216.138.220.146) (Ping timeout: 240 seconds) |
| 06:07:47 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 06:11:46 | → | money joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 06:12:02 | money | is now known as Guest2037 |
| 06:14:15 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 06:18:22 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 06:18:33 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 06:20:03 | × | kenaryn quits (~aurele@89-88-44-27.abo.bbox.fr) (Quit: leaving) |
| 06:26:07 | × | mima quits (~mmh@net-5-94-119-222.cust.vodafonedsl.it) (Ping timeout: 240 seconds) |
| 06:33:14 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
| 06:34:56 | × | Guest2037 quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:43:46 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 06:44:13 | → | bahamas joins (~lucian@84.232.141.167) |
| 06:45:24 | → | zaquest joins (~notzaques@5.130.79.72) |
| 06:45:39 | → | money joins (~Gambino@user/polo) |
| 06:46:26 | <Hurrrdurr> | anyone here ever seen the Imitation Game |
| 06:47:49 | × | dextaa quits (~DV@user/dextaa) (Read error: Connection reset by peer) |
| 06:48:52 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 06:49:55 | → | dextaa joins (~DV@user/dextaa) |
| 06:55:15 | × | money quits (~Gambino@user/polo) (Read error: Connection reset by peer) |
| 06:56:01 | → | money joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 06:56:06 | money | is now known as Guest9566 |
| 06:56:17 | × | Guest9566 quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Changing host) |
| 06:56:17 | → | Guest9566 joins (~Gambino@user/polo) |
| 06:57:16 | Guest9566 | is now known as POLO |
| 06:58:59 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 07:23:10 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 07:29:21 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 258 seconds) |
| 07:36:04 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 07:39:01 | → | Inst_ joins (~Inst@2601:6c4:4080:3f80:90d3:88ea:e6d8:f698) |
| 07:39:46 | × | Hurrrdurr quits (~Hurrrdurr@S01069050ca4e3573.cg.shawcable.net) (Quit: Client closed) |
| 07:43:10 | → | Tuplanolla joins (~Tuplanoll@91-159-68-39.elisa-laajakaista.fi) |
| 07:44:36 | × | tzh_ quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 07:45:13 | POLO | is now known as polo |
| 07:45:37 | polo | is now known as POLO |
| 07:49:17 | × | christiansen quits (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 258 seconds) |
| 07:53:19 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 07:56:45 | → | bahamas joins (~lucian@84.232.141.167) |
| 07:59:41 | × | _xor quits (~xor@72.49.198.103) (Quit: brb) |
| 08:00:01 | → | _xor joins (~xor@72.49.198.103) |
| 08:03:36 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 276 seconds) |
| 08:03:36 | × | Dorkside6 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:03:50 | → | Dorkside69 joins (~dorkside@208.190.197.222) |
| 08:03:50 | × | Dorkside69 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:04:03 | → | Dorkside69 joins (~dorkside@208.190.197.222) |
| 08:04:03 | × | Dorkside69 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:04:16 | → | Dorkside69 joins (~dorkside@208.190.197.222) |
| 08:04:16 | × | Dorkside69 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:04:29 | → | Dorkside69 joins (~dorkside@208.190.197.222) |
| 08:04:29 | × | Dorkside69 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:04:42 | → | Dorkside69 joins (~dorkside@208.190.197.222) |
| 08:04:42 | × | Dorkside69 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:05:10 | → | Dorkside69 joins (~dorkside@208.190.197.222) |
| 08:05:10 | × | Dorkside69 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:05:23 | → | Dorkside69 joins (~dorkside@208.190.197.222) |
| 08:05:23 | × | Dorkside69 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:05:36 | → | Dorkside69 joins (~dorkside@208.190.197.222) |
| 08:05:36 | × | Dorkside69 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:05:49 | → | Dorkside69 joins (~dorkside@208.190.197.222) |
| 08:05:49 | × | Dorkside69 quits (~dorkside@208.190.197.222) (Remote host closed the connection) |
| 08:06:28 | → | jollygood2 joins (~bc8147f2@cerf.good1.com) |
| 08:16:59 | → | trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 08:21:27 | × | POLO quits (~Gambino@user/polo) (Read error: Connection reset by peer) |
| 08:22:45 | → | money joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 08:22:46 | money | is now known as Guest3863 |
| 08:23:17 | → | jgeerds joins (~jgeerds@55d45f48.access.ecotel.net) |
| 08:25:56 | → | Demmy joins (~Demmy@102.89.32.82) |
| 08:28:10 | × | Infinite quits (~Infinite@49.39.115.148) (Ping timeout: 252 seconds) |
| 08:29:20 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 08:29:49 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 08:30:45 | → | nate1 joins (~nate@98.45.169.16) |
| 08:31:54 | × | Guest3863 quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Read error: Connection reset by peer) |
| 08:32:38 | → | Guest9382 joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 08:33:58 | × | Guest9382 quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Changing host) |
| 08:33:58 | → | Guest9382 joins (~Gambino@user/polo) |
| 08:34:50 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 08:38:21 | → | bahamas joins (~lucian@84.232.141.167) |
| 08:42:57 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 258 seconds) |
| 08:43:26 | → | _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl) |
| 08:46:14 | → | zincy joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
| 08:46:16 | → | Hemmo joins (~IceChat95@85-76-165-183-nat.elisa-mobile.fi) |
| 08:58:07 | → | gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
| 09:03:44 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 09:04:00 | × | yosef``` quits (~user@2409:8a55:e21b:5cf0:58b9:4cff:fea0:d9) (Remote host closed the connection) |
| 09:04:26 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 09:04:32 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 09:04:55 | → | yosef`` joins (~user@user/yosef/x-3154124) |
| 09:08:52 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 09:11:21 | <Hemmo> | Hello! I'm trying to figure out how to make my Phone data type have Maybe values in the constructor, but having trouble. Here's the paste https://paste.tomsmeding.com/LrG5YWWI |
| 09:11:38 | <Hemmo> | So I would like the phoneType and countryCode be optional |
| 09:12:04 | <Hemmo> | I can compile it well but i get errors when i try to use the function readphonetype |
| 09:12:23 | <Hemmo> | Any tips appreciated =) |
| 09:12:25 | → | jinsun__ joins (~jinsun@user/jinsun) |
| 09:13:42 | <pavonia> | You want `pt == "Other"`, no? |
| 09:13:50 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:14:26 | → | zeenk joins (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) |
| 09:14:35 | <pavonia> | Because /= mean any other value than "Other" |
| 09:15:36 | <Hemmo> | Yeah I mean if the string is "Other" or "Worklandline", or any of the data types that are allowed for PhoneType, then it should read the string to a PhoneType |
| 09:15:38 | × | jinsun quits (~jinsun@user/jinsun) (Ping timeout: 246 seconds) |
| 09:15:39 | × | nahcetan quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 09:15:51 | <Hemmo> | and use it to construct a phone |
| 09:15:56 | × | Guest9382 quits (~Gambino@user/polo) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 09:16:28 | <Hemmo> | I just used "Other" in there and omitted the rest just to figure this out |
| 09:17:01 | <Hemmo> | So here's what it was before I've been trying to use Maybe in there |
| 09:17:01 | <Hemmo> | readPhoneType::String -> PhoneType |
| 09:17:01 | <Hemmo> | readPhoneType pt |
| 09:17:01 | <Hemmo> | | length pt < 1 = error "Missing phone type" |
| 09:17:01 | <Hemmo> | | pt /= "Other", pt /= "Worklandline", pt /= "PrivateMobile", |
| 09:17:02 | <Hemmo> | pt /= "WorkMobile" = error "Incorrect phone type" |
| 09:17:02 | <Hemmo> | | otherwise = read pt::PhoneType |
| 09:17:05 | → | money joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 09:17:13 | money | is now known as Guest4807 |
| 09:17:54 | <pavonia> | Note that the type of read is Read a => String -> a, that means for a ~ Maybe PhoneType it's trying to read a value of type Maybe PhoneType |
| 09:18:29 | <pavonia> | But e.g. read "Worklandline" has type PhoneType |
| 09:19:01 | × | Guest4807 quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Changing host) |
| 09:19:01 | → | Guest4807 joins (~Gambino@user/polo) |
| 09:19:04 | Guest4807 | is now known as POLO |
| 09:19:09 | <pavonia> | And you should also use readMaybe instead |
| 09:19:15 | <pavonia> | :t readMaybe |
| 09:19:16 | <lambdabot> | error: Variable not in scope: readMaybe |
| 09:19:28 | <Hemmo> | Can't use anything outside prelude :/ |
| 09:19:45 | <[exa]> | > read "Just 5" :: Maybe Int |
| 09:19:47 | <lambdabot> | Just 5 |
| 09:20:08 | <pavonia> | There's also reads which is safer than read |
| 09:20:09 | <[exa]> | Hemmo: ^ you probably want to add the `Just` yourself and not force users to write it in the input |
| 09:21:47 | <jackdk> | :t Text.Read.readMaybe |
| 09:21:49 | <lambdabot> | Read a => String -> Maybe a |
| 09:22:04 | <jackdk> | ^ in base, though not in Prelude; might not be acceptable |
| 09:22:29 | <Hemmo> | Yeah I looked at that, but indeed it's not acceptable |
| 09:22:47 | <Hemmo> | [exa]: Still gives the same error with that style as I try to use the function |
| 09:23:09 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 09:23:53 | <pavonia> | :t reads -- is in Prelude |
| 09:23:54 | <lambdabot> | Read a => ReadS a |
| 09:23:54 | <[exa]> | Hemmo: show code? |
| 09:24:00 | <pavonia> | Bah |
| 09:24:02 | × | POLO quits (~Gambino@user/polo) (Read error: Connection reset by peer) |
| 09:24:28 | <Hemmo> | [exa]: https://paste.tomsmeding.com/LrG5YWWI |
| 09:24:57 | <pavonia> | That's the same code as before |
| 09:25:41 | <Hemmo> | My bad. |
| 09:26:38 | <Hemmo> | https://paste.tomsmeding.com/0qR7dzGG |
| 09:26:49 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5051:4e02:b5d9:aa15) (Remote host closed the connection) |
| 09:26:55 | <[exa]> | Hemmo: well you missed a space there :] |
| 09:27:19 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e9d4:5a2f:7c9:32c2) |
| 09:27:24 | <[exa]> | Hemmo: still, what about not trying to force the `read` parse out the Maybe ? |
| 09:27:42 | → | CiaoSen joins (~Jura@p200300c95731a0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 09:28:06 | × | zincy quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection) |
| 09:28:13 | <[exa]> | as in: ... | otherwise = Just (read pt) |
| 09:31:41 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e9d4:5a2f:7c9:32c2) (Ping timeout: 255 seconds) |
| 09:31:57 | → | money joins (~Gambino@user/polo) |
| 09:32:09 | → | nattiestnate joins (~nate@202.138.250.31) |
| 09:33:19 | <Hemmo> | Couldn't match expected type `Maybe PhoneType' |
| 09:33:19 | <Hemmo> | with actual type `PhoneType' |
| 09:33:20 | <Hemmo> | So yeah that works and now it returns Just Other. Now, though when I try to make the phone with (Phone Other 1 2) it gives ( |
| 09:33:24 | <Hemmo> | Couldn't match expected type `Maybe PhoneType' |
| 09:33:24 | <Hemmo> | with actual type `PhoneType' |
| 09:33:54 | <Hemmo> | Even if my Phone constructor has Maybe PhoneType in there? |
| 09:35:43 | <[exa]> | yeah you have to add Justs everywhere, as in (Phone (Just Other) 1 2) |
| 09:36:34 | <[exa]> | I kinda guess you might wanted to model the data as phonetype being "Just Landline" or eg. "Just Private" or "Nothing" as for all others, right? |
| 09:41:44 | <Hemmo> | So I wanted the phonetype to be either one of the specified ones (Other, PrivateMobile etc.) or Nothing |
| 09:42:10 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 09:42:17 | <Hemmo> | So my ultimate goal is to change the definition of the Phone type so that PhoneType and Country C are optional |
| 09:42:41 | <Rembane> | Hemmo: I might confuse everything here, but you can add the NoPhone constructor to PhoneType and use that instead of wrapping PhoneType in Maybe. |
| 09:43:39 | <pavonia> | Note that e.g. PrivateMobile and Nothing do not have the same type, so you can't use them in the same position in a data type |
| 09:44:17 | × | trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 255 seconds) |
| 09:45:15 | <Hemmo> | Uuugh I see. |
| 09:45:21 | <Hemmo> | Confused, yes! ;D |
| 09:46:20 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 09:47:07 | × | benin quits (~benin@183.82.177.185) (Ping timeout: 240 seconds) |
| 09:49:04 | <Hemmo> | I wonder how I am supposed to do it *scratches head*. Since I am asked to: |
| 09:49:04 | <Hemmo> | -Change the definition of Phone so that country code and phone type are optional using Maybe. ( Maybe PhoneType and Maybe CountryCode) |
| 09:49:22 | <Hemmo> | and then implement the Show for Phone so that it doesn't show the PhoneType or CC if they are Nothing |
| 09:50:09 | <Hemmo> | So I would need the Phone to possibly have values (Nothing Nothing 1) for example |
| 09:51:37 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 260 seconds) |
| 09:54:35 | × | money quits (~Gambino@user/polo) (Quit: Textual IRC Client: www.textualapp.com) |
| 09:57:54 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 09:58:12 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 09:58:22 | × | Demmy quits (~Demmy@102.89.32.82) (Ping timeout: 252 seconds) |
| 09:59:49 | <pavonia> | Hemmo: You can use Mabye PhoneType, but you need to wrap values that are present into a Just |
| 10:00:04 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 240 seconds) |
| 10:00:40 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 10:02:02 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 10:14:53 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 255 seconds) |
| 10:19:02 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 260 seconds) |
| 10:19:30 | → | coot joins (~coot@213.134.190.95) |
| 10:20:06 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 10:21:24 | × | jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 276 seconds) |
| 10:24:29 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 10:26:07 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 240 seconds) |
| 10:28:48 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 10:30:30 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds) |
| 10:32:23 | <[exa]> | is there any reason Cabal writes the "Up to date." message to stdout rather to stderr ? |
| 10:34:57 | → | Feuermagier_ joins (~Feuermagi@138.199.36.202) |
| 10:37:42 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 260 seconds) |
| 10:38:08 | → | money joins (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) |
| 10:38:21 | × | Feuermagier_ quits (~Feuermagi@138.199.36.202) (Client Quit) |
| 10:38:28 | money | is now known as Guest8810 |
| 10:38:49 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 10:41:18 | × | Guest8810 quits (~Gambino@50-77-84-254-static.hfc.comcastbusiness.net) (Changing host) |
| 10:41:18 | → | Guest8810 joins (~Gambino@user/polo) |
| 10:44:18 | → | favonia joins (~favonia@user/favonia) |
| 10:47:47 | × | Guest8810 quits (~Gambino@user/polo) (Quit: Textual IRC Client: www.textualapp.com) |
| 10:48:32 | <juri_> | because that's success? |
| 10:54:16 | <maerwald> | [exa]: no |
| 10:54:58 | <maerwald> | juri_: the convention for cli programs is: everything goes to stderr, unless it's output that may be consumed by a script or other program |
| 10:55:40 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 10:56:40 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 10:56:56 | <[exa]> | success is signaled sufficiently by $? == 0 |
| 10:57:44 | <[exa]> | the thing gets quite annoying when piping output of programs executed with `cabal run`, so I wondered if it's actually good for anything before I kick myself into sending a PR |
| 10:57:54 | <maerwald> | [exa]: --verbose=0 |
| 10:58:56 | <[exa]> | o lovely |
| 11:00:20 | → | unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
| 11:00:52 | × | favonia quits (~favonia@user/favonia) (Quit: Leaving) |
| 11:01:42 | → | nate1 joins (~nate@98.45.169.16) |
| 11:02:12 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 260 seconds) |
| 11:06:14 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
| 11:11:36 | → | __monty__ joins (~toonn@user/toonn) |
| 11:12:17 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 11:26:18 | → | Infinite joins (~Infinite@49.39.121.176) |
| 11:26:59 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 11:27:55 | → | titibandit joins (~thibaut@xdsl-89-1-132-100.nc.de) |
| 11:28:46 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e9d4:5a2f:7c9:32c2) |
| 11:30:56 | × | raym quits (~raym@user/raym) (Ping timeout: 255 seconds) |
| 11:31:08 | → | christiansen joins (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) |
| 11:31:08 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 11:31:39 | → | raym joins (~raym@user/raym) |
| 11:32:31 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 11:33:11 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e9d4:5a2f:7c9:32c2) (Ping timeout: 255 seconds) |
| 11:34:06 | → | jgeerds joins (~jgeerds@55d45f48.access.ecotel.net) |
| 11:38:26 | × | Infinite quits (~Infinite@49.39.121.176) (Quit: Client closed) |
| 11:38:41 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 11:38:54 | → | Infinite joins (~Infinite@49.39.121.176) |
| 11:40:03 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 258 seconds) |
| 11:40:28 | × | jollygood2 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC) |
| 11:40:39 | → | trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 11:46:41 | × | Hemmo quits (~IceChat95@85-76-165-183-nat.elisa-mobile.fi) (Ping timeout: 255 seconds) |
| 11:53:31 | → | jollygood2 joins (www-data@2607:5300:60:8be::1) |
| 11:53:44 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 12:02:48 | × | trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 276 seconds) |
| 12:06:34 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
| 12:08:14 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 12:16:11 | → | MironZ joins (~MironZ@nat-infra.ehlab.uk) |
| 12:16:34 | × | MironZ quits (~MironZ@nat-infra.ehlab.uk) (Client Quit) |
| 12:21:45 | → | MironZ joins (~MironZ@nat-infra.ehlab.uk) |
| 12:21:58 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 12:22:03 | → | coot joins (~coot@213.134.190.95) |
| 12:23:06 | × | Infinite quits (~Infinite@49.39.121.176) (Quit: Client closed) |
| 12:23:26 | → | frost joins (~frost@user/frost) |
| 12:24:18 | → | bahamas joins (~lucian@84.232.141.167) |
| 12:27:43 | × | MironZ quits (~MironZ@nat-infra.ehlab.uk) (Quit: The Lounge - https://thelounge.chat) |
| 12:28:59 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 255 seconds) |
| 12:32:01 | → | nahcetan joins (~nate@98.45.169.16) |
| 12:32:32 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 12:33:15 | → | MironZ joins (~MironZ@nat-infra.ehlab.uk) |
| 12:33:43 | × | MironZ quits (~MironZ@nat-infra.ehlab.uk) (Client Quit) |
| 12:34:35 | → | MironZ joins (~MironZ@nat-infra.ehlab.uk) |
| 12:34:57 | × | MironZ quits (~MironZ@nat-infra.ehlab.uk) (Client Quit) |
| 12:36:11 | × | nahcetan quits (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
| 12:37:33 | → | MironZ joins (~MironZ@nat-infra.ehlab.uk) |
| 12:39:28 | → | notzmv joins (~zmv@user/notzmv) |
| 12:48:16 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Remote host closed the connection) |
| 12:48:29 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 12:49:16 | → | bahamas joins (~lucian@84.232.141.167) |
| 12:53:13 | → | dcoutts_ joins (~duncan@host86-150-18-91.range86-150.btcentralplus.com) |
| 12:53:17 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 255 seconds) |
| 12:59:46 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 13:02:30 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 13:06:50 | × | frost quits (~frost@user/frost) (Ping timeout: 252 seconds) |
| 13:07:33 | → | frost joins (~frost@user/frost) |
| 13:08:18 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 13:09:13 | → | causal joins (~user@50.35.83.177) |
| 13:10:56 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 13:21:08 | → | Infinite joins (~Infinite@49.39.127.119) |
| 13:24:42 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 276 seconds) |
| 13:30:28 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e9d4:5a2f:7c9:32c2) |
| 13:34:39 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 13:35:08 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e9d4:5a2f:7c9:32c2) (Ping timeout: 255 seconds) |
| 13:37:57 | × | Fischmiep quits (~Fischmiep@user/Fischmiep) (Quit: WeeChat 3.0) |
| 13:41:34 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 13:41:37 | → | [_] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 13:43:23 | × | zeenk quits (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) (Quit: Konversation terminated!) |
| 13:44:40 | → | king_gs joins (~Thunderbi@2806:103e:29:5eb8:48de:d3eb:9d44:3d55) |
| 13:44:45 | × | king_gs quits (~Thunderbi@2806:103e:29:5eb8:48de:d3eb:9d44:3d55) (Client Quit) |
| 13:53:08 | → | o-90 joins (~o-90@gateway/tor-sasl/o-90) |
| 13:53:35 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Remote host closed the connection) |
| 13:54:02 | × | o-90 quits (~o-90@gateway/tor-sasl/o-90) (Remote host closed the connection) |
| 13:56:30 | → | mikail joins (~mikail@2a02:c7f:bc47:8c00:eb67:16d4:b37b:e62e) |
| 13:56:53 | × | [_] quits (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving) |
| 13:57:40 | <geekosaur> | [exa], I'd send the PR anyway; that really does belong on stderr |
| 13:58:15 | <geekosaur> | I've complained about it before, after discovering that piping output of a `cabal run` to xclip -in got me that extra line |
| 14:03:50 | × | jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 240 seconds) |
| 14:04:57 | × | phma quits (~phma@2001:5b0:2172:ae88:fc08:5bd9:8059:e51c) (Read error: Connection reset by peer) |
| 14:05:54 | → | brown121407 joins (~user@gnu/webmaster/smarton) |
| 14:05:56 | → | phma joins (~phma@host-67-44-208-42.hnremote.net) |
| 14:08:14 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds) |
| 14:11:01 | → | zincy joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
| 14:13:46 | → | Hemmo joins (~IceChat95@85-76-165-183-nat.elisa-mobile.fi) |
| 14:15:41 | × | zincy quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Ping timeout: 258 seconds) |
| 14:18:22 | × | mikail quits (~mikail@2a02:c7f:bc47:8c00:eb67:16d4:b37b:e62e) (Remote host closed the connection) |
| 14:21:20 | → | Fischmiep joins (~Fischmiep@user/Fischmiep) |
| 14:25:09 | → | mikail joins (~mikail@05433f01.skybroadband.com) |
| 14:26:26 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 14:34:50 | × | Infinite quits (~Infinite@49.39.127.119) (Ping timeout: 252 seconds) |
| 14:36:10 | → | bahamas joins (~lucian@84.232.141.167) |
| 14:42:57 | → | dsp joins (~dsp@cpc152107-haye27-2-0-cust227.17-4.cable.virginm.net) |
| 14:44:39 | <Hemmo> | I have a, newtype PhoneNo = MakePhoneNo Integer and another function, fromPhoneNo :: PhoneNo -> Integer; how can I cast it to Integer or at least make it return an integer?? |
| 14:44:48 | <Hemmo> | toInteger doesn't work |
| 14:44:55 | <Hemmo> | since it's not an integral I guess |
| 14:45:02 | <Hemmo> | also PhoneNo is an instance of Num |
| 14:45:44 | <Hemmo> | There's some vague information about IS and IN constructors but can't really find anything on them? Would they help me here? |
| 14:45:48 | <geekosaur> | fromPhoneNo (MakePhoneNo p) = p |
| 14:46:03 | <geekosaur> | just pattern match on it to extract the value |
| 14:46:23 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 14:47:02 | <Hemmo> | Oh gawd thanks |
| 14:47:34 | <Hemmo> | But wait why doesn't fromPhoneNo pn = pn work? |
| 14:47:58 | <Hemmo> | If I pass a PhoneNo as the parameter, why doesn't it work? |
| 14:48:28 | <geekosaur> | because that gives you back a PhoneNo, the Integer is still wrapped |
| 14:49:49 | <Hemmo> | Mhm thanks |
| 14:50:48 | <geekosaur> | Haskell will never automatically unwrap something (well, there are tricks but you shouldn't use them unless you absolutely need to). The right ting to do here is pattern match to extract the Integer |
| 14:51:11 | <geekosaur> | *thing |
| 14:51:26 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 272 seconds) |
| 14:53:57 | <Hemmo> | Yeah that makes sense |
| 14:57:06 | × | frost quits (~frost@user/frost) (Quit: Client closed) |
| 14:57:12 | × | brown121407 quits (~user@gnu/webmaster/smarton) (Remote host closed the connection) |
| 14:58:24 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 272 seconds) |
| 15:00:38 | × | titibandit quits (~thibaut@xdsl-89-1-132-100.nc.de) (Ping timeout: 255 seconds) |
| 15:00:44 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::ba9a) |
| 15:01:02 | <Hemmo> | I would be lost without this channel lol. The hardest friggin course simply because there's no help available |
| 15:01:24 | <Hemmo> | Also the paradigm is mind boggling at times |
| 15:01:38 | <Hemmo> | So cheers for that to everyone <3 |
| 15:03:14 | → | nate1 joins (~nate@98.45.169.16) |
| 15:08:17 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 15:11:03 | → | zebrag joins (~chris@user/zebrag) |
| 15:16:14 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 15:17:59 | × | Hemmo quits (~IceChat95@85-76-165-183-nat.elisa-mobile.fi) (Quit: Depression is merely anger without enthusiasm) |
| 15:20:37 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 260 seconds) |
| 15:23:10 | → | Guest6 joins (~Guest6@2401:4900:1cc8:6c44:e5b:4043:6d3:b1e) |
| 15:27:50 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 15:29:21 | → | kicky joins (~saarsecjb@190.90.86.91) |
| 15:32:04 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 15:36:05 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 15:36:27 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 15:42:08 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 15:49:26 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 15:50:45 | → | emad joins (~emad@102.43.155.242) |
| 15:52:17 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 15:54:25 | × | emad quits (~emad@102.43.155.242) (Client Quit) |
| 15:54:42 | → | emad joins (~emad@102.43.155.242) |
| 15:54:48 | → | emad_ joins (~emad@102.43.155.242) |
| 15:55:00 | × | lagooned quits (~lagooned@108-208-149-42.lightspeed.hstntx.sbcglobal.net) (Read error: Connection reset by peer) |
| 15:55:05 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 15:56:36 | × | emad_ quits (~emad@102.43.155.242) (Client Quit) |
| 15:56:36 | × | emad quits (~emad@102.43.155.242) (Client Quit) |
| 15:56:53 | → | emad joins (~emad@102.43.155.242) |
| 15:57:20 | × | Guest6 quits (~Guest6@2401:4900:1cc8:6c44:e5b:4043:6d3:b1e) (Ping timeout: 252 seconds) |
| 15:57:22 | → | ubert joins (~Thunderbi@p200300ecdf3b99991405ce1b00b6f67b.dip0.t-ipconnect.de) |
| 16:02:41 | × | christiansen quits (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 246 seconds) |
| 16:08:24 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 16:13:17 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 16:17:37 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:23:57 | × | mbuf quits (~Shakthi@122.164.194.119) (Quit: Leaving) |
| 16:28:17 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 16:31:17 | → | alp_ joins (~alp@user/alp) |
| 16:33:20 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 255 seconds) |
| 16:35:21 | → | isotope joins (uid556229@id-556229.ilkley.irccloud.com) |
| 16:36:18 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e9d4:5a2f:7c9:32c2) |
| 16:37:15 | → | fr-isotope joins (uid556229@id-556229.ilkley.irccloud.com) |
| 16:37:25 | × | isotope quits (uid556229@id-556229.ilkley.irccloud.com) () |
| 16:38:37 | × | alp_ quits (~alp@user/alp) (Ping timeout: 244 seconds) |
| 16:44:16 | → | alp joins (~alp@user/alp) |
| 16:45:02 | → | econo joins (uid147250@user/econo) |
| 16:46:36 | → | Infinite joins (~Infinite@49.39.121.30) |
| 16:50:56 | × | ubert quits (~Thunderbi@p200300ecdf3b99991405ce1b00b6f67b.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 16:51:12 | × | lyxia quits (~lyxia@poisson.chat) (Quit: WeeChat 3.5) |
| 16:51:14 | → | ubert joins (~Thunderbi@p548c97e3.dip0.t-ipconnect.de) |
| 16:58:32 | → | lyxia joins (~lyxia@poisson.chat) |
| 17:00:47 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds) |
| 17:05:21 | → | zeenk joins (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) |
| 17:12:02 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 260 seconds) |
| 17:13:47 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
| 17:14:12 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 17:26:50 | → | acidjnk joins (~acidjnk@p200300d0c7068b50adc47863922557b5.dip0.t-ipconnect.de) |
| 17:33:07 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
| 17:37:43 | → | JannisO joins (~JannisO@89.233.86.138) |
| 17:38:41 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 17:42:16 | → | zincy joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
| 17:50:21 | × | emad quits (~emad@102.43.155.242) (Quit: Leaving) |
| 17:52:13 | → | coot joins (~coot@213.134.190.95) |
| 17:59:27 | × | phma quits (~phma@host-67-44-208-42.hnremote.net) (Read error: Connection reset by peer) |
| 17:59:44 | × | cheater quits (~Username@user/cheater) (Ping timeout: 255 seconds) |
| 18:00:22 | → | phma joins (phma@2001:5b0:211b:8168:966b:7bf1:a9ed:d6d9) |
| 18:00:59 | → | christiansen joins (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) |
| 18:05:32 | × | dextaa quits (~DV@user/dextaa) (Ping timeout: 246 seconds) |
| 18:05:42 | → | notzmv joins (~zmv@user/notzmv) |
| 18:06:11 | → | cheater joins (~Username@user/cheater) |
| 18:07:50 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 255 seconds) |
| 18:08:27 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:09:55 | → | jgeerds joins (~jgeerds@55d45f48.access.ecotel.net) |
| 18:11:10 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds) |
| 18:12:46 | → | dextaa joins (~DV@user/dextaa) |
| 18:17:56 | × | mikail quits (~mikail@05433f01.skybroadband.com) (Quit: Leaving) |
| 18:23:00 | → | bahamas joins (~lucian@84.232.141.167) |
| 18:24:49 | → | codaraxis joins (~codaraxis@user/codaraxis) |
| 18:25:32 | × | jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 260 seconds) |
| 18:27:22 | × | dextaa quits (~DV@user/dextaa) (Read error: Connection reset by peer) |
| 18:29:29 | → | dextaa joins (~DV@user/dextaa) |
| 18:31:22 | × | dextaa quits (~DV@user/dextaa) (Read error: Connection reset by peer) |
| 18:32:26 | × | Infinite quits (~Infinite@49.39.121.30) (Ping timeout: 252 seconds) |
| 18:32:30 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 18:33:30 | → | dextaa joins (~DV@user/dextaa) |
| 18:33:49 | × | dextaa quits (~DV@user/dextaa) (Read error: Connection reset by peer) |
| 18:34:18 | × | codaraxis quits (~codaraxis@user/codaraxis) (Read error: Connection reset by peer) |
| 18:34:45 | → | codaraxis joins (~codaraxis@user/codaraxis) |
| 18:36:06 | → | dextaa joins (~DV@user/dextaa) |
| 18:45:34 | → | trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 18:46:32 | × | zincy quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Ping timeout: 255 seconds) |
| 18:52:36 | × | dextaa quits (~DV@user/dextaa) (Read error: Connection reset by peer) |
| 18:54:09 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 18:54:50 | → | dextaa joins (~DV@user/dextaa) |
| 18:55:28 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 18:56:31 | → | cyphase joins (~cyphase@user/cyphase) |
| 18:57:03 | × | Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
| 18:58:44 | × | trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 246 seconds) |
| 18:59:47 | peutri_ | is now known as peutri |
| 19:00:52 | × | zeenk quits (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) (Quit: Konversation terminated!) |
| 19:01:17 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 19:01:59 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 19:04:44 | → | nate1 joins (~nate@98.45.169.16) |
| 19:05:53 | × | christiansen quits (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 255 seconds) |
| 19:09:42 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 258 seconds) |
| 19:14:50 | → | zincy joins (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) |
| 19:16:06 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:19:12 | × | zincy quits (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) (Ping timeout: 260 seconds) |
| 19:21:52 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:22:21 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 19:27:44 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 19:29:25 | × | nattiestnate quits (~nate@202.138.250.31) (Quit: WeeChat 3.5) |
| 19:34:24 | → | kenran joins (~kenran@200116b82b66ad004afb3d623defe39f.dip.versatel-1u1.de) |
| 19:34:57 | → | zincy joins (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) |
| 19:37:42 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:40:12 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:47:42 | → | dcoutts joins (~duncan@host86-150-41-146.range86-150.btcentralplus.com) |
| 19:48:57 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 260 seconds) |
| 19:50:09 | × | dcoutts_ quits (~duncan@host86-150-18-91.range86-150.btcentralplus.com) (Ping timeout: 276 seconds) |
| 19:52:44 | → | DNH joins (~DNH@2a02:8109:b740:2c4:923:e330:4171:9d2d) |
| 20:01:01 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 20:05:56 | × | sympt quits (~sympt@user/sympt) (Ping timeout: 246 seconds) |
| 20:07:54 | × | _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
| 20:09:41 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:10:49 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Quit: ZNC 1.8.2 - https://znc.in) |
| 20:18:21 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:19:37 | → | sympt joins (~sympt@user/sympt) |
| 20:21:13 | → | stackdroid18 joins (14094@user/stackdroid) |
| 20:21:42 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 20:22:41 | × | JannisO quits (~JannisO@89.233.86.138) (Quit: Leaving) |
| 20:22:53 | → | bahamas joins (~lucian@84.232.141.167) |
| 20:24:03 | × | jollygood2 quits (www-data@2607:5300:60:8be::1) (Quit: quit) |
| 20:27:31 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 258 seconds) |
| 20:27:35 | → | jollygood2 joins (www-data@2607:5300:60:8be::1) |
| 20:31:15 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 20:31:58 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 20:32:29 | → | tenniscp25 joins (~tenniscp2@2001:fb1:fd:fc2f:117f:4046:556c:7bec) |
| 20:32:55 | → | Midjak joins (~Midjak@82.66.147.146) |
| 20:33:45 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 20:35:11 | × | zincy quits (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) (Ping timeout: 258 seconds) |
| 20:35:36 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:35:40 | × | dsp quits (~dsp@cpc152107-haye27-2-0-cust227.17-4.cable.virginm.net) (Remote host closed the connection) |
| 20:35:42 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 20:38:12 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 20:42:18 | → | titibandit joins (~thibaut@xdsl-89-1-132-100.nc.de) |
| 20:44:26 | × | obabo quits (~obabo@563BF107.catv.pool.telekom.hu) (Ping timeout: 246 seconds) |
| 20:44:41 | × | titibandit quits (~thibaut@xdsl-89-1-132-100.nc.de) (Remote host closed the connection) |
| 20:44:58 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:45:03 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 20:50:19 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 20:50:42 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 20:50:58 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 20:52:37 | → | nehsou^ joins (~nehsou@128-092-173-218.biz.spectrum.com) |
| 20:54:05 | × | [Leary] quits (~Leary]@122-58-228-205-vdsl.sparkbb.co.nz) (Remote host closed the connection) |
| 20:57:01 | × | _xor quits (~xor@72.49.198.103) (Quit: brb) |
| 20:58:31 | → | bahamas joins (~lucian@84.232.141.167) |
| 20:58:32 | → | moonsheep joins (~user@user/moonsheep) |
| 20:58:51 | <moonsheep> | Is there an easy way to convert time from the hourglass package to UTCTime? |
| 20:59:09 | <moonsheep> | (if you're wondering, fuzzy-dates uses hourglass time) |
| 20:59:35 | × | dequbed quits (~dequbed@banana-new.kilobyte22.de) (Quit: bye!) |
| 20:59:46 | × | tenniscp25 quits (~tenniscp2@2001:fb1:fd:fc2f:117f:4046:556c:7bec) () |
| 21:01:01 | × | kenran quits (~kenran@200116b82b66ad004afb3d623defe39f.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
| 21:01:35 | <hpc> | what type in particular? that package has a lot going on |
| 21:01:54 | → | dequbed joins (~dequbed@banana-new.kilobyte22.de) |
| 21:01:59 | → | _xor joins (~xor@72.49.198.103) |
| 21:02:28 | <moonsheep> | DiffTime |
| 21:02:36 | <moonsheep> | DateTime* my bad |
| 21:02:47 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 240 seconds) |
| 21:03:10 | → | trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 21:06:02 | × | CiaoSen quits (~Jura@p200300c95731a0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 21:06:50 | → | zincy joins (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) |
| 21:07:47 | <hpc> | a DateTime is a Date and TimeOfDay, which you can pattern match on |
| 21:07:53 | <hpc> | and UTCTime is similarly structured |
| 21:08:16 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 272 seconds) |
| 21:08:57 | <hpc> | or you can get to CTime via hourglass's type classes if you look at their instance lists |
| 21:09:02 | <hpc> | and then from there... something |
| 21:10:26 | <hpc> | you probably don't want CTime though |
| 21:11:03 | <moonsheep> | Yeah, I'm trying to do something like that |
| 21:11:25 | × | zincy quits (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) (Ping timeout: 260 seconds) |
| 21:12:46 | <moonsheep> | Landed on this https://paste.tomsmeding.com/jLAfqbFh |
| 21:12:50 | <moonsheep> | If anyone cares |
| 21:13:12 | → | monochrom joins (trebla@216.138.220.146) |
| 21:17:39 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 21:18:08 | → | zeenk joins (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) |
| 21:18:35 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 21:22:04 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:24:40 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 21:25:35 | <Bulby[m]> | what would be the preferred way to represent null in a parsed language? |
| 21:25:44 | <Bulby[m]> | add it to the data type for the values, or use maybe? |
| 21:26:28 | → | zincy joins (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) |
| 21:26:41 | <Rembane> | Bulby[m]: Does it make sense for the values to have a null constructor? |
| 21:26:55 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 244 seconds) |
| 21:26:56 | <Bulby[m]> | wym does it make sense |
| 21:27:33 | <Rembane> | Bulby[m]: What do you want to do with the parsed language? |
| 21:27:53 | <Bulby[m]> | evalute it - this is the famous toy language lox |
| 21:29:03 | <Rembane> | Sounds like something that could be good on bagels with cream cheese. |
| 21:29:09 | <Bulby[m]> | 😄 |
| 21:29:22 | <Rembane> | Then anything goes. Try both and see what you like best. |
| 21:29:27 | <Bulby[m]> | I think it would save pain in match cases if it had a null constructor |
| 21:30:23 | <hpc> | so you would have something like data Data = Null | Int Int | String String | ... -- for whatever primitive values your language has |
| 21:30:38 | <hpc> | that seems fine to me |
| 21:30:43 | <Bulby[m]> | yes |
| 21:31:15 | <hpc> | you want that one type to express every value that the DSL values can take |
| 21:31:28 | × | moonsheep quits (~user@user/moonsheep) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)) |
| 21:31:30 | <Bulby[m]> | I like how crafting interpreters explicitly states "btw java sucks at parsing so we use the visitor pattern" |
| 21:32:01 | <hpc> | don't forget to add Undefined in there too, so the javascript programmers don't get confused :D |
| 21:32:10 | <Bulby[m]> | 😉 |
| 21:32:12 | <Bulby[m]> | never |
| 21:32:32 | <Bulby[m]> | why is there undefined and null |
| 21:32:33 | <Bulby[m]> | 😭 |
| 21:32:47 | <Rembane> | I think they had a good reason for it at the time, and then it kinda got out of hand. |
| 21:33:24 | <koala_man> | I just did `stack update; stack install ShellCheck` and it tried to install 0.7.2. I then deleted ~/.stack and tried again, and it installed 0.8.0. How does it choose the version? |
| 21:33:29 | × | zebrag quits (~chris@user/zebrag) (Ping timeout: 255 seconds) |
| 21:33:43 | <geekosaur> | your current resolver, probably |
| 21:34:00 | <geekosaur> | and you wiped out the global config file which was specifying an older resolver? |
| 21:34:15 | <hpc> | Rembane: its roots in scheme are so powerful that they needed twice as many null values to make it a billion dollar mistake :P |
| 21:34:25 | <koala_man> | there's a user wide resolver? |
| 21:34:29 | <geekosaur> | (I think it's ~/.stack/stack.yaml) |
| 21:35:00 | <Rembane> | hpc: Exactly! :D |
| 21:35:04 | <geekosaur> | there's a user-wide stack.yaml, including resolver, used when you're outside of a project with its own stack.yaml |
| 21:35:04 | → | odnes joins (~odnes@5-203-190-124.pat.nym.cosmote.net) |
| 21:35:30 | × | Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection) |
| 21:35:52 | <koala_man> | man, I shouldn't have deleted it |
| 21:36:29 | <geekosaur> | but its resolver doesn't get auto-updated when a new LTS is released |
| 21:36:42 | <koala_man> | the docs seem to say that the resolver is a project specific config |
| 21:36:56 | <hpc> | it's that too |
| 21:37:15 | × | trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 244 seconds) |
| 21:37:25 | → | bahamas joins (~lucian@84.232.141.167) |
| 21:37:27 | <hpc> | it'll use whatever the most specific config file specifies |
| 21:37:34 | <geekosaur> | https://docs.haskellstack.org/en/stable/GUIDE/#finding-project-configs-and-the-implicit-global-project |
| 21:37:46 | <geekosaur> | this is the implicit global project |
| 21:41:21 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::ba9a) |
| 21:42:02 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 255 seconds) |
| 21:43:50 | × | odnes quits (~odnes@5-203-190-124.pat.nym.cosmote.net) (Read error: Connection reset by peer) |
| 21:44:23 | <energizer> | does anyone use Reduceron, or is it only a research project? https://github.com/tommythorn/Reduceron |
| 21:44:39 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 21:46:08 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 21:46:44 | → | odnes joins (~odnes@5-203-190-124.pat.nym.cosmote.net) |
| 21:50:09 | × | odnes quits (~odnes@5-203-190-124.pat.nym.cosmote.net) (Read error: Connection reset by peer) |
| 21:50:19 | <geekosaur> | research project only, to th best of my knowledge |
| 21:50:22 | → | [Leary] joins (~Leary]@122-58-228-205-vdsl.sparkbb.co.nz) |
| 21:50:34 | → | odnes joins (~odnes@5-203-190-124.pat.nym.cosmote.net) |
| 21:51:08 | × | odnes quits (~odnes@5-203-190-124.pat.nym.cosmote.net) (Read error: Connection reset by peer) |
| 21:52:01 | → | odnes joins (~odnes@5-203-190-124.pat.nym.cosmote.net) |
| 21:52:59 | × | odnes quits (~odnes@5-203-190-124.pat.nym.cosmote.net) (Read error: Connection reset by peer) |
| 21:53:03 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:54:57 | → | odnes joins (~odnes@5-203-190-124.pat.nym.cosmote.net) |
| 21:55:32 | × | DNH quits (~DNH@2a02:8109:b740:2c4:923:e330:4171:9d2d) (Ping timeout: 260 seconds) |
| 22:02:08 | × | odnes quits (~odnes@5-203-190-124.pat.nym.cosmote.net) (Read error: Connection reset by peer) |
| 22:05:53 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 255 seconds) |
| 22:06:56 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:07:55 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:11:01 | → | trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 22:12:43 | → | Nahra joins (~user@static.161.95.99.88.clients.your-server.de) |
| 22:13:44 | × | Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
| 22:14:29 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 22:15:09 | → | bahamas joins (~lucian@84.232.141.167) |
| 22:17:04 | → | nahcetan joins (~nate@98.45.169.16) |
| 22:19:38 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 246 seconds) |
| 22:23:41 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 22:26:14 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 22:26:56 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 22:28:07 | × | trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 22:28:12 | × | zincy quits (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) (Ping timeout: 260 seconds) |
| 22:34:24 | → | Topsi joins (~Topsi@dyndsl-095-033-020-185.ewe-ip-backbone.de) |
| 22:41:50 | × | acidjnk quits (~acidjnk@p200300d0c7068b50adc47863922557b5.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
| 22:45:57 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:48:12 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 22:49:01 | <Bulby[m]> | hpc: please explain the scheme joke 🙂 |
| 22:50:15 | <hpc> | javascript was originally going to be a lisp |
| 22:50:22 | → | odnes joins (~odnes@5-203-156-66.pat.nym.cosmote.net) |
| 22:50:33 | <hpc> | and then late in development the management at netscape thought it would confuse everyone and wanted it to be C-like syntax |
| 22:50:43 | <Bulby[m]> | i've seen it called a lisp in c's clothing |
| 22:51:15 | <geekosaur> | the story back in the day was they wanted to ride the coattails of java |
| 22:51:32 | <hpc> | the lisp family puts out good languages, and imo if it wasn't for how embarassingly verbose lambdas are in js it would be a perfectly fine dynamic language |
| 22:51:37 | <hpc> | certainly better than elisp at least |
| 22:51:38 | <monochrom> | the name of java, the syntax of c, the semantics of lisp |
| 22:51:49 | <hpc> | > length "(function(){})()" |
| 22:51:49 | <Bulby[m]> | keyword dynamic language |
| 22:51:51 | <lambdabot> | 16 |
| 22:52:08 | <monochrom> | On your CV you can write "I know J/Java/Javascript". >:) |
| 22:52:21 | <Bulby[m]> | J ? |
| 22:52:22 | <hpc> | J/ava/script |
| 22:52:32 | <geekosaur> | successor to APL |
| 22:52:42 | <Bulby[m]> | oh 🙂 |
| 22:52:51 | <Bulby[m]> | is it functional (APL is functional iirc) |
| 22:52:55 | <geekosaur> | https://en.wikipedia.org/wiki/J_(programming_language) |
| 22:52:58 | <monochrom> | This is to mock people who write "I know C/C++" |
| 22:53:05 | <geekosaur> | fsvo functional |
| 22:53:24 | hpc | updates his resume with "knows C/C++, J/Java/Javascript, and GNU/Linux" |
| 22:53:45 | <energizer> | what value of functional does J/APL not satisfy? |
| 22:53:45 | → | bahamas joins (~lucian@84.232.141.167) |
| 22:53:46 | <geekosaur> | apl's all about function composition, but "functional" can be argued |
| 22:54:24 | <Bulby[m]> | for some value of functional? meaning like kinda functional? |
| 22:54:55 | <monochrom> | All I know about APL I learned from https://link.springer.com/chapter/10.1007/978-3-662-54434-1_21 :) |
| 22:55:53 | <energizer> | that article hits one point of 4-5 points that define APL |
| 22:55:53 | <geekosaur> | I should say some people argue it. I don't quite see what grounds either |
| 22:56:36 | <geekosaur> | but then, some people claim only Haskell is truly functional because they consider purity essential to it |
| 22:56:54 | <Bulby[m]> | pure functional is a haskell meme |
| 22:56:56 | <energizer> | eg apl is big on higher order functions, combinators |
| 22:57:06 | → | zincy joins (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) |
| 22:57:13 | <geekosaur> | yes, as I said earlier |
| 22:57:45 | <monochrom> | But I don't need a paper to explain higher-order functions and combinators to me. |
| 22:57:49 | <geekosaur> | "functional" is one of those "what I point to" concepts :) |
| 22:58:05 | <monochrom> | The paper "hits" "1 point" but it's the hardest point. |
| 22:58:08 | × | bahamas quits (~lucian@84.232.141.167) (Ping timeout: 246 seconds) |
| 22:58:13 | <energizer> | i guess "functional" to some people means "like haskell" |
| 22:58:34 | <geekosaur> | there are others who believe only scheme is truly functional |
| 22:59:01 | <energizer> | as in, untyped lambda calculus? |
| 22:59:09 | <Bulby[m]> | pure functional is a haskell meme, all it does is stuff side effects into monads |
| 22:59:38 | <geekosaur> | not exactly |
| 23:00:08 | <monochrom> | Simple dichotomies are a human meme. |
| 23:00:24 | <Bulby[m]> | i can't say you're wrong |
| 23:00:44 | <monochrom> | All people do is classify everything into simple dichotomies and stuff nuances into /dev/null. |
| 23:00:49 | <geekosaur> | the trick behind I/O is that we *do* treat it purely. the haskell runtime does all the actual side effects, but monads are pure and so is IO if you look at what it's actually doing |
| 23:00:53 | <Bulby[m]> | lol |
| 23:01:27 | × | zincy quits (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) (Ping timeout: 260 seconds) |
| 23:01:31 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 23:01:43 | <Bulby[m]> | I guess it kind of is 🤔 |
| 23:02:29 | <geekosaur> | all you are doing is using a monad as a framework to build up a program for the runtime out of pure pieces |
| 23:02:47 | <geekosaur> | the runtime does mutation, side effects, etc. |
| 23:03:08 | <geekosaur> | IO is the type of opcodes for a virtual machine |
| 23:03:17 | <geekosaur> | which is the runtime |
| 23:03:55 | <geekosaur> | (if you've studied free monads you'll have some idea of how that framework works) |
| 23:04:10 | <energizer> | like python, another pure language. it sends instructions to a runtime which does the IO |
| 23:04:18 | <Bulby[m]> | WHAT |
| 23:04:27 | <energizer> | i'm being snarky |
| 23:04:43 | <energizer> | but see http://conal.net/blog/posts/the-c-language-is-purely-functional |
| 23:04:43 | <hpc> | every language is pure if you put an interpreter under it :D |
| 23:06:17 | → | nate1 joins (~nate@98.45.169.16) |
| 23:07:12 | × | zeenk quits (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) (Quit: Konversation terminated!) |
| 23:08:34 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
| 23:09:25 | × | Topsi quits (~Topsi@dyndsl-095-033-020-185.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 23:09:42 | × | adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
| 23:09:46 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 23:11:17 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 244 seconds) |
| 23:11:26 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 23:11:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 23:11:49 | → | adanwan joins (~adanwan@gateway/tor-sasl/adanwan) |
| 23:13:52 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:19:11 | × | odnes quits (~odnes@5-203-156-66.pat.nym.cosmote.net) (Quit: Leaving) |
| 23:19:47 | × | nahcetan quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 23:28:18 | → | pavonia joins (~user@user/siracusa) |
| 23:30:15 | → | zincy joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
| 23:31:13 | <Bulby[m]> | with megaparsec, how in the world am I supposed to pretty print an error of a list of tokens |
| 23:32:59 | <Bulby[m]> | a solution I can think of is mashing the lexer and parser together |
| 23:34:05 | <dsal> | Bulby[m]: can you expand on that a bit? |
| 23:34:42 | <dsal> | Do you mean something beyond `errorBundlePretty`? |
| 23:35:03 | × | zincy quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Ping timeout: 276 seconds) |
| 23:37:36 | <Bulby[m]> | yes, i split my parsec into a lexer and parser |
| 23:45:40 | <dsal> | Oh. It sounds like you did something weird and aren't sure how to proceed. The defaults should do roughly the right thing with the normal lexemes over Char from Text or similar, but if you built a new thing and aren't using parser combinators, then it seems unlikely others will have the context required to help much. |
| 23:47:46 | <Bulby[m]> | 🤷 |
| 23:47:54 | → | zincy joins (~zincy@2a00:23c8:970c:4801:2cec:2611:c697:bc3c) |
| 23:48:01 | <Bulby[m]> | perhaps I should mash the lexer and parser together |
| 23:48:14 | <sm> | are you trying to report multiple errors at once ? |
| 23:53:09 | <sm> | I think the most common style with megaparsec is to have your parsers also lex, indeed. It simplifies things, like error reporting |
| 23:53:19 | <Bulby[m]> | ah, thanks for the insight |
| 23:53:21 | × | Nahra quits (~user@static.161.95.99.88.clients.your-server.de) (Remote host closed the connection) |
| 23:53:35 | <Bulby[m]> | i will do that for sanity's sake |
| 23:53:47 | × | Inst quits (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 240 seconds) |
| 23:55:13 | <sm> | yes and for sanity, do it rigorously and consistently or whitespace will become a pain |
| 23:55:41 | × | Inst_ quits (~Inst@2601:6c4:4080:3f80:90d3:88ea:e6d8:f698) (Ping timeout: 255 seconds) |
| 23:56:59 | <sm> | https://hackage.haskell.org/package/megaparsec-9.2.1/docs/Text-Megaparsec-Char-Lexer.html seems to have good advice |
| 23:58:14 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 23:58:50 | <sm> | and https://markkarpov.com/tutorial/megaparsec.html#lexing |
| 23:59:16 | <Bulby[m]> | yes, my lexer already uses those functions, so I just have to retool it |
All times are in UTC on 2022-05-29.