Home liberachat/#haskell: Logs Calendar

Logs on 2022-02-16 (liberachat/#haskell)

00:01:07 meinside joins (uid24933@id-24933.helmsley.irccloud.com)
00:10:27 wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net)
00:11:13 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Remote host closed the connection)
00:12:26 lbseale_ joins (~ep1ctetus@user/ep1ctetus)
00:12:55 × ft quits (~ft@shell.chaostreff-dortmund.de) (Ping timeout: 256 seconds)
00:15:25 ProfSimm joins (~ProfSimm@87.227.196.109)
00:15:29 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 250 seconds)
00:15:30 × max22- quits (~maxime@2a01cb0883359800f7b27aee14b4b0ce.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
00:15:37 <EvanR> is there a name or blog post for this concept: an abstract data type which supports querying/summarizing/reading but also editing. And internally it has two interchangable forms which are more efficient for repeated reading or repeated editing respectively
00:15:47 cynomys joins (~cynomys@user/cynomys)
00:16:13 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 272 seconds)
00:17:29 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
00:17:34 <EvanR> and maybe policies for when to make the transformation one way or another
00:17:35 alp joins (~alp@user/alp)
00:19:47 × kmein quits (~weechat@user/kmein) (Quit: ciao kakao)
00:20:25 × shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection)
00:20:38 shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net)
00:21:33 × acidjnk quits (~acidjnk@p200300d0c7057500a04355ceabfe8d47.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
00:21:52 kmein joins (~weechat@user/kmein)
00:27:25 Null_A joins (~null_a@c-98-210-133-39.hsd1.ca.comcast.net)
00:28:00 × xff0x quits (~xff0x@2001:1a81:53dd:d400:b969:14d4:3062:a4) (Ping timeout: 252 seconds)
00:28:59 xff0x joins (~xff0x@2001:1a81:53dd:d400:cfc4:5e91:8963:f0f2)
00:31:19 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
00:32:24 × Null_A quits (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
00:33:11 geekosaur joins (~geekosaur@xmonad/geekosaur)
00:35:13 machinedgod joins (~machinedg@24.105.81.50)
00:35:20 <Inst[m]> monochrom: is the Church-Turing hypothesis proven?
00:35:45 <Inst[m]> in which case, ProfSimms is just reiterating something rather trivial
00:36:06 justsomeguy joins (~justsomeg@user/justsomeguy)
00:40:28 <monochrom> EvanR: Does a relational database count? It may be a little bit weak on having two forms, but declaring primary keys and/or secondary keys and/or foreign keys may count as that, because the b-tree structure is built based on which fields you declare as keys.
00:40:57 <EvanR> yeah a database is great example of 1 form at a tmie
00:41:27 × cynomys quits (~cynomys@user/cynomys) (Quit: Lost terminal)
00:41:48 <EvanR> do you want to read a lot or query a lot, both. (Ok, they have some configuration options to make one or the other faster, but you set this option once to inform the form)
00:42:14 <monochrom> On the other extreme, perfect hashing is a hash table so optimized for lookups that it bans editing altogether.
00:43:09 <EvanR> s/read/edit/
00:44:20 <monochrom> I do not know of things that let you flip a switch and causes "OK now rebuild for optimal read-only".
00:44:47 <EvanR> it doesn't need to be the size of a database
00:45:41 <EvanR> ok maybe this is a subproblem of just have forms that make some queries cheaper to do than others, since in pure functional an edit is like a kind of read
00:45:59 <EvanR> which has as an example the complex number in rectangular form or polar form
00:47:09 <EvanR> you could use rectangular form everywhere like we do, and "just" convert to polar any time the radius or angle is requested
00:47:38 <monochrom> Even within read-only, optimal-for-lookup and optimal-for-folds may already be in conflict.
00:47:59 <EvanR> that's basically what I just said
00:48:04 <monochrom> Ah OK.
00:48:15 <EvanR> lookup and fold being two examples of queries
00:48:23 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
00:48:40 <EvanR> and substitution, getting an updated picture, a third example
00:49:14 <EvanR> the standard method is to use something that's generally ok at everything
00:49:59 <monochrom> Yeah it's hard to predict what your users want to do in the far future. :)
00:50:31 <EvanR> what if instead of a history of the future, you had a (possibly evolving) probability model for what they will want next
00:51:18 <EvanR> and when
00:51:58 <EvanR> I guess then it's a combination of too complicated and not worth it
00:52:01 <monochrom> OK you can have that model based on the past. A keyword may be "adaptive data structures".
00:53:03 <EvanR> i can imagine a smart engineer saying, no, why don't we just use actual knowledge of what we will actually do instead
00:53:34 <monochrom> Don't worry about worth. There are always crazy computer scientists who think up crazy solutions. :)
00:54:43 × little_mac quits (~little_ma@2601:410:4300:3ce0:c5cf:b717:584d:5dd3) (Remote host closed the connection)
00:55:50 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
00:55:50 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
00:55:50 wroathe joins (~wroathe@user/wroathe)
01:00:04 × lbseale_ quits (~ep1ctetus@user/ep1ctetus) (Quit: Leaving)
01:00:36 × jgeerds_ quits (~jgeerds@55d4b9df.access.ecotel.net) (Read error: Connection reset by peer)
01:00:59 jgeerds_ joins (~jgeerds@55d4b9df.access.ecotel.net)
01:01:08 ft joins (~ft@shell.chaostreff-dortmund.de)
01:02:11 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
01:04:13 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4)
01:04:14 little_mac joins (~little_ma@2601:410:4300:3ce0:edbf:f48a:9927:9718)
01:05:07 szkl joins (uid110435@id-110435.uxbridge.irccloud.com)
01:06:23 × little_mac quits (~little_ma@2601:410:4300:3ce0:edbf:f48a:9927:9718) (Client Quit)
01:06:36 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Ping timeout: 240 seconds)
01:10:30 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:13:06 × jgeerds_ quits (~jgeerds@55d4b9df.access.ecotel.net) (Ping timeout: 252 seconds)
01:16:37 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:20:05 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
01:31:27 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
01:32:34 img joins (~img@user/img)
01:33:01 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
01:35:02 chenqisu1 joins (~chenqisu1@183.217.200.249)
01:36:13 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
01:37:24 lavaman joins (~lavaman@98.38.249.169)
01:38:17 Cajun joins (~Cajun@user/cajun)
01:38:57 <Inst[m]> fuck, what's the hanzi for Lai
01:38:58 <Inst[m]> monochrom
01:39:15 <Inst[m]> should be addressing you as Lai 老师
01:40:36 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Ping timeout: 240 seconds)
01:42:21 <Inst[m]> 巴黎的黎
01:42:28 <Inst[m]> 黎老师
01:42:46 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4)
01:43:16 <Inst[m]> was wondering, right now, my working definition of Haskell is "clusterfuck", i.e, it's ostensibly a "pure, functional programming language" where the language extensions and lib mean it technically has everything. Except Or-Patterns.
01:43:49 <Inst[m]> i'm sure someone implemented objects via STRef / IORef somewhere in Hackage
01:46:05 <Inst[m]> and yeah, OHaskell is a thing, so's Timber
01:46:33 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
01:50:04 Merfont joins (~Kaiepi@156.34.47.253)
01:50:10 × Kaipi quits (~Kaiepi@156.34.47.253) (Remote host closed the connection)
01:54:31 dsrt^ joins (~dsrt@50.235.176.163)
01:55:00 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
02:00:12 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
02:00:16 vysn joins (~vysn@user/vysn)
02:04:48 × alp quits (~alp@user/alp) (Ping timeout: 252 seconds)
02:08:38 <Axman6> :t M.fromList . mapMaybe traverse
02:08:39 <lambdabot> error:
02:08:39 <lambdabot> • Couldn't match type ‘t0 a -> f (t0 b)’ with ‘Maybe (k, a1)’
02:08:39 <lambdabot> Expected type: (a -> f b) -> Maybe (k, a1)
02:08:50 <Axman6> :t M.fromList . mapMaybe sequence
02:08:51 <lambdabot> Ord k => [(k, Maybe a)] -> M.Map k a
02:09:07 <Axman6> :t M.fromList . mapMaybe sequence . M.toList
02:09:07 <lambdabot> Ord k => M.Map k (Maybe a) -> M.Map k a
02:09:08 jinsun__ joins (~jinsun@user/jinsun)
02:09:36 <Axman6> :t M.fromAscList . mapMaybe sequence . M.toList -- koala_man (sorry, it's been churning away in the back of my mind)
02:09:37 <lambdabot> Eq k => M.Map k (Maybe a) -> M.Map k a
02:09:57 × emf quits (~emf@2620:10d:c090:400::5:d01b) (Ping timeout: 240 seconds)
02:11:45 <Axman6> :t M.traverseMaybeWithKey (\_k v -> Identity v)
02:11:46 <lambdabot> M.Map k (Maybe b) -> Identity (M.Map k b)
02:11:57 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 252 seconds)
02:11:57 × jinsun quits (~jinsun@user/jinsun) (Ping timeout: 252 seconds)
02:12:20 <Axman6> that might be better, since it can reuse the structure of the tree
02:13:08 <Axman6> > M.traverseMaybeWithKey (\_k v -> [Just v, Nothing]) (M.fromList $ zip [1,2,3] "abc")
02:13:09 <lambdabot> [fromList [(1,'a'),(2,'b'),(3,'c')],fromList [(1,'a'),(2,'b')],fromList [(1,...
02:13:56 <Axman6> oh, there's also just mapMaybe id
02:14:28 <Axman6> :t M.mapMaybe id -- which.. is what dibblego already said and then retracted
02:14:29 <lambdabot> M.Map k (Maybe b) -> M.Map k b
02:14:47 × x_kuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
02:16:19 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
02:19:06 <jackdk> Axman6/koala_man : https://hackage.haskell.org/package/witherable-0.4.2/docs/Witherable.html#t:Filterable
02:20:17 × xff0x quits (~xff0x@2001:1a81:53dd:d400:cfc4:5e91:8963:f0f2) (Ping timeout: 250 seconds)
02:21:11 xff0x joins (~xff0x@2001:1a81:53dd:d400:1a83:e659:64aa:a931)
02:22:18 alp joins (~alp@user/alp)
02:23:15 <shapr> Is there a table for postgresql-simple that has "suggested postgresql column type for defined ToField instances" ?
02:29:33 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
02:33:58 gaff joins (~gaff@49.207.202.143)
02:45:56 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 240 seconds)
02:50:54 a6a45081-2b83 joins (~aditya@2601:249:4380:4f10::fe26)
02:51:06 little_mac joins (~little_ma@2601:410:4300:3ce0:edbf:f48a:9927:9718)
02:54:31 × xff0x quits (~xff0x@2001:1a81:53dd:d400:1a83:e659:64aa:a931) (Ping timeout: 250 seconds)
02:55:00 × a6a45081-2b83 quits (~aditya@2601:249:4380:4f10::fe26) (Ping timeout: 240 seconds)
02:55:02 f33f046c-a02e joins (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507)
02:56:23 xff0x joins (~xff0x@2001:1a81:5217:d600:a1de:a304:ac28:4386)
02:57:19 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
02:57:56 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 240 seconds)
02:58:42 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
03:11:00 × gaff quits (~gaff@49.207.202.143) (Ping timeout: 272 seconds)
03:11:08 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
03:14:13 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Client Quit)
03:14:32 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
03:14:35 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Client Quit)
03:14:54 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
03:15:05 zaquest joins (~notzaques@5.130.79.72)
03:16:16 chexum joins (~quassel@gateway/tor-sasl/chexum)
03:17:05 × f33f046c-a02e quits (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) (Remote host closed the connection)
03:17:24 × alp quits (~alp@user/alp) (Ping timeout: 252 seconds)
03:23:29 gaff joins (~gaff@49.207.202.143)
03:27:51 emf joins (~emf@2620:10d:c090:400::5:6a6c)
03:29:30 × td_ quits (~td@94.134.91.25) (Ping timeout: 252 seconds)
03:31:33 td_ joins (~td@muedsl-82-207-238-242.citykom.de)
03:44:55 × Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
03:45:22 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
03:46:25 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Quit: Konversation terminated!)
03:47:15 × emf quits (~emf@2620:10d:c090:400::5:6a6c) (Quit: emf)
03:48:36 × gaff quits (~gaff@49.207.202.143) (Ping timeout: 240 seconds)
03:52:18 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
03:54:21 × mzan quits (~quassel@mail.asterisell.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
03:56:01 deadmarshal joins (~deadmarsh@95.38.0.168)
04:00:51 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
04:02:31 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
04:02:31 × azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
04:02:46 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
04:02:50 azimut joins (~azimut@gateway/tor-sasl/azimut)
04:06:58 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Quit: Konversation terminated!)
04:09:55 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 272 seconds)
04:10:38 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
04:12:12 Erutuon joins (~Erutuon@user/erutuon)
04:15:53 lavaman joins (~lavaman@98.38.249.169)
04:16:15 × ralu quits (~ralu@static.211.245.203.116.clients.your-server.de) (Ping timeout: 272 seconds)
04:16:47 wroathe joins (~wroathe@user/wroathe)
04:20:40 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds)
04:24:42 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Remote host closed the connection)
04:29:19 mbuf joins (~Shakthi@122.162.72.100)
04:30:12 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
04:33:19 deadmarshal_ joins (~deadmarsh@95.38.231.90)
04:33:48 × deadmarshal quits (~deadmarsh@95.38.0.168) (Ping timeout: 240 seconds)
04:36:13 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
04:36:13 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
04:36:13 wroathe joins (~wroathe@user/wroathe)
04:36:26 texasmynsted joins (~texasmyns@99.96.221.112)
04:37:48 × cyphase quits (~cyphase@user/cyphase) (Ping timeout: 240 seconds)
04:39:48 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
04:40:36 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
04:42:14 mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475)
04:43:06 cyphase_eviltwin joins (~cyphase@user/cyphase)
04:44:09 burnside_ joins (~burnsides@client-8-91.eduroam.oxuni.org.uk)
04:44:10 × burnsidesLlama quits (~burnsides@dhcp168-031.wadham.ox.ac.uk) (Remote host closed the connection)
04:45:00 × waleee quits (~waleee@h-98-128-229-110.NA.cust.bahnhof.se) (Ping timeout: 240 seconds)
04:47:39 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
04:47:48 notzmv joins (~zmv@user/notzmv)
04:48:12 × burnside_ quits (~burnsides@client-8-91.eduroam.oxuni.org.uk) (Ping timeout: 240 seconds)
04:48:33 × deadmarshal_ quits (~deadmarsh@95.38.231.90) (Ping timeout: 272 seconds)
04:50:10 lavaman joins (~lavaman@98.38.249.169)
04:50:17 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:51:17 capo_greco joins (~textual@60-241-161-167.static.tpgi.com.au)
04:59:09 yauhsien_ joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
04:59:10 × yauhsien_ quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
05:00:02 yauhsien_ joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
05:00:10 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
05:02:27 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
05:04:36 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Ping timeout: 240 seconds)
05:04:39 × yauhsien_ quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
05:07:15 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
05:08:09 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
05:09:00 × mvk quits (~mvk@2607:fea8:5cdc:bf00::99e7) (Ping timeout: 240 seconds)
05:09:05 × modnar quits (~modnar@shell.sonic.net) (Quit: No Ping reply in 180 seconds.)
05:10:18 modnar joins (~modnar@shell.sonic.net)
05:13:01 × yauhsien quits (~Yau-Hsien@61-231-32-166.dynamic-ip.hinet.net) (Quit: Leaving)
05:13:41 gaff joins (~gaff@49.207.201.232)
05:22:15 × capo_greco quits (~textual@60-241-161-167.static.tpgi.com.au) (Ping timeout: 252 seconds)
05:32:32 deadmarshal joins (~deadmarsh@95.38.231.90)
05:42:12 yauhsien joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
05:44:19 yuvi joins (~uv125@192.54.96.185)
05:47:26 × yauhsien quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Ping timeout: 272 seconds)
05:48:34 lavaman joins (~lavaman@98.38.249.169)
05:51:28 × gaff quits (~gaff@49.207.201.232) (Quit: Bye ...)
05:52:36 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
05:58:49 × yuvi quits (~uv125@192.54.96.185) (Quit: WeeChat 2.8)
06:00:37 ralu joins (~ralu@static.211.245.203.116.clients.your-server.de)
06:05:25 _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl)
06:06:34 × bliminse quits (~bliminse@host86-158-241-239.range86-158.btcentralplus.com) (Quit: leaving)
06:08:28 Sgeo_ joins (~Sgeo@user/sgeo)
06:09:36 × pavonia quits (~user@user/siracusa) (Read error: Connection reset by peer)
06:09:48 × forell quits (~forell@user/forell) (Ping timeout: 240 seconds)
06:09:52 pavonia joins (~user@user/siracusa)
06:09:58 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
06:10:05 forell joins (~forell@user/forell)
06:14:06 <ProfSimm> Why do we need map and filter when we have fold
06:14:27 <Inst[m]> more specific
06:14:35 <Inst[m]> haskell has the particular quality wherein there's like 20 different ways to do things
06:14:43 × foul_owl quits (~kerry@207.244.125.36) (Ping timeout: 250 seconds)
06:14:45 <Inst[m]> map, sometimes you want to preserve a structure
06:14:48 <Inst[m]> map is just a specific form of fmap
06:15:10 <Inst[m]> also, fold can generate performance issues
06:15:24 <Inst[m]> also
06:15:38 <Inst[m]> the point of map / filter is to make it so that readers can understand your code, i.e, see what you're aiming to do
06:15:53 <Inst[m]> fold, you often end up with weird lambdas the reader doesn't understand
06:16:11 <Inst[m]> hence why there's like 20 different ways to do things, choose the best combination of readability, concision, and performance
06:16:35 <ProfSimm> all you say makes sense.
06:16:40 <ProfSimm> Which is why I don't accept it.
06:16:46 <ProfSimm> Gotta dig deeper :D
06:16:50 <Inst[m]> ProfSimm: I met you on ##programing
06:16:55 <Inst[m]> just now joining the Haskell club?
06:17:03 <Inst[m]> also, in general
06:17:06 <Inst[m]> Haskellers are fucking insane
06:17:23 <Inst[m]> there's like 5 different ways to do a conditional in Haskell
06:17:27 <ProfSimm> Inst[m]: let's say the more I think about programming from first principles, the more things start looking like Haskell and I'm being in a bit of denial right now
06:17:28 <Inst[m]> within the prelude
06:17:42 <Inst[m]> once you add libraries and language extensions
06:17:46 <Inst[m]> there's probably like 10 different ways to do a conditional
06:18:02 <Inst[m]> Haskell does not provide a unified style
06:18:33 <Inst[m]> IMO it's an exceptionally good language for a beginner to struggle with the theory underlying programming languages because there's so many fucking different ways to do things and you have to think about how each way is "valid" or useful
06:18:59 <Inst[m]> which is why i like it, but my ABC girlfriend needs me to help her with her Chinese, so I have to put Haskell aside for a bit
06:19:13 <ProfSimm> Inst[m]: that thing that keeps me up at night is what's the most miminal core through which everything else can be represented as libraries
06:19:27 <ProfSimm> Inst[m]: the problem with fold is that it's not paralellizable for ex.
06:19:38 <Inst[m]> try {-# LANGUAGE NoImplicitPrelude #-}
06:19:42 <ProfSimm> So while you can implement map via it, it sucks
06:20:32 <Inst[m]> 黎老师,她是我的林黛玉。
06:21:35 <Inst[m]> ProfSimm: what's your background?
06:21:35 <Inst[m]> You seem to be an experienced programmer, possibly teaching comp sci at uni.
06:21:38 <Inst[m]> I'm a Haskell-as-First-Language twit
06:22:03 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:22:18 <ario> you learned haskell as your first language?
06:22:24 <ario> that's hardcore!
06:22:50 <dsal> It's probably easier to learn haskell as a first language than a third language.
06:22:55 <ario> hah
06:23:07 <ario> paradigm shift, i get that
06:23:15 <ario> i had such a hard time with prolog
06:23:32 <dsal> I've never built anything slightly useful in prolog.
06:23:48 <dsal> ProfSimm: Are you sure you can't parallelize a fold?
06:24:12 <ario> i built an interpreter
06:24:27 <ario> this was for some theoretical college course
06:24:59 <ario> took me two weeks of bashing my head against it lol
06:25:39 <Yehoshua> dsal: Since in a fold, each step uses the output from the previous step, that makes sense.
06:26:04 <dsal> :t fold
06:26:05 <lambdabot> (Foldable t, Monoid m) => t m -> m
06:26:28 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
06:26:29 <Yehoshua> :t foldl
06:26:30 <lambdabot> Foldable t => (b -> a -> b) -> b -> t a -> b
06:27:41 <dibblego> folds can be parallelised
06:28:30 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
06:28:39 <Yehoshua> For only monoid, it seems some
06:28:42 <Yehoshua> s/some/so./
06:29:05 <Yehoshua> (since a(bc) = (ab)c)
06:30:17 <Yehoshua> However, a foldl/foldr can use the accumulator in such a way as to disallow that.
06:30:50 <Inst[m]> <ario> "you learned haskell as your..." <- working on it
06:30:54 <Inst[m]> need to finish a few textbooks first
06:31:10 <Inst[m]> I think Haskell is an excellent first language and should be taught as such
06:31:25 <ProfSimm> Inst[m]: I've been programming since i was a kid, but I'm teaching nobody at uni. Honestly my work is mostly traditional OOP and data processing pipelines.
06:31:44 <dsal> To ProfSimm's question, there are different things you'd do with data structures. Sometimes you want a structure-preserving transformation of values within it, so fmap is right. Sometimes you want a catamorphism (or to reuse various Foldable functions like `sum` and `length`). Sometimes you want an effectful transformation like traverse. When you think about what you want done vs. how it's done, it gets easier.
06:31:45 <Inst[m]> oh, research professor
06:31:48 <Inst[m]> congrats :)
06:32:01 <dsal> For a good read: https://maartenfokkinga.github.io/utwente/mmf91m.pdf
06:32:33 <Inst[m]> profSimm: TBH, we're focusing on the same goal
06:32:39 <Inst[m]> I'd like to know what a minimal Haskell teaching course looks like
06:32:54 <Inst[m]> someone mentioned before that Haskell Report core is actually shorter than Python specification
06:33:10 <Inst[m]> and scanr is often not mentioned, no one knew what until was, etc
06:33:17 <Inst[m]> i'd like to know what the hell a combinator is
06:33:52 <dsal> Do you want a minimal Haskell teaching course (of which there are many) or a course that covers every function that anyone's written?
06:35:24 × turlando quits (~turlando@user/turlando) (Ping timeout: 252 seconds)
06:36:57 <Inst[m]> what's a minimal haskell teaching course, then?
06:37:59 <dsal> Any one of the introductory courses is fairly minimal.
06:39:49 <dsal> You might be assuming that your ideal minimal set is an accepted definition of minimal. If it includes `scanr` it is definitely not minimal by any definition. You could build scanr when you need it if you didn't know it existed from the base language.
06:40:02 <dsal> @src scanr
06:40:02 <lambdabot> scanr _ q0 [] = [q0]
06:40:02 <lambdabot> scanr f q0 (x:xs) = f x q : qs
06:40:02 <lambdabot> where qs@(q:_) = scanr f q0 xs
06:43:20 × _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
06:45:48 × vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
06:45:49 Pickchea joins (~private@user/pickchea)
06:45:52 foul_owl joins (~kerry@23.105.36.232)
06:47:16 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
06:48:58 azimut joins (~azimut@gateway/tor-sasl/azimut)
06:57:27 coot joins (~coot@213.134.190.95)
07:09:35 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
07:11:31 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
07:11:32 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
07:11:32 wroathe joins (~wroathe@user/wroathe)
07:16:45 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 272 seconds)
07:18:01 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
07:18:24 Vajb joins (~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e)
07:18:52 × Natch quits (~natch@c-4db8e255.014-297-73746f25.bbcust.telenor.se) (Ping timeout: 250 seconds)
07:19:18 ubert1 joins (~Thunderbi@p200300ecdf0994b46944f41320f0055f.dip0.t-ipconnect.de)
07:19:18 × Vajb quits (~Vajb@2001:999:274:c862:3b86:e1e1:5bff:355e) (Read error: Connection reset by peer)
07:19:45 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
07:23:27 Natch joins (~natch@c-4db8e255.014-297-73746f25.bbcust.telenor.se)
07:27:07 fef joins (~thedawn@user/thedawn)
07:28:57 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 256 seconds)
07:29:40 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
07:33:03 yauhsien joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
07:36:13 alp joins (~alp@user/alp)
07:37:04 × alp quits (~alp@user/alp) (Remote host closed the connection)
07:37:25 alp joins (~alp@user/alp)
07:37:27 × yauhsien quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
07:38:18 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
07:38:34 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
07:41:57 × alp quits (~alp@user/alp) (Ping timeout: 252 seconds)
07:42:47 acidjnk joins (~acidjnk@pd9e0b668.dip0.t-ipconnect.de)
07:43:21 × Natch quits (~natch@c-4db8e255.014-297-73746f25.bbcust.telenor.se) (Ping timeout: 272 seconds)
07:44:09 rusrushal13 joins (~rusrushal@103.85.18.34)
07:46:25 Natch joins (~natch@c-4db8e255.014-297-73746f25.bbcust.telenor.se)
07:47:47 mzan joins (~quassel@mail.asterisell.com)
07:48:32 turlando joins (~turlando@93-42-250-112.ip89.fastwebnet.it)
07:48:32 × turlando quits (~turlando@93-42-250-112.ip89.fastwebnet.it) (Changing host)
07:48:32 turlando joins (~turlando@user/turlando)
07:50:03 <Inst[m]> i'd disagree, it's hard to tell what should be included and what shouldn't be included, some courses spend a lot of time teaching list manipulation, others skip monads, etc
07:50:06 <Inst[m]> but i'm not sober and i'm going to bed
07:51:45 gehmehgeh joins (~user@user/gehmehgeh)
07:58:35 Ariakenom joins (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se)
07:58:46 lortabac joins (~lortabac@2a01:e0a:541:b8f0:5b51:ad88:49b8:7439)
07:59:39 ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg)
08:01:18 × ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Remote host closed the connection)
08:01:38 ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg)
08:01:45 × little_mac quits (~little_ma@2601:410:4300:3ce0:edbf:f48a:9927:9718) (Quit: Leaving)
08:02:15 yauhsien joins (~Yau-Hsien@61-231-32-166.dynamic-ip.hinet.net)
08:04:00 × shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit)
08:05:39 × lagash quits (lagash@lagash.shelltalk.net) (Quit: ZNC - https://znc.in)
08:06:06 × ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Ping timeout: 256 seconds)
08:06:25 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
08:07:05 lagash joins (lagash@lagash.shelltalk.net)
08:08:23 × szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
08:12:11 alp joins (~alp@user/alp)
08:12:11 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
08:12:43 vglfr joins (~vglfr@coupling.penchant.volia.net)
08:15:18 zeenk joins (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5)
08:16:05 fendor joins (~fendor@77.119.209.21.wireless.dyn.drei.com)
08:20:03 cfricke joins (~cfricke@user/cfricke)
08:21:10 cynomys joins (~cynomys@user/cynomys)
08:25:17 × Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:27:18 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
08:27:18 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
08:27:18 wroathe joins (~wroathe@user/wroathe)
08:27:22 chele joins (~chele@user/chele)
08:28:09 × rusrushal13 quits (~rusrushal@103.85.18.34) (Quit: Client closed)
08:30:15 razetime joins (~quassel@49.207.198.36)
08:30:55 × razetime quits (~quassel@49.207.198.36) (Client Quit)
08:32:45 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 272 seconds)
08:33:57 dyeplexer joins (~dyeplexer@user/dyeplexer)
08:35:43 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
08:38:49 max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr)
08:39:48 × cynomys quits (~cynomys@user/cynomys) (Ping timeout: 240 seconds)
08:40:41 × rembo10 quits (~rembo10@remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
08:41:27 × mzan quits (~quassel@mail.asterisell.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
08:41:34 rembo10 joins (~rembo10@remulis.com)
08:41:52 cynomys joins (~cynomys@user/cynomys)
08:44:03 × Cajun quits (~Cajun@user/cajun) (Ping timeout: 256 seconds)
08:45:05 mzan joins (~quassel@mail.asterisell.com)
08:45:25 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
08:46:22 vglfr joins (~vglfr@coupling.penchant.volia.net)
08:48:36 machinedgod joins (~machinedg@24.105.81.50)
08:52:36 × deadmarshal quits (~deadmarsh@95.38.231.90) (Ping timeout: 240 seconds)
08:55:24 × cynomys quits (~cynomys@user/cynomys) (Ping timeout: 240 seconds)
08:55:25 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
08:56:13 vglfr joins (~vglfr@coupling.penchant.volia.net)
08:58:03 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
08:58:03 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
08:58:03 wroathe joins (~wroathe@user/wroathe)
08:58:24 zer0bitz joins (~zer0bitz@2001:2003:f74d:b800:c9dd:301:29f7:88f5)
09:00:23 michalz joins (~michalz@185.246.204.89)
09:00:23 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
09:00:35 vglfr joins (~vglfr@coupling.penchant.volia.net)
09:02:17 AlexZenon joins (~alzenon@178.34.150.24)
09:02:37 Alex_test joins (~al_test@178.34.150.24)
09:03:01 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
09:05:42 wootehfoot joins (~wootehfoo@user/wootehfoot)
09:08:37 cynomys joins (~cynomys@user/cynomys)
09:11:29 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
09:16:37 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
09:17:17 vglfr joins (~vglfr@coupling.penchant.volia.net)
09:19:25 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
09:20:05 vglfr joins (~vglfr@coupling.penchant.volia.net)
09:20:19 Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com)
09:22:26 × turlando quits (~turlando@user/turlando) (Quit: turlando)
09:22:41 turlando joins (~turlando@93-42-250-112.ip89.fastwebnet.it)
09:22:41 × turlando quits (~turlando@93-42-250-112.ip89.fastwebnet.it) (Changing host)
09:22:41 turlando joins (~turlando@user/turlando)
09:23:44 × turlando quits (~turlando@user/turlando) (Client Quit)
09:24:13 turlando joins (~turlando@user/turlando)
09:25:29 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
09:27:03 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
09:27:10 vglfr joins (~vglfr@coupling.penchant.volia.net)
09:28:12 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
09:28:50 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
09:28:50 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
09:28:50 wroathe joins (~wroathe@user/wroathe)
09:31:34 Erutuon joins (~Erutuon@user/erutuon)
09:33:24 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
09:33:25 × vglfr quits (~vglfr@coupling.penchant.volia.net) (Read error: Connection reset by peer)
09:34:32 vglfr joins (~vglfr@coupling.penchant.volia.net)
09:35:48 ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg)
09:35:56 `2jt joins (~jtomas@130.red-88-22-46.staticip.rima-tde.net)
09:37:27 deadmarshal joins (~deadmarsh@95.38.231.90)
09:37:47 rusrushal13 joins (~rusrushal@103.85.18.34)
09:38:00 MajorBiscuit joins (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl)
09:40:57 AlexNoo joins (~AlexNoo@178.34.150.24)
09:41:37 × ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Remote host closed the connection)
09:50:15 lavaman joins (~lavaman@98.38.249.169)
09:51:38 <joel135> :t scanr
09:51:39 <lambdabot> (a -> b -> b) -> b -> [a] -> [b]
09:52:57 ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg)
09:53:24 <joel135> so it's like fold with a history, didn't know about that
09:54:48 <tomsmeding> :t \f z -> foldr (\x (y:r) -> f x y : y : r) [z]
09:54:49 <lambdabot> Foldable t1 => (t2 -> a -> a) -> a -> t1 t2 -> [a]
09:55:02 <tomsmeding> % :t +d \f z -> foldr (\x (y:r) -> f x y : y : r) [z]
09:55:03 <yahb> tomsmeding: (t -> a -> a) -> a -> [t] -> [a]
09:55:05 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds)
09:58:13 vysn joins (~vysn@user/vysn)
09:58:44 × ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Remote host closed the connection)
09:59:03 ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg)
10:03:18 × acidjnk quits (~acidjnk@pd9e0b668.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
10:04:47 jackson99 joins (~bc8147f2@cerf.good1.com)
10:04:51 <jackson99> hi
10:05:12 × ystael quits (~ystael@user/ystael) (Ping timeout: 272 seconds)
10:05:13 <jackson99> > Just 10 <|> undefined
10:05:14 <lambdabot> Just 10
10:05:31 <jackson99> this is done lazily. but this isn't. why?
10:05:43 <jackson99> liftA2 (<|>) action1 action2
10:06:28 ystael joins (~ystael@user/ystael)
10:07:42 __monty__ joins (~toonn@user/toonn)
10:09:17 <jackson99> is this reasonable? it seems to work
10:09:27 <jackson99> iftA2 (<|>) action1 (unsafeInterleaveIO action2)
10:12:11 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 272 seconds)
10:12:17 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
10:12:17 <lortabac> jackson99: can you give a little more context please?
10:12:37 <jackson99> if action1 returns Nothing, and only then, I want to run action2
10:12:55 <jackson99> action1 :: IO (Maybe a) action2 :: IO (Maybe a)
10:12:59 <merijn> jackson99: Those are two very different things, though
10:13:08 <jackson99> what two things?
10:13:25 <merijn> liftA2 (<|>) and <|>
10:13:36 <merijn> jackson99: You say "one is lazy, the other isn't" <- disagree
10:13:58 <merijn> tbh, it sounds like you want MaybeT
10:13:59 <jackson99> action2 is performed regardless of what action1 returns. so it isn't lazy enough
10:14:20 <merijn> jackson99: because liftA2 is the applicative of IO and IO is *always* sequenced
10:14:36 <merijn> anyway, what you want is "MaybeT IO"
10:14:52 <jackson99> is this a good use of unsafeInterleaveIO?
10:15:01 <Ariakenom> and to be clear this is entirely unrelated to laziness
10:15:13 <Ariakenom> jackson99 no
10:15:22 <merijn> jackson99: not really, because MaybeT is the right one and not unsafe
10:15:24 <jackson99> why? I did some testing and it works as expected
10:16:04 <merijn> jackson99: That's because anything unsafeX isn't required to be nicely predictable and you cannot generalise behaviour from one example to another
10:16:25 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:49da:9bbf:6c0f:9f3d) (Remote host closed the connection)
10:16:28 <merijn> jackson99: "it seems to work as expected" is what unsafeX always does, right before it stabs you in the back and ruins your code :p
10:16:50 <jackson99> isn't unsafeInterleaveIO used by lazy IO in haskell base?
10:17:17 <jackdk> there's a reason that for any nontrivial lazy IO, people reach for streaming libraries
10:17:18 <merijn> lazy IO is 1) highly questionable and 2) there's only like, 3 or 4 functions using lazy IO in base
10:17:27 <Ariakenom> "IO (Maybe a)" does not express "if action1 returns Nothing, and only then, I want to run action2". but "MaybeT IO" does.
10:19:00 <jackson99> I don't want streaming. action1 and 2 perform some system C calls. action1 is faster, but may not always work. so if it worked, I don't want to call action2. I'm curious if, and how, could unsafeInterleaveIO fail in here
10:19:49 <Ariakenom> ex: if you want to run the action but won't look at the result
10:20:14 yauhsien_ joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
10:20:28 mc47 joins (~mc47@xmonad/TheMC47)
10:20:38 <Ariakenom> you want to be explicit about what IO you run. not leave it to what values you look at
10:21:39 × yauhsien_ quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Remote host closed the connection)
10:22:54 <jackson99> so action2 may not run if I don't look at the value
10:23:00 <jackson99> that's actually a reasonable behavior for this
10:23:16 <Ariakenom> probably not. you'd want it to be consistent for action1
10:23:40 yauhsien_ joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
10:23:44 <Ariakenom> (I mean that action1 also doesnt run if you dont look at the result)
10:23:46 <jackson99> if I don't inspect the value, there's no reason to run more expensive action. I'm only calling it for the value
10:24:22 <jackson99> that's fine too :)
10:24:31 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
10:25:04 <jackson99> hmm, I did x <- f in ghci, I did not inspect x, but both actions were ran
10:25:36 <jackson99> nevermind, I also called some functions that forced evaluation. so action1 is ran, but action2 isn't, until I inspect value
10:26:11 <jackson99> but that is completely fine for what I'm doing. I'll still look at MaybeT just out of curiosity
10:26:24 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:d5cb:a199:c5f8:d68d)
10:27:00 × foul_owl quits (~kerry@23.105.36.232) (Ping timeout: 240 seconds)
10:27:09 <Ariakenom> what action are you doing?
10:28:12 × yauhsien_ quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
10:28:36 <jackson99> I am searching for a window using FindWindow and EnumWindows winapi functions. EnumWindows is about 200 times slower, and I'm polling for the value in a loop with 20 or so ms delay. not a big deal, but it does mean CPU usage is a couple of % instead of 0%
10:28:53 mmhat joins (~mmh@55d4ce8c.access.ecotel.net)
10:29:08 × mmhat quits (~mmh@55d4ce8c.access.ecotel.net) (Client Quit)
10:30:36 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:d5cb:a199:c5f8:d68d) (Ping timeout: 240 seconds)
10:31:16 × fef quits (~thedawn@user/thedawn) (Ping timeout: 240 seconds)
10:32:25 <Ariakenom> so the result changes depending on when you run it. so leaving it up to when you evaluate a value is a ... muddy way to do it
10:33:02 <jackson99> hmm, that is true
10:35:29 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f)
10:37:39 × ishutin quits (~ishutin@193-110-63-21.cable-modem.hdsnet.hu) (Ping timeout: 256 seconds)
10:39:06 ishutin joins (~ishutin@92-249-150-129.static.digikabel.hu)
10:39:48 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f) (Ping timeout: 240 seconds)
10:43:17 × ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Remote host closed the connection)
10:43:36 ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg)
10:44:57 foul_owl joins (~kerry@23.82.193.104)
10:48:10 × ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Ping timeout: 256 seconds)
10:53:28 × rusrushal13 quits (~rusrushal@103.85.18.34) (Quit: Client closed)
10:55:00 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
10:57:03 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
11:02:13 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
11:02:59 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
11:05:15 <jackdk> are there thread-safety concerns with those winapi functions? I wonder if the stuff in Control.Concurrent.Async could help here
11:07:24 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
11:07:59 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
11:12:22 × xff0x quits (~xff0x@2001:1a81:5217:d600:a1de:a304:ac28:4386) (Quit: xff0x)
11:13:37 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
11:14:17 × unyu quits (~pyon@user/pyon) (Ping timeout: 240 seconds)
11:14:27 <jackson99> my program is single threaded, it just blocks, searches for windows, and then hides them if necessary. so I have no thread-safety concerns. but I think those functions are thread safe
11:17:16 fendor_ joins (~fendor@91.141.40.92.wireless.dyn.drei.com)
11:19:47 × fendor quits (~fendor@77.119.209.21.wireless.dyn.drei.com) (Ping timeout: 250 seconds)
11:21:32 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
11:23:11 <jackson99> Async would allow me to run functions concurrently, but I don't think that would decrease CPU usage? if anything, it would increase it
11:28:33 xff0x joins (~xff0x@2001:1a81:5217:d600:8ce0:743c:22b0:b5ff)
11:38:11 × Shiranai quits (~Shiranai@190.237.13.59) (Quit: Connection closed)
11:38:16 unyu joins (~pyon@user/pyon)
11:39:00 × mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 252 seconds)
11:40:16 CiaoSen joins (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
11:40:50 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
11:41:38 jakalx parts (~jakalx@base.jakalx.net) ()
11:48:28 acidjnk joins (~acidjnk@p200300d0c7057599445f812649320e47.dip0.t-ipconnect.de)
11:51:24 × deadmarshal quits (~deadmarsh@95.38.231.90) (Ping timeout: 240 seconds)
11:52:40 romesrf joins (~romes@44.190.189.46.rev.vodafone.pt)
11:53:05 <romesrf> hey everyone
11:54:08 <romesrf> what's your preferred way to write fmap (fmap f) x
11:54:31 <byorgey> I often write (fmap . fmap) f x
11:55:20 <romesrf> AH nice
11:55:21 <byorgey> inspired by http://conal.net/blog/posts/semantic-editor-combinators
11:55:31 sprout_ joins (~quassel@2a02:a467:ccd6:1:3933:29:5fe1:cb6b)
11:55:49 <romesrf> i'm convinced :)
11:56:13 <byorgey> it generalizes nicely to things like (fmap . first . fmap) f x etc.
11:56:48 <jackson99> I sometimes do fmap f <$> x
11:57:26 <jackson99> nevermind, that does something different
11:57:35 <byorgey> no, that's the same
11:57:46 <jackson99> yeah it is :P
11:59:16 <byorgey> I sometimes write that too. I think it depends on whether I'm mapping over something I'm thinking of as a nested data structure (in which case I would do (fmap . fmap)) or if it's like a functorial result from some kind of monadic action
11:59:19 × sprout quits (~quassel@2a02:a467:ccd6:1:511a:5eb2:c96:106b) (Ping timeout: 256 seconds)
11:59:37 <byorgey> like if x :: IO [String] I would probably write fmap read <$> x instead of (fmap . fmap) read x
12:00:08 <romesrf> byorgey: i like the idiom in the post, nice :)
12:00:36 <romesrf> and I agree, I also change syntax depending on the easiest way to visualize what i'm doing
12:00:40 ph88 joins (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de)
12:09:22 ProfSimm joins (~ProfSimm@87.227.196.109)
12:11:01 <dminuoso> % :t getCompose . fmap (+1) . Compose
12:11:01 <yahb> dminuoso: (Functor f, Functor g, Num a) => f (g a) -> f (g a)
12:11:02 dextaa_ joins (~dextaa@user/dextaa)
12:11:29 <dminuoso> Depending on the surrounding context, this can be quite nice as well
12:13:05 × acidjnk quits (~acidjnk@p200300d0c7057599445f812649320e47.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
12:13:11 neurocyte0917090 joins (~neurocyte@IP-185117069029.dynamic.medianet-world.de)
12:13:11 × neurocyte0917090 quits (~neurocyte@IP-185117069029.dynamic.medianet-world.de) (Changing host)
12:13:11 neurocyte0917090 joins (~neurocyte@user/neurocyte)
12:13:14 <dminuoso> In a pinch I generally write `fmap f <$> x` though
12:14:57 × rookie101 quits (~rookie@165.232.121.13) (Quit: WeeChat 1.9.1)
12:18:20 <jackdk> a number of prelude replacements provide `(<<$>>)`, which I like enough to sometimes define locally
12:18:51 × neurocyte0917090 quits (~neurocyte@user/neurocyte) (Ping timeout: 272 seconds)
12:19:07 acidjnk joins (~acidjnk@dynamic-046-114-170-094.46.114.pool.telefonica.de)
12:19:12 <dminuoso> In one of my projects I locally defined `fmap1`, `fmap2`, `fmap3`, which is very similar I guess
12:19:54 jakalx joins (~jakalx@base.jakalx.net)
12:21:22 dhil joins (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net)
12:21:24 <hpc> do like what base does with tuples and define (<<<<<<<<<<<<<<<<<<<<$>>>>>>>>>>>>>>>>>>>>) all the way up to 63
12:21:35 <hpc> see what ghc's upper limit on identifier length is
12:23:42 deadmarshal joins (~deadmarsh@95.38.231.90)
12:24:07 <dminuoso> Was the memory corruption bug causing that artificial limit on tuple sizes ever found?
12:24:49 <dminuoso> Recall some dark story about how the limit was the result of experimentation, but the underying bug was a mystery
12:24:50 <merijn> No idea
12:24:56 PaulTheNeko joins (~u0_a287@public-gprs522838.centertel.pl)
12:25:56 × acidjnk quits (~acidjnk@dynamic-046-114-170-094.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
12:25:58 bliminse joins (~bliminse@host86-158-241-239.range86-158.btcentralplus.com)
12:26:10 acidjnk joins (~acidjnk@dynamic-046-114-170-094.46.114.pool.telefonica.de)
12:27:21 × dextaa_ quits (~dextaa@user/dextaa) (Remote host closed the connection)
12:36:18 jgeerds_ joins (~jgeerds@55d4b9df.access.ecotel.net)
12:37:00 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f)
12:37:50 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 272 seconds)
12:38:12 × cynomys quits (~cynomys@user/cynomys) (Ping timeout: 240 seconds)
12:41:24 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f) (Ping timeout: 240 seconds)
12:42:13 Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net)
12:42:25 × jgeerds_ quits (~jgeerds@55d4b9df.access.ecotel.net) (Read error: Connection reset by peer)
12:43:47 jgeerds_ joins (~jgeerds@55d4b9df.access.ecotel.net)
12:44:33 capo_greco joins (~textual@60-241-161-167.static.tpgi.com.au)
12:45:53 neurocyte0917090 joins (~neurocyte@IP-185117069029.dynamic.medianet-world.de)
12:45:53 × neurocyte0917090 quits (~neurocyte@IP-185117069029.dynamic.medianet-world.de) (Changing host)
12:45:53 neurocyte0917090 joins (~neurocyte@user/neurocyte)
12:46:16 × nunggu_ quits (~q@user/nunggu) (Ping timeout: 240 seconds)
12:48:52 <romesrf> cool stuff!
12:49:01 <AndreasK> dminuoso: In recent times (since I started working on GHC) no one tried to increase the limit. Until someone reworks GHC to allow infinite tuples the current limit seems reasonable so there was little motivation.
12:49:59 nunggu_ joins (~q@user/nunggu)
12:52:00 <ProfSimm> Can the whole Haskell runtime tail recurse on itself.
12:52:55 <merijn> ProfSimm: Not sure what that means, tbh :)
12:53:20 <geekosaur> pretty sure the ghc runtime only does jumps
12:53:46 <geekosaur> so depending on howyou thinkof it,either nothing or everything is a tail recursion
12:53:49 <AndreasK> It's jumps all the way down, to the bottom of the stack.
12:55:38 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
12:55:52 <zzz> ProfSimm: do you mean `main = do { whatever; main }` ??
13:07:05 × PaulTheNeko quits (~u0_a287@public-gprs522838.centertel.pl) (Read error: Connection reset by peer)
13:07:25 PaulTheNeko joins (~u0_a287@apn-31-0-26-69.dynamic.gprs.plus.pl)
13:07:57 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
13:12:02 × PaulTheNeko quits (~u0_a287@apn-31-0-26-69.dynamic.gprs.plus.pl) (Ping timeout: 272 seconds)
13:12:38 PaulTheNeko joins (~u0_a287@apn-31-0-26-69.dynamic.gprs.plus.pl)
13:12:43 × PaulTheNeko quits (~u0_a287@apn-31-0-26-69.dynamic.gprs.plus.pl) (Client Quit)
13:13:53 dextaa_ joins (~dextaa@user/dextaa)
13:14:35 × Merfont quits (~Kaiepi@156.34.47.253) (Remote host closed the connection)
13:14:59 Merfont joins (~Kaiepi@156.34.47.253)
13:17:48 × xff0x quits (~xff0x@2001:1a81:5217:d600:8ce0:743c:22b0:b5ff) (Ping timeout: 240 seconds)
13:18:44 xff0x joins (~xff0x@2001:1a81:5217:d600:567:b7a:e54:e078)
13:21:43 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
13:24:19 × acidjnk quits (~acidjnk@dynamic-046-114-170-094.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
13:24:39 acidjnk joins (~acidjnk@p200300d0c71d3b97a07e6bc3219efcf6.dip0.t-ipconnect.de)
13:29:25 to_gl joins (~to_gl@193.164.24.245)
13:29:33 to_gl parts (~to_gl@193.164.24.245) ()
13:31:38 × Merfont quits (~Kaiepi@156.34.47.253) (Remote host closed the connection)
13:31:58 Merfont joins (~Kaiepi@156.34.47.253)
13:34:31 cynomys joins (~cynomys@user/cynomys)
13:34:54 andreabedini joins (~andreabed@8s8kj680jt94n45xrsj1.ip6.superloop.com)
13:35:56 thyriaen joins (~thyriaen@simnet-nat-pool-185-130-54-167.stargrpns.pp.ua)
13:40:58 <ephemient> https://ro-che.info/articles/2017-01-10-nested-loop-space-leak :(
13:42:56 slowButPresent joins (~slowButPr@user/slowbutpresent)
13:43:51 × jlamothe quits (~jlamothe@198.251.61.229) (Ping timeout: 252 seconds)
13:45:23 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
13:49:47 <jackson99> how would this be done with TypeApplications? isNumber s = isJust (readMaybe s :: Maybe Int)
13:50:12 × cynomys quits (~cynomys@user/cynomys) (Ping timeout: 240 seconds)
13:50:18 <jackson99> I thought something like this would work, but I am getting errors: isNumber = isJust . readMaybe @ Maybe Int
13:50:34 <Ariakenom> % :t readMaybe
13:50:34 <yahb> Ariakenom: ; <interactive>:1:1: error: Variable not in scope: readMaybe
13:50:49 <geekosaur> % import Text.Read
13:50:49 <yahb> geekosaur:
13:51:04 <geekosaur> % isNumber s = isJust (readMaybe @Int s)
13:51:04 <yahb> geekosaur:
13:51:12 <Ariakenom> % :t readMaybe
13:51:13 <yahb> Ariakenom: Read a => String -> Maybe a
13:51:24 × CiaoSen quits (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
13:51:31 <jackson99> % isNumber = isJust . readMaybe @Int
13:51:31 <yahb> jackson99:
13:51:37 <jackson99> nice
13:51:39 <lortabac> jackson99: you have to look at the type variables
13:51:58 <lortabac> in this case the first (and only) variable is 'a'
13:51:58 <jackson99> yeah I get it now. it needs a, not Maybe a
13:52:07 <romesrf> :)
13:52:11 <geekosaur> the Maybe is fixed so it doesn'tget reflected in a typevariable. the a is obviously a typevariable, so go fir that
13:52:27 rusrushal13 joins (~rusrushal@103.85.18.34)
13:52:46 <lortabac> you can skip variables with @_
13:52:46 <ephemient> also if you really did want Read (Maybe Int), you need to parenthesize it, as in readMaybe @(Maybe Int)
13:53:03 <Ariakenom> how to see the type variables?
13:53:22 <geekosaur> use :t
13:53:37 <Ariakenom> I did but yahb didnt show me
13:53:47 <geekosaur> > :t readMaybe
13:53:49 <lambdabot> <hint>:1:1: error: parse error on input ‘:’
13:53:57 <geekosaur> wrong bot :(
13:54:01 <geekosaur> % :t readMaybe
13:54:02 <yahb> geekosaur: Read a => String -> Maybe a
13:54:21 <Ariakenom> I think it needs some extension to always show type variables
13:54:22 <geekosaur> there's only one typevariable, so it's obviously the one TypeApplications will apply to
13:54:37 <Clint> :t readMaybe
13:54:38 <lambdabot> error: Variable not in scope: readMaybe
13:54:40 <geekosaur> % :set -fprint-explicit-foralls
13:54:40 <yahb> geekosaur:
13:54:43 <geekosaur> % :t readMaybe
13:54:43 <yahb> geekosaur: forall {a}. Read a => String -> Maybe a
13:54:49 <Ariakenom> yes but I want to show it anyway
13:54:51 <Ariakenom> yay
13:54:53 merijn mumbles something about "TypeApplications considered harmful"
13:56:27 alt-romes joins (~romes@44.190.189.46.rev.vodafone.pt)
13:56:30 × vysn quits (~vysn@user/vysn) (Ping timeout: 252 seconds)
13:58:33 × capo_greco quits (~textual@60-241-161-167.static.tpgi.com.au) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:59:15 × romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Ping timeout: 252 seconds)
14:00:53 jlamothe joins (~jlamothe@198.251.61.229)
14:01:24 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Ping timeout: 240 seconds)
14:04:58 aehu6ce8 joins (~aehu6ce8@31.187.110.131)
14:05:32 <kuribas> merijn: we should be able to pass types to functions like in idris :)
14:06:17 <kuribas> in idris you can pass implicit types by name.
14:06:39 <geekosaur> next ghc version
14:06:43 <kuribas> Which would solve the problems that haskell TypeApplications have, since they are positional.
14:06:58 <geekosaur> forall t -> …
14:07:07 <merijn> kuribas: positional *and* implicitly ordered
14:07:16 <kuribas> yeah, that's pretty bad.
14:07:34 <alt-romes> is there a name for: data Ex m a = Ex (m a), instance Functor f => (Ex f) where fmap f (Ex x) = Ex $ fmap f x, and then I'd like to have something that has signatures (f a -> g a) -> (Ex f a) -> (Ex g a)
14:07:49 <jackson99> implicitly ordered?
14:07:51 <alt-romes> it looks like the type is just lifted to Ex but
14:08:03 <alt-romes> not really ahaha
14:08:56 <alt-romes> so Ex is an instance of functor where I can alter `a` of Ex m a, and is an instance of ____ where i can alter `m` of Ex m a
14:09:05 wonko joins (~wjc@user/wonko)
14:11:49 × xff0x quits (~xff0x@2001:1a81:5217:d600:567:b7a:e54:e078) (Ping timeout: 250 seconds)
14:12:12 × andreabedini quits (~andreabed@8s8kj680jt94n45xrsj1.ip6.superloop.com) (Quit: WeeChat 3.3)
14:12:16 wroathe joins (~wroathe@user/wroathe)
14:12:22 yauhsien_ joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
14:13:40 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
14:14:28 <Ariakenom> you can implicitly order them. but you can also explicitly order them
14:15:45 Everything joins (~Everythin@37.115.210.35)
14:16:16 xff0x joins (~xff0x@2001:1a81:5217:d600:567:b7a:e54:e078)
14:16:18 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
14:16:46 <kuribas> Ariakenom: which doesn't help if you didn't wrote the function you need to apply.
14:17:10 <Ariakenom> it does not
14:17:16 × yauhsien_ quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Ping timeout: 272 seconds)
14:18:10 <Ariakenom> I agree that ::-typing is better than @-typing
14:18:38 AlexNoo_ joins (~AlexNoo@94.233.240.208)
14:18:51 × wonko quits (~wjc@user/wonko) (Remote host closed the connection)
14:19:42 wonko joins (~wjc@user/wonko)
14:19:55 <dminuoso> alt-romes: Such a transformation is called a natural transformation.
14:21:05 × AlexZenon quits (~alzenon@178.34.150.24) (Ping timeout: 272 seconds)
14:21:37 <dminuoso> Or rather, `forall a. f a -> g a` is called a natural transformation
14:21:43 × Alex_test quits (~al_test@178.34.150.24) (Ping timeout: 272 seconds)
14:21:51 <dminuoso> And the process of `(f a -> g a) -> (Ex f a) -> (Ex g a)` is usually called `hoisting` or `lifting`
14:22:20 × AlexNoo quits (~AlexNoo@178.34.150.24) (Ping timeout: 272 seconds)
14:22:52 × wonko quits (~wjc@user/wonko) (Remote host closed the connection)
14:23:00 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 240 seconds)
14:23:10 wonko joins (~wjc@user/wonko)
14:23:30 xkuru joins (~xkuru@user/xkuru)
14:23:48 <dminuoso> Since `Ex f a ~~~ f a`, that function `(f a -> g a) -> (Ex f a) -> (Ex g a)` is isomorphic to `(f a -> g a) -> f a -> g a`
14:23:53 × wonko quits (~wjc@user/wonko) (Remote host closed the connection)
14:24:04 <dminuoso> So it's just something isomorphic to `id`
14:24:30 Alex_test joins (~al_test@94.233.240.208)
14:24:36 × Alex_test quits (~al_test@94.233.240.208) (Client Quit)
14:24:43 wonko joins (~wjc@user/wonko)
14:25:07 Everything parts (~Everythin@37.115.210.35) ()
14:25:25 <alt-romes> dminuoso: interesting, but what if I had Ex s m a = Ex (s -> m a)
14:25:31 AlexZenon joins (~alzenon@94.233.240.208)
14:25:31 Alex_test joins (~al_test@94.233.240.208)
14:25:34 slack1256 joins (~slack1256@191.125.99.202)
14:25:51 AlexZenon_2 joins (~alzenon@94.233.240.208)
14:25:59 <alt-romes> should I settle for a hoistEx = ...
14:26:18 <dminuoso> alt-romes: And what type signature would you be looking for with that type?
14:26:23 <alt-romes> or is Ex a Hoistable ahaha
14:26:45 × AlexZenon_2 quits (~alzenon@94.233.240.208) (Client Quit)
14:27:08 <alt-romes> instance ___ Ex s where ____ :: (m a -> n a) -> Ex s m a -> Ex s n a
14:27:46 AlexNoo_ is now known as AlexNoo
14:27:51 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
14:28:48 <alt-romes> dminuoso: i'm doing things and I like abstractions, and was looking for a cool new shiny one
14:29:26 <alt-romes> this seemed like the kind of thing that might fit some theory
14:29:38 <dminuoso> So to make this "shiny" and more confusion, you can introduce `type f ~> g = forall a. f a -> g a`
14:29:50 <alt-romes> right, the Natural Transformation
14:29:57 × max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Ping timeout: 272 seconds)
14:30:01 <dminuoso> Right, but that changes your types slightly since we're moving a forall quantification in there
14:30:03 × jgeerds_ quits (~jgeerds@55d4b9df.access.ecotel.net) (Ping timeout: 252 seconds)
14:30:03 <dminuoso> So you have
14:30:16 <alt-romes> :: (forall a. m a -> n a) -> ...
14:30:25 <dminuoso> (m ~> n) -> Ex s m ~> Ex s n
14:30:29 <alt-romes> oh!
14:30:45 <dminuoso> Is that what you're after?
14:30:49 <alt-romes> yes!
14:31:20 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
14:31:39 <dminuoso> But yeah, I think the terms `hoist`, `lift` or `heave` come to mind.
14:31:58 <alt-romes> thank you
14:35:50 zmt01 joins (~zmt00@user/zmt00)
14:35:50 × alt-romes quits (~romes@44.190.189.46.rev.vodafone.pt) (Quit: WeeChat 3.4)
14:36:10 romesrf joins (~romes@44.190.189.46.rev.vodafone.pt)
14:37:00 × meinside quits (uid24933@id-24933.helmsley.irccloud.com) (Ping timeout: 240 seconds)
14:37:24 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:5b51:ad88:49b8:7439) (Ping timeout: 240 seconds)
14:37:40 lortabac joins (~lortabac@2a01:e0a:541:b8f0:5b51:ad88:49b8:7439)
14:37:45 gaff joins (~gaff@49.207.229.178)
14:37:48 × Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 240 seconds)
14:38:12 × unyu quits (~pyon@user/pyon) (Ping timeout: 240 seconds)
14:38:12 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Ping timeout: 240 seconds)
14:38:12 × TonyStone quits (~TonyStone@2603-7080-8607-c36a-3d94-4d23-dc7c-c228.res6.spectrum.com) (Ping timeout: 240 seconds)
14:38:12 × lottaquestions quits (~nick@2607:fa49:5041:a200:b555:2e8f:fe4f:2e3d) (Ping timeout: 240 seconds)
14:38:12 × emergence quits (emergence@2607:5300:60:5910:dcad:beff:feef:5bc) (Ping timeout: 240 seconds)
14:38:12 × Unhammer quits (~Unhammer@user/unhammer) (Ping timeout: 240 seconds)
14:38:16 Pickchea joins (~private@user/pickchea)
14:38:28 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f)
14:38:29 lottaquestions joins (~nick@2607:fa49:5041:a200:c52d:7d43:3699:c92e)
14:38:32 Unhammer joins (~Unhammer@user/unhammer)
14:38:36 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds)
14:39:58 meinside joins (uid24933@id-24933.helmsley.irccloud.com)
14:40:29 unyu joins (~pyon@user/pyon)
14:41:44 shriekingnoise joins (~shrieking@201.231.16.156)
14:42:07 <romesrf> made a `hoistBot` and am happy about it
14:42:35 <gaff> this quickcheck code "gives up" if one of the functions f1 or f2 return `Nothing`: forAll (arbitrary :: Gen String) $ \x -> do; x1 :: String <- f1 x :: Maybe String; x2 :: String <- f2 x :: Maybe String; return $ x1 === x2. any idea why?
14:42:41 <janus> romesrf: what does it do?
14:43:01 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f) (Ping timeout: 250 seconds)
14:43:19 emergence joins (emergence@2607:5300:60:5910:dcad:beff:feef:5bc)
14:44:17 <slack1256> gaff: Can you paste on pastebin?
14:44:24 <gaff> ok
14:44:25 <janus> gaff: shouldn't the do block be in the Gen monad? looks like it is in Maybe?
14:44:34 <geekosaur> isn't that expected fro,m the Maybe monad?
14:44:39 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
14:44:45 <romesrf> janus: oh just what we were discussing previously, i have a Bot m s i o = Bot (i -> s -> m o) and hoistBot :: (forall a. f a -> g a) -> Bot f s i o -> Bot g s i o
14:45:08 <gaff> janus: Testable (Maybe Bool) works
14:45:38 <gaff> geekosaur: why does it "give up" instead of just failing?
14:45:56 <geekosaur> it *is* failing. but "giving up" is the definition of `fail` in Maybe
14:46:07 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
14:46:13 <geekosaur> @src Maybe fail
14:46:13 <lambdabot> fail _ = Nothing
14:46:40 <geekosaur> so the whole do block produces Nothing at that point instead of continuing
14:46:47 <gaff> yes, but quickcheck seems to give up generating test cases
14:47:06 <gaff> soh i see
14:48:03 × chenqisu1 quits (~chenqisu1@183.217.200.249) (Remote host closed the connection)
14:48:15 <gaff> geekosaur: i thought quickcheck "gave up" when it can not find enough test cases that staisy some condition when you use `===>`
14:49:01 <gaff> which is why i am surprised to see it here in this code which does not use implication
14:49:01 <geekosaur> in this case you're short-circuiting it because you inadvertently put it "under" Maybe
14:49:10 <gaff> ah i see
14:49:33 <gaff> thank you
14:49:40 <dminuoso> romesrf: For reference, in servant you have: hoistServer :: HasServer api '[] => Proxy api -> (forall x . m x -> n x) -> ServerT api m -> ServerT api n
14:49:56 <dminuoso> Which is quite similar to what you're doing
14:50:00 <romesrf> dminuoso: yeah, ironicaly i was using it too hahaha
14:50:37 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Ping timeout: 240 seconds)
14:50:48 TonyStone joins (~TonyStone@2603-7080-8607-c36a-4424-fc06-167e-bc32.res6.spectrum.com)
14:51:46 <gaff> geekosaur: so this code i have pasted is just fine ... i just have to interpret quickcheck "gave up" as a fail.
14:52:10 Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius)
14:52:12 <dminuoso> romesrf: The quantification is very useful by the way, because it ensures whatever you're passing to it is an actual natural transformation (this results from a free theorem)
14:52:16 Guest|20 joins (~Guest|20@dynamic-185-082-205-148.glattnet.ch)
14:52:18 <geekosaur> or rearrange the types so that only that particular test "gives up"
14:52:25 <romesrf> :)
14:52:30 <dminuoso> Otherwise the argument can do funky stuff
14:52:34 <geekosaur> or even that oit just treats Nothing as a normal value
14:52:40 <romesrf> dminuoso: I've actually just run against it
14:52:41 × Guest|20 quits (~Guest|20@dynamic-185-082-205-148.glattnet.ch) (Client Quit)
14:52:56 <romesrf> and was wondering what would be the name for the same thing without quantification
14:53:05 <romesrf> because it would also be useful
14:53:25 <gaff> rearrange the types?
14:53:36 <dminuoso> Without it it would be just some elaborate form of ($)
14:53:49 <romesrf> ic :)
14:53:58 <dminuoso> Or well, I guess that's already the case mmm
14:54:21 <dminuoso> romesrf: The key difference is that you can infer less knowledge from what its use does.
14:54:46 <romesrf> right, but without the natural transformation i can't call it hoist :)
14:54:51 <dminuoso> So `hoistServer` by interface guarantees that the argument only modifies the monad, but not the result
14:54:52 <romesrf> naming things is hard ™
14:54:54 <dminuoso> It cant because its universally quantified
14:55:09 <romesrf> right, and that's pretty cool
14:55:19 <dminuoso> When you see its use, you immediately know about what this can do, what it cant.
14:56:11 <dminuoso> If you lack the quantification, then its just some "unwrapping/wrapping/rewrapping" thing that can do anything
14:56:12 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
14:56:44 <dminuoso> You could think of it as equivalent as just handing someone the constructor to pattern match, mess with its internals, and rebuild
14:56:50 asdfsfdasdfw joins (~asdfsfdas@12.182.213.210)
14:56:55 <romesrf> yea, that seems like it
14:57:14 asdfsfdasdfw parts (~asdfsfdas@12.182.213.210) ()
14:57:19 × dextaa_ quits (~dextaa@user/dextaa) (Remote host closed the connection)
14:58:52 × Merfont quits (~Kaiepi@156.34.47.253) (Remote host closed the connection)
14:58:59 Kaipi joins (~Kaiepi@156.34.47.253)
15:01:26 × gaff quits (~gaff@49.207.229.178) ()
15:01:37 × Pickchea quits (~private@user/pickchea) (Ping timeout: 272 seconds)
15:02:24 dextaa_ joins (~dextaa@user/dextaa)
15:07:21 o-90 joins (~o-90@gateway/tor-sasl/o-90)
15:08:00 × wonko quits (~wjc@user/wonko) (Ping timeout: 252 seconds)
15:09:25 <slack1256> Is there a package with a data structure for "buffer with at most 10 (or n) elements"?
15:09:42 <slack1256> I know I could do this with n-tuples. Yet I want the wrapping/cycling semantics.
15:10:30 <dminuoso> slack1256: Does it need to be generic over an arbitrary data type?
15:11:07 <dminuoso> Or is an effective restriction on say Storable or Unbox reasonable?
15:12:45 <pavonia> https://hackage.haskell.org/package/ring-buffers has different types
15:13:21 <dminuoso> Ah that's neat
15:15:54 max22- joins (~maxime@2a01cb0883359800c7c4fab2785758f5.ipv6.abo.wanadoo.fr)
15:16:54 waleee joins (~waleee@h-98-128-229-110.NA.cust.bahnhof.se)
15:19:07 vektor joins (~vektor@IP-094046083008.dynamic.medianet-world.de)
15:19:13 <geekosaur> there's also a modified Chan somewhere
15:19:56 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
15:21:07 <geekosaur> @hackage stm-chans
15:21:07 <lambdabot> https://hackage.haskell.org/package/stm-chans
15:23:54 <slack1256> dminuoso: If it holds ~Ints~ then I am good. Yet pavonia posted "ring-buffers" which seems to do what I want.
15:24:04 <slack1256> Thanks guys!
15:24:37 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Ping timeout: 240 seconds)
15:25:56 × o-90 quits (~o-90@gateway/tor-sasl/o-90) (Ping timeout: 240 seconds)
15:28:17 Guest|7 joins (~Guest|7@31.134.188.207)
15:28:25 × Guest|7 quits (~Guest|7@31.134.188.207) (Client Quit)
15:29:25 <slack1256> What packages do you guys use for "auth/secret management" on google cloud? There is a bunch on hackage at different stages of development.
15:32:45 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
15:32:45 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
15:32:45 wroathe joins (~wroathe@user/wroathe)
15:34:52 <slack1256> Oh base package "gogol" has it. nvm!
15:36:00 × thyriaen quits (~thyriaen@simnet-nat-pool-185-130-54-167.stargrpns.pp.ua) (Quit: Leaving)
15:37:24 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
15:40:06 CiaoSen joins (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
15:40:13 × rusrushal13 quits (~rusrushal@103.85.18.34) (Quit: Client closed)
15:42:22 × kritzefitz quits (~kritzefit@debian/kritzefitz) (Remote host closed the connection)
15:42:57 × aehu6ce8 quits (~aehu6ce8@31.187.110.131) (Quit: aehu6ce8)
15:45:10 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
15:45:51 × neurocyte0917090 quits (~neurocyte@user/neurocyte) (Ping timeout: 250 seconds)
15:45:53 kritzefitz_ joins (~kritzefit@debian/kritzefitz)
15:46:36 k`` joins (~user@152.1.137.158)
15:47:41 <k``> As a rule of thumb, should handwritten `Ord` instances be strict to match derived instances? Or should they be as lazy as possible in the second parameter?
15:53:48 kritzefitz_ is now known as kritzefitz
15:53:56 <merijn> I don't think there's any real rules/expectations
15:55:08 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
15:55:20 zebrag joins (~chris@user/zebrag)
15:55:26 Pickchea joins (~private@user/pickchea)
15:55:44 <geekosaur> but as it's hard to compare two values without forcing both, I don't see what "as lazy as possible" can get you
15:56:18 <geekosaur> suppose you could force only part of it in some cases
15:57:44 lbseale joins (~ep1ctetus@user/ep1ctetus)
15:57:55 <k``> Or for enumerations you can always check whether the first argument is `minBound` (or `maxBound`, depending on the comparison). `compare` is always going to be at least partially strict in any not trivial type.
15:58:19 <vektor> Anyone familiar with works along the line of stephen diehl's Write You A Haskell? It covers many things I'm interested in, but leaves some questions open for me.
15:58:45 <[exa]> vektor: likely. don't ask to ask. :]
15:59:11 <geekosaur> sounded to me like they were asking *for* other such works
15:59:22 <vektor> Indeed. I don't think that was a meta question.
15:59:48 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Ping timeout: 240 seconds)
15:59:55 <[exa]> ah ok, I thought you have something specific in mind
16:00:00 zincy_ joins (~zincy@2a00:23c8:970c:4801:39f9:90f7:922:e73b)
16:01:11 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:5b51:ad88:49b8:7439) (Quit: WeeChat 2.8)
16:01:45 neurocyte0917090 joins (~neurocyte@IP-185117069029.dynamic.medianet-world.de)
16:01:45 × neurocyte0917090 quits (~neurocyte@IP-185117069029.dynamic.medianet-world.de) (Changing host)
16:01:45 neurocyte0917090 joins (~neurocyte@user/neurocyte)
16:01:48 <maerwald> k``: the caller can force the values themselves before passing them to compare, but they can't "add laziness"
16:01:51 <vektor> Yesno. I'd like to have another look at the topic of WYAH from another perspective generally. The thing that's currently bugging me specifically is quite deep in the woods of HM inference, but I'm not sure picking up a book on that topic will do me much good.
16:02:53 <maerwald> you can basically just provide a `compareStrict` function
16:03:27 <[exa]> vektor: HM-style inference is a quite general topic, TypingHaskellInHaskell is a pretty good reading material, and there's SPJ's youtube video from zurihac with an explanation of what is _actually_ happening there nowadays
16:05:07 <vektor> Ohhh, that sounds promising. I'm sure they're not going to answer my research question for me, but will hopefully get me closer. Thanks!
16:05:12 Sgeo joins (~Sgeo@user/sgeo)
16:05:18 <[exa]> vektor: perhaps try defining "deep in the woods"
16:06:09 <geekosaur> that might be difficult if they're still kinda weak on H-M
16:06:48 × dextaa_ quits (~dextaa@user/dextaa) (Quit: The Lounge - https://thelounge.chat)
16:06:57 <geekosaur> but unless you know Prolog THIH is probably the place to start
16:07:04 <[exa]> honestly I wasn't able to fully grasp the wiki page on H-M before actually crunching through THIH
16:07:43 <k``> maerwald: In this case I can either compare both parameters strictly and cheaply, or perform two comparisons to possibly short-circuit on the 1st parameter. I'm wondering whether the ability to short-circuit is worth baking in for the tiny added cost, or if the expectation is that comparisons will be strict and nothing that use `Ord` will benefit.
16:07:59 <[exa]> true about Prolog though. :]
16:08:12 <vektor> Well, if you must know: I've got me a language that is quite a bit like haskell superficially, but with way different semantics. Those semantics are only really valid in some cases. The boundary of that validity looks an awful lot like typing rules to me. The thing I'm not sure about is whether what Stephen Diehl describes as "Milner’s
16:08:13 <vektor> observation was that since the typing rules map uniquely onto syntax, we can in effect run the
16:08:13 <vektor> typing rules “backwards”" - whether that assumption of HM holds for my semantics.
16:08:28 <vektor> I know a few bits about prolog, how can that help?
16:08:45 <geekosaur> because H-M is something like 10 lines of Prolog
16:08:53 <vektor> Oh wow. Hit me.
16:08:54 <geekosaur> concise and elegant
16:09:24 <[exa]> and with some care, you can run it in reverse there too. :]
16:10:15 × coot quits (~coot@213.134.190.95) (Quit: coot)
16:10:15 <geekosaur> https://wiki.haskell.org/BayHac2014/Prolog see also https://www.youtube.com/playlist?list=PLrsRTzxpFRaxw8-ioimlFmgJsOLf9kJmB
16:10:23 <merijn> vektor: Has someone already made the obligatory TaPL comment?
16:10:58 <geekosaur> waitr that's Haskell. the YT one should have the Prolog version
16:11:02 <vektor> merijn Nope, what's that?
16:13:34 <merijn> @where tapl
16:13:34 <lambdabot> "Types and Programming Languages" by Benjamin C. Pierce in 2002-02-01 at <https://www.cis.upenn.edu/~bcpierce/tapl/>
16:13:53 <merijn> vektor: The de facto standard book on type theory and how to implement your own stuff
16:14:16 burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk)
16:14:21 × burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Remote host closed the connection)
16:14:28 burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk)
16:14:35 <merijn> I would consider it a mandatory read if you are trying to implement any form of type system that isn't absolutely trivial
16:14:44 <vektor> Ohhh, I actually stumbled upon that myself. Sadly the Uni library doesn't have it, it seems.
16:14:50 <merijn> (maybe not the whole book, but certainly, like, the first half)
16:14:51 × burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Remote host closed the connection)
16:15:30 burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk)
16:16:01 <vektor> Dang. Considering this whole type system is more of a side show, I'll have to see if I can dedicate as much time to it as you imply is required.
16:16:22 gaff joins (~gaff@49.207.229.178)
16:18:25 <merijn> The amount of time depends on how fancy you wanna be
16:18:35 <merijn> And how much you already know/understand
16:18:46 <merijn> The first chapters you can just breeze through in a weekend
16:20:08 <vektor> Not at all fancy. It's a research project. I understand, well, more or less a haskell user's understanding + some WYAH. I don't need much polymorphism or recursive types or stuff like that though, so that should help.
16:20:10 <[exa]> vektor: one nice exercise with random new type systems&languages is to see whether you can prove some "good" properties about them, such as existence of principial types, decidability of inference and type inhabitation problems, some kind of soundness, etc.
16:20:34 <merijn> vektor: Recursive types is where it gets really hairy, yeah
16:20:45 <merijn> the bits before that are fairly easy
16:21:49 <vektor> @[e
16:21:49 <lambdabot> Maybe you meant: wn v rc pl let id do bf @ ? .
16:22:00 <vektor> oops
16:22:52 <vektor> [exa] , I see. Honestly, I'm not even sure how to ask these questions right now, let alone answer them. I suppose if I want to do this, I'll have to read some more. :D
16:24:01 <vektor> For anyone interested who's just reading, the zurihac video is unlisted: https://www.youtube.com/watch?v=x3evzO8O9e8
16:27:15 bahamas joins (~lucian@84.232.140.52)
16:27:48 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
16:28:27 <k``> Seems like a decent argument for making comparisons strict is so that `maxBound >= overflowError` is not `True`.
16:28:30 × mbuf quits (~Shakthi@122.162.72.100) (Quit: Leaving)
16:29:52 × zincy_ quits (~zincy@2a00:23c8:970c:4801:39f9:90f7:922:e73b) (Remote host closed the connection)
16:30:46 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer)
16:32:59 × CiaoSen quits (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Quit: CiaoSen)
16:34:07 wonko joins (~wjc@user/wonko)
16:36:03 CiaoSen joins (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
16:37:36 × alMalsamo quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
16:39:56 alMalsamo joins (~alMalsamo@gateway/tor-sasl/almalsamo)
16:40:04 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:44:12 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
16:47:53 <vektor> [exa], looking at SPJ's talk for 15 minutes, he explains principal types and uniqueness of substitutions. I think this might be a challenge for my semantics.
16:50:11 lavaman joins (~lavaman@98.38.249.169)
16:51:00 × lavaman quits (~lavaman@98.38.249.169) (Read error: Connection reset by peer)
16:51:00 awschnap joins (~lavaman@98.38.249.169)
16:51:14 zincy_ joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com)
16:51:26 <jackson99> should I be using Network.HTTP.Conduit for downloading html files? and can it automatically follow redirects?
16:52:11 × zincy_ quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection)
16:52:55 <janus> jackson99: you could use curl/wget like ghcup: https://github.com/haskell/ghcup-hs/blob/c2a8d39fb423be7ed998f9169c57db87fa1e1cf8/lib/GHCup/Download.hs
16:53:17 <janus> then you won't be depending on foundation/memory/cryptonite
16:53:56 <maerwald> jackson99: those libraries depend on haskell-tls, which is a non-audited crypto implementation in a garbage collected language
16:53:57 × awschnap quits (~lavaman@98.38.249.169) (Read error: Connection reset by peer)
16:54:06 lavaman joins (~lavaman@98.38.249.169)
16:54:10 <jackson99> by fundation you mean Haskell Foundation? why is it problematic to depend on their libraries?
16:54:31 <maerwald> no, foundation is a library
16:55:51 <janus> jackson99: https://github.com/haskell-foundation
16:56:24 <maerwald> there is https://hackage.haskell.org/package/http-client-openssl but no http-conduit that depends on it... you could write one though
16:56:55 × acidjnk quits (~acidjnk@p200300d0c71d3b97a07e6bc3219efcf6.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
16:57:08 gdown joins (~gavin@h69-11-150-165.kndrid.broadband.dynamic.tds.net)
16:57:34 <maerwald> if you don't need very precise error handling, shelling out to curl is the gold standard (cabal does that too)
16:57:51 <maerwald> and works with esoteric proxy configurations
16:58:18 <jackson99> hmm ok. I didn't know Network.HTTP.Conduit was considered problematic. I'm still not sure why that is the case
16:59:15 <jackson99> I don't care about cryptography, I am just scraping a website :P
16:59:41 <maerwald> then you can use whatever you want I guess
16:59:44 <jackson99> FWIW simpleHttp is supposed to follow 10 redirects, but for some reason, that isn't working
16:59:44 <vektor> jackson99, I believe it boils down to "don't roll your own crypto"-ish. Basically, the guys who built that library built their own crypto. Don't depend on that crypto to do anything sensible, because no one's checked.
16:59:54 <vektor> But for scraping, that should be fine.
17:00:34 <vektor> @maerwald - I believe that's basically what you meant, right?
17:00:34 <lambdabot> Unknown command, try @list
17:00:45 <maerwald> yeah
17:01:04 <maerwald> and that no one knows whether Haskell is even a good language for crypto
17:02:04 <vektor> I've found it quite useful for some light cryptoanalysis. ;) I haven't done any cryptography in it though, and I can understand the doubts.
17:02:04 yauhsien_ joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
17:02:44 Null_A joins (~null_a@c-98-210-133-39.hsd1.ca.comcast.net)
17:06:01 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:06:16 lavaman joins (~lavaman@98.38.249.169)
17:06:24 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:06:39 lavaman joins (~lavaman@98.38.249.169)
17:06:46 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:07:01 lavaman joins (~lavaman@98.38.249.169)
17:07:09 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:07:21 × yauhsien_ quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
17:07:23 lavaman joins (~lavaman@98.38.249.169)
17:07:30 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
17:07:40 ChanServ sets mode +o litharge
17:07:41 litharge sets mode +b *!*@98.38.249.169
17:07:51 litharge sets mode -o litharge
17:09:05 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
17:12:29 cosimone joins (~user@93-47-229-224.ip115.fastwebnet.it)
17:12:51 × Pickchea quits (~private@user/pickchea) (Ping timeout: 252 seconds)
17:19:43 Akiva joins (~Akiva@user/Akiva)
17:21:36 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
17:22:12 × wonko quits (~wjc@user/wonko) (Ping timeout: 252 seconds)
17:22:36 × Alex_test quits (~al_test@94.233.240.208) (Ping timeout: 240 seconds)
17:22:49 perohig joins (~user@85.255.234.173)
17:22:50 × burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Remote host closed the connection)
17:23:00 × AlexNoo quits (~AlexNoo@94.233.240.208) (Ping timeout: 240 seconds)
17:23:17 burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk)
17:23:21 × AlexZenon quits (~alzenon@94.233.240.208) (Ping timeout: 250 seconds)
17:24:15 × perohig quits (~user@85.255.234.173) (Remote host closed the connection)
17:27:24 × burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Ping timeout: 240 seconds)
17:27:45 <dminuoso> 17:59:54 vektor | But for scraping, that should be fine.
17:28:21 <dminuoso> That depends entirely. The direction of dataflow is usually irrelevant, it's a matter of attack scenarios you conceive.
17:29:27 <dminuoso> In the sense of, do you worry about a) a third party breaking confidentialy of the dataflow, or b) breaking integrity (say manipulating values to either let you process incorrect data, or worse, inject intentionally malformed data to attack your client side components)
17:29:44 <vektor> Of course. Hence "should". There's some scenarios you could imagine. Generally, the scraped data might be malicious, but when scraping you usually don't trust the data you gather that much anyway; you treat it as data. Don't run javascript you scraped off stackoverflow.
17:29:47 × cosimone quits (~user@93-47-229-224.ip115.fastwebnet.it) (Quit: i really have to scratch my right butt cheek this time, sorry)
17:31:11 <dminuoso> For most TLS needs at least you can get by with just nginx at least. Say if you want to use `http-client-tls`, instead you can just use `http-client` against a locally running nginx offloading TLS to openssl or libressl.
17:32:22 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f)
17:32:27 <dminuoso> All our API authentication is offloaded onto `libsodium` which is just a thin FFI binding. For most needs I think there's simple and adequate solutions.
17:34:19 <dminuoso> I find it a bit bizarre that this package in particular has so few users.
17:35:05 <dminuoso> How do other folks verify credentials in public interfaces? Do they just do naive string comparisons? Rely on cryptonite? I dont know
17:35:24 × bahamas quits (~lucian@84.232.140.52) (Ping timeout: 240 seconds)
17:36:30 × alp quits (~alp@user/alp) (Ping timeout: 252 seconds)
17:36:56 zincy_ joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com)
17:37:41 ChanServ sets mode +o litharge
17:37:42 litharge sets mode -bo *!*@98.38.249.169 litharge
17:38:29 alp joins (~alp@user/alp)
17:38:44 merijn joins (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
17:38:55 × Null_A quits (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) (Remote host closed the connection)
17:40:42 <janus> dminuoso: we use happstack: https://hackage.haskell.org/package/happstack-server-7.7.1.2/docs/src/Happstack.Server.Auth.html#basicAuth
17:42:03 <janus> looks like it just uses naive string comparison :O
17:42:43 yauhsien_ joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
17:42:53 AlexZenon joins (~alzenon@94.233.240.208)
17:43:43 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
17:43:43 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
17:43:43 wroathe joins (~wroathe@user/wroathe)
17:45:15 <dminuoso> Uh yeah..
17:45:17 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
17:46:23 <janus> hackage uses md5 for hashing passwords, too :)
17:46:35 × gdown quits (~gavin@h69-11-150-165.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection)
17:47:33 × yauhsien_ quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Ping timeout: 272 seconds)
17:48:38 <shapr> Anyone using Haskell at work? I'm trying to popularize #haskell-in-depth as roughly #haskell-at-work
17:48:49 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 272 seconds)
17:48:50 cosimone joins (~user@93-47-229-224.ip115.fastwebnet.it)
17:48:51 <dminuoso> hackage is just dry-aged. people pay top dollar for this if its edible.
17:48:53 <dsal> I'm using Haskell at Work™
17:49:03 × cosimone quits (~user@93-47-229-224.ip115.fastwebnet.it) (Remote host closed the connection)
17:49:03 <dminuoso> shapr: Yes, we use haskell at work too.
17:49:20 <dminuoso> A fair chunk of our ISP core services run on it now. :)
17:49:24 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
17:49:34 <dsal> Lazy routers
17:49:40 <shapr> I've been asking about postgresql-simple and postgresql-query and etc in #haskell-in-depth
17:49:46 cosimone joins (~user@93-47-229-224.ip115.fastwebnet.it)
17:49:47 <shapr> general every day production stuff
17:49:53 <dsal> I didn't know about this.
17:49:59 <shapr> COME ON OVER!
17:49:59 <vektor> Does "I get paid to do the research I do, and I decided to write my code in haskell" count?
17:50:16 <shapr> vektor: if you have questions like "how do I talk to this db?" then yes
17:50:18 <dsal> I like postgresql-simple. Got to understand it pretty well at the last thing. New places uses persistent which I don't like very much, but don't dislike enough to fight about.
17:50:53 <shapr> I have srs complaints about persistent
17:50:55 <vektor> Oh F no. I had to work with DBs in python once and hated every second. I'm not touching a DB in haskell. :D
17:51:08 <sm> seems not the best name shapr... people go plenty deep here also
17:51:18 <shapr> sm: what would you suggest?
17:51:22 <dminuoso> vektor: I find it's quite comfortable with postgresql-simple
17:51:38 <dsal> shapr: we have the maintainer, so at least when something goes wrong, there's motivation to fix it. :)
17:51:43 <dminuoso> You just have to accept that SQL is a really nice, referentially transparent, pure language that is really well suited to its specific domain
17:51:59 <shapr> dsal: oh good!
17:52:31 <dsal> If I figure out a SQL query, I have to figure out how to write it in esqueleto so it compiles. This is one of those things where I think the *idea* makes sense, but I'd rather write tests.
17:54:16 × cosimone quits (~user@93-47-229-224.ip115.fastwebnet.it) (Remote host closed the connection)
17:54:31 <sm> also there's a book with that title. What about, hmm.. #haskell-production, #haskell-at-work, #haskell-practical, #haskell-real-world... ? Though I'm not sure how you'd distinguish it enough from here
17:54:33 <shapr> We have the squeal author at work, I like squeal very much, but the packages I work on are using postgresql-simple and postgresql-query
17:54:33 <dminuoso> dsal: I recently proposed an idea that we should perhaps solve at a hackathon
17:54:40 <dsal> The terrible place I was working with terrible people wanted to use persistent and I decided against it because I could do better without out. They really liked the migrations as almost the most important part, but the docs said not to use them in production. Place I'm at now uses persistent but has never used the migrations because that's just an insane idea.
17:54:48 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
17:55:02 <dminuoso> If we had an TH-time SQL parser that decodes into a relational algebra and fits it back into say opaleye or esqueleto, you could have the benefits of both worlds...
17:55:05 <dminuoso> Or so I hope at least
17:55:24 <dminuoso> That could be the missing link
17:55:49 <dsal> That's kind of similar to that one postgres lib that compiles queries in TH (or QQ) right?
17:55:51 <dminuoso> I dont think people really crave for esqueleto for the obscure type trickeries or absurd combinators - they just care for type system guarantees that everythign works out
17:56:22 <dsal> Right, it makes sense. I'm going to eventually have to understand it, I fear.
17:56:43 <dsal> I don't really have a desire to learn a language that is exactly the same as another language, but with different words.
17:57:02 × shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Read error: Connection reset by peer)
17:57:45 burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk)
17:58:11 <dminuoso> dsal: Ive not heard of that library, which one are you thinking of?
17:58:20 shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net)
17:58:50 <dsal> https://hackage.haskell.org/package/postgresql-typed
17:59:22 <dsal> It's a neat idea, until you need a postgres server running with the current schema in order for compilation to succeed.
17:59:24 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Ping timeout: 240 seconds)
18:01:42 <dminuoso> Ah it talks to the database at compile time?
18:01:48 × burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Ping timeout: 240 seconds)
18:01:55 <dsal> Yeah. It's a neat idea, for sure.
18:01:57 <dminuoso> No I'd be fine with it using schema information, that's a compromise I'd be willing to make.
18:02:02 vicfred joins (~vicfred@user/vicfred)
18:02:04 <dminuoso> But perhaps that library can be repurposed to that end
18:02:15 <dminuoso> Thanks! Ill bookmark this
18:02:29 <dminuoso> Ah but I have a theory how this works
18:02:46 <dminuoso> Im guessing it doesnt just get the schema, but rather interrogate postgresql about the resulting types of that query
18:03:20 <dsal> Yeah, that's what it implies in the docs. So it can verify if a value of a type that's passed in matches what can be coerced in the DB.
18:03:35 <dminuoso> The coercion rules are an interesting topic
18:04:15 <dminuoso> So if we did the type inference ourselves, we not only have to mimic all coercion rules that occur in the database, but there's some design decisions how that would work out with the Haskell type system
18:04:46 vicfred_ joins (~vicfred@user/vicfred)
18:05:18 alx741 joins (~alx741@181.199.42.143)
18:07:35 × vicfred quits (~vicfred@user/vicfred) (Ping timeout: 256 seconds)
18:07:53 × merijn quits (~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
18:09:05 × vicfred_ quits (~vicfred@user/vicfred) (Client Quit)
18:09:33 burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk)
18:09:49 × alx741 quits (~alx741@181.199.42.143) (Read error: Connection reset by peer)
18:11:32 × zeenk quits (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5) (Quit: Konversation terminated!)
18:14:27 × waleee quits (~waleee@h-98-128-229-110.NA.cust.bahnhof.se) (Ping timeout: 252 seconds)
18:15:34 econo joins (uid147250@user/econo)
18:18:35 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f) (Remote host closed the connection)
18:24:32 × chele quits (~chele@user/chele) (Remote host closed the connection)
18:26:48 alx741 joins (~alx741@157.100.197.240)
18:27:43 cfricke joins (~cfricke@user/cfricke)
18:29:51 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 252 seconds)
18:30:37 × alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer)
18:34:56 waleee joins (~waleee@h-98-128-229-110.NA.cust.bahnhof.se)
18:35:03 × gaff quits (~gaff@49.207.229.178) (Remote host closed the connection)
18:37:25 cosimone joins (~user@93-47-229-224.ip115.fastwebnet.it)
18:38:46 vysn joins (~vysn@user/vysn)
18:39:49 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f)
18:41:47 simendsjo joins (~user@84.211.91.241)
18:43:00 × cfricke quits (~cfricke@user/cfricke) (Ping timeout: 240 seconds)
18:45:49 × zaquest quits (~notzaques@5.130.79.72) (Read error: Connection reset by peer)
18:46:15 zaquest joins (~notzaques@5.130.79.72)
18:48:25 alx741 joins (~alx741@157.100.197.240)
18:48:39 <slack1256> On haskell-stack, the stack.yml can specify git repository. By default it downloads the whole repo, where something like `git clone --depth 1` sufice. Any way to instruct it to do that?
18:48:42 _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl)
18:50:05 <sm> don't know slack1256, but the manual will say
18:50:42 bahamas joins (~lucian@84.232.140.52)
18:51:44 <slack1256> Searched the manual, did not find it.
18:52:11 × CiaoSen quits (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
18:53:38 <dminuoso> janus: https://github.com/Happstack/happstack-server/pull/73
18:53:49 <dminuoso> Weird that Im fixing software I dont even use, but this just gives me allergies.
18:54:13 × MajorBiscuit quits (~MajorBisc@wlan-145-94-218-48.wlan.tudelft.nl) (Ping timeout: 240 seconds)
18:54:41 × alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer)
18:56:19 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Ping timeout: 256 seconds)
18:56:31 <sm> slack1256: not supported, then
18:57:22 <slack1256> ;_; ok
18:57:55 × simendsjo quits (~user@84.211.91.241) (Remote host closed the connection)
18:58:32 <janus> dminuoso: you do use it though, because hackage uses happstack ;)
18:58:43 gaff joins (~gaff@49.207.229.178)
18:58:52 <janus> dminuoso: thanks for the PR! let's see what stepcut says. but it may take a while
18:59:04 <dminuoso> Dont care, I've done my duty. :P
19:00:36 Alex_test joins (~al_test@94.233.240.208)
19:02:50 doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com)
19:03:36 × wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 240 seconds)
19:03:54 × cosimone quits (~user@93-47-229-224.ip115.fastwebnet.it) (Remote host closed the connection)
19:03:59 lavaman joins (~lavaman@98.38.249.169)
19:04:39 simendsjo joins (~user@84.211.91.241)
19:04:53 <EvanR> fire and forget pull request
19:05:05 <EvanR> the best
19:05:32 wyrd joins (~wyrd@gateway/tor-sasl/wyrd)
19:09:27 × max22- quits (~maxime@2a01cb0883359800c7c4fab2785758f5.ipv6.abo.wanadoo.fr) (Ping timeout: 252 seconds)
19:10:00 cynomys joins (~cynomys@user/cynomys)
19:10:36 × deadmarshal quits (~deadmarsh@95.38.231.90) (Ping timeout: 240 seconds)
19:12:59 alx741 joins (~alx741@157.100.197.240)
19:14:57 × finsternis quits (~X@23.226.237.192) (Ping timeout: 252 seconds)
19:15:53 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
19:15:54 emf joins (~emf@c-73-97-137-43.hsd1.wa.comcast.net)
19:16:09 × gaff quits (~gaff@49.207.229.178) (Ping timeout: 256 seconds)
19:17:31 notzmv joins (~zmv@user/notzmv)
19:18:19 Pickchea joins (~private@user/pickchea)
19:19:04 × alx741 quits (~alx741@157.100.197.240) (Read error: Connection reset by peer)
19:27:54 cosimone joins (~user@93-47-229-224.ip115.fastwebnet.it)
19:29:28 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
19:29:48 × vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
19:30:07 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Client Quit)
19:30:42 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
19:30:43 × romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Quit: WeeChat 3.4)
19:30:59 yauhsien_ joins (~yauhsien@61-231-32-166.dynamic-ip.hinet.net)
19:32:43 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Client Quit)
19:33:19 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
19:33:34 × c209e6dc-4d76-47 quits (~aditya@2601:249:4300:1296:195:dac6:592c:a55a) (Client Quit)
19:34:09 c209e6dc-4d76-47 joins (~aditya@2601:249:4300:1296:195:dac6:592c:a55a)
19:35:24 × yauhsien_ quits (~yauhsien@61-231-32-166.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
19:41:30 <sm> dminuoso++
19:41:35 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 250 seconds)
19:41:44 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
19:42:39 <geekosaur> slack1256, one reason it might not be supported is it complicates things if you decide to pin it to a different commit later
19:44:28 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
19:44:28 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
19:44:28 wroathe joins (~wroathe@user/wroathe)
19:44:29 ec joins (~ec@gateway/tor-sasl/ec)
19:44:32 Lord_of_Life_ is now known as Lord_of_Life
19:46:25 lavaman joins (~lavaman@98.38.249.169)
19:47:33 pgib joins (~textual@173.38.117.90)
19:48:17 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
19:48:40 ec joins (~ec@gateway/tor-sasl/ec)
19:48:59 max22- joins (~maxime@2a01cb088335980088882a515c4c342d.ipv6.abo.wanadoo.fr)
19:49:36 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
19:51:03 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds)
19:54:41 × emf quits (~emf@c-73-97-137-43.hsd1.wa.comcast.net) (Quit: emf)
19:55:15 coot joins (~coot@213.134.190.95)
19:56:23 × slack1256 quits (~slack1256@191.125.99.202) (Ping timeout: 256 seconds)
19:56:50 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
19:59:00 × bahamas quits (~lucian@84.232.140.52) (Ping timeout: 240 seconds)
20:02:43 × _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
20:02:50 × zincy_ quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection)
20:05:01 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 240 seconds)
20:06:47 juhp joins (~juhp@128.106.188.82)
20:07:58 pavonia joins (~user@user/siracusa)
20:08:07 × sander quits (~sander@user/sander) (Quit: So long! :))
20:15:43 bitmapper joins (uid464869@id-464869.lymington.irccloud.com)
20:16:23 <EvanR> pattern1, stack up a bunch of commands in a list (backwards), later reverse the list. pattern 2, stack up a bunch of DList appends, later flatten this to get a forward list. It's said 2nd one is more efficient, but is it really night and day?
20:16:31 <EvanR> having trouble seeing the quantum jump in performance
20:17:34 <EvanR> or is it a constant factor improvement
20:17:35 dextaa_ joins (~dextaa@user/dextaa)
20:18:21 <EvanR> how is the final application of DList not like reverse
20:18:48 <monochrom> Certainly the only difference is a constant factor. But I don't know why either one is faster.
20:19:08 <maerwald> why do I always understand 'filter' such that `filter (not . predicate)`?
20:19:10 <geekosaur> seems to me like they should be equivalent; it's trying to build the list "right side around" that would be slower than either, because it has to traverse the list each time
20:19:36 <EvanR> yeah that's bad
20:19:48 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Ping timeout: 240 seconds)
20:20:08 <monochrom> It could also be super-sensitive to what the compiler does. Even though we only have one compiler. :)
20:20:27 <geekosaur> my thought is it depends on how you use the list afterward
20:20:51 <EvanR> so DList is really better when you have a mixture of associativities, not when it's just a bunch of appends
20:22:11 <EvanR> or no one knows xD
20:22:33 <EvanR> maerwald, me too
20:22:35 <monochrom> It can be easily tested. But that still doesn't answer why. :)
20:23:49 <maerwald> EvanR: pretty annoying, because boolean bugs are nasty anyway... I could never trust myself to get this one right :D
20:24:03 <monochrom> Unless you just accept either "GHC super-optimizes list node allocation" or "GHC super-optimizes function composition" depending on the benchmark results.
20:24:40 <EvanR> GHC, optimize my code from O(n) to O(1)
20:25:08 <geekosaur> you joke. list fusion is more or less that
20:25:11 × machinedgod quits (~machinedg@24.105.81.50) (Remote host closed the connection)
20:25:19 <geekosaur> of course list fusion can itself be black magic
20:26:54 machinedgod joins (~machinedg@24.105.81.50)
20:27:07 <EvanR> maerwald, burn upon your brain the rewrite rule "filter" => "keep"
20:27:17 <EvanR> through all history
20:27:24 <monochrom> I basically did that.
20:27:36 <monochrom> I have long given up on "meaningful names".
20:28:24 <monochrom> My philosophy on names is mnemonics and hamming distance.
20:28:27 AlexNoo joins (~AlexNoo@94.233.240.208)
20:28:33 lavaman joins (~lavaman@98.38.249.169)
20:28:54 <monochrom> Mnemonics implies that insider jokes are OK. Yes.
20:28:57 <EvanR> since all math is made out of sets of nameless atoms, makes sense
20:29:13 <maerwald> EvanR: maybe it's a sign of negative thinking :p ...we don't keep stuff, we throw it away
20:29:32 <monochrom> Negative thinking is valuable too. :)
20:29:36 <maerwald> coding = deleting code
20:29:44 <geekosaur> just name everything f, g', h'''
20:29:48 <monochrom> filter your code >:)
20:30:00 <xerox> decoding = let in code
20:30:02 <EvanR> just juggling zillions of sets of • here
20:30:05 <monochrom> Ah that is why I added the hamming distance part. :)
20:30:55 <EvanR> when you start coding, you don't have a blank file, you have the set of all programs, and you do minus to narrow it down
20:31:15 <EvanR> which is why it usually doesn't work
20:31:44 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
20:32:03 <monochrom> Is that Schrödiger's cat programming? :)
20:32:19 × ubert1 quits (~Thunderbi@p200300ecdf0994b46944f41320f0055f.dip0.t-ipconnect.de) (Remote host closed the connection)
20:33:02 <EvanR> no... that would be limited to all programs whose norm is 1
20:33:23 <EvanR> which I guess might be better
20:33:23 × machinedgod quits (~machinedg@24.105.81.50) (Remote host closed the connection)
20:33:32 <EvanR> linear logic for all of you
20:34:20 machinedgod joins (~machinedg@24.105.81.50)
20:35:38 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
20:36:59 <monochrom> Every program can be renormalized to have norm 1. This is known as the Church-Feynman thesis.
20:37:17 <monochrom> Step 1. Read the code very carefully.
20:37:23 <monochrom> Step 2. Think very hard.
20:37:43 <monochrom> Step 3. Write down "the norm is 1".
20:37:44 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
20:37:57 deadmarshal joins (~deadmarsh@95.38.231.90)
20:38:12 × `2jt quits (~jtomas@130.red-88-22-46.staticip.rima-tde.net) (Ping timeout: 240 seconds)
20:38:33 × alp quits (~alp@user/alp) (Ping timeout: 252 seconds)
20:42:42 acidjnk joins (~acidjnk@p200300d0c7212778fd46ee7c5cdf4a6b.dip0.t-ipconnect.de)
20:42:59 × deadmarshal quits (~deadmarsh@95.38.231.90) (Ping timeout: 272 seconds)
20:43:34 Erutuon joins (~Erutuon@user/erutuon)
20:47:02 sander joins (~sander@user/sander)
20:47:49 zincy_ joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com)
20:48:39 finsternis joins (~X@23.226.237.192)
20:48:49 romesrf joins (~romes@44.190.189.46.rev.vodafone.pt)
20:49:57 × wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Ping timeout: 272 seconds)
20:50:35 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 272 seconds)
20:52:49 Erutuon joins (~Erutuon@user/erutuon)
20:54:41 × zincy_ quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection)
20:57:03 <jle`> hm, am i missing a thing that's simpler than liftA2 + sequence?
20:57:20 <jle`> (a -> b -> m c) -> f a -> f b -> m (f c)
20:58:19 emf joins (~emf@2620:10d:c090:400::5:dcea)
20:58:32 <[exa]> zipWithM ?
20:58:54 <monochrom> I think liftA2+sequence is right. traverse is liftA1+sequence. :)
20:59:11 <[exa]> also called `traverse2` in util
21:00:58 <[exa]> other than that, I'd say liftA2 + sequence is probably the way to go, at least until traverse2 gets to base :]
21:01:02 × vektor quits (~vektor@IP-094046083008.dynamic.medianet-world.de) (Quit: Client closed)
21:01:26 × AlexNoo quits (~AlexNoo@94.233.240.208) (Quit: Leaving)
21:02:18 AlexNoo joins (~AlexNoo@94.233.240.208)
21:04:48 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4)
21:05:58 <jle`> thanks :)
21:06:22 <jle`> i guess it happens non-often enough to not warrant having a name
21:07:43 <EvanR> Data.Aviary.Birds would disagree
21:08:00 <[exa]> O_o
21:10:27 <jackson99> is this expected behavior? it seems like a bug to me, or at least a very peculiar behavior
21:10:46 <jackson99> scrapHtmlWith (texts "span") "<body><span><span>test</span></span>"
21:10:53 <jackson99> Just ["test","test"]
21:11:14 <jackson99> this is scalpel package
21:11:44 <EvanR> you gotta ask where there are "really" two spans there or not
21:11:50 <EvanR> whether
21:12:04 <jackson99> there are. it took me a while to figure out what was going on
21:12:29 <juri_> hmm. is there a good way to have HSpec+QuickCheck generate lists for me of a given length? I've tried generating them in the 'Gen' monad in my property test, but when a test is falsified, hspec doesn't display the Gen'd list.
21:13:09 <[exa]> jackson99: sounds like it is documented ("possibly nested" note here: https://hackage.haskell.org/package/scalpel-0.6.1/docs/Text-HTML-Scalpel.html#v:htmls )
21:14:05 ub joins (~Thunderbi@193.32.127.226)
21:15:24 × ubert quits (~Thunderbi@p548c8cd6.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
21:15:24 ub is now known as ubert
21:15:40 zeenk joins (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5)
21:16:06 acidjnk_new joins (~acidjnk@p200300d0c721277849d4c4c73f702833.dip0.t-ipconnect.de)
21:17:10 × doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 272 seconds)
21:17:55 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
21:19:09 jakalx joins (~jakalx@base.jakalx.net)
21:19:10 <EvanR> iinm blaze uses something like DList to generate output. It's called blaze so it must be fast (ignoring the previous discussion of meaningless names)
21:19:31 × acidjnk quits (~acidjnk@p200300d0c7212778fd46ee7c5cdf4a6b.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
21:20:03 Guest82 joins (~Guest82@h-5-150-236-164.A980.priv.bahnhof.se)
21:20:07 <jackson99> I don't mind the nested behavior if elements are different, for example I like that it would get text from <span..><b>text</b></span>. but if the same element is nested multiple times, it does not seem useful to repeat same string multiple times
21:20:33 <jackson99> not sure how to handle this. plain nub doesn't work, strings are different
21:20:39 <[exa]> juri_: if you really need to generate lists of precise size, you might need to pass the size in the type parameter for Arbitrary. Other than that, you could generate non-empty lists of random size and use `take n $ repeat theList` as the value to be tested
21:20:51 <jackson99> recursively get into span element by element, and get text (not texts)?
21:24:38 <[exa]> juri_: re displaying, it normally uses the Show instance, right?
21:25:23 <juri_> [exa]: i think it uses show, but it only tries to display the arguments to the property test, not the results of using generators in the test.
21:30:53 <[exa]> hm, would you have a code sample?
21:31:07 ub joins (~Thunderbi@86.107.21.10)
21:31:48 × ubert quits (~Thunderbi@193.32.127.226) (Ping timeout: 240 seconds)
21:31:49 ub is now known as ubert
21:32:05 <juri_> https://github.com/Haskell-Things/HSlice/pull/61/files#diff-8bac62059346f8dc8b7487fd7cccc3d877486e58a6cd4621f1f595726e6f4850R641
21:33:00 <juri_> radians and dists in that function are generated. if that function is falsified, it will only display the two arguments, centerX and centerY.
21:33:44 w1n5t0n joins (~w1n5t0n@cpc83645-brig20-2-0-cust528.3-3.cable.virginm.net)
21:33:51 <[exa]> uuuh what line in that diff?
21:34:39 <juri_> 641?
21:35:03 <[exa]> none such there, you sure it's the right link?
21:35:05 <w1n5t0n> Hey all, is it possible to compile a stack project so that it can be loaded on GHCi (not Stack GHCi) on other computers running the same OS?
21:35:24 <w1n5t0n> I'm running a workshop on live coding music using a Haskell library, but I don't want to put participants through the process of having to build it on their machines
21:35:27 <juri_> generally any of the prop_ functions that are actually using the Gen monad show what i'm talking about tho. radians and dists are not shown, but the arguments to the function are.
21:35:56 <w1n5t0n> The library has to be loaded in a GHCi session, which is what we'll be using for the workshop
21:36:04 × fendor_ quits (~fendor@91.141.40.92.wireless.dyn.drei.com) (Remote host closed the connection)
21:36:05 <juri_> [exa]: it's a large diff. github breaks stuff. *sigh*
21:36:09 <[exa]> :(
21:36:40 <[exa]> juri_: link a file in a tree if you can, that's less breaky
21:38:59 <[exa]> w1n5t0n: if everything fails you may try packing it up in a docker
21:40:09 <juri_> https://github.com/Haskell-Things/HSlice/pull/61/commits/6a315af1568d15ff4b2829f97af2e6e0f602cfa8#diff-8bac62059346f8dc8b7487fd7cccc3d877486e58a6cd4621f1f595726e6f4850R649
21:40:25 <w1n5t0n> [exa] yeah I thought of that, but I'd like to avoid it if possible because it may complicate things with the realtime audio aspect of it
21:40:27 <juri_> hmm. at what point do github links get long enough to be spam... ;)
21:40:46 mikoto-chan joins (~mikoto-ch@213.177.151.239)
21:40:49 <w1n5t0n> To begin with I was just wondering if it's possible to take a bunch of .hi and .o files that have been compiled and load them to a GHCi session
21:43:13 <[exa]> juri_: uuh yes I see the problem. perhaps `label` could help to get the info out? https://hackage.haskell.org/package/QuickCheck-2.14.2/docs/Test-QuickCheck.html#v:label
21:44:45 <geekosaur> w1n5t0n, stack generally wants to keep tight control of those and in particular any libraries it needs will be hidden inside of stack
21:46:14 <w1n5t0n> geekosaur I get that stack keeps everything under wraps behind the scenes, but after running `stack build` I can locate and extract the .hi and .o files that were built. Assuming that they were built for the right OS/architecture, shouldn't they be loadable by a bare instance of GHCi?
21:46:21 <juri_> [exa]: but isn't this for reporting for successful cases? i just want things to show when i have a fail.
21:46:35 <[exa]> w1n5t0n: hm. perhaps "podman" (less isolation than docker) or the "singularity" containers would do?
21:46:54 <geekosaur> w1n5t0n, again, only if they don't have any dependencies
21:47:03 <sm> w1n5t0n: I think you'd be fighting the tools and it wouldn't be worth it. stack's raison d'etre is to ensure things like stack ghci are repeatable
21:47:13 <juri_> [exa]: maybe counterexample is more correct?
21:47:18 <jackson99> I am going insane trying to parse this. ^_^
21:47:30 <geekosaur> well, you could dig those out too but you'd have to re-package them to use them and build your own package database so ghc can find them
21:47:45 <geekosaur> major pain and almost certainly not worth it
21:48:28 <w1n5t0n> Yes I see what you mean, in my particular case there's also a dependency on an external C library so that would complicate things even more
21:48:37 <w1n5t0n> Ugh this is turning out to be a bigger problem than I thought it would
21:48:40 alp joins (~alp@user/alp)
21:48:42 <jackson99> scrapHtmlWith (texts "span") "<span class= \"one-click-content css-nnyc96 e1q3nk1v1\"><span class= \"luna-label italic\">Slang</span>.</span> <span class= \"one-click-content css-nnyc96 e1q3nk1v1\">to complain; gripe: <span class=\"luna-example italic\">They complained about the service, then about the bill.</span></span>"
21:48:44 <jackson99> Just ["Slang.","to complain; gripe: They complained about the service, then about the bill.","They complained about the service, then about the bill.","Slang"]
21:49:31 × ubert quits (~Thunderbi@86.107.21.10) (Quit: ubert)
21:49:38 <w1n5t0n> It's also tricky asking people to install Docker because, at least if they're on Windows, they may have to tinker with BIOS settings
21:49:45 <sm> w1n5t0n: would having them run in a cloud-based image be an option ? there are some tools like that
21:50:30 <[exa]> juri_: you can attach label only if it comes out false, right?
21:51:25 <w1n5t0n> sm the way the system works is that 1) emacs sends some code to GHCi as a string -> 2) GHCi runs that code and uses it to write some .wav files to disk -> 3) it then sends a message through UDP to another local process (SuperCollider) with the path of those files -> 4) it waits for a UDP response
21:52:06 <sm> cool but kind of the nightmare scenario for a just-works deployment to new users :)
21:52:14 <w1n5t0n> Exactly :(
21:52:25 <sm> I think a cloud image could work, it will require some fancy setup on your part though
21:52:38 <sm> there's something built in to vs code, but I'm not familiar
21:53:05 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e573:86f9:f0cd:7c1f) (Remote host closed the connection)
21:53:06 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
21:53:06 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
21:53:06 wroathe joins (~wroathe@user/wroathe)
21:53:17 <w1n5t0n> How could it work if the files that GHCi produces need to be availably locally and at minimum delay?
21:53:22 × burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Remote host closed the connection)
21:53:31 <w1n5t0n> i.e. downloading them every time wouldn't be an option
21:53:50 burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk)
21:54:00 <sm> hmm.. indeed you'd need the cloud image to send sound output to local machine somehow, which is an added wrinkle
21:54:26 <sm> I bet it's doable, but not simple
21:54:43 <sm> what can you assume about users' expertise / machines ?
21:54:48 <w1n5t0n> Would it be realistic to prepare a folder for each major OS that contains a GHCi binary, all the dependencies required, and a little boot script to set everything up and point GHCi to the right locations?
21:55:27 <[exa]> how long does it take for stack to build the thing?
21:55:49 <w1n5t0n> I need to assume they're complete beginners and may be running any of Windows, Mac, Linux
21:55:53 <sm> yes, I think that might be the best option. Perhaps prepared for each platform with github CI
21:56:04 <w1n5t0n> Not too long, but downloading everything required takes quite a while
21:56:31 <sm> or.. docker. Doesn't it work on windows yet ?
21:56:32 <w1n5t0n> And if I have 10+ people downloading it at the same time on the same wifi connection I can only assume it will take much longer
21:56:53 <[exa]> sm: the last time I checked, docker on windows just spawned linux VM in the background
21:57:10 <w1n5t0n> Docker may work but I think it'll take some significant setting up as well
21:57:16 <davean> w1n5t0n: Realtime streaming is low latency.
21:57:23 <sm> multipass is much more lightweight, might be an alternative (installs ubuntu vms, easy to use)
21:57:46 <[exa]> +1 ^
21:57:52 <juri_> [exa]: hmm. no idea how no do that. i'm now working with Property, but Expectation.
21:58:21 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 272 seconds)
21:58:59 × burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Ping timeout: 272 seconds)
21:59:43 <w1n5t0n> davean unfortunately not low enough for my purposes, there's a tight loop where every half a second or so a few tens of wav files need to be ready and loaded
21:59:52 × Flonk quits (~Flonk@vps-zap441517-1.zap-srv.com) (Quit: Ping timeout (120 seconds))
22:00:04 <w1n5t0n> I.e. it's not a case of streaming one audio file and playing it out the speakers
22:00:14 Flonk joins (~Flonk@vps-zap441517-1.zap-srv.com)
22:00:23 <w1n5t0n> sm thanks for the suggestion, looking at it now
22:00:33 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fd00:8e82:1c4b:4222)
22:00:34 <davean> Half a second is far longer than streaming
22:00:41 <davean> w1n5t0n: theres a reason you can stream FPS games
22:01:02 <davean> Streaming latency is often < 60ms
22:01:26 <sm> I think you want some kind of standard vm you can rely on, otherwise you'll be debugging weird failures on half the machines at the start of every class
22:01:38 <sm> vm/image
22:02:00 <davean> Why produce waves instead of feed it directly into the audio out buffer?
22:02:32 <w1n5t0n> davean this particular case is a bit more complex than video games, the resulting wavs don't hold audio that's meant to be played out the speakers but instead control signals that are meant to be indexed by SuperCollider's own synth engine
22:02:33 <jackson99> sorry for flooding the channel earlier. here's the issue I am having on paste. I am thinking about filtering every element that is subset of some other element, but that isn't ideal, and could give me incorrect string for some other html. hopefully there's a way to handle this in Scalpel. https://paste.tomsmeding.com/1vCO1ZjN
22:02:59 <davean> w1n5t0n: Ok, but it still produces an audio stream out
22:03:20 <davean> And unlike video games, its open loop, not closed
22:03:23 <davean> so I think its a LOT simpler
22:03:31 <w1n5t0n> SuperCollider does, yes, so in theory I could stream that output
22:03:48 × mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds)
22:04:02 <w1n5t0n> Unfortunately I don't personally know how to set any of that up in time for the workshop which is in 3 days
22:04:26 <[exa]> juri_: I guess you'd need to make a labeled version of the (-/>)
22:04:36 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fd00:8e82:1c4b:4222) (Ping timeout: 240 seconds)
22:04:53 <sm> ha, 3 days you say
22:05:01 × acidjnk_new quits (~acidjnk@p200300d0c721277849d4c4c73f702833.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
22:05:03 <[exa]> like, manually check the equality, label if false, finally run the `shouldNotBe`
22:05:40 <[exa]> w1n5t0n: ask everyone to install vmware or virtualbox or something and throw around a small ubuntu VM, that must work :D
22:06:55 <monochrom> Yikes, that's kinda last resort, it's much more stuff to download and much longer installation time...
22:06:56 <w1n5t0n> sm it seems that multipass needs to use VirtualBox on Windows 10 Home edition, in that case how is it different than using just VirtualBox straight?
22:07:16 <w1n5t0n> I could distribute the image around on a USB drive, hopefully that may speed things up
22:07:29 <sm> w1n5t0n: under the hood I have no idea, but the main thing it's an easy and standard install page for all three platforms
22:07:50 <w1n5t0n> My initial thinking was to get everyone to boot of a live USB running some Ubuntu or something, but I found out that macbooks don't allow that apparently
22:08:54 acidjnk joins (~acidjnk@p200300d0c724284749d4c4c73f702833.dip0.t-ipconnect.de)
22:09:28 <sm> if they all install that, you can be pretty sure to get them all running the same ubuntu environment. Now you can (quickest) write a standard bash setup script that will run in that, or (harder, saves build time for them) find out how to make and publish a custom image they can pull
22:10:18 <sm> with the 3 day deadline, I'd pursue the bash script first
22:11:11 <w1n5t0n> Yes that's probably what I'll do, my only concern is that I've heard it can be tricky to get realtime audio to work well inside VirtualBox VMs when on a Linux host
22:11:43 <w1n5t0n> So if that's a problem I might need to have them install and run SuperCollider locally and then get the VM to talk to that
22:12:04 <sm> yes, try it on your own machine, set up your app in the vm, make sure it plays sound. My experience with multipass makes me think it might just work
22:12:55 <w1n5t0n> It just finished installing so I'll try it now, thanks!
22:13:00 <sm> (I'm on a mac)
22:13:08 <sm> let us know how it goes
22:16:46 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Remote host closed the connection)
22:16:51 acidjnk_new joins (~acidjnk@pd9e0bb2f.dip0.t-ipconnect.de)
22:17:09 × acidjnk quits (~acidjnk@p200300d0c724284749d4c4c73f702833.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
22:17:58 burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk)
22:19:13 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fd00:8e82:1c4b:4222)
22:24:14 Null_A joins (~null_a@2601:645:8700:2290:890f:d3a0:aab0:f3f)
22:24:28 × Null_A quits (~null_a@2601:645:8700:2290:890f:d3a0:aab0:f3f) (Remote host closed the connection)
22:24:43 Null_A joins (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909)
22:25:25 × wolfshappen quits (~waff@irc.furworks.de) (Ping timeout: 256 seconds)
22:29:27 × Guest82 quits (~Guest82@h-5-150-236-164.A980.priv.bahnhof.se) (Quit: Client closed)
22:29:35 <juri_> [exa]: yuck, that means i'd need to use different ones in different situations. :/
22:30:39 BrokenClutch joins (~pioneer@2804:d41:c291:0:6129:66a9:49aa:83e7)
22:30:52 <BrokenClutch> I remembered my password!!!!!
22:31:03 <juri_> Oh no!
22:31:24 × w1n5t0n quits (~w1n5t0n@cpc83645-brig20-2-0-cust528.3-3.cable.virginm.net) (Ping timeout: 256 seconds)
22:31:27 <BrokenClutch> me back to ask dumb questions :D
22:33:42 <monochrom> You should write down your password and hide it in a framed photo.
22:34:36 <monochrom> (That was a plot device in a TV show I just watched. The person hid an important signed contract there decades ago, then forgot that it was hid there.)
22:34:46 <monochrom> err, was hidden! Damn English.
22:35:29 <davean> Why would you hide a signed contract? That seems weird.
22:36:11 <davean> contrived really
22:36:58 <monochrom> Haha I don't know. And the person didn't think in terms of hiding, he was actually thinking "this is a prominent place! I will never forget! It's the family portrait, right? RIGHT?"
22:37:49 × cosimone quits (~user@93-47-229-224.ip115.fastwebnet.it) (Remote host closed the connection)
22:38:51 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
22:41:40 <texasmynsted> There are many options... "https://github.com/psibi/shell-conduit" looks like what I am looking for but it says it is _experimental_. . .
22:42:22 vicfred joins (~vicfred@user/vicfred)
22:42:27 <texasmynsted> I want to replace some of my shell scripts with Haskell. I would like to take advantage of streams. I see things like Streamly...
22:43:46 <texasmynsted> What would you recommend? Shell conduit? Streamly and just find a way to work with the shell from it?
22:44:14 k8yun joins (~k8yun@user/k8yun)
22:44:37 <texasmynsted> Streamly has an example that seems to work with the shell -> https://github.com/composewell/streamly-examples/blob/master/examples/CoreUtils.hs
22:48:17 × emf quits (~emf@2620:10d:c090:400::5:dcea) (Ping timeout: 240 seconds)
22:48:44 <sm> texasmynsted: I'm quite fond of the Cmd system that's part of Shake. You have to build Shake to use it, but then you also have a dependency engine available for your scripts.
22:49:23 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:49:47 <sm> there's nothing as usable as https://github.com/CZ-NIC/pz AFAIK (someone should try to clone that I think)
22:53:56 <texasmynsted> I like shake for making build systems
22:54:18 × Ariakenom quits (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se) (Read error: Connection reset by peer)
22:54:27 <davean> I dislike making build systems
22:54:32 <texasmynsted> right.
22:54:56 <texasmynsted> I did not consider using shake to make _shell script_ replacements
22:54:58 emf joins (~emf@c-73-97-137-43.hsd1.wa.comcast.net)
22:55:11 <EvanR> build systems to build the build systems to ...
22:55:21 × michalz quits (~michalz@185.246.204.89) (Remote host closed the connection)
22:55:23 <texasmynsted> python in bash? No thank you.
22:55:54 <monochrom> Do you prefer making build systems? >:)
22:56:08 <monochrom> Err sorry! building make systems!
22:56:26 w1n5t0n joins (~w1n5t0n@cpc83645-brig20-2-0-cust528.3-3.cable.virginm.net)
22:56:31 thyriaen joins (~thyriaen@simnet-nat-pool-185-130-54-167.stargrpns.pp.ua)
22:57:23 <texasmynsted> I find in most cases existing build systems work find and are understandable by others.
22:57:33 <texasmynsted> s/find/fine/
22:57:50 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:59:02 × Null_A quits (~null_a@2601:645:8700:2290:a4fb:481a:7fa9:b909) (Remote host closed the connection)
22:59:32 <juri_> [exa]: well, i figgured out how to do what i needed, but it's ugly. I defined a newtype ListOfThree, and gave it an arbitrary instance of fmap ListOfThree $ vector 3
22:59:43 <juri_> [exa]: now i want to throw up a little.
22:59:53 <maerwald> texasmynsted: yes, I also think using less powerful build systems is generally better
22:59:59 × thyriaen quits (~thyriaen@simnet-nat-pool-185-130-54-167.stargrpns.pp.ua) (Client Quit)
23:00:50 <sm> my point was just that the shell scripting api in shake is quite nice and complete, having the build system available if you need it is a bonus (quite useful for some scripts, not at all for others)
23:01:33 <sm> nice, complete, and maintained
23:01:47 <texasmynsted> It is a nice solution/ good idea.
23:02:12 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
23:02:34 <sm> combine it with a stack script header and your script will run for others too
23:02:40 otherwise joins (~otherwise@2601:602:880:90f0:5c9b:1a43:72d3:910)
23:03:51 <sm> but... on first run, will take massively more time & space than a bash script...
23:04:12 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 272 seconds)
23:05:20 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
23:06:30 × alp quits (~alp@user/alp) (Ping timeout: 252 seconds)
23:06:56 <sm> (this sad fact, plus the awesome shellcheck, has made me ok with using bash quite often)
23:08:14 × w1n5t0n quits (~w1n5t0n@cpc83645-brig20-2-0-cust528.3-3.cable.virginm.net) (Ping timeout: 256 seconds)
23:10:00 × romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Quit: WeeChat 3.4)
23:10:54 × acidjnk_new quits (~acidjnk@pd9e0bb2f.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
23:11:54 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fd00:8e82:1c4b:4222) (Remote host closed the connection)
23:11:58 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
23:12:15 <texasmynsted> yes, I LOVE shellcheck
23:12:39 <koala_man> aww, I'm happy you find it useful!
23:13:03 acidjnk joins (~acidjnk@dynamic-046-114-170-094.46.114.pool.telefonica.de)
23:13:24 <texasmynsted> koala_man: Did you write it?
23:13:32 <koala_man> yes
23:15:01 × leah2 quits (~leah@vuxu.org) (Ping timeout: 240 seconds)
23:15:35 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Quit: taking a break. remember kids, sekai is better than kotonoha)
23:16:15 Null_A joins (~null_a@2601:645:8700:2290:890f:d3a0:aab0:f3f)
23:16:22 <sm> koala_man! thanks as always! you literally made shell scripting safe for humans
23:16:41 <texasmynsted> Wow! Well done! I use it and recommend it all the time!
23:17:18 × shapr quits (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection)
23:17:22 <maerwald> what started as a rainy weekend project quickly escalated :D
23:17:27 <maerwald> at least that's my guess
23:17:31 shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net)
23:17:54 <texasmynsted> On some repos I have a pre-commit script run and if the shell scripts fail shellcheck they can not be committed.
23:18:11 <maerwald> I still wish the parser was a separate package
23:18:28 <maerwald> there aren't many good (and performant) bash parser in haskell
23:19:02 × coot quits (~coot@213.134.190.95) (Quit: coot)
23:19:21 <maerwald> https://hackage.haskell.org/package/language-bash <- tried this once, performance wasn't good
23:20:03 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 272 seconds)
23:20:51 × Null_A quits (~null_a@2601:645:8700:2290:890f:d3a0:aab0:f3f) (Ping timeout: 250 seconds)
23:25:21 doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com)
23:27:20 leah2 joins (~leah@vuxu.org)
23:29:07 little_mac joins (~little_ma@2601:410:4300:3ce0:e156:8ff4:a2d2:fade)
23:29:20 <texasmynsted> Okay, one last thing about shellcheck... It has been a really nice learning tool. I have it running in vi and the "suggestions" have really improved my Bash skill.
23:30:59 <sm> absolutely. Makes you wonder if a similar UX could accelerate haskell learning
23:31:10 <koala_man> ShellCheck's parser is pretty inherently tied to the checking process with lookaheads for common bugs and such, and I'm glad I don't have to worry about breaking too many downstream users
23:32:39 <koala_man> haha isn't that just ghc's type checking?
23:33:09 <maerwald[m]> Nah, not even close
23:34:08 <maerwald[m]> Typechecker doesn't tell me when I broke laziness accidentally or broke streaming by keeping a reference
23:35:02 × edwardk quits (sid47016@haskell/developer/edwardk) (Ping timeout: 240 seconds)
23:35:17 <maerwald[m]> We have a lazy language, but very few tools to analyze it
23:35:21 × AndreasK quits (sid320732@id-320732.uxbridge.irccloud.com) (Ping timeout: 245 seconds)
23:35:21 × sa quits (sid1055@id-1055.tinside.irccloud.com) (Ping timeout: 250 seconds)
23:35:25 × awpr quits (uid446117@id-446117.lymington.irccloud.com) (Ping timeout: 240 seconds)
23:35:25 × nrr___ quits (sid20938@id-20938.lymington.irccloud.com) (Ping timeout: 240 seconds)
23:35:25 × integral quits (sid296274@user/integral) (Ping timeout: 240 seconds)
23:35:25 × astra quits (sid289983@user/amish) (Ping timeout: 240 seconds)
23:35:28 × zeenk quits (~zeenk@2a02:2f04:a30d:1300:51a3:bcfc:6cda:9fc5) (Quit: Konversation terminated!)
23:35:32 × elvishjerricco quits (sid237756@id-237756.helmsley.irccloud.com) (Ping timeout: 240 seconds)
23:35:32 × jmct_ quits (sid160793@id-160793.tinside.irccloud.com) (Ping timeout: 240 seconds)
23:35:38 × caasih quits (sid13241@id-13241.ilkley.irccloud.com) (Ping timeout: 260 seconds)
23:35:38 × jonrh quits (sid5185@id-5185.ilkley.irccloud.com) (Ping timeout: 260 seconds)
23:35:38 × grfn quits (sid449115@id-449115.helmsley.irccloud.com) (Ping timeout: 260 seconds)
23:35:40 × gonz_____ quits (sid304396@id-304396.lymington.irccloud.com) (Read error: Connection reset by peer)
23:35:40 × hamishmack_ quits (sid389057@id-389057.hampstead.irccloud.com) (Read error: Connection reset by peer)
23:35:40 × sooch_ quits (sid533113@id-533113.hampstead.irccloud.com) (Read error: Connection reset by peer)
23:35:40 × lexi-lambda quits (sid92601@id-92601.hampstead.irccloud.com) (Read error: Connection reset by peer)
23:35:40 × scav quits (sid309693@id-309693.helmsley.irccloud.com) (Read error: Connection reset by peer)
23:35:40 × dpratt__ quits (sid193493@id-193493.helmsley.irccloud.com) (Read error: Connection reset by peer)
23:35:40 × travv0 quits (sid293381@user/travv0) (Read error: Connection reset by peer)
23:35:41 × typetetris quits (sid275937@id-275937.tinside.irccloud.com) (Read error: Connection reset by peer)
23:35:41 × whez quits (sid470288@id-470288.lymington.irccloud.com) (Read error: Connection reset by peer)
23:35:41 × carter quits (sid14827@helmsley.irccloud.com) (Ping timeout: 256 seconds)
23:35:41 × hubvu_ quits (sid495858@tinside.irccloud.com) (Ping timeout: 256 seconds)
23:35:41 × lally quits (sid388228@id-388228.uxbridge.irccloud.com) (Read error: Connection reset by peer)
23:35:41 × davetapley quits (sid666@id-666.uxbridge.irccloud.com) (Read error: Connection reset by peer)
23:35:42 × rtpg quits (sid443069@id-443069.ilkley.irccloud.com) (Read error: Connection reset by peer)
23:35:42 × ysh quits (sid6017@id-6017.ilkley.irccloud.com) (Read error: Connection reset by peer)
23:35:42 × SethTisue quits (sid14912@id-14912.ilkley.irccloud.com) (Read error: Connection reset by peer)
23:35:42 × gmc quits (sid58314@id-58314.ilkley.irccloud.com) (Read error: Connection reset by peer)
23:35:42 × sa1 quits (sid7690@id-7690.ilkley.irccloud.com) (Read error: Connection reset by peer)
23:35:42 × supersven quits (sid501114@id-501114.ilkley.irccloud.com) (Read error: Connection reset by peer)
23:35:42 × ehamberg quits (sid18208@id-18208.hampstead.irccloud.com) (Read error: Connection reset by peer)
23:35:43 × dsal quits (sid13060@id-13060.lymington.irccloud.com) (Read error: Connection reset by peer)
23:35:45 × bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Read error: Connection reset by peer)
23:35:47 × SanchayanMaity quits (sid478177@id-478177.hampstead.irccloud.com) (Ping timeout: 250 seconds)
23:35:47 × T_S_ quits (sid501726@id-501726.uxbridge.irccloud.com) (Read error: Connection reset by peer)
23:35:48 jmct_ joins (sid160793@id-160793.tinside.irccloud.com)
23:35:49 × PotatoGim quits (sid99505@id-99505.lymington.irccloud.com) (Ping timeout: 240 seconds)
23:35:49 × hook54321 quits (sid149355@user/hook54321) (Ping timeout: 240 seconds)
23:35:50 AndreasK joins (sid320732@id-320732.uxbridge.irccloud.com)
23:35:50 awpr joins (uid446117@id-446117.lymington.irccloud.com)
23:35:51 SethTisue joins (sid14912@id-14912.ilkley.irccloud.com)
23:35:51 × jackdk quits (sid373013@cssa/jackdk) (Read error: Connection reset by peer)
23:35:51 × idnar quits (sid12240@debian/mithrandi) (Read error: Connection reset by peer)
23:35:52 davetapley joins (sid666@id-666.uxbridge.irccloud.com)
23:35:52 dsal joins (sid13060@id-13060.lymington.irccloud.com)
23:35:53 edwardk joins (sid47016@haskell/developer/edwardk)
23:35:53 ysh joins (sid6017@id-6017.ilkley.irccloud.com)
23:35:53 jonrh joins (sid5185@id-5185.ilkley.irccloud.com)
23:35:53 × taktoa[c] quits (sid282096@id-282096.tinside.irccloud.com) (Read error: Connection reset by peer)
23:35:53 × christiaanb quits (sid84827@id-84827.lymington.irccloud.com) (Read error: Connection reset by peer)
23:35:53 × aria quits (sid380617@lymington.irccloud.com) (Read error: Connection reset by peer)
23:35:54 hamishmack_ joins (sid389057@id-389057.hampstead.irccloud.com)
23:35:54 gonz_____ joins (sid304396@id-304396.lymington.irccloud.com)
23:35:55 bitmapper joins (uid464869@id-464869.lymington.irccloud.com)
23:35:55 × _0x47_ quits (sid508683@id-508683.tinside.irccloud.com) (Read error: Connection reset by peer)
23:35:56 × pepeiborra quits (sid443799@id-443799.ilkley.irccloud.com) (Read error: Connection reset by peer)
23:35:58 × rubin55 quits (sid175221@id-175221.hampstead.irccloud.com) (Read error: Connection reset by peer)
23:35:58 supersven joins (sid501114@id-501114.ilkley.irccloud.com)
23:35:59 × glowcoil_ quits (sid3405@id-3405.tinside.irccloud.com) (Read error: Connection reset by peer)
23:35:59 rtpg joins (sid443069@id-443069.ilkley.irccloud.com)
23:35:59 gmc joins (sid58314@id-58314.ilkley.irccloud.com)
23:36:00 × sunarch quits (uid526836@user/sunarch) (Read error: Connection reset by peer)
23:36:00 × bw quits (sid2730@user/betawaffle) (Read error: Connection reset by peer)
23:36:00 × tritlo quits (sid58727@user/tritlo) (Read error: Connection reset by peer)
23:36:00 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Read error: Connection reset by peer)
23:36:00 × mustafa quits (sid502723@rockylinux/releng/mustafa) (Read error: Connection reset by peer)
23:36:01 T_S_ joins (sid501726@id-501726.uxbridge.irccloud.com)
23:36:02 × caimeo quits (uid540603@id-540603.lymington.irccloud.com) (Read error: Connection reset by peer)
23:36:02 × Firedancer quits (sid336191@id-336191.hampstead.irccloud.com) (Read error: Connection reset by peer)
23:36:03 × jakesyl__ quits (sid56879@id-56879.hampstead.irccloud.com) (Read error: Connection reset by peer)
23:36:03 × gregberns__ quits (sid315709@id-315709.helmsley.irccloud.com) (Read error: Connection reset by peer)
23:36:07 idnar joins (sid12240@debian/mithrandi)
23:36:07 typetetris joins (sid275937@id-275937.tinside.irccloud.com)
23:36:13 gregberns__ joins (sid315709@id-315709.helmsley.irccloud.com)
23:36:14 sooch_ joins (sid533113@id-533113.hampstead.irccloud.com)
23:36:15 nrr___ joins (sid20938@id-20938.lymington.irccloud.com)
23:36:19 pepeiborra joins (sid443799@id-443799.ilkley.irccloud.com)
23:36:21 taktoa[c] joins (sid282096@id-282096.tinside.irccloud.com)
23:36:21 SanchayanMaity joins (sid478177@id-478177.hampstead.irccloud.com)
23:36:23 _0x47_ joins (sid508683@id-508683.tinside.irccloud.com)
23:36:26 caasih joins (sid13241@id-13241.ilkley.irccloud.com)
23:36:26 carter joins (sid14827@id-14827.helmsley.irccloud.com)
23:36:27 rubin55 joins (sid175221@id-175221.hampstead.irccloud.com)
23:36:27 caimeo joins (uid540603@id-540603.lymington.irccloud.com)
23:36:28 hubvu_ joins (sid495858@id-495858.tinside.irccloud.com)
23:36:31 whez joins (sid470288@2a03:5180:f:2::7:2d10)
23:36:31 ehamberg joins (sid18208@id-18208.hampstead.irccloud.com)
23:36:32 glowcoil_ joins (sid3405@2a03:5180:f::d4d)
23:36:36 lally joins (sid388228@id-388228.uxbridge.irccloud.com)
23:36:41 christiaanb joins (sid84827@id-84827.lymington.irccloud.com)
23:36:44 grfn joins (sid449115@2a03:5180:f:1::6:da5b)
23:36:44 sa1 joins (sid7690@2a03:5180:f:3::1e0a)
23:36:44 sunarch joins (sid526836@user/sunarch)
23:36:50 jackdk joins (sid373013@cssa/jackdk)
23:36:50 lexi-lambda joins (sid92601@id-92601.hampstead.irccloud.com)
23:36:50 aria joins (sid380617@2a03:5180:f:2::5:cec9)
23:36:51 travv0 joins (sid293381@user/travv0)
23:36:51 tritlo joins (sid58727@user/tritlo)
23:36:51 PotatoGim joins (sid99505@id-99505.lymington.irccloud.com)
23:36:53 elvishjerricco joins (sid237756@id-237756.helmsley.irccloud.com)
23:36:53 scav joins (sid309693@id-309693.helmsley.irccloud.com)
23:36:55 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
23:36:55 Firedancer joins (sid336191@id-336191.hampstead.irccloud.com)
23:36:59 dpratt__ joins (sid193493@2a03:5180:f:1::2:f3d5)
23:36:59 jakesyl__ joins (sid56879@2a03:5180:f:4::de2f)
23:37:06 mustafa joins (sid502723@rockylinux/releng/mustafa)
23:37:07 bw joins (sid2730@user/betawaffle)
23:37:08 astra joins (sid289983@2a03:5180:f:4::4:6cbf)
23:37:08 integral joins (sid296274@user/integral)
23:37:10 sa joins (sid1055@2a03:5180:f::41f)
23:37:40 × little_mac quits (~little_ma@2601:410:4300:3ce0:e156:8ff4:a2d2:fade) (Quit: Leaving)
23:37:55 little_mac joins (~little_ma@2601:410:4300:3ce0:e156:8ff4:a2d2:fade)
23:38:07 hook54321 joins (sid149355@user/hook54321)
23:39:01 <monochrom> C and shell have too many low hanging fruits, this is why a lint tool that merely looks for "if (n = 4)" and "printf("%s", 5)" pays off, and hlint feels so different even though (actually because) it is just picking on similar low hanging fruits.
23:39:09 <EvanR> on the bright side, we could be using javascript, whose type system doesn't tell you about performance or anything else
23:39:18 <monochrom> (i.e., lint feels profound whereas hlint feels superficial)
23:39:57 <monochrom> Yes laziness mistakes and eagerness mistakes are much wanted, unfortunately they mean crazy static analyses that linter writers can't do.
23:41:19 <monochrom> i.e., a C or shell linter can be just a pushdown automaton, a laziness and eagerness warner takes much more than that.
23:41:42 × acidjnk quits (~acidjnk@dynamic-046-114-170-094.46.114.pool.telefonica.de) (Ping timeout: 252 seconds)
23:43:16 <koala_man> there's always dynamic analysis
23:43:41 jgeerds joins (~jgeerds@55d4b9df.access.ecotel.net)
23:46:22 <koala_man> it's incredible what V8 can do with a language as optimization hostile as JS
23:47:02 × burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Remote host closed the connection)
23:47:48 × finsternis quits (~X@23.226.237.192) (Ping timeout: 240 seconds)
23:48:14 <sm> I guess hlint and hls' other plugins are doing the kind of thing for my haskell code that shellcheck is doing for bash. (Popping up useful warnings and hints as I edit.) Obviously it's a bigger, more multi-level task for Haskell
23:48:30 Null_A joins (~null_a@2601:645:8700:2290:890f:d3a0:aab0:f3f)
23:48:43 <monochrom> Here is a low hanging fruit though. GHC already does a good chunk of the crazy strictness analysis, not perfect but if it's good enough for code optimization it's very good. It records its finding in FC (aka core, but now I like the name FC more) and STG outputs. If you could just add code to bring that annotation back to source level and show in your editor...
23:49:24 <sm> they should take a leaf from shellcheck's book: name common errors and link to a wiki page
23:49:44 <Rembane> Is there enough information in FC to bring it back? Or have they thrown away all of that.
23:49:49 <sm> agreed, monochrom
23:49:54 <geekosaur> the AST has source annotations
23:49:55 <monochrom> It doesn't tell you whether your laziness decisions are right or wrong, but at least it tells you what GHC is seeing, and you can compare against what you expect.
23:50:17 <geekosaur> they may be complicated by inlining and rewrites, though
23:52:21 <sm> aside: https://hfpug.org/event/joey-hess-programming-ardinos-with-haskell-and-nasas-copilot starting in 1h
23:53:00 × Null_A quits (~null_a@2601:645:8700:2290:890f:d3a0:aab0:f3f) (Ping timeout: 240 seconds)
23:58:28 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fd00:8e82:1c4b:4222)
23:59:45 × otherwise quits (~otherwise@2601:602:880:90f0:5c9b:1a43:72d3:910) (Remote host closed the connection)

All times are in UTC on 2022-02-16.