Logs on 2022-02-04 (liberachat/#haskell)
| 00:01:46 | → | lavaman joins (~lavaman@98.38.249.169) |
| 00:01:56 | → | alx741 joins (~alx741@157.100.197.240) |
| 00:06:31 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 00:07:03 | → | Akiva joins (~Akiva@user/Akiva) |
| 00:09:44 | × | alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer) |
| 00:13:11 | × | HotblackDesiato quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection) |
| 00:13:17 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds) |
| 00:13:31 | → | HotblackDesiato joins (~HotblackD@gateway/tor-sasl/hotblackdesiato) |
| 00:15:57 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 00:16:31 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 00:16:35 | × | shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection) |
| 00:16:51 | → | shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
| 00:17:48 | → | dut joins (~dut@user/dut) |
| 00:20:05 | → | shapr` joins (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
| 00:21:43 | × | shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 00:22:24 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 00:23:35 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 00:23:36 | × | oscurochu quits (~oscurochu@097-096-050-227.res.spectrum.com) (Remote host closed the connection) |
| 00:26:17 | → | alx741 joins (~alx741@157.100.197.240) |
| 00:29:40 | × | x_kuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 00:29:57 | × | emf quits (~emf@2620:10d:c090:400::5:e4c1) (Ping timeout: 240 seconds) |
| 00:31:09 | × | alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer) |
| 00:31:10 | → | emf joins (~emf@163.114.132.4) |
| 00:35:53 | × | emf quits (~emf@163.114.132.4) (Ping timeout: 256 seconds) |
| 00:36:47 | × | tatarqa quits (~kli@ip-89-177-122-45.net.upcbroadband.cz) (Read error: Connection reset by peer) |
| 00:38:09 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:a019:43b1:3d96:a258) |
| 00:42:14 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a019:43b1:3d96:a258) (Remote host closed the connection) |
| 00:42:29 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 00:44:41 | × | Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep) |
| 00:47:26 | → | alx741 joins (~alx741@157.100.197.240) |
| 00:48:00 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4) |
| 00:51:30 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:51:35 | → | mvk joins (~mvk@2607:fea8:5cdc:bf00::80f1) |
| 00:52:12 | × | alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer) |
| 00:59:15 | → | oscurochu joins (~oscurochu@097-096-050-227.res.spectrum.com) |
| 00:59:57 | × | dcoutts quits (~duncan@109.144.215.134) (Ping timeout: 240 seconds) |
| 01:00:37 | × | vglfr quits (~vglfr@88.155.40.186) (Ping timeout: 240 seconds) |
| 01:01:26 | <awpr> | I'm not sure I follow. I thought you said removing the redundant standalone Typeable instances fixed the problem? |
| 01:01:32 | → | vglfr joins (~vglfr@88.155.40.186) |
| 01:01:57 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 01:02:10 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 01:02:52 | <awpr> | oh, is it that fixing it required both NoPolyKinds _and_ removing the instances? |
| 01:03:10 | → | califax joins (~califax@user/califx) |
| 01:07:29 | → | miremeister joins (uid387155@id-387155.uxbridge.irccloud.com) |
| 01:08:17 | × | oscurochu quits (~oscurochu@097-096-050-227.res.spectrum.com) (Ping timeout: 256 seconds) |
| 01:08:36 | → | alx741 joins (~alx741@157.100.197.240) |
| 01:09:49 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 01:10:46 | × | alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer) |
| 01:10:51 | × | shapr` quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection) |
| 01:11:01 | × | alp quits (~alp@user/alp) (Remote host closed the connection) |
| 01:11:20 | → | alp joins (~alp@user/alp) |
| 01:14:37 | × | doxen quits (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 240 seconds) |
| 01:15:17 | → | califax- joins (~califax@user/califx) |
| 01:16:24 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 01:16:39 | × | califax quits (~califax@user/califx) (Ping timeout: 276 seconds) |
| 01:16:40 | califax- | is now known as califax |
| 01:17:37 | × | ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec) |
| 01:28:41 | × | Merfont quits (~Kaiepi@156.34.47.253) (Ping timeout: 245 seconds) |
| 01:29:05 | → | alx741 joins (~alx741@157.100.197.240) |
| 01:30:37 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds) |
| 01:33:21 | × | dut quits (~dut@user/dut) (Read error: Connection reset by peer) |
| 01:33:43 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 01:33:57 | × | alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer) |
| 01:34:34 | → | alx741 joins (~alx741@157.100.197.240) |
| 01:36:16 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 01:36:57 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 01:43:13 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer) |
| 01:43:14 | × | alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer) |
| 01:43:37 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 01:51:15 | × | hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 256 seconds) |
| 01:52:59 | → | hyiltiz joins (~quassel@31.220.5.250) |
| 01:59:03 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 02:02:22 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection) |
| 02:02:52 | → | kimjetwav joins (~user@2607:fea8:2363:8f00:8299:55f4:a45f:d9c3) |
| 02:03:21 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 02:09:37 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:a019:43b1:3d96:a258) |
| 02:10:49 | → | rusrushal13 joins (~rusrushal@2409:4056:9:1708:2c2:74fb:7af9:78dc) |
| 02:11:21 | → | vysn joins (~vysn@user/vysn) |
| 02:13:37 | × | mmhat quits (~mmh@55d48978.access.ecotel.net) (Ping timeout: 240 seconds) |
| 02:14:38 | × | brettgilio quits (~brettgili@x-node.gq) (Ping timeout: 268 seconds) |
| 02:16:15 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:19:54 | → | califax- joins (~califax@user/califx) |
| 02:20:24 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a019:43b1:3d96:a258) (Remote host closed the connection) |
| 02:21:59 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 02:24:15 | × | califax quits (~califax@user/califx) (Ping timeout: 276 seconds) |
| 02:24:16 | califax- | is now known as califax |
| 02:27:17 | × | xff0x quits (~xff0x@2001:1a81:53e8:2500:a7da:afdc:1a91:3063) (Ping timeout: 240 seconds) |
| 02:29:18 | → | xff0x joins (~xff0x@2001:1a81:5224:e000:4717:65df:57b3:7708) |
| 02:30:56 | × | jinsun__ quits (~quassel@user/jinsun) (Read error: Connection reset by peer) |
| 02:32:37 | → | jinsun joins (~quassel@user/jinsun) |
| 02:32:45 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 02:33:25 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 02:38:33 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 02:39:32 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 02:39:53 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 02:40:54 | × | rusrushal13 quits (~rusrushal@2409:4056:9:1708:2c2:74fb:7af9:78dc) (Ping timeout: 256 seconds) |
| 02:42:37 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds) |
| 02:43:43 | → | razetime joins (~quassel@49.207.209.26) |
| 02:45:56 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 02:47:59 | × | alp quits (~alp@user/alp) (Ping timeout: 250 seconds) |
| 02:49:08 | → | andreabedini joins (~andreabed@8s8kj6nrww5p5nzkz2zz.ip6.superloop.com) |
| 03:00:10 | × | asivitz quits (uid178348@tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 03:06:29 | → | Ssorjkokhn joins (~Ssorjkokh@65.155.193.58) |
| 03:10:23 | × | unyu quits (~pyon@user/pyon) (Quit: brb) |
| 03:11:49 | → | dsrt^ joins (~dsrt@128-092-185-170.biz.spectrum.com) |
| 03:16:48 | → | rusrushal13 joins (~rusrushal@2401:4900:5d15:a022:862f:921f:d1a9:883d) |
| 03:18:51 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 03:23:38 | → | cynomys joins (~cynomys@user/cynomys) |
| 03:28:49 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 256 seconds) |
| 03:31:46 | × | phma quits (~phma@host-67-44-208-91.hnremote.net) (Read error: Connection reset by peer) |
| 03:32:40 | × | Ssorjkokhn quits (~Ssorjkokh@65.155.193.58) (Quit: Client closed) |
| 03:37:34 | → | phma joins (~phma@host-67-44-208-198.hnremote.net) |
| 03:39:35 | × | cynomys quits (~cynomys@user/cynomys) (Ping timeout: 256 seconds) |
| 03:40:49 | × | modnar quits (~modnar@shell.sonic.net) (Quit: farewell) |
| 03:41:10 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 03:41:14 | → | modnar joins (~modnar@shell.sonic.net) |
| 03:41:57 | × | td_ quits (~td@94.134.91.183) (Ping timeout: 240 seconds) |
| 03:43:51 | × | miremeister quits (uid387155@id-387155.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 03:44:03 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
| 03:44:10 | → | td_ joins (~td@muedsl-82-207-238-085.citykom.de) |
| 03:45:16 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 03:49:22 | → | mbuf joins (~Shakthi@122.174.58.23) |
| 03:49:27 | × | vglfr quits (~vglfr@88.155.40.186) (Ping timeout: 256 seconds) |
| 03:50:21 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds) |
| 03:52:06 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 03:55:55 | → | hippoid joins (~hippoid@184.105.3.82) |
| 03:56:08 | × | hippoid quits (~hippoid@184.105.3.82) (Client Quit) |
| 04:00:01 | × | haasn quits (~nand@haasn.dev) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 04:01:21 | → | haasn joins (~nand@haasn.dev) |
| 04:03:46 | → | oscurochu joins (~oscurochu@097-096-050-227.res.spectrum.com) |
| 04:03:57 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 04:06:59 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 04:06:59 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 04:06:59 | → | wroathe joins (~wroathe@user/wroathe) |
| 04:07:57 | × | oscurochu quits (~oscurochu@097-096-050-227.res.spectrum.com) (Ping timeout: 240 seconds) |
| 04:08:15 | × | nunggu quits (~q@user/nunggu) (Ping timeout: 276 seconds) |
| 04:10:56 | → | nunggu joins (~q@user/nunggu) |
| 04:12:24 | → | doxen joins (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 04:14:03 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 04:14:40 | × | retroid_ quits (~retro@2e40edd9.skybroadband.com) (Ping timeout: 250 seconds) |
| 04:18:20 | × | phma quits (~phma@host-67-44-208-198.hnremote.net) (Read error: Connection reset by peer) |
| 04:21:03 | → | retroid_ joins (~retro@2e40edd9.skybroadband.com) |
| 04:22:54 | × | burnsidesLlama quits (~burnsides@dhcp168-042.wadham.ox.ac.uk) (Remote host closed the connection) |
| 04:23:26 | → | burnsidesLlama joins (~burnsides@client-8-80.eduroam.oxuni.org.uk) |
| 04:23:41 | → | phma joins (~phma@2001:0:c38c:c38c:146a:837a:bcd3:2f88) |
| 04:27:39 | × | burnsidesLlama quits (~burnsides@client-8-80.eduroam.oxuni.org.uk) (Ping timeout: 256 seconds) |
| 04:31:07 | × | phma quits (~phma@2001:0:c38c:c38c:146a:837a:bcd3:2f88) (Ping timeout: 250 seconds) |
| 04:31:13 | → | phma_ joins (phma@2001:5b0:210d:a008:2b93:5e3e:cefa:7af9) |
| 04:35:33 | × | nunggu quits (~q@user/nunggu) (Ping timeout: 276 seconds) |
| 04:37:27 | → | nunggu joins (~q@user/nunggu) |
| 04:39:17 | × | chenqisu1 quits (~chenqisu1@183.217.200.249) (Ping timeout: 240 seconds) |
| 04:40:30 | × | modnar quits (~modnar@shell.sonic.net) (Quit: No Ping reply in 180 seconds.) |
| 04:40:52 | → | modnar joins (~modnar@shell.sonic.net) |
| 04:59:57 | × | doxen quits (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
| 05:07:23 | × | yaroot quits (~yaroot@57.48.30.125.dy.iij4u.or.jp) (Remote host closed the connection) |
| 05:08:07 | → | yaroot joins (~yaroot@57.48.30.125.dy.iij4u.or.jp) |
| 05:08:23 | → | zebrag joins (~chris@user/zebrag) |
| 05:11:51 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds) |
| 05:12:53 | → | wavemode joins (~wavemode@c-98-223-145-19.hsd1.il.comcast.net) |
| 05:14:00 | × | jinsun quits (~quassel@user/jinsun) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 05:14:17 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 05:14:50 | → | jinsun joins (~quassel@user/jinsun) |
| 05:16:34 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 05:16:49 | → | sharky2 joins (~bc8147f2@cerf.good1.com) |
| 05:19:00 | <sharky2> | hi. I'm trying to read haskell show string from a file, and it works fine, except I get "Exception: Prelude.read: no parse" if the line is invalid. this shouldn't happen in practice, since file is computer generated, but I still want to handle it |
| 05:19:17 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 05:19:52 | <ski> | > (reads :: ReadS Integer) "123abc" |
| 05:19:53 | <lambdabot> | [(123,"abc")] |
| 05:20:01 | <ski> | > (reads :: ReadS Integer) "abc" |
| 05:20:03 | <lambdabot> | [] |
| 05:20:42 | <ski> | > case [n | (n,s) <- (reads :: ReadS Integer) " 123 ",("","") <- lex s] of [n] -> Just n; _ -> Nothing |
| 05:20:44 | <lambdabot> | Just 123 |
| 05:21:03 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 05:21:38 | <sharky2> | thanks. ReadS Integer is a bit confusing. is that required or can haskell figure out the types |
| 05:21:41 | <ski> | > Text.Read.readMaybe " 123 " :: Maybe Integer |
| 05:21:42 | <lambdabot> | Just 123 |
| 05:22:44 | <ski> | > case [ns | (ns,s) <- replicateM 3 (StateT (reads :: ReadS Integer)) `runStateT` " 123 45 6 ",("","") <- lex s] of [ns] -> Just ns; _ -> Nothing |
| 05:22:46 | <lambdabot> | Just [123,45,6] |
| 05:22:50 | <ski> | > case [ns | (ns,s) <- many (StateT (reads :: ReadS Integer)) `runStateT` " 123 45 6 ",("","") <- lex s] of [ns] -> Just ns; _ -> Nothing |
| 05:22:51 | <lambdabot> | Just [123,45,6] |
| 05:24:01 | <sharky2> | :t readMaybe |
| 05:24:02 | <lambdabot> | Read a => String -> Maybe a |
| 05:25:37 | → | cynomys joins (~cynomys@user/cynomys) |
| 05:27:02 | <ski> | "is that required or can haskell figure out the types" -- usually/commonly the context determines which type of value you want to read (and then you don't need the type ascriptions). but sometimes it doesn't pin it down .. |
| 05:27:34 | <Axman6> | sometimes there are an infinite number of possible types, and GHC finds that a bit much |
| 05:28:23 | <sharky2> | out of curiosity, there's no way to catch exception returned by read? |
| 05:28:37 | <ski> | you're better of using `reads' or `readMaybe' |
| 05:28:58 | <Axman6> | you can use evaluate (read foo) `catch` \e -> ... but don't do that |
| 05:29:12 | <Axman6> | because we have pure ways to finding out if it failed to parse or not |
| 05:29:21 | <Axman6> | readMay is probably the best way to go |
| 05:29:24 | <ski> | (you can catch evaluation exceptions in `IO', but it's clunky .. only if you really need to) |
| 05:29:32 | <Axman6> | you can't catch exceptions in pure code |
| 05:31:18 | → | deadmarshal joins (~deadmarsh@95.38.114.73) |
| 05:34:19 | <ski> | type ReadS a = String -> [(a,String)] -- fwiw |
| 05:34:38 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 05:34:38 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 05:34:38 | → | wroathe joins (~wroathe@user/wroathe) |
| 05:34:57 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 240 seconds) |
| 05:35:59 | × | deadmarshal quits (~deadmarsh@95.38.114.73) (Ping timeout: 256 seconds) |
| 05:36:21 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 05:41:10 | <sharky2> | since I'm mostly just learning, how would I go about catching read's exception? catch seems to require exception type, what do I put as the type? |
| 05:41:21 | <dsal> | :t readMaybe |
| 05:41:22 | <lambdabot> | Read a => String -> Maybe a |
| 05:42:02 | <dsal> | sharky2: Exceptions are for IO kinds of things. The thing you're thinking of is a sort of exception, but it's the result of a partial function. Best to just avoid partial functions altogether. :) |
| 05:42:33 | <dibblego> | if you insist on using catch, try readFile |
| 05:44:10 | ski | . o O ( `readsFile' ) |
| 05:44:48 | <Axman6> | I would pretty strongly recommend against learning about exceptions if you are trying to learn Haskell. I don't think I've ever written any code that threw them, and only rarely needed to catch them. They are something to know about the existance of, but not a fundamental topic |
| 05:46:02 | → | deadmarshal joins (~deadmarsh@95.38.114.73) |
| 05:48:27 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 05:50:10 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 05:50:33 | <monochrom> | Please use Text.Read's readMaybe. |
| 05:53:03 | <monochrom> | I use partial functions sometimes, but only when I have already vetted the input somehow, never because I have the obvious XY problem of waiting for it to bomb and picking up the pieces later. |
| 05:53:39 | → | Jing joins (~hedgehog@240e:390:7c53:a7e1:8d1b:5472:3cae:e50c) |
| 05:56:03 | ski | . o O ( "Parse, don't validate" in 2019-11-05 at <https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/> ) |
| 06:00:28 | <monochrom> | Exceptions make sense when and only when you're dealing with the cruel outside world where for example you want to open a file but what if the system doesn't let you and it makes no sense to ask to ask you just have to try and see if it fails. |
| 06:01:16 | <monochrom> | Note that "if the system lets me then open it" makes no sense in this case because race conditions. |
| 06:02:16 | <monochrom> | Whereas "if x=0 then I can do 5/x else I can't" makes more sense than "let me just try 5/x and let it fail". It is quite the opposite. |
| 06:05:46 | <monochrom> | Err if x/=0 ! |
| 06:05:57 | <ski> | > 7 `mod_` 0 |
| 06:05:58 | <lambdabot> | 7 |
| 06:06:48 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 06:06:48 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 06:06:48 | → | wroathe joins (~wroathe@user/wroathe) |
| 06:07:44 | <sharky2> | okay. I thought would be simple enough to catch exception, but I already know how to use readMaybe |
| 06:09:45 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds) |
| 06:10:43 | <EvanR> | sharky2, the thing is, stuff like 1/0, head [], and read "blub" :: Int aren't designed to be caught. It's possible but normally you would only catch exceptions caused by an explicit throw or IO error |
| 06:11:11 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 06:11:29 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:11:39 | <EvanR> | specifically, you'd need to know the exceptions type so you can name it using the dynamically typed exception system |
| 06:11:55 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 06:12:46 | <EvanR> | if you wanted to catch one |
| 06:13:15 | <EvanR> | those three examples are just things you don't want to happen in the first place |
| 06:29:47 | × | img_ quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 06:31:31 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 06:33:37 | <EvanR> | also the AOL keyword to bypass all that and read up on it is "Control.Exception" |
| 06:34:08 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 06:35:03 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 250 seconds) |
| 06:36:05 | → | img joins (~img@user/img) |
| 06:39:25 | × | echoreply quits (~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d) (Quit: WeeChat 2.8) |
| 06:40:43 | → | echoreply joins (~echoreply@45.32.163.16) |
| 06:41:05 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 06:41:49 | <dsal> | But you should probably have an idea of when the exception will get raised, because it may not be until after you try to catch it. |
| 06:42:52 | <EvanR> | try (return (read "blub")) vs try (return $! (read "blub")) -- xD |
| 06:43:41 | <EvanR> | (haskell, not the best imperative language) |
| 06:44:20 | <ski> | or `evaluate (read "blub")' |
| 06:45:07 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 06:45:30 | → | arjun joins (~arjun@user/arjun) |
| 06:47:23 | × | deadmarshal quits (~deadmarsh@95.38.114.73) (Ping timeout: 256 seconds) |
| 06:47:28 | <arjun> | is it only me or associated type families look a bit like OO programming ? : P |
| 06:47:49 | <EvanR> | hmm... in what way |
| 06:48:33 | <arjun> | like a set of related functionality bunched together and then you make new instances (objects) for each type and use them |
| 06:48:55 | <arjun> | but that's probably true for a lot of things i guess, heh |
| 06:49:16 | <ski> | how do you make new instances (objects), with associated type families ? |
| 06:49:23 | <arjun> | but ATF a little more so |
| 06:49:57 | <arjun> | i've come across a Graph example |
| 06:50:37 | <ski> | (also, i'd think that sending a message to an object is a bit more primary) |
| 06:53:43 | <arjun> | ski, something like this https://pastebin.com/xbyNk1bx |
| 06:54:16 | <arjun> | but while writing this i realized, this is just a regular typeclass and the whole thing is not an associated type family, just the first two things : P |
| 06:54:37 | <arjun> | guess talking to other people really does help, huh. |
| 06:55:18 | <EvanR> | it can be hard to recover from OOP brainwashing xD |
| 06:55:40 | <ski> | still not seeing what'd be so OO about this |
| 06:55:49 | <EvanR> | ellipses, unicorns, multiple inheritance o my |
| 06:55:54 | <arjun> | ski's out of the matrix |
| 06:56:13 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 256 seconds) |
| 06:56:17 | <ski> | where are the instances (objects) ? |
| 06:56:44 | <EvanR> | knee jerk reaction is that type classes type family or not, doesn't give you internal mutable state. Which may we never wanted to associate with OOP but |
| 06:56:47 | <ski> | where are the messages ? where are the methods giving the behaviour of a message, as received by an object ? |
| 06:57:33 | <ski> | where are the classes (aka object factories) ? |
| 06:57:54 | <EvanR> | there's at most 1 instance of a type class for a given type, so you can't even 'new' them xD |
| 06:58:03 | <EvanR> | everything's a singleton |
| 06:58:20 | <arjun> | ski, This place is not a place of honor... no highly esteemed deed is commemorated here... nothing valued is here. |
| 06:58:23 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 06:58:48 | <arjun> | context for the joke -> https://en.wikipedia.org/wiki/Long-time_nuclear_waste_warning_messages |
| 06:58:59 | <ski> | (anyway .. one can well do OO stuff in Haskell .. i just don't see how any of this example is related to OO) |
| 06:59:54 | <Axman6> | needs more glowing cats |
| 07:01:37 | ski | . o O ( <https://lambdacats.github.io/extensible/> ) |
| 07:01:47 | <EvanR> | aliens / planet of the apes dudes eventually make it through the levels of complexity and finally find out about the nuclear waste |
| 07:02:01 | <EvanR> | "why didn't they just say so" |
| 07:03:00 | <ski> | weren't monads supposedly like radiation suits ? |
| 07:03:09 | <arjun> | i'm half expecting we'd land in a timeline where people will build NFT's out of nuclear warnings |
| 07:03:10 | <EvanR> | I think that was comonads |
| 07:03:42 | ski | glares at Dick Kieburtz |
| 07:03:58 | <arjun> | guess that's a topic for haskell-offtopic |
| 07:05:52 | → | alp joins (~alp@user/alp) |
| 07:06:59 | × | Inst quits (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds) |
| 07:11:37 | × | alp quits (~alp@user/alp) (Ping timeout: 240 seconds) |
| 07:14:24 | <sharky2> | so I know I was told not to catch read exception, but curiosity got the better out of me, and I googled a solution that seems to work pretty well (it uses unsafePerformIO). what do you think? https://paste.tomsmeding.com/HBZShTDG |
| 07:14:42 | <EvanR> | what why ... |
| 07:14:43 | <ski> | don't use `unsafePerformIO' |
| 07:14:46 | <EvanR> | ^ |
| 07:14:58 | <ski> | (or `unsafeCoerce' ..) |
| 07:15:22 | → | michalz joins (~michalz@185.246.204.75) |
| 07:15:25 | <sharky2> | ski, it allows us to catch undefined outside of IO though |
| 07:15:32 | <ski> | that's a bad thing |
| 07:15:42 | <EvanR> | catching undefined... |
| 07:15:51 | <EvanR> | specifically... |
| 07:16:17 | × | shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit) |
| 07:16:25 | <sharky2> | if we only had read, and alternative was to make readMaybe return IO a, wouldn't this be better? is there anything unsafe about it? |
| 07:16:27 | → | lavaman joins (~lavaman@98.38.249.169) |
| 07:16:57 | × | kaph quits (~kaph@net-2-47-208-144.cust.vodafonedsl.it) (Ping timeout: 240 seconds) |
| 07:17:12 | <EvanR> | read is an example of a function with a bad interface, don't make it worse xD |
| 07:18:14 | <EvanR> | use it correctly (hard to do in the context of parsing unknown data) or use a better interface |
| 07:18:37 | <sharky2> | sure. but if that is all we had, isn't this good and safe? I made "undefinedToMaybe :: a -> Maybe a" too :) |
| 07:18:42 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
| 07:18:59 | <EvanR> | that's a weird thing to only have |
| 07:19:12 | <sharky2> | I got it from here: https://stackoverflow.com/questions/9392129/detect-bottom-value-in-haskell/17652042 |
| 07:19:19 | <EvanR> | there's an old package called spoon that does what you are talking about |
| 07:19:29 | <EvanR> | haven't heard of it in a while thankfully xD |
| 07:19:48 | <sharky2> | is there anything inherently unsafe with this though? |
| 07:20:02 | <EvanR> | basically it came about because someone said "what if we want to catch undefined in pure code" |
| 07:20:02 | <dminuoso> | Yes |
| 07:20:37 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 07:20:48 | <dminuoso> | You start on a road where you lose some of the reasoning abilities of haskell if you are trying to catch pure exceptions in pure code. |
| 07:21:09 | <dminuoso> | And it's very unidiomatic |
| 07:21:29 | <dminuoso> | read has a simpler form `readMaybe` that lets you handle failed parses if you insist on using Read. |
| 07:21:46 | <dminuoso> | If this is a problem you experience from upstream libraries, file a bug report or fix it upstream. `read` should be banned. |
| 07:22:52 | <EvanR> | when two bads combine to form a "works doesn't it?" you become a baby web xD |
| 07:23:08 | <sharky2> | can you show me when it would fail? I don't know what I'm doing, I just copy pasted code from stackoverflow, and it works well. full code and example in ghci: https://paste.tomsmeding.com/n6jrXxhi |
| 07:23:10 | <ski> | an expression whose evaluation triggers an exception is semantically a "bottom" value (meaning "no answer/result"). another example of a bottom value is an infinite loop. denotationally, we treat all bottom values as indistinguishable from each other. that is, we like to use refactorings that may sometimes turn one form of a bottom value into another form |
| 07:23:41 | <dminuoso> | You lose monotonicity of definedness |
| 07:23:50 | <dminuoso> | Something you really dont want to toss out |
| 07:24:05 | <ski> | (e.g., if you're running GHC in single-threaded mode, it can, sometimes, catch infinite loops, and will throw an exception. but it can't always, and we'd prefer not attempting to distinguish, at the user level, when it can, and when it can't) |
| 07:24:13 | <EvanR> | could catching an undefined change the result of lub |
| 07:24:21 | <EvanR> | in a bad way |
| 07:24:47 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 07:24:48 | <sharky2> | ok. but when used with read specifically, this is guaranteed to work? |
| 07:24:58 | <dminuoso> | No. |
| 07:25:00 | <sharky2> | or anything that returns error/undefined, and doesn't infinite loop |
| 07:25:02 | <dminuoso> | That's the beginning of the problem |
| 07:25:13 | <ski> | you're really using `unsafeCoerce' there in an unsafe way |
| 07:25:27 | <dminuoso> | First you cant distinguish between errors properly, we have imprecise exception semantics, next up you have the loss of monotonicity. |
| 07:25:31 | <dminuoso> | Really, use `readMaybe` |
| 07:25:34 | <dminuoso> | That's the way to do it. |
| 07:25:40 | <ski> | (or `reads') |
| 07:26:14 | ski | . o O ( coercing from `a' to `IO ()', then executing .. what could go wrong ? ) |
| 07:26:27 | <EvanR> | read will throw an ErrorCall, which you can catch in IO |
| 07:26:48 | <EvanR> | but readMaybe can be used without IO |
| 07:26:56 | <EvanR> | win win vs lose lose |
| 07:27:35 | <sharky2> | I understand. but I'm talking about hypothetical example where the only interface was read. I'm just wondering when undefinedToMaybe would fail, because I can't make it fail with read, in ghci or ghc |
| 07:27:45 | <ski> | anyway, monotonicity is a big deal |
| 07:27:50 | <EvanR> | another thing is that read takes a [Char], anything in that string could throw an ErrorCall |
| 07:28:05 | <EvanR> | you'd be masking that error |
| 07:28:28 | <dminuoso> | sharky2: The problems are way more fundamental than "might not work" |
| 07:29:17 | <ski> | @free undefinedToMaybe :: a -> Maybe a |
| 07:29:17 | <lambdabot> | $map_Maybe f . undefinedToMaybe = undefinedToMaybe . f |
| 07:30:07 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:56b3:2a4c:af18:8385) |
| 07:30:21 | <ski> | this law claims that `fmap (const c) (undefinedToMaybe x) = undefinedToMaybe (const c x)' .. which is not the case, for your `undefinedToMaybe' .. so, it breaks parametricity ("free theorems") |
| 07:30:33 | <EvanR> | sharky2, on your code specifically, why are you even using unsafeCoerce... |
| 07:30:56 | <ski> | because they don't know how to use `evaluate' or `return $!' |
| 07:30:57 | <sharky2> | EvanR I got the code from stackoverflow link I pasted above |
| 07:31:00 | <EvanR> | if all you want to do is catch the exception that happens when trying to read, using catch within unsafePerformIO |
| 07:31:07 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 07:31:11 | <awpr> | er, how did that not crash? IO is a newtype of `State# _ -> (a, State# _)`, and it's coercing some non-function type to IO |
| 07:31:23 | <EvanR> | sharky2, so we might want to understand what it even does before even asking xD |
| 07:31:32 | <sharky2> | if you it can be written better then please tell me how. |
| 07:31:47 | <c_wraith> | if you see a stackoverflow answer that recommends unsafeCoerce, find a different answer. :) |
| 07:31:55 | <awpr> | can be written better as `import Text.Read (readMaybe)` :) |
| 07:31:59 | <dminuoso> | sharky2: We told you, the only reasonable better way is to straight up use readMaybe. |
| 07:32:05 | <EvanR> | you only want a half-fixed version xD |
| 07:32:07 | <EvanR> | weird |
| 07:32:13 | <dminuoso> | sharky2: It's not about how you can implement `unsafeCatch` better, the mere presence of such a primitive is the problem. |
| 07:32:16 | <c_wraith> | (not that unsafeCoerce is always wrong - it exists for a reason. but if you don't know exactly why you're using it, you shouldn't be) |
| 07:32:19 | → | deadmarshal joins (~deadmarsh@95.38.114.73) |
| 07:32:23 | <EvanR> | you're better served understanding what those bits do, instead of doing "read" wrong |
| 07:32:27 | <sharky2> | dminuoso, what if readMaybe didn't exist? |
| 07:32:40 | <awpr> | then write it in terms of `reads` |
| 07:32:45 | <dminuoso> | heh |
| 07:32:52 | <EvanR> | it must exist, since it's a construction of the mind |
| 07:32:53 | <sharky2> | and if read was the only function that existed? |
| 07:33:02 | <ski> | generally (as for `eval' in other languages), `unsafePerformIO' and `unsafeCoerce' should not be used, unless you know why they should not be used (and even then you need to be doubly careful, and know safeguards and stuff) |
| 07:33:03 | <awpr> | then the library in question should not be used |
| 07:33:04 | <EvanR> | you can implement readMaybe yourself |
| 07:33:16 | <dminuoso> | sharky2: Your line of thinking is flawed in its premise, in that `read` is a sensible primitive to begin with. |
| 07:33:19 | <dminuoso> | It's not. |
| 07:33:20 | <EvanR> | it's like asking if the integers did not exist |
| 07:33:24 | <EvanR> | you construct the integers |
| 07:33:26 | <dminuoso> | `read` is the proper mistake here. |
| 07:33:31 | <dminuoso> | It shouldn't exist. |
| 07:33:37 | <dminuoso> | It's a historical accient |
| 07:33:52 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 07:33:57 | <sharky2> | dminuoso, and yet it still exists.. in base no less. I'm sure there are libraries where a function returning error is the only interface they provide. and "don't use that library" is not a useful practical advice |
| 07:34:25 | <EvanR> | it goes exactly like that a lot, which is good |
| 07:34:25 | ski | sometimes passes `StateT reads' to `replicateM n' or `many'/`some' |
| 07:34:30 | <dminuoso> | sharky2: My advice earlier was: file a bug report or fix those upstream libraries if you encounter them |
| 07:34:33 | <dminuoso> | :) |
| 07:34:47 | ski | agrees |
| 07:34:50 | <EvanR> | libraries with a terrible error interface usually don't get a lot of traction |
| 07:35:06 | <EvanR> | (base is an outlier) |
| 07:35:16 | → | _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl) |
| 07:35:50 | <EvanR> | e.g. Aeson for json doesn't throw error and except you to catch it |
| 07:35:52 | <dminuoso> | sharky2: But yes, you are absolutely right that it exists in base. We are bad at making backwards breaking changes in `base`, we have a multitude of things that, in hindsight, should have never gone into base. |
| 07:35:57 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds) |
| 07:36:40 | <ski> | sharky2 : if you put in more information, you shouldn't get less, or different, information out. that's a big deal (monotonicity) |
| 07:37:21 | <dminuoso> | And perhaps we should make more of an effort to document these things in base, pointing out to beginners which things to stay clear of. |
| 07:37:29 | <dminuoso> | And this should propagate to learning resources as well |
| 07:37:41 | <sharky2> | this is interesting.. not something I expected. it works even if undefined is passed to read. undefinedToMaybe (read (error "hehe")) :: Maybe Int |
| 07:37:47 | <dminuoso> | Who knows, perhaps you could make this adventure and improve the situation. |
| 07:38:24 | <ski> | (hm, this seems related to the property of "steadfastness", in Prolog, where if you put in more information, you'll get more information in solutions that you get, but solutions may also be dropped. in any case the new set of concrete instantiations of the solutions will be a subset of the old such set) |
| 07:38:27 | <EvanR> | also, undefinedToMaybe (read ("123" ++ undefined ++ "5") :: Int) |
| 07:39:09 | <EvanR> | undefinedToMaybe (read ("123" ++ (let x = x in x) ++ "5") :: Int) on the other hand |
| 07:39:56 | <sharky2> | anyway I understand that this is pretty horrible, and shouldn't be used if at all possible. but EvanR you said something about a better way of writing undefinedToMaybe. how would you write it instead? |
| 07:40:08 | <sharky2> | and in what way would it be better? |
| 07:40:09 | <EvanR> | there's no reason to use unsafeCoerce |
| 07:40:14 | <EvanR> | go ahead and figure out why |
| 07:40:20 | <c_wraith> | sharky2: if you really must, the spoon library exists |
| 07:40:20 | → | deadmarshal_ joins (~deadmarsh@95.38.113.90) |
| 07:40:25 | <dminuoso> | Im not entirely sure teaching how to write bad things with other bad or notoriously unsafe primitives is a useful thing |
| 07:40:35 | <c_wraith> | at least let someone else write the horrible code |
| 07:40:37 | <EvanR> | uhg I mentioned spoon but in a way to diminish it xD |
| 07:40:59 | <sharky2> | spoon looks nice. I'll check the source |
| 07:41:04 | <EvanR> | uhg |
| 07:41:14 | × | rusrushal13 quits (~rusrushal@2401:4900:5d15:a022:862f:921f:d1a9:883d) (Ping timeout: 256 seconds) |
| 07:41:17 | × | deadmarshal quits (~deadmarsh@95.38.114.73) (Ping timeout: 240 seconds) |
| 07:41:32 | <EvanR> | dminuoso, well unsafePerformIO and unsafeCoerce need to be spoken of in the proper context, like sex education xD |
| 07:41:35 | <dminuoso> | sharky2: The alternative would involve primitives that are even more notoriously dangerous - because a misuse of unsafeCoerce almost assuredly gives crashes or memory corruption on misuse, but misuses of the alternate primitives give the appearance of working at the cost of completely unexpected behavior. |
| 07:41:38 | <EvanR> | spoon on the other hand... |
| 07:41:51 | <EvanR> | might be beyond obscene |
| 07:42:27 | <dminuoso> | sharky2: That other primitive is `unsafePerformIO`, which seems more benign which is a dangerous illusion. |
| 07:42:29 | <ski> | @quote please.talk |
| 07:42:29 | <lambdabot> | Dave_Benjamin says: please talk to your son or daughter about parametric polymorphism |
| 07:43:31 | <ski> | (you can implement `unsafeCoerce', using `unsafePerformIO', and `IORef' ops) |
| 07:43:45 | × | andreabedini quits (~andreabed@8s8kj6nrww5p5nzkz2zz.ip6.superloop.com) (Quit: WeeChat 3.3) |
| 07:43:47 | <EvanR> | uhg |
| 07:44:10 | <ski> | (which is the reason why the value restriction is a thing, in the MLs) |
| 07:44:17 | <dminuoso> | ski: We had a production bug a few months ago due to my misuse of unsafePerformIO, which after pondering a fair few hours I considered perfectly safe. Then GHC proceeded to alias a bunch of mutable buffers. |
| 07:44:33 | <dminuoso> | Err sorry, that was supposed to hilight sharky2. |
| 07:44:59 | <EvanR> | safePerformIO = no IO at all (abstinence) |
| 07:45:12 | <dminuoso> | That was the final nail in the coffin for me to realize even as an advanced Haskeller it's very difficult to understand how unsafePerformIO interacts with your code - all your assumptions about what code does are tossed out of the window. |
| 07:46:12 | <sharky2> | dminuoso, spoon should be safe though, no? |
| 07:46:20 | <ski> | no |
| 07:46:26 | → | vpan joins (~0@212.117.1.172) |
| 07:46:32 | <dminuoso> | No, because of the monotonicity reasons I pointed out. |
| 07:46:56 | <dminuoso> | Like I said, the mere existence of such a primitive ruins reasoning abilities/properties about your code - and anything that transitively depends on it. |
| 07:46:57 | <EvanR> | leave spoon to the trash heap of history xD |
| 07:47:03 | ski | misses mmorrow .. |
| 07:47:07 | <dminuoso> | `readMaybe` is the solution |
| 07:47:10 | <ski> | preflex: xseen mmorrow |
| 07:47:37 | <sharky2> | it seems to be that problem is that undefined/error even exists, and not that spoon exists |
| 07:47:40 | <sharky2> | to me* |
| 07:47:48 | <EvanR> | yeah |
| 07:47:59 | <EvanR> | there are languages where undefined is not a thing |
| 07:48:19 | <ski> | at least with catching of `error's from `IO', you can blame it one `IO' indeterminacy |
| 07:48:29 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 07:48:35 | <dminuoso> | What ski refers to is using `evaluate :: a -> IO a` |
| 07:48:51 | <dminuoso> | But note, you still have imprecise exception semantics with this. |
| 07:49:00 | <dminuoso> | https://www.microsoft.com/en-us/research/wp-content/uploads/1999/05/except.pdf |
| 07:49:26 | <EvanR> | in those languages, you would probably see readMaybe xD |
| 07:49:28 | <ski> | for `error "foo" + error "bar"', it'll nondeterministically choose which of those to yield |
| 07:49:36 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 07:50:00 | <energizer> | is there a "resource locator/identfier" type that encompasses filesystem paths and uris and other stuff like that? |
| 07:50:29 | <dminuoso> | energizer: Yes, UrI. |
| 07:50:32 | <dminuoso> | URI, even. |
| 07:50:45 | <dminuoso> | URI has the `file` scheme giving you filesystem path access |
| 07:50:59 | <dminuoso> | How portable that actually ends up, I have no idea. |
| 07:51:36 | <dminuoso> | (i.e. can URI with a file scheme represent arbitrary bytesequences for say windows filesystems?) |
| 07:52:16 | <sharky2> | heh. undefinedToMaybe "foo" <interactive>: internal error: stg_ap_v_ret (GHC version 8.0.2 for x86_64_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug |
| 07:52:26 | <awpr> | aha! |
| 07:52:39 | ski | 's not surprised |
| 07:52:41 | <EvanR> | so it was never working |
| 07:52:47 | <awpr> | that's what I expected when I said "er, how did that not crash?" |
| 07:53:04 | <sharky2> | it works with read though. odd |
| 07:53:15 | <dminuoso> | That's unsafe primitives for you., |
| 07:53:20 | <ski> | UB |
| 07:53:42 | <dminuoso> | Perhaps they crash, perhaps not - who knows. `unsafe` really means "you're holding a shotgun loaded with dynamite. you have been warned" |
| 07:53:43 | <EvanR> | oh right, you tried to write a function that converted *any* undefined to maybe, but kept insisting it was for read only |
| 07:53:53 | <EvanR> | was very confuesd |
| 07:54:17 | <dminuoso> | Hah, though recently Ive been using unsafeChr a lot - but these are actually benign. |
| 07:54:31 | AlexNoo_ | is now known as AlexNoo |
| 07:54:49 | <EvanR> | for badly catching the error from read, you do not need unsafeCoerce |
| 07:54:56 | <dminuoso> | If you do this on Word8 anyway |
| 07:55:05 | <ski> | (as is `unsafeInterleaveIO' (but not `unsafeInterleaveST') .. perhaps considered ill-advised, though) |
| 07:55:40 | <awpr> | now I'm curious. does it crash on `undefinedToMaybe (42 :: Int)`? and on `undefinedToMaybe (21 + 21 :: Int)`? I have a theory. |
| 07:56:50 | <awpr> | namely that if the argument happens to be a thunk, the coercion to IO just... accidentally doesn't cause problems, but if it's already a data constructor, it dies |
| 07:57:00 | <sharky2> | awpr, it doesn't crash on those |
| 07:57:42 | <EvanR> | that might not be a good thing |
| 07:57:53 | <EvanR> | not crashing immediately but later on after corruption catches up with you |
| 07:57:57 | <awpr> | huh, weird. gonna try some experiments |
| 07:58:16 | <EvanR> | stuff we don't usually have to deal with because this isn't C |
| 07:58:32 | <awpr> | I mean, if it crashes it's definitely broken. I'm just interested in how it ever manages not to crash |
| 07:58:43 | <sharky2> | spoon "foo" works fine! |
| 07:58:44 | <awpr> | if it crashes on some inputs* |
| 07:59:08 | <EvanR> | I'm paranoid saying "not crashing doesn't definitely mean not broken" |
| 07:59:22 | <ski> | presumably `spoon' doesn't use `unsafeCoerce' |
| 07:59:36 | <dminuoso> | `spoon` uses unsafePerformIO |
| 07:59:45 | <ski> | yea, obviously :) |
| 08:01:43 | → | michalz2 joins (~michalz2@185.246.204.89) |
| 08:01:58 | → | alp joins (~alp@user/alp) |
| 08:02:25 | → | chele joins (~chele@user/chele) |
| 08:03:19 | → | Guest69 joins (~Guest69@4.53.152.194.mga.com.pl) |
| 08:04:27 | × | jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 08:04:54 | <ski> | @wiki Error vs. Exception |
| 08:04:54 | <lambdabot> | https://wiki.haskell.org/Error_vs._Exception |
| 08:05:19 | <ski> | "A program should work as well when all `error's and `undefined's are replaced by infinite loops." |
| 08:06:26 | <EvanR> | sharky2, unsafeCoerce causes GHC to "trust you" and consider whatever thing to be whatever type you want, regardless of whatever the eventual runtime object will look like. This is only safe for limited circumstances, even then, you have a burden of proof that no one helps you with |
| 08:06:45 | × | razetime quits (~quassel@49.207.209.26) (Remote host closed the connection) |
| 08:06:57 | → | Gurkenglas joins (~Gurkengla@dslb-090-186-104-244.090.186.pools.vodafone-ip.de) |
| 08:07:10 | <EvanR> | the consequences of being wrong are pretty scary to me, having spent so many hours chasing memory corruption in C programs |
| 08:08:01 | <EvanR> | so using it when you don't need it seems ridiculous |
| 08:08:55 | <EvanR> | also, where *do* you need it |
| 08:09:10 | <ski> | (re above link, another useful distinction is between faults and errors (and exceptions). a fault is a limitation in the implementation, e.g. an out-of-memory condition. a fault is the implementation admitting that it's failed to live up to its expectations) |
| 08:09:45 | → | Ariakenom joins (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se) |
| 08:10:43 | → | fendor joins (~fendor@91.141.44.253.wireless.dyn.drei.com) |
| 08:11:11 | <ski> | EvanR : i've seen it used when composing a function with an, operationally, identity/no-op function |
| 08:11:13 | <sharky2> | difference between spoon and teaspoon is that spoon forces evaluation? |
| 08:11:50 | <ski> | yea |
| 08:12:16 | <ski> | (or, rather, `spoon' does deep evaluation, `teaspoon' doesn't) |
| 08:12:49 | <EvanR> | I dislike spoon even more now |
| 08:13:03 | <sharky2> | is the difference only noticeable when used in IO? ie, is readMaybe = spoon . read the same as readMaybe = teaspoon . read |
| 08:13:36 | <c_wraith> | those behave very differently for some types |
| 08:14:00 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 08:16:21 | <EvanR> | you don't need IO to see difference between shallow and deep evaluation |
| 08:16:38 | <ski> | "(1 % 0,-1 % 0)" |
| 08:18:18 | × | Guest69 quits (~Guest69@4.53.152.194.mga.com.pl) (Quit: Client closed) |
| 08:18:45 | → | kukimik joins (~kukimik@4.53.152.194.mga.com.pl) |
| 08:21:12 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 08:23:29 | → | cfricke joins (~cfricke@user/cfricke) |
| 08:24:40 | → | jgeerds joins (~jgeerds@55d4a547.access.ecotel.net) |
| 08:26:53 | × | Akiva quits (~Akiva@user/Akiva) (Ping timeout: 256 seconds) |
| 08:26:57 | × | _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
| 08:27:01 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 08:28:21 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 08:30:55 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:34:16 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:a019:43b1:3d96:a258) |
| 08:36:05 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 08:38:17 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a019:43b1:3d96:a258) (Ping timeout: 240 seconds) |
| 08:39:24 | → | dcoutts joins (~duncan@109.144.31.214) |
| 08:42:13 | → | dcoutts_ joins (~duncan@host86-187-229-255.range86-187.btcentralplus.com) |
| 08:42:39 | → | noiobeforebed joins (~noiobefor@2001:470:69fc:105::1:3c2d) |
| 08:43:13 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 08:44:37 | × | dcoutts quits (~duncan@109.144.31.214) (Ping timeout: 240 seconds) |
| 08:46:44 | → | notzmv joins (~zmv@user/notzmv) |
| 08:47:10 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 08:47:10 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 08:47:11 | → | jgeerds_ joins (~jgeerds@55d4a547.access.ecotel.net) |
| 08:47:13 | allbery_b | is now known as geekosaur |
| 08:47:57 | × | dcoutts_ quits (~duncan@host86-187-229-255.range86-187.btcentralplus.com) (Ping timeout: 240 seconds) |
| 08:48:31 | × | noiobeforebed quits (~noiobefor@2001:470:69fc:105::1:3c2d) (Quit: issued !quit command) |
| 08:49:13 | × | kukimik quits (~kukimik@4.53.152.194.mga.com.pl) (Ping timeout: 256 seconds) |
| 08:50:07 | × | jgeerds quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 256 seconds) |
| 08:50:41 | × | deadmarshal_ quits (~deadmarsh@95.38.113.90) (Ping timeout: 256 seconds) |
| 08:54:53 | → | akegalj joins (~akegalj@18-45.dsl.iskon.hr) |
| 08:56:02 | → | MajorBiscuit joins (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) |
| 08:57:04 | → | kukimik joins (~kukimik@4.53.152.194.mga.com.pl) |
| 08:58:00 | → | noiobeforebed joins (~noiobefor@2001:470:69fc:105::1:3c2d) |
| 09:00:11 | → | deadmarshal joins (~deadmarsh@95.38.113.90) |
| 09:00:51 | × | noiobeforebed quits (~noiobefor@2001:470:69fc:105::1:3c2d) (Client Quit) |
| 09:01:04 | → | noiobeforebed joins (~noiobefor@2001:470:69fc:105::1:3c2d) |
| 09:01:21 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 09:01:49 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Excess Flood) |
| 09:02:42 | × | maerwald quits (~maerwald@user/maerwald) (Quit: gone) |
| 09:03:00 | → | maerwald joins (~maerwald@mail.hasufell.de) |
| 09:03:15 | → | coot joins (~coot@213.134.190.95) |
| 09:03:43 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 09:04:10 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 09:04:45 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 09:04:45 | × | shachaf quits (~shachaf@user/shachaf) (Ping timeout: 250 seconds) |
| 09:04:57 | → | Inst joins (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) |
| 09:05:38 | → | shachaf joins (~shachaf@user/shachaf) |
| 09:05:43 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:07:11 | → | razetime joins (~quassel@49.207.209.26) |
| 09:08:10 | × | kukimik quits (~kukimik@4.53.152.194.mga.com.pl) (Quit: Client closed) |
| 09:09:53 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 09:11:17 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 09:14:04 | → | max22- joins (~maxime@2a01cb0883359800f5b23c2351d98307.ipv6.abo.wanadoo.fr) |
| 09:16:17 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) (Ping timeout: 240 seconds) |
| 09:17:41 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 09:17:41 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 09:17:44 | allbery_b | is now known as geekosaur |
| 09:18:07 | × | deadmarshal quits (~deadmarsh@95.38.113.90) (Ping timeout: 256 seconds) |
| 09:19:29 | → | adnaahm joins (~adnaahm@host-57-net-67-160-119.mobilinkinfinity.net.pk) |
| 09:19:35 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 09:20:04 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 09:20:23 | <dminuoso> | I mean at its face value, I can see why `spoon` might seem appearing - Ive had my share of bottoms blow up inside nested data structures in the wrong places of code before |
| 09:21:11 | → | desantra joins (~skykanin@user/skykanin) |
| 09:21:27 | <dminuoso> | It's very frustrating to have have some `parseConfig` hand you a timebomb |
| 09:21:33 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 09:21:36 | <dminuoso> | Honestly, Im not sure how to address this correctly in the general case |
| 09:23:15 | → | xkuru joins (~xkuru@user/xkuru) |
| 09:23:27 | × | Inst quits (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds) |
| 09:24:58 | <c_wraith> | in general? stop using libraries that do that |
| 09:25:20 | → | Graham31415 joins (~Graham314@5.33.56.252) |
| 09:25:39 | <dminuoso> | Well, it was my own programming mistake. |
| 09:26:03 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 09:26:42 | <dminuoso> | It's easy to say "dont use code that has bottoms" in a language where bottoms can arise unexpectedly and might not be covered by tests easily. |
| 09:26:45 | → | zaquest joins (~notzaques@5.130.79.72) |
| 09:27:40 | <dminuoso> | My immediate solution was to attach NFData to every data involving the config and deepseq it right at parseConfig, which was fine because I eventually need all bits anyway. At least this would transfer the explosion point to something predictable |
| 09:28:41 | <Graham31415> | Hi, I'm about to start writing my first haskell application. I saw RIO, and thought I'd start with that. I also want to use qualified imports for everything I can. In the example script at the bottom of https://www.fpcomplete.com/haskell/library/rio/ it imports RIO and also System.Environment. I'm guessing `getArgs` comes from System.Environment, |
| 09:28:41 | <Graham31415> | and that this is part of the "base" package rather than RIO? So is it normal to use the RIO prelude and then use base things on top of it? That seems strange to me. |
| 09:29:25 | <dminuoso> | Graham31415: Yes. |
| 09:29:41 | <Graham31415> | (also, why dont more examples, tutorials, docs, etc. use qualified imports more?) |
| 09:30:08 | → | deadmarshal joins (~deadmarsh@95.38.113.90) |
| 09:30:17 | <Graham31415> | On the one hand, I see many folks advocating for qualified imports, on the other hand I dont see much learning material using them. |
| 09:30:54 | <dminuoso> | Graham31415: There's not much guidance on qualified imports or not, it's a matter of personal taste and common sense. |
| 09:31:38 | <c_wraith> | I don't like qualified imports for what they do to syntax. But that's mostly not important, and some libraries basically require you to use them. |
| 09:32:07 | <dminuoso> | It's also a matter of tooling. Using HLS might influence your opinion. |
| 09:32:17 | <dminuoso> | Since it might make whatever you prefer easier to do |
| 09:32:22 | <c_wraith> | in which direction? :) |
| 09:32:27 | <dminuoso> | Either the way I see it. |
| 09:32:49 | <Graham31415> | Ok, thanks. I'll muddle through... |
| 09:32:51 | <dminuoso> | It can make generating explicit export lists easier, as well as navigating and locating qualified imports easier. |
| 09:32:58 | <dminuoso> | Or generating the latter as well. |
| 09:33:18 | <dminuoso> | So if you have some reservations on either approach on account of "more cumbersome", HLS might address that. |
| 09:34:01 | <c_wraith> | note that there's a fun case - you can name a module when you import it without importing it qualified. That seems... very narrow. |
| 09:34:11 | ski | . o O ( HT libraries .. ) |
| 09:34:21 | <c_wraith> | Yeah, I avoid those. :P |
| 09:34:33 | <merijn> | Doesn't everyone? |
| 09:34:56 | <c_wraith> | presumably not him! |
| 09:35:12 | <dminuoso> | Graham31415: One important bit to note perhaps, that there's certainly some common idioms with respect to text, containers and bytestring. |
| 09:35:21 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) |
| 09:35:34 | <ski> | it would be nice if Haddock would disambiguate with module qualification, when there's more than one identifier having the same name in scope, though |
| 09:36:16 | <dminuoso> | So for bytestring its relatively common to do qualified imports `import qualified Data.ByteString as BS` and `import qualified Data.ByteString.Lazy as BSL` (the actual qualifier prefixes vary between folks, they are not the point), and then consistently use them to clearly communicate where lazy and strict BS code/types are used. |
| 09:36:23 | <dminuoso> | For text you sometimes see a similar thing |
| 09:36:41 | <Graham31415> | I must say, this stuff make Haskell hard to learn. All the supposedly scary stuff is well documented. |
| 09:36:49 | <dminuoso> | containers enjoys similar usage because they introduce a lot of overlapping function names for IntSet, Set, Map, etc |
| 09:36:55 | <c_wraith> | there's also that weird thing where you can import multiple modules and share a name between them. Sometimes that's really nice, like when you're able to put everything imported for a single purpose into the same namespace. Like parsers that split important logic across multiple modules. |
| 09:37:50 | <ski> | hm, wasn't there some page that had some stats on how common it was to use `import'-`qualified'-`as' for various modules, and the most common renamings for the most common modules that were imported thus ? |
| 09:38:05 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 09:38:07 | <dminuoso> | Mmm, yes someone in this channel did this research. |
| 09:38:09 | <dminuoso> | Was this [exa]? |
| 09:38:52 | → | jonathanx joins (~jonathan@h-178-174-176-109.a357.priv.bahnhof.se) |
| 09:39:28 | <ski> | > let xs = cycle [0,undefined]; xs = cycle [undefined,1] in xs |
| 09:39:30 | <lambdabot> | error: |
| 09:39:30 | <lambdabot> | Conflicting definitions for ‘xs’ |
| 09:39:30 | <lambdabot> | Bound at: <interactive>:1:5-6 |
| 09:39:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) (Ping timeout: 240 seconds) |
| 09:39:51 | <[exa]> | not me, but I recall seeing this question already here too |
| 09:42:47 | → | ardell joins (~ardell@user/ardell) |
| 09:46:36 | × | ubert quits (~Thunderbi@141.98.252.252) (Ping timeout: 250 seconds) |
| 09:51:20 | → | mmhat joins (~mmh@55d49d8b.access.ecotel.net) |
| 09:52:43 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 09:58:41 | × | xff0x quits (~xff0x@2001:1a81:5224:e000:4717:65df:57b3:7708) (Ping timeout: 256 seconds) |
| 09:59:28 | → | xff0x joins (~xff0x@2001:1a81:5224:e000:7446:150d:d8ae:ed12) |
| 10:00:47 | × | akegalj quits (~akegalj@18-45.dsl.iskon.hr) (Quit: leaving) |
| 10:02:05 | × | dsrt^ quits (~dsrt@128-092-185-170.biz.spectrum.com) (Ping timeout: 256 seconds) |
| 10:03:08 | → | dsrt^ joins (~dsrt@128-092-185-170.biz.spectrum.com) |
| 10:06:37 | × | arjun quits (~arjun@user/arjun) (Ping timeout: 256 seconds) |
| 10:07:16 | → | ubert joins (~Thunderbi@p200300ecdf0994a856831da0cd63cc4d.dip0.t-ipconnect.de) |
| 10:07:39 | × | dsrt^ quits (~dsrt@128-092-185-170.biz.spectrum.com) (Ping timeout: 256 seconds) |
| 10:10:06 | → | dsrt^ joins (~dsrt@128-092-185-170.biz.spectrum.com) |
| 10:10:49 | → | arjun joins (~arjun@103.57.87.28) |
| 10:11:01 | × | MasseR4 quits (~MasseR@51.15.143.128) (Quit: The Lounge - https://thelounge.chat) |
| 10:11:38 | → | MasseR4 joins (~MasseR@51.15.143.128) |
| 10:13:57 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 10:14:15 | × | arjun quits (~arjun@103.57.87.28) (Client Quit) |
| 10:14:25 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 10:17:03 | × | dsrt^ quits (~dsrt@128-092-185-170.biz.spectrum.com) (Ping timeout: 256 seconds) |
| 10:17:11 | → | rahulfromearth joins (~rahulfrom@27.4.61.26) |
| 10:18:25 | × | amk quits (~amk@109.255.169.126) (Ping timeout: 256 seconds) |
| 10:20:38 | → | amk joins (~amk@109.255.169.126) |
| 10:20:47 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 10:24:25 | × | rahulfromearth quits (~rahulfrom@27.4.61.26) (Ping timeout: 256 seconds) |
| 10:28:08 | → | vysn joins (~vysn@user/vysn) |
| 10:34:08 | → | cfricke joins (~cfricke@user/cfricke) |
| 10:34:11 | <lortabac> | I need to parse a couple of query parameters from a URL, right now I'm using network-uri, http-types and http-api-data |
| 10:34:54 | <lortabac> | is there a higher-level package that composes the functionalities of those 3 packages? |
| 10:41:11 | <[exa]> | dminuoso: but I cant find it. we might need to invoke tomsmeding's 1337 l0g 534rch 5ki11s |
| 10:43:42 | → | haskellberryfinn joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 10:43:43 | → | Merfont joins (~Kaiepi@156.34.47.253) |
| 10:47:02 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving) |
| 10:48:28 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 10:49:14 | → | lavaman joins (~lavaman@98.38.249.169) |
| 10:50:52 | × | adnaahm quits (~adnaahm@host-57-net-67-160-119.mobilinkinfinity.net.pk) (Read error: Connection reset by peer) |
| 10:51:00 | → | adnaahm joins (~adnaahm@51.89.118.136) |
| 10:51:09 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 10:51:17 | × | haskellberryfinn quits (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 10:52:25 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 10:52:29 | <dminuoso> | lortabac: servant-client-core exposes higher level primitives to bootstrap that yourself, depending on whether you like the dependency footprint |
| 10:52:49 | <lortabac> | dminuoso: I already have a dependency on servant-client-core, so it's ok |
| 10:54:00 | → | rando25892 joins (~homefame@user/rando25892) |
| 10:54:45 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:55:28 | <lortabac> | but the thing is, I'm not parsing an HTTP request, I just have a URL as a Text |
| 10:55:49 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds) |
| 10:56:03 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:56:16 | → | __monty__ joins (~toonn@user/toonn) |
| 10:56:23 | <dminuoso> | Mmm |
| 10:57:55 | × | ardell quits (~ardell@user/ardell) (Quit: Konversation terminated!) |
| 10:58:16 | <dminuoso> | Actually looking at it, you cant easily poke it out |
| 10:58:21 | <dminuoso> | It all revolves around https://hackage.haskell.org/package/http-types-0.12.3/docs/Network-HTTP-Types.html#v:queryToQueryText at the end |
| 10:58:24 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
| 10:58:57 | <dminuoso> | Sorry, I dont think this direction will help you unless you can make use of parseUrlPiece/parseUrlParam |
| 11:00:11 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 11:02:23 | × | adnaahm quits (~adnaahm@51.89.118.136) (Ping timeout: 256 seconds) |
| 11:02:55 | → | adnaahm joins (~adnaahm@host-57-net-67-160-119.mobilinkinfinity.net.pk) |
| 11:03:35 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 11:04:41 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 11:05:33 | × | deadmarshal quits (~deadmarsh@95.38.113.90) (Ping timeout: 256 seconds) |
| 11:06:48 | → | deadmarshal joins (~deadmarsh@95.38.113.90) |
| 11:09:25 | <desantra> | Shouldn't it be fairly easy to write a parser to parse out query params from a url text? |
| 11:10:00 | × | Graham31415 quits (~Graham314@5.33.56.252) (Quit: Client closed) |
| 11:11:58 | <lortabac> | desantra: yes it's easy, I was asking if it already exists |
| 11:12:21 | × | jgeerds_ quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 256 seconds) |
| 11:12:38 | <desantra> | lortabac: ah sure, well not that I know of |
| 11:27:47 | → | DavidMilestone joins (~DavidMile@182.64.8.212) |
| 11:28:08 | → | Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
| 11:30:05 | × | kojo5551 quits (~kojo5551@fep.grid.pub.ro) (Quit: ZNC 1.6.4 - http://znc.in) |
| 11:30:43 | × | cynomys quits (~cynomys@user/cynomys) (Ping timeout: 256 seconds) |
| 11:31:03 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 11:41:17 | × | deadmarshal quits (~deadmarsh@95.38.113.90) (Ping timeout: 240 seconds) |
| 11:44:03 | × | jrm quits (~jrm@156.34.173.250) (Quit: ciao) |
| 11:45:27 | → | jrm joins (~jrm@156.34.173.250) |
| 11:47:26 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 11:47:35 | → | deadmarshal joins (~deadmarsh@95.38.113.90) |
| 11:51:41 | × | Ariakenom quits (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se) (Ping timeout: 256 seconds) |
| 11:51:49 | → | RFV joins (~Thunderbi@139.red-88-12-223.dynamicip.rima-tde.net) |
| 11:52:00 | → | Ariakenom joins (~Ariakenom@2001:9b1:efe:9d00:ddca:91f7:7b50:e029) |
| 11:54:40 | → | RFV1 joins (~Thunderbi@139.red-88-12-223.dynamicip.rima-tde.net) |
| 11:54:45 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 11:55:49 | → | MoC joins (~moc@user/moc) |
| 11:57:27 | × | mbuf quits (~Shakthi@122.174.58.23) (Quit: Leaving) |
| 11:57:50 | → | miremeister joins (uid387155@id-387155.uxbridge.irccloud.com) |
| 11:58:29 | × | RFV quits (~Thunderbi@139.red-88-12-223.dynamicip.rima-tde.net) (Ping timeout: 256 seconds) |
| 11:58:29 | RFV1 | is now known as RFV |
| 11:59:53 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 12:01:26 | → | alx741 joins (~alx741@157.100.197.240) |
| 12:02:08 | → | Ariakenom_ joins (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se) |
| 12:03:05 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 12:06:11 | × | Ariakenom quits (~Ariakenom@2001:9b1:efe:9d00:ddca:91f7:7b50:e029) (Ping timeout: 256 seconds) |
| 12:09:49 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 12:10:02 | × | jrm quits (~jrm@156.34.173.250) (Quit: ciao) |
| 12:10:08 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 12:11:22 | → | jrm joins (~jrm@156.34.173.250) |
| 12:12:57 | → | unyu joins (~pyon@user/pyon) |
| 12:16:15 | → | tavares joins (~tavares@187.19.213.50) |
| 12:16:26 | × | tavares quits (~tavares@187.19.213.50) (Changing host) |
| 12:16:26 | → | tavares joins (~tavares@user/tavares) |
| 12:18:37 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 12:20:35 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 12:20:55 | × | RFV quits (~Thunderbi@139.red-88-12-223.dynamicip.rima-tde.net) (Ping timeout: 256 seconds) |
| 12:22:47 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:33:38 | → | phma joins (phma@2001:5b0:210d:a008:2b93:5e3e:cefa:7af9) |
| 12:36:11 | × | hendi quits (sid489601@id-489601.lymington.irccloud.com) (Ping timeout: 245 seconds) |
| 12:36:47 | × | xff0x quits (~xff0x@2001:1a81:5224:e000:7446:150d:d8ae:ed12) (Ping timeout: 256 seconds) |
| 12:37:21 | × | phma_ quits (phma@2001:5b0:210d:a008:2b93:5e3e:cefa:7af9) (Ping timeout: 256 seconds) |
| 12:37:50 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 12:37:56 | → | rusrushal13 joins (~rusrushal@2401:4900:30ba:6ed2:5f67:6972:1845:c7aa) |
| 12:38:00 | → | hendi joins (sid489601@id-489601.lymington.irccloud.com) |
| 12:38:38 | × | rusrushal13 quits (~rusrushal@2401:4900:30ba:6ed2:5f67:6972:1845:c7aa) (Client Quit) |
| 12:39:00 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:46:19 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 12:47:17 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 12:47:23 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 12:50:42 | × | alx741 quits (~alx741@157.100.197.240) (Quit: alx741) |
| 12:54:20 | → | jgeerds_ joins (~jgeerds@55d4a547.access.ecotel.net) |
| 12:56:03 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 12:57:37 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 12:59:07 | → | alx741 joins (~alx741@157.100.197.240) |
| 13:00:31 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 13:01:19 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 13:05:02 | → | rusrushal13 joins (~rusrushal@2409:4056:9:1708:2c2:74fb:7af9:78dc) |
| 13:07:03 | × | deadmarshal quits (~deadmarsh@95.38.113.90) (Ping timeout: 256 seconds) |
| 13:07:40 | → | deadmarshal joins (~deadmarsh@95.38.113.90) |
| 13:09:01 | × | zaquest quits (~notzaques@5.130.79.72) (Quit: Leaving) |
| 13:11:33 | → | doxen joins (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 13:11:59 | → | messier102 joins (~messier10@user/messier102) |
| 13:13:17 | × | sharky2 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC (Session timeout)) |
| 13:15:02 | × | absence_ quits (torgeihe@hildring.pvv.ntnu.no) (Ping timeout: 240 seconds) |
| 13:15:17 | × | Gurkenglas quits (~Gurkengla@dslb-090-186-104-244.090.186.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
| 13:19:46 | → | absence joins (torgeihe@hildring.pvv.ntnu.no) |
| 13:27:24 | → | xff0x joins (~xff0x@2001:1a81:5224:e000:7446:150d:d8ae:ed12) |
| 13:28:31 | × | doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Remote host closed the connection) |
| 13:28:34 | → | CiaoSen joins (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 13:30:51 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 13:31:25 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 13:35:57 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 13:37:31 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 13:38:00 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 13:40:41 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 13:41:36 | → | `2jt joins (~jtomas@130.red-88-22-46.staticip.rima-tde.net) |
| 13:41:57 | → | wmacmil joins (~wmacmil@83-233-165-97.cust.bredband2.com) |
| 13:42:13 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 13:42:31 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 13:43:14 | <wmacmil> | ive recently updated to using cabal, however for just going back and looking at code in old files it gives me errors when i try to use dante like " It is a member of the hidden package ‘mtl-2.2.2’." |
| 13:43:39 | <wmacmil> | is there any way i can just local install with cabal the necessary packages without having to refactor the entire directory with a cabal init |
| 13:45:47 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 250 seconds) |
| 13:47:37 | × | jgeerds_ quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 256 seconds) |
| 13:49:43 | → | slack1256 joins (~slack1256@186.11.114.177) |
| 13:52:29 | × | max22- quits (~maxime@2a01cb0883359800f5b23c2351d98307.ipv6.abo.wanadoo.fr) (Ping timeout: 250 seconds) |
| 13:52:31 | × | adnaahm quits (~adnaahm@host-57-net-67-160-119.mobilinkinfinity.net.pk) (Read error: Connection reset by peer) |
| 13:52:50 | → | doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
| 13:53:01 | <dminuoso> | desantra: hah, "shouldnt it be fairly easy" |
| 13:53:52 | × | acidsys quits (~LSD@2.lsd.systems) (Excess Flood) |
| 13:54:03 | <dminuoso> | How Ive grown to dislike that sentiment at the beginning of an undertaking. |
| 13:54:21 | → | acidsys joins (~LSD@2.lsd.systems) |
| 13:54:29 | × | acidsys quits (~LSD@2.lsd.systems) (Excess Flood) |
| 13:55:05 | <lortabac> | dminuoso: in this case I have all the needed pieces, I just have to implement the glue |
| 13:55:13 | → | acidsys joins (~LSD@2.lsd.systems) |
| 13:55:19 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 250 seconds) |
| 13:55:40 | × | vpan quits (~0@212.117.1.172) (Quit: Leaving.) |
| 13:56:09 | → | zaquest joins (~notzaques@5.130.79.72) |
| 13:56:40 | <dminuoso> | Reminds me of how the past 2-3 weeks figuring out all the small little details when dealing with domain names. |
| 13:58:37 | × | alp quits (~alp@user/alp) (Ping timeout: 240 seconds) |
| 13:58:51 | <lortabac> | yes, "it should be easy" can betray you in unexpected way :D |
| 14:01:37 | <desantra> | well I was trying to think what you need to support in this case. Iirc there are only two valid forms for parameter queries which are ?boolQuery and ?query=... no? |
| 14:02:23 | → | slac13852 joins (~slack1256@191.126.227.202) |
| 14:02:28 | × | hueso quits (~root@user/hueso) (Quit: hueso) |
| 14:02:30 | <dminuoso> | Now we need to talk about a) character sets, b) escaping characters, c) permisseable lengths, and d) semantics of duplicate query parameters. |
| 14:02:40 | <dminuoso> | Those are the first 4 subtleties I can think of from the top off my head |
| 14:02:46 | <dminuoso> | Further surprises are to be expected. |
| 14:02:50 | → | shriekingnoise joins (~shrieking@201.231.16.156) |
| 14:03:17 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds) |
| 14:03:48 | <desantra> | right... nvm |
| 14:04:07 | ← | DavidMilestone parts (~DavidMile@182.64.8.212) () |
| 14:04:27 | <dminuoso> | So the first thing to do is read the URI RFC, all updates on that, related RFCs, errata |
| 14:04:39 | <dminuoso> | Just to know how to correctly do parsing here |
| 14:04:51 | × | slack1256 quits (~slack1256@186.11.114.177) (Ping timeout: 256 seconds) |
| 14:04:59 | → | hueso joins (~root@user/hueso) |
| 14:05:16 | <dminuoso> | Perhaps its really simple, who knows - but having not read them I cant say |
| 14:05:38 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 14:06:18 | → | RFV joins (~Thunderbi@139.red-88-12-223.dynamicip.rima-tde.net) |
| 14:10:45 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 14:14:09 | × | RFV quits (~Thunderbi@139.red-88-12-223.dynamicip.rima-tde.net) (Quit: RFV) |
| 14:20:33 | → | vglfr joins (~vglfr@coupling.penchant.volia.net) |
| 14:21:19 | <messier102> | Hi all. I'm somewhat new to Haskell, but I've recently been interested in the "types as proofs" line of thought. I stumbled upon an idea of encoding arbitrary properties via ad-hoc type unions (e.g. `[a] & Sorted`), but couldn't find any prior discussion online. It seems like a pretty surface-level idea, so maybe I'm just looking in the wrong places. |
| 14:21:37 | <messier102> | I wrote up a brief description of what I'm thinking of: https://gist.github.com/messier102/b7fef1387c9a66a26727f9ee0a3b5758 |
| 14:21:57 | <messier102> | Has this been considered in the context of Haskell before? Would appreciate any pointers. |
| 14:23:31 | <merijn> | messier102: Sounds like you wanna google "Liquid haskell" :) |
| 14:23:34 | <dminuoso> | What you propose sounds rather analogue to a secondary/orthogonal type system |
| 14:23:43 | <merijn> | Not quite what you're describing, but probably interesting to you |
| 14:23:50 | <janus> | wmacmil: 'hidden package mtl' just means it is in your dep tree but not a direct dependency. it just means you need to add it to build-depends |
| 14:24:02 | → | slack1256 joins (~slack1256@186.11.24.3) |
| 14:24:07 | → | ph88^ joins (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) |
| 14:24:20 | <dminuoso> | In some sense LH could be considered such a secondary/orthogonal type system I guess |
| 14:24:25 | <merijn> | messier102: I've pondered and proposes something like what you said before, but then no one was interested in paying me to work on it, so it never went anywhere |
| 14:24:37 | <janus> | wmacmil: it would be weird if dante and mtl had common modules, so are you sure that is really because of a symbol from dante? |
| 14:24:43 | <desantra> | messier102: you probably want a dependently typed language like Idris. Haskell does not support dep types (yet) |
| 14:24:48 | <dminuoso> | Disclaimer: ^- merijn would get rich but get no work done if he was getting paid for all his ideas. |
| 14:25:07 | <merijn> | dminuoso: tbh, that's really only the one idea, though |
| 14:25:11 | <messier102> | merijn, dminuoso: Thank you, I will check those keywords out. :) |
| 14:25:18 | <merijn> | dminuoso: Also, joke's on you, I already don't get work done |
| 14:25:39 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 14:25:39 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 14:25:39 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:25:44 | <dminuoso> | messier102: I dont think of them as "keywords", really nothing ever stops you from having a second type system. |
| 14:25:54 | <dminuoso> | At least not in the traditional type theory sense. |
| 14:26:17 | <merijn> | Incidentally, I wrote a paper arguing for that awhile ago |
| 14:26:23 | × | slac13852 quits (~slack1256@191.126.227.202) (Ping timeout: 256 seconds) |
| 14:26:28 | <merijn> | "awhile" being, close to a decade now, lol |
| 14:27:14 | → | adnaahm joins (~adnaahm@host-57-net-67-160-119.mobilinkinfinity.net.pk) |
| 14:27:15 | <merijn> | Granted, that was mostly "this is a great idea and here's why", not much "how do you make it work" :p |
| 14:28:42 | → | slac91840 joins (~slack1256@191.126.227.202) |
| 14:28:42 | × | adnaahm quits (~adnaahm@host-57-net-67-160-119.mobilinkinfinity.net.pk) (Read error: Connection reset by peer) |
| 14:28:52 | <dminuoso> | I guess part of the problem of tying everything into a singular type system is that it drives up implementation complexity and it reduces diagnostics quality. Consider the kind of compiler errors you get from type rich libraries when doing something wrong. |
| 14:28:56 | → | adnaahm joins (~adnaahm@host-57-net-67-160-119.mobilinkinfinity.net.pk) |
| 14:29:04 | <messier102> | merijn, it does seem like the implementation might get a bit hairy when it comes down to it. I'd be interested to read the paper you mentioned, is it possible for you to share it? |
| 14:29:08 | <merijn> | dminuoso: That was essentially my argument |
| 14:29:30 | <merijn> | You want to enforce some "non-functional" (strictness, memory consumption, multi-threading, etc.) properties |
| 14:29:36 | <dminuoso> | So while you manage to encode some property into the type system, some kind of "you misused X in B" turns into "ambiguous type variable error here", "unable to satisfy constraint blahblahblah", "couldn't unify b0 with b0" |
| 14:29:48 | <merijn> | Stuffing all these things into the "functional" type (i.e. what does this compute) turns both into a mess |
| 14:30:10 | <merijn> | messier102: I mean, it contains basically 0 on "how would you actually do this" :D |
| 14:30:40 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 14:30:45 | <messier102> | merijn: I just want to hear the rationale :D It's probably more thought than I've given it so far |
| 14:31:15 | × | slack1256 quits (~slack1256@186.11.24.3) (Ping timeout: 256 seconds) |
| 14:31:33 | <dminuoso> | messier102: well some of these orthogonal type systems exist. |
| 14:31:36 | <dminuoso> | for instance the burrow checker in rust |
| 14:32:11 | <merijn> | messier102: I think it's here https://oopsle.github.io/2014/abstracts.pdf but that's just, like, 2 pages of off-the-cuff brainstorming, essentially :) |
| 14:32:46 | <dminuoso> | Oh. I guess that should read borrow checker. |
| 14:33:09 | <merijn> | A burrow checker would be, like, a fox, weasel, or ferret :D |
| 14:33:30 | <messier102> | merijn: thanks, I'll definitely check it out |
| 14:33:39 | <[exa]> | pages of off-the-cuff brainstorming, essentially :) |
| 14:33:54 | <[exa]> | ^ misclick with mid mouse, sorry |
| 14:34:27 | <dminuoso> | Dont worry, the next time you'll be our official channel parrot. |
| 14:35:04 | <[exa]> | I'll invest into colorful plumage |
| 14:38:00 | → | max22- joins (~maxime@2a01cb0883359800f5889d6f7a8326a9.ipv6.abo.wanadoo.fr) |
| 14:38:31 | × | deadmarshal quits (~deadmarsh@95.38.113.90) (Ping timeout: 256 seconds) |
| 14:40:05 | → | CHUD joins (~CHUD@dhcp6531.kent.ac.uk) |
| 14:40:38 | → | kaph joins (~kaph@net-2-47-208-144.cust.vodafonedsl.it) |
| 14:41:25 | → | segfaultfizzbuzz joins (~rustisafu@2602:306:cd3c:9350:cc4:c954:b25:db0a) |
| 14:45:15 | × | ph88^ quits (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) (Quit: Leaving) |
| 14:46:07 | <ski> | messier102 : hm, is that `[a] & Sorted' supposed to be like an intersection type (rather than a union type, as you mentioned) ? you could also compare with LiquidHaskell, i think (where you'd say something like `{xs : [a] | sorted xs}') |
| 14:46:15 | <ski> | oh, LiquidHaskell was mentioned |
| 14:46:41 | <messier102> | ski: sorry, I might've meant intersection type, yes |
| 14:47:10 | <messier102> | always conflate those two |
| 14:47:35 | × | jonathanx quits (~jonathan@h-178-174-176-109.a357.priv.bahnhof.se) (Remote host closed the connection) |
| 14:47:52 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 14:52:06 | <messier102> | LiquidHaskell seems interesting, although perhaps not entirely what I was thinking of |
| 14:52:26 | <segfaultfizzbuzz> | i am doing a double take on something which popped up on reddit. https://www.reddit.com/r/haskell/comments/skcir6/what_is_wholesale_or_monolithic_update/ these folks are saying: "persistent arrays need to be copied completely even for changes to a single element." -- really...?? |
| 14:52:47 | <segfaultfizzbuzz> | i thought you folks had the ST monad to encapsulate mutation or something to that effect |
| 14:53:32 | × | razetime quits (~quassel@49.207.209.26) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 14:53:39 | <ski> | sure, but those are ephemeral (mutable) arrays, not persistent (immutable) ones |
| 14:53:43 | <ski> | we have both |
| 14:54:20 | <ski> | oh, and we can do bulk updates on persistent, so it's not quite as bad as copy for each single change |
| 14:54:43 | ski | . o O ( `DiffArray' ) |
| 14:56:14 | <segfaultfizzbuzz> | lol the C++ comment operator |
| 14:56:31 | <ski> | "One of the main differences between functional and procedural algorithms is that the former rely on lists as the basic carrier of information while the latter rely on arrays." -- seems a bit too simplistic, both to "functional" and to "procedural" |
| 14:56:36 | <segfaultfizzbuzz> | When the // operator is applied to a diff array, its contents are physically updated in place. lol |
| 14:56:55 | <ski> | @type (//) |
| 14:56:56 | <lambdabot> | Ix i => Array i e -> [(i, e)] -> Array i e |
| 14:57:20 | <segfaultfizzbuzz> | yeah i don't think the list comment is accurate but it is idiomatic for haskell entry level documentation iiuc |
| 14:58:38 | <ski> | "wholesale or monolithic update" means that we update all elements, or at least many of them, in one go, one fell swoop |
| 14:59:14 | <ski> | (the former is mapping over an array. the latter is `(//)') |
| 14:59:31 | <segfaultfizzbuzz> | there may as well be a /* and */ operator in there ;-) |
| 15:00:03 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Quit: WeeChat 3.4) |
| 15:00:26 | → | romesrf joins (~romes@bl8-111-202.dsl.telepac.pt) |
| 15:00:30 | <romesrf> | o/ |
| 15:01:54 | <ski> | "Does library Data . Array provide mutable or immutable arrays?" -- `Data.Array' itself provides immutable arrays, but there's several modules with `Data.Array.' as prefix which provides (different kinds of) mutable arrays |
| 15:03:05 | <ski> | "Is a data structure with \"wholesale or monolithic update\" a mutable or immutable one?" -- the main need for having those is for immutable, but mutable ones could also support such operations, for convenience |
| 15:04:21 | <ski> | segfaultfizzbuzz : does this help ? |
| 15:06:16 | <segfaultfizzbuzz> | actually more fundamentally i should probably understand, |
| 15:06:21 | → | slack1256 joins (~slack1256@186.11.31.131) |
| 15:06:58 | → | phma_ joins (phma@2001:5b0:211f:7008:1fdf:50b9:29f4:b115) |
| 15:06:59 | <segfaultfizzbuzz> | it seems like in "many/most" circumstances updates should be in-place |
| 15:07:19 | <segfaultfizzbuzz> | there is something about laziness which seems to require allocation...? |
| 15:07:44 | <merijn> | segfaultfizzbuzz: Why should the be in place in most circumstances? |
| 15:07:48 | <ski> | which flavor of array are you speaking of ? |
| 15:07:49 | × | phma quits (phma@2001:5b0:210d:a008:2b93:5e3e:cefa:7af9) (Read error: Connection reset by peer) |
| 15:08:53 | × | slac91840 quits (~slack1256@191.126.227.202) (Ping timeout: 256 seconds) |
| 15:08:54 | <segfaultfizzbuzz> | so as an amateur it seems like "essentially everything" should be linear/affine, much as in rust |
| 15:09:17 | <segfaultfizzbuzz> | and i can't understand in what circumstances something other than that would be necessary, which seems to connect to when laziness is necessary |
| 15:10:13 | phma_ | is now known as phma |
| 15:10:41 | <merijn> | segfaultfizzbuzz: Laziness is mostly irrelevant here? |
| 15:11:08 | <merijn> | segfaultfizzbuzz: The point is that you can't know when things are safe to mutate in place in regular Haskell |
| 15:11:20 | <merijn> | Because you can't tell when your reference is the only one |
| 15:11:28 | × | miremeister quits (uid387155@id-387155.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 15:12:03 | <segfaultfizzbuzz> | my limited understanding is that the primary reason that i would use haskell is to benefit from laziness/non-strictness as a first class citizen/primary emphasis/default assumption |
| 15:12:20 | <segfaultfizzbuzz> | but i don't feel confident understanding when i would need to use laziness and when/how i would benefit |
| 15:12:51 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 15:12:55 | <segfaultfizzbuzz> | merijn: ahh |
| 15:13:25 | <merijn> | Rust is requiring some heavy duty machinery in the borrow checker to check that kinda thing |
| 15:13:56 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:56b3:2a4c:af18:8385) (Quit: WeeChat 2.8) |
| 15:15:06 | <WhateverRabbit> | you can't do guarded recursion without laziness. every map over a list/tree/array/whatever gives you some benefit |
| 15:16:08 | <segfaultfizzbuzz> | "guarded" recursion ? |
| 15:16:18 | <segfaultfizzbuzz> | the definition i'm finding on ncatlab isn't illuminating |
| 15:19:05 | → | zebrag joins (~chris@user/zebrag) |
| 15:19:09 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 15:19:09 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 15:19:09 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:19:52 | → | Pickchea joins (~private@user/pickchea) |
| 15:20:11 | <ski> | WhateverRabbit : you can express it, more or less manually, in a strict language, given lazy suspensions (and, in addition to `force' and `delay' operations, also a `lazy' operation, commonly used to delay a choice of suspensions/thunks) |
| 15:21:52 | <WhateverRabbit> | map f (x:xs) = f x : map f xs -- here you create a list instance with two thunks - f x and map f xs. map f xs doesn't evaluate nothing untill you don't read something from tail of f x : map f xs list instace |
| 15:22:09 | × | doxen quits (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
| 15:22:14 | <ski> | "How to add laziness to a strict language, without even being odd" by Philip Wadler,Walid Taha,David MacQueen in 1998-09 at <https://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#lazyinstrict> ; "Primitives for Expressing Iterative Lazy Algorithms" by André van Tonder in 2003-09-20 - 2004-08-04 at <https://srfi.schemers.org/srfi-45/srfi-45.html> |
| 15:22:20 | <WhateverRabbit> | sorry for my bad english |
| 15:23:57 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 15:24:04 | → | slac13545 joins (~slack1256@191.125.227.202) |
| 15:25:16 | <segfaultfizzbuzz> | brb |
| 15:25:18 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 15:25:22 | × | segfaultfizzbuzz quits (~rustisafu@2602:306:cd3c:9350:cc4:c954:b25:db0a) (Quit: Leaving) |
| 15:25:36 | <ski> | itym "map f xs doesn't evaluate until you read something from the tail of f x : map f xs list instance" |
| 15:25:46 | <romesrf> | hey everyone, after automatically deriving MonadReader for a newtype, how can I ask for the environment? |
| 15:25:58 | <ski> | just ask |
| 15:26:00 | <ski> | @type ask |
| 15:26:01 | <lambdabot> | MonadReader r m => m r |
| 15:26:13 | <romesrf> | :) i think something isn't working hahahah |
| 15:26:24 | <ski> | @type asks |
| 15:26:24 | → | alp joins (~alp@user/alp) |
| 15:26:25 | <lambdabot> | MonadReader r m => (r -> a) -> m a |
| 15:26:27 | × | slack1256 quits (~slack1256@186.11.31.131) (Ping timeout: 256 seconds) |
| 15:26:53 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480::41) |
| 15:26:56 | <romesrf> | :+1: that's what I was expecting, but instead I get couldn't match ReaderT with ohhhh i understand my mistake now :) |
| 15:27:06 | <romesrf> | i'm probably importing the wrong ask |
| 15:28:07 | <romesrf> | that was it thank you, ahahahah |
| 15:28:59 | <ski> | oic, np |
| 15:32:30 | <jkaye[m]> | I would not agree with that understanding |
| 15:32:43 | <jkaye[m]> | Laziness is nice, but I don't think it's Haskell's primary benefit |
| 15:32:44 | <jkaye[m]> | There are many people who would love a strict-by-default Haskell (no comment on whether that's "good" or not) |
| 15:35:07 | <ski> | laziness can help with modularity |
| 15:38:35 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 256 seconds) |
| 15:39:27 | <jkaye[m]> | WhateverRabbit: not sure what you mean by that |
| 15:40:04 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) |
| 15:40:16 | × | CHUD quits (~CHUD@dhcp6531.kent.ac.uk) (Remote host closed the connection) |
| 15:41:47 | → | deadmarshal joins (~deadmarsh@95.38.113.90) |
| 15:43:56 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 15:44:55 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) (Ping timeout: 256 seconds) |
| 15:44:57 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 240 seconds) |
| 15:47:36 | <jkaye[m]> | Why do you think that can't be done strictly? You can even do it strictly in GHC using extensions. It does change the semantics of the function of course |
| 15:47:47 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:52:03 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 15:56:25 | → | CHUD joins (~CHUD@edu791A.kent.ac.uk) |
| 15:57:00 | <CHUD> | what does this function do? f x = if even (x + 1) then x + 1 else f (x - 1), like how does it evaluate? |
| 15:58:01 | <CHUD> | I tested it, f 2 returns 2 and f 3 returns 4 |
| 15:58:10 | <opqdonut> | first the condition of the if gets evaluated, and based on that either the then or else gets evaluated |
| 15:58:26 | <opqdonut> | you can just plug in the values and do it by hand |
| 15:58:42 | <CHUD> | if it's an even number then what happens to (x+1) that's straight after it? |
| 15:58:57 | → | segfaultfizzbuzz joins (~rustisafu@2602:306:cd3c:9350:7513:3c16:cd2c:7377) |
| 15:59:01 | <CHUD> | if even (x+1) |
| 15:59:16 | <opqdonut> | you can just plug in the values and do it by hand |
| 15:59:39 | <CHUD> | I don't understand how the if then else statement works |
| 15:59:40 | <opqdonut> | f 3 ==> if even (3+1) then 3+1 else f (3-1) ==> if True then 3+1 else f (3-1) ==> 3+1 ==> 4 |
| 15:59:50 | <opqdonut> | it's not a statement, it's an expression |
| 15:59:57 | <opqdonut> | it has a value |
| 16:00:11 | <opqdonut> | it's pretty similar to the ?: operator in C/Java/JavaScript |
| 16:00:22 | <merijn> | I'd even say identical :p |
| 16:00:50 | <opqdonut> | in JS you'd write something like: f = x => even(x+1) ? (x+1) : f(x-1) |
| 16:01:05 | <CHUD> | I don't know any other languages |
| 16:01:16 | <CHUD> | opqdonut: thank you |
| 16:01:27 | <opqdonut> | interesting, why did you call it an if _statement_ if you don't know any other languages? |
| 16:01:47 | <ski> | if True then x else y = x |
| 16:01:47 | <CHUD> | it's from Haskell MOOC I just read it online |
| 16:01:48 | <ski> | if False then x else y = y |
| 16:02:04 | <ski> | can be regarded as defining equations for `if'-`then'-`else' |
| 16:02:19 | <opqdonut> | CHUD: you mean this? https://haskell.mooc.fi/part1#how-do-i-get-anything-done |
| 16:02:25 | <CHUD> | yes |
| 16:02:26 | <ski> | CHUD : sounds like that is bad, at least in that regard, in that case |
| 16:02:28 | <opqdonut> | it says pretty much what I just told you |
| 16:02:35 | <opqdonut> | I should know, I wrote that mooc :P |
| 16:03:06 | <ski> | ah, it doesn't say anything about "statements" in Haskell |
| 16:03:58 | <ski> | "In other languages, `if' is a statement. It doesn’t have a value, it just conditionally executes other statements.","In Haskell, `if' is an expression. It has a value. It selects between two other expressions. It corresponds to the `?:' operator in C or Java." |
| 16:04:12 | <opqdonut> | CHUD: anyway, haskell's if-then-else lets you select between two values (or expressions, if you want to be pedantic) |
| 16:05:36 | <opqdonut> | it's kind of like english |
| 16:05:57 | <opqdonut> | "what's the color? well, if the fruit is an apple, green, otherwise red" |
| 16:06:11 | <ski> | CHUD : to evaluate an `if'-`then'-`else' (aka a conditional) expression, `if <condition> then <consequent> else <alternate>', you evaluate the condition. if it's `True', then the result of evaluating the `if'-`then'-`else' will be the result of evaluating the consequent expression. otherwise (i.e. if the condition is `False'), it will be the result of evaluating the alternate expression |
| 16:06:43 | <ski> | if isApple myFruit then green else red |
| 16:07:10 | <CHUD> | so it doesn't evaluate if the x input is even it checks if (x+1) is even? |
| 16:07:23 | <messier102> | all red apples in the world shook in terror |
| 16:07:36 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 16:07:39 | <ski> | CHUD : yes |
| 16:07:45 | <opqdonut> | CHUD: yes, the code is writte `if even (x+1) then ...`, not `if even x then ...` |
| 16:08:32 | <ski> | either the `then' branch (consequent) or the `else' branch (alternate) will be chosen, depending on the value of the condition |
| 16:08:46 | <CHUD> | alright, thank you |
| 16:09:01 | <ski> | so, it's a way to express choice, choosing between two alternatives, depending on the outcome of checking a condition |
| 16:12:07 | <messier102> | CHUD: are you learning Haskell as your first programming language? If so, what made you choose it? |
| 16:13:15 | <CHUD> | I just found it on mooc.fi and picked it, there was little thought, I'm also working through part 1 of the java cource |
| 16:13:31 | <messier102> | I see, interesting |
| 16:13:49 | <CHUD> | Java is just to supplement my university course |
| 16:13:53 | <geekosaur> | two at once seems like a good way to confuse yourself, though |
| 16:14:17 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds) |
| 16:14:17 | <CHUD> | Haskell isn't a top priority, just doing it on the side |
| 16:15:19 | <CHUD> | I have my functional programming module starting in a couple of months |
| 16:15:56 | → | gaff joins (~gaff@49.207.198.16) |
| 16:16:21 | <messier102> | What are you majoring in, if you don't mind me asking? |
| 16:16:24 | <ski> | nice |
| 16:16:33 | <CHUD> | computer science |
| 16:16:43 | <gaff> | is there a way to create the binary literal 0b11110000, say? |
| 16:17:13 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 16:17:16 | <geekosaur> | gaff, ghc 9.x supports that directly |
| 16:17:24 | <int-e> | There's {-# LANGUAGE BinaryLiterals #-} |
| 16:17:24 | <gaff> | i see |
| 16:17:53 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 16:17:58 | <int-e> | ah does ghc 9.x enable that by default now... |
| 16:19:05 | <gaff> | geekosaur: yeah, i saw the language extension, i can type it in GHCi, but i was wondering how the code can generate it. |
| 16:19:13 | <int-e> | 9.2 does, 9.0 doesn't |
| 16:19:20 | <gaff> | i see |
| 16:19:36 | <ski> | "generate"/"create" meaning ? |
| 16:20:57 | <int-e> | In any case the extension has been there for a long time. (8.0.2 has it, that's the oldest version I have here, but I expect it has been there for much longer) |
| 16:22:38 | → | lavaman joins (~lavaman@98.38.249.169) |
| 16:25:08 | <gaff> | yeah, i use 8.10.4, and it has that extension, but not much more |
| 16:25:49 | <gaff> | ski: yeah, how can a function for example return a binary literal? |
| 16:26:27 | <c_wraith> | gaff: binary literals only exist in source |
| 16:26:29 | <gaff> | not possible in 8.10.4 |
| 16:26:47 | <c_wraith> | gaff: as far as a function is concerned, they're just a number |
| 16:26:49 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) |
| 16:27:09 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) |
| 16:27:25 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 16:27:47 | <ski> | gaff : .. just do it ? |
| 16:28:11 | <ski> | % let f x = (x,0b11110000) in f 2 |
| 16:28:11 | <yahb> | ski: (2,240) |
| 16:28:16 | <ski> | seems to work fine, to me |
| 16:28:24 | → | shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
| 16:28:32 | <geekosaur> | gaff, the computers we use all use binary internally. how you enter or display a number has no relationship to how the computer stores it or works with it |
| 16:29:07 | <gaff> | geekosaur: yes |
| 16:29:15 | <geekosaur> | and even the binary representation is mostly an invisible detail unless you start to use bit operations on them |
| 16:29:27 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 16:29:29 | <gaff> | correct |
| 16:29:53 | <opqdonut> | > Numeric.showBin 240 "" |
| 16:29:55 | <lambdabot> | error: |
| 16:29:55 | <lambdabot> | Not in scope: ‘Numeric.showBin’ |
| 16:29:55 | <lambdabot> | Perhaps you meant one of these: |
| 16:30:13 | <ski> | % (showString "0b" . showIntAtBase 2 intToDigit 0b11110000) "" |
| 16:30:13 | <yahb> | ski: "0b11110000" |
| 16:30:18 | <ski> | % (showString "0b" . showIntAtBase 2 intToDigit 240) "" |
| 16:30:18 | <yahb> | ski: "0b11110000" |
| 16:30:35 | <opqdonut> | yeah |
| 16:30:57 | <geekosaur> | I think yahb has showBin |
| 16:31:12 | <geekosaur> | % Numeric.showBin 240 "" |
| 16:31:13 | <yahb> | geekosaur: ; <interactive>:40:1: error:; Not in scope: `Numeric.showBin'; Perhaps you meant one of these: `Numeric.showHex' (imported from Numeric), `Numeric.showInt' (imported from Numeric), `Numeric.showOct' (imported from Numeric) |
| 16:31:19 | <geekosaur> | guess not |
| 16:31:20 | <gaff> | yeah, but that is a string, now how do i get that into a binary literal? |
| 16:31:31 | <opqdonut> | I guess Numeric.showBin is too new to be on any of the bots |
| 16:31:39 | <messier102> | gaff: what do you mean by a literal, exactly? |
| 16:31:44 | <ski> | gaff : no, question makes no sense |
| 16:32:06 | <gaff> | sorry, i am a bit confused |
| 16:32:23 | <gaff> | literal: 123 |
| 16:32:27 | <opqdonut> | you _could_ define your own `newtype Bin = Bin Int` with a `Show` instance that prints it as 0b101010 |
| 16:32:38 | <opqdonut> | maybe that's what you're after? |
| 16:32:47 | <ski> | literals are things that appear in text. e.g. in source code, or in the `String's produced by `Show' (or the ones consumed by `Read') |
| 16:33:09 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Read error: Connection reset by peer) |
| 16:33:33 | × | deadmarshal quits (~deadmarsh@95.38.113.90) (Ping timeout: 256 seconds) |
| 16:33:46 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 16:34:13 | <ski> | literals are converted to values (and the other way around), when going from source (or `String') (repsectively when using `Read'). so a function can't possibly "return a literal", except in the sense that it may return some text, which involves a literal |
| 16:34:13 | <romesrf> | how would i do mapConcurrently but over a MonadIO m => t m a rather than IO a? I was looking at monadUnliftIO but i'm unsure |
| 16:34:22 | <ski> | a number is a number, not a literal |
| 16:34:25 | <gaff> | ok, here is my problem. i want to distinguish binary number from a decimal in calculations. now the problem is that we have numbers such as 1100 that can go both ways, so i need a representation for binary to make the cut clear. |
| 16:34:48 | <c_wraith> | gaff: numbers aren't binary or decimal. those are details about the *representation* of a number. |
| 16:34:52 | <ski> | gaff : you should normally not think of numbers in calculations as being in any base whatsoever |
| 16:35:01 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 16:35:12 | <Hecate> | shapr: a cookie is a header |
| 16:35:18 | <gaff> | ski: i am doing stuff with bits etc |
| 16:35:19 | <Hecate> | ugh |
| 16:35:24 | <ski> | what stuff ? |
| 16:35:26 | <Hecate> | shapr: please disregard this message |
| 16:35:31 | <gaff> | like conversions |
| 16:35:38 | <ski> | meaning ? |
| 16:35:57 | <c_wraith> | romesrf: a typical MonadIO instance will carry additional contents that have no obvious way to fork. |
| 16:36:03 | <gaff> | converting binary numbers to decimals, decimals to a list of bits, etc |
| 16:36:27 | <romesrf> | c_wraith: i see! :) makes sense |
| 16:36:39 | <ski> | there aren't really such a thing as binary *numbers*. there are binary *numerals*/*literals* |
| 16:36:54 | <gaff> | sorry, binary literals |
| 16:36:55 | <messier102> | gaff: it sounds to me like you want to convert between different textual representations of a number (so, Strings) |
| 16:36:56 | <ski> | numbers are numbers, they are neither binary, nor decimal, not of any other base |
| 16:37:32 | <c_wraith> | romesrf: like, say you're working in 'StateT Foo IO Bar' - It's not too bad to decide each concurrent call gets the same initial state, but what do you do with all the different result states? |
| 16:37:34 | <gaff> | so if i say to you 1100, what does it mean? |
| 16:37:48 | <ski> | is that supposed to be a `String' ? |
| 16:37:51 | <messier102> | gaff: I don't know, what's the base? |
| 16:37:52 | <gaff> | no |
| 16:37:56 | <gaff> | literal |
| 16:38:11 | <ski> | so, it is some kind of text, then ? |
| 16:38:11 | <geekosaur> | I could imagine a numeric type which carried along with it a preferred base representation. the complication then becomes what happens if you multiply (10 @10) * (6 @8), which base is the result? |
| 16:38:12 | <opqdonut> | if you tell GHC 1100 it will mean 1100 in base ten, that is, one thousand and one hundred |
| 16:38:14 | <CHUD> | I get this error when I try to run the Set1Test.hs Mooc/Test.hs:19:1: error: Could not find module ‘Test.QuickCheck’ Use -v (or `:set -v` in ghci) to see a list of the files searched for. | 19 | import Test.QuickCheck | ^^^^^^^^^^^^^^^^^^^^^^ Mooc/Test.hs:20:1: error: Could not find module ‘Test.QuickCheck.Monadic’ Use -v (or `:set -v` in ghci) to see a list of the files searched for. | 20 | import Test.QuickCheck.Monadic |
| 16:38:20 | <ski> | appearing in Haskell source, or what ? program input ? |
| 16:38:37 | <ski> | we need to know the context in which it appears, to be able to tell |
| 16:38:39 | <CHUD> | It's when I run the command from a terminal in vs code |
| 16:38:42 | <gaff> | can appear in haskell source |
| 16:38:43 | <opqdonut> | CHUD: did you run `stack build`? |
| 16:38:47 | <CHUD> | Yes |
| 16:38:58 | <c_wraith> | romesrf: this is the reason forkIO (and things based on it, like mapConcurrently) only work in IO. Everything else has more rules, and it isn't obvious what those rules should be |
| 16:39:27 | <romesrf> | c_wraith: that's insightful, thank you |
| 16:39:28 | <opqdonut> | CHUD: and you're running the tests with `stack runhaskell Set1Test.hs`? |
| 16:39:34 | <ski> | if it appears in Haskell source, then it's a decimal numeric literal (assuming there's no `0x',`0o' or `0b' prefix before it, or it being part of an identifier, or a `String' literal or anything like that) |
| 16:39:45 | <CHUD> | on the regular terminal not the one in vs code |
| 16:39:50 | <CHUD> | I'll try it in vs code |
| 16:40:30 | <CHUD> | opqdonut: sorry, it seems to be doing something again x/71 |
| 16:40:35 | <gaff> | ski: so can haskell code generate a literal like 0b1100? i am using 8.10.4 |
| 16:40:55 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 256 seconds) |
| 16:41:02 | <wavemode> | -X BinaryLiterals |
| 16:41:10 | → | lavaman joins (~lavaman@98.38.249.169) |
| 16:41:14 | <ski> | gaff : what do tou mean by "generate a literal" ? |
| 16:41:15 | <c_wraith> | gaff: literals are strings. you can certainly write a function that returns that string. But it's not a number. |
| 16:41:20 | <messier102> | gaff: think about it this way: numeric values in Haskell (e.g. Int) encode some quantity. Whether we choose to represent that quantity as 255 (base 10), or 0xFF, or 0b11111111, all of which are equivalent, is a detail relating to the textual representation of that quantity |
| 16:41:21 | → | Vajb joins (~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e) |
| 16:41:34 | <ski> | gaff : it can generate a `String' (or some other text format) that includes such a literal, sure |
| 16:41:49 | → | doxen joins (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 16:42:17 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 16:42:46 | <gaff> | ski: there is no way to do that, is it, because that doesn't make sense? |
| 16:43:11 | <gaff> | i think i will need to think about that a bit more |
| 16:43:11 | <ski> | to do what ? |
| 16:43:28 | <opqdonut> | CHUD: you might find more help on the course's telegram channel (see the material), many people are using vs code to work on the course but I'm not that familiar with vs code myself. The instructions do work in a normal linux terminal at least :) |
| 16:43:47 | <gaff> | i mean haskell function can return a literal like 123, but can it return 0b1100? |
| 16:43:52 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 16:44:12 | <ski> | foo x = "123" |
| 16:44:21 | <ski> | bar y = "0b1100" |
| 16:44:25 | <ski> | there you go |
| 16:44:36 | <gaff> | ok |
| 16:44:42 | <ski> | both functions "return literals" |
| 16:44:50 | <messier102> | gaff: if a function returns a number, it doesn't return a string of characters "123". It returns a value representing that quantity, which can be expressed in different ways |
| 16:45:05 | <messier102> | % 1100 = 12 |
| 16:45:05 | <yahb> | messier102: |
| 16:45:09 | <messier102> | % 1100 == 12 |
| 16:45:09 | <yahb> | messier102: False |
| 16:45:20 | <messier102> | my binary math is off today, sorry |
| 16:45:24 | <gaff> | ski: thanks |
| 16:45:26 | <ski> | % 2 = 3 |
| 16:45:26 | <yahb> | ski: |
| 16:45:33 | × | Vajb quits (~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e) (Ping timeout: 256 seconds) |
| 16:45:35 | <janus> | does anybody have the sources for GHC 2? because it is needed it build GHC 3 |
| 16:45:58 | <messier102> | % 0b1100 == 12 |
| 16:45:58 | <yahb> | messier102: True |
| 16:46:04 | <CHUD> | opqdonut: It seems to be progressing, I think when I first ran it, it build a different sent of haskell files I had, when I just ran it again now, I went into the exercises path and then ran stack... and it has just finished completing the 71 actions |
| 16:46:29 | <ski> | % !2 = 3 |
| 16:46:30 | <yahb> | ski: ; <interactive>:48:1: error: Top-level strict bindings aren't allowed: !2 = 3 |
| 16:46:33 | <ski> | bah :) |
| 16:46:35 | <dolio> | janus: https://www.haskell.org/ghc/download_ghc_210.html |
| 16:46:57 | × | segfaultfizzbuzz quits (~rustisafu@2602:306:cd3c:9350:7513:3c16:cd2c:7377) (Quit: Leaving) |
| 16:47:17 | <dolio> | Oh, that's an FTP link? |
| 16:47:25 | <janus> | it doesn't work |
| 16:47:25 | <gaff> | ski: so literal = string of characters |
| 16:47:38 | <janus> | "Error in server response" says wget |
| 16:47:38 | <CHUD> | opqdonut: I just did a quick test after completing exercise 1 in set 1 and it ran and passed |
| 16:48:00 | <dolio> | You might need to ask SPJ directly or something. |
| 16:48:10 | <opqdonut> | CHUD: great |
| 16:48:11 | <ski> | gaff : literal is a source notion. when representing source in Haskell, we tend to use `String', or some other text-representation (or perhaps an Abstract Syntax Tree, even) |
| 16:48:15 | <wavemode> | if the git repository goes back far enough you can checkout the source code of any historical version |
| 16:48:24 | <wavemode> | building it will be another story |
| 16:48:27 | <janus> | ok i will shoot SPJ a mail then |
| 16:48:28 | <messier102> | gaff: I think it would be easier to think about it if you banned the word "literal" from your vocabulary for a moment, because you seem to have misunderstood what it means |
| 16:48:32 | <gaff> | ski |
| 16:48:57 | <ski> | gaff |
| 16:49:23 | <gaff> | yes |
| 16:49:52 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 16:50:03 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 16:51:17 | <gaff> | so (0b11110000 + 0b00001111) :: Int = 255 => this is a source notion |
| 16:51:39 | <CHUD> | opqdonut: thank you for helping me |
| 16:52:13 | → | deadmarshal joins (~deadmarsh@95.38.113.90) |
| 16:52:49 | <ski> | gaff : saying "my function returns a literal" sounds off in the same way as saying "my function returns a variable" or "my function returns a definition". strictly speaking, none of these can be the case, since the things that purportedly would be returned are not entities that exist at the level of Haskell evaluation. however, in the specific context of talking about some (e.g. source) language (e.g. |
| 16:52:55 | <ski> | Haskell, or some other one), we can understand the former phrases as being shorthand for returning Haskell *representations* of those things (literals,&c.) |
| 16:53:09 | <janus> | what is up with that ftp server |
| 16:53:12 | <janus> | nc -vvv ftp.dcs.gla.ac.uk 21 |
| 16:53:13 | <janus> | Connection to ftp.dcs.gla.ac.uk 21 port [tcp/ftp] succeeded! |
| 16:53:20 | <janus> | and then it just never replies |
| 16:53:24 | <gaff> | ok |
| 16:54:18 | <dolio> | I'm honestly surprised it's still actually running. |
| 16:54:20 | shapr | hugs Hecate |
| 16:54:22 | <wavemode> | the server must be lazy |
| 16:54:51 | <romesrf> | what happened to this (Haggis)? : https://www.microsoft.com/en-us/research/wp-content/uploads/1995/09/composing-haggis.pdf |
| 16:55:01 | <gaff> | so the expression (0b11110000 + 0b00001111) :: Int contains binary l"literals" |
| 16:55:02 | <ski> | gaff : the sequences of characters `0b11110000',`0b00001111' (and the sign `+' and the parentheses, and the `::' and the `Int') and `255' are source-level notions. however, when reading the expression (to the left of `=') into Haskell, those gets translated into corresponding Haskell evaluation notions (so the numeric literals (being in binary) gets translated to numbers (not being in any particular base), |
| 16:55:08 | <ski> | the `+' operator gets translated to the addition function) |
| 16:55:27 | <gaff> | ok |
| 16:55:31 | <messier102> | Literals can be viewed as opposed to variables. They are the actual concrete values *in the source code*. For example, if you were to go and write `addTwo x = x + 2`, the 2 there would be considered a literal -- because we refer to all other values indirectly by their variable name. |
| 16:55:44 | <ski> | oh, Haggis .. haven't heard that name in a long time |
| 16:55:49 | → | zmt00 joins (~zmt00@user/zmt00) |
| 16:55:51 | <romesrf> | ahah :) |
| 16:56:08 | <c_wraith> | messier102: I don't think that's the right contrast. I think the right contrast is that a literal is something you can represent in source code without calling a conversion function. |
| 16:56:12 | <gaff> | messier102: correct |
| 16:56:14 | ski | also misses Fudgets |
| 16:57:00 | <janus> | what happened to Thomas Hallgren? |
| 16:57:25 | <janus> | doesn't even mention FP on https://www.linkedin.com/in/thallgren/?locale=sv_SE |
| 16:57:32 | <janus> | wonder if it is the right Hallgren |
| 16:57:38 | <messier102> | c_wraith: well, yes, but I'm not coming at it from the compiler perspective necessarily :) this is already confusing enough |
| 16:58:27 | × | wmacmil quits (~wmacmil@83-233-165-97.cust.bredband2.com) (Remote host closed the connection) |
| 16:58:37 | <ski> | janus : he still has <https://cth.altocumulus.org/~hallgren/>, which includes Fudgets,Alfa,&c. |
| 16:58:50 | → | wmacmil joins (~wmacmil@83-233-165-97.cust.bredband2.com) |
| 16:58:59 | → | RFV joins (~Thunderbi@139.red-88-12-223.dynamicip.rima-tde.net) |
| 16:59:08 | <gaff> | c_wraith: what do you mean by "conversion function"? |
| 16:59:11 | <romesrf> | ski: what's the Haggis story? it looks interesting but i can find nothing at all anywhere |
| 16:59:23 | <romesrf> | i first saw it mentioned at the end of `Concurrent Haskell` |
| 16:59:25 | <ski> | "WebFudgets (2017) WebFudgets allow Haskell programs built with Fudgets (see below) to run in a web page. I have adapted some of the Fudgets programs from back in the day to WebFudgets." |
| 17:00:16 | <ski> | oh, and Hallgren also did WWWBrowser in Haskell (using Fudgets), which automagically could fetch images in parallel, displaying pages faster than Mosaic |
| 17:00:21 | <dolio> | It seems like the important thing to point out in this context is that literals are notation for values. They're not values, and many literals can be notation for the same value. |
| 17:00:26 | × | wmacmil quits (~wmacmil@83-233-165-97.cust.bredband2.com) (Remote host closed the connection) |
| 17:00:52 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 17:00:55 | <dolio> | And the notation originally used to describe the value has no effect on how the value is printed to the screen. |
| 17:01:03 | <ski> | romesrf : i don't believe i looked that much into Haggis at the time (i did read more about Fudgets, to be sure) |
| 17:01:11 | → | wmacmil joins (~wmacmil@83-233-165-97.cust.bredband2.com) |
| 17:01:28 | × | ubert quits (~Thunderbi@p200300ecdf0994a856831da0cd63cc4d.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 17:01:45 | → | slack1256 joins (~slack1256@191.125.227.215) |
| 17:01:51 | <c_wraith> | gaff: there's nothing special about that term. It's a function that converts something to something else. |
| 17:01:59 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 17:02:02 | × | wmacmil quits (~wmacmil@83-233-165-97.cust.bredband2.com) (Remote host closed the connection) |
| 17:02:05 | <ski> | "The programming languages I used in the beginning were mostly BASIC and 6502 assembler." -- hehe :) |
| 17:02:12 | → | Akiva joins (~Akiva@user/Akiva) |
| 17:02:27 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 17:02:52 | <gaff> | ski: that's way back |
| 17:03:00 | → | lbseale joins (~ep1ctetus@user/ep1ctetus) |
| 17:03:01 | <ski> | which ? |
| 17:03:01 | × | CHUD quits (~CHUD@edu791A.kent.ac.uk) (Remote host closed the connection) |
| 17:03:06 | <gaff> | BASIC |
| 17:03:20 | → | CHUD joins (~CHUD@edu791A.kent.ac.uk) |
| 17:03:22 | <gaff> | do people use that stuff anymore? |
| 17:03:25 | ski | also, incidentally, started with BASIC, and 6502 assembler |
| 17:03:35 | × | slac13545 quits (~slack1256@191.125.227.202) (Read error: Connection reset by peer) |
| 17:04:13 | <gaff> | c_wraith: like fromIntegral? |
| 17:04:39 | <messier102> | maybe we're reinventing the wheel here |
| 17:04:40 | <messier102> | https://en.wikipedia.org/wiki/Literal_(computer_programming) |
| 17:04:50 | <ski> | well .. i've been, on and off, lately, disassembling a Prolog implementation for the Commodore 64 (wanting to add LCO/TCO, and probably the "same" for disjunctions. and want to fix a bug with variable name display, and perhaps some other tweaks as well) |
| 17:05:12 | <c_wraith> | gaff: like every single function except for id |
| 17:05:14 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 17:05:19 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) (Remote host closed the connection) |
| 17:05:28 | <gaff> | yeah |
| 17:05:51 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 17:06:07 | <janus> | oooh good to see his website. |
| 17:06:24 | <Cheery> | I'm in middle of implementing typeclasses in my own runtime/compiler. Any ideas or advices that I might miss otherwise? |
| 17:06:35 | <ski> | reminds me i want to try to install Fudgets and Alfa again |
| 17:06:40 | <gaff> | but a binary literal is desugared to fromInteger 0b... |
| 17:06:43 | × | RFV quits (~Thunderbi@139.red-88-12-223.dynamicip.rima-tde.net) (Quit: RFV) |
| 17:06:48 | <gaff> | under the hood |
| 17:07:18 | <ski> | all integer literals are desugared like that .. that's not specific to binary ones |
| 17:08:41 | × | tavares quits (~tavares@user/tavares) (Ping timeout: 256 seconds) |
| 17:08:55 | <gaff> | i am contrasting with what has been said earlier ... that literals do not need conversion functions. perhaps what was meant was that they do not need explicit conversion functions. |
| 17:08:55 | <ski> | (and the decimal/octal/hexadecimal/binary integer literal, of type `Integer', that's being passed to `fromInteger', is read/translated into an integer (number)) |
| 17:09:10 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 17:10:20 | → | tavares joins (~tavares@187.19.213.50) |
| 17:10:21 | <ski> | i didn't really follow the conversion part of the conversation, but i guess the idea was that there was no *explicit* conversion in the source, for a literal ? |
| 17:10:21 | → | zer0bitz joins (~zer0bitz@2001:2003:f74d:b800:39e9:9943:8cd0:5689) |
| 17:10:37 | × | CiaoSen quits (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 17:10:51 | <dolio> | I think that angle is not going to clear up confusion. |
| 17:11:05 | <gaff> | i am not sure what the person who mentioned it really meant. |
| 17:11:11 | ski | . o O ( To converse or not to conserve, is that the question ? ) |
| 17:11:13 | <messier102> | gaff: I think you're fixating on the "conversion function" remark too much. It's not that important to understanding the notion of a literal. |
| 17:11:22 | <gaff> | ok |
| 17:12:09 | <dolio> | > 0 == (256 :: Int8) |
| 17:12:11 | <lambdabot> | True |
| 17:12:48 | <messier102> | Maybe an analogy would help. Think of a literal as a recipe for a cake. When a program runs, it takes that recipe and creates an actual cake (runtime value in memory) from it. But the recipe itself is not something that exists as a physical object during execution. |
| 17:12:51 | <dolio> | > (256 :: Int8) |
| 17:12:54 | <lambdabot> | 0 |
| 17:13:21 | <wavemode> | shouldn't it wrap to negative if it's signed |
| 17:13:23 | <dolio> | Doesn't matter that I typed in 256, it still prints 0. |
| 17:13:24 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 17:13:27 | → | Feuermagier_ joins (~Feuermagi@84.17.48.173) |
| 17:13:36 | <dolio> | wavemode: It did. :) |
| 17:13:58 | <ski> | messier102 : heh, that's a new take of that analogy :) |
| 17:14:02 | → | whound joins (~dust@2405:204:5488:ef4c:54b6:3467:52f3:e9f2) |
| 17:14:21 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 17:14:21 | <messier102> | ski: can you guess I just read a lecture on monads :D |
| 17:14:37 | <ski> | @quote not.the.cake |
| 17:14:37 | <lambdabot> | ski says: <ski> `getLine :: IO String' is a recipe for how to interact with the world to acquire a `String' <ski> the recipe is not the cake |
| 17:14:44 | <messier102> | a number is like a burrito... |
| 17:15:15 | <gaff> | too many analogies on food |
| 17:15:57 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 250 seconds) |
| 17:16:47 | <gaff> | ski: thanks much for your help. |
| 17:16:50 | <ski> | np |
| 17:17:03 | <gaff> | thanks everyone. |
| 17:17:10 | <gaff> | bye |
| 17:17:18 | <ski> | laters. have fun with Haskell ! |
| 17:17:19 | × | gaff quits (~gaff@49.207.198.16) () |
| 17:17:50 | <messier102> | I hope it was at all helpful |
| 17:20:11 | <geekosaur> | @quote rightly.apprehend |
| 17:20:11 | <lambdabot> | No quotes match. :( |
| 17:20:48 | <geekosaur> | "I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." |
| 17:21:34 | <ski> | @remember Charles_Babbage I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. |
| 17:21:34 | <lambdabot> | I will never forget. |
| 17:22:03 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Quit: Leaving.) |
| 17:22:23 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 17:22:44 | <messier102> | powerful words |
| 17:23:22 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 17:23:25 | → | slac93974 joins (~slack1256@186.11.30.195) |
| 17:24:32 | × | tavares quits (~tavares@187.19.213.50) (Changing host) |
| 17:24:32 | → | tavares joins (~tavares@user/tavares) |
| 17:25:27 | × | slack1256 quits (~slack1256@191.125.227.215) (Ping timeout: 256 seconds) |
| 17:26:37 | × | xff0x quits (~xff0x@2001:1a81:5224:e000:7446:150d:d8ae:ed12) (Ping timeout: 240 seconds) |
| 17:28:41 | → | xff0x joins (~xff0x@2001:1a81:5244:c900:da3d:85a0:8128:63) |
| 17:29:53 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) |
| 17:30:20 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 17:31:29 | × | desantra quits (~skykanin@user/skykanin) (Quit: WeeChat 3.3) |
| 17:31:35 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 17:31:55 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 17:32:41 | <CHUD> | quadruple :: Integer -> Integer quadruple x = double (double x) |
| 17:33:02 | <CHUD> | ignore that sorry, I was trying to write a multiline |
| 17:33:11 | <ski> | quadruple = double . double |
| 17:34:39 | × | CHUD quits (~CHUD@edu791A.kent.ac.uk) (Remote host closed the connection) |
| 17:34:56 | → | CHUD joins (~CHUD@edu791A.kent.ac.uk) |
| 17:35:35 | <wavemode> | quadruple = decimate . vigintuple |
| 17:35:57 | × | deadmarshal quits (~deadmarsh@95.38.113.90) (Ping timeout: 240 seconds) |
| 17:36:53 | × | maerwald quits (~maerwald@mail.hasufell.de) (Changing host) |
| 17:36:53 | → | maerwald joins (~maerwald@user/maerwald) |
| 17:44:35 | ← | wavemode parts (~wavemode@c-98-223-145-19.hsd1.il.comcast.net) () |
| 17:45:00 | → | wavemode joins (~wavemode@2601:241:0:fc90:da0f:27a6:a9a0:a864) |
| 17:47:45 | → | lavaman joins (~lavaman@98.38.249.169) |
| 17:48:00 | → | segfaultfizzbuzz joins (~rustisafu@2602:306:cd3c:9350:5857:f054:76af:4d5e) |
| 17:48:10 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 17:48:33 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 17:50:12 | × | romesrf quits (~romes@bl8-111-202.dsl.telepac.pt) (Quit: WeeChat 3.4) |
| 17:50:23 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 17:50:43 | × | MajorBiscuit quits (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Ping timeout: 256 seconds) |
| 17:50:57 | × | CHUD quits (~CHUD@edu791A.kent.ac.uk) (Ping timeout: 256 seconds) |
| 17:52:37 | × | alp quits (~alp@user/alp) (Ping timeout: 240 seconds) |
| 17:52:57 | × | max22- quits (~maxime@2a01cb0883359800f5889d6f7a8326a9.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 17:52:57 | × | segfaultfizzbuzz quits (~rustisafu@2602:306:cd3c:9350:5857:f054:76af:4d5e) (Ping timeout: 240 seconds) |
| 17:53:47 | → | max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) |
| 18:01:09 | → | zuhkov joins (~duycop@14.166.144.253) |
| 18:01:24 | → | alp joins (~alp@user/alp) |
| 18:01:38 | ← | zuhkov parts (~duycop@14.166.144.253) () |
| 18:06:49 | × | wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Read error: Connection reset by peer) |
| 18:09:49 | × | wavemode quits (~wavemode@2601:241:0:fc90:da0f:27a6:a9a0:a864) (Quit: Client closed) |
| 18:10:06 | → | wavemode joins (~wavemode@2601:241:0:fc90:da0f:27a6:a9a0:a864) |
| 18:10:55 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 18:12:49 | × | doxen quits (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
| 18:18:20 | <monochrom> | Aaahhhh late to a conversation that begs for bad puns. "What is a literal, literally?" (OK I'm stopping now.) |
| 18:19:11 | <geekosaur> | that convo was confusing enough without, I think |
| 18:20:54 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 260 seconds) |
| 18:21:07 | → | deadmarshal joins (~deadmarsh@95.38.113.90) |
| 18:21:12 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 18:22:11 | → | waleee joins (~waleee@h-98-128-229-110.NA.cust.bahnhof.se) |
| 18:22:41 | → | doxen joins (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 18:24:31 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 18:25:31 | × | deadmarshal quits (~deadmarsh@95.38.113.90) (Ping timeout: 256 seconds) |
| 18:25:58 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 18:26:54 | <justsomeguy> | What do you guys think of this article "When You Should Use Lsts in Haskell (Mostly, You Should Not)" https://www.imn.htwk-leipzig.de/~waldmann/etc/untutorial/list-or-not-list/ |
| 18:27:34 | <EvanR> | list is good for composing computations and bad for big data storage |
| 18:28:05 | <EvanR> | in haskell it's cool because those two are not the same |
| 18:28:19 | → | burnsidesLlama joins (~burnsides@dhcp168-031.wadham.ox.ac.uk) |
| 18:28:37 | <geekosaur> | in many ways it's best to think of a list as a loop rather than a data structure |
| 18:29:11 | <c_wraith> | Honestly, I think most list aversion is overblown, like string aversion. Ok, those are the same thing. |
| 18:29:24 | <c_wraith> | Most of the time, it doesn't matter. |
| 18:29:29 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 18:29:39 | <wavemode> | lists, like any data structure you use, need to be evaluated in terms of their asymptotics. lists have O(1) cons but O(N) most everything else, so you should only use them if that's acceptable for your use case |
| 18:30:14 | <geekosaur> | yeh, I have a decent amount of code locally that just uses lists because they're easy and they don't sling around anywhere near enough data to justify something else |
| 18:30:18 | <c_wraith> | Haskell lists have other really nice properties, like being easy to produce and consume in O(1) space |
| 18:30:58 | <wavemode> | many people also don't like relying on list fusion :p |
| 18:31:06 | <c_wraith> | that doesn't rely on fusion! |
| 18:31:14 | <c_wraith> | fusion is only a constant-factor improvement |
| 18:31:36 | <geekosaur> | and xmonad has gotten by for over a decade with lists, mainly because it's extremely rare to have enough windows open for it to matter |
| 18:31:53 | <ski> | (zipper) |
| 18:32:02 | <c_wraith> | I can't imagine successfully using a computer with several thousand open windows :) |
| 18:33:08 | <EvanR> | browser tabs on the other hand |
| 18:33:08 | → | k8yun joins (~k8yun@198-48-158-40.cpe.pppoe.ca) |
| 18:33:14 | <Cheery> | I keep forgetting I got windows open and there's plenty of them behind. |
| 18:33:42 | <monochrom> | I would support "When You Should Use Lists in Any Language at All (Mostly You Shouldn't)". |
| 18:34:29 | <monochrom> | OK, I need to correct it to "When You Should Use Lists for Data in Any Language at All (Mostly You Shouldn't)". |
| 18:34:32 | <ski> | .. perhaps if you indexed your windows, possibly adding tags, and allowed searching for the one you wanted ? |
| 18:34:39 | <c_wraith> | You should probably use lists more in Haskell than most languages |
| 18:34:40 | <EvanR> | how about "for some x, when you should use data structure x in any language at all mostly you shouldn't" |
| 18:35:21 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 18:35:51 | <EvanR> | there's the idea of "the one true number type" and "the one true container type" in many languages, an ideal form that the wise designers attempted to approximate |
| 18:36:05 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 18:36:13 | <geekosaur> | we even have a module supporting that (TagWindows) |
| 18:36:26 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 18:36:38 | <EvanR> | mostly you shouldn't use the one true number type or container type |
| 18:36:50 | <maerwald> | thanks to the "lists are great" mentality, we still have `type String = [Char]` |
| 18:37:00 | <c_wraith> | maerwald: and there's nothing wrong with that |
| 18:37:26 | <maerwald> | right... I guess that's why I'm putting so much time into removing `type FilePath = String` :D |
| 18:37:33 | <justsomeguy> | I guess this discussion applies to any language with singly-linked lists. The article gives a general rule of thumb that lists should usually not be used where out-of-order access is required. I think that's reasonable. It also claims that lists don't properly segregate iteration and data representation, which I'm undecided about either way. |
| 18:37:43 | <c_wraith> | now there is a *lot* wrong with FilePath = String |
| 18:37:48 | <c_wraith> | because that's just plain false |
| 18:38:23 | <EvanR> | church encoding wonders why you'd want to segregate iteration and representation? xD |
| 18:38:23 | <maerwald> | exactly... people use what is convenient, not what is correct |
| 18:38:42 | <maerwald> | lists happen to be convenient in haskell |
| 18:38:46 | <maerwald> | so they're all over the place |
| 18:38:46 | <Cheery> | why [Char] and not [Integer]? |
| 18:39:00 | × | Jing quits (~hedgehog@240e:390:7c53:a7e1:8d1b:5472:3cae:e50c) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 18:39:13 | <wavemode> | what's that Church and state quote |
| 18:39:22 | <maerwald> | Cheery: lol |
| 18:39:32 | <EvanR> | haskell could use more convenience I think, we've got enough correctness to last until end of nuclear winter |
| 18:39:41 | <maerwald> | EvanR: where? |
| 18:39:57 | <ski> | @quote church.and.state |
| 18:39:58 | <lambdabot> | shapr says: Haskell separates Church and state! |
| 18:40:06 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 18:40:17 | <ski> | @quote separation.of |
| 18:40:17 | <lambdabot> | GuySteele says: Some people prefer not to commingle the functional, lambda-calculus part of a language with the parts that do side effects. It seems they believe in the separation of Church and |
| 18:40:17 | <lambdabot> | state. |
| 18:40:40 | <ski> | @quote are.dual |
| 18:40:40 | <lambdabot> | ski says: I'd rather say that in Haskell, Church and State are dual |
| 18:41:10 | <EvanR> | an outmoded identification of state with IO maybe |
| 18:41:49 | <ski> | (Church closely related to `forall o. (a -> o) -> o', State to `exists s. (s,s -> a)') |
| 18:42:43 | <ski> | (or `forall o. (f o -> o) -> o' vs. `exists s. (s,s -> f s)', with recursion) |
| 18:43:00 | <monochrom> | If one day I dualize System F that way, may I call it System E? :) |
| 18:44:12 | <ski> | hm, curious (going backwards in alphabet) .. i guess so |
| 18:44:50 | <monochrom> | An explanation is that E stands for "exists". |
| 18:45:01 | <ski> | yes, i gathered :) |
| 18:45:06 | <Cheery> | anyone knows if there are tricks to implementing typeclasses? |
| 18:45:11 | <ski> | "F" for "forall" ? |
| 18:45:20 | <geekosaur> | Cheery, why? |
| 18:45:37 | <ski> | <Cheery> I'm in middle of implementing typeclasses in my own runtime/compiler. Any ideas or advices that I might miss otherwise? |
| 18:45:40 | <geekosaur> | or what kinds of tricks are you thinking of? in ghc a typeclass instance is just a record of functions |
| 18:45:45 | <monochrom> | I don't know whether Girard or Reynolds meant "F" to stand for "for all", but it works revisionistly! |
| 18:46:04 | <geekosaur> | all they "need" to be is a type witness, but a record of implementations is a convenient witness |
| 18:46:07 | <ski> | backronyms ftw ! |
| 18:47:18 | <geekosaur> | and can be optimized away via inlining in many cases, since polymorphic recursion isn't that common |
| 18:48:10 | → | MoC joins (~moc@user/moc) |
| 18:48:23 | <ski> | (or existentials) |
| 18:49:11 | <ski> | (or higher-rank constraints) |
| 18:49:21 | → | econo joins (uid147250@user/econo) |
| 18:51:09 | → | oscurochu joins (~oscurochu@097-096-050-227.res.spectrum.com) |
| 18:52:24 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) (Remote host closed the connection) |
| 18:53:14 | <Cheery> | well I'm implementing it in a runtime, using rpython. |
| 18:55:26 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) |
| 18:55:58 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 18:56:55 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection) |
| 18:57:18 | × | doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Remote host closed the connection) |
| 18:59:22 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 18:59:25 | <Cheery> | implicits are an another nice thing, and these resemble those a bit. |
| 19:00:50 | → | doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
| 19:00:59 | × | alp quits (~alp@user/alp) (Ping timeout: 256 seconds) |
| 19:01:23 | <EvanR> | how type classes are different from implicits |
| 19:01:39 | <EvanR> | Type Classes vs The World xD |
| 19:03:19 | <Cheery> | well.. implicits are passed by name, eg. you got same name {g} somewhere, that hidden variable fills up slots elsewhere. |
| 19:04:29 | ski | . o O ( "What's in a name? That which we call a rose / By any other name would smell as sweet" ) |
| 19:05:17 | <ski> | (it would be nice to be able to rename implicits, on import (and export)) |
| 19:05:47 | × | whound quits (~dust@2405:204:5488:ef4c:54b6:3467:52f3:e9f2) (Quit: Konversation terminated!) |
| 19:05:50 | <EvanR> | implicits give you access to the dictionary for whatever nefarious purposes, where as there's at most 1 instance for a given type class combination |
| 19:06:04 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 19:06:17 | <EvanR> | globally |
| 19:06:40 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 19:07:54 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) (Remote host closed the connection) |
| 19:08:53 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 19:09:01 | → | o-90 joins (~o-90@gateway/tor-sasl/o-90) |
| 19:10:37 | × | messier102 quits (~messier10@user/messier102) (Ping timeout: 240 seconds) |
| 19:10:38 | × | doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Read error: Connection reset by peer) |
| 19:11:25 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 19:23:11 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4) |
| 19:23:33 | <Cheery> | I can adjust my type inference/checker to elaborate, so it can add app(name,Y) around name, to handle constraints. |
| 19:24:06 | × | o-90 quits (~o-90@gateway/tor-sasl/o-90) (Ping timeout: 276 seconds) |
| 19:24:40 | → | doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
| 19:25:11 | → | emf joins (~emf@162.218.217.190) |
| 19:29:00 | → | emf_ joins (~emf@2620:10d:c090:400::5:9a32) |
| 19:29:52 | × | emf quits (~emf@162.218.217.190) (Ping timeout: 250 seconds) |
| 19:30:16 | → | vicfred joins (~vicfred@user/vicfred) |
| 19:30:42 | × | rusrushal13 quits (~rusrushal@2409:4056:9:1708:2c2:74fb:7af9:78dc) (Ping timeout: 256 seconds) |
| 19:31:20 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c18f:7483:538b:1622) |
| 19:34:07 | → | slack1256 joins (~slack1256@191.125.227.215) |
| 19:34:35 | <Cheery> | that way the generalize/instantiate also stays simple.. when the constraint is just a parameter to be passed implicitly. |
| 19:35:04 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 19:35:57 | × | slac93974 quits (~slack1256@186.11.30.195) (Ping timeout: 240 seconds) |
| 19:38:24 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 19:39:38 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 19:41:35 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 19:41:53 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 19:45:04 | × | wavemode quits (~wavemode@2601:241:0:fc90:da0f:27a6:a9a0:a864) (Quit: Client closed) |
| 19:48:10 | → | marijan joins (~marijanma@2001:470:69fc:105::1:6cce) |
| 19:50:52 | × | bgamari quits (~bgamari@2001:470:e438::1) (Remote host closed the connection) |
| 19:51:14 | → | lavaman joins (~lavaman@98.38.249.169) |
| 19:52:35 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 19:52:54 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 19:53:27 | → | bgamari joins (~bgamari@70.16.102.89) |
| 19:53:35 | × | oscurochu quits (~oscurochu@097-096-050-227.res.spectrum.com) (Ping timeout: 256 seconds) |
| 19:53:53 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 19:55:18 | → | chomwitt joins (~chomwitt@2a02:587:dc07:dd00:12c3:7bff:fe6d:d374) |
| 19:55:39 | → | TranquilEcho joins (~grom@user/tranquilecho) |
| 19:55:57 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 19:59:20 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 20:00:55 | → | neurocyte0917090 joins (~neurocyte@IP-212232080188.dynamic.medianet-world.de) |
| 20:00:55 | × | neurocyte0917090 quits (~neurocyte@IP-212232080188.dynamic.medianet-world.de) (Changing host) |
| 20:00:55 | → | neurocyte0917090 joins (~neurocyte@user/neurocyte) |
| 20:01:31 | × | kimjetwav quits (~user@2607:fea8:2363:8f00:8299:55f4:a45f:d9c3) (Remote host closed the connection) |
| 20:03:14 | × | TranquilEcho quits (~grom@user/tranquilecho) (Quit: WeeChat 2.8) |
| 20:04:57 | × | juhp quits (~juhp@128.106.188.82) (Ping timeout: 240 seconds) |
| 20:07:43 | → | juhp joins (~juhp@128.106.188.82) |
| 20:08:25 | × | zer0bitz quits (~zer0bitz@2001:2003:f74d:b800:39e9:9943:8cd0:5689) (Ping timeout: 256 seconds) |
| 20:09:29 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
| 20:09:36 | <monochrom> | Dear lyxia: Define "data B a = F | T", this can be easily made a functor and contravariant functor. With that, phatom F = F, phatom T = T. However, "neg T = F; neg F = T" has the same type as phantom, B a -> B b, and still do different things. |
| 20:09:53 | → | deadmarshal joins (~deadmarsh@95.38.113.90) |
| 20:11:09 | × | kaph quits (~kaph@net-2-47-208-144.cust.vodafonedsl.it) (Read error: Connection reset by peer) |
| 20:12:02 | → | tatarqa joins (~kli@ip-89-177-122-45.net.upcbroadband.cz) |
| 20:13:14 | → | whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com) |
| 20:18:29 | → | kaph joins (~kaph@net-2-47-208-144.cust.vodafonedsl.it) |
| 20:20:10 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 20:20:19 | → | cynomys joins (~cynomys@user/cynomys) |
| 20:20:56 | → | lavaman joins (~lavaman@98.38.249.169) |
| 20:21:29 | → | califax joins (~califax@user/califx) |
| 20:21:47 | → | slac63591 joins (~slack1256@186.11.28.67) |
| 20:22:05 | × | fendor quits (~fendor@91.141.44.253.wireless.dyn.drei.com) (Remote host closed the connection) |
| 20:24:11 | × | slack1256 quits (~slack1256@191.125.227.215) (Ping timeout: 256 seconds) |
| 20:27:00 | → | ardell joins (~ardell@user/ardell) |
| 20:27:07 | × | ardell quits (~ardell@user/ardell) (Client Quit) |
| 20:28:04 | → | ardell joins (~ardell@user/ardell) |
| 20:28:59 | × | xff0x quits (~xff0x@2001:1a81:5244:c900:da3d:85a0:8128:63) (Ping timeout: 250 seconds) |
| 20:29:52 | → | xff0x joins (~xff0x@2001:1a81:5244:c900:2c67:9c0a:1653:d1e3) |
| 20:31:00 | × | [exa] quits (exa@user/exa/x-3587197) (Remote host closed the connection) |
| 20:32:43 | → | jonathanx_ joins (~jonathan@h-178-174-176-109.a357.priv.bahnhof.se) |
| 20:36:39 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 256 seconds) |
| 20:36:59 | × | doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 256 seconds) |
| 20:37:52 | <monochrom> | However! I reckon that if you seek also being parametric in the functor f, things may be more unique. |
| 20:37:54 | → | MatthiasG2 joins (~matthias@i6DFA038C.versanet.de) |
| 20:39:17 | × | tavares quits (~tavares@user/tavares) (Ping timeout: 240 seconds) |
| 20:39:38 | <monochrom> | "This is going to be fun" |
| 20:40:01 | → | vandito joins (~vandito@131.0.224.113) |
| 20:42:41 | × | tatarqa quits (~kli@ip-89-177-122-45.net.upcbroadband.cz) (Quit: Leaving) |
| 20:45:55 | × | vandito quits (~vandito@131.0.224.113) (Quit: vandito) |
| 20:46:30 | → | tavares joins (~tavares@187.19.213.50) |
| 20:49:49 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 20:50:03 | <zzz> | at https://hoggle.haskell.org it reads "... The Hoogle manual contains more details, including further details on search |
| 20:50:06 | <zzz> | queries, how to install Hoogle as a command line application and how to |
| 20:50:10 | <zzz> | integrate Hoogle with Firefox/Emacs/Vim etc." |
| 20:50:44 | <zzz> | but i can't seem to find anything about vim |
| 20:51:40 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 20:52:30 | × | shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection) |
| 20:54:52 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 20:59:39 | <lyxia> | monochrom: I meant that for the specific implementation in Data.Contravariant.Functor. To generalize, you'd want to add the law (phantom @f @a @a = id) to rule out such counterexamples. |
| 21:00:36 | × | slac63591 quits (~slack1256@186.11.28.67) (Remote host closed the connection) |
| 21:01:19 | <ski> | `phantom @f @a @a' ? |
| 21:01:36 | → | [exa] joins (exa@user/exa/x-3587197) |
| 21:12:54 | → | yauhsien joins (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) |
| 21:15:55 | → | wavemode joins (~wavemode@2601:241:0:fc90:e107:b5f8:8bcd:8e3a) |
| 21:16:17 | × | tavares quits (~tavares@187.19.213.50) (Ping timeout: 240 seconds) |
| 21:17:17 | × | yauhsien quits (~yauhsien@61-231-25-133.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 21:17:27 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 21:19:11 | <sprout_> | https://twitter.com/andre_videla/status/1489680094339682308?s=20&t=FG02BMLwxD2K_Sci1ulVag |
| 21:20:03 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 256 seconds) |
| 21:22:25 | <lyxia> | ski: TypeApplications for phantom :: forall f a b. (...) => f a -> f b ? |
| 21:23:26 | <ski> | i'd presume so ? |
| 21:23:47 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 256 seconds) |
| 21:23:53 | → | vandito joins (~vandito@131.0.224.113) |
| 21:24:11 | <ski> | oh, actually, just realized i misread you. nevermind then, carry on |
| 21:25:07 | × | g quits (x@libera/staff/glguy) (Quit: g) |
| 21:25:08 | × | glguy quits (x@libera/staff/glguy) (Quit: Quit) |
| 21:25:46 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 21:26:02 | × | vandito quits (~vandito@131.0.224.113) (Client Quit) |
| 21:34:57 | → | tavares joins (~tavares@187.19.213.50) |
| 21:48:03 | × | doxen quits (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
| 21:50:29 | → | glguy joins (x@libera/staff/glguy) |
| 21:53:20 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 21:53:24 | <monochrom> | Wow conformal mappings of commuting diagrams |
| 21:57:50 | <byorgey> | DDDUDUDUUDDDUUUU <--- what monadic zombies say when they come for your brains |
| 21:59:43 | <monochrom> | Are humans data as to zombies are co-data? |
| 22:03:00 | <EvanR> | human mortal, data finite. Zombie potentially immortal but they can still be terminated (headshot) |
| 22:03:19 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 22:03:30 | <EvanR> | so yes |
| 22:03:35 | <monochrom> | :) |
| 22:04:38 | <EvanR> | michael myers would have to be Stream HalloweenSequels though |
| 22:05:06 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 22:07:17 | × | tavares quits (~tavares@187.19.213.50) (Ping timeout: 240 seconds) |
| 22:08:07 | × | glguy quits (x@libera/staff/glguy) (Quit: Quit) |
| 22:11:08 | → | glguy joins (x@libera/staff/glguy) |
| 22:13:31 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 22:13:41 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 22:14:25 | × | glguy quits (x@libera/staff/glguy) (Read error: Connection reset by peer) |
| 22:16:42 | → | glguy joins (x@libera/staff/glguy) |
| 22:18:00 | × | deadmarshal quits (~deadmarsh@95.38.113.90) (Ping timeout: 250 seconds) |
| 22:20:53 | → | jgeerds joins (~jgeerds@55d4a547.access.ecotel.net) |
| 22:22:12 | → | CiaoSen joins (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 22:22:17 | → | deadmarshal joins (~deadmarsh@95.38.114.62) |
| 22:22:42 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:23:34 | × | michalz2 quits (~michalz2@185.246.204.89) (Remote host closed the connection) |
| 22:23:34 | × | michalz quits (~michalz@185.246.204.75) (Remote host closed the connection) |
| 22:23:45 | × | MatthiasG2 quits (~matthias@i6DFA038C.versanet.de) (Ping timeout: 256 seconds) |
| 22:25:36 | → | MatthiasG2 joins (~matthias@i6DFA03D9.versanet.de) |
| 22:28:44 | × | waleee quits (~waleee@h-98-128-229-110.NA.cust.bahnhof.se) (Quit: WeeChat 3.4) |
| 22:28:44 | × | [exa] quits (exa@user/exa/x-3587197) (Read error: Connection reset by peer) |
| 22:29:45 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 256 seconds) |
| 22:29:57 | × | zebrag quits (~chris@user/zebrag) (Ping timeout: 240 seconds) |
| 22:30:22 | → | zebrag joins (~chris@user/zebrag) |
| 22:31:13 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 22:33:09 | × | nitrix quits (~nitrix@user/nitrix) (Ping timeout: 256 seconds) |
| 22:34:17 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 256 seconds) |
| 22:34:39 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 22:36:00 | <qrpnxz> | i'm using ghcup, 9.0 working fine, 9.2 not finding modules i install for some reason, i can't figure out the difference |
| 22:37:00 | <monochrom> | Library binaries built for one GHC version cannot be reused by another GHC version. This has always been the case. |
| 22:37:10 | → | nitrix joins (~nitrix@user/nitrix) |
| 22:37:44 | <qrpnxz> | i did reinstall the libs with cabal after switching, they have entries in the environment file for 9.2 |
| 22:37:51 | <qrpnxz> | idk if there's something else i have to do |
| 22:38:18 | <monochrom> | Steve Jobs was greatly inspired by this, and invented the slogan "This changes everything. Again." at every iPhone release. >:) |
| 22:40:54 | <qrpnxz> | even on `cabal repl` not able to load libraries i have imported on my .ghci |
| 22:42:29 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 22:43:02 | → | gawen joins (~gawen@user/gawen) |
| 22:43:11 | <maerwald> | qrpnxz: are you on archlinux? |
| 22:43:27 | <qrpnxz> | i'm on Debian bookworm |
| 22:43:35 | × | gawen_ quits (~gawen@user/gawen) (Ping timeout: 256 seconds) |
| 22:43:40 | <qrpnxz> | (testing) |
| 22:44:29 | <qrpnxz> | cabal/store/ghc-9.2.1 has packages |
| 22:45:03 | × | deadmarshal quits (~deadmarsh@95.38.114.62) (Ping timeout: 256 seconds) |
| 22:49:15 | <maerwald> | great... 9.2.1 needs libnuma again |
| 22:49:24 | <maerwald> | build system bugs from 5 years ago reappear |
| 22:49:33 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 22:49:35 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 22:50:17 | <qrpnxz> | compile bot on a discord server i use can't compile haskell for a libnuma thing |
| 22:50:20 | <qrpnxz> | idk what it is |
| 22:51:35 | × | nitrix quits (~nitrix@user/nitrix) (Quit: ZNC 1.8.2 - https://znc.in) |
| 22:51:46 | <maerwald> | some optional library turned mandatory due to a build system bug |
| 22:52:06 | <qrpnxz> | shucks |
| 22:52:34 | <qrpnxz> | ok, i'm just gonna go back to 9.0 because i can't figure this out. |
| 22:52:34 | → | nitrix joins (~nitrix@user/nitrix) |
| 22:55:38 | <maerwald> | 9.2.1 works on bookworm here |
| 22:55:52 | <maerwald> | I tried `cabal repl --build-depends aeson` and could import modules |
| 22:57:47 | <qrpnxz> | with 9.0 i can just do import, then compile like `ghc main.hs` and it works, i can import stuff in my .ghci, and it will just work, sure i could create a whole cabal project, that might work (hopefully), but i don't want to bother right now when 9.0 just works |
| 22:58:14 | <qrpnxz> | no --build-depends required in 9.0 |
| 22:59:05 | <maerwald> | use build-depends |
| 22:59:06 | <qrpnxz> | i think i remember having to add the libs to my environment to get it to do that, but they are already there, so i can't think of anything else |
| 23:01:14 | ← | qrpnxz parts (abc4f95c31@user/qrpnxz) (Disconnected: closed) |
| 23:01:23 | → | qrpnxz joins (abc4f95c31@user/qrpnxz) |
| 23:04:59 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 23:08:28 | → | soxen joins (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 23:09:35 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 23:13:02 | → | lavaman joins (~lavaman@98.38.249.169) |
| 23:13:53 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 23:14:16 | × | vysn quits (~vysn@user/vysn) (Remote host closed the connection) |
| 23:15:43 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 23:17:17 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 23:21:42 | × | nitrix quits (~nitrix@user/nitrix) (Quit: ZNC 1.8.2 - https://znc.in) |
| 23:24:10 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 23:25:20 | × | jrm quits (~jrm@156.34.173.250) (Quit: ciao) |
| 23:25:34 | × | adnaahm quits (~adnaahm@host-57-net-67-160-119.mobilinkinfinity.net.pk) (Remote host closed the connection) |
| 23:26:39 | → | jrm joins (~jrm@156.34.173.250) |
| 23:30:32 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 23:32:38 | × | tomboy64 quits (~tomboy64@user/tomboy64) (Quit: Off to see the wizard.) |
| 23:33:24 | → | tomboy64 joins (~tomboy64@user/tomboy64) |
| 23:35:34 | → | nosewings joins (~ngpc@cpe-68-206-102-85.satx.res.rr.com) |
| 23:44:33 | × | soxen quits (~bbrahms@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
| 23:44:54 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 23:45:41 | × | ardell quits (~ardell@user/ardell) (Quit: Konversation terminated!) |
| 23:48:55 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:52:32 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 23:53:41 | → | deadmarshal joins (~deadmarsh@95.38.114.62) |
| 23:56:02 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 23:57:02 | × | qrpnxz quits (abc4f95c31@user/qrpnxz) (Ping timeout: 268 seconds) |
| 23:57:41 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Quit: WeeChat 3.4) |
| 23:58:23 | × | deadmarshal quits (~deadmarsh@95.38.114.62) (Ping timeout: 256 seconds) |
All times are in UTC on 2022-02-04.