Home liberachat/#haskell: Logs Calendar

Logs on 2021-09-28 (liberachat/#haskell)

00:00:09 sam[m]1 joins (~sammtopoi@2001:470:69fc:105::e887)
00:00:54 unrooted joins (~unrooted@2001:470:69fc:105::a4a)
00:02:12 asdofindia-m joins (~akshaymat@2001:470:69fc:105::831)
00:02:17 lwe[m] joins (~dendrumat@2001:470:69fc:105::2f9b)
00:02:42 the-coot[m] joins (~the-cootm@2001:470:69fc:105::95f)
00:03:50 dexmad[m] joins (~dexmadmat@2001:470:69fc:105::e056)
00:04:14 Deide joins (~deide@user/deide)
00:04:16 ongy[m] joins (~ongymatri@2001:470:69fc:105::5018)
00:04:16 hsek[m] joins (~hsekmatri@2001:470:69fc:105::d18f)
00:04:27 fendor[m] joins (~fendormat@2001:470:69fc:105::fcbd)
00:04:34 hughjfchen[m] joins (~hughjfche@2001:470:69fc:105::c29d)
00:05:31 jneira[m] joins (~jneiramat@2001:470:69fc:105::d729)
00:05:31 infinisil joins (~infinisil@2001:470:69fc:105::ff8)
00:06:55 rosariopulella[m joins (~rosariopu@2001:470:69fc:105::a57)
00:07:00 Drew[m] joins (~drewefenw@2001:470:69fc:105::c8c4)
00:07:14 cdsmith joins (~cdsmithma@2001:470:69fc:105::284)
00:07:32 Tisoxin joins (~ikosit@user/ikosit)
00:08:31 <alzgh> Yo, I'm building GHC in a Fedora container and it's woorking.
00:08:32 rednaZ[m] joins (~r3dnazmat@2001:470:69fc:105::ba70)
00:08:36 ormaaj joins (~ormaaj@user/ormaaj)
00:08:37 IgnatInsarov[m] joins (~kindaroma@2001:470:69fc:105::f5d9)
00:08:57 <monochrom> congrats
00:09:19 <monochrom> "Not sure what to congrat for, but congrats" >:)
00:10:52 <alzgh> :D
00:10:52 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
00:11:03 alzgh joins (~alzgh@user/alzgh)
00:12:11 × nfd quits (~nfd@user/nfd) (Ping timeout: 245 seconds)
00:12:38 nabaiste^ joins (~nabaiste@68.101.50.106)
00:15:12 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
00:15:12 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
00:15:12 wroathe joins (~wroathe@user/wroathe)
00:27:06 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
00:27:42 lavaman joins (~lavaman@98.38.249.169)
00:30:28 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 252 seconds)
00:32:11 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
00:33:56 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
00:37:29 lavaman joins (~lavaman@98.38.249.169)
00:41:31 × mestre quits (~mestre@191.177.175.57) (Quit: Lost terminal)
00:49:42 × tremon quits (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
00:55:45 × lbseale quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer)
00:56:51 Null_A joins (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e)
00:57:22 × pbrisbin quits (~patrick@pool-173-49-147-250.phlapa.fios.verizon.net) (Ping timeout: 252 seconds)
01:01:49 yauhsien joins (~yauhsien@118-167-48-21.dynamic-ip.hinet.net)
01:05:56 × yauhsien quits (~yauhsien@118-167-48-21.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
01:07:35 × Null_A quits (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e) (Remote host closed the connection)
01:10:32 <alzgh> managed to compile ghc with a looot of warnings at the end though
01:10:43 <alzgh> didn't even check if it worked at the end
01:10:51 <alzgh> gotta go sleep
01:10:55 <alzgh> good night
01:11:03 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
01:12:04 × jespada quits (~jespada@2803:9800:9842:7a62:8558:368:788c:6dc6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:13:31 × Robin_Jadoul quits (~Robin_Jad@152.67.64.160) (Ping timeout: 265 seconds)
01:14:17 Null_A joins (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e)
01:18:38 × emf quits (~emf@2620:10d:c090:400::5:92d0) (Ping timeout: 260 seconds)
01:22:36 × xff0x quits (~xff0x@2001:1a81:533c:2c00:5093:30e6:359f:919) (Ping timeout: 245 seconds)
01:24:29 xff0x joins (~xff0x@2001:1a81:534d:3900:44bc:177a:6fca:f4ca)
01:25:16 × waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 265 seconds)
01:26:30 × Null_A quits (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e) (Remote host closed the connection)
01:26:49 Null_A joins (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e)
01:30:06 × juhp quits (~juhp@118.200.109.69) (Ping timeout: 245 seconds)
01:37:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:38:51 × yinghua quits (~yinghua@2800:2121:1400:1db:1c60:aa3c:8d:9122) (Quit: Leaving)
01:40:20 × _xor quits (~xor@74.215.232.67) (Quit: brb, rebooting)
01:49:18 × retroid_ quits (~retro@176.255.22.194) (Quit: Connection error?!)
01:49:41 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
01:55:00 Everything joins (~Everythin@37.115.210.35)
02:06:14 × Null_A quits (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e) (Remote host closed the connection)
02:11:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
02:15:43 yauhsien joins (~yauhsien@118-167-48-21.dynamic-ip.hinet.net)
02:19:59 × alx741 quits (~alx741@186.178.109.237) (Quit: alx741)
02:20:34 iqubic` joins (~user@2601:602:9502:c70:4c2b:3e65:2528:a4da)
02:20:39 × iqubic` quits (~user@2601:602:9502:c70:4c2b:3e65:2528:a4da) (Remote host closed the connection)
02:24:17 justsomeguy joins (~justsomeg@user/justsomeguy)
02:24:51 Null_A joins (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e)
02:25:17 × iqubic quits (~user@2601:602:9502:c70:f7dd:50c9:a1b6:901a) (Ping timeout: 264 seconds)
02:28:51 × Null_A quits (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e) (Ping timeout: 245 seconds)
02:31:20 juhp joins (~juhp@128.106.188.220)
02:31:40 × juhp quits (~juhp@128.106.188.220) (Remote host closed the connection)
02:31:53 juhp joins (~juhp@128.106.188.220)
02:32:00 _xor joins (~xor@74.215.232.67)
02:39:04 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 265 seconds)
02:39:36 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
02:40:57 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
02:42:36 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 265 seconds)
02:46:08 × juhp quits (~juhp@128.106.188.220) (Quit: juhp)
02:46:22 juhp joins (~juhp@128.106.188.220)
02:46:34 × juhp quits (~juhp@128.106.188.220) (Read error: Connection reset by peer)
02:46:47 juhp joins (~juhp@128.106.188.220)
02:49:51 × terrorjack quits (~terrorjac@2a05:d012:f4:f400:3981:7d7e:56ee:2dd9) (Ping timeout: 265 seconds)
03:00:37 × juhp quits (~juhp@128.106.188.220) (Read error: Connection reset by peer)
03:00:45 juhp joins (~juhp@128.106.188.220)
03:12:26 vysn joins (~vysn@user/vysn)
03:18:17 ec joins (~ec@gateway/tor-sasl/ec)
03:19:23 × yauhsien quits (~yauhsien@118-167-48-21.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
03:26:34 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
03:28:10 theproffesor joins (~theproffe@2601:282:847f:8010::7704)
03:28:10 × theproffesor quits (~theproffe@2601:282:847f:8010::7704) (Changing host)
03:28:10 theproffesor joins (~theproffe@user/theproffesor)
03:38:14 td_ joins (~td@muedsl-82-207-238-070.citykom.de)
03:39:11 × segfaultfizzbuzz quits (~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 252 seconds)
03:44:37 × hendursaga quits (~weechat@user/hendursaga) (Remote host closed the connection)
03:45:02 hendursaga joins (~weechat@user/hendursaga)
04:00:41 yauhsien joins (~yauhsien@118-167-48-21.dynamic-ip.hinet.net)
04:05:35 × yauhsien quits (~yauhsien@118-167-48-21.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
04:08:50 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:09:03 falafel joins (~falafel@2603-8000-d800-688c-d1df-4118-0ede-09f0.res6.spectrum.com)
04:09:40 × aegon quits (~mike@174.127.249.180) (Remote host closed the connection)
04:17:47 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
04:20:38 × fjmorazan quits (~quassel@user/fjmorazan) (Ping timeout: 260 seconds)
04:20:56 fjmorazan joins (~quassel@user/fjmorazan)
04:32:53 falafel_ joins (~falafel@2603-8000-d800-688c-d1df-4118-0ede-09f0.res6.spectrum.com)
04:34:41 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 245 seconds)
04:35:42 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:35:56 × falafel quits (~falafel@2603-8000-d800-688c-d1df-4118-0ede-09f0.res6.spectrum.com) (Ping timeout: 245 seconds)
04:36:14 lavaman joins (~lavaman@98.38.249.169)
04:39:20 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:39:32 lavaman joins (~lavaman@98.38.249.169)
04:39:36 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:40:08 darkstardevx joins (~darkstard@2601:1c2:300:c8a0::f2b6)
04:40:10 lavaman joins (~lavaman@98.38.249.169)
04:42:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
04:44:16 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
04:45:32 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
04:53:24 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
04:54:09 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
04:54:52 × monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER)
04:56:06 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
04:56:08 × nabaiste^ quits (~nabaiste@68.101.50.106) (Remote host closed the connection)
04:56:14 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
04:58:51 monochrom joins (trebla@216.138.220.146)
05:20:03 yauhsien joins (~yauhsien@118-167-48-21.dynamic-ip.hinet.net)
05:22:45 × ridcully_ quits (~ridcully@p57b523cc.dip0.t-ipconnect.de) (Quit: update)
05:23:27 ridcully joins (~ridcully@p57b523cc.dip0.t-ipconnect.de)
05:24:16 × yauhsien quits (~yauhsien@118-167-48-21.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
05:31:51 qbt joins (~edun@user/edun)
05:38:59 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:41:56 peterhil joins (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi)
05:46:57 lavaman joins (~lavaman@98.38.249.169)
05:48:37 retroid_ joins (~retro@176.255.22.194)
05:51:11 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
05:52:33 Pseudonym joins (~Pseudonym@118.211.105.253)
05:57:36 × falafel_ quits (~falafel@2603-8000-d800-688c-d1df-4118-0ede-09f0.res6.spectrum.com) (Ping timeout: 245 seconds)
06:01:32 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
06:07:47 × cjb quits (~cjb@user/cjb) ()
06:08:07 ubert joins (~Thunderbi@77.119.219.178.wireless.dyn.drei.com)
06:08:19 michalz joins (~michalz@185.246.204.58)
06:08:25 × Guest8820 quits (~chris@81.96.113.213) (Remote host closed the connection)
06:08:43 × xff0x quits (~xff0x@2001:1a81:534d:3900:44bc:177a:6fca:f4ca) (Ping timeout: 252 seconds)
06:09:41 xff0x joins (~xff0x@2001:1a81:534d:3900:6377:c16b:fb27:9326)
06:10:13 jakalx parts (~jakalx@base.jakalx.net) ()
06:18:58 chomwitt joins (~chomwitt@2a02:587:dc0a:5800:12c3:7bff:fe6d:d374)
06:25:10 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
06:28:55 jakalx joins (~jakalx@base.jakalx.net)
06:30:40 × brainfreeze quits (~brainfree@2a03:1b20:4:f011::20d) (Quit: Leaving)
06:30:42 lortabac joins (~lortabac@2a01:e0a:541:b8f0:5b7d:5292:5e11:8e47)
06:32:02 lavaman joins (~lavaman@98.38.249.169)
06:36:21 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
06:38:30 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:38:58 × xff0x quits (~xff0x@2001:1a81:534d:3900:6377:c16b:fb27:9326) (Ping timeout: 252 seconds)
06:39:52 xff0x joins (~xff0x@2001:1a81:534d:3900:325e:28e:425a:62e0)
06:40:08 chris joins (~chris@81.96.113.213)
06:40:11 chris is now known as Guest5661
06:44:32 × Guest5661 quits (~chris@81.96.113.213) (Ping timeout: 252 seconds)
06:44:41 ubert1 joins (~Thunderbi@77.119.219.178.wireless.dyn.drei.com)
06:45:17 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
06:45:56 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
06:46:37 × ubert quits (~Thunderbi@77.119.219.178.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
06:46:37 ubert1 is now known as ubert
06:53:47 × chomwitt quits (~chomwitt@2a02:587:dc0a:5800:12c3:7bff:fe6d:d374) (Remote host closed the connection)
06:54:35 × echoreply quits (~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d) (Quit: WeeChat 2.8)
06:55:06 echoreply joins (~echoreply@45.32.163.16)
06:57:18 <Hecate> morning Haskell
06:58:06 chele joins (~chele@user/chele)
07:09:21 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
07:11:34 alzgh joins (~alzgh@user/alzgh)
07:13:01 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
07:13:16 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
07:17:45 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
07:27:25 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
07:30:42 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:32:55 fef joins (~thedawn@user/thedawn)
07:34:47 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:75e5:da2f:c054:6c5d) (Remote host closed the connection)
07:35:53 norskalm joins (~norskalm@101.175.64.73)
07:36:22 × Everything quits (~Everythin@37.115.210.35) (Quit: leaving)
07:37:49 × vysn quits (~vysn@user/vysn) (Ping timeout: 252 seconds)
07:37:54 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
07:40:18 <tomsmeding> mrianbloom: assuming you haven't found a solution yet: as far as I know Accelerate doesn't have a "top-level" filter function as you say, but one could relatively easily implement one analogous to the implementation of "filter" itself :)
07:40:25 max22- joins (~maxime@2a01cb0883359800761b1c69d9198b7f.ipv6.abo.wanadoo.fr)
07:41:26 acidjnk_new3 joins (~acidjnk@p200300d0c703cb49f045ad1a041448f2.dip0.t-ipconnect.de)
07:45:56 × neurocyte0132 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
07:47:44 kuribas joins (~user@ptr-25vy0i9jx2ordo6ztok.18120a2.ip6.access.telenet.be)
07:52:25 neurocyte0132 joins (~neurocyte@user/neurocyte)
07:52:29 ub joins (~Thunderbi@77.119.219.178.wireless.dyn.drei.com)
07:52:36 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 245 seconds)
07:53:40 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:48d7:e5a9:dcd4:1044)
07:57:50 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
07:58:01 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:48d7:e5a9:dcd4:1044) (Ping timeout: 245 seconds)
08:01:43 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:02:08 <kuribas> With RIO, you're supposed to always use exceptions, never Either/ExceptT?
08:02:18 <kuribas> Doesn't that negate the advantages of Either, namely visibility of errors, and enforcing handling them?
08:03:07 <Franciman> yes
08:03:32 <Franciman> fpcomplete is known for writing dumbass software
08:03:44 × ub quits (~Thunderbi@77.119.219.178.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
08:03:45 <Franciman> that may be very useful occasionally
08:04:39 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:a04c:1131:d9f9:a052)
08:05:03 <Franciman> as you read from their readme, it is intended as a cross between:
08:05:05 <Franciman> Collection of well designed, trusted libraries
08:05:07 <Franciman> Useful Prelude replacement
08:05:09 <Franciman> A set of best practices for writing production quality Haskell code
08:05:17 <Franciman> it seems that at fpcomplete using exceptions is considered better than using Either/ExceptT
08:05:20 <Franciman> maybe it is faster?
08:05:36 <kuribas> I don't think so.
08:05:43 <kuribas> It's less complex.
08:06:03 <Franciman> Either/ExceptT is less complex, you mean?
08:06:25 <kuribas> No Exceptions are. But IMO, the complexity is the benefit, it requires you to think about when and how to handle errors.
08:06:41 <kuribas> As opposed to just catching it at some toplevel.
08:06:43 <Franciman> well do notation helps quite a bit reducing the complexity, imho
08:06:43 <kuribas> Or not at all :)
08:06:45 eggplant_ joins (~Eggplanta@2600:1700:bef1:5e10:45b4:2298:3c2b:6589)
08:07:41 <kuribas> Or maybe RIO is a way to onboard imperative developers into haskell?
08:07:53 <Franciman> The goal of the rio library is to make it easier to adopt Haskell for writing production software.
08:07:57 <Franciman> (from the readme)
08:07:59 <Franciman> possibly
08:08:06 <kuribas> yeah
08:08:46 raym joins (~raym@user/raym)
08:08:51 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a04c:1131:d9f9:a052) (Ping timeout: 245 seconds)
08:10:56 × eggplant_ quits (~Eggplanta@2600:1700:bef1:5e10:45b4:2298:3c2b:6589) (Ping timeout: 245 seconds)
08:16:37 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
08:17:17 cfricke joins (~cfricke@user/cfricke)
08:17:17 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
08:19:16 × hnOsmium0001 quits (uid453710@id-453710.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
08:21:26 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
08:24:11 Heisen joins (~Heisen@77.240.67.20)
08:26:00 <kuribas> For that purpose it's fine.
08:26:28 <dminuoso> 10:09:30 kuribas | [08:02:08] With RIO, you're supposed to always use exceptions, never Either/ExceptT?
08:26:34 <dminuoso> No, you can use Either/ExceptT just fine.
08:27:02 <dminuoso> It's rather with RIO you can't use non ReaderT/Identity based transformers globally.
08:27:32 <dminuoso> A lot of my programs are written in something isomorphic to RIO, and I use MaybeT locally a lot.
08:27:33 <kuribas> so ExceptT err (RIO r) a ?
08:27:35 nfd joins (~nfd@user/nfd)
08:27:45 <dminuoso> Sure, as a local effect this is fine.
08:28:03 <kuribas> or RIO r (Either err a), then use ExceptT to plumb stuff together?
08:28:16 <kuribas> Which is actually what I do know, but without RIO.
08:28:56 <kuribas> in fact just "localState -> IO a"
08:29:27 <maerwald> why use RIO at all, just roll your own
08:29:49 <kuribas> maerwald: to have an easy to use library for newcommers?
08:29:50 <maerwald> mtl MonadReader + labeloptics + ExceptT
08:30:07 <maerwald> kuribas: but is that INDUSTRY-grade?
08:30:17 <dminuoso> I always roll my own stack, it's usually some `newtype AppM a = AppM { runApp :: LoggingT (ReaderT Env IO) a }`
08:30:36 <kuribas> maerwald: I think it's all the same, just a different jacket.
08:30:37 <maerwald> oh, i never use a newtyped monad
08:30:55 <dminuoso> With GND its wonderful.
08:31:08 <kuribas> maerwald: I *always* use a newtype monad. It saves me from writing the plumbing.
08:31:25 <maerwald> what plumbing
08:31:26 × Heisen quits (~Heisen@77.240.67.20) (Quit: Client closed)
08:31:36 <kuribas> the monad/applicative instances
08:31:42 <maerwald> odd, I don't write any
08:31:58 <dminuoso> maerwald: I just use a newtype for guaranteed better diagnostics.
08:32:18 terrorjack joins (~terrorjac@2a05:d012:f4:f400:3981:7d7e:56ee:2dd9)
08:32:21 <kuribas> a newtype gives a nice level of abstraction.
08:32:28 <dminuoso> Sometimes GHC is being silly and expands type aliases when it doesnt help, and doesnt expand then when it would help..
08:32:45 <maerwald> it hides the details, I want to see the details, because transformers are a poor abstraction, I'd rather see them
08:32:58 <dminuoso> With ReaderT/LoggingT in my mind it's always essentially IO.
08:33:05 <dminuoso> So their abstraction is almost weightless.
08:36:57 <kuribas> dminuoso: can't you put the logging inside the r?
08:37:05 <kuribas> Env in your case?
08:37:23 <kuribas> as a callback
08:37:48 <maerwald> I do logging via IO and labeloptics
08:37:57 × Pseudonym quits (~Pseudonym@118.211.105.253) (Quit: Going offline, see ya! (www.adiirc.com))
08:38:03 <maerwald> hooking into the MonadReader env
08:38:05 <kuribas> what does labeloptics have to do with logging?
08:38:19 <kuribas> right, that's what I mean.
08:38:21 <maerwald> you can run it over MonadReader and IO
08:38:50 <maerwald> your logging config is in the monadreader, you access it via labeloptics and the actual logging is just plain IO
08:38:54 <maerwald> it's like 30 lines of code
08:39:02 <maerwald> instead of an entire library
08:40:09 <kuribas> yeah
08:40:44 <dminuoso> kuribas: Sure I could, but I like being lazy and monad-logger gets the job done.
08:40:56 <maerwald> and pulls in conduit and 20 other libs
08:41:10 <dminuoso> Havent had the time to massage monad-logger into what I want, and the interface is acceptable to me.
08:41:24 <dminuoso> Also most of its dependency footprint happens to coincide with what I often have too
08:41:29 <dminuoso> So it's not a big deal for me
08:41:39 <maerwald> you're a conduit user? x(
08:41:56 <dminuoso> No, not generally.
08:42:03 <kuribas> maerwald: conduit is fine when you need it.
08:42:21 <maerwald> I'd rather use something with less over-engineered API and better performance :p
08:42:31 <kuribas> dminuoso: and how would you model a REST endpoint server (servant)? Throw exceptions for abnormal status codes?
08:42:43 <dminuoso> maerwald: conduit is rather hard to avoid in your transitive dependency tree.
08:42:53 <maerwald> dminuoso: I managed it though
08:43:01 <maerwald> but had to remove 3 deps or so
08:43:13 <kuribas> haskell programs usually have huge dependency trees.
08:43:20 <kuribas> for example dhall.
08:43:21 <dminuoso> mine dont, usually
08:43:44 <maerwald> I'm starting to go the low dep footprint and also regularly copy-paste code and adjust it rather than wasting 6 months on trying to upstream it
08:43:58 <maerwald> or just re-implement something simple
08:44:12 <dminuoso> Same, mostly.
08:44:33 <maerwald> NMU also doesn't work well
08:44:33 <dminuoso> 10:42:31 kuribas | dminuoso: and how would you model a REST endpoint server (servant)? Throw exceptions for abnormal status codes?
08:44:35 <dminuoso> Yes.
08:44:35 × azeem quits (~azeem@2a00:801:2d0:9de5:7998:f5fe:f405:f6a8) (Read error: Connection reset by peer)
08:44:48 azeem joins (~azeem@emp-180-222.eduroam.uu.se)
08:44:49 <dminuoso> kuribas: So ServantError already has an instance Exception, you can throw that.
08:44:57 <kuribas> or maybe even a single exception containing body and status code...
08:45:09 <kuribas> right
08:45:11 <dminuoso> My natural transformation `AppM ~> Handler` catches them and rewraps them into a Left error.
08:45:31 <dminuoso> That's the style I use in all three of our servant apps.
08:45:36 × azeem quits (~azeem@emp-180-222.eduroam.uu.se) (Read error: Connection reset by peer)
08:45:42 <dminuoso> *servers
08:46:30 <dminuoso> ServerError they are actually called I think
08:46:36 <kuribas> neat
08:46:58 <maerwald> https://hackage.haskell.org/package/servant-exceptions
08:47:04 <dminuoso> It's not perfect, you have to be careful with IO in negative position
08:47:19 <Hecate> I never used servant-exceptions
08:47:27 × max22- quits (~maxime@2a01cb0883359800761b1c69d9198b7f.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds)
08:47:28 <dminuoso> A careless `catch/catches` can prevent them from working
08:47:53 <dminuoso> For us its not a big deal, because mostly we maintain hierarchial exception trees that we can catch with precision
08:47:56 <maerwald> There's also https://hackage.haskell.org/package/servant-checked-exceptions
08:47:59 <Hecate> but I had to interface Servant endpoints with legacy code that was massively using custom exceptions, so I re-throw the business logic exceptions as ExceptT in the natural transform
08:48:02 <dminuoso> But on the care occasion you have to blindly catch an IOException, it sucks.
08:48:14 <maerwald> But there's an upstream issue about changing the api to allow expressing failures directly
08:48:18 <dminuoso> Because you have to explicitly rethrow ServerError
08:48:37 azeem joins (~azeem@emp-180-222.eduroam.uu.se)
08:48:39 <maerwald> https://github.com/haskell-servant/servant/pull/1314
08:48:42 <maerwald> which is actually merged
08:49:10 <maerwald> https://github.com/haskell-servant/servant/blob/c1105899f47d5537c1bdc8c86bee3523bdf05282/doc/cookbook/uverb/UVerb.lhs
08:49:32 <maerwald> So there's `WithStatus blah`
08:51:06 × tomsmeding quits (~tomsmedin@tomsmeding.com) (Quit: ZNC 1.8.2 - https://znc.in)
08:51:09 acidjnk_new joins (~acidjnk@p200300d0c703cb4919aae83405072cdc.dip0.t-ipconnect.de)
08:52:30 Guest53 joins (~Guest53@77.240.67.20)
08:52:51 tomsmeding joins (~tomsmedin@tomsmeding.com)
08:53:12 acidjnk joins (~acidjnk@p200300d0c703cb4919aae83405072cdc.dip0.t-ipconnect.de)
08:54:16 × acidjnk_new3 quits (~acidjnk@p200300d0c703cb49f045ad1a041448f2.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
08:55:55 × acidjnk_new quits (~acidjnk@p200300d0c703cb4919aae83405072cdc.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
08:56:22 × kuribas quits (~user@ptr-25vy0i9jx2ordo6ztok.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
08:56:39 kuribas joins (~user@ptr-25vy0i9jx2ordo6ztok.18120a2.ip6.access.telenet.be)
08:59:09 × Guest53 quits (~Guest53@77.240.67.20) (Quit: Client closed)
08:59:09 <kuribas> I am recreating servant in idris, with better ergonomics (hopefully).
08:59:20 <kuribas> It looks promising.
08:59:55 <Franciman> but good luck
08:59:57 <Franciman> let us know
08:59:59 <Franciman> -but
09:00:00 <kuribas> I have an anonymous record implementation for dealing with captures and parameters, rather than positional parameters.
09:00:08 × RohitGoswami[m] quits (~rgoswamim@2001:470:69fc:105::16cc) (Quit: You have been kicked for being idle)
09:00:21 <kuribas> IMO those get complicated fast, if you have a lot of parameters.
09:00:25 <kuribas> like more than 3 :)
09:00:33 RohitGoswami[m] joins (~rgoswamim@2001:470:69fc:105::16cc)
09:02:23 <kuribas> I already wrote a haskell library to deal with that https://hackage.haskell.org/package/named-servant
09:02:31 <kuribas> but writing it was a pain.
09:02:45 <kuribas> And so is extending servant to do anything besides base functionality.
09:03:58 <kuribas> Franciman: I will :) It's just that idris seems to be lacking libraries for about anything.
09:06:04 <kuribas> I could port wai, then implement it on a jvm server (or chez scheme server).
09:06:57 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
09:07:37 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
09:07:50 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
09:08:09 oxide joins (~lambda@user/oxide)
09:09:16 × xff0x quits (~xff0x@2001:1a81:534d:3900:325e:28e:425a:62e0) (Ping timeout: 245 seconds)
09:10:03 xff0x joins (~xff0x@2001:1a81:534d:3900:7ca7:1f1d:7921:2152)
09:10:46 <kuribas> My basic idea is not to make something super generic, but rather give a lot of tools (parsers for parameters, etc..), so you can just roll your own solution that fits your API.
09:23:06 × amk quits (~amk@109.255.169.126) (Remote host closed the connection)
09:23:14 yauhsien joins (~yauhsien@118-167-48-21.dynamic-ip.hinet.net)
09:23:16 amk joins (~amk@109.255.169.126)
09:26:17 chomwitt joins (~chomwitt@2a02:587:dc0a:5800:12c3:7bff:fe6d:d374)
09:26:44 <carbolymer> are call stacks somehow extractable from exceptions? I have a few functions with `HasCallStack` calling each other, in `catch` I'm calling `GHC.Stack.whoCreated` on exception, and I'm not getting anything
09:27:19 <kuribas> carbolymer: did you compile with profiling option?
09:27:31 <carbolymer> kuribas: HasCallStack does not require -prof
09:27:36 × yauhsien quits (~yauhsien@118-167-48-21.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
09:28:46 <carbolymer> ah, but whoCreated requires...
09:29:16 <carbolymer> so I need to attach callStack to exceptions at the throw site manually, right?
09:30:12 <kuribas> AFAIK you have to add the constraint.
09:30:15 <kuribas> HasCallStack
09:30:29 <carbolymer> yes, but how can you extract call stack from exception?
09:30:50 dunj3 joins (~dunj3@2001:981:9d95:1:886d:656c:9636:23f4)
09:30:53 <dminuoso> % :t callStack
09:30:53 <yahb> dminuoso: ; <interactive>:1:1: error: Variable not in scope: callStack
09:31:00 <dminuoso> % import GHC.Stack.HasCallStack
09:31:01 <yahb> dminuoso: ; <no location info>: error:; Could not find module `GHC.Stack.HasCallStack'; It is not a module in the current program, or in any known package.
09:31:03 <dminuoso> Oh well.
09:31:06 <dminuoso> carbolymer: Use callStack.
09:31:16 <dminuoso> https://hackage.haskell.org/package/base-4.15.0.0/docs/GHC-Stack.html#v:callStack
09:31:38 <carbolymer> dminuoso: but callStack returns call stack at the invocation place, I need the call stack from throwIO / throwM was used
09:36:38 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
09:38:35 <carbolymer> hmm that could work with ImplicitParams magic...
09:40:29 <carbolymer> can I use Implicit params with constructors? like:
09:40:29 <carbolymer> data SubAException = (?stacktrace :: CallStack) => SubAException { stacktrace :: !CallStack }
09:40:59 <carbolymer> but the problem is that SubAException is `CallStack -> SubAException`
09:41:20 <carbolymer> I guess I need a helper function to do that, don't I?
09:42:16 <carbolymer> https://hackage.haskell.org/package/base-4.15.0.0/docs/src/GHC-Err.html#error
09:42:22 <carbolymer> I think the answer is yes
09:42:42 <Franciman> I remember there was an haskell-numeric channel for numeric calculus in haskell
09:42:55 <Franciman> but i don't recall the name of the channel, any help?
09:45:12 <carbolymer> Franciman: #numerical-haskell
09:45:13 <carbolymer> ?
09:45:16 <carbolymer> try /list
09:46:07 mestre joins (~mestre@191.177.175.57)
09:46:19 <Franciman> thanks carbolymer
09:55:46 max22- joins (~maxime@2a01cb0883359800af7b6a67b5a81e97.ipv6.abo.wanadoo.fr)
10:02:14 benin036932301 joins (~benin@183.82.204.86)
10:05:52 <carbolymer> that does not look bad: https://bpa.st/A6LQ - now I need to figure out if I can combine `throwM` with `withStack`
10:07:57 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:45b4:2298:3c2b:6589)
10:12:11 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:45b4:2298:3c2b:6589) (Ping timeout: 245 seconds)
10:13:29 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
10:15:13 × dunj3 quits (~dunj3@2001:981:9d95:1:886d:656c:9636:23f4) (Quit: Leaving)
10:15:31 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 245 seconds)
10:15:34 dunj3 joins (~dunj3@kingdread.de)
10:19:13 ubert1 joins (~Thunderbi@77.119.208.41.wireless.dyn.drei.com)
10:20:01 × ubert quits (~Thunderbi@77.119.219.178.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
10:20:01 ubert1 is now known as ubert
10:28:24 fef joins (~thedawn@user/thedawn)
10:31:12 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
10:32:35 gehmehgeh joins (~user@user/gehmehgeh)
10:45:25 jakalx parts (~jakalx@base.jakalx.net) ()
10:45:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
10:45:40 fef joins (~thedawn@user/thedawn)
10:46:33 jakalx joins (~jakalx@base.jakalx.net)
10:46:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:51:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
10:52:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:55:09 × ozzymcduff quits (~mathieu@81-234-151-21-no94.tbcn.telia.com) (Remote host closed the connection)
10:57:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
10:58:15 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:59:16 × oxide quits (~lambda@user/oxide) (Ping timeout: 245 seconds)
10:59:39 betelgeuse joins (~betelgeus@94-225-47-8.access.telenet.be)
11:00:23 oxide joins (~lambda@user/oxide)
11:00:52 alx741 joins (~alx741@186.178.109.237)
11:03:35 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
11:04:06 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:09:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
11:10:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:13:50 enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
11:15:34 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
11:16:04 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:20:06 × azeem quits (~azeem@emp-180-222.eduroam.uu.se) (Read error: Connection reset by peer)
11:20:21 azeem joins (~azeem@emp-180-222.eduroam.uu.se)
11:21:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
11:21:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:25:00 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:27:19 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
11:37:56 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:45b4:2298:3c2b:6589)
11:40:40 × xsperry quits (~xs@cpe-188-129-101-182.dynamic.amis.hr) (Changing host)
11:40:40 xsperry joins (~xs@user/xsperry)
11:42:11 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:45b4:2298:3c2b:6589) (Ping timeout: 245 seconds)
11:46:50 Heisen joins (~Heisen@77.240.67.20)
11:48:20 xiongxin joins (~quassel@113.116.33.5)
11:48:41 <Heisen> How come we return "again" and not the "My Shangri-La" in getX? https://paste.tomsmeding.com/ecU7GGtn
11:51:51 <dminuoso> Heisen: `return` is misleadingly named
11:52:28 <dminuoso> `return` does not short circuit some block of imperative code, instead it creates a "pure action that immediately returns the right hand side as its result"
11:52:49 <dminuoso> So for IO, `pure 1 :: IO Int` is a (pure) IO action that, as the result of its execution, would yield 1 instantly .
11:52:55 <dminuoso> Note that `pure == return`.
11:53:01 × peterhil quits (~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Quit: Must not waste too much time here...)
11:53:15 <dminuoso> I tend to prefer `pure` over `return` simply because its better named. :)
11:54:43 <dminuoso> This is better observed if, instead of do-notation, we use explicit (>>=)
11:55:28 <dminuoso> Consider: getLine >>= (\str -> pure (str ++ "!"))
11:56:30 × mestre quits (~mestre@191.177.175.57) (Quit: Lost terminal)
11:59:27 × jlamothe quits (~jlamothe@104.158.48.100) (Quit: leaving)
12:00:07 × max22- quits (~maxime@2a01cb0883359800af7b6a67b5a81e97.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds)
12:03:25 <xsperry> > do return 10; return 20 :: Maybe Int
12:03:26 <lambdabot> Just 20
12:04:02 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
12:04:07 <Heisen> dminuoso We are returning "again" since the value of a sequence of IO actions is the same as the value of the last action in the sequence and what Return is doing is turning the String into an action? Is that correct?
12:04:23 jespada joins (~jespada@2803:9800:9842:7a62:8558:368:788c:6dc6)
12:05:29 <Heisen> If return isn't turning "again" into an action how can we do x <- getX, in particular <-, since that operator requires an IO of something right?
12:07:06 <xsperry> `return "foo"' just creates a NOP action that will, when run, produce "foo". it doesn't stop the execution of the rest of the do block
12:10:08 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 252 seconds)
12:11:14 hyiltiz joins (~quassel@31.220.5.250)
12:12:05 fef joins (~thedawn@user/thedawn)
12:15:23 × Heisen quits (~Heisen@77.240.67.20) (Quit: Client closed)
12:15:51 acidjnk_new joins (~acidjnk@p200300d0c703cb495908c3ed7e15521a.dip0.t-ipconnect.de)
12:16:17 geranim0 joins (~geranim0@modemcable242.171-178-173.mc.videotron.ca)
12:18:03 × geranim0 quits (~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Remote host closed the connection)
12:18:23 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 252 seconds)
12:19:07 slowButPresent joins (~slowButPr@user/slowbutpresent)
12:19:25 × acidjnk quits (~acidjnk@p200300d0c703cb4919aae83405072cdc.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
12:19:55 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
12:20:21 <tdammers> it may be helpful to reason about `return` in terms of a different type, like Maybe, Either a, or []
12:20:32 <tdammers> > return 10 :: [Int]
12:20:33 <Cale> I think of it not as being that return is misleadingly named so much as that it just doesn't refer to the same thing as you might be familiar with from imperative languages. The action (return v) is an action which does nothing except to, well, return v
12:20:34 <lambdabot> [10]
12:21:26 <Cale> In most imperative languages, it doesn't behave quite like any other procedure call you could put there -- it has a control effect that you couldn't otherwise obtain.
12:22:47 lstor joins (~lstor@user/lstor)
12:22:58 <Cale> But in Haskell, it's not magic, just a way of making a simple action that returns a given value when executed.
12:24:32 geranim0 joins (~geranim0@modemcable242.171-178-173.mc.videotron.ca)
12:24:54 jlamothe joins (~jlamothe@104.158.48.100)
12:25:36 Robin_Jadoul joins (~Robin_Jad@152.67.64.160)
12:26:05 kenran joins (~kenran@200116b82b7c770026c5086ce7603c15.dip.versatel-1u1.de)
12:26:35 brsvh joins (~brsvh@45.33.39.92)
12:27:15 lbseale joins (~lbseale@user/ep1ctetus)
12:28:48 <Cale> (To put it another way, return v returns v from itself, not from the surrounding procedure definition or whatever.
12:28:49 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
12:28:51 <Cale> )
12:28:57 MQ-17J joins (~MQ-17J@8.6.144.233)
12:29:13 Psybur joins (~Psybur@mobile-166-170-32-197.mycingular.net)
12:30:10 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
12:34:11 lavaman joins (~lavaman@98.38.249.169)
12:34:48 jumper149 joins (~jumper149@80.240.31.34)
12:36:10 pbrisbin joins (~patrick@pool-173-49-147-250.phlapa.fios.verizon.net)
12:38:35 hyiltiz joins (~quassel@31.220.5.250)
12:39:50 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
12:42:59 CiaoSen joins (~Jura@p2e5c6ba6.dip0.t-ipconnect.de)
12:45:40 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
12:45:47 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
12:46:05 fef joins (~thedawn@user/thedawn)
12:46:06 × Robin_Jadoul quits (~Robin_Jad@152.67.64.160) (Remote host closed the connection)
12:47:31 desantra joins (~skykanin@user/skykanin)
12:49:14 × geranim0 quits (~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Remote host closed the connection)
12:50:10 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
12:50:25 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2)
12:54:41 × kenran quits (~kenran@200116b82b7c770026c5086ce7603c15.dip.versatel-1u1.de) (Quit: WeeChat info:version)
12:54:41 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2) (Ping timeout: 245 seconds)
12:59:01 Robin_Jadoul joins (~Robin_Jad@152.67.64.160)
13:00:14 × desantra quits (~skykanin@user/skykanin) (Quit: WeeChat 3.3)
13:00:51 zer0bitz joins (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi)
13:06:12 × neurocyte0132 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
13:08:52 <ldlework> I just think of `return` as `pure` which i think of as `box`
13:09:17 <merijn> I just don't think \o/
13:09:36 <ldlework> be the haskell
13:09:58 <merijn> I didn't switch to a strongly typed language because I wanna think about the stuff I write!
13:10:07 <ldlework> hah
13:10:43 <shapr> it is easier to write Haskell than other languages when really tired
13:12:32 <merijn> Haskell best-in-slot language for coding drunk :p
13:13:33 Guest20 joins (~Guest20@p200300f77707f3fd2b40c5f534cfc2c2.dip0.t-ipconnect.de)
13:14:26 × brsvh quits (~brsvh@45.33.39.92) (Quit: Client closed)
13:15:18 × Guest20 quits (~Guest20@p200300f77707f3fd2b40c5f534cfc2c2.dip0.t-ipconnect.de) (Client Quit)
13:18:52 max22- joins (~maxime@2a01cb088335980013e52131b43b1c30.ipv6.abo.wanadoo.fr)
13:21:31 vpan joins (~vilius@212.117.1.172)
13:27:22 chris joins (~chris@81.96.113.213)
13:27:26 chris is now known as Guest6083
13:28:59 × Guest6083 quits (~chris@81.96.113.213) (Remote host closed the connection)
13:29:11 chris joins (~chris@81.96.113.213)
13:29:15 chris is now known as Guest6000
13:29:18 × Guest6000 quits (~chris@81.96.113.213) (Remote host closed the connection)
13:30:48 chris joins (~chris@81.96.113.213)
13:30:52 chris is now known as Guest4408
13:38:49 × lbseale quits (~lbseale@user/ep1ctetus) (Ping timeout: 265 seconds)
13:40:36 <maerwald> merijn: I disagree
13:40:44 <maerwald> Java is the best language for drunken coding
13:40:49 <maerwald> in fact, I can only code java when drunk
13:41:06 <maerwald> for Haskell, I need to be awake
13:42:02 shriekingnoise joins (~shrieking@186.137.144.80)
13:42:10 <merijn> If that was true I'd never have finished my thesis >.>
13:42:15 <maerwald> lol
13:42:18 <maerwald> did you?
13:42:20 Morrow joins (~Morrow@147.161.14.157)
13:42:22 × azeem quits (~azeem@emp-180-222.eduroam.uu.se) (Read error: Connection reset by peer)
13:43:30 <merijn> maerwald: That's the kinda talk that gets men stabbed ;)
13:44:24 <merijn> 2 chapters worth of comments left this week, although most of them so far are "slightly reword a sentence" and "fuck that, too much work, just gonna mark that as addressed and assume they won't notice on a 2nd read" :p
13:44:28 azeem joins (~azeem@emp-180-222.eduroam.uu.se)
13:44:37 × CiaoSen quits (~Jura@p2e5c6ba6.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
13:47:40 <maerwald> I have an Auchentoshan 3-wood left here. That would get you through half of the week, I guess.
13:49:47 <merijn> maerwald: The only good Auchentoshan :)
13:49:58 <merijn> I really like the Three Wood
13:50:09 <merijn> Not so easy to get here anymore, though
13:50:38 <merijn> maerwald: At this point the writing is more of an "Ardbeg Corryvreckan"-thing, then a Three Wood :p
13:59:58 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2)
14:01:41 fvr joins (uid503686@id-503686.uxbridge.irccloud.com)
14:04:18 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:04:18 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
14:04:18 wroathe joins (~wroathe@user/wroathe)
14:04:35 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2) (Ping timeout: 265 seconds)
14:08:22 azimut_ joins (~azimut@gateway/tor-sasl/azimut)
14:10:39 <janus> can i make an instance that quantifies over type parameters supplied via DataKinds?
14:11:10 <janus> i have 'instance ToJSON (Foobar a) where' but the instance is not getting picked up on 9.0.1, on 8.6.5 it works fine
14:11:12 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
14:11:59 <janus> so i was thinking it must be related to GHC prop 0055-instance-foralls which mentions some things that landed in 8.8.
14:12:22 <janus> it says that TypeInType makes it such that it is not possible to infer kinds of type variables
14:12:48 <janus> ok, so i tried changing the instance to 'instance forall (a :: Type). ToJSON (Foobar a) where' but that doesn't seem to work
14:14:08 <lortabac> janus: what do you mean by "type parameters supplied via DataKinds"?
14:16:25 <janus> lortabac: well i have "type MasterFoobar = Foobar 'Master" and "type HouseFoobar = Foobar 'House". they come from "data Designator = Master | House"
14:16:49 yinghua joins (~yinghua@2800:2121:1400:1db:c8ff:6a08:d6d8:71db)
14:16:51 <janus> so Foobar is supposed parameterized with values of the Designator type
14:17:02 <lortabac> janus: then your signature is not correct
14:17:18 <janus> aaah right cause that wouldn't be a type, ok, hmm
14:17:19 <lortabac> forall (a :: Type) means that 'a' is a type
14:18:00 × Guest4408 quits (~chris@81.96.113.213) (Remote host closed the connection)
14:18:03 <janus> right , ok, i have modelled the 'typical' case instead of the fancy ass case i have where values flow into the type system with datakinds
14:19:31 <lortabac> if you replace Type with Designator there is no reason it shouldn't work
14:20:11 <janus> i did replace it as you suggest. it doesn't seem to work, though. i get "No instance arising for (ToJSON (Foobar 'Master))" ... hmmm
14:20:25 × acidjnk_new quits (~acidjnk@p200300d0c703cb495908c3ed7e15521a.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
14:20:39 <janus> i could work around it and just make a function that works for both, and then make the two instances manually... surely that should work
14:21:18 <lortabac> there must be some other problem
14:21:35 <janus> yeah i'll try to make a minimal reproducible example :)
14:22:27 <lortabac> using other kinds than Type is certainly possible, if GHC 9 stops supporting it half of Hackage would break :D
14:23:25 choucavalier joins (~choucaval@peanutbuttervibes.com)
14:26:48 × choucavalier quits (~choucaval@peanutbuttervibes.com) (Changing host)
14:26:48 choucavalier joins (~choucaval@user/choucavalier)
14:28:35 × spruit11 quits (~quassel@2a02:a467:ccd6:1:1568:8cd5:25bd:6e4e) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
14:31:58 ec joins (~ec@gateway/tor-sasl/ec)
14:35:01 geekosaur joins (~geekosaur@xmonad/geekosaur)
14:37:37 chris joins (~chris@81.96.113.213)
14:37:41 chris is now known as Guest8402
14:49:18 hnOsmium0001 joins (uid453710@id-453710.hampstead.irccloud.com)
14:52:17 Sgeo joins (~Sgeo@user/sgeo)
14:53:58 × ubert quits (~Thunderbi@77.119.208.41.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
14:54:24 × Guest8402 quits (~chris@81.96.113.213) (Remote host closed the connection)
14:55:24 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
14:57:26 chris joins (~chris@81.96.113.213)
14:57:30 chris is now known as Guest9854
14:57:41 × Guest9854 quits (~chris@81.96.113.213) (Remote host closed the connection)
14:59:19 Null_A joins (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e)
15:01:37 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
15:02:36 Guest5827 joins (~chris@81.96.113.213)
15:03:51 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
15:05:48 × troydm1 quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset)
15:07:00 × Guest5827 quits (~chris@81.96.113.213) (Ping timeout: 250 seconds)
15:09:28 ozzymcduff joins (~mathieu@81-234-151-21-no94.tbcn.telia.com)
15:18:51 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:18:51 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
15:18:51 wroathe joins (~wroathe@user/wroathe)
15:20:03 vysn joins (~vysn@user/vysn)
15:20:06 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
15:20:55 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
15:21:42 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2)
15:23:28 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
15:25:03 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:5b7d:5292:5e11:8e47) (Quit: WeeChat 2.8)
15:25:56 troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua)
15:28:35 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:28:35 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
15:28:35 wroathe joins (~wroathe@user/wroathe)
15:29:33 yin[m] is now known as zwro[m]
15:31:42 yauhsien joins (~yauhsien@118-167-48-21.dynamic-ip.hinet.net)
15:32:28 theproffesor parts (~theproffe@user/theproffesor) (Leaving)
15:33:29 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
15:33:32 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
15:34:06 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
15:35:37 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
15:36:10 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2) (Remote host closed the connection)
15:39:05 × Null_A quits (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e) (Remote host closed the connection)
15:39:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
15:42:49 mjrosenb joins (~mjrosenb@pool-108-54-97-96.nycmny.fios.verizon.net)
15:44:35 × yauhsien quits (~yauhsien@118-167-48-21.dynamic-ip.hinet.net) (Remote host closed the connection)
15:45:08 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
15:46:00 yauhsien joins (~yauhsien@118-167-48-21.dynamic-ip.hinet.net)
15:46:04 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2)
15:47:15 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2) (Remote host closed the connection)
15:47:30 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2)
15:48:22 ec joins (~ec@gateway/tor-sasl/ec)
15:48:34 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
15:49:42 × xiongxin quits (~quassel@113.116.33.5) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
15:54:14 Guest47 joins (~Guest47@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
15:56:37 <Guest47> Given that Haskell makes quite a big use of recursion (correct me if I'm wrong), does GHC have any special optimizations against redundant calculations?
15:56:47 ysavd^ joins (~ysavd@68.101.50.106)
15:56:54 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
15:57:10 lbseale joins (~lbseale@user/ep1ctetus)
15:57:46 × justache quits (~justache@user/justache) (Read error: Connection reset by peer)
15:58:37 justache joins (~justache@user/justache)
15:59:22 <c_wraith> I'm not seeing a connection between the premise (which is true) and the question
15:59:40 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
16:00:12 × RohitGoswami[m] quits (~rgoswamim@2001:470:69fc:105::16cc) (Quit: You have been kicked for being idle)
16:00:44 notzmv joins (~zmv@user/notzmv)
16:00:56 <Guest47> well as I see it, the premise is a good motivation to have opt-in memoization for example
16:01:00 <c_wraith> as for the question itself - GHC will do common subexpression elimination in limited circumstances, and it will do a transform called "full laziness" in slightly less limited circumstances. Both are quite likely to destroy performance when it guesses wrong.
16:01:11 <Franciman> Guest47: haskell uses call by need
16:01:29 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
16:01:29 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
16:01:29 wroathe joins (~wroathe@user/wroathe)
16:01:30 <c_wraith> memoization is not a performance improvement in general
16:01:43 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
16:01:55 econo joins (uid147250@user/econo)
16:02:18 <Guest47> c_wraith: could you please elaborate on that since I just left my lecture haha
16:02:50 <c_wraith> memoization only helps if the cost of storing and looking up results is cheaper than the cost of calculating them.
16:02:54 <c_wraith> That's very often not true.
16:03:43 geekosaur joins (~geekosaur@xmonad/geekosaur)
16:03:50 <Guest47> like if you're doing IO over a network? Or does it take much less than that?
16:04:06 <c_wraith> It's not even *valid* to memoize IO in general
16:04:27 <c_wraith> the whole point of IO is that things can change.
16:04:37 Lycurgus joins (~juan@98.4.112.204)
16:05:07 <c_wraith> your ntp client really should memoize server responses!
16:05:13 <tdammers> the way Haskell is evaluated means that typical recursions can be evaluated in constant space. depending on how you look at it, this can be interpreted as "Haskell does automatic TCO", or "Haskell doesn't need TCO"
16:05:14 <c_wraith> err. +not
16:05:15 <Guest47> yes how very silly of me
16:05:44 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds)
16:06:10 <c_wraith> but, like.. even common subexpression elimination can be really bad for performance in haskell
16:06:44 <Guest47> I don't really see how you can do subexpression elimination in recursive calls
16:06:59 <c_wraith> as an example: (sum [1..10000000000] + product [1..10000000000]) should not introduce sharing of the [1..10000000000] value
16:07:18 <c_wraith> It's a very long list.
16:07:24 <c_wraith> if it's shared, it's kept in memory
16:07:28 <mjrosenb> the CSE is separate from any form of recursion.
16:07:34 <c_wraith> and that adds quite a bit of drag on the garbage collector
16:07:45 <c_wraith> If it's not shared, it's streamed twice.
16:07:54 <c_wraith> And that's a lot more efficient
16:08:03 <Guest47> excuse me, what does streaming mean?
16:08:06 × azeem quits (~azeem@emp-180-222.eduroam.uu.se) (Ping timeout: 250 seconds)
16:08:16 <mjrosenb> c_wraith: the compiler could theoretically share it, and interleave the sum and product calculations
16:08:22 <mjrosenb> but that sounds like a lot of work
16:08:25 <Guest47> keeping only the required value in memory at any give time?
16:08:34 <c_wraith> it means that all that's ever in memory is the head of the list and a thunk to generate the rest of the list
16:08:39 azeem joins (~azeem@2a00:801:2d5:6b0b:3559:4c30:7a57:5531)
16:09:18 <Guest47> so we're assuming something like: `sum x:xs = x + sum xs`?
16:09:44 <c_wraith> I was just assuming Prelude.sum
16:10:29 <c_wraith> which is really Data.Foldable.sum now, I suppose.
16:12:03 <c_wraith> But `sum [] = 0; sum (x:xs) = x + sum xs` is a good example of why memoization can be a huge performance loss.
16:12:30 <c_wraith> a memo table for that function would take lists as input
16:12:41 × Robin_Jadoul quits (~Robin_Jad@152.67.64.160) (Ping timeout: 252 seconds)
16:13:23 <c_wraith> Just checking to see if a list is currently in the memo table would probably be slower than computing its sum
16:14:22 <c_wraith> Not to mention the incredible amount of memory it could end up using.
16:14:23 <Guest47> you would need to make sure that all the list's elements are in the memoization table I suppose
16:14:52 × enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
16:16:04 <c_wraith> Memoization tends to only be a significant win if the problem structure is multiply-recursive
16:16:18 <c_wraith> And each recursive call needs to do overlapping work
16:16:29 benin0369323019 joins (~benin@106.198.91.149)
16:16:51 <c_wraith> It's the latter part that's non-trivial to detect statically.
16:17:03 <c_wraith> It's also not really that common
16:17:16 <davean> Its trivial to detect *statistically* its difficult to detect algrithmicly
16:17:16 <c_wraith> So it's just left to the programmer to memoize when it does help
16:17:35 <davean> we have a serious lack of statistics driven optimization though
16:17:39 <Hecate> we do
16:17:59 <Guest47> Aha yes, my professor gave examples with factorial and Fibonacci so I got my hopes up
16:18:21 <c_wraith> factorial doesn't even memoize that well.
16:18:44 × benin036932301 quits (~benin@183.82.204.86) (Ping timeout: 252 seconds)
16:18:45 benin0369323019 is now known as benin036932301
16:18:48 <c_wraith> fibonacci, on the other hand, is a perfect example of multiply-recursive and overlapping.
16:19:03 <c_wraith> It's so perfect, though, that you only ever need two elements in the table. :)
16:19:03 <Guest47> yes it does 2^(n/2) additions
16:19:06 <mjrosenb> as it turns out, most problems don't share many properties with naieve implementations of fibonacci.
16:19:10 <Guest47> instead of n
16:19:30 <c_wraith> Fibonacci(n) does Fibonacci(n)-1 additions.
16:19:30 <mjrosenb> it does fib(n) additions
16:19:43 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
16:20:02 <Franciman> 2*fib(n) - 1 recursions
16:20:17 earthflax joins (~earthflax@171.49.232.104)
16:20:53 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 265 seconds)
16:21:19 <c_wraith> common memoization problems are things like "longest common subsequence"
16:21:44 <mjrosenb> c_wraith: if you're hand-unrolling it, you'll probably want more elements in the table :-)
16:21:55 × hgolden quits (~hgolden2@172.114.81.123) (Remote host closed the connection)
16:22:43 × earthflax quits (~earthflax@171.49.232.104) (Client Quit)
16:22:59 <c_wraith> nah, 2 does the job when you work bottom-up. Of course that's not really efficient either, but the really efficient solutions involve *math*
16:23:42 hgolden joins (~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
16:24:27 <Guest47> the formula with the golden ratio?
16:24:39 <mjrosenb> right. At least when I tried to do that, I needed memoization on random subsets of the fibonacci sequence
16:24:41 <davean> Generally if memoization is actually good, its part of the specification of the alg.
16:25:03 <c_wraith> Sort of. If you use the golden ratio formula naively, you exceed the precision of floating-point pretty fast.
16:25:06 <Guest47> specification of the alg?
16:25:13 <mjrosenb> Guest47: that's fine if you have a fast infinite precision library.
16:25:33 <c_wraith> You need to do a change of base so you can use that formula with integers only
16:25:37 <geekosaur> algorithm
16:25:41 <c_wraith> and that's real math
16:26:11 earthflax joins (~earthflax@171.49.232.104)
16:26:12 <Guest47> geekosaur: yes but spec of what algorithm?
16:26:14 <davean> Bah, if theres a concievable way to apply it to an actual problem, its applied math, not real math :(
16:26:24 <davean> Guest47: what ever one you're implimenting
16:26:25 <geekosaur> whichever one you're using memoization with
16:27:11 <mjrosenb> fib n = fib (n-1) + fib (n-2) => fib n = 2*fib(n-2) + fib(n-3) => fib n = 3*fib(n-3)+2*fib(n-4) =>...=> fib n = fib m * fib (n-m) + fib (m-1) * fib (n-m-1)
16:27:14 <Guest47> oh sorry I misread the original comment
16:27:15 <mjrosenb> or some such
16:27:19 Robin_Jadoul joins (~Robin_Jad@152.67.64.160)
16:27:34 <geekosaur> (this is not circular, the point is that memoization is best used in specific circumstances and those circumstances will usually specify memoization directly)
16:28:10 <davean> And the speciication of the memoization is critical - theres generally only 1 good way to memoize something
16:30:17 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 252 seconds)
16:31:32 hyiltiz joins (~quassel@31.220.5.250)
16:33:23 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2) (Remote host closed the connection)
16:34:05 ubert joins (~Thunderbi@178.115.72.201.wireless.dyn.drei.com)
16:34:12 Brumaire joins (~quassel@81-64-14-121.rev.numericable.fr)
16:35:41 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2)
16:37:52 geranim0 joins (~sam@modemcable242.171-178-173.mc.videotron.ca)
16:39:26 benin0369323011 joins (~benin@183.82.176.107)
16:41:40 × benin036932301 quits (~benin@106.198.91.149) (Ping timeout: 265 seconds)
16:41:40 benin0369323011 is now known as benin036932301
16:41:50 <monochrom> Ugh I missed all the fun discussions!
16:42:04 roboguy joins (~roboguy@user/roboguy)
16:42:21 <Guest47> I struggle to understand what people mean when they say "Applicatives allow function application within a computational context"
16:42:28 <Guest47> what is a computational context?
16:43:12 <monochrom> Well yeah generally those "intuitive" wordings are people "explaining" to themselves after they have understood.
16:43:27 <Guest47> I understand that my function, its input and output are all wrapped in a type called f but what does that mean?
16:43:28 <monochrom> I.e., not before, not useful for those who haven't understood.
16:43:41 <zwro[m]> we can, however, abstract memorization patterns
16:43:56 <shapr> memoize memoization patterns?
16:43:58 <monochrom> Generally most blogs are like that. Making the authors feel so good about themselves.
16:44:00 <zwro[m]> s/memorization/memoization/
16:44:15 <maerwald> anyone has a template for creating blog with hakyll or whatever on github pages?
16:44:36 zebrag joins (~chris@user/zebrag)
16:44:49 <monochrom> Even the much revered dons wrote a sh*tty analogy on his blog.
16:45:19 segfaultfizzbuzz joins (~segfaultf@135-180-0-138.static.sonic.net)
16:45:24 <Guest47> I wrote some garbage on my blog too :^)
16:45:31 <Guest47> https://www.fuzzypixelz.com/2021/05/01/The-M-Word
16:45:35 <Guest47> (shameless plug)
16:45:50 <monochrom> The first monad analogy, and still the worst ever, second to none.
16:45:56 <shapr> maerwald: I copied mine from someone else, but I forget where: https://github.com/shapr/shapr.github.io/tree/develop
16:46:26 <Guest47> I recall people here telling me that starting with the monad laws was a bad idea
16:47:06 <monochrom> You should also recall people telling you that starting with blogger wordings is also a bad idea, and worse than the laws.
16:47:26 <shapr> I say do what you think is a good idea, and pay attention to any feedback you get
16:47:30 <monochrom> I say that starting with instances is the best.
16:47:40 <shapr> everything is imperfect, try to improve over time
16:48:05 <maerwald> shapr: you push to master manually?
16:48:46 <monochrom> And perhaps also with use cases, if you are one of those "practically minded" people who use "I don't understand" to mean "actually I understand, I am just not convinced it's useful".
16:49:31 <c_wraith> I started by spending a while understanding how to use IO. after I got that, I decided to learn how to use parsec. it was at that point I had my first understanding of what "monad" meant. it meant "things that work like those". it took quite a while longer to understand how to associate the definition and laws with "work like those"
16:49:37 <monochrom> Right? People use "I don't understand" to mean all sorts of things that have nothing to do with understanding.
16:49:48 <Guest47> well if you're not convinced it's useful, when it's clearly is, then you don't understand anything
16:49:50 <monochrom> Feynman pointed out another one. "I don't like it".
16:50:29 × geranim0 quits (~sam@modemcable242.171-178-173.mc.videotron.ca) (Ping timeout: 264 seconds)
16:50:32 × ysavd^ quits (~ysavd@68.101.50.106) (Ping timeout: 246 seconds)
16:50:32 <monochrom> You don't draw a line between "what it is" and "why I care"? You lump them together?
16:51:05 <Guest47> I am surely guilty of that
16:51:06 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
16:51:25 alzgh joins (~alzgh@user/alzgh)
16:51:29 <Guest47> And I've never thought of that before
16:51:35 ysavd^ joins (~ysavd@68.101.50.106)
16:51:41 <monochrom> Yeah c_wraith most people (me included) report that the parser monad is when it clicks. My students too.
16:51:44 <alzgh> yo, #haskell
16:51:52 <alzgh> hope, y'all doing great today
16:52:21 <monochrom> And once again perhaps it just means "finally an interesting example / use case".
16:52:44 <Guest47> monochrom: you mean MonadParsec right?
16:53:07 <monochrom> No, simply any of the old "monadic parser combinators" paper.
16:53:12 <monochrom> papers
16:53:30 <monochrom> "MonadParsec" did not exist.
16:53:32 <Guest47> could please elaborate
16:55:13 <c_wraith> I was working from a pdf that was... the parsec manual, maybe?
16:55:17 <monochrom> The papers have already elaborated.
16:55:34 <c_wraith> I just stepped through examples and modified them to see what would happen.
16:55:38 <Guest47> the way I see it that each parser you write is a Monad and you use bind to sequence them into more complex parsers
16:56:09 <c_wraith> and eventually I got to an example where I went "what if I wanted to look for this in parentheses, but not return them?"
16:56:33 <c_wraith> and I just tried using <- to bind the value I cared about.... and it worked.
16:56:44 <monochrom> :)
16:57:00 × vpan quits (~vilius@212.117.1.172) (Quit: Leaving.)
16:57:17 <monochrom> Yeah my students have those moments too. Sometimes I hinted them, sometimes they thought it up themselves.
16:57:23 <c_wraith> I didn't understand why, exactly. but I knew that was the moment when I had caught on to the edge of something
16:58:54 × Guest47 quits (~Guest47@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
16:59:50 Guest47 joins (~Guest47@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
17:00:12 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
17:02:56 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
17:03:57 emf_ joins (~emf@2620:10d:c090:400::5:49ef)
17:05:44 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:05:56 × xff0x quits (~xff0x@2001:1a81:534d:3900:7ca7:1f1d:7921:2152) (Ping timeout: 245 seconds)
17:09:34 koolazer joins (~koo@user/koolazer)
17:09:42 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
17:10:02 alzgh joins (~alzgh@user/alzgh)
17:16:32 xff0x joins (~xff0x@2001:1a81:534d:3900:7ca7:1f1d:7921:2152)
17:17:17 <earthflax> alzgh: you too :)
17:18:01 earthflax parts (~earthflax@171.49.232.104) (Good Bye)
17:18:20 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
17:21:48 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
17:23:51 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 245 seconds)
17:24:48 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
17:25:14 × vysn quits (~vysn@user/vysn) (Ping timeout: 250 seconds)
17:30:39 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:33:45 × Cajun quits (~Cajun@user/cajun) (Quit: Client closed)
17:34:18 × _xor quits (~xor@74.215.232.67) (Read error: Connection reset by peer)
17:34:38 × martin02 quits (~silas@141.84.69.76) (Ping timeout: 252 seconds)
17:34:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:35:14 asgas joins (~asgas@c-24-30-27-91.hsd1.ga.comcast.net)
17:35:33 <asgas> I've heard functional languages like haskell are slow compared to C or C++. Is this true?
17:37:09 <c_wraith> no.
17:37:30 <sclv> haskell is a garbage collected language. you should expect the cost of gc and automatic memory management to bring about a roughly 1.5x or so slowdown in idiomatic highly optimized code compared to one with manual memory, but nonetheless haskell is extremely efficient and competitive or better, compared to any comparable high level languages.
17:37:53 <monochrom> I've heard OOP languages like C++ are slow compared to Fortran. It is true.
17:38:04 × MQ-17J quits (~MQ-17J@8.6.144.233) (Ping timeout: 265 seconds)
17:38:14 <c_wraith> everything is slow compared to fortran
17:38:19 <monochrom> And pointer languages like C slow compared to Fortran, too.
17:38:30 <c_wraith> we'd better go back and rewrite operating systems in fortran
17:38:35 <monochrom> or rather, pointer arithmetic languages
17:38:40 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2) (Remote host closed the connection)
17:39:05 <robbert-vdh> Just implement your program in cmm with only unboxed types :)
17:39:06 _xor joins (~xor@74.215.232.67)
17:39:09 <monochrom> Oh, that one would be unfair, an OS is not meant to be superfast, but it is meant to do pointer arithmetic.
17:39:19 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2)
17:39:29 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
17:39:29 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
17:39:29 wroathe joins (~wroathe@user/wroathe)
17:39:38 <Guest47> what does Fortran replace pointer arithmetic with?
17:39:46 <c_wraith> arrays
17:39:46 <monochrom> C compilers already do the best they can under random pointer arithmetic semantics.
17:40:28 <free_functor> Guest47, for reference, Fortran is the game engine that Fortnight is written in. V. fast langauge. V. Powerful.
17:41:07 <sclv> an important tradeoff to note is that languages like haskell make parallel and concurrent computation easy, while low level languages generally make it a pain. in settings (most) where you want to achieve more performance scaling through parallel computation, high level languages with easy parallelism will be wins over low level languages
17:41:14 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
17:41:20 <sclv> free_functor: lmao
17:41:24 <Guest47> free_functor: that's a joke ... right?
17:41:53 <monochrom> I respect "C is fast under the constraint that I want C features" and "C++ is fast under the constraint that I want C++ features".
17:42:05 <monochrom> But "C/C++ is fast, unconditionally" is a joke.
17:42:18 <monochrom> But then, what's the fun in being honest?
17:42:29 <robbert-vdh> sclv: Rust would like a word with you :) (and presumably Erlang, but I've never used that)
17:42:41 <robbert-vdh> *Erlang isn't low level of course, ignore that part
17:42:57 <sclv> erlang is also very slow, relatively speaking, becaue it is interpreted
17:43:03 <monochrom> "C is fast under the constraint that I want C features" now can't be used as a critique on Haskell, because GHC-generated code is fast under the contraint that I want Haskell features, too.
17:43:10 <awpr> "high level language with easy parallelism" sounds like a good description of Rust to me
17:43:39 <Franciman> haskell making concurrency easier is mostly dependent on the situation
17:43:42 <sclv> rust is a low level language, its just very good at being one!!!
17:43:56 <Franciman> because you may need mutation nevertheless
17:44:01 <Franciman> and then nobody saves you from hell
17:44:08 <Franciman> not even STM in some cases
17:44:15 <Franciman> where you need less optimistic behaviours
17:44:32 <sclv> this is not true. you at least don't have to deal with a batshit memory model where you manually consider "volatile" declarations and write barriers
17:44:47 × kuribas quits (~user@ptr-25vy0i9jx2ordo6ztok.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
17:44:49 <Franciman> again, this depends
17:45:13 <Franciman> MVar can get really nasty, in my experience
17:45:30 <Franciman> and STM rerunning the same computation over and over until there is no conflict is not what you need
17:45:32 <monochrom> Someone on haskell-cafe recently wrote a great sentence. "You are trading off performance for the ability to preempt."
17:46:03 <sclv> if you're being this blase over the memory model in C, that can only be because you're not familiar with how utterly hopeless it is
17:46:15 <Franciman> wut
17:46:21 <Franciman> do you mean me, sclv ?
17:46:32 <monochrom> Yeah, about that.
17:46:46 <Franciman> you said: Haskell makes parallel and concurrent computations easy
17:46:52 <Franciman> easy is a great understatement
17:46:57 <Franciman> in many situations
17:46:58 <monochrom> https://queue.acm.org/detail.cfm?id=3212479
17:47:02 <dsal> sclv: erlang is slow at computation, but pretty hard to beat in terms of general application latency.
17:47:04 Guest|33 joins (~Guest|33@65.88.88.200)
17:47:38 martin02 joins (~silas@141.84.69.76)
17:47:38 <sclv> https://bajamircea.github.io/coding/cpp/2019/11/05/cpp11-volatile.html
17:48:10 <free_functor> Guest47, I would never joke about important Game/Game-Engine pairings such as Fortnight/Fortran, Team Fortress/Tensor Flow, Minecraft/Malbolge, Halflife/Haskell98, and so on. Telling jokes about modern Games and the Game Engines that run them... is liable to start flame wars.
17:48:23 YoungChiefBTW joins (~youngchie@user/youngchiefbtw)
17:48:59 × Guest|33 quits (~Guest|33@65.88.88.200) (Client Quit)
17:49:24 <monochrom> Do people still remember browser games and Flash games?
17:49:36 <sclv> "easy" as in you don't encounter situations where you said "look i literally said to do this thing in this order, and now its doing something else entirely!??" https://stackoverflow.com/questions/2484980/why-is-volatile-not-considered-useful-in-multithreaded-c-or-c-programming
17:50:03 <monochrom> So apparently nothing went wrong when game engines were writte in javascript or flash. And on 20-year-old hardware, no less.
17:50:23 × chele quits (~chele@user/chele) (Remote host closed the connection)
17:51:30 <free_functor> what is a good example of clean, speed critical haskell code that does heavy numerical lifting of some sort?
17:51:54 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
17:51:57 <Guest47> I personally think CS/C# is the killer combo
17:52:16 <asgas> Something like a javascript engine would probably be in C or C++. Could haskell do something like what v8 can do from chrome?
17:52:57 <free_functor> hmm, it's not at all fair to ask that the speed critical code should also be clean. I apologize
17:54:00 <Franciman> with linear types
17:54:05 <Franciman> I think you can go a greater way
17:54:10 <sclv> there's a lot of classic highly-optimized (perhaps over-optimized) code in the benchmarks game: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/haskell.html
17:54:23 <Franciman> the main problem of low latency things is the garbage collector, I don't see other problems
17:54:30 <asgas> I hope there's no misunderstanding. I'm not trying to start a flame war, I just want to know how haskell compares to more mainstream languages like C++ and why haskell isn't used as much.
17:54:34 <Franciman> I don't know enough about how to control the GC
17:54:50 <sclv> asgas: anyway the answer isn't performance. that's an old myth
17:54:59 <sclv> i write high performance haskell for a day job and its fine
17:55:00 <free_functor> Guest47, how many hundreds of lines of C# code do you currently maintain, and what is the total yearly commercial revenue of that code?
17:55:38 <Franciman> if you know well the execution model of haskell
17:55:42 <Franciman> and know how to wrestle with the GC
17:55:48 <Franciman> you can make it go SUUUUUUUUPER fast
17:55:56 × emf_ quits (~emf@2620:10d:c090:400::5:49ef) (Ping timeout: 245 seconds)
17:56:04 <sclv> haskell is a fine language that can be used well for almost anything. its just different than other languages and has historically not had a Big Industry Player backing it, and also, the related ecosystem of tooling (ides, special purpose libraries, etc) is correspondingly less mature.
17:56:10 <Franciman> another cool thing is that GHC is SUUUUUUPER good at optimizing declarative code
17:56:20 <asgas> So even with garbage collection, you could write a fast javascript engine in pure haskell sclv?
17:56:28 <sclv> sure
17:56:30 <shiraeeshi[m]> Franciman: "and STM rerunning the same computation over and over until there is no conflict is not what you need"
17:56:30 <Franciman> so most of the time if you try to do lower level things, it gets slower. So you do your own high level thing
17:56:42 spruit11 joins (~quassel@2a02:a467:ccd6:1:ed67:f262:991e:7f5)
17:56:48 <Franciman> and GHC makes a lot of effort to make it fast, doing a great job, from my tests
17:56:50 <shiraeeshi[m]> I heard that STM does something more smart than literally rerunning
17:56:52 <monochrom> mainstream? In mainstream there are as many people preferring Java or Python or PHP as there are people preferring C++. So first off proving that performance is not going to be a high priority.
17:57:24 × danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (Quit: WeeChat 3.2)
17:57:24 <Franciman> asgas: imho the only problem of GC is when you want to do performance critical things, like real time systems like video games with ULTRA MEGA DETAILS
17:57:34 <Franciman> if you don't need to be within 10ms
17:57:38 <shiraeeshi[m]> STM tracks which TVars you read, then waits for them to change and then triggers your transaction
17:57:39 <Franciman> haskell is fine
17:57:45 <sclv> but note that most fast javascript engines are not interpreters -- they're actually hybrid JIT gadgets that compile on the fly to machine code. the hard part is not the performance of the surrounding language -- its that writing this engine, in any language at all, is a tremendous engineering task.
17:57:59 <monochrom> The priorities are, instead, personality, style, ecosystem, networking effect, and dumb luck in which one was your 1st language.
17:58:11 <monochrom> And you can see how Haskell can lose on all those fronts.
17:58:13 <Franciman> haskell's ecosystem is one of the poorest imho
17:58:14 <sclv> so i should qualify and say "very few people, and probably not me, are well equipped to write a fast JITter for js in _any_ language"
17:58:19 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.2.1)
17:58:21 <Franciman> but it has great other things :)
17:58:51 <monochrom> Personally I am not excited about "what if Haskell were more popular". There is no need to fight into the mainstream.
17:59:12 × asgas quits (~asgas@c-24-30-27-91.hsd1.ga.comcast.net) (Quit: Leaving)
17:59:20 CiaoSen joins (~Jura@p2e5c6ba6.dip0.t-ipconnect.de)
17:59:21 × fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds)
17:59:27 <monochrom> And here is my answer to what if Haskell were more popular: It would then drop Haskell values and adopt mainstream values, it would no longer be Haskell.
17:59:36 <tdammers> exactly
17:59:53 × zebrag quits (~chris@user/zebrag) (Remote host closed the connection)
17:59:55 <Franciman> it is already happening monochrom
18:00:14 <monochrom> Do not be naïve. "haskell become mainstream" does not imply "mainstream cherishes Haskell values". Far from it.
18:00:17 <maerwald> monochrom: I'm basically saying this all the time whenever HF is pushing for "lets increase adoption in industry" but I have the feeling I'm misunderstood most of the time
18:00:24 <Franciman> the time when haskell dropped away the old IO system to use monads
18:00:26 <Franciman> are gone
18:00:29 <Franciman> now we make thousands of extensions
18:00:35 <Franciman> because we also want to be backwords compatible
18:00:39 <Franciman> for the corps using haskell
18:01:10 <Franciman> now we have legacy and we value it
18:01:19 <Franciman> I don't see haskell totally breaking any time soon
18:01:36 <Franciman> for example dependent types
18:01:43 <Franciman> they work hard to make them retrofit in haskell
18:01:45 <Franciman> it seems to me
18:03:19 free_functor is thinking of porting a profunctorial lenses library to python
18:04:02 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 246 seconds)
18:04:25 MoC joins (~moc@user/moc)
18:04:59 <geekosaur> they're just barely started on dependent types. the later stages are likely to be more invasive
18:05:42 <free_functor> python has become my go-to language for quick and dirty notebook based computations, and even more complex domain driven designs - mainly because I can just throw open a colab notebook, pull in some numeric or AI libraries, and very quickly do heavy lifting and visualization
18:06:07 <monochrom> Perhaps ironically, invasive is good. I complain that the current DataKind and singleton stuff is emulating, encoding, which means clumsy.
18:06:36 <free_functor> you can get haskell in colab, but I think it's currently pretty slow and painful
18:08:31 <shiraeeshi[m]> haskell should have dialects: industrial haskell, experimental haskell, haskell with memory management fixed, etc.
18:08:34 × martin02 quits (~silas@141.84.69.76) (Ping timeout: 250 seconds)
18:09:07 <shiraeeshi[m]> haskell with exceptions fixed
18:09:09 martin02 joins (~silas@141.84.69.76)
18:09:13 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2) (Remote host closed the connection)
18:09:19 <tdammers> it already does
18:09:27 <tdammers> in much the same way as C++ does
18:09:41 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
18:09:56 <shiraeeshi[m]> haskell that doesn't care about backwards compatibility and legasy
18:10:32 <shiraeeshi[m]> haskell that cares about backwards compatibility and legacy
18:10:35 <free_functor> shiraeeshi[m], that's kind of how I think of haskell within a project I'm reading lately. The author enables a couple dozen extensions, and some parts are like the hyper-modern space haskell that I don't fully understand
18:12:20 myShoggoth joins (~myShoggot@97-120-70-214.ptld.qwest.net)
18:13:01 × max22- quits (~maxime@2a01cb088335980013e52131b43b1c30.ipv6.abo.wanadoo.fr) (Ping timeout: 265 seconds)
18:14:24 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2)
18:15:13 <free_functor> shiraeeshi[m], it would be nice to see a commercial distibution of haskell - I'm not sure if you can buy support licenses for haskell application servers
18:15:37 <free_functor> Does any company currently have the audacity to charge hefty bux for special, mission critical haskell runtimes and libraries?
18:17:01 free_functor feels there must be some fintech offerings here... and I think there are other commercial haskel based DSLs like cryptol
18:17:11 benin0369323017 joins (benin@gateway/vpn/protonvpn/benin)
18:17:44 <monochrom> I think yes. FP Complete. Galois.
18:18:19 <monochrom> Well, not literally runtimes and libraries.
18:18:35 <monochrom> They write Haskell programs for you.
18:18:50 × benin036932301 quits (~benin@183.82.176.107) (Ping timeout: 268 seconds)
18:18:51 benin0369323017 is now known as benin036932301
18:18:55 × yauhsien quits (~yauhsien@118-167-48-21.dynamic-ip.hinet.net) (Remote host closed the connection)
18:19:30 <monochrom> Galois probably fulfills "mission critical" too because they care about verification, IIUC.
18:19:42 <geekosaur> well-typed?
18:20:01 <monochrom> Yeah, I forgot that one.
18:21:12 <monochrom> The Haskell Duality Theorem: The two questions "where can I find Haskell jobs?" and "where can I buy Haskell code from?" are reducible to each other. >:)
18:21:24 × darkstardevx quits (~darkstard@2601:1c2:300:c8a0::f2b6) (Read error: Connection reset by peer)
18:21:51 <exarkun> The mainstream is very mediocre. What would Haskell going mainstream mean, apart from being able to do very mediocre things with it?
18:22:07 <monochrom> consumerism and producerism form an adjunction >:)
18:22:22 benin0369323011 joins (~benin@183.82.176.107)
18:22:34 <awpr> does that mean Western society forms a monad?
18:23:13 <monochrom> I think no.
18:23:30 <monochrom> My understanding is that Western society is consumerism, Eastern society is producerism.
18:24:00 <exarkun> I suspect that is ... reductive
18:24:18 <monochrom> Oh, very oversimplification, yes.
18:24:41 × benin036932301 quits (benin@gateway/vpn/protonvpn/benin) (Ping timeout: 264 seconds)
18:24:41 benin0369323011 is now known as benin036932301
18:24:46 <monochrom> But how is "Western society is consumerism and producerism" any less simplifying?
18:25:13 <monochrom> And what's with singling out Western society?
18:25:22 <exarkun> poor Western society, always picked on
18:25:43 <monochrom> Is there any society that's any different? Honestly? Not believing certain exotic government propanganda?
18:26:16 <exarkun> Only photosynthesizing communities truly embrace producerism
18:26:26 <monochrom> heh
18:28:07 <shiraeeshi[m]> well, they consume sunlight
18:29:19 <Rembane> Star communities.
18:29:44 <free_functor> monochrom, western per-capita carbon production is 20x higher than human per-capita carbon production, whereas a collapse of western society would reduce that number to merely 10x, if the collapse of the soviet union is a good model of carbon reduction effect of central collapse.
18:30:44 <free_functor> therefore it's ethical and good to dog on western civilization if you are indeed part of western civilization - this is the internal sabotage theorem
18:32:03 <exarkun> Should have known there would be sleepers from the stellar faction lurking
18:32:50 × CiaoSen quits (~Jura@p2e5c6ba6.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
18:34:09 <Lycurgus> western society is still not not christendom, or vestigial islam if you like
18:35:28 <Lycurgus> things like consumerism, capitalism are way bigger than the west which is only even a thing because it was able to oversettle the americas
18:35:51 <Lycurgus> and with that dominate the planet for a while
18:36:32 <geekosaur> hasn't this discussion kinda slid off into offtopic-land?
18:37:00 <Lycurgus> yeah i thought I'd push it to a termination
18:37:43 lavaman joins (~lavaman@98.38.249.169)
18:38:04 darkstardevx joins (~darkstard@2601:1c2:300:c8a0::f2b6)
18:38:20 <Lycurgus> but for profit hs shops is sure on topic
18:40:35 <Lycurgus> sfaict, their internal relations notwithstanding, being forced into FOSS culture, they are generally a good thing merging
18:40:52 <Lycurgus> commercial standards with the standards of hs
18:42:06 <Lycurgus> the conjecture might be that they have some wonderful thing that they're not sharing
18:42:11 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
18:42:19 <Lycurgus> but that's unlikely to be true
18:42:47 <free_functor> I am still not convinced that I can pay for someone to take my haskell platform woes off my hands so I can focus on writing teeny tiny haskell microservices that seamless run on both in house and cloud resources. Like, I think you could extend Serverless to support haskel, but really I want to pay for someone to have already done this thing
18:43:21 <ldlework> lol
18:43:24 <free_functor> and to deliver it to me for 30 bux a month or so
18:43:44 <ldlework> free_functor: if only there were enough of you
18:43:49 <geekosaur> I'd imagine it would cost more than that even if it was provided
18:44:17 <geekosaur> although I should note that people have written starts to such things… and then gotten hired away from working on them
18:44:32 <geekosaur> unless they've been developing them in-house
18:44:41 <geekosaur> (cloud haskell, anyone?)
18:44:47 <Lycurgus> 30 usd is about a minimum for hosting service alone
18:45:07 <free_functor> geekosaur, I think bigger languages enjoy an economy of scale... once you solve certain scaling and API and interface design problems, I think it get very very cheap to offer that infrustructure to many tenants
18:45:14 <Lycurgus> with a few physical threads and TB of transfer
18:45:59 <Lycurgus> double that for a hs service that was customer specific would be reasonable
18:46:05 <Lycurgus> *wasn't
18:47:00 chris joins (~chris@81.96.113.213)
18:47:04 chris is now known as Guest2198
18:47:21 <Lycurgus> but haskell doesn't have mass appeal so it hits that when capital is being allocated
18:47:26 <free_functor> Lycurgus, I think it is not pretty reasonable to run a few lambda microservice for less than 5 bux a month, if the workloads are not heavy
18:47:30 <free_functor> err
18:47:43 <free_functor> s/not//
18:48:14 <Lycurgus> sure just a service
18:48:38 <Lycurgus> I was thinking more something that would bundle computing resources with it
18:49:01 <Lycurgus> but just use of an api, that's a order lower in price domains
18:51:03 <free_functor> I'm really interested in the whole idea of maintaining these tiny snippets of code. and the whole compilation, testing, and deployment basically happens automatically after a commit passes review
18:52:05 <free_functor> I believe it is pretty easy to build this in go, javascript, python, or java, and I think that's because the platforms have nice tooling for those languages specifically
18:52:34 <free_functor> but I haven't looked into what kind of extra trouble you might need to get amazon lambda running your haskell microservices, for example
18:53:09 <free_functor> so i would defer to someone with more combined cloud and haskell experience
18:54:04 <Lycurgus> and ofc the nature of the service provided by the API determines price
18:54:27 <Lycurgus> the crossing from the one domain to the other is when privisioning is undertaken
18:54:33 emf joins (~emf@163.114.132.6)
18:55:00 <Lycurgus> and how that is handled between the customer and the actual provider of the provisioned inventory
18:55:18 <Lycurgus> for whom for me the defaults are AWS and linode
18:56:05 max22- joins (~maxime@2a01cb0883359800a9478b4b8829df15.ipv6.abo.wanadoo.fr)
18:56:14 <shiraeeshi[m]> free_functor: I'm not sure I understand what are you willing to pay for. You can pay for a dedicated server and install anything you want. Unless you're talking about PAAS and IAAS companies creating haskell APIs.
18:56:14 <Lycurgus> i in general avoid branded solutions when generic ones are clear to me (i.e. aws lambda)
18:56:36 farmfrmjakestate joins (~farmfromj@user/farmfrmjakestate)
18:57:10 <free_functor> I will grant that the multi-cloud / hybrid cloud + baremetal story is currently a nightmare for both kubernetes and any "functions as a service" platform I've seen
18:58:39 <free_functor> nobody /really/ wants to write software that can provision and seamlessly integrate, for example, an AWS machine, a digital ocean node, and 4 local raspberry pi servers
18:59:00 × Guest2198 quits (~chris@81.96.113.213) (Remote host closed the connection)
18:59:07 × rtjure quits (~rtjure@bras-79-132-17-74.comnet.bg) (Ping timeout: 240 seconds)
19:01:49 <free_functor> Lycurgus, I hear there has enough standardization around lambda that now we have competing DIY faas systems like Knative and Serverless. And if I'm not mistaken, loading haskell into one of these custom FAAS engines would be a "easy" as writing a knative plugin for haskell, or what have you
19:01:50 <shiraeeshi[m]> free_functor: "nobody /really/ wants to write software that can provision and seamlessly integrate, for example, an AWS machine, a digital ocean node, and 4 local raspberry pi servers"
19:02:15 <shiraeeshi[m]> what are talking about? you make them talk through REST services, no?
19:02:26 <ldlework> free_functor: that's what i did at docker, before swarm or k8s were things
19:02:30 <free_functor> but at the end of the day who are your customers, I guess - we get back to ldlework's idea that there are not enough customers who would want this
19:02:35 <shiraeeshi[m]> you provision them using APIs
19:02:38 <ldlework> i was pretty hyped at the time
19:03:59 Guest1162 joins (~chris@81.96.113.213)
19:04:03 <Lycurgus> free_functor, aknowledged
19:04:47 <Lycurgus> *acknowledged
19:06:41 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 264 seconds)
19:08:26 × Guest1162 quits (~chris@81.96.113.213) (Ping timeout: 246 seconds)
19:11:24 <free_functor> shiraeeshi[m], you have two bare metal nodes on premises, which can handle all your requests. If these nodes go down, don't worry, because lambda will run the same workloads with hot fail-over for your users. How do you set up the hot fail over? How do you ensure that the same code that runs on the machines also runs on lambda? Would you say your current solution let you do this with little to no pain? If so, I'm curious how
19:11:26 × emf quits (~emf@163.114.132.6) (Ping timeout: 252 seconds)
19:11:29 hyiltiz joins (~quassel@31.220.5.250)
19:12:24 mei joins (~mei@user/mei)
19:13:37 <free_functor> the closes multi-cloud + baremetal orchestration system that I know about is Redhat's OpenStack / OK4. But open stack is by no means a lightweight system that you deploy on some random hetergenous servers and raspberry pis
19:13:51 emf joins (~emf@2620:10d:c090:400::5:9ff)
19:17:17 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
19:17:25 × chomwitt quits (~chomwitt@2a02:587:dc0a:5800:12c3:7bff:fe6d:d374) (Ping timeout: 252 seconds)
19:17:29 × Guest47 quits (~Guest47@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
19:18:31 <free_functor> shiraeeshi[m], for example of multicloud code "nobody" wants to write, imagine a system that can refactor your deployment so that is uses more azure servers one month, more AWS servers another month, always choosing the deployment will perform the work cheapest
19:19:34 <free_functor> amazon certainly does not want to write that federation code, and neither does microsoft - so right there the two most competent candidates refuse to touch the project
19:20:45 <free_functor> who is left? well, people who are willing to write federation code for customers who are /so cheap/ they want to nickle and dime the spot rate across multiple clouds
19:23:10 × zer0bitz quits (~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi) (Ping timeout: 260 seconds)
19:25:07 × roboguy quits (~roboguy@user/roboguy) ()
19:28:46 × emf quits (~emf@2620:10d:c090:400::5:9ff) (Ping timeout: 260 seconds)
19:34:58 × qbt quits (~edun@user/edun) (Remote host closed the connection)
19:35:57 × MoC quits (~moc@user/moc) (Quit: Konversation terminated!)
19:42:06 emf joins (~emf@163.114.132.6)
19:45:57 × farmfrmjakestate quits (~farmfromj@user/farmfrmjakestate) (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:51:29 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds)
20:02:43 acidjnk_new joins (~acidjnk@p200300d0c703cb495908c3ed7e15521a.dip0.t-ipconnect.de)
20:03:33 <ldlework> free_functor: what we did at docker was write a DSL that was backed by a "driver" system
20:03:41 <ldlework> basically just implementing an interface essentially
20:04:08 <ldlework> the most difficult part was not in implementing the interface but coming up with a useful common demoninator for our purposes at the time
20:05:00 × nfd quits (~nfd@user/nfd) (Ping timeout: 265 seconds)
20:05:06 × juhp quits (~juhp@128.106.188.220) (Ping timeout: 245 seconds)
20:05:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
20:06:21 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
20:06:45 juhp joins (~juhp@128.106.188.220)
20:12:20 acidjnk_new3 joins (~acidjnk@p200300d0c703cb49b458fc4f9b844b2d.dip0.t-ipconnect.de)
20:15:38 × acidjnk_new quits (~acidjnk@p200300d0c703cb495908c3ed7e15521a.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
20:17:13 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
20:17:32 geekosaur joins (~geekosaur@xmonad/geekosaur)
20:20:43 × fvr quits (uid503686@id-503686.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
20:25:31 × oxide quits (~lambda@user/oxide) (Quit: oxide)
20:29:23 <free_functor> ldlework, what kinds of operations did implement, and what do you mean by common denominator? Were you repackaging external cloud vendors in order to provide docker's own multitenant services?
20:33:41 <ldlework> free_functor: we had a complex container based system that we needed to deploy and there were no orchestrators around yet. company wanted to ensure that we could deploy/migrate to azure at anytime. so we made a DSL that let us describe compute, storage, routing information, and that was backed by a cloud specific driver that you could swap out.
20:39:48 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
20:40:42 charukiewicz joins (~quassel@108.210.196.136)
20:41:30 <free_functor> I think these days there are solutions like terraform and pulumi, but I sm not sure if they let you specify abstract services and dynamically set up multi-cloud deployment and routing.
20:42:31 × ubert quits (~Thunderbi@178.115.72.201.wireless.dyn.drei.com) (Ping timeout: 268 seconds)
20:42:38 × terrorjack quits (~terrorjac@2a05:d012:f4:f400:3981:7d7e:56ee:2dd9) (Quit: The Lounge - https://thelounge.chat)
20:42:59 <free_functor> My use case is that I have a raspberry pi, a couple android devices, a linux work station / server, and a $5 digital ocean node
20:44:40 <free_functor> and I want to be able to build a failsafe kubernetes cluster across these resources in 20 lines meta-orchestrator code... and I think I can't do that yet because reasons
20:44:49 <lbseale> Does anyone have a recommendation for an automatic style-checking tool? Must be able to warn for line lengths
20:44:51 ec joins (~ec@gateway/tor-sasl/ec)
20:45:24 <free_functor> lbseale, in python I use a pep-8 checker, and it's really persnickkety
20:45:54 <free_functor> like it wants me to put two lines before and after each class declaration
20:46:11 <lbseale> ok I'm looking for #haskell
20:46:21 <free_functor> so what?
20:46:26 × Morrow quits (~Morrow@147.161.14.157) (Ping timeout: 246 seconds)
20:46:39 <ldlework> free_functor: yeah, none of those things existed at the time
20:47:21 <lbseale> free_functor: isn't pep-8 a python standard? I am looking for a specific tool to check haskell code
20:47:25 × charukiewicz quits (~quassel@108.210.196.136) (Quit: Quitting...)
20:48:01 <free_functor> lbseale, yeah hol tf on while I google stylish-haskell for u, my impatient frend
20:48:16 <free_functor> https://hackage.haskell.org/package/stylish-haskell
20:49:12 <free_functor> this /could/ do what you need, but I have no idea - read and find out and tell me, because now I am curious1
20:51:01 ubert joins (~Thunderbi@178.115.72.201.wireless.dyn.drei.com)
20:53:36 charukiewicz joins (~quassel@108.210.196.136)
20:53:39 zebrag joins (~chris@user/zebrag)
20:54:49 <free_functor> lbseale, nope, haskell-stylish does not warn on line numbers. The closest feature is the step that drops trailing white spaces: https://github.com/haskell/stylish-haskell/blob/main/lib/Language/Haskell/Stylish/Step/TrailingWhitespace.hs
20:55:17 bgamari_ is now known as bgamari
20:55:23 <lbseale> free_functor: yeah I couldn't find it anywhere. But this is definitely the kind of thing I had in mind
20:55:54 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 265 seconds)
20:56:22 <lbseale> I haven't found anything with hlint for line length either, is it a bad idea to try to check for this? Or is there some more generic tool that can do that?
20:57:03 lavaman joins (~lavaman@98.38.249.169)
20:57:16 cunne joins (~cunne@user/cunne)
20:57:21 geekosaur joins (~geekosaur@xmonad/geekosaur)
20:57:30 <free_functor> I would use a grep to select and display all lines that are longer than 55 lines and consider refactoring the longlines
20:57:40 farmfrmjakestate joins (~farmfromj@user/farmfrmjakestate)
21:00:18 Cajun joins (~Cajun@user/cajun)
21:01:38 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds)
21:02:46 × ysavd^ quits (~ysavd@68.101.50.106) (Ping timeout: 250 seconds)
21:03:13 <free_functor> lbseale, do grep -REn '^.{55}.*' in your project source root
21:03:53 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving)
21:04:31 <lbseale> free_functor: nice, it definitely works
21:04:34 <free_functor> that greps all lines that ^begin, do .anything for 55 charachters, and then have .more* charachters... and it does so recursively for each file in the directory, uses Extened regex to do so, and gives you the line number for each match
21:05:09 × jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.2)
21:05:56 <free_functor> in VScode do a multi-file find with the regex ^.{55}.* to find all long lines
21:06:21 × NieDzejkob quits (~quassel@195.149.98.3) (Ping timeout: 250 seconds)
21:07:27 NieDzejkob joins (~quassel@195.149.98.3)
21:07:28 vysn joins (~vysn@user/vysn)
21:07:37 <free_functor> "Stinky detects a range of bad smells identified as
21:07:37 <free_functor> common by University of Kent staff involved in teaching
21:07:37 <free_functor> Haskell to 1st year computer science students"
21:07:45 <free_functor> https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.114.9950&rep=rep1&type=pdf
21:08:14 mestre joins (~mestre@191.177.175.57)
21:08:32 seydar joins (~seydar@154-27-113-252.starry-inc.net)
21:08:38 <free_functor> lbseale, section 6.7 describes a detector for "unecessarily long lines of code"
21:09:40 <seydar> For some reason, my install of ghc (fresh from homebrew) can't find any standard packages (specifically Network.Socket). Is there a command I can run to better identify why it can't see anything?
21:12:05 Guest7240 joins (~Guest72@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
21:12:44 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
21:12:45 × michalz quits (~michalz@185.246.204.58) (Remote host closed the connection)
21:13:58 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
21:14:56 Null_A joins (~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e)
21:15:31 Lord_of_Life_ is now known as Lord_of_Life
21:15:46 <monochrom> Here is a puzzle for you. What LOL mistake did I make that caused a memoizing algorithm to be slow? https://paste.tomsmeding.com/WtRqoWl1
21:18:26 × pbrisbin quits (~patrick@pool-173-49-147-250.phlapa.fios.verizon.net) (Ping timeout: 245 seconds)
21:20:29 <xerox> n-2 before n-1 ?
21:20:29 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:20:29 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
21:20:29 wroathe joins (~wroathe@user/wroathe)
21:20:51 <monochrom> That doesn't make a big difference either.
21:21:50 <awpr> don't want to spoil the answer, but `modify` might have had better luck`
21:21:58 <monochrom> heehee
21:22:09 <xerox> oops
21:23:05 <seydar> monochrom: you retrieve the cache within the `go` function, so it's pulling the original base cache instead of the updated one?
21:23:12 <monochrom> Yeah
21:24:19 <seydar> i wouldn't have noticed it without awpr's hint — just the right level of helpful without giving it away
21:24:25 <monochrom> So, after 5 days, out of the blue, I decided to look at Map.size of the final cache, and it's like 3, even if I attempt "fib 50". That was very surprising and pointed me in the right direction.
21:24:32 <sm> my haskell dev instincts say "this code probably is defeating my hilarious performance aspirations in multiple ways"
21:25:58 <sm> some sanity trace-ing on first few runs would have helped I guess
21:26:44 <arahael> I'm afraid I'm not really getting it either!
21:26:48 × Brumaire quits (~quassel@81-64-14-121.rev.numericable.fr) (Remote host closed the connection)
21:26:57 <arahael> Even when it's spelled out by seydar!
21:27:32 <monochrom> >:)
21:27:37 rtjure joins (~rtjure@bras-79-132-17-74.comnet.bg)
21:27:49 <arahael> Oh, do'h. Just saw it.
21:28:46 <arahael> monochrom: The other question, however is... How do you fix it?
21:29:18 <monochrom> After the two recursive calls, you should "get" again for the most up-to-date cache before you "put".
21:29:33 <monochrom> Or even more nicely, use "modify (Map.insert n a)".
21:29:58 <arahael> So some aren't memoised, but at least most of them are?
21:30:12 <arahael> I mean, so most of the cache accesses are hits.
21:30:45 <arahael> Yeah, that's crazy subtle. I need a coffee, haven't had a coffee yet. (Just woke up)
21:31:04 <monochrom> No. In the bad version, change "evalState" to "execState" to print the final Map and be very surprised that it basically memoizes nothing.
21:31:32 <seydar> monochrom: oh, so it wasn't about the placement of your initial `cache <- get` expression?
21:31:43 <monochrom> Or even what sm says. Print out the intermediate caches very often to see how it is not growing.
21:31:48 <seydar> (<--- haskell nub)
21:31:59 <monochrom> No, the initial get is necessary.
21:32:19 <monochrom> You have to get and lookup, you can't avoid that, and you can't postpone that either.
21:32:47 <seydar> I was thinking you would place it sooner, but now I see all the pieces falling into place and everything making sense
21:33:21 <lbseale> free_functor: `hindent` is a nice tool for dealing with line lengths (https://github.com/mihaimaruseac/hindent)
21:34:04 <arahael> monochrom: What I'm not completely clear on, is how to ensure that the 'go n-1' and 'go n-2' routines get actual benefit from the cache, even if the result does eventually get in.
21:34:21 <sm> trace - the killer haskell analysis tool
21:36:08 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds)
21:36:22 <monochrom> You want "go (n-2)" to add its findings to the cache, so that "go (n-1)" finds them in the cache.
21:37:23 <monochrom> Or generally, the 2nd recursive call doesn't have to work as hard as the 1st.
21:37:52 × zebrag quits (~chris@user/zebrag) (Ping timeout: 250 seconds)
21:38:07 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
21:41:01 <free_functor> lbseale, hindent looks like the most versatile and active tool so far, good find!
21:44:18 <free_functor> I wonder if you can declare hindent as a pre-commit hook via a cabal file
21:45:09 <free_functor> perhaps in some kind of no-op warning mode for long lines and other pet peeves
21:46:47 <arahael> monochrom: do they complete sequentially?
21:49:35 <sshine> has anyone here used the 'hkd-delta' package for anything interesting?
21:49:40 yauhsien joins (~yauhsien@118-167-48-21.dynamic-ip.hinet.net)
21:49:47 × farmfrmjakestate quits (~farmfromj@user/farmfrmjakestate) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:50:18 × nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.)
21:54:16 × yauhsien quits (~yauhsien@118-167-48-21.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
21:54:21 <free_functor> in python's poetry and javascript's npm package managers, you can automatically run pre-commit hooks when you try to bump the project's current version - these might include tests, code linters, and so on.
21:55:07 <dminuoso> 23:34:21 sm | trace - the killer haskell analysis tool
21:55:09 <monochrom> arahael: Yes, the State monad's >>= is fundamentally sequential. If you change over to ST, even more so.
21:55:25 <dminuoso> Heh, oh yeah this "why the heck is this printed a gazillion times" tool :-)
21:55:40 <free_functor> In addition, you can add tasks that you can invoke, like "npm run lintmaster_9000"
21:56:02 <sm> that's some valuable analysis right there! :)
21:56:27 <dminuoso> sm: Can you share your thoughts, please?
21:56:32 <dminuoso> Sorry, couldn't resist that pun.
21:57:06 <sm> pun ? that went way over my head :)
21:57:07 <arahael> monochrom, makes sense!
21:57:20 <monochrom> I think I don't get the pun. Is it just "trace is how GHC shares its thoughts"?
21:57:49 terrorjack joins (~terrorjac@static.3.200.12.49.clients.your-server.de)
21:58:20 <dminuoso> Was just hinting at that when trace prints a gazillion times unexpectedly, it could just be a missed sharing/memoization location.
21:58:32 <monochrom> Oh!
21:58:41 <sm> trace really is a killer tool, but I don't mean always just vanilla `trace`. Eg I add pretty printing and runtime choice of debug level, for a bit more control
21:58:42 <monochrom> Yeah, definitely.
21:59:02 <monochrom> Your puns are very sophisticated. I guess this is the difference between good puns and dad jokes.
21:59:08 monochrom can only do dad jokes.
21:59:49 <free_functor> it looks like a cabal file could specify a project's linting routines by defining special execution targets for cabal run. Is that true?
22:00:21 <dminuoso> A linter in `cabal run` seems like a bad idea.
22:00:35 <monochrom> Lately I thought up this dad joke accidentally.
22:00:42 <sm> free_functor, I don't think you can enforce anything about your VCS commits from the cabal file
22:01:06 <dminuoso> What's wrong with just a plain git hook?
22:01:33 <dminuoso> Aside the fact that I firmly believe that automatic linting is an unwise idea.
22:01:46 <sm> if you want to standardise/genericise it a bit, you could maybe add a test suite that runs your checks, and manually add a commit hook that runs that suite
22:02:35 sm is doing automatic linting of commit messages, and life is so much better
22:03:24 <dminuoso> Oh, that I could probably live with.
22:03:27 <monochrom> The type sig of the division operator and division by zero. Let's say div but the same discussion applies to (/). You know how some people prefer "div :: X -> X -> X", it's a more convenient type but can crash; and other people prefer "div :: X -> X -> Maybe X" so it doesn't crash and it's handlable, but less convenient when you don't really have div-by-zero.
22:03:37 <dminuoso> Does it do linguistic analysis and assert commit messages are in imperative form?
22:03:59 <monochrom> So I was thinking "this can become a divisive issue... oh wait what did I do there? hahaha"
22:04:04 <free_functor> dminuoso, the dependency manager is a reasonable place to declare your linting, since the linter is a dev dependency. And the linter doesn't need to be enforced - it could be a warning only, that pops up in your editor
22:04:23 <dminuoso> free_functor: "dev dependency" is not a thing for us, really.
22:04:30 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
22:04:57 <dminuoso> and also I disagree that its a sensible place, as that suggests the only reasonable place where a linter could come from, is via hackage.
22:05:34 <dminuoso> Here we simply use a shell.nix to provide development time dependencies
22:06:04 <dminuoso> Which is great because it lets us properly declare even native dependencies, something you simply cant do with npm-style dev dependencies.
22:06:17 <dminuoso> Or executable/binary tools that must be present
22:06:18 CnnibisIndica joins (~herb@user/mesaboogie)
22:06:50 <sm> dminuoso: nah, it mainly just requires one or more prefixes: at the start. But also when it fails, prints an informative message about the conventions, and how to configure as a local hook. This also shows up in CI output to pull requestors. Super effective.
22:07:19 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
22:07:20 <dminuoso> sm: Is that available for sharing?
22:07:24 <dminuoso> Im genuinely curious
22:07:43 <sm> sure! https://github.com/simonmichael/hledger/blob/master/bin/commitlint
22:07:53 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2) (Remote host closed the connection)
22:08:15 <dminuoso> sm: Oh, are you simonmic on matrix/haskell?
22:08:24 <sm> I am!
22:08:29 <dminuoso> Figures, that name did look familiar
22:08:48 <dminuoso> Ah yes, that looks really good.
22:08:53 <dminuoso> I can see the value in that.
22:12:38 <sm> I was writing commit messages this way myself, but it wasn't something others thought much about. So producing changelogs and release notes after time had passed was painful.. this has worked really well at improving our commit messages project wide and reducing the cost of change documentation (and releases)
22:14:09 <sm> doing it robustly in github CI is hard, but https://github.com/simonmichael/hledger/blob/master/.github/workflows/linux.yml#L104 works well enough
22:15:25 <sm> (improving commit messages has knock on effects: design thinking, commits, PRs, docs all improve)
22:20:18 <free_functor> dminuoso, so if you're not documenting your linter's version and provenance in the same place where you document your other project dependencies, where /does/ that metadata go? In the nix file?
22:20:47 nehsou^ joins (~nehsou@68.101.50.106)
22:20:50 <free_functor> ie, nix file fetches some particular git commit from some particular repo, and then it uses nix to build the some raw binaries or whatever?
22:22:26 <dminuoso> free_functor: We can do everything coherently via nix, actually.
22:22:29 <dminuoso> Even the cabal dependencies
22:22:48 <dminuoso> And yes, they are separate tools really.
22:23:05 <dminuoso> cabal just doesnt know how to install GHC, it's just the way it is.
22:23:13 <dminuoso> So you have to provide for that yourself.
22:23:19 <dminuoso> Similarly, cabal cant provide you with an editor
22:23:24 <dminuoso> you have to provide that yourself too.
22:23:36 <dminuoso> cabal also cant hand you gdb or lldb for debugging, or valgrind
22:24:05 × vysn quits (~vysn@user/vysn) (Ping timeout: 246 seconds)
22:24:13 <dminuoso> You quickly arrive at the fact, that cabal is really just good for making haskell stuff available, and the "needs for compilation time" rarely encompasses only haskell packages
22:24:46 pavonia joins (~user@user/siracusa)
22:25:58 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:27:04 <dminuoso> The primary use case of devDependencies is rather things like testing things.
22:27:24 <dminuoso> And to model that cabal has something more powerful, we can simply have separate (sub)packages that deal with testing
22:27:56 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
22:27:58 <dminuoso> And that (sub)package would then depend on say quickcheck, that way your production build doesnt have quickcheck and its constraints imposed on you
22:28:38 <free_functor> I do not yet understand why cabal should not be able to fetch a fresh ghc binary like poetry - it feels like the reason ghc-up exists is because cabal maintainers are stuck in year 2008 as far as package manager requirements - back then we didn't expect package managers to speak semver and integrate /w dvcs, and we didn't expect them to provide their own deterministic build environment either.
22:28:39 <dminuoso> I mean yeah, if you have a haskell library capable of linting haskell code, you can even call it directly from your test
22:28:56 <dminuoso> Many haskell programs have clean separation and expose the running interface as a haskell library
22:29:14 pzanco joins (~Android@187.104.158.159)
22:29:41 <dminuoso> cabal can talk PVP (which is comparable to semver), and it can do deterministic build environments.
22:30:12 <free_functor> when you init a poetry project, it builds a whole new python venv - if you asked for python 3.9 but that is not on your system, beep bop boop, poetry fetches python 3.9 when provisioning the project's venv
22:30:15 <dminuoso> Im not sure why you suggest being able to fetch a GHC is paramount for `cabal`, or why lacking that capability means its "stuck in ancient past"
22:30:15 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:30:28 × pzanco quits (~Android@187.104.158.159) (Client Quit)
22:30:39 <dminuoso> free_functor: it's simply not in the scope of cabal, it's as simple as that.
22:30:45 <sclv> basically you could merge ghcup and cabal but then you couldn’t manage cabal with ghcup, and ghcup also handles now things like msys on windows and various -dev deps on debian and also installling hls and ide tools.
22:31:00 <sclv> and having cabal do all that would be beyond absurd
22:31:26 <sclv> and having ghcup do it instead is totally nice and fine and works great!
22:31:27 <free_functor> dminuoso, things like the statement "it's simply not in the scope of cabal" is what makes me say it's stuck in an ancient - and mysterious, and unaccountable past... which is not relevant to my own requirements
22:31:40 <sclv> I suggest you use ghcup
22:32:35 <dminuoso> free_functor: How about you start exploring what Cabal-the-spec is?
22:32:46 <free_functor> sclv, ghcup only exists because cabal refuses to take hints from package managers like cargo, yarn, npm, and poetry, all of which do these things and don't seem to feel it's featuritis or scope creep
22:32:57 <sclv> sometimes having different tools to do different things instead of one tool to do everything is called “a feature” and “good software architecture” and “the reason unix-like systems succeeded”
22:33:00 <Hecate> free_functor: Other languages like Rust, Elixir & Ruby do the same. You don't install the toolchain with the project manager.
22:33:03 <dminuoso> Every time I have interacted with yarn or npm I ended up hating myself.
22:33:15 × max22- quits (~maxime@2a01cb0883359800a9478b4b8829df15.ipv6.abo.wanadoo.fr) (Quit: Leaving)
22:33:26 <dminuoso> They are fundamentally broken.
22:33:34 <free_functor> ie, being able to go from a git repo to a fully working deployment feels like the package manager's job in 2021
22:33:54 <dminuoso> free_functor: Feel free to improve the situation.
22:34:24 <sclv> i mean ghcup works great. Literally what problem do you have with that workflow outside of “its not yarn”
22:34:26 <zzz> so today someone showed me this, which i found interesting: https://www.codewars.com/kata/550756a881b8bdba99000348/train/haskell
22:34:42 <free_functor> I mean, whoever it is on the cabal team who is against merging ghc-up into cabal needs to be deplatformed before anything can improve
22:34:56 <dminuoso> You seem to be just wanting to fight for no obvious reasons.
22:35:03 <dminuoso> So Ill detach from this discussion.
22:35:05 <sclv> answer my question
22:35:59 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:36:02 <dminuoso> If you want to have a rational discussions, I suggest you don't start with accusations and a made up mind.
22:36:21 <free_functor> "<dminuoso> free_functor: it's simply not in the scope of cabal, it's as simple as that."
22:36:22 <dminuoso> And start with questions of curiosity instead. It's much more productive.
22:36:27 <free_functor> the conversation ended there, dminuoso
22:36:50 <Boarders> I would not say taking hints from python is a good idea in this space, the lang is a massive disaster at package management
22:37:02 jess joins (~jess@libera/staff/jess)
22:37:40 Hydrazer joins (~Hydrazer@S010684c9b26eee6d.cg.shawcable.net)
22:37:58 <Hydrazer> does anyone know if it's possible to automatically run the main program when typing the ghci command? like ghci main "bruh.hs"
22:39:53 <sclv> skimming poetry’s website i do see that python is now recommending upper bounds on all dependencies. score one for the good guys
22:40:03 <hpc> do you want runghc maybe?
22:41:09 <Hydrazer> yeah how do i get that
22:41:48 <zzz> Hydrazer: you can do it with ghcid
22:42:24 <sclv> runghc should be installed with ghc
22:42:33 <Hydrazer> on windows?
22:42:36 <hpc> yep
22:42:42 <Hydrazer> hm
22:42:43 <hpc> just do runghc foo.hs
22:42:46 <hpc> it'll run main and exit
22:44:10 × emf quits (~emf@163.114.132.6) (Ping timeout: 252 seconds)
22:45:51 × rtjure quits (~rtjure@bras-79-132-17-74.comnet.bg) (Ping timeout: 268 seconds)
22:45:53 × norskalm quits (~norskalm@101.175.64.73) (Quit: Client closed)
22:46:03 <Hydrazer> yeah perfect nice
22:46:29 × Hydrazer quits (~Hydrazer@S010684c9b26eee6d.cg.shawcable.net) (Quit: Client closed)
22:46:35 <zzz> i used to do 'watch runghc ...' but now i do 'ghcid --test=test ...' and have all my tests in a 'test :: IO ()' function so i can see the output live update when i save the file
22:47:14 <zzz> that way i dont pollute my main function
22:47:35 <zzz> and can make it run iff all my tests pass
22:48:45 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
22:48:46 [Kalisto] joins (~nico@user/kalisto/x-8968079)
22:50:44 [Kalisto] parts (~nico@user/kalisto/x-8968079) ()
22:50:46 <zzz> i have it aliased. 'hs {file}' is 'ghcid --warnings --lint --no-status --test=test --test-message="
22:50:52 <zzz> " --clear --no-height-limit ${file}'
22:50:52 <free_functor> @Hecate, I believe rust has a "ghc-up" styled script called rustup, which is its official installer. It is indeed this rustup component which shotguns both the compiler and the package manager onto the system all at once. So I was wrong - it's not cargo that does this, but instead, it's the official rust installer which installs both cargo and rust
22:50:52 <lambdabot> Unknown command, try @list
22:51:55 vicfred joins (~vicfred@user/vicfred)
22:56:44 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
22:58:01 chris joins (~chris@81.96.113.213)
22:58:05 chris is now known as Guest557
22:58:20 <monochrom> IIRC rustup is not a build tool. As a counterexample.
22:58:49 <free_functor> I suppose correct me if I am wrong on this: If the same rust model were applied to haskell, all that would have to change is that ghcup would become an officially supported installer for cabal and ghc. Ie, for ghcup to serve the same role that rustup serves, it needs legitimacy and endorsement from both ghc and cabal communities.
22:59:09 <sclv> ghcup is such an officially supported installer
22:59:29 <Hecate> free_functor: ghcup benefits from support from GHC, Cabal, HLS…
22:59:34 <monochrom> And cargo is not an install-rust-compiler tool either, IIRC.
22:59:58 <Hecate> free_functor: and yes, ghcup is modeled after rustup
23:00:36 <free_functor> monochrom, I believe it is so - https://doc.rust-lang.org/cargo/getting-started/installation.html note the "Rust is installed now. Great!" message - after I have done this in the past, I had rust and cargo
23:01:12 <dminuoso> ghcup is an officially supported and endorsed installer.
23:01:17 <monochrom> But you know you can always write your own shell script that dispatches ghcup or cabal or linter or git-pull automatically.
23:01:27 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:01:27 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
23:01:27 wroathe joins (~wroathe@user/wroathe)
23:01:41 <dminuoso> https://www.haskell.org/ghcup/
23:01:41 <free_functor> dminuoso, I think sclv was trying to tell me that earlier but it didn't connect
23:02:24 <monochrom> How does "Rust is installed now. Great!" have anything to do with building?
23:02:47 <monochrom> How does "Rust is installed now. Great!" refute my "rustup is not a build tool"?
23:04:16 <sm> replying to backlog: free_functor, are you aware of stack ? That's a combined install/build tool
23:04:27 <dminuoso> free_functor: The key thing about cabal, is that it's focused on doing one thing and one thing well. CABAL stands for common architecture for building applications and libraries and it defines how these things should be built, with dependencies, cabal-the-library implements that specification together by being able to parse a .cabal file, and cabal-install uses cabal-the-library to resolve
23:04:29 <dminuoso> dependencies from hackage in order to build said packages.
23:05:20 <free_functor> dminuoso, in fact I now see that cabal itself now has official installation instructions that depend on ghcup
23:05:37 <free_functor> which.. is... the thing I thought was not the case... because I was wrong :(
23:05:56 <monochrom> This is why I hate people with "strong conviction".
23:05:59 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f920:a9dd:18bc:fca2)
23:06:05 <monochrom> They opine before they research.
23:06:07 <free_functor> monochrom, we hate you too :0
23:06:15 <dminuoso> free_functor: at the end, the thing is `cabal` being completely isolated is a good thing, because it reduces friction by not interfering with your system as much as it can. It's a modular thing that you can bundle up in say `stack` or `ghcup`.
23:06:15 <sm> monochrom: there's something circular in that statement :)
23:06:21 <dminuoso> But `cabal-install` itself makes no such assumptions.
23:06:21 <monochrom> 30 years ago we had a great phrase for that on BBSes.
23:06:32 <monochrom> "insert foot into mouth, echo internationally"
23:06:40 <free_functor> lol
23:06:48 <free_functor> that still applies
23:07:17 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 264 seconds)
23:08:14 <monochrom> And the context in which I first learned the phrase "strong conviction" is this.
23:08:17 <free_functor> I have no excuse - the last time I looked at ghcup, it was not yet the official solution.. but that was over a year ago, when GHCUP would randomly not work in settings like alpine, for no reason I could discern
23:08:29 × haykam2 quits (~haykam@static.100.2.21.65.clients.your-server.de) (Changing host)
23:08:29 haykam2 joins (~haykam@user/haykam)
23:08:39 <monochrom> I got a humour book about writing recommendation letters for those you don't really want to write for.
23:09:14 <hpc> and inside it said "go away" followed by 250 empty pages?
23:09:19 <monochrom> One scenerio is there is an ex-convict, a former gangster, so you dare not refuse, and you dare not write bad things in plain sight either.
23:09:33 <monochrom> So the solution was "this is a person of strong conviction".
23:10:02 <dminuoso> free_functor: Even before ghcup, managing via bindists is really fine. Or if you insisted on this "one piece of software for it all", stack had you covered.
23:10:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
23:10:19 <free_functor> that's not even damning with faint praise, that's fairly seething - you must estimate this rogue as less than insightful!
23:10:58 <dminuoso> This is mostly a problem that relates to "easing in the way for newcomers", but let's face it: spending 3 minutes on installing GHC/cabal by hand if need be is largely irrelevant in the scope of spending 800h on a given Haskell project in some year.
23:11:09 <dminuoso> So this doesn't really impact the actual workload
23:11:51 <dminuoso> So yeah, Haskell had some rough edges that made getting into it harder than it should have been, but none of them were really relevant for people working with haskell on a daily basis.
23:12:18 <dminuoso> ghcup nicely closed that up, and I do believe it has helped more people successfully start learning haskell
23:12:53 <Gurkenglas> Is there a particular monotonic map that can only be implemented using try/catch?
23:12:55 <dminuoso> But really the lack is not proof of any immaturity, it's mostly just annoyances. cabals build plans are robust, npm builds plans are (IME) not.
23:19:35 <dminuoso> for instance the separatio of peerDependencies and normal dependencies can lead to dependency duplication, and the javascript solution is to "never pass structures between package boundaries". This sort of works because passing non-opaque structures tends to work well enough, and any friction is eaten away/hidden in automatic conversions, or perhaps it leads to random bugs
23:21:44 <dminuoso> if peerDependencies and dependencies were always properly maintained, it'd probably not be much of an issue, but the reality is that they are horribly maintained
23:22:16 <dminuoso> also, Id be really curious at the constraint solving used by npm, because finding suitable plans with what npm has seems almost impossible to do
23:22:40 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
23:23:02 <dminuoso> Or maybe it's because npm doesnt use a constraint solver?
23:23:56 × haykam2 quits (~haykam@user/haykam) (Remote host closed the connection)
23:24:14 haykam joins (~haykam@user/haykam)
23:24:14 × haykam quits (~haykam@user/haykam) (Read error: Connection reset by peer)
23:24:28 haykam joins (~haykam@user/haykam)
23:24:28 × haykam quits (~haykam@user/haykam) (Read error: Connection reset by peer)
23:24:45 haykam joins (~haykam@user/haykam)
23:24:45 × haykam quits (~haykam@user/haykam) (Read error: Connection reset by peer)
23:24:58 haykam joins (~haykam@user/haykam)
23:24:58 × haykam quits (~haykam@user/haykam) (Read error: Connection reset by peer)
23:25:11 haykam joins (~haykam@user/haykam)
23:25:11 × haykam quits (~haykam@user/haykam) (Read error: Connection reset by peer)
23:25:59 <free_functor> once upon a time it solved that issue by including the kitchen sink. If module A used version 2.0 of module C, and module B needed version 1.8, .npm_modules would collect both versions.
23:30:32 <zzz> this still goin on?
23:30:51 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
23:32:39 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
23:32:42 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 250 seconds)
23:33:19 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
23:34:05 × acidjnk_new3 quits (~acidjnk@p200300d0c703cb49b458fc4f9b844b2d.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
23:35:14 <free_functor> I notice that ghcup is not yet really a "first class citizen" of haskell.org. Lets compare to rust.org, where the call to action ("get started") takes you directly to a page with clear rustup directions.
23:39:31 <shapr> I would like for ghcup to be that first class citizen
23:42:38 <monochrom> Generally it is trivial for an interpreter to support loading up both versions of the "same" library. Less easier but still pretty doable for a non-optimizing compiler.
23:43:10 <monochrom> But this is absolutely unsafe for an aggressively inlining optimizing compiler such as GHC.
23:43:31 <monochrom> In particular aggressive enough to do cross-module inlining.
23:44:30 <monochrom> Everything bad about the "cabal hell" horror story traces back to this fundamental fact.
23:44:42 × Robin_Jadoul quits (~Robin_Jad@152.67.64.160) (Read error: Connection reset by peer)
23:44:59 Robin_Jadoul joins (~Robin_Jad@152.67.64.160)
23:45:02 <awpr> I believe GHC handles this fine (if un-ergonomically): two "different versions of the same library" are just totally unrelated packages with disjoint types and code. I know I've seen some non-Cabal builds fail with errors like "could not match these-0.2:These with these-0.3:These"
23:45:11 <monochrom> But people do not understand. They look at Python and Javascript and then come back and say "why can't Haskell do the same?"
23:45:22 <monochrom> Do you want to run Hugs? Then you can do the same.
23:46:01 <free_functor> shapr, I think one very simple change would send a clear signal: The haskell page has a call action (Try it!); underneath, or replacing it, there could be another call to action "Install it!"
23:46:18 <sclv> also javascript and python have, as the ecosystem of deps has grown, have run into eventual problems with this modue
23:46:44 <monochrom> Yes, GHC does a type-check and allow when it sees disjointness. cabal-install though plays it safe and simply ban up front.
23:46:57 <monochrom> Or rather, cabal-install since after cabal hell.
23:47:06 <monochrom> There was a time it was OK with this too.
23:47:12 <awpr> "when cabal hell freezes over"
23:47:29 <awpr> now refers to a time in the past
23:48:46 <monochrom> But problem is that the name "cabal hell" includes seeing the GHC error message and, instead of thanking the safety checks, complaining about "a new kind of DLL hell".
23:49:16 × mei quits (~mei@user/mei) (Ping timeout: 245 seconds)
23:49:55 <monochrom> Right? People's response to build failures is name calling.
23:50:55 <seydar> For some reason, my install of ghc (fresh from homebrew) can't find any standard packages (specifically Network.Socket). Is there a command I can run to better identify why it can't see anything?
23:51:21 <monochrom> Ah, I think Network.Socket doesn't come with GHC any more.
23:51:31 yauhsien joins (~yauhsien@118-167-48-21.dynamic-ip.hinet.net)
23:52:09 <monochrom> I think network was drop a year ago or further.
23:52:16 × Guest7240 quits (~Guest72@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
23:52:16 <monochrom> s/drop/dropped/
23:52:59 <monochrom> Ah, but the command you're looking for is "ghc-pkg" :)
23:53:06 <monochrom> e.g. ghc-pkg list
23:55:47 × yauhsien quits (~yauhsien@118-167-48-21.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
23:55:50 × Franciman quits (~Franciman@mx1.fracta.dev) (Ping timeout: 260 seconds)
23:56:07 × pierrot quits (~pi@user/pierrot) (Ping timeout: 240 seconds)
23:56:41 Franciman joins (~Franciman@mx1.fracta.dev)
23:56:41 zebrag joins (~chris@user/zebrag)
23:57:28 pierrot joins (~pi@user/pierrot)
23:58:04 <free_functor> sorry for flogging this dead horse, dminuoso, but here are the other signals that the haskell org maintainers don't officially endorse ghcup yet: 1) The ghcup install instructions don't appear front and center at in https://www.haskell.org/downloads/. 2) The cabal docs (https://cabal.readthedocs.io/en/3.6/getting-started.html#installing-the-haskell-toolchain) link to the ghcup git repo, not the ghcup instructions page. 3) The
23:58:04 <free_functor> official status of GHCUP is not at all reflected on the GHC download page https://www.haskell.org/ghc/download_ghc_8_10_7.html
23:59:57 <monochrom> This is because there are people who prefer ghcup, people who prefer going through stack, and people who prefer other alternatives, for example homebrew, chocolate.

All times are in UTC on 2021-09-28.