Logs on 2023-02-15 (liberachat/#haskell)
| 00:08:56 | → | jargon joins (~jargon@184.101.95.90) |
| 00:09:38 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:15:05 | → | merijn joins (~merijn@86.86.29.250) |
| 00:17:24 | × | AWizzArd_ quits (~code@gehrels.uberspace.de) (Changing host) |
| 00:17:24 | → | AWizzArd_ joins (~code@user/awizzard) |
| 00:17:31 | AWizzArd_ | is now known as AWizzArd |
| 00:20:09 | × | Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:21:09 | × | merijn quits (~merijn@86.86.29.250) (Ping timeout: 252 seconds) |
| 00:22:13 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 00:22:46 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 00:23:07 | → | mauke[i]_ joins (~mauke@user/mauke) |
| 00:24:31 | × | mauke[i] quits (~mauke@user/mauke) (Ping timeout: 248 seconds) |
| 00:24:32 | mauke[i]_ | is now known as mauke[i] |
| 00:25:58 | <Clint> | is there something that applies a function recursively until the output equals the input? |
| 00:28:34 | × | werneta quits (~werneta@137.79.195.231) (Remote host closed the connection) |
| 00:28:56 | <hpc> | do you want fix, or (==) specifically? |
| 00:29:04 | <int-e> | :t fst . head . dropWhile (uncurry (/=)) . ap zip tail . iterate ?f |
| 00:29:05 | <lambdabot> | (Eq a, ?f::a -> a) => a -> a |
| 00:29:28 | <int-e> | (I wouldn't use that; explicit recursion will be far more readable) |
| 00:30:49 | <int-e> | anyway, it's not a `base` function |
| 00:30:54 | <Clint> | hpc: (==) specifically |
| 00:30:59 | <Clint> | okay, fair enough |
| 00:31:26 | <int-e> | Though I'd bet that there are half a dozen hackage packages defining this. |
| 00:31:42 | <int-e> | (But no particular one comes to mind.) |
| 00:32:08 | <Clint> | clearly i have no idea how to search for this |
| 00:32:17 | <hpc> | maybe for numerical functions specifically, to do stuff like newton's method? |
| 00:32:27 | <int-e> | @hoogle Eq a => (a -> a) -> a -> a |
| 00:32:28 | <lambdabot> | Data.Generics.SYB mkT :: (a -> a) -> (a -> a) |
| 00:32:28 | <lambdabot> | Prelude ($) :: forall r a (b :: TYPE r) . (a -> b) -> a -> b |
| 00:32:28 | <lambdabot> | Prelude ($!) :: forall r a (b :: TYPE r) . (a -> b) -> a -> b |
| 00:32:56 | <int-e> | Right, that's not a very decriptive type |
| 00:33:34 | → | master_ joins (~master@user/masterbuilder) |
| 00:35:11 | → | nehsou^ joins (~nehsou@c-24-30-76-89.hsd1.ga.comcast.net) |
| 00:36:49 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 00:37:51 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 00:39:26 | → | zaquest joins (~notzaques@5.130.79.72) |
| 00:42:10 | × | zeenk quits (~zeenk@2a02:2f04:a214:1e00::7fe) (Quit: Konversation terminated!) |
| 00:43:58 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 00:49:00 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds) |
| 00:49:15 | × | acidjnk quits (~acidjnk@p200300d6e715c408e15a683b71611690.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 00:51:41 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 00:59:07 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 00:59:07 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 00:59:07 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:01:18 | → | gpncarl_ joins (~gpncarl@210.12.195.6) |
| 01:10:01 | × | zmt01 quits (~zmt00@user/zmt00) (Read error: Connection reset by peer) |
| 01:10:27 | → | zmt01 joins (~zmt00@user/zmt00) |
| 01:10:36 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Remote host closed the connection) |
| 01:10:52 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:10 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 01:12:18 | × | mei quits (~mei@user/mei) (Remote host closed the connection) |
| 01:13:04 | × | Angelz quits (Angelz@angelz.oddprotocol.org) (Ping timeout: 252 seconds) |
| 01:13:40 | × | manwithluck quits (~manwithlu@194.177.28.192) (Ping timeout: 260 seconds) |
| 01:15:16 | → | manwithluck joins (~manwithlu@194.177.28.192) |
| 01:16:15 | × | [exa] quits (~exa@user/exa/x-3587197) (Ping timeout: 248 seconds) |
| 01:16:59 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:18:07 | → | [exa] joins (~exa@srv3n.blesmrt.net) |
| 01:18:22 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 01:18:42 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 01:20:07 | → | mei joins (~mei@user/mei) |
| 01:21:18 | <master_> | hello, what's the status of dependent haskell exactly? |
| 01:21:38 | master_ | is now known as themasterbuilder |
| 01:22:17 | <geekosaur> | stuck |
| 01:23:23 | themasterbuilder | is now known as masterbuilder |
| 01:23:42 | <masterbuilder> | ah :/ so don't hold your breath? |
| 01:24:13 | <geekosaur> | the very first phase of it (`forall x ->`) has run into issues https://github.com/ghc-proposals/ghc-proposals/issues/558 |
| 01:24:17 | <geekosaur> | correct |
| 01:24:47 | <masterbuilder> | thanks I'll have a read |
| 01:29:14 | × | ddellacosta quits (~ddellacos@146.70.166.203) (Quit: WeeChat 3.8) |
| 01:30:44 | → | xbarnett joins (~xbarnett@89.44.10.165) |
| 01:32:50 | → | ddellacosta joins (~ddellacos@146.70.166.203) |
| 01:34:19 | → | larrythecow joins (~Rahul_San@user/oldfashionedcow) |
| 01:34:27 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Ping timeout: 255 seconds) |
| 01:38:52 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:42:32 | → | telser joins (~quassel@user/telser) |
| 01:42:50 | × | npmania quits (~Thunderbi@45.8.223.203) (Ping timeout: 260 seconds) |
| 01:43:20 | → | fmlatghor joins (~lcoogan@c-73-177-167-149.hsd1.va.comcast.net) |
| 01:43:51 | × | johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
| 01:43:52 | × | telser_ quits (~quassel@user/telser) (Ping timeout: 248 seconds) |
| 01:43:52 | → | Angelz joins (Angelz@2605:6400:30:fc15:9bd1:2217:41cd:bb15) |
| 01:44:01 | × | xff0x quits (~xff0x@2405:6580:b080:900:a328:3e4d:f447:d561) (Ping timeout: 252 seconds) |
| 01:45:01 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:46:22 | larrythecow | is now known as oldfashionedcow |
| 01:49:51 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 255 seconds) |
| 01:55:24 | <sclv> | is Niklas Hambüchen ever on irc? |
| 01:55:58 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
| 01:58:02 | × | shailangsa_ quits (~shailangs@host165-120-169-78.range165-120.btcentralplus.com) (Remote host closed the connection) |
| 02:01:05 | × | xbarnett quits (~xbarnett@89.44.10.165) (Quit: Leaving) |
| 02:10:32 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 02:12:50 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 02:17:24 | → | merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) |
| 02:19:33 | × | zaquest quits (~notzaques@5.130.79.72) (Ping timeout: 255 seconds) |
| 02:21:50 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 02:22:22 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds) |
| 02:28:00 | → | rnat joins (uid73555@2a03:5180:f:2::1:1f53) |
| 02:28:09 | × | thongpv quits (~thongpv87@2402:9d80:3bb:7b3a:42c5:d1db:9622:c029) (Remote host closed the connection) |
| 02:29:59 | → | xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
| 02:32:36 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds) |
| 02:32:45 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 02:34:11 | → | thongpv joins (~thongpv87@2402:9d80:3bb:7b3a:fd19:6778:f8a1:cf50) |
| 02:34:59 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 252 seconds) |
| 02:37:06 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 255 seconds) |
| 02:37:33 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 255 seconds) |
| 02:39:52 | × | thongpv quits (~thongpv87@2402:9d80:3bb:7b3a:fd19:6778:f8a1:cf50) (Remote host closed the connection) |
| 02:40:00 | → | shailangsa joins (~shailangs@host165-120-169-78.range165-120.btcentralplus.com) |
| 02:42:24 | → | thongpv joins (~thongpv87@2402:9d80:3bb:7b3a:54e2:c98:72f3:f791) |
| 02:42:33 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 02:51:37 | × | merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 02:55:29 | → | gmg joins (~user@user/gehmehgeh) |
| 02:56:11 | × | thongpv quits (~thongpv87@2402:9d80:3bb:7b3a:54e2:c98:72f3:f791) (Remote host closed the connection) |
| 02:58:14 | × | gehmehgeh quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds) |
| 03:01:17 | → | flo[m] joins (~flosansps@2001:470:69fc:105::1:c22d) |
| 03:08:32 | → | razetime joins (~Thunderbi@117.193.1.74) |
| 03:09:10 | × | dtman34 quits (~dtman34@2601:447:d000:93c9:4f13:e7d1:81fd:2aa6) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 03:09:30 | → | dtman34 joins (~dtman34@2601:447:d000:93c9:45e0:f7b0:cefa:26ff) |
| 03:16:24 | → | jmorris joins (uid537181@2a03:5180:f:5::8:325d) |
| 03:22:00 | → | gpncarl joins (~gpncarl@210.12.195.6) |
| 03:23:34 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 03:23:49 | × | thegeekinside quits (~thegeekin@189.180.97.223) (Ping timeout: 246 seconds) |
| 03:24:21 | × | gpncarl_ quits (~gpncarl@210.12.195.6) (Ping timeout: 255 seconds) |
| 03:24:47 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 248 seconds) |
| 03:28:52 | → | gentauro joins (~gentauro@user/gentauro) |
| 03:36:28 | → | ravamrt joins (~ravamrt@112.134.192.214) |
| 03:42:53 | × | ravamrt quits (~ravamrt@112.134.192.214) (Quit: Leaving.) |
| 03:44:19 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) |
| 03:44:42 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:4e8c::) (Quit: The Lounge - https://thelounge.chat) |
| 03:46:05 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:4e8c::) |
| 03:46:19 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 03:47:32 | → | ravamrt joins (~ravamrt@112.134.192.214) |
| 03:53:53 | × | razetime quits (~Thunderbi@117.193.1.74) (Remote host closed the connection) |
| 03:54:05 | × | td_ quits (~td@i5387090E.versanet.de) (Ping timeout: 260 seconds) |
| 03:55:31 | → | Guest95 joins (~Guest95@202.67.40.15) |
| 03:55:51 | → | td_ joins (~td@i53870935.versanet.de) |
| 03:56:42 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 03:58:38 | → | falafel joins (~falafel@2607:fb91:143f:e47f:f08f:f6f1:9d72:e3df) |
| 04:01:41 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
| 04:01:46 | <sm> | I seem to remember a nh2 |
| 04:04:05 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 04:12:57 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 04:26:24 | → | freeside joins (~mengwong@103.252.202.170) |
| 04:27:12 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Ping timeout: 248 seconds) |
| 04:31:32 | → | notzmv joins (~zmv@user/notzmv) |
| 04:33:49 | × | bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 04:34:29 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.8) |
| 04:36:25 | → | jinsun joins (~jinsun@user/jinsun) |
| 04:37:31 | × | rnat quits (uid73555@2a03:5180:f:2::1:1f53) (Quit: Connection closed for inactivity) |
| 04:37:36 | × | falafel quits (~falafel@2607:fb91:143f:e47f:f08f:f6f1:9d72:e3df) (Ping timeout: 255 seconds) |
| 04:38:11 | → | razetime joins (~Thunderbi@117.193.1.74) |
| 04:44:28 | → | mbuf joins (~Shakthi@49.204.133.116) |
| 04:47:56 | → | merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) |
| 04:48:17 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 04:49:11 | → | gmg joins (~user@user/gehmehgeh) |
| 04:49:52 | → | andrewboltachev joins (~andrey@178.141.125.176) |
| 04:50:53 | → | Togooroo joins (~lalune@216.73.163.231) |
| 04:51:08 | × | Guest95 quits (~Guest95@202.67.40.15) (Ping timeout: 260 seconds) |
| 04:53:46 | × | merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 04:55:16 | × | Vajb quits (~Vajb@2001:999:404:9516:d621:6cbe:c71e:5686) (Read error: Connection reset by peer) |
| 04:56:14 | → | Vajb joins (~Vajb@88.195.165.27) |
| 04:57:52 | ← | andrewboltachev parts (~andrey@178.141.125.176) () |
| 05:09:50 | × | hounded quits (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) (Remote host closed the connection) |
| 05:09:50 | × | hounded_woodstoc quits (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) (Remote host closed the connection) |
| 05:09:50 | × | hounded_1969 quits (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) (Read error: Connection reset by peer) |
| 05:12:15 | × | aweinstock quits (~aweinstoc@cpe-74-76-189-75.nycap.res.rr.com) (Ping timeout: 268 seconds) |
| 05:13:47 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 05:15:57 | × | ddellacosta quits (~ddellacos@146.70.166.203) (Ping timeout: 252 seconds) |
| 05:19:05 | → | aweinstock joins (~aweinstoc@cpe-74-76-189-75.nycap.res.rr.com) |
| 05:26:12 | × | jmorris quits (uid537181@2a03:5180:f:5::8:325d) (Quit: Connection closed for inactivity) |
| 05:31:21 | × | Vajb quits (~Vajb@88.195.165.27) (Ping timeout: 252 seconds) |
| 05:32:15 | → | Vajb joins (~Vajb@2001:999:404:9516:d621:6cbe:c71e:5686) |
| 05:32:22 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 05:32:22 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 05:32:22 | → | wroathe joins (~wroathe@user/wroathe) |
| 05:35:40 | → | falafel joins (~falafel@2607:fb91:143f:e47f:92a:83c4:99b:657e) |
| 05:35:49 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 05:36:46 | → | gmg joins (~user@user/gehmehgeh) |
| 05:39:48 | × | jargon quits (~jargon@184.101.95.90) (Ping timeout: 255 seconds) |
| 05:45:22 | → | trev joins (~trev@user/trev) |
| 05:55:33 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 06:02:17 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 06:03:31 | → | thegeekinside joins (~thegeekin@189.180.97.223) |
| 06:08:36 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 255 seconds) |
| 06:09:50 | → | srk joins (~sorki@user/srk) |
| 06:11:39 | × | jinsun quits (~jinsun@user/jinsun) (Ping timeout: 255 seconds) |
| 06:13:16 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 06:13:42 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 06:14:16 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 06:33:08 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:45:01 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 06:49:59 | → | merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) |
| 06:59:41 | × | analoq quits (~yashi@user/dies) (Ping timeout: 246 seconds) |
| 07:01:38 | → | analoq joins (~yashi@user/dies) |
| 07:04:32 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 07:04:53 | <chreekat> | There's one of those on Matrix |
| 07:11:59 | × | Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:20:44 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:1d05:832d:e3e6:a39e) |
| 07:21:04 | × | Togooroo quits (~lalune@216.73.163.231) (Quit: Togooroo) |
| 07:22:29 | → | kenran joins (~user@user/kenran) |
| 07:23:25 | × | kenran quits (~user@user/kenran) (Remote host closed the connection) |
| 07:24:15 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 07:24:16 | × | merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 07:27:15 | × | falafel quits (~falafel@2607:fb91:143f:e47f:92a:83c4:99b:657e) (Ping timeout: 255 seconds) |
| 07:27:17 | → | michalz joins (~michalz@185.246.204.107) |
| 07:31:05 | × | nattiestnate quits (~nate@202.138.250.37) (Quit: WeeChat 3.8) |
| 07:32:03 | → | acidjnk joins (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) |
| 07:34:10 | × | nehsou^ quits (~nehsou@c-24-30-76-89.hsd1.ga.comcast.net) (Remote host closed the connection) |
| 07:35:12 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 07:36:29 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 07:37:30 | × | Flow quits (~none@gentoo/developer/flow) (Ping timeout: 260 seconds) |
| 07:43:06 | × | opticblast quits (~Thunderbi@172.58.82.191) (Ping timeout: 255 seconds) |
| 07:43:07 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Ping timeout: 256 seconds) |
| 07:44:10 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 07:50:00 | → | Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) |
| 07:53:31 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 07:54:18 | → | freeside joins (~mengwong@129.126.62.10) |
| 07:56:33 | → | MajorBiscuit joins (~MajorBisc@2001:1c00:2408:a400:67e:5371:52a7:9b9a) |
| 07:57:10 | × | thegeekinside quits (~thegeekin@189.180.97.223) (Ping timeout: 246 seconds) |
| 07:59:00 | → | thegeekinside joins (~thegeekin@189.180.97.223) |
| 08:04:42 | × | razetime quits (~Thunderbi@117.193.1.74) (Ping timeout: 255 seconds) |
| 08:07:54 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 08:16:33 | → | razetime joins (~Thunderbi@117.193.1.74) |
| 08:20:00 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 08:23:26 | → | gurkenglas joins (~gurkengla@dynamic-046-114-001-228.46.114.pool.telefonica.de) |
| 08:24:00 | → | nschoe joins (~q@141.101.51.197) |
| 08:25:24 | × | freeside quits (~mengwong@129.126.62.10) (Ping timeout: 255 seconds) |
| 08:26:42 | → | merijn joins (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) |
| 08:27:52 | → | johnw joins (~johnw@2600:1700:cf00:db0:c50c:6975:4579:9276) |
| 08:28:23 | → | jwiegley joins (~jwiegley@2600:1700:cf00:db0:c50c:6975:4579:9276) |
| 08:29:22 | × | acidjnk quits (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 08:31:15 | × | merijn quits (~merijn@c-001-001-010.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 08:31:55 | × | ft quits (~ft@p3e9bc443.dip0.t-ipconnect.de) (Quit: leaving) |
| 08:33:33 | → | chele joins (~chele@user/chele) |
| 08:36:42 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) (Remote host closed the connection) |
| 08:41:04 | → | patrl joins (~patrl@user/patrl) |
| 08:43:10 | → | acidjnk joins (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) |
| 08:45:37 | → | shapr joins (~user@net-5-88-239-92.cust.vodafonedsl.it) |
| 08:49:33 | × | razetime quits (~Thunderbi@117.193.1.74) (Remote host closed the connection) |
| 08:55:35 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 08:57:41 | × | dcoutts_ quits (~duncan@host86-167-90-212.range86-167.btcentralplus.com) (Ping timeout: 255 seconds) |
| 08:59:29 | × | ezzieygu1wuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 255 seconds) |
| 09:00:14 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 09:04:21 | → | dcoutts_ joins (~duncan@host86-167-90-212.range86-167.btcentralplus.com) |
| 09:09:08 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 09:11:38 | × | gurkenglas quits (~gurkengla@dynamic-046-114-001-228.46.114.pool.telefonica.de) (Ping timeout: 255 seconds) |
| 09:20:45 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds) |
| 09:21:14 | → | CiaoSen joins (~Jura@2003:c9:5704:6000:2a3a:4dff:fe84:dbd5) |
| 09:22:19 | × | pavonia quits (~user@user/siracusa) (Ping timeout: 248 seconds) |
| 09:24:32 | → | pavonia joins (~user@user/siracusa) |
| 09:24:46 | → | Square joins (~Square4@user/square) |
| 09:25:53 | <Square> | Wouldn it be possible to deprecate String or extend String with Text functionality? |
| 09:26:01 | → | kritzefitz joins (~kritzefit@debian/kritzefitz) |
| 09:26:26 | <merijn> | Square: Define "extend" and "Text functionality"? |
| 09:26:46 | <Square> | merijn, idk. I'm thinking from my hip here. |
| 09:26:54 | <dminuoso_> | Square: Not really. |
| 09:27:14 | <merijn> | Also, I see zero value in deprecating String. There's (arguably) some value to deprecating a bunch of stuff that is *using* String, but I don't see why (or even how) you would deprecate String independently of lists |
| 09:27:35 | <Rembane> | Square: What's leading to the question? |
| 09:27:36 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 09:28:16 | <Square> | i got the impression String is just a subset of Text and an unlucky choice. Maybe not? |
| 09:28:43 | <Rembane> | String is a list of Char. I don't know what Text is. :) |
| 09:29:20 | <merijn> | Square: I don't see in what way it is a subset? |
| 09:29:22 | <Square> | ok, I guess I lack enough knowledge to talk about this. nvm =D |
| 09:29:30 | <merijn> | String and Text are *very* different datastructures |
| 09:29:53 | <hammond__> | new to haskell here |
| 09:30:00 | <hammond__> | how are they different. |
| 09:30:01 | <merijn> | Square: Essentially, String is just "a linked list of Char", with all the inherent advantages and/or disadvantages linked lists bring (including lots of overhead from all the list parts) |
| 09:30:19 | <merijn> | Text on the other hand is a "densely packed binary representation of unicode" |
| 09:30:29 | <merijn> | hammond__: See above ;) |
| 09:31:18 | <merijn> | iow, Text consumes about 2 bytes (1, I suppose with the recent UTF-8 based Text) + say, 12ish bytes overhead every KB or so |
| 09:31:22 | <hammond__> | ok :) |
| 09:31:34 | <merijn> | Compare to String which may consume as much as 32 bytes per character |
| 09:32:00 | × | dcoutts_ quits (~duncan@host86-167-90-212.range86-167.btcentralplus.com) (Ping timeout: 255 seconds) |
| 09:32:15 | <merijn> | On the flip side, modifying 1 character in a giant Text block effectively requires you to copy the entire block + 1 change (since immutable) |
| 09:32:23 | → | gensyst joins (gensyst@user/gensyst) |
| 09:33:20 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 09:34:16 | <merijn> | As base heuristic use Text anytime you deal with either 1) large blobs of text (like paragraphs/pages worth) or 2) if you're gonna have hundreds of values around (if you have a million 100 character keys, the memory difference adds up) |
| 09:35:28 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 09:36:08 | <gensyst> | How can I match "settings" with separate "corresponding data"? This is what I mean: https://dpaste.com/54Z6R2KFU |
| 09:36:14 | <gensyst> | The problem is that there's a burden on me, the programmer, to keep the two in sync and "error" when I do something unexpected. This is ugly. Can I somehow match the two at compile-time - without burdening the client in any way? |
| 09:36:18 | <gensyst> | (The other problem of the client having to worry about matching the settings with initial state is not a big problem here - I could solve it by providing an "initialState" function) |
| 09:36:46 | <dminuoso_> | gensyst: distribute around in this way |
| 09:36:53 | <dminuoso_> | `data Mode = ModeA | ModeB` |
| 09:36:55 | → | gmg joins (~user@user/gehmehgeh) |
| 09:37:01 | <dminuoso_> | Oh hold on that wont work |
| 09:37:10 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 09:37:27 | <dminuoso_> | Mmm this is an interesting example |
| 09:37:28 | <merijn> | gensyst: Could make Settings a GADT tagged with a phantom |
| 09:39:52 | <gensyst> | merijn, not sure how that would look... |
| 09:40:50 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 09:40:56 | <merijn> | gensyst: https://dpaste.com/HDH7H3L6D |
| 09:41:02 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 09:41:06 | <merijn> | Obligatory: It compiles, but I haven't tested it ;) |
| 09:41:22 | → | gmg joins (~user@user/gehmehgeh) |
| 09:41:32 | <dminuoso_> | That looks good |
| 09:41:42 | <merijn> | GHC even correctly warns if you add the wrong branch to the case! |
| 09:42:09 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 09:42:11 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds) |
| 09:42:27 | → | freeside joins (~mengwong@122.11.214.229) |
| 09:42:37 | <merijn> | Of course, how well this works depends on if you ever want to "change" the type of the state |
| 09:43:17 | → | zmt00 joins (~zmt00@user/zmt00) |
| 09:43:23 | <gensyst> | merijn, why would that be a problem |
| 09:44:27 | <merijn> | gensyst: in this example the 'm' encodes the mode, but if you'd want a function where the result is "either 'State A' or 'State B', decided dynamically at runtime", then that type won't work |
| 09:44:57 | × | zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 255 seconds) |
| 09:45:09 | <merijn> | gensyst: Because then you're in the realm of needing dependent types to figure out the result type of the function makeItHappen |
| 09:45:28 | <gensyst> | i see |
| 09:45:36 | <gensyst> | cool in my use case i won't need that |
| 09:45:38 | <gensyst> | this is mind-blowing |
| 09:45:39 | <gensyst> | thank you |
| 09:45:52 | <merijn> | gensyst: GADTs are pretty neat :) |
| 09:47:50 | <int-e> | "no one knows why" turns out to be "we have quite a few ideas but aren't sure how exactly they produce the data that we're seeing and whether there are other factors" |
| 09:48:44 | <int-e> | So a clickbait headline. What a surprise. |
| 09:48:55 | <merijn> | int-e: Wrong channel ;) |
| 09:49:13 | <int-e> | damn |
| 09:49:20 | <merijn> | gensyst: Can actually clean up further to this: https://dpaste.com/3NAHKS36D |
| 09:49:49 | <int-e> | (also, sorry) |
| 09:49:58 | <merijn> | ah, modern GHC whining about unticked promoted constructors, but no incomplete patterns :) |
| 09:50:44 | <merijn> | gensyst: Might have to use 'A and 'B in the types, but other than that it compiles warning free on 9.2 :) |
| 09:51:38 | × | patrl quits (~patrl@user/patrl) (Quit: WeeChat 3.8) |
| 09:52:12 | → | patrl joins (~patrl@user/patrl) |
| 09:52:15 | × | patrl quits (~patrl@user/patrl) (Client Quit) |
| 09:55:02 | → | zmt01 joins (~zmt00@user/zmt00) |
| 09:56:39 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 255 seconds) |
| 09:57:06 | <gensyst> | merijn, excellent! |
| 09:57:12 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 10:00:21 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 10:03:01 | → | vpan joins (~0@212.117.1.172) |
| 10:05:18 | × | xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 255 seconds) |
| 10:10:49 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 10:19:11 | <gensyst> | merijn, is it possible to have record constructors (would be nice for describing each field in the state, esp. if there are many fields) |
| 10:21:38 | <merijn> | gensyst: Yes, but the syntax is a bit wonky, should be described in the GHC user guide |
| 10:23:23 | <merijn> | I don't think I have any examples using it lying around, though |
| 10:24:19 | <gensyst> | thanks, i'll try to find it |
| 10:24:43 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds) |
| 10:26:49 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 10:28:38 | → | dcoutts_ joins (~duncan@host86-167-90-212.range86-167.btcentralplus.com) |
| 10:29:13 | × | Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 268 seconds) |
| 10:29:42 | → | Maxdamantus joins (~Maxdamant@user/maxdamantus) |
| 10:31:40 | → | delYsid joins (~user@user/delYsid) |
| 10:37:35 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 10:37:41 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 10:44:20 | × | dcoutts_ quits (~duncan@host86-167-90-212.range86-167.btcentralplus.com) (Ping timeout: 255 seconds) |
| 10:44:34 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 10:52:52 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 246 seconds) |
| 10:55:15 | → | mmhat joins (~mmh@p200300f1c72b42c1ee086bfffe095315.dip0.t-ipconnect.de) |
| 10:57:17 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 10:58:16 | × | mmhat quits (~mmh@p200300f1c72b42c1ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit) |
| 10:58:39 | Miao[m] | is now known as hellwolf[m] |
| 10:59:28 | × | ravamrt quits (~ravamrt@112.134.192.214) (Quit: Leaving.) |
| 11:01:49 | × | freeside quits (~mengwong@122.11.214.229) (Read error: Connection reset by peer) |
| 11:03:57 | × | quintasan_ quits (~quassel@quintasan.pl) () |
| 11:04:09 | → | quintasan joins (~quassel@quintasan.pl) |
| 11:05:31 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 11:10:10 | → | xff0x joins (~xff0x@2405:6580:b080:900:1159:8d59:b148:53e) |
| 11:12:10 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 11:15:39 | × | CiaoSen quits (~Jura@2003:c9:5704:6000:2a3a:4dff:fe84:dbd5) (Ping timeout: 252 seconds) |
| 11:25:58 | <tomsmeding> | gensyst: you've probably found it, but in case you haven't, or for lurkers, https://tomsmeding.com/ss/get/tomsmeding/NgiVcn (from https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/gadt.html#extension-GADTs ) |
| 11:29:05 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:1d05:832d:e3e6:a39e) (Ping timeout: 260 seconds) |
| 11:37:41 | <gensyst> | tomsmeding, thanks! |
| 11:39:05 | → | gurkenglas joins (~gurkengla@dynamic-046-114-001-228.46.114.pool.telefonica.de) |
| 11:39:47 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 11:42:57 | → | andrewboltachev joins (~andrey@178.141.125.176) |
| 11:44:53 | → | mastarija joins (~mastarija@2a05:4f46:e03:6000:f467:8e26:a3e4:9c98) |
| 11:46:05 | <mastarija> | So, I've defined my lens type like this: |
| 11:46:08 | <mastarija> | type Lens s t a b = forall f. Functor f => ( a -> f b ) -> s -> f t |
| 11:46:26 | <mastarija> | And my view function like this: |
| 11:46:28 | <mastarija> | view :: Lens s t a b -> s -> a |
| 11:46:33 | <mastarija> | view len = getConst . len Const |
| 11:47:07 | <mastarija> | Now I'm trying to do this: |
| 11:47:11 | <mastarija> | view traverse ["Hello", "World"] |
| 11:47:46 | <mastarija> | But I get an error saying it couldn't deduce `Applicative f`. |
| 11:48:28 | <mastarija> | Not sure what I'm doing wrong here. I'd expect "HelloWorld" as a result. |
| 11:48:46 | <jackdk> | This is why `lens` defines `view :: MonadReader s m -> Getting a s a -> m a` |
| 11:49:14 | <mastarija> | I'm following this tutorial: https://blog.jakuba.net/2014-08-06-lens-tutorial-stab-traversal-part-2/ |
| 11:49:21 | <jackdk> | (You can read that `m a` as `s -> a`; the `MonadReader` version also lets it play nice with MTL |
| 11:49:22 | <mastarija> | Where it supposedly works |
| 11:50:14 | <jackdk> | Lens then says `type Getting r s a = (a -> Const r a) -> s -> Const r s`) |
| 11:51:21 | → | npmania joins (~Thunderbi@45.8.223.203) |
| 11:51:22 | <jackdk> | I wouldn't be surprised if that author wrote `view` after testing with `lens` or something |
| 11:51:45 | → | ubert joins (~Thunderbi@2a02:8109:abc0:6434:4e5:1e44:42ea:9a2b) |
| 11:51:47 | <jackdk> | It's an easy mistake to make and it tripped me up when I was writing minimal lens stuff for a package |
| 11:51:50 | <mastarija> | So, `view` from e.g. relude wouldn't work with traverse? https://hackage.haskell.org/package/relude-1.1.0.0/docs/Relude-Extra-Lens.html#v:view |
| 11:52:43 | <lyxia> | indeed |
| 11:52:50 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds) |
| 11:52:52 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 11:53:26 | <lyxia> | traverse is not a Lens |
| 11:53:31 | <mastarija> | Hm... that's disappointing. I'm trying to construct simple lens library from the grounds up to understand underlying mechanisms and then I get tripped up like this. |
| 11:53:44 | <mastarija> | This seems like another large gap I need to fill in. |
| 11:53:53 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 11:54:24 | <jackdk> | Think of the `=>` as a function argument that GHC will solve and pass in. That `Lens s t a b` constraint in your example says "pass in a function that accepts a `Functor` dictionary". You try and pass `traverse` in there, and it fails because it requires an `Applicative` dictionary. |
| 11:55:10 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 11:55:27 | <jackdk> | This is why lens specialises `view` to a form written in terms of `Const` — it then becomes usable with `Lens`, `Traversal`, `Fold`, `Iso` etc. |
| 11:55:31 | <mastarija> | Yes, I get that. I'm just disappointed a bit that extra infrastructure is required around the basic lenses to make things work. |
| 11:57:07 | <mastarija> | I wasn't paying atention when I was just using them. I thought those class constraints and weird types were needed for some advanced stuff I'm not using. |
| 11:57:14 | <mastarija> | Not basic things like traversal. |
| 11:57:19 | <jackdk> | *shrug* microlens does it this way too. However, the use of `view` to get a monoidal summary is pretty niche, and you could get a lot of get/set practice on records or lenses only without worrying about it. |
| 11:58:03 | × | MajorBiscuit quits (~MajorBisc@2001:1c00:2408:a400:67e:5371:52a7:9b9a) (Ping timeout: 248 seconds) |
| 11:58:14 | × | srk quits (~sorki@user/srk) (Quit: ZNC 1.8.1 - https://znc.in) |
| 11:58:37 | → | srk joins (~sorki@user/srk) |
| 11:59:39 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.8) |
| 12:02:52 | → | Flow joins (~none@gentoo/developer/flow) |
| 12:06:01 | × | acidjnk quits (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 12:06:38 | → | CiaoSen joins (~Jura@p200300c9570460002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 12:11:37 | → | npmania1 joins (~Thunderbi@45.8.223.248) |
| 12:12:15 | × | npmania quits (~Thunderbi@45.8.223.203) (Ping timeout: 260 seconds) |
| 12:12:15 | npmania1 | is now known as npmania |
| 12:14:25 | × | xff0x quits (~xff0x@2405:6580:b080:900:1159:8d59:b148:53e) (Ping timeout: 246 seconds) |
| 12:14:49 | → | xff0x joins (~xff0x@178.255.149.135) |
| 12:16:14 | → | lortabac joins (~lortabac@88.125.6.227) |
| 12:25:24 | → | acidjnk joins (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) |
| 12:27:03 | × | gurkenglas quits (~gurkengla@dynamic-046-114-001-228.46.114.pool.telefonica.de) (Ping timeout: 255 seconds) |
| 12:29:34 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 12:30:11 | × | haritz quits (~hrtz@user/haritz) (Quit: ZNC 1.8.2+deb2 - https://znc.in) |
| 12:32:29 | → | notzmv joins (~zmv@user/notzmv) |
| 12:35:08 | → | MajorBiscuit joins (~MajorBisc@2001:1c00:2408:a400:67e:5371:52a7:9b9a) |
| 12:43:09 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
| 12:44:11 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 12:44:59 | × | acidjnk quits (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 12:50:06 | → | mncheck joins (~mncheck@193.224.205.254) |
| 12:51:10 | × | xff0x quits (~xff0x@178.255.149.135) (Ping timeout: 246 seconds) |
| 12:51:30 | × | vpan quits (~0@212.117.1.172) (Quit: Leaving.) |
| 12:52:42 | → | accord joins (uid568320@2a03:5180:f:4::8:ac00) |
| 12:53:02 | → | xff0x joins (~xff0x@2405:6580:b080:900:1159:8d59:b148:53e) |
| 12:53:11 | → | lyle joins (~lyle@104.246.145.237) |
| 12:57:36 | × | mncheck quits (~mncheck@193.224.205.254) (Quit: Leaving) |
| 12:59:23 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:00:14 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 13:01:45 | → | kenran joins (~user@user/kenran) |
| 13:07:17 | → | mncheck joins (~mncheck@193.224.205.254) |
| 13:07:26 | <kenran> | I've stumbled upon this piece of code in our code base (with no colleague here to help): https://bpa.st/T754U. This builds with GHC 8.10.7. Now I'm trying to update to GHC 9.2.4 and I get the following error: https://bpa.st/LRQBC |
| 13:08:06 | <tomsmeding> | kenran: put a space between the ~ and the a |
| 13:08:19 | <tomsmeding> | interesting backwards-incompatibility |
| 13:08:24 | × | infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection) |
| 13:08:29 | <kenran> | Can you tell me what I should be looking/googling for w.r.t. this ~a notation in the original code? |
| 13:08:35 | <kenran> | tomsmeding: oh, you were fast, let me check that :) |
| 13:08:50 | <Axman6> | is that accelerate code? |
| 13:08:57 | <tomsmeding> | looks like it |
| 13:09:09 | <tomsmeding> | though the ~ is just ghc haskell syntax |
| 13:09:10 | <geekosaur> | kenran, type equivalence |
| 13:09:17 | <kenran> | Axman6: yeah, it uses accelerate |
| 13:09:23 | → | azure_vermilion joins (~azure_ver@164.39.138.83) |
| 13:09:24 | <geekosaur> | it's actually a ~ b, but see the note above it about ormolu |
| 13:09:29 | <kenran> | this piece of code is notorious, as it also breaks ormolu/fourmolu |
| 13:09:41 | <Axman6> | a ~ b is a constraint that says a is equal to b |
| 13:09:45 | <tomsmeding> | I hate code formatters |
| 13:10:31 | → | infinity0 joins (~infinity0@pwned.gg) |
| 13:10:37 | <azure_vermilion> | does anyone know how to use boomerang, the parser/pretty printer library? alpha parsers a letter and digit parses 0-9, how would you combine them to parse eg. a0? |
| 13:10:57 | <Axman6> | (a ~ b) => a -> a -> b is (roughly) equivalent to a -> a -> a, if that helps at all |
| 13:11:30 | <kenran> | I am undecided. We have some people here where it's impossible to decide on a "common style" (which is not necessary ofc), so we'd have people change between different do-notation alignments all the time |
| 13:11:36 | <kenran> | cool, thanks everyone! |
| 13:11:49 | <tomsmeding> | Axman6: makes a difference given that this is an instance though |
| 13:12:04 | <tomsmeding> | difference in inference / instance selection |
| 13:12:10 | × | thegeekinside quits (~thegeekin@189.180.97.223) (Ping timeout: 246 seconds) |
| 13:12:19 | <geekosaur> | azure_vermilion, I would be surprised if it's not alpha <> digit |
| 13:12:36 | <kenran> | ok, I'll postpone the GHC upgrade it seems: the 'impossible' happened :) |
| 13:13:00 | <tomsmeding> | azure_vermilion: yeah seems that Boomerang is a Monoid |
| 13:13:54 | → | pernzs joins (~pernzs@101.175.168.100) |
| 13:14:22 | <Axman6> | hmm, boomerang looks kinda difficult to use |
| 13:14:23 | <azure_vermilion> | I tried alpha <> digit and it seems to mean a single character that satisfies both, i.e. impossible |
| 13:14:55 | <Axman6> | I would guess you need alpha . digit |
| 13:15:10 | <Axman6> | where (.) is from Control.Category, not Prelude |
| 13:15:24 | <Axman6> | I can't tell what type that would have |
| 13:15:48 | <kuribas> | :t (<<<) |
| 13:15:48 | × | gensyst quits (gensyst@user/gensyst) (Quit: Leaving) |
| 13:15:49 | <lambdabot> | forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c |
| 13:16:06 | <tomsmeding> | :t (>>>) |
| 13:16:07 | <lambdabot> | forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c |
| 13:16:29 | → | acidjnk joins (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) |
| 13:16:58 | <tomsmeding> | ah yeah the haddocks of Text.Boomerang (at the top of the page) say that you should use (.) from Control.Category, which is (<<<) |
| 13:16:59 | <Axman6> | ". is used to compose parsers together. <> is used for choice." |
| 13:18:54 | <Axman6> | not particularly impressed with the docs, just half a tutorial and then links to some modules, with no clear next step |
| 13:20:06 | <Axman6> | oh my, looking at Text.Boomerang.Combinators, it looks like they've managed to encode a fair amount of forth in its combinators... |
| 13:22:57 | <Axman6> | I remember years ago some post on how amazing Forth and concatenative languages were, and how they could do things nothing else could, and somehow this ended up on r/haskell, and someone imp-lemented everything shown, with nearly identical syntax, in Haskell, with full static types. fun times |
| 13:25:07 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 13:26:56 | <tomsmeding> | that's fun for sure |
| 13:27:08 | <tomsmeding> | concatenative? as in, you really write `3 4 add`? |
| 13:27:38 | <tomsmeding> | I can imagine that if you wrangle the type classes hard enough, you might be able to make that work, but it would be ugly for sure |
| 13:28:12 | × | hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection) |
| 13:30:24 | <geekosaur> | someone managed to encode basic in haskell, forth wouldn't surprise me |
| 13:30:28 | → | hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com) |
| 13:30:31 | <geekosaur> | two someones, even |
| 13:33:04 | → | haritz joins (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) |
| 13:33:04 | × | haritz quits (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host) |
| 13:33:04 | → | haritz joins (~hrtz@user/haritz) |
| 13:34:23 | → | xeph joins (~xeph@2a02-8428-8326-2501-4a51-c5ff-fe27-99a8.rev.sfr.net) |
| 13:34:27 | × | xeph quits (~xeph@2a02-8428-8326-2501-4a51-c5ff-fe27-99a8.rev.sfr.net) (Client Quit) |
| 13:35:45 | <jean-paul[m]> | is there a name for a variation of mod where the only difference is that x mod' x == x? |
| 13:39:14 | <azure_vermilion> | thanks for your help Axman6 |
| 13:40:29 | mauke[i] | .oO( mod' x d = mod (x - 1) d + 1 ) |
| 13:40:42 | × | mauke[i] quits (~mauke@user/mauke) (Quit: gone) |
| 13:42:03 | <jean-paul[m]> | mauke[i]: Yea, the implementation is not very hard (though I don't want the `0 mod' x` behavior that implementation gives). Naming is the harder part. :) |
| 13:42:22 | → | jinsun joins (~jinsun@user/jinsun) |
| 13:45:09 | <tomsmeding> | jean-paul[m]: americanClockMod? |
| 13:45:56 | <jean-paul[m]> | cute |
| 13:46:59 | × | CiaoSen quits (~Jura@p200300c9570460002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 13:47:11 | <jean-paul[m]> | I'm using it, thanks |
| 13:47:15 | <tomsmeding> | :') |
| 13:47:33 | → | CiaoSen joins (~Jura@2003:c9:5704:6000:2a3a:4dff:fe84:dbd5) |
| 13:47:54 | <tomsmeding> | ceilMod is another option, alluding to the `mod' x d = x - ceil (x / d)` version, as contrasted to `mod x d = x - floor (x / d)` |
| 13:48:09 | <tomsmeding> | eliding float-int casts |
| 13:48:53 | <jean-paul[m]> | Hmm that's also good ... and I have a ceilDiv already |
| 13:52:14 | <tomsmeding> | Uh |
| 13:53:01 | <jean-paul[m]> | ceil gets hard to look at after you type it too many times though |
| 13:53:42 | <tomsmeding> | `mod' x d = x - (ceil (x / d) - 1) * d` but I'm probably doing it wrong again lol |
| 13:54:11 | <jean-paul[m]> | my implementation just has an if ... == 0 in it :) |
| 13:55:05 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 13:56:04 | <segfaultfizzbuzz> | so (as an example, this is not a commentary on the company) apparently haskell is used at tesla, and i forget how but i heard that what they do is use haskell to generate C code but that haskell itself isn't used at runtime |
| 13:56:18 | <segfaultfizzbuzz> | what is this style of programming called and are there some introductory materials for it somewhere? |
| 13:57:23 | → | c0c0 joins (~coco@212-51-146-137.fiber7.init7.net) |
| 13:59:33 | → | thegeekinside joins (~thegeekin@189.180.97.223) |
| 13:59:47 | × | c0c0 quits (~coco@212-51-146-137.fiber7.init7.net) (Client Quit) |
| 14:00:33 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 14:01:03 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection) |
| 14:01:24 | <lyxia> | it's called writing a compiler |
| 14:01:31 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 14:01:53 | <segfaultfizzbuzz> | so then they are building a new language? |
| 14:02:23 | <lyxia> | not necessarily |
| 14:02:46 | <segfaultfizzbuzz> | i could (maybe) understand adding new language features/macros but building a language is such a monumental undertaking that it's hard to imagine anything other than rather large entities (e.g. microsoft) doing such a thing |
| 14:02:51 | → | __monty__ joins (~toonn@user/toonn) |
| 14:03:11 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 14:03:12 | <segfaultfizzbuzz> | so they are customizing how haskell is compiled to machine code...? or...? |
| 14:03:29 | <lyxia> | you'll have to ask someone employed at tesla |
| 14:03:49 | <geekosaur> | not difficult at all. building an ecosystem for it is the hard part, but for an embedded use you mostly don't care |
| 14:03:50 | <chreekat> | could also be called writing an EDSL, though I agree it's another way of saying 'writing a compiler'. |
| 14:04:05 | <geekosaur> | https://hackage.haskell.org/package/clash |
| 14:04:34 | <geekosaur> | not saying that';s what they use, but e.g. nasa uses it to write the firmware for drones |
| 14:04:37 | <dminuoso_> | C is a common target language for a compiler, as its relatively simple to generate code for and t facilitates easy interop with other libraries. |
| 14:04:50 | <dminuoso_> | Didnt even GHC use the C backend as default for a long time? |
| 14:05:25 | <geekosaur> | until 7.0ish, yes |
| 14:06:00 | <geekosaur> | with a big ugly chunk of perl to rewrite the generated assembly to fit the STG for the target platform |
| 14:06:09 | <segfaultfizzbuzz> | haha perl |
| 14:06:21 | × | npmania quits (~Thunderbi@45.8.223.248) (Quit: npmania) |
| 14:07:56 | <dminuoso_> | I mean according to reddit, they take the generated C code and compile it into vehicle firmware |
| 14:07:57 | <geekosaur> | ob https://xkcd.com/224/ |
| 14:08:01 | <dminuoso_> | which might suggest that its also a tooling questoin |
| 14:08:33 | <dminuoso_> | that is if you have a toolchain that ingests C and pumps out some firmware, then the easiest way to make haskell suitable for that, is to generate C code from that. |
| 14:13:15 | × | thegeekinside quits (~thegeekin@189.180.97.223) (Ping timeout: 255 seconds) |
| 14:13:32 | → | thegeekinside joins (~thegeekin@189.180.97.223) |
| 14:13:41 | → | Niclelscore joins (~Niclelsco@94.25.228.252) |
| 14:14:38 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 14:17:06 | × | lortabac quits (~lortabac@88.125.6.227) (Quit: WeeChat 2.8) |
| 14:19:05 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 14:20:13 | <Axman6> | geekosaur: you mean copilot, not clash |
| 14:20:23 | <Axman6> | @package copilot |
| 14:20:23 | <lambdabot> | https://hackage.haskell.org/package/copilot |
| 14:20:53 | <segfaultfizzbuzz> | hmm |
| 14:21:07 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 14:21:15 | <Axman6> | there's also ivory |
| 14:21:28 | × | acidjnk quits (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 14:21:40 | <Axman6> | (And I think tower for coordinating programs written in ivory?) |
| 14:24:09 | <azure_vermilion> | does Control.Category.(.) work in the normal way on functions? |
| 14:24:11 | <Axman6> | copilot is probably the coolest C-generating DSL though, it produces guaranteed hard real-time programs with constant memory usage, all of which are essential in high assurance systems |
| 14:24:28 | <Axman6> | azure_vermilion: yes, (->) has an instance for the Category class |
| 14:24:36 | <azure_vermilion> | thanks |
| 14:24:56 | <Axman6> | which is identical to prelude's (.), as you'd expect |
| 14:26:16 | <Axman6> | tomsmeding: IIRC you needed to write START 3 4 add END but that was about it. it even had HOFs. the stack was just a tulpe list with () in the base (which START or END injected to ge things running) |
| 14:27:23 | × | Cale quits (~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) (Ping timeout: 248 seconds) |
| 14:28:02 | <Axman6> | so add :: Num a => (a,(a,b)) -> (a,b), 3 :: Num a => b -> (a,b) (roughly - obviously it needed something slightly more complex to get the right syntax, but it ended up with quite readable types IIRC |
| 14:28:49 | → | Cale joins (~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) |
| 14:32:28 | ← | delYsid parts (~user@user/delYsid) (ERC 5.4.1 (IRC client for GNU Emacs 30.0.50)) |
| 14:32:46 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 14:33:30 | <tomsmeding> | Axman6: ah right |
| 14:34:21 | → | Midjak joins (~Midjak@82.66.147.146) |
| 14:35:25 | <Axman6> | @quote stack-calculator |
| 14:35:26 | <lambdabot> | stack-calculator says: let start f = f (); push s a f = f (a,s); add (a,(b,s)) f = f (a+b,s); end (a,_) = a in start push 2 push 3 add end |
| 14:35:32 | <Axman6> | hey, there it is |
| 14:36:31 | <Axman6> | found via https://www.reddit.com/r/haskell/comments/ptji8/concatenative_rowpolymorphic_programming_in/ (including a dumb comment by me from a third of my life ago) |
| 14:37:37 | <Axman6> | :t let start f = f (); push s a f = f (a,s); add (a,(b,s)) f = f (a+b,s); end (a,_) = a in (start, push, add, end) |
| 14:37:38 | <lambdabot> | Num a1 => ((() -> t1) -> t1, b1 -> a2 -> ((a2, b1) -> t2) -> t2, (a1, (a1, b2)) -> ((a1, b2) -> t3) -> t3, (a3, b3) -> a3) |
| 14:37:43 | → | mauke[i] joins (~mauke@user/mauke) |
| 14:38:49 | <Axman6> | concatenative languages are just three CPS transforms in a trenchcoat! |
| 14:41:32 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) |
| 14:43:13 | <zebrag[m]> | Do you know what it is about that polymorphic functions are supposed to preserve relations? (Reynolds through Atkey 2009) |
| 14:43:35 | <zebrag[m]> | I mean every polymorphic functions I can think of obviously preserve relations |
| 14:43:50 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 14:43:57 | <zebrag[m]> | And usually there aren't any relations to preserve in the first place |
| 14:44:36 | × | pernzs quits (~pernzs@101.175.168.100) (Quit: Client closed) |
| 14:44:42 | <byorgey> | zebrag[m]: this property is called "parametricity", it comes from the fact that polymorphic functions must work in exactly the same way for any type |
| 14:44:54 | <byorgey> | hence they "commute with fmap" in some sense appropriate to the type |
| 14:45:31 | <zebrag[m]> | So how did he come out with such characterisations, and how can it be useful (reading you just now...) |
| 14:46:15 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) (Ping timeout: 260 seconds) |
| 14:46:31 | <zebrag[m]> | okay, looking into the commute thing, tx |
| 14:46:46 | <byorgey> | how did Reynolds come up with this idea, I don't know. But it is very useful indeed, just look up "theorems for free" |
| 14:48:15 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 14:48:20 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 14:48:23 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 246 seconds) |
| 14:50:34 | × | Niclelscore quits (~Niclelsco@94.25.228.252) (Remote host closed the connection) |
| 14:50:42 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 14:50:42 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 14:50:42 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:55:34 | → | cyphase joins (~cyphase@user/cyphase) |
| 14:56:47 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 255 seconds) |
| 14:57:44 | → | acidjnk joins (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) |
| 14:59:55 | <Axman6> | zebrag[m]: having some understanding about paramatricity means you can tell a hell of a lot about a function from it's type in many cases. Obviously there's only one functiuon with type a -> a; how many have type a -> a -> a? Do we know how many have type a -> [a]? |
| 15:01:16 | <zebrag[m]> | If the function is parametric then it is a natural transform, and there must be a conversely (yes, reading you just now...) |
| 15:01:25 | × | tomboy64 quits (~tomboy64@user/tomboy64) (Ping timeout: 260 seconds) |
| 15:02:00 | <zebrag[m]> | yes, interesting question, don't answer yet |
| 15:03:12 | × | Cale quits (~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) (Ping timeout: 255 seconds) |
| 15:03:29 | <zebrag[m]> | 1, 2, countably many |
| 15:03:42 | <Axman6> | what do we know about the [a] in the last one? |
| 15:04:37 | <zebrag[m]> | it is the repetition n times of the input |
| 15:04:56 | <Axman6> | yeah, if there are any a's, they must be the one we passed in |
| 15:05:21 | <Axman6> | so it's also isomorphic to a -> (Nat, a) |
| 15:06:03 | <zebrag[m]> | yes |
| 15:08:32 | <Axman6> | (I'm by no means an expert on the topic, but we used to talk about this a lot in the NICTA course, and can serve as a good introduction to why the type system is so helpful in Haskell compared to languages like Java) |
| 15:10:25 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 268 seconds) |
| 15:13:01 | → | akegalj joins (~akegalj@225-212.dsl.iskon.hr) |
| 15:15:28 | → | razetime joins (~Thunderbi@117.193.1.74) |
| 15:16:13 | → | Cale joins (~cale@2605:8d80:6a2:d49b:a139:9a62:b1d5:76a4) |
| 15:17:51 | × | mc47 quits (~mc47@xmonad/TheMC47) (Ping timeout: 248 seconds) |
| 15:20:27 | → | mmhat joins (~mmh@p200300f1c72b42c1ee086bfffe095315.dip0.t-ipconnect.de) |
| 15:23:26 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 15:24:12 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 15:25:46 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 15:28:16 | <kuribas> | hiding information can be a good design tool. Having all information about the whole program available, like in a dynamic program, can make code less flexible. |
| 15:31:55 | → | freeside joins (~mengwong@103.252.202.170) |
| 15:32:10 | × | acidjnk quits (~acidjnk@p200300d6e715c408b11a53503b2c1121.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 15:34:12 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 15:34:22 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 252 seconds) |
| 15:36:30 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 15:43:04 | → | freeside joins (~mengwong@103.252.202.170) |
| 15:44:53 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:45:22 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds) |
| 15:45:49 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 246 seconds) |
| 15:46:45 | <lyxia> | zebrag[m]: the introduction of Reynolds' paper gives the motivation and insight. Imagine two libraries of complex numbers, one with a cartesian representation, one with polar coordinates, but they expose the same interface. Intuitively they should be interchangeable. |
| 15:47:18 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 15:48:41 | × | mmhat quits (~mmh@p200300f1c72b42c1ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.8) |
| 15:48:42 | <lyxia> | a program which could be used with either library is a polymorphic function, and the relation it preserves relates equivalent representations |
| 15:56:36 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 15:58:42 | vgtw_ | is now known as vgtw |
| 16:00:41 | <zebrag[m]> | Yes, I remember the example, but now that you speak of it, wouldn't it look more like ad hoc polymorphism, or some existential type? It doesn't look like plain parametric function |
| 16:01:28 | × | kenran quits (~user@user/kenran) (Remote host closed the connection) |
| 16:02:01 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) |
| 16:02:22 | × | mastarija quits (~mastarija@2a05:4f46:e03:6000:f467:8e26:a3e4:9c98) (Quit: WeeChat 3.7.1) |
| 16:03:19 | → | kurbus joins (~kurbus@user/kurbus) |
| 16:04:54 | → | hounded joins (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) |
| 16:05:14 | → | hounded_woodstoc joins (~hounded@2603-7000-da43-eccc-0000-0000-0000-0cec.res6.spectrum.com) |
| 16:07:21 | <zebrag[m]> | lyxia It seems the types are isomorphic, but I can't see the parametricity there, and the rest of the article I didn't understand a thing, at least the pages right after that introductory example |
| 16:07:24 | <lyxia> | you can imagine a library in this context as a type C and a record of functions Library C = { (+) :: C -> C -> C ; ... }, then a function using the library would be forall c . Library c -> result |
| 16:08:00 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds) |
| 16:09:11 | <zebrag[m]> | that is existential type isn't it? |
| 16:09:16 | <zebrag[m]> | and yes you can encode it in System F |
| 16:09:25 | <zebrag[m]> | So I see the point |
| 16:10:01 | <lyxia> | the library has an existential type but we're focusing on a program that uses it, which has a universal type |
| 16:10:25 | <zebrag[m]> | I've read somewhere that the whole point of Reynolds was abstract types (aka existential) |
| 16:11:38 | <zebrag[m]> | lyxia: yes, right |
| 16:12:54 | <lyxia> | abstraction has two sides, it looks existential on one side, universal on the other |
| 16:15:55 | × | azure_vermilion quits (~azure_ver@164.39.138.83) (Ping timeout: 246 seconds) |
| 16:16:50 | → | azure_vermilion joins (~azure_ver@164.39.138.83) |
| 16:17:58 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 16:18:14 | cjay- | is now known as cjay |
| 16:18:14 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 255 seconds) |
| 16:18:58 | × | kurbus quits (~kurbus@user/kurbus) (Quit: Client closed) |
| 16:21:47 | → | freeside joins (~mengwong@103.252.202.170) |
| 16:21:53 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 16:22:09 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 16:23:13 | mauke | is now known as mauke[m] |
| 16:23:22 | mauke[i] | is now known as mauke |
| 16:23:33 | × | mbuf quits (~Shakthi@49.204.133.116) (Quit: Leaving) |
| 16:26:04 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 246 seconds) |
| 16:29:08 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) (Remote host closed the connection) |
| 16:33:32 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.8) |
| 16:34:26 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 16:34:27 | × | nschoe quits (~q@141.101.51.197) (Ping timeout: 255 seconds) |
| 16:34:33 | × | akegalj quits (~akegalj@225-212.dsl.iskon.hr) (Ping timeout: 255 seconds) |
| 16:34:39 | → | jade[m] joins (~jadecatgi@2001:470:69fc:105::3:194e) |
| 16:34:47 | <segfaultfizzbuzz> | let's say that i create a variable in haskell with some type and a cosmic ray (or more likely a bad bit of code) corrupts the associated memory |
| 16:35:10 | <segfaultfizzbuzz> | can i do something to verify at runtime that the variable actually "is" the type that i think it is |
| 16:37:31 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds) |
| 16:37:59 | <mauke> | not if you assume cosmic rays, because your verification code might also become corrupted |
| 16:38:08 | <segfaultfizzbuzz> | heh ok |
| 16:38:19 | <segfaultfizzbuzz> | but if the code itself is still ok? |
| 16:38:31 | <mauke> | I don't think the runtime representation records more than GC info |
| 16:38:44 | <mauke> | so e.g. you couldn't distinguish newtypes |
| 16:38:58 | <segfaultfizzbuzz> | for example let's say that i have a UTF8 string, but then maybe something is done to that string which breaks UTF8 (such as perhaps someone concats it to a UTF16 string) |
| 16:39:24 | <segfaultfizzbuzz> | then can i say UTF8String.doublecheck mystr or something |
| 16:42:08 | <jade[m]> | the static types should make sure the concatenation cannot happen at compile time |
| 16:42:31 | × | Square quits (~Square4@user/square) (Ping timeout: 246 seconds) |
| 16:43:25 | <lyxia> | segfaultfizzbuzz: decodeUtf8' . encodeUtf8 |
| 16:43:26 | → | merijn joins (~merijn@86.86.29.250) |
| 16:44:34 | <lyxia> | there's already error correction in hardware. if you're worried about that you can buy better hardware. |
| 16:44:58 | <segfaultfizzbuzz> | ha |
| 16:47:51 | × | CiaoSen quits (~Jura@2003:c9:5704:6000:2a3a:4dff:fe84:dbd5) (Ping timeout: 252 seconds) |
| 16:50:47 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 16:52:15 | → | freeside joins (~mengwong@103.252.202.170) |
| 16:54:20 | → | tomcatfish joins (~tomcatfis@mobile-166-170-28-207.mycingular.net) |
| 16:56:36 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 16:57:50 | → | jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) |
| 16:58:31 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 16:58:57 | × | tomcatfish quits (~tomcatfis@mobile-166-170-28-207.mycingular.net) (Remote host closed the connection) |
| 16:59:13 | → | freeside joins (~mengwong@103.252.202.170) |
| 16:59:49 | → | tomcatfish joins (~tomcatfis@mobile-166-170-28-207.mycingular.net) |
| 16:59:58 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 17:00:17 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 17:00:43 | <segfaultfizzbuzz> | i am a bad programmer so the rust "utf8 everywhere" philosophy brings me ease, how do i square this away with whatever happens in haskell? |
| 17:01:08 | <mauke> | Unicode everywhere > UTF-8 everywhere |
| 17:01:10 | <segfaultfizzbuzz> | i have run into many situations where my users submit god-knows-what string format |
| 17:01:26 | <segfaultfizzbuzz> | mauke: care to elaborate? |
| 17:01:32 | <[exa]> | segfaultfizzbuzz: pipe it through iconv |
| 17:01:52 | <mauke> | unicode strings contain text. utf-8 strings contain bytes |
| 17:02:01 | <merijn> | segfaultfizzbuzz: If your user submits "god-knows-what" string formats, you're fucked already |
| 17:02:07 | <[exa]> | +1 ^ |
| 17:02:17 | <merijn> | I also don't even know what "utf-8 string" would mean |
| 17:02:33 | <mauke> | generally speaking, a text abstraction is nicer if you don't have to deal with single bytes |
| 17:02:40 | <merijn> | as mauke suggests, utf-8 is "just bytes" |
| 17:02:44 | → | acidjnk joins (~acidjnk@p54ad56b7.dip0.t-ipconnect.de) |
| 17:03:44 | <mauke> | as the old perl mantra goes, you decode your inputs into unicode, process as needed, then encode your outputs to bytes |
| 17:03:44 | <segfaultfizzbuzz> | does the haskell type system protect me from the string format hellscape? |
| 17:03:48 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 17:04:09 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 17:04:10 | <segfaultfizzbuzz> | unicode is utf8, but it also is other things...? |
| 17:04:15 | <segfaultfizzbuzz> | so why not just utf8 then? |
| 17:04:16 | <merijn> | segfaultfizzbuzz: That's wrong |
| 17:04:20 | <mauke> | utf-8 is one of the possible encodings of unicode |
| 17:04:27 | <merijn> | segfaultfizzbuzz: UTF-8 is a lossless encode of the unicode |
| 17:04:40 | <merijn> | i.e. unicode specifies what characters are, etc. and how to operate them |
| 17:04:57 | <mauke> | > length "€" |
| 17:04:58 | <merijn> | utf-8 is merely one of a whole bunch of different representations of unicode |
| 17:04:59 | <lambdabot> | 1 |
| 17:05:16 | <mauke> | that's one unicode codepoint, but 3 bytes in UTF-8 |
| 17:05:31 | <merijn> | utf-7, utf-16, utf-32, etc. different encodings for unicode |
| 17:05:34 | <mauke> | (and 2 bytes in UTF-16) |
| 17:06:15 | <segfaultfizzbuzz> | understood, but what is lost by mandating utf8 then |
| 17:06:16 | <merijn> | segfaultfizzbuzz: String and Text operate on unicode directly, how GHC represents that unicode in memory is an implementation detail |
| 17:06:18 | × | ubert quits (~Thunderbi@2a02:8109:abc0:6434:4e5:1e44:42ea:9a2b) (Quit: ubert) |
| 17:06:23 | → | freeside joins (~mengwong@103.252.202.170) |
| 17:06:31 | <segfaultfizzbuzz> | so you can't think about bytes...? |
| 17:07:00 | <mauke> | you can if you want |
| 17:07:05 | <merijn> | segfaultfizzbuzz: Going from "abstract" unicode to specific sequences of bytes is something you do at the edge of your program |
| 17:07:11 | <mauke> | it's just usually more convenient not to |
| 17:07:23 | <merijn> | segfaultfizzbuzz: "mandating utf8" doesn't actually solve any problems |
| 17:07:56 | <merijn> | segfaultfizzbuzz: if your user submits text data to your server as utf-16 then "I mandated utf-8" doesn't really solve anything |
| 17:08:17 | × | thegeekinside quits (~thegeekin@189.180.97.223) (Remote host closed the connection) |
| 17:08:48 | <merijn> | segfaultfizzbuzz: By distinguishing bytes (i.e. ByteString) from Text (i.e. unicode) and requiring you to explicitly convert from ByteString to Text using an explicit decoder forces you to detect these errors |
| 17:09:11 | <segfaultfizzbuzz> | well if i make use of different libraries, my head will explode if http requests are in utf8, but then talking to some database is utf16, and then in another situation,... |
| 17:09:19 | <merijn> | segfaultfizzbuzz: If you just have "bytes" and "bytes, that we swear/assume only contain utf8 data" you're a problem |
| 17:09:39 | <segfaultfizzbuzz> | the utf8 mandate is nice from an ecosystem/program boundary perspective,... i can (kinda) handle checking inputs at least |
| 17:09:58 | <merijn> | segfaultfizzbuzz: What exactly does that mandate solve? |
| 17:10:41 | <merijn> | Nothing can guarantee external data will be in the encoding you want |
| 17:10:52 | <segfaultfizzbuzz> | well as i mentioned, perhaps i use an http request library, and that wants one kind of string |
| 17:10:55 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 260 seconds) |
| 17:11:04 | <segfaultfizzbuzz> | and then a database library thinks another type is better |
| 17:11:28 | <segfaultfizzbuzz> | and it isn't clear to me how well the string format information would be represented in the type system,... |
| 17:11:41 | <merijn> | segfaultfizzbuzz: How is that relevant when you have, say, Text? The database library and http library both take Text and then convert into the appropriate encoded bytes when needed |
| 17:11:42 | <mauke> | does Haskell even have a "UTF-16 type"? |
| 17:11:47 | <merijn> | mauke: no |
| 17:11:53 | × | gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds) |
| 17:11:55 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 17:11:58 | <merijn> | segfaultfizzbuzz: You can't even tell what encoding is used by Text internally |
| 17:12:11 | <segfaultfizzbuzz> | for example: https://stackoverflow.com/questions/23765903/why-is-text-utf-16-as-opposed-to-utf-8 |
| 17:12:17 | <mauke> | is it utf-8 now? |
| 17:12:21 | <lyxia> | Text is utf8 now |
| 17:12:22 | <merijn> | mauke: yes |
| 17:12:43 | <merijn> | segfaultfizzbuzz: Why do you think it matters what Text uses internally? |
| 17:12:45 | <mauke> | I know the internals changed, but that's not really visible to users |
| 17:13:01 | <Hecate> | merijn: space & performance? :'') |
| 17:13:32 | <segfaultfizzbuzz> | merijn: well at some point let's say i use Text to create a web request html document to return |
| 17:13:33 | <merijn> | Hecate: The intial UTF-8 conversion attempt performed worse and iirc the main reason to use utf-16 was that ICU used that |
| 17:13:59 | <merijn> | segfaultfizzbuzz: but HTTP requests aren't unicode, they are bytes, so Text has to be encoded explicitly *anyway* |
| 17:14:08 | <Hecate> | merijn: what about the second attempt? :3 |
| 17:14:16 | <merijn> | Hecate: I dunno, I haven't kept up |
| 17:14:25 | <segfaultfizzbuzz> | encoded explicitly? what does that mean? |
| 17:14:49 | <merijn> | segfaultfizzbuzz: encodeUtf8 :: Text -> ByteString |
| 17:14:58 | <merijn> | encodeUtf16 :: Text -> ByteString |
| 17:15:31 | → | freeside joins (~mengwong@103.252.202.170) |
| 17:15:44 | <Hecate> | merijn: you probably should https://github.com/haskell/text/pull/365#issue-976262730 |
| 17:15:49 | <merijn> | segfaultfizzbuzz: That you need to convert the abstract unicode data to a specific encoding in terms of bytes |
| 17:15:58 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 17:16:39 | <Hecate> | merijn: and https://www.youtube.com/watch?v=1qlGe2qnGZQ of course |
| 17:17:25 | <mauke> | Eq 10x faster?! what happened there? |
| 17:17:29 | <segfaultfizzbuzz> | i mean potentially every interaction with every library will need encoding (and decoding) ... ? |
| 17:17:38 | <mauke> | segfaultfizzbuzz: ... no? |
| 17:17:40 | <segfaultfizzbuzz> | depending on what the library authors thought was a good implementation...? |
| 17:18:00 | <Hecate> | mauke: Ukrainian Excellence™ |
| 17:18:04 | <merijn> | segfaultfizzbuzz: no, you only need to encode when you try and serialise unicode to the external world |
| 17:18:08 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) |
| 17:18:08 | <merijn> | segfaultfizzbuzz: ??? |
| 17:18:32 | <merijn> | I think you're confused and conflating several things |
| 17:18:42 | <segfaultfizzbuzz> | merijn: yes probably as mentioned i am a bad programmer |
| 17:18:56 | <merijn> | segfaultfizzbuzz: Start here: https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ |
| 17:19:46 | <mauke> | Hecate: yeah, but ... equality on utf-16 and utf-8 should both be equivalent to memcmp() |
| 17:20:02 | <mauke> | switching representations doesn't explain the speed-up here |
| 17:20:15 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 260 seconds) |
| 17:20:24 | <merijn> | mauke: Well, if you have biased input data you're gonna have half the size of bytes |
| 17:20:29 | <Hecate> | mauke: look at the cbits |
| 17:20:30 | <merijn> | Anyway, gotta run |
| 17:21:09 | <Hecate> | merijn: see ya |
| 17:21:19 | <mauke> | ok, yeah. if it's mostly ascii, you're probably going to win on cache alone |
| 17:24:15 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 17:24:25 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 17:24:46 | <segfaultfizzbuzz> | "It does not make sense to have a string without knowing what encoding it uses." |
| 17:24:53 | × | merijn quits (~merijn@86.86.29.250) (Ping timeout: 252 seconds) |
| 17:25:04 | × | razetime quits (~Thunderbi@117.193.1.74) (Remote host closed the connection) |
| 17:25:11 | × | accord quits (uid568320@2a03:5180:f:4::8:ac00) (Quit: Connection closed for inactivity) |
| 17:25:12 | <segfaultfizzbuzz> | ^ i agree with this completely, so then my question is |
| 17:25:47 | <segfaultfizzbuzz> | am i guaranteed throughout the haskell ecosystem that all strings have a completely defined encoding? |
| 17:25:49 | <mauke> | that statement assumes "string" means byte string |
| 17:25:55 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds) |
| 17:26:07 | <mauke> | if you have a character string, there is no encoding |
| 17:26:21 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 17:27:24 | → | dcoutts_ joins (~duncan@host86-167-90-212.range86-167.btcentralplus.com) |
| 17:27:44 | → | Joao003 joins (~Joao003@2804:840:830b:2100:ad60:28cd:6e23:d3c3) |
| 17:27:52 | <Joao003> | hi |
| 17:27:54 | <segfaultfizzbuzz> | by character string, you mean a sequence of unicode code points? |
| 17:28:13 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) (Remote host closed the connection) |
| 17:28:21 | <mauke> | yes (or better) |
| 17:28:40 | <segfaultfizzbuzz> | what is "better" than that? |
| 17:28:46 | <Joao003> | Doesn't String already exist? |
| 17:28:46 | <mauke> | grapheme clusters |
| 17:29:01 | <segfaultfizzbuzz> | mauke: this sounds like semantic meaning? |
| 17:29:16 | <mauke> | well, it's closer to real-world "characters" |
| 17:29:21 | <segfaultfizzbuzz> | and also this somewhat sidesteps my question |
| 17:29:39 | <segfaultfizzbuzz> | if i pull in a bunch of commonly used haskell packages and do things with strings, |
| 17:29:55 | <segfaultfizzbuzz> | do i need to constantly be vigilant about the encodings across those packages? |
| 17:30:00 | <mauke> | LATIN CAPITAL LETTER A + COMBINING DIAERESIS is two codepoints, but a single "character" |
| 17:30:25 | <mauke> | segfaultfizzbuzz: in my experience, that's never been an issue |
| 17:30:34 | <segfaultfizzbuzz> | lol what in the hell is that lol |
| 17:30:56 | <segfaultfizzbuzz> | mauke: ok but the typesystem itself doesn't track the encodings? |
| 17:31:00 | <lyxia> | everyone uses String or Text so there is no possible confusion |
| 17:31:06 | <mauke> | Ä |
| 17:31:41 | <mauke> | segfaultfizzbuzz: people generally don't write interfaces that use bytestrings if they're trying to represent text |
| 17:32:09 | <davean> | Yah you only see non-decoded Unicode in extremely low level APIs |
| 17:32:13 | <mauke> | I mean, you could create separate types for those |
| 17:32:24 | <davean> | And if you wanted that, it would be trivial to make |
| 17:32:36 | <mauke> | with some sort of phantom parameter for the encoding |
| 17:33:28 | <mauke> | it just doesn't come up very often in practice |
| 17:33:32 | <davean> | newtype NonDecodedUnicode encoding = NDC ByteString |
| 17:33:49 | <segfaultfizzbuzz> | a very practical example is some zurihac talk from 2022 says Text just switched from utf16 to utf8 so it seems rather likely that there will be a lot of packages (possibly abandoned) which might be relying on the assumption that Text is utf16 (possibly for unsafe computations and the like) |
| 17:33:52 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) |
| 17:34:00 | <davean> | Yah, only in really low level APIs which are generally extremely local and don't actually care about the encoding! |
| 17:34:39 | <davean> | segfaultfizzbuzz: Not a problem though, thats internal and they'd have to use internals *and* violate the PVP to get an issue there |
| 17:34:39 | <Joao003> | what are you talking about |
| 17:34:41 | <mauke> | segfaultfizzbuzz: ... so? |
| 17:34:56 | <segfaultfizzbuzz> | PVP? |
| 17:35:00 | <davean> | Package Version Policy |
| 17:35:08 | <lyxia> | segfaultfizzbuzz: turns out there is not a log of package that relied on that assumption |
| 17:35:12 | <mauke> | I don't know if those packages exist, but if they relied on Text internals, they are now broken |
| 17:35:23 | <davean> | and there can't be any reasonable packages that break when they do |
| 17:35:30 | <mauke> | the same thing would happen if you had bytestrings tagged with encodings |
| 17:35:58 | <segfaultfizzbuzz> | i'm trying to wrap my head around the idea of working with strings without strictness and a concept of bytes |
| 17:36:10 | → | ddellacosta joins (~ddellacos@146.70.165.10) |
| 17:36:19 | <mauke> | not sure what you mean by "without strictness" |
| 17:36:22 | <glguy> | it's like working with ints and not knowing if the machine uses bit or little endian ordering internally |
| 17:36:24 | <davean> | segfaultfizzbuzz: You mean without the problems?\ |
| 17:36:29 | <segfaultfizzbuzz> | a lazy string |
| 17:36:40 | <lyxia> | glguy++ |
| 17:36:44 | <mauke> | laziness is orthogonal |
| 17:36:55 | <mauke> | (we have lazy bytestrings, too) |
| 17:36:57 | <davean> | segfaultfizzbuzz: You realize looking at the bytes is a core source of errors? |
| 17:37:12 | → | gurkenglas joins (~gurkengla@dynamic-046-114-177-034.46.114.pool.telefonica.de) |
| 17:37:27 | → | freeside joins (~mengwong@103.252.202.170) |
| 17:37:45 | <segfaultfizzbuzz> | davean: trying to have a vague idea of what the alternative is, somehow the string type can accumulate a variety of operations on the string but provide some kind of collection of functions still which can index into the string and soforth |
| 17:38:08 | → | econo joins (uid147250@user/econo) |
| 17:38:23 | <mauke> | the obvious alternative is an array or list of Chars |
| 17:38:30 | <mauke> | (can be strict or lazy) |
| 17:38:40 | <segfaultfizzbuzz> | mauke: yeah i learned to code in C originally so it's a hard habit of mind to break |
| 17:38:50 | <darkling> | In erlang, for example, strings are literally lists of unicode code points. |
| 17:39:01 | <mauke> | just imagine that every element of a string is a uint21_t |
| 17:39:09 | <Joao003> | guys is there a way i can map multiple functions over a list without using concatMap |
| 17:39:22 | <darkling> | ^^ what mauke said. |
| 17:39:30 | <segfaultfizzbuzz> | ok so the shift is from moving from array to list, basically? |
| 17:39:35 | <mauke> | no |
| 17:39:38 | <mauke> | from 8 to 21 bits |
| 17:40:06 | <segfaultfizzbuzz> | moving from 8 to 21 bits doesn't hurt my head at all, it's the layout and possibility of laziness which gives me a headache |
| 17:40:21 | <mauke> | again, that has nothing to do with unicode or encodings |
| 17:40:28 | <mauke> | we have lazy bytestrings |
| 17:40:53 | <davean> | segfaultfizzbuzz: strings are made of code points, not bytes, if you look at bytes you aren't looking at a string, you need to decode it to get any sense of a string. |
| 17:40:58 | <glguy> | segfaultfizzbuzz: you might just have to get used to headaches. tylenol? |
| 17:41:10 | <lyxia> | Joao003: show us your code and we'll simplify it, maybe |
| 17:41:10 | <davean> | segfaultfizzbuzz: even in C you can't look at bytes and do string operations correctly! |
| 17:41:51 | <Joao003> | no basically is there a function in prelude which is concatMap but it doesn't string everything together into a flattened list |
| 17:42:15 | <glguy> | Joao003: map (\x -> (f x, g x, h x)) |
| 17:42:23 | <Joao003> | oh my god |
| 17:42:30 | × | m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.8) |
| 17:42:32 | <Joao003> | BUT I DON'T WANT TUPLES |
| 17:42:32 | <mauke> | yeah: map |
| 17:42:39 | <davean> | Joao003: what DO you want? |
| 17:42:53 | <davean> | map (f . g . h)? |
| 17:43:00 | <mauke> | concatMap without flatting is called map |
| 17:43:07 | <mauke> | *flattening |
| 17:43:13 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds) |
| 17:43:31 | <Joao003> | map is not [a -> b] -> [a] -> [b] |
| 17:43:54 | <mauke> | what are you talking about, Jesse |
| 17:44:02 | <davean> | map (foldl1 (.) fs) |
| 17:44:10 | <davean> | er |
| 17:44:13 | <davean> | no, thats the wrong code |
| 17:44:16 | <segfaultfizzbuzz> | this dude says that many haskell libraries rely on Text internals: https://youtu.be/1qlGe2qnGZQ?t=2952 |
| 17:44:26 | <Joao003> | i don't want functions composed together |
| 17:44:30 | <davean> | concatMap (`map` fs) |
| 17:44:48 | → | m1dnight joins (~christoph@78.22.0.121) |
| 17:45:00 | <mauke> | Joao003: again, what DO you want? |
| 17:45:17 | <Joao003> | `f [(+1), (+2)] [1, 2, 3]` should give me `[[2, 3, 4], [3, 4, 5]]`. i want the `f` |
| 17:45:26 | → | akegalj joins (~akegalj@225-212.dsl.iskon.hr) |
| 17:45:57 | <ddellacosta> | are you looking for https://hackage.haskell.org/package/base-4.17.0.0/docs/Prelude.html#v:-60--42--62- ? |
| 17:46:01 | <glguy> | > let f fs x = [f x | f <- fs] in f [(+1), (+2)] [1, 2, 3] |
| 17:46:03 | <lambdabot> | error: |
| 17:46:03 | <lambdabot> | • No instance for (Num [Integer]) arising from a use of ‘e_112123’ |
| 17:46:03 | <lambdabot> | • In the expression: e_112123 |
| 17:46:10 | <glguy> | hmm, kinda used too many fs |
| 17:46:13 | <jade[m]> | zipWith ($) fs xs |
| 17:46:24 | <jade[m]> | wait no |
| 17:46:31 | <jade[m]> | that'd be for single pair |
| 17:46:32 | <davean> | segfaultfizzbuzz: where does he claim that? |
| 17:46:33 | <jade[m]> | s/pair/pairs/ |
| 17:46:41 | <davean> | segfaultfizzbuzz: I expect you're just wrong here |
| 17:46:46 | <glguy> | > let thing fs x = [map f x | f <- fs] in thing [(+1), (+2)] [1, 2, 3] |
| 17:46:48 | <lambdabot> | [[2,3,4],[3,4,5]] |
| 17:46:52 | <segfaultfizzbuzz> | davean: at the time linked to there |
| 17:47:02 | <segfaultfizzbuzz> | at t=2952 |
| 17:47:21 | <Joao003> | > let f fs xs = map (\ f -> map f xs) fs in f [(+1), (+2)] [1, 2, 3] |
| 17:47:21 | <jade[m]> | you want `<*>` without the concatenation |
| 17:47:23 | <lambdabot> | [[2,3,4],[3,4,5]] |
| 17:47:23 | <Joao003> | found it |
| 17:47:45 | <mauke> | @pl \fs xs -> map (\ f -> map f xs) fs |
| 17:47:45 | <lambdabot> | flip (map . flip map) |
| 17:48:06 | <Joao003> | wow that's a flip for every map |
| 17:48:08 | <glguy> | you can make it harder to read replacing fmap with <$> and flip fmap with <&> |
| 17:48:23 | <Joao003> | aaaaaaaaaaaaaaaa |
| 17:48:31 | <mauke> | also, . can be replaced by `fmap` |
| 17:48:57 | <Joao003> | > (flip (<$> <$> <&>)) [(+1), (+2)] [1, 2, 3] |
| 17:48:59 | <lambdabot> | <hint>:1:12: error: parse error on input ‘<$>’ |
| 17:49:16 | <Joao003> | > (flip ((<$>) <$> (<&>))) [(+1), (+2)] [1, 2, 3] |
| 17:49:17 | <lambdabot> | [[2,3,4],[3,4,5]] |
| 17:49:22 | <davean> | segfaultfizzbuzz: half of those are encoding libraries that specificly deal with the encoding |
| 17:49:29 | <jade[m]> | map . flip map is what you want I think |
| 17:49:36 | <davean> | and none would break with the upgrade I believe |
| 17:49:50 | <segfaultfizzbuzz> | ok... |
| 17:50:01 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 17:50:11 | <jade[m]> | ghci> (map . flip map) [1, 2, 3] [(+1), (+2)] |
| 17:50:11 | <jade[m]> | [[2,3,4],[3,4,5]] |
| 17:50:32 | <Joao003> | + extra flip for aligning with concatMap |
| 17:51:32 | <davean> | segfaultfizzbuzz: thats a lot in the sense of "I personally had to do extra work to update things that were directly connected" not "a lot" in the sense of "wide spread" |
| 17:51:50 | <davean> | segfaultfizzbuzz: as in "there was as much work to do outside the package as inside it" |
| 17:52:02 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 17:52:18 | <davean> | It was a significant portion of the project time to update everyone else's code while doing text, not that it was wide spread in the ecosystem |
| 17:52:50 | <davean> | (I was adjacent to that project) |
| 17:52:53 | <segfaultfizzbuzz> | ok |
| 17:53:04 | → | kurbus joins (~kurbus@user/kurbus) |
| 17:53:05 | <mauke> | it's also kind of irrelevant because if we had used a tagged bytestring+encoding format, we would've had the same breakage |
| 17:53:09 | <ddellacosta> | > foldMap (\f -> [f <$> [1,2,3]]) [(+1),(+2)] |
| 17:53:11 | <lambdabot> | [[2,3,4],[3,4,5]] |
| 17:54:02 | <ddellacosta> | I think it can be made more general |
| 17:54:23 | <davean> | segfaultfizzbuzz: imagine if libc updated something and it was less than twice the work to update everything that depended on libc as compared to the work of updating libc its self |
| 17:56:48 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds) |
| 17:58:42 | <davean> | segfaultfizzbuzz: and in C you should use functions like wcslen(_s) |
| 18:00:46 | <davean> | segfaultfizzbuzz: note wchar_t is *implimentation defined* so portable code has to be abstract over it anyway. |
| 18:01:01 | → | freeside joins (~mengwong@103.252.202.170) |
| 18:01:12 | <davean> | (Its still not good enough of course, can't reliably hold unicode ...) |
| 18:01:41 | → | notzmv joins (~zmv@user/notzmv) |
| 18:02:53 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:05:27 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 18:06:23 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1)) |
| 18:09:20 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 18:11:19 | <mauke> | #if WCHAR_MAX < 0x10ffff / #error "get a compiler that supports unicode" / #endif |
| 18:12:15 | × | lechner quits (~lechner@debian/lechner) (Ping timeout: 248 seconds) |
| 18:12:58 | × | Joao003 quits (~Joao003@2804:840:830b:2100:ad60:28cd:6e23:d3c3) (Read error: Connection reset by peer) |
| 18:16:19 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds) |
| 18:16:32 | → | mastarija joins (~mastarija@2a05:4f46:e03:6000:6c22:2fad:848c:c9d4) |
| 18:16:55 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) (Remote host closed the connection) |
| 18:17:13 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) |
| 18:23:05 | → | nattiestnate joins (~nate@202.138.250.31) |
| 18:24:39 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 18:25:46 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 18:26:19 | <zero> | @type fix error |
| 18:26:20 | <lambdabot> | [Char] |
| 18:26:26 | <zero> | ^ why? |
| 18:26:56 | <lyxia> | look at the type of fix, look at the type of error |
| 18:27:26 | <mauke> | :t fix |
| 18:27:27 | <lambdabot> | (a -> a) -> a |
| 18:27:32 | <mauke> | :t error |
| 18:27:33 | <lambdabot> | [Char] -> a |
| 18:27:55 | <mauke> | fix takes a function whose argument and result types are the same |
| 18:28:16 | <zero> | i understand the substitution, but something doesn't make sense. how do we get a string from error? |
| 18:28:22 | <mauke> | since error takes [Char] as argument, it follows that a = [Char] within fix's type signature |
| 18:28:31 | <geekosaur> | a unifies with anything including [Char] |
| 18:28:46 | <mauke> | the a in error's type signature is completely free |
| 18:28:50 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 18:28:52 | <mauke> | in particular, it can be set to [Char] |
| 18:29:28 | <mauke> | so: fix error is well typed with fix :: ([Char] -> [Char]) -> [Char] and error :: [Char] -> [Char] |
| 18:29:31 | jade[m] | uploaded an image: (924KiB) < https://libera.ems.host/_matrix/media/v3/download/catgirl.cloud/5b300071dcd72c885b45663174489212af48ae73/image.png > |
| 18:29:34 | <jade[m]> | fun |
| 18:30:12 | <mauke> | zero: you get a string from error the same way you get any result from error, really |
| 18:30:33 | <mauke> | it always returns a (lazy) exception, so it can pretend to be any type it wants |
| 18:31:53 | <mauke> | in C++ terms, template<typename T> T error() { throw "lol, whatever"; } // sort of |
| 18:32:15 | <zero> | > terror :: Char -> a ; terror _ = let a = a in a ; fix terror |
| 18:32:17 | <lambdabot> | <hint>:1:21: error: parse error on input ‘;’ |
| 18:32:36 | <geekosaur> | use yahb2 |
| 18:32:46 | <geekosaur> | lambdabot is not ghci and won't accept definitions |
| 18:33:00 | <mauke> | > let terror :: Char -> a; terror _ = let a = a in a in fix terror |
| 18:33:03 | <lambdabot> | *Exception: <<loop>> |
| 18:33:11 | → | falafel joins (~falafel@2607:fb91:143f:e47f:f515:cb26:b674:140e) |
| 18:33:26 | <zero> | how does `fix error` *actually* return a string? |
| 18:33:36 | <mauke> | it doesn't |
| 18:33:41 | <mauke> | it throws an exception |
| 18:33:48 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds) |
| 18:33:52 | <jade[m]> | jade[m]: . |
| 18:34:06 | <zero> | ok |
| 18:34:08 | <zero> | i see |
| 18:34:12 | <zero> | > head $ fix error |
| 18:34:14 | <geekosaur> | it doesn't. it returns a lazy exception that is thrown when lambdabot tries to display te string, then throws another exception when trying to display the string exception message, etc. |
| 18:34:14 | <lambdabot> | *Exception: *Exception: *Exception: *Exception: *Exception: *Exception: *Exc... |
| 18:34:22 | <zero> | ok i get it now. thanks |
| 18:34:26 | <mauke> | ;-) |
| 18:34:27 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 18:34:41 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 18:35:19 | <mauke> | it's like an infinitely nested exception. when you look at the exception message, it throws another exception, whose message throws another exception, whose ... |
| 18:35:19 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 18:37:06 | <zero> | fun... |
| 18:37:45 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 18:41:49 | × | MajorBiscuit quits (~MajorBisc@2001:1c00:2408:a400:67e:5371:52a7:9b9a) (Quit: WeeChat 3.6) |
| 18:45:05 | <witcher> | i'm unsure how to continue my haskell journey from here besides "just programming": i've had a uni course in haskell, and read the book "Programming in Haskell" by Graham Hutton. what's the next logical step, if any? |
| 18:46:10 | <Hecate> | witcher: solve your problems |
| 18:46:15 | <Hecate> | but with Haskell this time |
| 18:46:25 | × | shapr quits (~user@net-5-88-239-92.cust.vodafonedsl.it) (Ping timeout: 246 seconds) |
| 18:47:57 | <witcher> | Hecate: that's a given, but i'm wondering if there are any other materials to learn more about haskell while i do that |
| 18:48:19 | <Hecate> | witcher: oh yeah sure :D but can *you* handle it? :p |
| 18:48:23 | <zero> | yes solve your problems but don't fix your errors. unless you want and infinite exception |
| 18:48:42 | <zero> | *an |
| 18:48:49 | <Hecate> | witcher: I'd advise you to really program before going to the next step |
| 18:49:05 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
| 18:49:07 | <Hecate> | witcher: this book is a good road companion https://leanpub.com/finding-success-in-haskell |
| 18:49:25 | × | chaitlatte0 quits (ea29c0bb16@user/chaitlatte0) (Remote host closed the connection) |
| 18:49:32 | → | chaitlatte0 joins (ea29c0bb16@2604:bf00:561:2000::1124) |
| 18:49:39 | × | chaitlatte0 quits (ea29c0bb16@2604:bf00:561:2000::1124) (Remote host closed the connection) |
| 18:49:46 | → | chaitlatte0 joins (ea29c0bb16@2604:bf00:561:2000::1124) |
| 18:50:25 | → | freeside joins (~mengwong@103.252.202.170) |
| 18:50:39 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 18:50:48 | <witcher> | Hecate: that sounds like what i'm looking for, thank you! |
| 18:52:21 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 18:52:42 | sm | wonders what sort of a journey are you on that doesn't involve programming ? |
| 18:53:21 | <sm> | will there be programming later ? Or are you studying the concepts ? Just curious |
| 18:54:05 | × | chaitlatte0 quits (ea29c0bb16@2604:bf00:561:2000::1124) (Remote host closed the connection) |
| 18:54:12 | <trev> | lol |
| 18:54:15 | → | chaitlatte0 joins (ea29c0bb16@user/chaitlatte0) |
| 18:54:36 | <trev> | sm seems like a good time to shamelessly plug tiny-games-hs |
| 18:54:48 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 18:54:55 | × | kurbus quits (~kurbus@user/kurbus) (Quit: Client closed) |
| 18:55:55 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 18:56:00 | → | ardell joins (~ardell@user/ardell) |
| 18:56:45 | <sm> | haha please do trev, but that doesn't seem what's wanted here |
| 18:57:39 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 19:00:13 | <trev> | my two cents would be to involve yourself with an open source haskell project, start your own project, or find a haskell job while continuing reading |
| 19:00:23 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:03:57 | → | abiss27 joins (~abiss27@190.213.236.106) |
| 19:06:45 | <trev> | now that i'm thinking about it, there's nothing better than jumping into an open source project and forcing people to mentor you with PR feedbac :] |
| 19:07:21 | <geekosaur> | we're always open to new contribs 🙂 |
| 19:07:32 | <geekosaur> | (see #xmonad) |
| 19:08:14 | <geekosaur> | https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Doc-Developing.html |
| 19:08:23 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 19:09:36 | <witcher> | sm: looks like this came across wrong. i *am* programming, that's the whole point of learning a language |
| 19:12:26 | <sm> | well, I didn't want to assume that.. some might prefer to explore theory |
| 19:12:54 | <sm> | cool |
| 19:13:31 | <sm> | well, there's an internet ton of other materials |
| 19:14:02 | → | Guest9 joins (~Guest@2409:4073:28d:cb52:888b:1aab:b70f:4d3e) |
| 19:14:08 | <sm> | a recent book I like is |
| 19:14:08 | <sm> | @where PH |
| 19:14:09 | <lambdabot> | https://leanpub.com/production-haskell 2023 book |
| 19:14:17 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 19:14:46 | × | falafel quits (~falafel@2607:fb91:143f:e47f:f515:cb26:b674:140e) (Remote host closed the connection) |
| 19:14:50 | <sm> | but it's too early for that perhaps. Another that includes several example projects is |
| 19:14:50 | <sm> | @where HTAC |
| 19:14:51 | <lambdabot> | "Haskell Tutorial and Cookbook" by Mark Watson in 2017-09-04 at <https://leanpub.com/haskell-cookbook> |
| 19:15:39 | sm | checks out Hecate's |
| 19:15:46 | <witcher> | i find it hard to filter through all the "haskell 101", "what is a monad", etc. there's a ton of it, which is good, but looking beyond it for topics that are ""a bit more advanced"" becomes harder and tedious |
| 19:16:04 | <sm> | ha one that looks perfect for almost-valentine's day |
| 19:16:15 | <witcher> | this is not a haskell problem, i'm just having a hard time finding these materials |
| 19:16:46 | <witcher> | sm: thanks for the recommendations! |
| 19:17:12 | <ddellacosta> | witcher: this is a great book too https://www.goodreads.com/book/show/17802513-parallel-and-concurrent-programming-in-haskell |
| 19:17:29 | <sm> | witcher: yes.. there are a few standout resources but not knowing exactly where you are, recommending books seems the safest. And this is the best place for selecting books: |
| 19:17:29 | <sm> | @where books |
| 19:17:29 | <lambdabot> | https://www.extrema.is/articles/haskell-books is the best list of Haskell books. See also: LYAH, HTAC, RWH, PH, YAHT, SOE, HR, PIH, TFwH, wikibook, PCPH, HPFFP, FSAF, HftVB, TwT, FoP, PFAD, WYAH, |
| 19:17:29 | <lambdabot> | non-haskell-books |
| 19:17:31 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 19:18:12 | <witcher> | ddellacosta, sm: thanks! |
| 19:19:14 | → | ft joins (~ft@p3e9bc443.dip0.t-ipconnect.de) |
| 19:21:07 | <sm> | to describe the FSAF book, would it be fair to say it has a narrow focus on a few practical haskell programming topics likely to be helpful to a post-beginner haskeller ? |
| 19:22:29 | <trev> | geekosaur can you convince me to switch from bspwm to xmonad in one sentence? |
| 19:24:17 | <geekosaur> | probably not. the ecosystem doesn't really work that way. we do have our own BSP layout that can be combined with others (https://github.com/geekosaur/xmonad.hs/blob/skkukuk/xmonad.hs#L139-L153 for example) |
| 19:24:32 | × | dcoutts_ quits (~duncan@host86-167-90-212.range86-167.btcentralplus.com) (Ping timeout: 255 seconds) |
| 19:26:24 | <trev> | interesting |
| 19:26:30 | <trev> | bspwm seems way more primitive |
| 19:26:36 | → | falafel joins (~falafel@2607:fb91:143f:e47f:3048:c7fd:edeb:3cc7) |
| 19:26:48 | <witcher> | geekosaur: maybe i should give xmonad a try sometime - i've always been wondering what it's really about. i don't know anything about it besides it being a tiling window manager and written in Haskell |
| 19:27:22 | × | Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 246 seconds) |
| 19:28:19 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 19:28:20 | × | Cale quits (~cale@2605:8d80:6a2:d49b:a139:9a62:b1d5:76a4) (Read error: Connection reset by peer) |
| 19:28:58 | <sm> | trev: it'd be a shame if something were to happen to that bspwm config.. accidents are so common |
| 19:29:32 | <trev> | :D |
| 19:30:31 | <sm> | the static typer's pitch to dynamic typers :) |
| 19:30:48 | × | Guest9 quits (~Guest@2409:4073:28d:cb52:888b:1aab:b70f:4d3e) (Ping timeout: 260 seconds) |
| 19:33:02 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 19:33:50 | → | opticblast joins (~Thunderbi@172.58.85.230) |
| 19:34:19 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 19:35:45 | → | thegeekinside joins (~thegeekin@189.180.97.223) |
| 19:39:41 | → | Joao003 joins (~Joao003@2804:840:830b:2100:6d10:13ec:f5fc:ff63) |
| 19:39:49 | <Joao003> | hi |
| 19:40:43 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 19:43:33 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 255 seconds) |
| 19:44:14 | <Hecate> | * sm checks out Hecate's // I don't have a tutorial! |
| 19:44:35 | <sm> | I meant your book recommendation |
| 19:45:16 | <Hecate> | ah |
| 19:45:21 | <Hecate> | yes, very good book |
| 19:45:32 | <Hecate> | the next one about sockets and pipes is on the way |
| 19:45:37 | <Hecate> | (no spoiler though) |
| 19:45:44 | → | Cale joins (~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) |
| 19:47:36 | × | gurkenglas quits (~gurkengla@dynamic-046-114-177-034.46.114.pool.telefonica.de) (Ping timeout: 255 seconds) |
| 19:51:14 | → | jargon joins (~jargon@184.101.95.90) |
| 19:51:18 | × | nattiestnate quits (~nate@202.138.250.31) (Quit: WeeChat 3.8) |
| 20:00:16 | → | freeside joins (~mengwong@103.252.202.170) |
| 20:04:42 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 20:10:43 | lagash_ | is now known as lagash |
| 20:11:29 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 20:14:14 | → | mechap joins (~mechap@user/mechap) |
| 20:15:39 | × | lagash quits (lagash@lagash.shelltalk.net) (Quit: ZNC - https://znc.in) |
| 20:18:33 | × | akegalj quits (~akegalj@225-212.dsl.iskon.hr) (Quit: leaving) |
| 20:20:18 | → | lagash_ joins (~lagash@lagash.shelltalk.net) |
| 20:20:38 | → | pavonia joins (~user@user/siracusa) |
| 20:24:39 | × | mechap quits (~mechap@user/mechap) (Quit: WeeChat 3.8) |
| 20:24:53 | → | gensyst joins (gensyst@user/gensyst) |
| 20:25:09 | <gensyst> | Is there really no way to do better? https://dpaste.com/5H42RC2BT manually typing those strings is error-prone. |
| 20:25:19 | <gensyst> | (Topic: GADTs deriving Show) |
| 20:25:55 | × | ardell quits (~ardell@user/ardell) (Quit: Konversation terminated!) |
| 20:29:38 | → | kurbus joins (~kurbus@user/kurbus) |
| 20:31:09 | × | cheater quits (~Username@user/cheater) (Ping timeout: 255 seconds) |
| 20:31:43 | <geekosaur> | doesn't `deriving instance Show Settings` work? |
| 20:32:07 | <geekosaur> | (StandaloneDeriving extension) |
| 20:33:23 | <gensyst> | geekosaur, it does! nice... |
| 20:34:25 | <Hecate> | gensyst: I was about to suggest the same thing indeed: https://play-haskell.tomsmeding.com/saved/a8pbO1dS |
| 20:39:17 | → | freeside joins (~mengwong@103.252.202.170) |
| 20:39:53 | × | kurbus quits (~kurbus@user/kurbus) (Quit: Client closed) |
| 20:40:55 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 260 seconds) |
| 20:43:19 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 246 seconds) |
| 20:43:47 | → | phaazon2 joins (~phaazon@2001:41d0:a:fe76::1) |
| 20:43:48 | <gensyst> | thanks mates |
| 20:44:02 | phaazon2 | is now known as phaazon |
| 20:44:25 | × | trev quits (~trev@user/trev) (Remote host closed the connection) |
| 20:44:56 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 20:45:10 | <phaazon> | hi :) |
| 20:46:12 | → | dcoutts_ joins (~duncan@host86-167-90-212.range86-167.btcentralplus.com) |
| 20:47:28 | <sm> | I can't help but share tristanC's demo of terrorjack's work: you can easily run (or compile to a native binary) the 1.5Mb https://tristancacqueray.github.io/tiny-game-haskell-wasm/tiny-brot.wasm with a wasm runtime like https://wasmtime.dev |
| 20:47:58 | <sm> | no haskell toolchain needed |
| 20:50:34 | × | tdammers quits (~tdammers@77.109.72.175.res.static.edpnet.net) (Ping timeout: 252 seconds) |
| 20:50:52 | → | tdammers joins (~tdammers@77.109.72.175.res.static.edpnet.net) |
| 20:55:40 | × | vulpine quits (xfnw@tilde.team) (Quit: Connection reset by purr) |
| 20:57:16 | → | vulpine joins (xfnw@tilde.team) |
| 20:58:55 | → | nschoe joins (~q@2a01:e0a:8e:a190:f84c:9cc5:2613:142) |
| 20:59:05 | <phaazon> | question about linear types: isn’t there a « 0 » multiplicity? I know it might not be super useful, but I was wondering whether it existed |
| 20:59:08 | <phaazon> | i.e. for typing const |
| 20:59:18 | <phaazon> | const :: a %0 -> b %1 -> b |
| 21:01:55 | <geekosaur> | not currently |
| 21:02:01 | <geekosaur> | only ONE or MANY |
| 21:03:09 | <phaazon> | hm, so -> ≃ %m ->? |
| 21:03:26 | <geekosaur> | yes, afaik |
| 21:03:58 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
| 21:03:59 | <phaazon> | thanks geekosaur |
| 21:04:13 | <phaazon> | I’m having fun with them, and I initially tried to implement my lconst (linear const) with id |
| 21:04:19 | <phaazon> | but… id has a %m multiplicity :) |
| 21:04:26 | <phaazon> | funny to start thinking in terms of that now |
| 21:05:11 | → | freeside joins (~mengwong@103.252.202.170) |
| 21:07:27 | → | mechap joins (~mechap@user/mechap) |
| 21:13:38 | <jackdk> | phaazon: type a -> b = a %Many -> b (explicitly "many", not multiplicity-polymorphic); see https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/linear_types.html#extension-LinearTypes |
| 21:14:03 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 252 seconds) |
| 21:14:03 | <phaazon> | oh, so %m is polymorphic in m |
| 21:14:05 | <phaazon> | that’s interesting |
| 21:14:14 | <phaazon> | so I guess that’s useful for higher order? |
| 21:14:20 | <geekosaur> | oh, sorry. that sounds confusing |
| 21:15:09 | <phaazon> | so if I want to write a function taking an argument that might be used 0, 1 or many times (I don’t know) |
| 21:15:11 | <phaazon> | I should be using %m -> |
| 21:16:21 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 21:16:40 | <phaazon> | lately, I’ve been thinking a lot about my times in Haskell a couple of years ago |
| 21:16:45 | <phaazon> | and daaaaaaaamn I miss those times so much :) |
| 21:17:42 | → | freeside joins (~mengwong@103.252.202.170) |
| 21:17:42 | → | petrus_ joins (0bb1bd6a3f@2604:bf00:561:2000::10d7) |
| 21:19:49 | <Joao003> | any uses for the S combinator in Haskell? |
| 21:20:15 | <geekosaur> | it's Monad's `ap` or Applicative's <*> |
| 21:20:35 | <geekosaur> | which, yes, gets plenty of use |
| 21:22:06 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 21:22:31 | × | nschoe quits (~q@2a01:e0a:8e:a190:f84c:9cc5:2613:142) (Ping timeout: 252 seconds) |
| 21:24:08 | <phaazon> | S combinator? |
| 21:24:35 | × | gensyst quits (gensyst@user/gensyst) (Quit: Leaving) |
| 21:25:22 | <geekosaur> | look up the SKI calculus |
| 21:25:42 | <phaazon> | do people still use ap today? |
| 21:25:51 | <phaazon> | I think the question is probably the same as « do people still use return today? » |
| 21:25:51 | <geekosaur> | in Haskell, S = <*>, K = const, I = id |
| 21:26:03 | <phaazon> | interesting, I’ll have a look, thanks |
| 21:26:06 | <geekosaur> | ap has mostly fallen out of use |
| 21:26:14 | <phaazon> | let me guess |
| 21:26:23 | <phaazon> | it used to be a thing before Applicative was a superclass of Monad |
| 21:26:39 | <geekosaur> | it used to be a thing before Applicative existed 🙂 |
| 21:27:27 | <phaazon> | :) |
| 21:27:28 | <lyxia> | phaazon: In Agda, there is a "zero multiplicity" and it's useful to erase proofs when extracting code to Haskell. |
| 21:28:46 | <phaazon> | yeah, I was thinking of something like the never type from Rust |
| 21:28:58 | <phaazon> | (so you can prove you’re not going to emit en error, for instance) |
| 21:29:07 | <phaazon> | (and then you can statically remove the Either) |
| 21:29:09 | <phaazon> | (Result in Rust) |
| 21:29:36 | <lyxia> | That's Void |
| 21:29:46 | <phaazon> | yep |
| 21:30:01 | <lyxia> | https://hackage.haskell.org/package/base-4.17.0.0/docs/Data-Void.html |
| 21:32:06 | × | lyle quits (~lyle@104.246.145.237) (Quit: WeeChat 3.8) |
| 21:37:18 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 21:38:05 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) (Remote host closed the connection) |
| 21:39:02 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 21:39:19 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds) |
| 21:41:07 | × | abiss27 quits (~abiss27@190.213.236.106) (Quit: I'm off, Goodbye!) |
| 21:44:22 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 21:45:36 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 21:46:34 | × | Joao003 quits (~Joao003@2804:840:830b:2100:6d10:13ec:f5fc:ff63) (Read error: Connection reset by peer) |
| 21:48:03 | → | nschoe joins (~q@2a01:e0a:8e:a190:e5e1:d084:9247:2697) |
| 21:48:28 | × | dcoutts_ quits (~duncan@host86-167-90-212.range86-167.btcentralplus.com) (Remote host closed the connection) |
| 21:48:43 | × | nschoe quits (~q@2a01:e0a:8e:a190:e5e1:d084:9247:2697) (Client Quit) |
| 21:48:52 | → | dcoutts_ joins (~duncan@host86-167-90-212.range86-167.btcentralplus.com) |
| 21:54:33 | → | gurkenglas joins (~gurkengla@dynamic-046-114-177-034.46.114.pool.telefonica.de) |
| 21:56:33 | → | cheater joins (~Username@user/cheater) |
| 22:01:41 | → | npmania joins (~Thunderbi@45.8.223.248) |
| 22:01:51 | × | mastarija quits (~mastarija@2a05:4f46:e03:6000:6c22:2fad:848c:c9d4) (Quit: WeeChat 3.7.1) |
| 22:03:07 | × | michalz quits (~michalz@185.246.204.107) (Remote host closed the connection) |
| 22:03:54 | → | Arcade_Dan joins (~dan@173.31.197.117) |
| 22:05:38 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 255 seconds) |
| 22:05:57 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:10:03 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:7d:f047:35eb:a33f) |
| 22:11:22 | ← | petrus_ parts (0bb1bd6a3f@2604:bf00:561:2000::10d7) () |
| 22:12:43 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 22:15:59 | × | falafel quits (~falafel@2607:fb91:143f:e47f:3048:c7fd:edeb:3cc7) (Ping timeout: 255 seconds) |
| 22:18:33 | × | Arcade_Dan quits (~dan@173.31.197.117) (Quit: leaving) |
| 22:20:47 | × | myme1 quits (~myme@40.51-175-185.customer.lyse.net) (Ping timeout: 248 seconds) |
| 22:23:07 | × | sidy quits (~sidy@user/sidy) (Ping timeout: 248 seconds) |
| 22:23:49 | → | freeside joins (~mengwong@103.252.202.170) |
| 22:26:34 | × | azure_vermilion quits (~azure_ver@164.39.138.83) (Ping timeout: 246 seconds) |
| 22:26:44 | → | azure_vermilion joins (~azure_ver@164.39.138.83) |
| 22:26:45 | → | beteigeuze1 joins (~Thunderbi@85.247.81.220) |
| 22:27:21 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 255 seconds) |
| 22:27:21 | beteigeuze1 | is now known as beteigeuze |
| 22:27:47 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
| 22:28:09 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 22:29:09 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 255 seconds) |
| 22:29:54 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 22:30:56 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 248 seconds) |
| 22:32:53 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Ping timeout: 252 seconds) |
| 22:33:18 | → | elevenkb joins (~elevenkb@105.225.107.107) |
| 22:37:44 | → | npmania1 joins (~Thunderbi@45.8.223.218) |
| 22:38:07 | × | npmania quits (~Thunderbi@45.8.223.248) (Ping timeout: 246 seconds) |
| 22:38:07 | npmania1 | is now known as npmania |
| 22:38:28 | × | segfaultfizzbuzz quits (~segfaultf@108.211.201.53) (Ping timeout: 246 seconds) |
| 22:40:47 | × | manwithluck quits (~manwithlu@194.177.28.192) (Remote host closed the connection) |
| 22:42:13 | → | manwithluck joins (~manwithlu@194.177.28.192) |
| 22:50:19 | × | tomcatfish quits (~tomcatfis@mobile-166-170-28-207.mycingular.net) (Read error: Connection reset by peer) |
| 22:50:43 | → | kurbus joins (~kurbus@user/kurbus) |
| 22:51:42 | × | jespada_ quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 22:52:38 | → | segfaultfizzbuzz joins (~segfaultf@108.211.201.53) |
| 22:53:25 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 22:55:02 | → | jespada joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
| 22:58:13 | → | myme joins (~myme@40.51-175-185.customer.lyse.net) |
| 23:04:03 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 23:08:01 | → | pernzs joins (~pernzs@125.7.37.86) |
| 23:10:06 | × | kurbus quits (~kurbus@user/kurbus) (Quit: Ping timeout (120 seconds)) |
| 23:12:15 | × | elevenkb quits (~elevenkb@105.225.107.107) (Ping timeout: 255 seconds) |
| 23:12:50 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 23:22:01 | → | Maxdamantus joins (~Maxdamant@user/maxdamantus) |
| 23:33:31 | → | czy joins (~user@host-140-27.ilcub310.champaign.il.us.clients.pavlovmedia.net) |
| 23:33:57 | × | AlexZenon quits (~alzenon@178.34.160.79) (Ping timeout: 255 seconds) |
| 23:33:57 | × | Alex_test quits (~al_test@178.34.160.79) (Ping timeout: 255 seconds) |
| 23:36:20 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 23:39:59 | → | Alex_test joins (~al_test@178.34.160.79) |
| 23:40:59 | → | AlexZenon joins (~alzenon@178.34.160.79) |
| 23:41:07 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds) |
| 23:47:02 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 23:47:54 | → | freeside joins (~mengwong@103.252.202.170) |
| 23:49:04 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 23:51:59 | × | freeside quits (~mengwong@103.252.202.170) (Ping timeout: 248 seconds) |
| 23:57:31 | ← | fmlatghor parts (~lcoogan@c-73-177-167-149.hsd1.va.comcast.net) (WeeChat 3.5) |
| 23:59:40 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
All times are in UTC on 2023-02-15.