Logs on 2022-05-08 (liberachat/#haskell)
| 00:02:05 | × | king_gs quits (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) (Ping timeout: 260 seconds) |
| 00:02:21 | → | king_gs joins (~Thunderbi@187.201.220.53) |
| 00:04:44 | × | zeenk quits (~zeenk@2a02:2f04:a004:9b00:1efc:c1cf:378d:8b3d) (Quit: Konversation terminated!) |
| 00:06:23 | × | hueso quits (~root@user/hueso) (Ping timeout: 256 seconds) |
| 00:07:51 | → | xff0x joins (~xff0x@om126254226100.33.openmobile.ne.jp) |
| 00:09:41 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 00:09:41 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 00:09:41 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:10:51 | → | hueso joins (~root@user/hueso) |
| 00:14:12 | × | malinoskj290645 quits (~malinoskj@c-69-138-223-33.hsd1.va.comcast.net) (Ping timeout: 240 seconds) |
| 00:14:50 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 00:14:59 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 00:15:22 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 00:24:01 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 00:45:27 | × | srz quits (~srz@181.228.49.93) (Ping timeout: 260 seconds) |
| 00:47:39 | → | jargon joins (~jargon@174-22-206-112.phnx.qwest.net) |
| 00:51:50 | → | malinoskj290645 joins (~malinoskj@c-69-138-223-33.hsd1.va.comcast.net) |
| 00:53:47 | × | gurkenglas quits (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
| 00:56:27 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 00:57:30 | × | king_gs quits (~Thunderbi@187.201.220.53) (Ping timeout: 260 seconds) |
| 00:57:31 | × | malinoskj290645 quits (~malinoskj@c-69-138-223-33.hsd1.va.comcast.net) (Ping timeout: 246 seconds) |
| 01:03:44 | × | stackdroid18 quits (~stackdroi@user/stackdroid) (Quit: hasta la vista... tchau!) |
| 01:04:00 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 01:07:39 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Client Quit) |
| 01:07:40 | → | stackdroid18 joins (14094@user/stackdroid) |
| 01:08:35 | → | srz joins (~srz@181.228.49.93) |
| 01:09:45 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 01:22:11 | × | jollygood2 quits (www-data@2607:5300:60:8be::1) (Quit: CGI:IRC) |
| 01:32:06 | → | king_gs joins (~Thunderbi@187.201.220.53) |
| 01:35:29 | → | andrey__ joins (~andrey@p200300dbcf3ea70066ff5d38847dda5c.dip0.t-ipconnect.de) |
| 01:38:12 | × | andrey_ quits (~andrey@p200300dbcf2f4300665626c49851c8d7.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 01:42:20 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 01:47:10 | → | srz_ joins (~srz@179.36.126.172) |
| 01:50:05 | × | srz quits (~srz@181.228.49.93) (Ping timeout: 256 seconds) |
| 01:51:07 | × | king_gs quits (~Thunderbi@187.201.220.53) (Read error: Connection reset by peer) |
| 01:52:24 | → | king_gs joins (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) |
| 01:54:32 | × | modnar quits (~modnar@shell.sonic.net) (Ping timeout: 260 seconds) |
| 01:57:06 | → | modnar joins (~modnar@shell.sonic.net) |
| 01:57:18 | × | kaph quits (~kaph@net-2-42-128-205.cust.vodafonedsl.it) (Read error: Connection reset by peer) |
| 01:57:42 | × | modnar quits (~modnar@shell.sonic.net) (Remote host closed the connection) |
| 02:12:53 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:12:53 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:12:53 | finn_elija | is now known as FinnElija |
| 02:17:32 | × | joo-_ quits (~joo-_@fsf/member/joo--) (Ping timeout: 272 seconds) |
| 02:18:14 | × | wroathe quits (~wroathe@user/wroathe) (Read error: Connection reset by peer) |
| 02:18:53 | → | joo-_ joins (~joo-_@87-49-44-29-mobile.dk.customer.tdc.net) |
| 02:18:53 | × | joo-_ quits (~joo-_@87-49-44-29-mobile.dk.customer.tdc.net) (Changing host) |
| 02:18:53 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 02:19:04 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 02:19:04 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 02:19:04 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:23:28 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 02:25:40 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds) |
| 02:26:55 | → | AlexNoo_ joins (~AlexNoo@178.34.162.228) |
| 02:28:41 | × | AlexZenon quits (~alzenon@178.34.163.12) (Ping timeout: 248 seconds) |
| 02:29:13 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 246 seconds) |
| 02:29:55 | × | Alex_test quits (~al_test@178.34.163.12) (Ping timeout: 246 seconds) |
| 02:30:19 | × | AlexNoo quits (~AlexNoo@178.34.163.12) (Ping timeout: 256 seconds) |
| 02:31:21 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 252 seconds) |
| 02:34:19 | → | Alex_test joins (~al_test@178.34.162.228) |
| 02:34:26 | → | AlexZenon joins (~alzenon@178.34.162.228) |
| 02:37:27 | × | king_gs quits (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) (Quit: king_gs) |
| 02:53:33 | × | td_ quits (~td@94.134.91.63) (Ping timeout: 256 seconds) |
| 02:53:51 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 02:54:15 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:55:08 | → | td_ joins (~td@94.134.91.69) |
| 03:00:00 | × | jao quits (~jao@211.68.17.95.dynamic.jazztel.es) (Ping timeout: 260 seconds) |
| 03:00:08 | × | stackdroid18 quits (14094@user/stackdroid) (Quit: hasta la vista... tchau!) |
| 03:04:15 | × | abiss27 quits (~abiss27@user/abiss) (Quit: hasta la vista... tchau!) |
| 03:05:42 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 03:06:02 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:06:03 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 03:06:26 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:07:30 | → | tommd joins (~tommd@97-120-26-41.ptld.qwest.net) |
| 03:08:12 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds) |
| 03:09:31 | → | khumba joins (~khumba@user/khumba) |
| 03:11:22 | → | notzmv joins (~zmv@user/notzmv) |
| 03:11:48 | × | russruss quits (~russruss@my.russellmcc.com) (Ping timeout: 240 seconds) |
| 03:13:45 | → | nate1 joins (~nate@98.45.169.16) |
| 03:14:15 | × | srz_ quits (~srz@179.36.126.172) (Quit: Leaving) |
| 03:16:21 | × | Codaraxis__ quits (~Codaraxis@user/codaraxis) (Quit: Leaving) |
| 03:17:48 | → | russruss joins (~russruss@my.russellmcc.com) |
| 03:21:47 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 03:29:46 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 246 seconds) |
| 03:30:58 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 03:32:31 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 03:33:00 | → | nattiestnate joins (~nate@202.138.250.10) |
| 03:33:29 | × | jargon quits (~jargon@174-22-206-112.phnx.qwest.net) (Quit: Nini.. ZZzz...) |
| 03:33:53 | × | wroathe quits (~wroathe@user/wroathe) (Read error: Connection reset by peer) |
| 03:34:18 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 03:34:18 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 03:34:18 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:35:10 | × | khumba quits (~khumba@user/khumba) () |
| 03:44:33 | × | tommd quits (~tommd@97-120-26-41.ptld.qwest.net) (Ping timeout: 256 seconds) |
| 03:48:28 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 03:50:20 | × | nattiestnate quits (~nate@202.138.250.10) (Quit: WeeChat 3.5) |
| 03:51:11 | → | zaquest joins (~notzaques@5.130.79.72) |
| 03:52:55 | → | kaph joins (~kaph@net-2-42-128-205.cust.vodafonedsl.it) |
| 03:55:19 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 246 seconds) |
| 03:55:27 | × | xff0x quits (~xff0x@om126254226100.33.openmobile.ne.jp) (Read error: Connection reset by peer) |
| 03:59:31 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 246 seconds) |
| 04:01:42 | → | notzmv joins (~zmv@user/notzmv) |
| 04:08:36 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds) |
| 04:11:34 | → | xff0x joins (~xff0x@om126254226100.33.openmobile.ne.jp) |
| 04:19:20 | → | rekahsoft joins (~rekahsoft@cpe001b21a2fd89-cm64777ddc63a0.cpe.net.cable.rogers.com) |
| 04:20:52 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
| 04:27:30 | × | rekahsoft quits (~rekahsoft@cpe001b21a2fd89-cm64777ddc63a0.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 04:30:28 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 248 seconds) |
| 04:33:11 | → | rekahsoft joins (~rekahsoft@cpe001b21a2fd89-cm64777ddc63a0.cpe.net.cable.rogers.com) |
| 04:36:25 | → | mbuf joins (~Shakthi@122.174.202.44) |
| 04:39:28 | × | rekahsoft quits (~rekahsoft@cpe001b21a2fd89-cm64777ddc63a0.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 04:39:50 | → | rekahsoft joins (~rekahsoft@cpe001b21a2fd89-cm64777ddc63a0.cpe.net.cable.rogers.com) |
| 04:45:07 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 04:46:38 | → | king_gs joins (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) |
| 04:46:57 | × | Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection) |
| 05:11:58 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
| 05:13:01 | × | melas quits (~melas@172.77.31.247) (Ping timeout: 246 seconds) |
| 05:16:07 | → | bahamas joins (~lucian@84.232.141.55) |
| 05:25:15 | → | Guest61 joins (~Guest61@14.173.62.239) |
| 05:27:05 | <Guest61> | @help |
| 05:27:05 | <lambdabot> | help <command>. Ask for help for <command>. Try 'list' for all commands |
| 05:27:11 | <Guest61> | list |
| 05:27:15 | <Guest61> | @list |
| 05:27:16 | <lambdabot> | What module? Try @listmodules for some ideas. |
| 05:27:20 | <Guest61> | @listmodules |
| 05:27:20 | <lambdabot> | activity base bf check compose dice dict djinn dummy elite eval filter free fresh haddock help hoogle instances irc karma localtime metar more oeis offlineRC pl pointful poll pretty quote search |
| 05:27:20 | <lambdabot> | seen slap source spell system tell ticker todo topic type undo unlambda unmtl version where |
| 05:27:41 | <Guest61> | @pl \xs n -> take n xs ==> flip take |
| 05:27:42 | <lambdabot> | flip flip (flip take) . ((==>) .) . flip take |
| 05:28:25 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 05:29:16 | <Guest61> | @pl \fn1 fn2 a1 a2 -> fn1 (fn2 a1) (fn2 a2) |
| 05:29:16 | <lambdabot> | join . ((flip . ((.) .)) .) . (.) |
| 05:29:53 | <Guest61> | @pl \fn2 a1 a2 -> (fn2 a1) (fn2 a2) |
| 05:29:53 | <lambdabot> | flip =<< ((.) .) |
| 05:30:30 | <elmyr> | @src (.) |
| 05:30:30 | <lambdabot> | (f . g) x = f (g x) |
| 05:30:49 | <elmyr> | Day 1 of checking if lambdabot is back to Caleskell. |
| 05:31:08 | × | elmyr quits (sid3438@user/dy) (Quit: Updating details, brb) |
| 05:31:17 | → | elmyr joins (sid3438@user/dy) |
| 05:33:24 | × | xff0x quits (~xff0x@om126254226100.33.openmobile.ne.jp) (Read error: Connection reset by peer) |
| 05:40:45 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 05:45:33 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 05:48:03 | × | king_gs quits (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) (Remote host closed the connection) |
| 05:48:21 | → | king_gs joins (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) |
| 05:49:24 | × | bahamas quits (~lucian@84.232.141.55) (Ping timeout: 248 seconds) |
| 05:49:45 | × | rekahsoft quits (~rekahsoft@cpe001b21a2fd89-cm64777ddc63a0.cpe.net.cable.rogers.com) (Ping timeout: 276 seconds) |
| 05:51:19 | → | Guest27 joins (~Guest27@78.173.53.235) |
| 05:51:31 | <Guest27> | hello |
| 05:52:01 | × | Guest27 quits (~Guest27@78.173.53.235) (Client Quit) |
| 06:05:56 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 248 seconds) |
| 06:06:04 | → | melas joins (~melas@172.77.31.247) |
| 06:09:03 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 06:09:21 | → | Kaiepi joins (~Kaiepi@156.34.47.253) |
| 06:17:06 | <ski> | elmyr : you should be checking `type' rather than `src', for that |
| 06:18:51 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 06:20:51 | → | Pickchea joins (~private@user/pickchea) |
| 06:21:45 | → | notzmv joins (~zmv@user/notzmv) |
| 06:23:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 06:29:57 | → | chomwitt joins (~chomwitt@2a02:587:dc19:d600:24ae:3716:1088:6d4d) |
| 06:37:55 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 06:39:17 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 06:40:54 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 06:43:01 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 06:43:18 | → | img joins (~img@user/img) |
| 06:49:15 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds) |
| 06:50:24 | → | random-jellyfish joins (~random-je@user/random-jellyfish) |
| 06:54:03 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 06:55:48 | → | kenran joins (~kenran@200116b82be152003bcf840303205486.dip.versatel-1u1.de) |
| 06:56:33 | × | king_gs quits (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) (Remote host closed the connection) |
| 06:57:52 | → | king_gs joins (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) |
| 06:58:55 | → | bahamas joins (~lucian@84.232.141.55) |
| 07:03:46 | <tomsmeding> | What was the deal with (.) earlier then |
| 07:06:15 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 07:11:23 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 07:14:24 | ← | f-a parts (f2a@f2a.jujube.ircnow.org) () |
| 07:17:40 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 07:17:50 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 07:18:51 | × | kaph quits (~kaph@net-2-42-128-205.cust.vodafonedsl.it) (Ping timeout: 260 seconds) |
| 07:22:02 | → | whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com) |
| 07:23:37 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds) |
| 07:26:59 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 07:27:47 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 07:29:12 | → | xff0x joins (~xff0x@om126254226100.33.openmobile.ne.jp) |
| 07:31:21 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 07:33:06 | × | melas quits (~melas@172.77.31.247) (Ping timeout: 276 seconds) |
| 07:39:06 | → | notzmv joins (~zmv@user/notzmv) |
| 07:46:30 | <c_wraith> | :t (\f g -> pure f =<< g) `asTypeOf` (.) -- tomsmeding |
| 07:46:31 | <lambdabot> | (a -> b) -> (a -> a) -> a -> b |
| 07:47:05 | <tomsmeding> | c_wraith: so, fmap? |
| 07:47:10 | <c_wraith> | I commented that `pure f =<< g' is a very long walk to reimplement (.) |
| 07:47:30 | <tomsmeding> | Ah, now I remember people saying that lambdabot had (.) = fmap at some point :) |
| 07:47:47 | <c_wraith> | yep. that was the "caleskell" being referred to |
| 07:47:53 | <tomsmeding> | Right |
| 07:50:01 | <tomsmeding> | So fmap and (<<<) both generalise (.), I wonder if those are incompatible |
| 07:50:29 | → | MoC joins (~moc@user/moc) |
| 07:50:37 | <c_wraith> | :t (>>>) `asTypeOf` fmap |
| 07:50:38 | <lambdabot> | (a -> a) -> (a -> a) -> a -> a |
| 07:50:44 | <c_wraith> | err |
| 07:50:48 | <c_wraith> | :t (<<<) `asTypeOf` fmap |
| 07:50:50 | <lambdabot> | (b -> c) -> (a -> b) -> a -> c |
| 07:51:10 | <c_wraith> | between the two of them, every polytypic variable in the other is monomorphized |
| 07:51:11 | × | Hash quits (~Hash@hey.howstoned.ru) (Read error: Connection reset by peer) |
| 07:51:18 | <tomsmeding> | You'd need an fmap' that takes a 'cat a b' as the function argument |
| 07:51:24 | <tomsmeding> | But that makes no sense for some functors |
| 07:51:48 | <tomsmeding> | So they are indeed incompatible generalisations |
| 07:52:55 | × | MoC quits (~moc@user/moc) (Read error: Connection reset by peer) |
| 07:52:59 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
| 07:53:04 | → | MoC_ joins (~moc@user/moc) |
| 07:53:21 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 07:53:45 | <tomsmeding> | Hm, `class Category cat => CFunctor cat f where fmap :: cat a b -> cat (f a) (f b)` maybe, with `type Functor = CFunctor (->)` |
| 07:53:47 | → | Hash joins (~Hash@hey.howstoned.ru) |
| 07:56:07 | → | notzmv joins (~zmv@user/notzmv) |
| 07:56:35 | <tomsmeding> | Hm, then you'd want `instance CFunctor cat (cat c)` but not sure whether that can work in general |
| 07:58:40 | × | cigsender quits (~cigsender@cpe5c7d7db831c8-cm5c7d7db831c6.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds) |
| 07:59:22 | MoC_ | is now known as MoC |
| 08:01:04 | → | cigsender joins (~cigsender@cpe5c7d7db831c8-cm5c7d7db831c6.cpe.net.cable.rogers.com) |
| 08:05:27 | → | Tuplanolla joins (~Tuplanoll@91-159-68-39.elisa-laajakaista.fi) |
| 08:07:20 | × | kmein quits (~weechat@user/kmein) (Quit: ciao kakao) |
| 08:07:53 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 248 seconds) |
| 08:07:57 | → | kmein joins (~weechat@user/kmein) |
| 08:08:00 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 08:08:36 | × | xff0x quits (~xff0x@om126254226100.33.openmobile.ne.jp) (Ping timeout: 248 seconds) |
| 08:09:01 | × | qy quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Quit: WeeChat 3.4) |
| 08:10:07 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 08:10:36 | → | xff0x joins (~xff0x@om126254226100.33.openmobile.ne.jp) |
| 08:11:10 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 08:13:40 | → | _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl) |
| 08:15:57 | → | zeenk joins (~zeenk@2a02:2f04:a004:9b00:1efc:c1cf:378d:8b3d) |
| 08:25:40 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 08:29:01 | × | bahamas quits (~lucian@84.232.141.55) (Ping timeout: 246 seconds) |
| 08:30:55 | → | bahamas joins (~lucian@84.232.141.55) |
| 08:31:21 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 248 seconds) |
| 08:33:14 | × | kimjetwav quits (~user@2607:fea8:2362:b400:897f:4fc4:a1cd:a588) (Ping timeout: 250 seconds) |
| 08:35:52 | × | bahamas quits (~lucian@84.232.141.55) (Ping timeout: 260 seconds) |
| 08:39:17 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 08:43:25 | → | notzmv joins (~zmv@user/notzmv) |
| 08:48:40 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 08:49:32 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 08:53:15 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 08:53:57 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 08:55:01 | × | king_gs quits (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) (Quit: king_gs) |
| 08:55:38 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 09:02:34 | <mikoto-chan> | how do I install libmpd with cabal? |
| 09:02:38 | <mikoto-chan> | I get a weird error |
| 09:02:47 | <mikoto-chan> | Cannot build the executables in the package libmpd because it does not |
| 09:02:50 | <mikoto-chan> | contain any executables |
| 09:06:31 | <maerwald[m]> | mikoto-chan: the library? |
| 09:10:34 | <mikoto-chan> | maerwald[m]: --lib :| |
| 09:12:04 | <mikoto-chan> | can I ask questions about xmobar here? |
| 09:12:26 | <mikoto-chan> | the mpd plugin isn't exactly working |
| 09:12:33 | <mikoto-chan> | do I need to use the system-wide daemon? |
| 09:13:14 | <mikoto-chan> | yes seems like it |
| 09:13:22 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 09:17:26 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 09:17:26 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 09:17:48 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 09:18:08 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 09:19:43 | × | gabriel_sevecek quits (~gabriel@188-167-229-200.dynamic.chello.sk) (Quit: WeeChat 3.5) |
| 09:20:22 | → | gabriel_sevecek joins (~gabriel@188-167-229-200.dynamic.chello.sk) |
| 09:26:40 | → | bahamas joins (~lucian@84.232.141.55) |
| 09:29:47 | × | gabriel_sevecek quits (~gabriel@188-167-229-200.dynamic.chello.sk) (Ping timeout: 240 seconds) |
| 09:30:28 | <AndreasK> | I have a possible stupid question. Is `cabal install cabal-install` supposed to work? |
| 09:31:06 | <AndreasK> | And if the answer is yes, which ghc versions are supposed to build the latest version that way? |
| 09:32:35 | × | bahamas quits (~lucian@84.232.141.55) (Ping timeout: 260 seconds) |
| 09:33:30 | <AndreasK> | I guess it just doesn'T support building with 9.2 yet |
| 09:34:25 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 09:34:41 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:34:47 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 09:37:08 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 09:39:10 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 09:49:25 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 09:52:36 | × | jespada quits (~jespada@146.70.119.114) (Ping timeout: 248 seconds) |
| 09:53:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 09:54:18 | → | jespada joins (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
| 09:58:23 | <AndreasK> | Or 9.0 |
| 10:10:22 | → | flupe joins (~baboum@radon.sbi.re) |
| 10:11:42 | → | coot joins (~coot@213.134.190.95) |
| 10:16:57 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 10:22:10 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 10:22:56 | → | Vajb joins (~Vajb@2001:999:400:9bc1:d5dd:7e53:33b:56) |
| 10:24:28 | AlexNoo_ | is now known as AlexNoo |
| 10:24:43 | → | oxide joins (~lambda@user/oxide) |
| 10:25:38 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:26:50 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 10:28:35 | × | xff0x quits (~xff0x@om126254226100.33.openmobile.ne.jp) (Read error: Connection reset by peer) |
| 10:29:15 | × | oxide quits (~lambda@user/oxide) (Ping timeout: 276 seconds) |
| 10:31:08 | → | oxide joins (~lambda@user/oxide) |
| 10:31:59 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 10:35:25 | <maerwald> | AndreasK: it works sometimes |
| 10:36:15 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 10:37:00 | <AndreasK> | As far as I can tell it should work with 8.10 but on this box my oldest GHC is 9.0.1 |
| 10:38:54 | → | xff0x joins (~xff0x@om126254226100.33.openmobile.ne.jp) |
| 10:39:56 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 10:41:14 | × | zeenk quits (~zeenk@2a02:2f04:a004:9b00:1efc:c1cf:378d:8b3d) (Quit: Konversation terminated!) |
| 10:42:01 | × | Guest61 quits (~Guest61@14.173.62.239) (Quit: Client closed) |
| 10:43:41 | → | melas joins (~melas@172.77.31.247) |
| 10:44:06 | → | gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
| 10:45:52 | → | frost joins (~frost@user/frost) |
| 10:48:36 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 248 seconds) |
| 10:50:06 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:50:27 | → | cyphase joins (~cyphase@user/cyphase) |
| 10:50:35 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds) |
| 10:50:59 | <maerwald> | AndreasK: can you install 8.10? |
| 10:52:19 | <AndreasK> | Yes. But I think I will just download a 3.6 binary instead. |
| 10:52:50 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:53:53 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 11:00:12 | → | MajorBiscuit joins (~MajorBisc@c-001-007-017.client.tudelft.eduvpn.nl) |
| 11:05:47 | → | kaph joins (~kaph@net-2-42-128-205.cust.vodafonedsl.it) |
| 11:05:55 | ← | jakalx parts (~jakalx@base.jakalx.net) (Disconnected: Replaced by new connection) |
| 11:05:56 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 11:08:47 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 11:18:16 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 11:27:07 | × | fendor_ quits (~fendor@77.119.200.1.wireless.dyn.drei.com) (Remote host closed the connection) |
| 11:28:30 | × | asivitz quits (uid178348@id-178348.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 11:28:39 | → | ubert1 joins (~Thunderbi@p200300ecdf158841296f298839ed6584.dip0.t-ipconnect.de) |
| 11:40:07 | <dminuoso> | I have a bunch of `IO T` where T has Monoid, is some shorter version of `fmap mconcat <$> sequence [a, b, c]`? |
| 11:40:17 | → | xaotuk joins (~sasha@net234-32-245-109.mbb.telenor.rs) |
| 11:40:45 | × | oxide quits (~lambda@user/oxide) (Ping timeout: 276 seconds) |
| 11:46:23 | <[exa]> | dminuoso: `fold` with Ap? https://hackage.haskell.org/package/base-4.16.1.0/docs/Data-Monoid.html#g:6 |
| 11:47:28 | → | oxide joins (~lambda@user/oxide) |
| 11:49:40 | <dminuoso> | [exa]: Mmm ah yes, I think thats what I was looking for. Not convinced this is better. |
| 11:50:42 | <[exa]> | :t getAp . fold . fmap Ap |
| 11:50:44 | <lambdabot> | forall k (t :: * -> *) (f :: k -> *) (a :: k). (Foldable t, Monoid (Ap f a), Functor t) => t (f a) -> f a |
| 11:51:20 | <[exa]> | would get competitive if there'd be some kind of `foldVia Ap` :D |
| 11:51:33 | <dminuoso> | Well that' |
| 11:51:37 | <dminuoso> | Well that's `ala` territory. |
| 11:51:53 | <dminuoso> | :t ala |
| 11:51:54 | <lambdabot> | (Functor f, Rewrapped s t, Rewrapped t s) => (Unwrapped s -> s) -> ((Unwrapped t -> t) -> f s) -> f (Unwrapped s) |
| 11:51:57 | <[exa]> | true |
| 11:52:22 | <[exa]> | is there a rewrapper? |
| 11:52:39 | <dminuoso> | rewrapper? |
| 11:53:28 | <dminuoso> | :t overF |
| 11:53:29 | <lambdabot> | error: |
| 11:53:30 | <lambdabot> | • Variable not in scope: overF |
| 11:53:30 | <lambdabot> | • Perhaps you meant one of these: |
| 11:55:39 | <[exa]> | :t al Ap foldMap |
| 11:55:40 | <lambdabot> | error: |
| 11:55:40 | <lambdabot> | • Variable not in scope: |
| 11:55:40 | <lambdabot> | al :: (f0 a0 -> Ap f0 a0) -> ((a1 -> m0) -> t0 a1 -> m0) -> t |
| 11:55:45 | <[exa]> | too much `a` |
| 11:55:59 | <[exa]> | :t ala Ap foldMap |
| 11:56:01 | <lambdabot> | forall k1 (t :: * -> *) (g :: k1 -> *) (b :: k1). (Foldable t, Monoid (Ap g b)) => t (g b) -> g b |
| 11:56:27 | <[exa]> | still I like the sequence one better :] |
| 11:56:31 | <dminuoso> | > ala Ap foldMap [pure [1,2] :: IO [Int], pure [3,4]] |
| 11:56:33 | <lambdabot> | <IO [Int]> |
| 11:56:47 | <dminuoso> | You use this if you have your coworkers. |
| 11:56:50 | <dminuoso> | s/have/hate/ |
| 11:57:07 | <dminuoso> | And ideally you use not `newtypes` but `lens` for it. |
| 11:57:22 | <dminuoso> | (definitely not coercible-utils) |
| 11:58:01 | <[exa]> | :] |
| 11:58:34 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 12:00:04 | × | melas quits (~melas@172.77.31.247) (Ping timeout: 246 seconds) |
| 12:01:23 | <[Leary]> | dminuoso: Isn't it just "fold"? We have Monoid a => Monoid (IO a). |
| 12:04:42 | juri__ | is now known as juri_ |
| 12:08:36 | × | ubert1 quits (~Thunderbi@p200300ecdf158841296f298839ed6584.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 12:09:29 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 12:12:48 | <[exa]> | [Leary]: something needs to tell it how to fold the applicatives |
| 12:13:22 | <[exa]> | ah for IO that could work, yes |
| 12:13:35 | <[exa]> | cool. |
| 12:14:15 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 12:14:49 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 12:15:53 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 12:20:06 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 12:20:36 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds) |
| 12:21:24 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 12:22:45 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 12:30:04 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 12:30:14 | → | coot joins (~coot@213.134.190.95) |
| 12:39:16 | × | gurkenglas quits (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 246 seconds) |
| 12:40:48 | → | xkuru joins (~xkuru@user/xkuru) |
| 12:45:31 | → | dextaa4 joins (~dextaa@user/dextaa) |
| 12:56:43 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 12:59:30 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 13:01:28 | × | raym quits (~raym@user/raym) (Ping timeout: 250 seconds) |
| 13:02:10 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection) |
| 13:02:15 | → | raym joins (~raym@user/raym) |
| 13:02:35 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 13:04:07 | × | xff0x quits (~xff0x@om126254226100.33.openmobile.ne.jp) (Ping timeout: 246 seconds) |
| 13:05:55 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 13:06:14 | × | AlexZenon quits (~alzenon@178.34.162.228) (Ping timeout: 250 seconds) |
| 13:07:22 | → | xff0x joins (~xff0x@om126254226100.33.openmobile.ne.jp) |
| 13:10:30 | → | AlexZenon joins (~alzenon@178.34.162.228) |
| 13:27:35 | → | MoC joins (~moc@user/moc) |
| 13:29:07 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 240 seconds) |
| 13:29:34 | → | bahamas joins (~lucian@84.232.141.55) |
| 13:33:54 | → | shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
| 13:39:29 | → | tochicool joins (~tochicool@user/tochicool) |
| 13:40:13 | → | Simon98 joins (~Simon@ipbcc036f5.dynamic.kabel-deutschland.de) |
| 13:40:29 | <Simon98> | Hello there! Is there a list of adjustments that I can make with :set in GHCI? |
| 13:41:12 | <Simon98> | Also im looking for a :set action that was called something with ...morpho... or so and I think it would specify the :t outputs and not always just say "Num". Do you know how it is called? |
| 13:41:12 | <geekosaur> | https://downloads.haskell.org/ghc/9.0.2/docs/html/users_guide/ghci.html#the-set-and-seti-commands |
| 13:41:37 | <Simon98> | Ahh I think it was XNoMonomorphismRestriction |
| 13:41:42 | <Simon98> | Thanks geekosaur |
| 13:42:08 | <geekosaur> | you may be thinking of :set -XMonomorphismRestriction, but it won't affect :t directly like that |
| 13:42:26 | <geekosaur> | types donb't get defaulted until applied |
| 13:42:59 | <Simon98> | what do you mean by that last line? |
| 13:43:16 | <geekosaur> | you need a fully applied expression for monomorphization to happen |
| 13:43:36 | <Simon98> | And also the link: There are indeed some things that work with :set, but it doesn't look like a complete list or so. Or is there simply no complete list since there can be new :set specifications added or so? |
| 13:44:03 | → | nut joins (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 13:44:24 | <geekosaur> | :set also allows any ghc option at https://downloads.haskell.org/ghc/9.0.2/docs/html/users_guide/flags.html that is marked Dynamic |
| 13:45:08 | <geekosaur> | and any extension selectable with -X, of which I don't think there's a single compact list |
| 13:45:10 | <Simon98> | what does marked Dynamic mean? |
| 13:45:29 | <Simon98> | I see, no -X list |
| 13:45:42 | <geekosaur> | the link I gave you is a table of options, whether an option is dynamic or not is listed in the third column of the table |
| 13:46:47 | <geekosaur> | you can get a full list of -X options with `ghc --supported-extensions` |
| 13:47:05 | <geekosaur> | (sadly, with no documentation. but you can then search the manual) |
| 13:47:33 | <Simon98> | Wow, there are a lot |
| 13:47:45 | <Simon98> | I wonder what all of them do haha |
| 13:47:57 | <Simon98> | Another question: |
| 13:50:24 | <Simon98> | I'm new to Haskell and there just seem to be some huge differences to other, more common languages like Java or JavaScript. Not just regarding the programming paradigma but also with things like this :set and so on. |
| 13:50:25 | <Simon98> | Do you know if there are big software branches or industries out there where Haskell is used a lot or where it might even be the standard or are most of the problems that occur in the major branches just solved more easily with other languages? |
| 13:51:00 | <Lycurgus> | yes |
| 13:51:15 | <Simon98> | Ok, great that you know it! What would it be? |
| 13:52:23 | <Lycurgus> | it? |
| 13:52:48 | <Lycurgus> | TIOBE might be what ur lookin for |
| 13:53:39 | × | bahamas quits (~lucian@84.232.141.55) (Ping timeout: 260 seconds) |
| 13:53:44 | <Simon98> | Yeah so Haskell is pretty low there. But still, are there branches where it is de facto standard? Due to whatever reason? |
| 13:54:16 | <Lycurgus> | No |
| 13:54:22 | <maerwald[m]> | Most of industry doesn't solve problems, but needs just another iteration of the same thing |
| 13:54:35 | <maerwald[m]> | Languages don't matter to them, but engineers do |
| 13:54:49 | <Lycurgus> | although it's cachet in academe was very high, but peaked in the last decade imo |
| 13:54:56 | <Simon98> | What do you mean by your first line mearwald? |
| 13:55:09 | <maerwald[m]> | And engineers think everything is about programming languages |
| 13:55:29 | <Lycurgus> | this channel for example has about half its population of a decade ago |
| 13:56:01 | <Simon98> | Why would you say is it popular in academia? (at least at my uni) |
| 13:56:01 | <hpc> | that's not a very good measure, that entire population loss is explained by the freenode debacle |
| 13:56:22 | <Lycurgus> | what maerwald[m] is referring to is a character of modern IT that is different from it's youth |
| 13:56:44 | <Lycurgus> | which is that IT became competent but dull |
| 13:56:53 | <Lycurgus> | real innovation dried up |
| 13:56:56 | <Simon98> | But why another iteration of the same thing? |
| 13:57:15 | <maerwald[m]> | To me, engineering would spend 60% of the time on specifications, then come up with the most constrained language (or DSL) possible that can be checked against the spec and doesn't require overly smart programmers. |
| 13:58:02 | <Lycurgus> | mostly because IT became a multi trillion dollar industry |
| 13:58:02 | <Simon98> | This is how you would like it to be or how you think it currently is? |
| 13:58:56 | <Lycurgus> | Simon98, you should address individuals as such when using first person |
| 13:58:56 | <Simon98> | Isn't IT one of the biggest innovators currently? Yet alone due to its size as Lycurgus says |
| 13:59:13 | <maerwald[m]> | But currently everyone likes turing complete general purpose languages and is interested in more expressivity, not less. |
| 13:59:14 | <Lycurgus> | i just said it wasn't |
| 14:00:26 | × | causal quits (~user@50.35.83.177) (Quit: WeeChat 3.5) |
| 14:00:31 | <Simon98> | Yeah, you're right. Maybe I'm surprised that it's not |
| 14:00:40 | <ProofTechnique> | Is there an established name for `f :: Functor f => f (a -> b, c -> d) -> f (a -> c -> (b, d)) = fmap (curry . uncurry bimap)`? |
| 14:02:39 | <ProofTechnique> | IT is incredibly stagnant. It's just "here are all the business problems of decades ago, but now do it on someone else's infrastructure and bigger". All the "new" work is in crypto and that's literally worse than nothing. |
| 14:03:07 | <Simon98> | Interesting, now I get it |
| 14:03:16 | <Simon98> | But why is crypto a problem in your opinion? |
| 14:03:30 | <darkling> | Yeah, I'm fed up of different ways to do RPC. |
| 14:03:58 | <maerwald[m]> | Crypto is (technically) one of the biggest challenges. But no one knows what business problems it sovles |
| 14:04:08 | <ProofTechnique> | Environmental impact, governance, lack of utility. |
| 14:04:26 | <maerwald[m]> | ProofTechnique: environmental impact? |
| 14:04:34 | <ProofTechnique> | It's just a very fancy way to create private currency, which has always been bad |
| 14:05:00 | <maerwald[m]> | You're aware that proof of stake has basically no significant environmental impact? |
| 14:05:22 | <ProofTechnique> | Cool, let me know when _anyone_ that matters is using PoS |
| 14:05:29 | <maerwald[m]> | Cardano |
| 14:05:31 | <ProofTechnique> | I'm sure ETH will do it any day now |
| 14:05:48 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt) |
| 14:05:51 | <tochicool> | any way to get GHC to deduce the right constraint without pattern matching on the constructor? https://paste.tomsmeding.com/hxyLAkke |
| 14:06:01 | <maerwald[m]> | The biggest blockchain written in Haskell |
| 14:06:08 | <Simon98> | Cardano? |
| 14:06:09 | <ProofTechnique> | It's a fancy way to make private money, which is actively corrosive to democratic control of society |
| 14:06:10 | <maerwald[m]> | Seems you're not informed |
| 14:06:36 | → | bahamas joins (~lucian@84.232.141.55) |
| 14:06:40 | <ProofTechnique> | I'm incredibly aware of Cardano |
| 14:06:43 | <maerwald[m]> | I think that's as much BS as anything else about money and banks |
| 14:07:02 | <ProofTechnique> | I'm so excited to see how the neocolonialism in Africa pans out |
| 14:07:10 | <ski> | tochicool : i think, no |
| 14:07:25 | <tochicool> | :( why not? |
| 14:08:05 | <maerwald[m]> | ProofTechnique: I'm not into crypto, I just think most of the criticism is hypocritical |
| 14:08:29 | <ski> | i don't think there's any "you've exhausted all other cases, so it must correspond to the remaining case", while not matching on a GADT data constructor |
| 14:08:38 | <ProofTechnique> | Crypto does not solve any problem except how to part fools from their money and how to make the already exploitative relations of capitalism _even less regulated_ |
| 14:09:42 | <ProofTechnique> | To be clear, I'm also against banks, but my preferred solution is to dismantle banks, not create dozens of hyper-exploitative bank-fiefs |
| 14:11:02 | <Simon98> | ProofTechnique Can you think of at least one major usecase for crypto? |
| 14:11:05 | <maerwald[m]> | Seems all very shallow critique to me, but you have some sympathies with https://github.com/sdiehl/popping-the-crypto-bubble |
| 14:11:07 | <ProofTechnique> | There are none |
| 14:11:37 | <tochicool> | ski: i see, thanks. i hoped it might be possible as ghc can do smarter things than that. would be really helpful if you had a lot of constructors with the same index. |
| 14:11:42 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 14:12:18 | <maerwald[m]> | People also thought the radio or TV is going to end the world as we know it |
| 14:12:32 | × | nut quits (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 250 seconds) |
| 14:12:46 | <ProofTechnique> | Radio didn't use the entire electrical output of the Netherlands |
| 14:13:35 | <tochicool> | it's harder to see the benefits of bitcoin from the first world |
| 14:13:37 | <maerwald[m]> | Neither does proof of stake |
| 14:13:47 | <maerwald[m]> | You're being deliberately imprecise |
| 14:15:03 | <ski> | tochicool : a somewhat similar example to this would be `Right x >>= k = k x; e >>= _ = e', where we'd like `e' to bound to have type `forall a. Either e a' (where `k :: a -> Either e b'), so that it can be used at type `Either e b' |
| 14:15:48 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 14:16:10 | <ski> | @src Either (>>=) |
| 14:16:10 | <lambdabot> | Left l >>= _ = Left l |
| 14:16:10 | <lambdabot> | Right r >>= k = k r |
| 14:16:25 | <ski> | (note the annoying code repetition) |
| 14:16:58 | <ProofTechnique> | Then make an actual point instead of just complaining that I'm not sufficiently deferential to the claims of known con artists |
| 14:17:24 | hpc | . o O ( are lisp programmers... cons artists? ) |
| 14:17:48 | → | ccntrq joins (~Thunderbi@2a01:c22:8c0e:ad00:ca80:eae8:cb5b:57af) |
| 14:17:55 | <ProofTechnique> | More of a used `car` salesperson |
| 14:18:28 | <hpc> | never bring a lisp programmer to a party, they'll defun it |
| 14:19:41 | <tochicool> | ski : yes that is annoying. are there any planned extensions the type system to help with this or is there some fundamental reason why this isn't supported? |
| 14:20:49 | <ski> | neither, afai aware |
| 14:21:42 | → | ccntrq1 joins (~Thunderbi@dynamic-095-112-198-016.95.112.pool.telefonica.de) |
| 14:21:48 | × | ccntrq quits (~Thunderbi@2a01:c22:8c0e:ad00:ca80:eae8:cb5b:57af) (Ping timeout: 240 seconds) |
| 14:21:49 | ccntrq1 | is now known as ccntrq |
| 14:21:56 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 14:21:56 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 14:21:56 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:22:49 | <ski> | (i think the problem i sketched, at least, could probably be speced and implemented without *too* much trouble (although it might turn out to be more involved than expected, of course) .. but, in any case, it would be a complication, and so people would be asking whether it's worth it, compared to how much/often people would benefit from it) |
| 14:23:00 | × | hiredman quits (~hiredman@frontier1.downey.family) (Ping timeout: 248 seconds) |
| 14:23:40 | <ski> | (for the GADT one, it's not as clear to me how one'd want this to behave, systematically. but then i've not pondered this before, either) |
| 14:24:02 | → | Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
| 14:24:07 | → | hiredman joins (~hiredman@frontier1.downey.family) |
| 14:27:16 | → | Guest9113 joins (~Guest91@84-75-254-89.dclient.hispeed.ch) |
| 14:28:27 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 14:28:45 | <Simon98> | If I have a function like: allSame a b c = (a==b && a==c) && (c==b) with allSame :: Eq a => a -> a -> a -> Bool |
| 14:28:45 | <Simon98> | Can someone explain to me what each arrow exactly stands for? |
| 14:29:03 | <Simon98> | Ahhh |
| 14:29:27 | <Simon98> | No |
| 14:29:33 | <Simon98> | But the a stands for Bool |
| 14:29:51 | <ski> | no |
| 14:30:01 | <Simon98> | Crap |
| 14:30:03 | <Simon98> | Right |
| 14:30:33 | <Simon98> | A stands for the type that my a b c have. But if they have different types? |
| 14:30:39 | <Simon98> | a* |
| 14:31:44 | <hpc> | if they have different types, you can't use (==) with them |
| 14:31:48 | <geekosaur> | they can't |
| 14:31:49 | <ski> | allSame :: Eq a => a -> a -> a -> Bool |
| 14:31:51 | <ski> | -- params&result ^ a ^ b ^ c ^ result |
| 14:31:59 | <hpc> | > "five" == 5 -- not valid |
| 14:32:00 | <lambdabot> | error: |
| 14:32:00 | <lambdabot> | • No instance for (Num [Char]) arising from the literal ‘5’ |
| 14:32:00 | <lambdabot> | • In the second argument of ‘(==)’, namely ‘5’ |
| 14:32:32 | <ski> | also, `(==)' ought to be symmetric and transitive, so you should be able to remove one of the equality checks |
| 14:32:49 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 14:33:20 | <ski> | `a' is the type of the three values that are being compared for equality. the `->'s come after each parameter/argument type. the result type comes last |
| 14:34:25 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 256 seconds) |
| 14:34:30 | → | nut joins (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 14:34:40 | <Simon98> | So e. g. allSame 1 2 3 |
| 14:34:41 | <Simon98> | is basically |
| 14:34:41 | <Simon98> | Eq a => 1 -> 2 -> 3 -> false |
| 14:34:42 | <Simon98> | ? |
| 14:34:52 | <ski> | the `=>' arrow separates the constraint context (to the left) from the usual (parameter and result types) signature. `Eq a' is a constraint that says that you can only use this operation (`allSame'), in case the argument type `a' is an instance of the type class `Eq', which is the case if it supports equality (checking) (`(==)' and `(/=)') |
| 14:34:57 | <ski> | no |
| 14:35:15 | <ski> | if `1',`2',`3' there have type `Integer', then, for this call to `allSame', `a' becomes `Integer' |
| 14:35:18 | <ski> | iow |
| 14:35:20 | <Simon98> | What do i use for the first a? And where does the "Eq" come from? Is it like "Eq a => a -> a -> a -> Bool" is the description for each "==" comparison? |
| 14:35:21 | <ski> | allSame :: Eq a => a -> a -> a -> Bool |
| 14:35:22 | <ski> | becomes |
| 14:35:33 | <ski> | allSame :: Eq Integer => Integer -> Integer -> Integer -> Bool |
| 14:35:47 | <ski> | but since `Eq Integer' holds, it's a known fact, this simplifies to just |
| 14:35:52 | <ski> | allSame :: Integer -> Integer -> Integer -> Bool |
| 14:36:21 | <ski> | (which then gives the actual type used for this call to `allSame') |
| 14:36:52 | <ski> | the `Eq a' constraint comes because you're calling `(==)', which has type `Eq a => a -> a -> Bool' |
| 14:37:24 | <ski> | you can only do equality checking on values of a type that supports equality checking (a type that is an instance of `Eq') |
| 14:38:03 | <Simon98> | very interesting |
| 14:38:10 | <Simon98> | but wait |
| 14:38:10 | <tomsmeding> | Read `Eq a => a -> a -> Bool` like "if `Eq a` holds, then this has type `a -> a -> Bool`" |
| 14:38:31 | <tomsmeding> | Or, well, that's one way to read it, at least |
| 14:38:47 | <ski> | so, for that to work, either (a) you need to use some particular type (that is known to be an instance of `Eq'), like `Integer', or `[(String,Bool)]' or something; or (b) you can delegate the responsibility for ensuring that `a' is in `Eq', which is what your current `allSame' does (because it has `Eq a' as a constraint in *its* type signature) |
| 14:39:03 | × | bahamas quits (~lucian@84.232.141.55) (Ping timeout: 256 seconds) |
| 14:39:13 | <Simon98> | But what do you mean with "if `Eq a` holds"? Holds what? |
| 14:39:26 | <geekosaur> | different usage of "holds" |
| 14:39:37 | <geekosaur> | try "if a is a type that has an Eq instance" |
| 14:39:44 | <ski> | "`Eq a' holds" is a brief way to say "`a' is an instance of `Eq'" or "there is an `Eq a' instance" |
| 14:40:23 | <ski> | `Eq Integer' holds, because, somewhere in the base library, there is a declaration |
| 14:40:29 | <ski> | instance Eq Integer |
| 14:40:29 | <ski> | where |
| 14:40:36 | <ski> | ... == ... = ... |
| 14:40:39 | <ski> | ... /= ... = ... |
| 14:40:39 | <geekosaur> | importantly, only *types* are typeclass instances, not values |
| 14:40:52 | <Simon98> | Instead of "is an instance of" could also be said: "a is an object of something that inherits from the class Eq" or so? |
| 14:41:15 | <ski> | that declaration gives the actual implementation (the code) that will be run, when calling `(==)' and `(/=)' on `Integer's |
| 14:41:22 | <geekosaur> | typeclasses are not OOP |
| 14:41:29 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 248 seconds) |
| 14:41:31 | <Simon98> | Ah right |
| 14:41:38 | <ski> | Simon98 : no, `a' is not an object (objects are values). `a' is a type |
| 14:41:48 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 14:41:50 | <ski> | `a' doesn't exist at run-time |
| 14:42:02 | <ski> | (instances do, though) |
| 14:42:56 | <Simon98> | Ohhh, but ´a` (lets say, it's Integer in our example) is not just in instance of Eq but also of many other classes (?) like Num, right? |
| 14:43:03 | <Simon98> | or maybe not "many" but still |
| 14:43:05 | <[exa]> | Simon98: the intuition from OOP "traits" is kinda useful, but there are significant differences from the common OOP use. Most notably, typeclasses aren't objects but actual predicates, a bit more like c++ concepts |
| 14:43:08 | <tomsmeding> | Simon98: don't get confused by the _type_ `a` being called the same as the first _argument_ to the function, also called `a` |
| 14:43:15 | <tomsmeding> | They're completely different things |
| 14:43:21 | <ski> | Simon98 : sure, yes |
| 14:44:11 | <ski> | (it might be helpful to rename the parameters to say `x',`y',`z', to avoid confusing them with the type variables in the type signature) |
| 14:44:43 | <Simon98> | tomsmeding Ohhh, right |
| 14:45:01 | <Simon98> | ski Ohh, I'll try that |
| 14:45:08 | <Simon98> | So helpful all of you guys, thanks a lot ! |
| 14:45:17 | <Simon98> | So: |
| 14:45:23 | <ski> | (eventually, you get used to the distinction, and then the name-punning can be useful) |
| 14:45:59 | ski | still doesn't like punning a type constructor with a data constructor, though |
| 14:46:00 | × | nut quits (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 276 seconds) |
| 14:46:19 | <ski> | (i guess, partially, because the scope of those are not local) |
| 14:47:21 | <Simon98> | If I understand correctly now, "allSame :: Eq a => a -> a -> a -> Bool" is not an description of what the function "allSame" actually does (you could just guess that it does comparation) but it is just an description (or a guideline?) of the Types used and part of that function? |
| 14:47:43 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 14:49:34 | <Simon98> | ski Hmm, the renaming didn't work as expected: Prelude> allSame x y z = (x==y && y==z) |
| 14:49:35 | <Simon98> | allSame :: Eq a => a -> a -> a -> Bool |
| 14:50:14 | <[exa]> | Simon98: yes, a "description of the admissible types" would work. If you know C++, in C++ it would be something like `template<typename a> bool allSame(a, a, a);` |
| 14:51:33 | <[exa]> | Simon98: btw try removing the `&& y==z` part from the comparison and see what happens with the type. |
| 14:52:13 | <ski> | Simon98 : why didn't you expect that ? |
| 14:52:27 | × | ccntrq quits (~Thunderbi@dynamic-095-112-198-016.95.112.pool.telefonica.de) (Remote host closed the connection) |
| 14:52:29 | <ski> | (it looks like the result you got would be what i would expect ..) |
| 14:52:47 | <ski> | the parameter (values) are `x',`y',`z'. their common type is `a' |
| 14:52:59 | <[exa]> | Simon98: for comparison again, c++ version for your unexpected result is: `template<typename a> allSame(a x, a y, a z) {...}` |
| 14:53:20 | ski | idly wonders whether Simon98 even has seen C++ |
| 14:53:33 | <[exa]> | ah. |
| 14:54:04 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 14:54:25 | <ski> | (asking, not insinuating) |
| 14:55:05 | <[exa]> | as usual, I didn't really read much of scrollback. :] |
| 14:55:51 | → | nate1 joins (~nate@98.45.169.16) |
| 14:59:41 | ski | . o O (: hindsight, what's that ? :) |
| 14:59:42 | <Simon98> | [exa] I'm not familiar with C++ but your notation reminds me of Java Generics |
| 15:00:20 | <ski> | yea, in Java, it'd be `<a> allSame(a x,a y,a z) { ... }', iirc |
| 15:00:21 | <Simon98> | Why is there sometimes a * before your name ski and your Name is not before the time? |
| 15:00:23 | <Simon98> | in the chat |
| 15:00:31 | <Simon98> | Ohhhhhhhhhhhhh |
| 15:00:33 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:00:36 | ski | glances around nervously |
| 15:00:41 | <ski> | it's called an ACTION |
| 15:00:44 | <Simon98> | So it can somehow be compared to Java Generics? |
| 15:00:47 | <ski> | try entering the following : |
| 15:00:52 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds) |
| 15:00:57 | <ski> | /me nods and smiles |
| 15:01:39 | <Simon98> | ski it confused me because of what you said here "(it might be helpful to rename the parameters to say `x',`y',`z', to avoid confusing them with the type variables in the type signature)", but now I get it (was thinking in a wrong way |
| 15:01:43 | <Simon98> | ) |
| 15:01:53 | Simon98 | nods and smiles |
| 15:01:56 | <Simon98> | hahahaha |
| 15:02:05 | Simon98 | finds that nice |
| 15:02:13 | <ski> | it's typically used to describe something you're doing, or else describe some property of yourself (in *third* person, mind !) .. i also often use it for various associations i get and things i'm reminded of |
| 15:03:42 | <Simon98> | [exa] I tried it and look what happened: allSameX :: Eq a => a -> a -> p -> Bool |
| 15:03:43 | <Simon98> | So p can be z different type then x and y? But doesn't that disagree with the Eq restriction of only comparing same types? |
| 15:04:11 | <ski> | anyway, using type variables (begins with lower case (or `_')) in a type signature, indicates parametric polymorphism (which is called "generics", in e.g. Java). the initial `<typename a>' / `<a>' part can (usually) be elided in Haskell, but you can also spell it out explicitly as `forall a. ' |
| 15:04:21 | <ski> | allSame :: forall a. Eq a => a -> a -> a -> Bool |
| 15:05:56 | <ski> | (you'll need to enable at least `ExplicitForAll' to be able to do that. there are a couple of more extensions that actually let you do *more* with `forall' than merely being explicit, rather than eliding a `forall' (letting the implementation implicitly insert it at the start, right after the `::')) |
| 15:07:22 | <ski> | Simon98 : yes, the type of `x' is `a' and the type of `y' is also `a', in that signature. but the type of `z' is `p', which is a distinct type variable, because `z' is not compared (for equality) with `x' nor `y', and so there's no need to assume it needs to have the same type, and so the implementation inferred a distinct type variable as its type (and for some reason happened to call that `p') |
| 15:07:58 | <ski> | "So p can be z different type then x and y?" -- right. "But doesn't that disagree with the Eq restriction of only comparing same types?" -- no, because you removed the comparision of `z' with one of `x' and `y' |
| 15:08:22 | <ski> | (specifically `y', i see above) |
| 15:09:36 | <Simon98> | I see, thank you! |
| 15:09:46 | <Simon98> | Why do you think the letter "p" was used? |
| 15:09:51 | <ski> | @type (==) |
| 15:09:53 | <lambdabot> | Eq a => a -> a -> Bool |
| 15:09:57 | <ski> | hm |
| 15:10:03 | <ski> | dunno |
| 15:10:40 | <geekosaur> | that has to do with the guts of the typechecker, which generally aren't introspectable |
| 15:11:01 | <geekosaur> | it tends to pick "t" or "p" in recent versions |
| 15:11:20 | <ski> | (sometimes it picks up a type variable name from a particular type variable name in an explicit type signature of an operation that is used, involving the type variable with it) |
| 15:12:25 | × | random-jellyfish quits (~random-je@user/random-jellyfish) (Quit: Client closed) |
| 15:12:39 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 15:14:02 | → | uam joins (uid360535@id-360535.hampstead.irccloud.com) |
| 15:14:49 | <[exa]> | Simon98: a _p_arameter type, perhaps. The names of the variables don't really matter. |
| 15:15:12 | → | Pickchea joins (~private@user/pickchea) |
| 15:15:20 | <Simon98> | And another thing: Let's stay with " allSameX :: Eq a => a -> a -> p -> Bool" |
| 15:15:20 | <Simon98> | Are the arrows also actually meaning "flow" or something? Because that would not make sense. |
| 15:15:21 | <Simon98> | With the "allSame :: Eq a(0) => a(1) -> a(2) -> a(3) -> Bool" [I added the numbers] I could have imagined that we do one comparison and then the a(1) yet again will be type a(2) and with the next comparison it will stlil be a(3). |
| 15:15:21 | <Simon98> | But actually not even that makes sense since after one comparison they would already be Booleans instead of Integers |
| 15:15:51 | <Simon98> | [exa] how do you do the underlining? |
| 15:16:09 | <[exa]> | put underscores around, many clients will render it right |
| 15:16:14 | <[exa]> | (mine does not tbh... :D ) |
| 15:16:16 | <Simon98> | I don't know why the name linking does not work sometimes. I typed "[e" then pressed tab and then enter or so |
| 15:16:31 | <Simon98> | _p_ |
| 15:16:43 | <[exa]> | also the [ in my nick is not very popular with client software. I should get rid of it. :D |
| 15:17:02 | <Simon98> | Ahh. In my case it looks like doubleUnderline then p underlined then another double underline |
| 15:17:06 | → | agumonkey joins (~user@88.163.231.79) |
| 15:17:20 | <[exa]> | anyway, regarding the "flow" -- (->) is the actual type of a haskell function, and we technically only have 1-parameter functions |
| 15:17:40 | <[exa]> | so if you'd really print the allSame type as-is, you'd get something like: |
| 15:17:59 | <[exa]> | `a -> (a -> (a -> Bool))` |
| 15:18:10 | <[exa]> | (I omitted the Eq) |
| 15:18:15 | <yushyin> | with decent clients you can write ex<tab> and it will become [exa] |
| 15:19:11 | <[exa]> | Simon98: the logic behind the parenthesization is that basically you feed the function parameters, and it becomes to something simpler and simpler, until it eventually becomes the Bool (which is not a function type, so you can't feed it parameters) |
| 15:19:34 | <Simon98> | So in practice it could be `Integer -> (Integer -> (Integer -> Bool))` |
| 15:19:37 | <[exa]> | yes |
| 15:19:47 | <Simon98> | waaaaaaait |
| 15:20:01 | <Simon98> | could you please also formulate it as math functions? with f(a) ? |
| 15:20:01 | <[exa]> | Illustration: |
| 15:20:30 | <hpc> | in that notation it'd be like saying f(a)(b)(c) |
| 15:20:39 | <[exa]> | ah yes, in the usual prefix notation, you'd write a single-parameter function not as `a->b` but as `(->) a b` |
| 15:21:08 | <[exa]> | (compare with `1+2` vs `(+) 1 2` vs `plus(1,2)` from other languages) |
| 15:21:20 | <hpc> | and in fact it's that exact notation in a lot of other languages where you can attempt such things |
| 15:21:52 | <hpc> | although then it's really tedious, you have to write stuff like f = function(a){return function(b){return function(c){...}}} |
| 15:22:53 | <hpc> | ^ is javascript, if you want to pop into an f12 console and try it out |
| 15:22:54 | <[exa]> | :t let allSame a b c = a==b && b==c in (allSame, allSame 1, allSame 1 2, allSame 1 2 3) |
| 15:22:56 | <lambdabot> | (Eq a1, Eq a2, Eq a3, Num a2, Num a3) => (a1 -> a1 -> a1 -> Bool, a2 -> a2 -> Bool, a3 -> Bool, Bool) |
| 15:23:36 | <Simon98> | what is the prefix notation again in "allSame a b c = a==b && b==c"? |
| 15:23:51 | × | agumonkey quits (~user@88.163.231.79) (Remote host closed the connection) |
| 15:23:52 | <Simon98> | and hpc |
| 15:24:18 | <Simon98> | and hpc why would you put a type class (=a) in a function and not the actual value? (f(a)(b)(c)) |
| 15:25:16 | → | hgolden joins (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) |
| 15:25:20 | × | frost quits (~frost@user/frost) (Ping timeout: 252 seconds) |
| 15:26:23 | <[exa]> | Simon98: where's the typeclass? |
| 15:26:24 | <geekosaur> | > let allSame a b c = a == b && b == c in allSame "foo" "foo" "foo" -- works for any type with an Eq instance, not just Integer |
| 15:26:25 | <lambdabot> | True |
| 15:26:44 | <hpc> | those were the values |
| 15:26:47 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 15:26:49 | <hpc> | pretend i wrote f(x)(y)(z) :P |
| 15:27:34 | <Simon98> | can this _function_ *in* _function applications_ be paraphrased to *use* _function_ *with* _function applications_ for me to better understand it? |
| 15:30:11 | <Simon98> | I get the latter parenthesis (good example!) but why are there 5 elements in the first parenthesis? |
| 15:30:12 | <Simon98> | (Eq a1, Eq a2, Eq a3, Num a2, Num a3) => (a1 -> a1 -> a1 -> Bool, a2 -> a2 -> Bool, a3 -> Bool, Bool) |
| 15:30:47 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 15:30:54 | <[exa]> | Simon98: it actually needs to describe a lot of constraints in the returned types, so there they are: |
| 15:30:54 | <geekosaur> | because each call is considered separately |
| 15:30:55 | → | haskell_apprenti joins (~haskell_a@cpe-74-71-248-39.nyc.res.rr.com) |
| 15:32:00 | <[exa]> | in order, `Eq a1` ensures that the types of the parameters of the first `allSame` are comparable, similarly for `Eq a2` and `Eq a3`. Fully applied `allSame 1 2 3` doesn't need any constraint because it just returns Bool, no matter what. |
| 15:32:10 | <Simon98> | hpc but what should " f(x)(y)(z) " mean? |
| 15:32:11 | <Simon98> | Like f(x,y,z) or h(g(f(x))) with f(x) = y and g(y) = z would make sense for me but your notation not |
| 15:32:46 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 15:32:54 | <[exa]> | Then `Num a2` is there because I already put `1` into `allSame 1`, and `1` can stand as any numeric type. So it tells you an extra information that you must put in other arguments as numeric too -- for example you couldn't do `allSame 1 "whatevs"` |
| 15:33:06 | <[exa]> | (similar for Num a3) |
| 15:33:36 | <Simon98> | ahh, thanks [exa] |
| 15:33:52 | <Simon98> | and how would you paraphrase the "=>" here? |
| 15:33:58 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 15:34:08 | <[exa]> | haha, tricky |
| 15:35:14 | <Simon98> | :) |
| 15:35:38 | <haskell_apprenti> | question: I'm going through Haskell programming from first principles, in the book they say a function with the signature blahFunc :: b -> String totally throws away its first argument and is effectively a constant value of type String. Can't we define a toString method that works for every type? I find it hard to reason about saying a function has |
| 15:35:39 | <haskell_apprenti> | to be a particular function due to its type signature |
| 15:35:44 | <[exa]> | it's an actual implication, given you have an `a` that satisfies the `Eq`, you can assume that your type is a->a->... |
| 15:36:34 | <geekosaur> | haskell_apprenti, what would toString be for a function? |
| 15:36:42 | <Simon98> | wow |
| 15:36:58 | <Simon98> | Is the "=>" in Haskell syntax always an actual implication? |
| 15:37:00 | <geekosaur> | remember, Haskell is compiled, it does not have the source code available, especially for a typeclass method like (+) |
| 15:37:01 | <[exa]> | haskell_apprenti: "for every type" is hard. Do you know what custom-defined type am I going to send you in 5 minutes from now? |
| 15:37:47 | <haskell_apprenti> | doesn't all data need some kind of text representation to be viewed on a screen though? |
| 15:38:15 | <[exa]> | haskell_apprenti: that implies that you already know something about the type. That would be `blahFunc :: HasBitRepresentation b => b->String` |
| 15:39:04 | <haskell_apprenti> | don't all types need a data declaration though? so theoretically you can print that, since that's common to all types. just for the sake of argument |
| 15:39:20 | <Simon98> | And is one implication here sufficient ((Eq a1, Eq a2, Eq a3, Num a2, Num a3) => (a1 -> a1 -> a1 -> Bool, a2 -> a2 -> Bool, a3 -> Bool, Bool)) because you put the function applications all in one parenthesis ((allSame, allSame 1, allSame 1 2, allSame 1 2 3)) and therefore to make it work everything has to meet the requirements at a time? |
| 15:39:42 | <[exa]> | haskell_apprenti: yes, there's actually a typeclass for that too (Generic). But still if you use it, you have to declare it. |
| 15:40:24 | <[exa]> | Simon98: yes, it's 1 big type with 1 big sets of "conditions", so only a single => is required in between |
| 15:40:29 | × | Guest9113 quits (~Guest91@84-75-254-89.dclient.hispeed.ch) (Quit: Client closed) |
| 15:40:40 | ski | . o O ( no underscores ) |
| 15:41:01 | <ski> | haskell_apprenti : types that are primitive doesn't need `data' or `newtype' declarations |
| 15:41:20 | <[exa]> | Simon98: you can definitely try for isolated (partial) calls of allSame in your ghci, with different argument types. It should become quite intuitive once you play with it for some time |
| 15:41:58 | <ski> | e.g. `(->)' .. or, an implementation could have `Char',`Int',`Integer',`Float',`Double',`Array',`IO',`IORef' all be primitive, as well |
| 15:43:55 | <ski> | @type let foo x = (typeOf x,cast x :: Maybe String) in foo |
| 15:43:57 | <lambdabot> | Typeable a => a -> (TypeRep, Maybe String) |
| 15:43:59 | <ski> | > let foo x = (typeOf x,cast x :: Maybe String) in foo False |
| 15:44:01 | <lambdabot> | (Bool,Nothing) |
| 15:44:06 | <ski> | > let foo x = (typeOf x,cast x :: Maybe String) in foo "True" |
| 15:44:08 | <lambdabot> | ([Char],Just "True") |
| 15:44:51 | <haskell_apprenti> | [exa] geekosaur I think I understand thinking about it more, thanks |
| 15:45:24 | <geekosaur> | now, we do have a typeclass for what you've been talking about: Show |
| 15:45:30 | × | Simon98 quits (~Simon@ipbcc036f5.dynamic.kabel-deutschland.de) (Quit: Client closed) |
| 15:45:31 | <geekosaur> | and your toString is show |
| 15:45:51 | <[exa]> | haskell_apprenti: btw the "some kind of representation exists" doesn't really hold in haskell programs. Stuff may be easily erased before it reaches runtime, and there are actual definition-less types (`data Void`) |
| 15:45:53 | <geekosaur> | but again you must declare that you're using it |
| 15:46:42 | <ski> | haskell_apprenti : you can use `Typeable', if you want to do type casting stuff. `Generic' to actually do introspect stuff on how the type was declared |
| 15:47:03 | × | xff0x quits (~xff0x@om126254226100.33.openmobile.ne.jp) (Ping timeout: 256 seconds) |
| 15:47:34 | <ski> | (well, i'd rather say that `Void' has a collection of data constructors .. it just happens to be the empty collection) |
| 15:49:03 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 276 seconds) |
| 15:49:04 | × | Vajb quits (~Vajb@2001:999:400:9bc1:d5dd:7e53:33b:56) (Read error: Connection reset by peer) |
| 15:49:14 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 15:49:35 | <ski> | haskell_apprenti : anyway .. what you might see as an annoyance here is actually a boon, in the sense that it allows one to reason about, infer stronger properties (things an operation definitely *can't* do), solely by inspecting its type signature. this is called "parametricity". parametric polymorphism in Haskell enjoys this. parametric polymorphism (called "generics") in e.g. Jave doesn't, because of |
| 15:49:41 | <ski> | `instanceof' and up-casting (and methods on `Object') |
| 15:51:00 | <haskell_apprenti> | I don't find it annoying, I'm just interested in the theory of why its definitely true that a particular type signature must have a certain type implentation |
| 15:51:26 | <haskell_apprenti> | like id be interested if there are proofs about it written somewhere if anyone could point me to that |
| 15:51:36 | <ski> | e.g. if you see `foo :: (a -> Maybe b) -> [a] -> [b]', you *know* that `foo' can't itself inspect the `a' elements of the list, but can only pass them on to the callback, which is also the only place where the `b' elements in the output could possibly come from (apart from using `undefined' & `error' & `Control.Exception.throw', or infinite loops) |
| 15:51:45 | <haskell_apprenti> | sorry not type implementation, concrete function implemenetation |
| 15:52:18 | <ski> | @free bar :: Int -> [a] -> [a] |
| 15:52:18 | <lambdabot> | $map f . bar x = bar x . $map f |
| 15:52:54 | <ski> | this is a "free theorem", that says that it doesn't matter if you map some function `f' to the elements of the list, before or after you call `bar', since `bar' definitely won't look at, or change, the elements |
| 15:53:20 | <ski> | (and this relies on parametricity) |
| 15:53:31 | <ski> | @help free |
| 15:53:31 | <lambdabot> | free <ident>. Generate theorems for free |
| 15:54:01 | <ski> | @free transpose |
| 15:54:03 | <lambdabot> | $map ($map f) . transpose = transpose . $map ($map f) |
| 15:54:11 | <ski> | @free concat :: [[a]] -> [a] |
| 15:54:12 | <lambdabot> | $map f . concat = concat . $map ($map f) |
| 15:55:49 | <haskell_apprenti> | ski don't understand the @ free thing |
| 15:56:30 | <ski> | @free reverse |
| 15:56:31 | <lambdabot> | $map f . reverse = reverse . $map f |
| 15:56:34 | <haskell_apprenti> | I feel like what you're saying though is since its parametrically polymorphic, the only thing we could do that will work with all types is pass it through eg identity |
| 15:56:54 | <haskell_apprenti> | and the extension of that eg with list of types, pass through list of types |
| 15:57:14 | <ski> | it says `$map' instead of `map', since it's assuming a generic mapping. but they should be the same. so read that as claiming |
| 15:57:23 | <ski> | map f . reverse = reverse . map f |
| 15:57:39 | <ski> | is a true law/equality/equation (for every function `f') |
| 15:57:57 | <ski> | or, expanding (putting in an explicit argument), this says that |
| 15:58:05 | <ski> | (map f . reverse) xs = (reverse . map f) xs |
| 15:58:11 | <ski> | (for every `f' and every list `xs') |
| 15:58:28 | <ski> | which is the same (by the definition of function composition, `(.)') |
| 15:58:40 | <ski> | map f (reverse xs) = reverse (map f xs) |
| 15:58:49 | <[exa]> | haskell_apprenti: that's true, the only non-crashing function with type `a->a` is id. The only other thing you can do in haskell is to crash it with `undefined`. |
| 15:58:57 | <haskell_apprenti> | ski think i need the ELI5 version |
| 15:59:21 | <ski> | and now this is explicitly saying that if you reverse `xs', and then `map' `f' on every element of the reversed list, then that's the same as first mapping `f' on `xs', and then reversing the mapped list |
| 15:59:27 | <haskell_apprenti> | [exa] is that proven formally somewhere |
| 15:59:53 | <[exa]> | yes |
| 16:00:10 | <ski> | haskell_apprenti : do you understand the last version of the equation, above ? |
| 16:00:21 | <ski> | (with my attempted elucidation of it) |
| 16:00:45 | <ski> | btw, you could perhaps try checking "Theorems for free!" by Philip Wadler in 1989-09 at <https://homepages.inf.ed.ac.uk/wadler/topics/parametricity.html#free> |
| 16:01:23 | <haskell_apprenti> | [exa] can you point me to where that is proven |
| 16:01:35 | <haskell_apprenti> | ski yes I think I understand that last version thanks |
| 16:01:41 | <[exa]> | yes, trying to find it written somewhere |
| 16:02:01 | <[exa]> | (likely the Wadler's paper above will contain the intuition too) |
| 16:02:02 | <haskell_apprenti> | ski I understand the statement of the theorem, but how do we know its true |
| 16:02:28 | <ski> | the previous versions are merely fancy (so-called, "pointless") ways to express the same thing (using composition / function pipeline, instead) |
| 16:03:50 | <haskell_apprenti> | ahh ok that wadler "theorems for free" looks like what I want to look at |
| 16:03:54 | <haskell_apprenti> | looks dense thuogh |
| 16:03:59 | <haskell_apprenti> | thanks for the help! |
| 16:06:33 | <ski> | haskell_apprenti : we know it holds for an idealized calculus (second-order polymorphic lambda calculus (F2), in the papers mentioning Reynolds in the abstract, at the link i gave you), because of the abstraction theorem. the "theorems for free" is about deriving an immediate result/law, from a `forall'-type (a universal type), using that theorem |
| 16:08:39 | <ski> | i'm not sure if someone has attempted to prove the corresponding thing, for a system that looks more like Haskell (including various stuff like partiality, nontermination, and possibly a bunch of fancy type system features making it more powerful than F2) .. but we're basically treating it like it behaves similarly |
| 16:08:57 | <[exa]> | haskell_apprenti: btw it's useful to read about curry-howard correspondence; by dragging in logic it paints a much cleaner image of stuff that can't be done. E.g. here: https://en.wikibooks.org/wiki/Haskell/The_Curry%E2%80%93Howard_isomorphism#Intuitionistic_vs_classical_logic |
| 16:09:20 | <ski> | (don't worry, the "full abstraction" stuff by Reynolds is denser) |
| 16:11:05 | <ski> | for Curry-Howard, it can also be neat if one knows a little about basic set theory (cardinality, cartesian product, disjoint union, exponential set (function set)) |
| 16:13:18 | <ski> | haskell_apprenti : "but how do we know its true" -- from an appeal to intuition standpoint, there is no way that `reverse' could inspect or interact with the elements (apart from forcing them, and the worst that may do is give nontermination or partiality). .. so, the only thing it can do is return some of the input elements, as output elements (possibly reordering, and possibly duplicating (and dropping |
| 16:13:24 | <ski> | others)) |
| 16:13:49 | <ski> | but its behaviour can't depend on the innards of the elements, it can only depend on the length of the input list |
| 16:14:22 | → | Simon91 joins (~Simon@ipbcc036f5.dynamic.kabel-deutschland.de) |
| 16:14:26 | <Simon91> | Hello again |
| 16:14:52 | <ski> | (the only way to depend on the innards would be to either pass off an element to a callback (but there's no such, in this case), or to use a typeclass-overloaded operation on them (but there's no class constraints in the type signature, so that's not going to happen, either)) |
| 16:15:34 | <Simon91> | GHCI coming up with "funktionB :: Integral a => [a] -> [a]" for "funktionB x = [ if (y `mod` 2 /= 0) then (2 * y) else y | y <- x]" is due to GHCI being smart and knowing that you need Integers for the operations in brackets? |
| 16:16:33 | <c_wraith> | It's inference from the way the elements are used. |
| 16:16:34 | <ski> | if you do `foo :: Eq a => Int -> [a] -> [a]', then `foo' can pass off elements to `(==)' and `(/=)' (and other operations with an `Eq' constraint, like e.g. `allDistinct :: Eq a => [a] -> Bool') |
| 16:16:52 | <c_wraith> | You're using (/=), (*), and mod. |
| 16:17:03 | <ski> | @type mod |
| 16:17:04 | <lambdabot> | Integral a => a -> a -> a |
| 16:17:14 | <ski> | @type (*) |
| 16:17:17 | <lambdabot> | Num a => a -> a -> a |
| 16:17:19 | <ski> | @type (/=) |
| 16:17:20 | <lambdabot> | Eq a => a -> a -> Bool |
| 16:17:28 | <ski> | `Num' and `Eq' are superclasses of `Integral' |
| 16:17:31 | <c_wraith> | from that, it derives Eq, Num, and Integral - but it turns out Integral requires Eq and Num, so it reduces the display set |
| 16:18:02 | <ski> | Simon91 : also, your (round) brackets there are redundant |
| 16:20:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 16:20:28 | <c_wraith> | Oh, there's one other thing contributing to inference there - the 0 literal. It also implies a Num constraint. It's redundant in this case, but worth knowing |
| 16:20:46 | <c_wraith> | Err. the 0 and 2 literals. |
| 16:20:49 | <Simon91> | c_wraith and it chooses Integral because it always chooses the most sub subclass from all classes involved? |
| 16:20:53 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 16:21:13 | <c_wraith> | Simon91: no, doesn't show Eq or Num because they're implied by Integral |
| 16:21:36 | <ski> | haskell_apprenti : so, anyway. the only way to do type introspection stuff, and being able to look "inside" an input whose type is a type variable (apart from passing it off to a callback that accepts it, but then the callback comes from the caller, not the callee/implementor of the operation) is to explicitly opt-in to it, by using a `Typable' or `Generic' constraint, or so, on the type variable |
| 16:21:58 | <ski> | (well, there's also GADTs ..) |
| 16:22:05 | <Simon91> | ski yeah I thought so, but it felt weird and error-prone not putting them (even though it's probably the other way round) |
| 16:22:06 | <c_wraith> | Simon91: that may sound like the same thing, but classes aren't all in a single hierarchy |
| 16:22:44 | <c_wraith> | Simon91: so there's no guarantee there is such a thing as a single most-sub subclass. |
| 16:22:45 | <Simon91> | c_wraith I see. Very interesting. |
| 16:22:54 | <ski> | Simon91 : pointing out redundant brackets (when it's likely they weren't put in consciously for an explicit reason), is a pet peeve of mine ;) |
| 16:23:17 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 16:23:19 | <Simon91> | hahah |
| 16:23:42 | <c_wraith> | ski: parse error, unmatched closing ')' at end of input |
| 16:24:22 | <ski> | example of a consciously inserted pair of brackets : |
| 16:24:28 | <ski> | map :: ( a -> b ) |
| 16:24:31 | <ski> | -> ([a] -> [b]) |
| 16:24:37 | <ski> | (the second pair of round brackets) |
| 16:24:51 | <ski> | @type map . map . map |
| 16:24:53 | <lambdabot> | (a -> b) -> [[[a]]] -> [[[b]]] |
| 16:25:01 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 16:25:11 | <ski> | @type zipWith . zipWith |
| 16:25:14 | <lambdabot> | (a -> b -> c) -> [[a]] -> [[b]] -> [[c]] |
| 16:25:59 | <c_wraith> | that doesn't look useful! :P |
| 16:26:32 | <c_wraith> | (I'm sure it's come up once or twice in history) |
| 16:27:06 | <ski> | @let foldL :: (s -> a -> s) -> (s -> [a] -> s); foldL = foldl |
| 16:27:07 | <lambdabot> | Defined. |
| 16:27:13 | <ski> | @type foldL . foldL |
| 16:27:14 | <lambdabot> | (s -> a -> s) -> s -> [[a]] -> s |
| 16:28:54 | <ski> | (the types of the fold right function in OCaml also allows this. but, alas, the signature of the Haskell one prevents this, without interleaving a `flip') |
| 16:29:45 | <ski> | Simon91 : anyway, you'll get used to it (hopefully) |
| 16:31:24 | <ski> | (for some reason, it seems that many people who've been using Haskell for years still don't know that the brackets in `(Foo ...) == ... = ...' and in `case ... of (x:xs) -> ...; ...' or `... where (x:xs) = ...' are redundant ..) |
| 16:32:05 | <ski> | (hm, and there's also `foo :: (Eq a) => ..a..') |
| 16:34:13 | <geekosaur> | I know it but I generally go for consistency |
| 16:34:51 | <ski> | yea, i figure some do (and several don't know) |
| 16:35:16 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 16:36:34 | → | romesrf joins (~romes@185.5.8.134) |
| 16:44:07 | <haskell_apprenti> | ski will check out the wiki books thing you sent |
| 16:45:01 | <haskell_apprenti> | also nice intuition thanks |
| 16:45:56 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds) |
| 16:46:48 | <elmyr> | @type (.) |
| 16:46:49 | <lambdabot> | (b -> c) -> (a -> b) -> a -> c |
| 16:47:02 | <elmyr> | ski: doesn't look like Caleskell there either |
| 16:49:36 | → | __monty__ joins (~toonn@user/toonn) |
| 16:54:38 | → | alp_ joins (~alp@user/alp) |
| 16:55:46 | → | gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
| 16:55:49 | <dminuoso> | [Leary]: Oh wow, thanks. Yes! |
| 16:58:11 | × | haskell_apprenti quits (~haskell_a@cpe-74-71-248-39.nyc.res.rr.com) (Quit: Client closed) |
| 17:00:24 | ski | nods to elmyr |
| 17:00:28 | → | nate1 joins (~nate@98.45.169.16) |
| 17:05:37 | → | econo joins (uid147250@user/econo) |
| 17:08:40 | × | Simon91 quits (~Simon@ipbcc036f5.dynamic.kabel-deutschland.de) (Quit: Client closed) |
| 17:10:59 | → | bahamas joins (~lucian@84.232.141.55) |
| 17:11:32 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
| 17:20:21 | × | xaotuk quits (~sasha@net234-32-245-109.mbb.telenor.rs) (Read error: Connection reset by peer) |
| 17:20:44 | × | mbuf quits (~Shakthi@122.174.202.44) (Quit: Leaving) |
| 17:23:08 | × | jlamothe quits (~jlamothe@198.251.61.229) (Quit: leaving) |
| 17:25:37 | → | xaotuk joins (~sasha@87.116.177.12) |
| 17:26:06 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 17:28:13 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 17:32:32 | → | haskell_apprenti joins (~haskell_a@2603-7000-9900-04ba-0000-0000-0000-16e3.res6.spectrum.com) |
| 17:32:41 | × | haskell_apprenti quits (~haskell_a@2603-7000-9900-04ba-0000-0000-0000-16e3.res6.spectrum.com) (Client Quit) |
| 17:36:36 | × | xaotuk quits (~sasha@87.116.177.12) (Ping timeout: 240 seconds) |
| 17:40:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 17:41:39 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 17:43:41 | × | lambdap2 quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Quit: lambdap2) |
| 17:44:13 | → | lambdap2 joins (~lambdap@static.167.190.119.168.clients.your-server.de) |
| 17:44:45 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 17:45:35 | → | zeenk joins (~zeenk@2a02:2f04:a004:9b00:1efc:c1cf:378d:8b3d) |
| 17:49:34 | → | dcompoze joins (~dcompoze@5E98D6D9.static.tld.pl) |
| 17:49:51 | × | dcompoze quits (~dcompoze@5E98D6D9.static.tld.pl) (Client Quit) |
| 17:52:49 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Read error: Connection reset by peer) |
| 17:58:23 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 17:59:32 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:12:10 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 250 seconds) |
| 18:16:23 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 18:16:28 | → | melas joins (~melas@172.77.31.247) |
| 18:18:30 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 18:20:50 | → | notzmv joins (~zmv@user/notzmv) |
| 18:21:36 | × | oxide quits (~lambda@user/oxide) (Quit: oxide) |
| 18:21:47 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 18:33:42 | × | uam quits (uid360535@id-360535.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 18:34:27 | → | coot joins (~coot@213.134.190.95) |
| 18:43:06 | <maerwald> | does haskell CPP on windows need anything special? I'm getting massive errors that I don't get on unix |
| 18:45:32 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 18:46:07 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 18:46:09 | → | dextaa45 joins (~dextaa@user/dextaa) |
| 18:46:50 | × | dextaa4 quits (~dextaa@user/dextaa) (Ping timeout: 250 seconds) |
| 18:46:51 | dextaa45 | is now known as dextaa4 |
| 18:47:18 | <hpc> | probably something to do with how it picks what cpp command to run? |
| 18:49:39 | → | dextaa49 joins (~dextaa@user/dextaa) |
| 18:51:36 | × | dextaa4 quits (~dextaa@user/dextaa) (Ping timeout: 250 seconds) |
| 18:51:37 | dextaa49 | is now known as dextaa4 |
| 18:54:25 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 19:08:45 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 19:09:42 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 19:10:20 | → | inversed_ joins (~inversed@176.248.27.211) |
| 19:11:50 | × | bahamas quits (~lucian@84.232.141.55) (Ping timeout: 260 seconds) |
| 19:13:48 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 276 seconds) |
| 19:14:02 | × | inversed quits (~inversed@176.248.27.211) (Ping timeout: 272 seconds) |
| 19:16:38 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 19:22:42 | → | acidjnk joins (~acidjnk@p200300d0c7068b132c0a169992321cdc.dip0.t-ipconnect.de) |
| 19:27:47 | → | jollygood2 joins (~bc8147f2@199.204.85.195) |
| 19:30:00 | <dminuoso> | Okay so Im writing a hardware library, that exposes a bunch of `init/finalize` or `open/close` functions. Im debating whether to provide `with` CPS helpers - and the reason Im debating this is because I dont want to make a choice for `bracket`. |
| 19:30:07 | <dminuoso> | i.e. do I use base or safe-exceptions bracket |
| 19:30:49 | <dminuoso> | My thinking is: just expose the manual functions, defer writing a bracket'ed helper to the user who can then chose whatever library they want |
| 19:30:52 | <dminuoso> | Is this a sane choice? |
| 19:33:25 | × | melas quits (~melas@172.77.31.247) (Ping timeout: 260 seconds) |
| 19:33:43 | <hpc> | presumably you aren't already depending on safe-exceptions |
| 19:33:47 | <monochrom> | base itself takes the approach of providing both, with the latter hardwired to IO. |
| 19:33:49 | <hpc> | but you're certainly already depending on base |
| 19:34:03 | <hpc> | so provide the base functions and a with-function for base bracket |
| 19:34:15 | <hpc> | the user can write a safe-exceptions with-function |
| 19:34:19 | <dminuoso> | monochrom: both |
| 19:34:21 | <dminuoso> | ? |
| 19:34:31 | <dminuoso> | hpc: Mmm, I guess I can do that. |
| 19:34:44 | <monochrom> | base has both openFile+hClose and withFile. |
| 19:34:50 | <dminuoso> | Ahh, I see |
| 19:36:36 | <monochrom> | But everyone knows how to use bracket. If you don't provide a "with", it's OK. |
| 19:37:31 | <monochrom> | I haven't needed safe-exceptions. |
| 19:38:06 | <dminuoso> | "needed" is a bit strong, in case of bracket its rather about a rare edge case that is really hard to trigger |
| 19:39:01 | <dminuoso> | I sincerely believe that defaulting to `mask` instead of `uninterruptibleMask` inside the implementation is a dangerous mistake that leads to false assumptions. |
| 19:39:15 | <dminuoso> | And it goes into "everyone thinks they know how to use bracket" rather than "everyone knows" |
| 19:42:46 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 19:46:04 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds) |
| 19:46:46 | <mxs> | would this be a candidate for base? elemIndex :: (Traversable t, Eq a, Num b) => a -> t a -> Maybe b |
| 19:47:45 | → | Pickchea joins (~private@user/pickchea) |
| 19:47:56 | <dminuoso> | The Num polymorphism is a bit weird |
| 19:48:22 | <mxs> | can be Int. I just like the generic* functions |
| 19:48:24 | → | nut joins (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 19:49:08 | <mxs> | it's about the Traversable elemIndex, I find myself using it a lot |
| 19:49:48 | <dminuoso> | Traversable is way too strong |
| 19:49:51 | <dminuoso> | You only need Foldable |
| 19:51:12 | <mxs> | mhm yeah I suppose, even better. I wrote it with mapAccum for efficiency that's why |
| 19:51:15 | → | melas joins (~melas@172.77.31.247) |
| 19:52:20 | <dminuoso> | Not sure how mapAccum would help make it more efficient |
| 19:52:40 | <mxs> | how would you write it? |
| 19:52:42 | <dminuoso> | elemIndex' e = elemIndex e . toList |
| 19:53:59 | <dminuoso> | Im not sure this combinator would cross the Fairbairn threshold |
| 19:54:06 | → | vorpuni joins (~pvorp@2001:861:3881:c690:5de2:29c5:e469:d4b5) |
| 19:54:08 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 19:54:25 | <dminuoso> | If you find yourself needing this a lot, it might be an indicator of working with the wrong data types |
| 19:54:53 | <Bulby[m]> | it's always traverse! |
| 19:55:04 | <Bulby[m]> | what is Fairbairn |
| 19:55:11 | <dminuoso> | I guess the thing is, in a Foldable this is generally not useful since you have no guarantee to do random access on that |
| 19:55:38 | <dminuoso> | Finding the index of an arbitrary foldable structure seems like an awkward information if you cant say manipulate the structure on that index |
| 19:56:36 | <dminuoso> | On lists at least this has clear meaning, but what does "index in a tree" mean exactly? |
| 19:56:55 | <dminuoso> | Bulby[m]: https://wiki.haskell.org/Fairbairn_threshold |
| 19:57:49 | <mxs> | elemIndex a = msum . snd . mapAccumL fn 0 where fn s x = (s+1, guard(a == x) >> Just s) |
| 19:58:06 | <mxs> | without toList, but I'm not sure how much that saves on second thought |
| 19:58:15 | <dminuoso> | Im confident `elemIndex' e = elemIndex e . toList` is going to be cheaper. |
| 19:58:39 | <dminuoso> | Recall that in non-strict semantics the list is being generated lazily |
| 19:58:57 | <dminuoso> | But really, all this boils down to the same problem: |
| 19:59:12 | <dminuoso> | Your code does semantically the same: turn it into a list in sequencing order, and find the index inside that list. |
| 19:59:19 | <dminuoso> | Is this a generally useful operation on arbitrary foldable structures? |
| 20:00:59 | <dminuoso> | mxs: btw, the above is going to use findIndices internally , which has some carefully crafted code to trigger deforestation |
| 20:01:17 | <dminuoso> | https://hackage.haskell.org/package/base-4.16.1.0/docs/src/Data-OldList.html#findIndices |
| 20:02:03 | <dminuoso> | So depending on how the structure is made, this can be quite efficient |
| 20:04:01 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 20:04:39 | <kaol> | Today I learned that it pays to sometimes think a bit and not just hammer at the types until they match. |
| 20:05:11 | <monochrom> | Intelligent Design > Evolution |
| 20:05:12 | <kaol> | join . listToMaybe was too easy, I needed getFirst . mconcat . fmap First instead. |
| 20:06:07 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 20:08:33 | × | MajorBiscuit quits (~MajorBisc@c-001-007-017.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.4) |
| 20:08:34 | <tomsmeding> | kaol: isn't that `catMaybes` |
| 20:11:18 | <kaol> | listToMaybe . catMaybes actually. |
| 20:11:26 | × | _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
| 20:11:30 | <tomsmeding> | Ah right |
| 20:12:10 | <tomsmeding> | kaol: hmm, so isn't it `asum` |
| 20:12:32 | <tomsmeding> | The Alternative instance for Maybe picks the leftmost Just |
| 20:12:37 | → | mmhat joins (~mmh@2001:4090:a243:8070:ee08:6bff:fe09:5315) |
| 20:12:39 | × | mmhat quits (~mmh@2001:4090:a243:8070:ee08:6bff:fe09:5315) (Client Quit) |
| 20:14:47 | <kaol> | Well I'll be. I think I have reached par on this golf journey. |
| 20:15:31 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:15:53 | <mxs> | dminuoso: thanks for the insight, you're probably right - I avoided toList but now that I think about it, there's no reason |
| 20:16:33 | <tomsmeding> | kaol: knowing the variety of utility functions that happen to do useful things on Maybe is more learning/experience than art :p |
| 20:21:24 | × | nut quits (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 276 seconds) |
| 20:27:39 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:30:05 | → | wgl joins (~wgl@75-161-32-115.albq.qwest.net) |
| 20:33:35 | <dminuoso> | mxs: https://gist.github.com/dminuoso/e285f19e9dac2de2300a52e74ca82279 |
| 20:34:43 | <dminuoso> | What is interesting is that fusion did not trigger, and even despite that its still a lot less code. |
| 20:35:35 | <dminuoso> | Part of that is because findIndices then ends up being a simple fold, but mapAccumL is a traverse over simplified State transformer |
| 20:36:50 | <dminuoso> | Ah, turns out that according to #15426 the fusion is broken currently for findIndex |
| 20:38:09 | → | CiaoSen joins (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 20:39:04 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds) |
| 20:42:33 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 20:42:39 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 20:44:19 | <energizer> | can i use hoogle or something to find a bunch of interesting examples of Monoid? |
| 20:46:08 | <dsal> | energizer: You can find a bunch just by looking at haddock. |
| 20:46:15 | <geekosaur> | @instances Monoid |
| 20:46:17 | <lambdabot> | (), (a -> b), (a, b), All, Any, Dual a, IO a, Maybe a, Ordering, Product a, ST s a, Sum a |
| 20:46:33 | <dsal> | https://hackage.haskell.org/package/base-4.16.1.0/docs/Data-Monoid.html#t:Monoid |
| 20:46:36 | <geekosaur> | and those are just the ones in Prelude iirc |
| 20:46:48 | <geekosaur> | @instances-importing Data.Monoid Monoid |
| 20:46:50 | <lambdabot> | (), (a -> b), (a, b), All, Any, Dual a, IO a, Maybe a, Ordering, Product a, ST s a, Sum a |
| 20:47:25 | <dsal> | (a->b) and Ordering are pretty interesting ones together. |
| 20:48:44 | <dsal> | I use the tuple ones sometimes, but for that type of thing, often just make a new product type. |
| 20:51:16 | × | dextaa4 quits (~dextaa@user/dextaa) (Quit: The Lounge - https://thelounge.chat) |
| 20:51:24 | × | wgl quits (~wgl@75-161-32-115.albq.qwest.net) (Quit: wgl) |
| 20:53:57 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 20:59:10 | → | jgeerds joins (~jgeerds@d53604b0.access.ecotel.net) |
| 20:59:13 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 21:05:14 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 21:05:15 | × | julian quits (~julian@20.83.116.49) (Remote host closed the connection) |
| 21:05:37 | → | king_gs joins (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) |
| 21:05:43 | × | king_gs quits (~Thunderbi@2806:103e:29:99f9:ca77:e08e:3816:239e) (Client Quit) |
| 21:07:08 | → | julian joins (~julian@20.83.116.49) |
| 21:07:40 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 250 seconds) |
| 21:09:26 | × | kenran quits (~kenran@200116b82be152003bcf840303205486.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
| 21:09:38 | × | julian quits (~julian@20.83.116.49) (Remote host closed the connection) |
| 21:11:06 | → | julian joins (~julian@20.83.116.49) |
| 21:18:20 | × | zer0bitz quits (~zer0bitz@2001:2003:f444:8f00:740b:2afc:d306:1083) (Read error: Connection reset by peer) |
| 21:19:41 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 21:19:51 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:20:47 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 21:25:45 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 276 seconds) |
| 21:37:32 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 21:39:04 | → | king_gs joins (~Thunderbi@187.201.141.165) |
| 21:40:30 | → | andrey_ joins (~andrey@p508d43ec.dip0.t-ipconnect.de) |
| 21:43:28 | → | andrey joins (~andrey@p200300dbcf48ce00934437bb39b09cba.dip0.t-ipconnect.de) |
| 21:43:30 | × | andrey__ quits (~andrey@p200300dbcf3ea70066ff5d38847dda5c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 21:45:07 | × | tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection) |
| 21:45:08 | × | alp_ quits (~alp@user/alp) (Ping timeout: 248 seconds) |
| 21:45:22 | × | AkechiShiro quits (~licht@user/akechishiro) (Ping timeout: 250 seconds) |
| 21:46:31 | → | AkechiShiro joins (~licht@user/akechishiro) |
| 21:46:33 | × | andrey_ quits (~andrey@p508d43ec.dip0.t-ipconnect.de) (Ping timeout: 276 seconds) |
| 21:48:30 | × | king_gs quits (~Thunderbi@187.201.141.165) (Ping timeout: 276 seconds) |
| 21:48:31 | → | wgl joins (~wgl@75-161-32-115.albq.qwest.net) |
| 21:49:06 | → | king_gs joins (~Thunderbi@187.201.105.54) |
| 21:49:49 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 246 seconds) |
| 21:51:50 | → | tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) |
| 21:56:18 | × | liz quits (~liz@host109-151-128-120.range109-151.btcentralplus.com) (Quit: Lost terminal) |
| 21:56:51 | × | vorpuni quits (~pvorp@2001:861:3881:c690:5de2:29c5:e469:d4b5) (Remote host closed the connection) |
| 22:00:08 | → | pavonia joins (~user@user/siracusa) |
| 22:02:04 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:02:39 | × | jgeerds quits (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 240 seconds) |
| 22:07:25 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 22:09:02 | → | xff0x joins (~xff0x@om126033119107.35.openmobile.ne.jp) |
| 22:09:02 | × | king_gs quits (~Thunderbi@187.201.105.54) (Read error: Connection reset by peer) |
| 22:10:19 | → | king_gs joins (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) |
| 22:11:36 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection) |
| 22:20:03 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 22:20:03 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 22:20:03 | → | wroathe joins (~wroathe@user/wroathe) |
| 22:22:25 | → | littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 22:23:27 | × | acidjnk quits (~acidjnk@p200300d0c7068b132c0a169992321cdc.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 22:27:50 | × | king_gs quits (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) (Ping timeout: 250 seconds) |
| 22:30:35 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:35:01 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 22:36:52 | → | littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 22:38:04 | × | littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 22:41:48 | × | Tuplanolla quits (~Tuplanoll@91-159-68-39.elisa-laajakaista.fi) (Quit: Leaving.) |
| 22:42:25 | × | melas quits (~melas@172.77.31.247) (Ping timeout: 256 seconds) |
| 22:42:41 | × | romesrf quits (~romes@185.5.8.134) (Quit: WeeChat 3.4.1) |
| 22:45:42 | → | whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com) |
| 22:47:05 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 22:49:30 | → | king_gs joins (~Thunderbi@187.201.105.54) |
| 22:49:59 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 22:56:01 | × | zeenk quits (~zeenk@2a02:2f04:a004:9b00:1efc:c1cf:378d:8b3d) (Quit: Konversation terminated!) |
| 22:56:45 | <ski> | > sortBy (compare <> comparing length) (words "The quick brown fox jumps over the lazy dog") |
| 22:56:47 | <lambdabot> | ["The","brown","dog","fox","jumps","lazy","over","quick","the"] |
| 22:56:53 | <ski> | @where monoids |
| 22:56:54 | <lambdabot> | comment on "Monoids? In my programming language?" by Cale in 2008 (or 2009 ?) at <http://www.reddit.com/r/programming/comments/7cf4r/monoids_in_my_programming_language/c06adnx> about a use of ` |
| 22:56:54 | <lambdabot> | instance Monoid a => Monoid (rho -> a)' |
| 22:57:01 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
| 22:57:04 | × | littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
| 22:57:49 | <ski> | well, sorry, actually |
| 22:57:56 | <ski> | > sortBy (comparing length <> compare) (words "The quick brown fox jumps over the lazy dog") |
| 22:57:58 | <lambdabot> | ["The","dog","fox","the","lazy","over","brown","jumps","quick"] |
| 22:58:32 | <ski> | energizer : ^ that's what dsal was alluding to. sorting primarily by length, and secondarily by the ordinary lexicographic ordering (among words that have the same length) |
| 23:03:20 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 23:06:44 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
| 23:07:29 | <energizer> | ✓ |
| 23:07:45 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 23:09:38 | × | king_gs quits (~Thunderbi@187.201.105.54) (Read error: Connection reset by peer) |
| 23:09:50 | → | Kaipei joins (~Kaiepi@156.34.47.253) |
| 23:10:03 | → | king_gs joins (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) |
| 23:10:45 | × | Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 256 seconds) |
| 23:11:43 | <dminuoso> | Mmm, is there any ligtweight json library around that doesnt pull what feels like half of hackage along with it? |
| 23:11:55 | → | yauhsien joins (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
| 23:14:37 | × | CiaoSen quits (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 23:15:02 | → | melas joins (~melas@172.77.31.247) |
| 23:16:25 | × | yauhsien quits (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 23:16:55 | <energizer> | in some language there is a memory buffer where i can store `xs = [1,2,3]` and then reuse that buffer for the value of `ys = map double xs` if i'm not going to reuse `xs`. is there a way to specify that i want to reuse the storage area of xs in haskell? |
| 23:17:44 | <dminuoso> | energizer: You have to do memory access yourself. |
| 23:17:50 | <dminuoso> | Sadly we dont have this built into Haskell. |
| 23:18:00 | <energizer> | are there idioms for it? |
| 23:18:09 | <dminuoso> | Clean has this, they do automatic mutation in such cases. |
| 23:18:29 | <dminuoso> | (And from what I hear, that alone makes them competive over the well attended GHC in a select few benchmarcks) |
| 23:18:56 | <dminuoso> | energizer: it depends a lot on what your access pattern is |
| 23:19:11 | <dminuoso> | But you can start looking at Data.Vector.Mutable |
| 23:26:37 | → | alp_ joins (~alp@user/alp) |
| 23:27:36 | <melas> | Forgive me, as I'm brand new to all this, but would you consider it relatively easy to create a standalone windows program that can do basic network tests like ping / traceroute, etc. and save the to a log file? I guess my question is are the classes for this type of this typically up to date in Haskell ecosystem? |
| 23:27:50 | <dminuoso> | Regarding json, I think I have something https://hackage.haskell.org/package/JSONb |
| 23:27:57 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 276 seconds) |
| 23:28:16 | <melas> | Just trying to come up with a first program to code once I learn all the basics |
| 23:28:17 | <dminuoso> | It's not been maintained for a while, but its very minimalistic and doesnt pull in 80 packages behind it. |
| 23:37:27 | <geekosaur> | melas, that might be difficult in any language. ICMP typically requires privileged access because you're working with raw IP packets |
| 23:37:48 | <geekosaur> | traceroute, at least for IPv4, is simpler though |
| 23:40:37 | <geekosaur> | (you can do bad things to a network by sending control packets on it, which is the primary purpose of ICMP) |
| 23:41:05 | <sclv> | dminuoso: if you don't mind the performance, https://hackage.haskell.org/package/json |
| 23:42:46 | <melas> | @diminuoso why would privileged access make it difficult? |
| 23:42:46 | <lambdabot> | Unknown command, try @list |
| 23:42:56 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 23:44:43 | <dminuoso> | sclv: Ah, how did I not find this. Yes, this would work nicely. A bit sad this uses String instead of Text for JSString, but oh well. |
| 23:44:51 | <dminuoso> | Thanks, I think I will use this. |
| 23:44:59 | <hpc> | huh? icmp doesn't require privileges |
| 23:45:19 | <hpc> | traceroute only requires root for tcp/udp because there's not otherwise a way to set the ttl |
| 23:45:33 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 23:45:38 | <sclv> | dminuoso: its the old galois library. i believe it actually _predates text_ by one year! |
| 23:46:26 | <hpc> | oh, on windows |
| 23:47:06 | <geekosaur> | maybe they changed things. in the bad old days you needed a raw IP socket |
| 23:47:16 | <dminuoso> | hpc, geekosaur: /run/wrappers/bin/ping cap_setpcap,cap_net_raw=p |
| 23:47:29 | <geekosaur> | right, that's privileged |
| 23:47:44 | <hpc> | melas: if you want networkish stuff to try, something like a web server or client would be better |
| 23:48:00 | <hpc> | s/web/whatever protocol fits your fancy/ |
| 23:49:36 | <geekosaur> | oh, and even if you have some way to limit to ICMP ECHO {REQUEST,REPLY} you can typically take out a network by sending >100/s |
| 23:49:56 | <dminuoso> | melas: I dont see a reason why you couldn't. Things like permission problems affect all other languages, and in case of ICMP echo requests its easily addressed by setting CAP_NET_RAW and cap_setpcap |
| 23:50:10 | <geekosaur> | this is windows so the perms probably differ |
| 23:50:27 | <geekosaur> | windows has a more expressive permissions system though |
| 23:50:48 | dminuoso | is not sure how you would take out a network this way |
| 23:50:56 | <geekosaur> | (also hopefully they don't use raw IP sockets, they're a pain) |
| 23:51:18 | <geekosaur> | send them through a router. it prioritizes ICMP usually so it won't pass anything else |
| 23:51:45 | <melas> | Hmm. Ok cool, thanks. I'm a long way from that anyway. Really just feeling things out. My end goal actually is to mess with stuff like Euterpea and/or tidalcycles |
| 23:51:47 | <dminuoso> | Sure, cheap plastic home routers might be taken down like this. |
| 23:51:50 | <geekosaur> | you could still use the network locally but you will have isolated it |
| 23:53:41 | <dminuoso> | But a hundred ICMP per second will not take down a local network. Typical home routers can usually route upwards of a million pps, full line rate routing with 1.5mpps is not unheard of for plastic routers |
| 23:54:28 | <dminuoso> | I think a more meaningful impact is that of local control plane |
| 23:54:40 | <dminuoso> | Specifically on the target |
| 23:55:02 | <dminuoso> | Depending on how the networking stack works, ICMP flood can quickly cause a lot of kernel time to occur |
| 23:56:20 | <dminuoso> | Im really not sure about linux or windows, but all our routers at work have pretty aggressive policers |
| 23:56:46 | <dminuoso> | Which is mostly a thing to dampen potential DDoS situations |
| 23:56:52 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds) |
All times are in UTC on 2022-05-08.