Home liberachat/#haskell: Logs Calendar

Logs on 2022-10-01 (liberachat/#haskell)

00:00:01 vulpine is now known as ghoulpine
00:01:11 <geekosaur> no, TCP does that for you. you may be waiting a long time to receive a very large series of bytes, though
00:01:31 <geekosaur> retransmissions aren't instantaneous
00:05:07 <moonsheep> right, I don't need to receive many bytes anyway, just *exactly* however many I want
00:07:11 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds)
00:09:06 greuben joins (~greuben@user/greuben)
00:10:34 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
00:11:25 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
00:11:57 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
00:11:59 <geekosaur> recvBuf should work in that case, for TCP sockets. (UDP's another matter, as it won't combine two packets together to fill the buffer)
00:12:34 <geekosaur> this is why the socket type matters
00:16:12 <moonsheep> yeah don't worry, I'm using TCP
00:16:42 <moonsheep> why should I use recvBuf instead of the ByteString recv though?
00:16:47 <moonsheep> is there any advantage?
00:18:01 dr_merijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
00:20:24 <geekosaur> ByteString would be preferable because that's usually what you really want. Going through String for what is presumably binary data (since it's size delimited instead of e.g. line oriented) is dumb
00:20:41 jargon joins (~jargon@184.101.88.60)
00:20:45 <geekosaur> so ByteString and then `binary` to parse it
00:21:44 <geekosaur> (or attoparsec for complex packets)
00:22:42 <moonsheep> oh I'm using cereal
00:22:44 <moonsheep> is that a problem?
00:22:47 <geekosaur> `network` and its `recvBuf` predate wide use of ByteString
00:22:55 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 265 seconds)
00:23:19 <geekosaur> cereal's mostly obsolete since `binary` started supporting lazy ByteString, but if it's being kept up to date then go ahead
00:23:22 archsinner joins (~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com)
00:23:32 <moonsheep> oh I didn't know that
00:23:38 <moonsheep> I always used cereal as the default my whole life
00:23:42 <moonsheep> I guess the name's catchier
00:24:31 <moonsheep> btw, what's the best way to parse variable-length packets?
00:24:49 <moonsheep> use recv to get the first 4 bytes, decode them as an integer length, and recv as much as that?
00:27:04 <geekosaur> that's probably not optimal. recv in what chunks you can and queue them, then decode length, then decode data based on length. attoparsec is better than binary/cereal here because it can produce a partial parse if you need to wait for more data
00:27:38 <moonsheep> right, so I end up having to reassemble them manually anyway.
00:27:47 <moonsheep> I've always wondered if the stream abstraction was necessary for TCP
00:28:04 <moonsheep> why not still treat the connection as packets that arrive in order and without corruption?
00:28:05 <geekosaur> not really, the closest you get to that is telling attoparsec to resume a parse
00:28:20 <moonsheep> that always felt like a weird design decision for TCP honestly
00:28:35 <moonsheep> you nearly always end up concatting the packets in the stream anyway
00:28:47 <moonsheep> except for large file transfers I guess, that makes some sense
00:28:47 <geekosaur> which is what stream does
00:29:03 <geekosaur> so I'm not seeing your point
00:29:19 <moonsheep> well why treat the connection as a stream of bytes, as opposed to as a stream of packets?
00:29:34 <moonsheep> so you'd do send and recv in terms of packets, not bytes
00:29:41 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 265 seconds)
00:29:48 <moonsheep> you need to build that abstraction back on top of TCP anyway, right?
00:30:18 <geekosaur> no?
00:30:30 <geekosaur> most TCP protocols are line oriented, not packet
00:30:43 <moonsheep> well I guess fair enough
00:30:57 <moonsheep> maybe mine is the exception not the rule
00:31:23 <moonsheep> it's a chat, so I do have to separate messages as different units
00:31:25 <moonsheep> or "packets"
00:31:46 <geekosaur> the sockets interface does support SOCK_SEQPACKET but I don't think TCP/IP does
00:31:50 <geekosaur> OSI does, I think
00:31:56 <moonsheep> oh alright
00:31:58 <moonsheep> anyway thanks for everything
00:35:30 × Tuplanolla quits (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi) (Quit: Leaving.)
00:36:33 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
00:38:21 × moonsheep quits (~user@user/moonsheep) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.2))
00:41:46 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 265 seconds)
00:47:16 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
00:48:01 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
00:48:06 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
00:55:44 frost joins (~frost@user/frost)
00:56:06 × neightchan quits (~nate@98.45.169.16) (Quit: WeeChat 2.9)
00:59:21 × Katarushisu quits (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Quit: Ping timeout (120 seconds))
00:59:41 × jespada quits (~jespada@cpc121060-nmal24-2-0-cust249.19-2.cable.virginm.net) (Ping timeout: 260 seconds)
00:59:59 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
01:00:43 Katarushisu joins (~Katarushi@86.1.5.247)
01:02:55 jespada joins (~jespada@77.97.36.250)
01:03:11 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
01:03:49 LoupGris is now known as Lycanthropy
01:04:23 Lycanthropy is now known as Haematophage
01:08:28 jespada_ joins (~jespada@cpc121060-nmal24-2-0-cust249.19-2.cable.virginm.net)
01:08:51 × jespada quits (~jespada@77.97.36.250) (Ping timeout: 265 seconds)
01:08:51 × Katarushisu quits (~Katarushi@86.1.5.247) (Ping timeout: 265 seconds)
01:08:59 × adanwan_ quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 258 seconds)
01:09:01 Katarushisu joins (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net)
01:09:20 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
01:10:04 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
01:10:05 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
01:10:05 wroathe joins (~wroathe@user/wroathe)
01:10:31 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
01:13:41 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
01:19:24 tcard_ joins (~tcard@p1205018-ipngn11201hodogaya.kanagawa.ocn.ne.jp)
01:19:31 × gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
01:20:06 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
01:21:16 × beteigeuze quits (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df) (Ping timeout: 260 seconds)
01:22:23 × tcard quits (~tcard@p696070-ipngn8501hodogaya.kanagawa.ocn.ne.jp) (Ping timeout: 265 seconds)
01:25:12 × tcard_ quits (~tcard@p1205018-ipngn11201hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving)
01:26:43 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 265 seconds)
01:29:38 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
01:29:56 × vorpuni quits (~pvorp@2001:861:3881:c690:ec7f:c79:dd1b:f81a) (Remote host closed the connection)
01:35:19 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
01:35:45 harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
01:43:38 × lyle quits (~lyle@104.246.145.85) (Ping timeout: 265 seconds)
01:43:52 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 258 seconds)
01:44:37 × TonyStone quits (~TonyStone@2603-7080-8607-c36a-cc48-2eb7-9785-f03a.res6.spectrum.com) (Quit: Leaving)
01:44:55 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
01:48:53 × archsinner quits (~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com) (Quit: archsinner)
01:49:17 archsinner joins (~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com)
01:51:51 × talismanick quits (~talismani@c-73-41-86-39.hsd1.ca.comcast.net) (Ping timeout: 265 seconds)
01:53:39 TonyStone joins (~TonyStone@cpe-74-76-51-197.nycap.res.rr.com)
01:56:41 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
01:58:56 bilegeek_ joins (~bilegeek@10.sub-174-208-237.myvzw.com)
02:00:06 razetime joins (~quassel@117.254.34.169)
02:00:35 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
02:01:09 × bilegeek quits (~bilegeek@2600:1008:b018:1dfc:44e1:aaa5:595f:8e17) (Ping timeout: 244 seconds)
02:01:14 × archsinner quits (~archsinne@2603-9000-8400-033b-0000-0000-0000-1df1.inf6.spectrum.com) (Quit: archsinner)
02:04:14 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 244 seconds)
02:05:01 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
02:05:42 × anthezium quits (~anthezium@75.164.54.59) (Ping timeout: 252 seconds)
02:07:11 nate3 joins (~nate@98.45.169.16)
02:08:34 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
02:08:51 adanwan_ joins (~adanwan@gateway/tor-sasl/adanwan)
02:11:01 × greuben quits (~greuben@user/greuben) (Quit: WeeChat 3.6)
02:11:53 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
02:13:00 × td_ quits (~td@94.134.91.160) (Ping timeout: 264 seconds)
02:14:44 td_ joins (~td@94.134.91.190)
02:15:26 nate3 joins (~nate@98.45.169.16)
02:20:27 edrx joins (~Eduardo@2804:56c:d2d3:4800:cf7d:b421:4c3a:392e)
02:20:43 <edrx> @src ap
02:20:44 <lambdabot> ap = liftM2 id
02:21:29 tcard joins (~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9)
02:22:30 <edrx> question: where did lambdabot find that? a few hours ago I asked some questions here and people answered by asking things to the lambdabot, and I was able to locate most of the answers in the source code of the Prelude... but not this definition for ap =/
02:25:49 <monochrom> Does liftM2 ($) help?
02:26:21 <edrx> in what sense?
02:27:23 <edrx> for understanding how to define <*> from monad methods?
02:30:46 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
02:31:26 <jackdk> `($) :: (a -> b) -> a -> b` unifies with `id :: c -> c` with `c ~ (a -> b)` (remember that `(->)` is right-associative)
02:31:48 greuben joins (~greuben@user/greuben)
02:35:01 × harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
02:35:22 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
02:35:48 × waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
02:41:10 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
02:45:37 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
02:46:50 × tcard quits (~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9) (Quit: Leaving)
02:48:31 tcard joins (~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9)
02:55:16 <edrx> aaaaah
02:55:18 <edrx> :module +GHC.Base
02:55:18 <edrx> :t liftM2
02:55:18 <edrx> :t liftM2 ($)
02:55:19 <lambdabot> Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
02:55:20 <lambdabot> Monad m => m (a -> r) -> m a -> m r
02:55:31 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal)
02:55:40 <edrx> lovely =)
03:07:51 rockymarine joins (~rocky@user/rockymarine)
03:14:04 × bilegeek_ quits (~bilegeek@10.sub-174-208-237.myvzw.com) (Remote host closed the connection)
03:14:12 <sm> hey all.. is it possible to re-export one thing from module X, without also leaking orphan instances defined in X ?
03:14:26 bilegeek_ joins (~bilegeek@10.sub-174-208-237.myvzw.com)
03:14:43 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
03:15:16 <sm> eg: import Text.Megaparsec.Custom as X (customErrorBundlePretty) -- re-exporting X, don't want to re-export orphan instances
03:17:23 <jackdk> I would use newtypes instead of orphan instances and this is one reason why.
03:19:36 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 264 seconds)
03:23:27 bilegeek_ is now known as bilegeek
03:28:03 × xff0x quits (~xff0x@2405:6580:b080:900:b7c1:3130:710b:2a7f) (Ping timeout: 248 seconds)
03:29:01 <[Leary]> sm: I think you can just put customWhatever straight in your export list?
03:29:26 × darkstardevx quits (~darkstard@192.183.207.94) (Remote host closed the connection)
03:29:38 <sm> [Leary]: that sounds good, and should avoid re-exporting the orphan instances ?
03:30:11 × razetime quits (~quassel@117.254.34.169) (Ping timeout: 260 seconds)
03:30:49 darkstardevx joins (~darkstard@192.183.207.94)
03:30:57 <[Leary]> I would imagine so, but I don't actually know.
03:33:36 × mmhat quits (~mmh@p200300f1c7062333ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
03:33:56 Everything parts (~Everythin@37.115.210.35) ()
03:34:07 <sm> thanks, both
03:34:39 × jargon quits (~jargon@184.101.88.60) (Remote host closed the connection)
03:36:41 luffy joins (~chenqisu1@183.217.201.220)
03:38:11 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
03:40:12 xff0x joins (~xff0x@2405:6580:b080:900:b7c1:3130:710b:2a7f)
03:42:26 × darkstardevx quits (~darkstard@192.183.207.94) (Ping timeout: 260 seconds)
03:42:48 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
03:43:29 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
03:43:59 × luffy quits (~chenqisu1@183.217.201.220) (Ping timeout: 265 seconds)
03:48:09 <[Leary]> sm: Haskell wiki says: "All instances defined in a module A are imported automatically when importing A, or importing any module that imports A, directly or indirectly."
03:48:19 <[Leary]> So it looks like I'm wrong; you can't escape the pollution.
03:48:44 <sm> ack
03:49:18 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection)
03:50:32 jargon joins (~jargon@184.101.88.60)
03:50:43 rockymarine joins (~rocky@user/rockymarine)
03:51:02 × jargon quits (~jargon@184.101.88.60) (Remote host closed the connection)
03:51:19 bilegeek_ joins (~bilegeek@10.sub-174-208-237.myvzw.com)
03:52:25 × bilegeek quits (~bilegeek@10.sub-174-208-237.myvzw.com) (Read error: Connection reset by peer)
03:53:25 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
03:54:58 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 258 seconds)
03:55:19 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 244 seconds)
03:56:39 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:56:42 razetime joins (~quassel@117.254.34.169)
03:56:48 <EvanR> instances are very global
03:57:32 <EvanR> it's like there can be only one instance for a given type in the whole ecosystem
04:01:17 × bilegeek_ quits (~bilegeek@10.sub-174-208-237.myvzw.com) (Remote host closed the connection)
04:02:14 bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex)
04:02:16 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
04:08:53 rockymarine joins (~rocky@user/rockymarine)
04:09:22 bilegeek joins (~bilegeek@10.sub-174-208-237.myvzw.com)
04:13:37 <hololeap> I'm curious if there's an appreciable difference between `LogicT (State s) a` and `StateT s Logic a`. I just want to throw a counter on for each element in the Logic monad
04:13:51 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
04:15:31 <hololeap> I could also use `zip [1..]` after observeAll
04:17:18 rockymarine joins (~rocky@user/rockymarine)
04:18:14 dr_merijn joins (~dr_merijn@86-86-29-250.fixed.kpn.net)
04:20:12 × edrx quits (~Eduardo@2804:56c:d2d3:4800:cf7d:b421:4c3a:392e) (Ping timeout: 264 seconds)
04:22:25 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
04:22:47 × dr_merijn quits (~dr_merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds)
04:30:31 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
04:40:01 <jackdk> In fact, if you want to explicitly import instances and silence warnings, the idiom is to `import Foo ()`
04:41:51 rockymarine joins (~rocky@user/rockymarine)
04:43:43 × tmiller quits (~tmiller@199.241.26.152) (Quit: WeeChat 3.6)
04:45:35 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
04:48:27 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
04:49:28 rockymarine joins (~rocky@user/rockymarine)
04:52:26 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 260 seconds)
04:55:03 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
04:55:52 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
04:56:56 nate3 joins (~nate@98.45.169.16)
05:06:06 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 244 seconds)
05:10:43 × gawen quits (~gawen@user/gawen) (Quit: cya)
05:10:46 rockymarine joins (~rocky@user/rockymarine)
05:12:03 gawen joins (~gawen@user/gawen)
05:15:16 × frost quits (~frost@user/frost) (Ping timeout: 252 seconds)
05:15:57 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 252 seconds)
05:17:56 Lycurgus joins (~juan@user/Lycurgus)
05:20:00 nate3 joins (~nate@98.45.169.16)
05:21:01 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt juan@acm.org)
05:23:22 rockymarine joins (~rocky@user/rockymarine)
05:23:58 × bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
05:24:23 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
05:25:32 bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex)
05:28:36 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
05:34:06 rockymarine joins (~rocky@user/rockymarine)
05:39:06 × mvk quits (~mvk@2607:fea8:5ce3:8500::778c) (Ping timeout: 260 seconds)
05:39:07 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 246 seconds)
05:42:58 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:43:04 rockymarine joins (~rocky@user/rockymarine)
05:44:11 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds)
05:47:19 zxx7529 joins (~Thunderbi@user/zxx7529)
05:49:10 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 265 seconds)
05:49:51 k8yun joins (~k8yun@user/k8yun)
06:02:04 gmg joins (~user@user/gehmehgeh)
06:02:09 × k8yun quits (~k8yun@user/k8yun) (Ping timeout: 252 seconds)
06:02:58 ksu joins (~ksu@user/prtr)
06:03:25 redmp joins (~redmp@mobile-166-171-251-80.mycingular.net)
06:03:45 × redmp quits (~redmp@mobile-166-171-251-80.mycingular.net) (Client Quit)
06:06:06 redmp joins (~redmp@mobile-166-171-251-80.mycingular.net)
06:09:21 × redmp quits (~redmp@mobile-166-171-251-80.mycingular.net) (Client Quit)
06:09:50 vorpuni joins (~pvorp@2001:861:3881:c690:f9de:fbcb:2100:7597)
06:17:01 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
06:20:31 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
06:22:40 nate3 joins (~nate@98.45.169.16)
06:27:40 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
06:32:59 rockymarine joins (~rocky@user/rockymarine)
06:33:10 × greuben quits (~greuben@user/greuben) (Ping timeout: 265 seconds)
06:38:40 <ksu> is there a way to prevent _silently_ type defaulting integer constants to Int around functions like length or (!!)?
06:38:44 <ksu> > (2 ^ 81, 2 ^ 81 + length [], [0] !! (2 ^ 81))
06:38:45 <lambdabot> (2417851639229258349412352,0,0)
06:39:49 <ksu> literals
06:43:39 greuben joins (~greuben@user/greuben)
06:44:56 × vglfr quits (~vglfr@145.224.100.164) (Remote host closed the connection)
06:45:50 vglfr joins (~vglfr@145.224.100.164)
06:48:36 Midjak joins (~Midjak@82.66.147.146)
06:50:33 × vglfr quits (~vglfr@145.224.100.164) (Remote host closed the connection)
06:51:13 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346) (Remote host closed the connection)
06:52:17 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
06:53:48 vglfr joins (~vglfr@145.224.100.164)
06:55:26 <probie> They're not defaulting, they're being "solved", since the types of `length` and `(!!)` involve `Int`s, and things like `(+)` require both arguments to have the same type
06:55:45 talismanick joins (~talismani@2601:200:c100:c9e0::24ac)
06:58:26 × paddymahoney quits (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds)
06:58:47 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
06:58:53 <probie> :t length
06:58:54 <lambdabot> Foldable t => t a -> Int
06:58:58 <probie> :t (!!)
06:58:59 <lambdabot> [a] -> Int -> a
07:02:22 <ksu> ok, thanks
07:02:37 <ksu> so, is there a way to prevent it from silently happening?
07:02:40 jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
07:03:07 × jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 246 seconds)
07:04:21 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
07:06:06 × bilegeek quits (~bilegeek@10.sub-174-208-237.myvzw.com) (Remote host closed the connection)
07:06:28 bilegeek joins (~bilegeek@10.sub-174-208-237.myvzw.com)
07:13:08 titibandit joins (~titibandi@xdsl-212-8-150-57.nc.de)
07:14:06 waldo joins (~waldo@user/waldo)
07:16:35 × zxx7529 quits (~Thunderbi@user/zxx7529) (Ping timeout: 252 seconds)
07:16:51 × jrm quits (~jrm@user/jrm) (Quit: ciao)
07:17:10 jrm joins (~jrm@user/jrm)
07:21:46 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
07:21:57 zxx7529 joins (~Thunderbi@user/zxx7529)
07:22:43 rockymarine joins (~rocky@user/rockymarine)
07:24:21 × Vajb quits (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (Read error: Connection reset by peer)
07:25:02 × adanwan_ quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 258 seconds)
07:25:06 lagash_ joins (lagash@lagash.shelltalk.net)
07:25:33 Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi)
07:25:52 × lagash quits (lagash@lagash.shelltalk.net) (Ping timeout: 260 seconds)
07:26:19 × vglfr quits (~vglfr@145.224.100.164) (Remote host closed the connection)
07:26:35 vglfr joins (~vglfr@145.224.100.164)
07:26:49 × vglfr quits (~vglfr@145.224.100.164) (Remote host closed the connection)
07:26:54 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
07:27:21 vglfr joins (~vglfr@145.224.100.164)
07:34:41 nate3 joins (~nate@98.45.169.16)
07:39:36 × bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
07:39:49 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
07:45:10 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
07:45:55 bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex)
07:48:14 × greuben quits (~greuben@user/greuben) (Quit: WeeChat 3.6)
07:49:34 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 258 seconds)
07:49:58 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
07:52:04 gmg joins (~user@user/gehmehgeh)
07:52:17 paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com)
07:54:54 rockymarine joins (~rocky@user/rockymarine)
07:55:15 × elkcl quits (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 248 seconds)
07:57:52 elkcl joins (~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru)
07:58:24 CiaoSen joins (~Jura@p200300c957332e002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
07:59:11 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 244 seconds)
07:59:37 meinside joins (uid24933@id-24933.helmsley.irccloud.com)
08:01:04 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
08:01:24 <probie> If you turn on warnings (:set -Wall in GHCi), you'll get warned about 2 ^ 81 defaulting both 2 and 81 to `Integer`, but never about them becoming `Int` if they only valid type they could be is `Int`
08:01:31 Guest9025 joins (~Guest90@h-109-228-141-176.A980.priv.bahnhof.se)
08:03:18 <tomjaguarpaw> Can anyone explain to me why, if I'm in a checkout of this directory and I 'cabal build lib:trial' it tries to build 'trial-example'? https://github.com/kowainik/trial/tree/main/trial
08:03:27 <tomjaguarpaw> trial-example shouldn't be in the dependency tree at all
08:04:51 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346)
08:05:11 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 250 seconds)
08:09:36 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346) (Ping timeout: 260 seconds)
08:14:59 × bilegeek quits (~bilegeek@10.sub-174-208-237.myvzw.com) (Quit: Leaving)
08:15:50 × Guest9025 quits (~Guest90@h-109-228-141-176.A980.priv.bahnhof.se) (Quit: Client closed)
08:17:43 ircbrowse_tom joins (~ircbrowse@2a01:4f8:1c1c:9319::1)
08:17:44 Server sets mode +Cnt
08:18:33 × razetime quits (~quassel@117.254.34.169) (Ping timeout: 252 seconds)
08:21:55 × ozkutuk quits (~ozkutuk@176.240.173.153) (Ping timeout: 265 seconds)
08:30:43 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 244 seconds)
08:35:08 razetime joins (~quassel@117.254.34.169)
08:35:28 jmdaemon joins (~jmdaemon@user/jmdaemon)
08:37:24 × Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer)
08:38:32 Vajb joins (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57)
08:46:47 × raym quits (~aritra@user/raym) (Ping timeout: 252 seconds)
09:00:10 × the-coot[m] quits (~the-cootm@2001:470:69fc:105::95f) (Quit: You have been kicked for being idle)
09:06:26 ozkutuk joins (~ozkutuk@176.240.173.153)
09:06:58 Tuplanolla joins (~Tuplanoll@91-159-69-34.elisa-laajakaista.fi)
09:07:45 raym joins (~aritra@user/raym)
09:09:56 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
09:14:33 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
09:18:42 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
09:20:39 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
09:21:28 acidjnk joins (~acidjnk@p200300d6e7137a85945ed0a823b800bd.dip0.t-ipconnect.de)
09:26:25 wootehfoot joins (~wootehfoo@user/wootehfoot)
09:28:37 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
09:48:35 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
09:53:16 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 265 seconds)
09:55:16 chomwitt joins (~chomwitt@2a02:587:dc14:f500:f42c:42aa:75f3:5bbf)
09:57:53 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
10:09:19 × meinside quits (uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
10:14:17 × zxx7529 quits (~Thunderbi@user/zxx7529) (Quit: zxx7529)
10:14:25 notzmv joins (~zmv@user/notzmv)
10:18:37 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
10:21:07 nate3 joins (~nate@98.45.169.16)
10:23:59 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
10:25:47 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds)
10:27:45 × jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 250 seconds)
10:28:11 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 250 seconds)
10:28:17 × titibandit quits (~titibandi@xdsl-212-8-150-57.nc.de) (Remote host closed the connection)
10:29:44 titibandit joins (~titibandi@xdsl-212-8-150-57.nc.de)
10:30:30 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
10:33:51 × ellensol quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 252 seconds)
10:34:44 mmhat joins (~mmh@p200300f1c7062333ee086bfffe095315.dip0.t-ipconnect.de)
10:34:51 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
10:42:51 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
10:43:09 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
10:47:07 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 244 seconds)
10:50:21 <ski> ksu : explicit type ascriptions ?
10:50:24 <ski> there's also
10:50:26 <ski> @type genericLength
10:50:27 <lambdabot> Num i => [a] -> i
10:50:30 <ski> @type genericIndex
10:50:32 <lambdabot> Integral i => [a] -> i -> a
10:55:00 beteigeuze joins (~Thunderbi@2001:8a0:61b5:6101:f0c:e4e3:bfdc:91df)
10:56:34 × CiaoSen quits (~Jura@p200300c957332e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
11:03:29 ellensol joins (~ellen@178-78-210-152.customers.ownit.se)
11:04:12 <ski> hololeap : do you want backtrackable or non-backtrackable state ?
11:07:30 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346)
11:08:11 × ellensol quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 265 seconds)
11:08:46 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
11:11:55 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b833:229b:a9d8:c346) (Ping timeout: 244 seconds)
11:13:30 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
11:19:55 × razetime quits (~quassel@117.254.34.169) (Ping timeout: 268 seconds)
11:21:08 zebrag joins (~chris@user/zebrag)
11:21:18 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
11:25:52 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 244 seconds)
11:26:15 × perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.6)
11:26:18 razetime joins (~quassel@117.254.34.169)
11:26:41 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
11:26:45 perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
11:32:48 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 264 seconds)
11:44:16 lyle joins (~lyle@104.246.145.85)
11:52:13 × talismanick quits (~talismani@2601:200:c100:c9e0::24ac) (Ping timeout: 244 seconds)
12:02:35 × phma quits (phma@2001:5b0:210b:aca8:ecff:405c:745f:81a2) (Read error: Connection reset by peer)
12:03:55 phma joins (~phma@2001:5b0:211b:e328:5893:8a41:b371:1ef)
12:11:00 anon00 joins (~anon@46.102.157.245)
12:23:33 <fr33domlover[m]> Laziness question: I have `f :: Stuff -> URI -> IO ()` which encodes `Stuff` to JSON and sends over HTTP. I'd like to send the same `Stuff` to many URIs. If I partially apply just `x :: Stuff` to `f`, will it compute the conversion to JSON just once and remember it for all runs of the IO action? Or do I need to manually write `g :: BL.ByteString -> URI -> IO()` to make sure conversion is done once in advance?
12:24:06 <fr33domlover[m]> (I know aeson has both strict and lazy versions, asking what the default for Haskell is)
12:25:46 <hpc> if you write it so the bytestring is outside the \uri -> whatever expression, it will remember it
12:27:18 <hpc> that's less of a laziness question and more of a how stuff is garbage-collected question too - you can generalize that if some subexpression only exists in a lambda, it gets forgotten when you leave it
12:27:50 <hpc> so \x -> \y -> foo (expensive x computation) will always forget
12:28:03 <ski> f stuff = \uri -> ..json..uri..
12:28:05 <ski> where
12:28:15 <ski> json = stuffToJSON stuff
12:28:39 <hpc> \x -> let z = expensive x computation in \y -> foo z -- will remember z as long as the outer scope remembers (f x)
12:28:54 <hpc> this is how the memoization libraries work, but at the top level
12:29:22 <hpc> fibs = let fibslist = something in \n -> fibslist !! n
12:29:35 <hpc> fibslist will be remembered as long as fibs is, which at the top-level means forever
12:32:26 <probie> "which at the top-level means forever" - not so, top level terms can be GC-ed
12:33:29 ellensol joins (~ellen@178.78.210.152)
12:34:42 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
12:34:43 × califax quits (~califax@user/califx) (Remote host closed the connection)
12:35:35 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
12:35:36 × acidjnk quits (~acidjnk@p200300d6e7137a85945ed0a823b800bd.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
12:36:19 × td_ quits (~td@94.134.91.190) (Ping timeout: 252 seconds)
12:36:36 <hpc> probie: oh, neat
12:37:41 × ellensol quits (~ellen@178.78.210.152) (Ping timeout: 244 seconds)
12:38:55 califax joins (~califax@user/califx)
12:40:38 td_ joins (~td@94.134.91.190)
12:41:13 <fr33domlover[m]> hpc: Thank you!
12:41:28 L29Ah joins (~L29Ah@wikipedia/L29Ah)
12:43:14 <probie> hpc: CAFs (top level thunks) are treated somewhat specially in that they can be GC-ed if there are no "live" references to them (at least that's my understanding - someone with a better knowledge of GHC internals can probably be more precise)
12:44:06 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
12:46:11 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
12:47:12 <hpc> ah, i will have to keep that in mind
12:47:59 <hpc> i try to avoid those sorts of things just because i don't like globals, but nice to know it's not a memory leak waiting to happen
12:48:59 cdimitroulas joins (~cdimitrou@194.32.120.166)
12:50:37 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
12:50:50 <ski> probie : they revert to thunk state ?
12:52:01 <geekosaur> that's my recollection
12:52:39 <geekosaur> special support was added for that some ghc versions back
12:55:27 ellensol joins (~ellen@178-78-210-152.customers.ownit.se)
12:55:36 × waldo quits (~waldo@user/waldo) (Ping timeout: 264 seconds)
12:58:08 waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se)
13:00:29 ellensol_ joins (~ellen@178-78-210-152.customers.ownit.se)
13:01:02 zer0bitz joins (~zer0bitz@2001:2003:f748:2000:493c:f2cd:d7ed:ecef)
13:03:05 × ellensol quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 252 seconds)
13:05:25 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
13:08:17 <geekosaur> not finding the original MR but https://gitlab.haskell.org/ghc/ghc/-/merge_requests/1232 implies it by existence
13:09:54 <HP-UX> Started to learn haskell
13:10:10 <HP-UX> Frist thing I'm reading now: https://andrew.gibiansky.com/blog/haskell/haskell-syntax/ as the syntax was always confusing
13:10:26 <HP-UX> Will consult the docs soon
13:10:55 <fr33domlover[m]> > \x -> \y -> foo (expensive x computation) will always forget
13:10:55 <fr33domlover[m]> hpc why does it always forget? You mean it will do the expensive computation every time and not memoize? I wonder why the compiler can't guess it can memoize because when I look at the code it seems like why not :P
13:10:57 <lambdabot> error:
13:10:57 <lambdabot> • Variable not in scope: foo :: t0 -> t2 -> t3 -> t4 -> t5
13:10:57 <lambdabot> • Perhaps you meant ‘for’ (imported from Data.Traversable)error:
13:11:29 <geekosaur> Haskell syntax is actually fairly "regular" (in the sense that pretty much everything has the same form: <declaration> [where <definitions>])
13:12:21 <hpc> fr33domlover[m]: same reason things get recomputed in any other language - it's only in the function body and the references to it all go away
13:12:36 <ski> fr33domlover[m] : each time you call the (inner) lambda (potentially getting a new value for `y'), `expensive x computation' will be evaluated anew
13:13:29 <ski> there is no automatic memoizing
13:13:51 <ski> HP-UX : feel free to ask any questions here
13:16:19 <fr33domlover[m]> ski: but if the expensive computation is pure and doesn't depend on y (e.g. JSON-encoding x), wouldn't the compiler want to optimize by memoizing the computation result just in case the outer lambda is used again (even with a different y)?
13:16:20 × causal quits (~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0e) (Quit: WeeChat 3.6)
13:16:51 <geekosaur> you end up wasting a lot of memory that way
13:16:52 <ski> that could cause space leaks
13:17:15 <probie> geekosaur: I think it was added around GHC 4 (or something of that vintage), but my memory might be playing tricks on me
13:17:39 <geekosaur> `reset CAFs` was a lot more recent. maybe we're talking about different things
13:18:29 <ski> (and you mean "sharing" or maybe "caching", not "memoizing". memoizing refers to having a function remember computed input-output associations, for use in later calls, checking if input has been memoized for the function already)
13:19:44 <fr33domlover[m]> ski, geekosaur : And if I rewrite `f` as `\x -> let j = encodeJSON x in \ y -> ...` why does it then cache the result of computing `j`? It seems like magic, but maybe means it only happens when I intend and not automatically in the original version of `f`?
13:19:51 <geekosaur> actually hm, ISTR the one I'm thinking of was related to ghci
13:20:27 <geekosaur> in general if you `let` something the compiler will take it as a request for sharing
13:20:43 waldo joins (~waldo@user/waldo)
13:21:12 <geekosaur> (but only a request. depending on how it modifies the code, that request may be ignored)
13:21:31 <geekosaur> that said, lets can be lifted, which increases sharing
13:21:57 <ski> fr33domlover[m] : it only caches across a single invocation `f x0'. iow if you do `g = f x0' or `map (f x0)' or the like. if you later do `f x1' (whether `x1' is equivalent or even pointer-equal to `x0' or not), then that will still recompute `encodeJSON x1'
13:25:27 <fr33domlover[m]> ski: So if I define `g = f x0`, it will memoize/share the result of `encodeJSON x0`? (and in the non-let version of `f` it won't?) That's good enough for me, was going to do the `g = f x0` thing ^\_^
13:25:41 <ski> yes
13:26:54 <ski> (but also passing `f x0' as an argument, e.g. to `map' or whatever should be fine)
13:27:38 <fr33domlover[m]> Thank you :) Feels a bit weird to insert that peculiar `let` into the code and then have to add a comment to explain, because it's not clear that that's the purpose of it. But I suppose I can instead use meaningful function names to make it clear that there's a "prepare" step and "use" step, meant to allow the memoization
13:28:04 <ski> of course, you could also probably use `where' as i indicated above
13:28:16 <fr33domlover[m]> Years of haskelling, and somehow it wasn't clear to me until now "^_^
13:29:14 <ski> this pattern is sometimes known as "serious (as opposed to trivial) currying", or "run-time compilation"
13:31:14 <ski> (a typical example would be converting a description of a regular expression into a function that employs an efficient state-based algorithm. so you want to translate from the description to the state machine, before the function accepts an input string to match on)
13:32:39 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
13:37:26 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 260 seconds)
13:47:13 × bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
13:47:34 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
13:48:50 bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex)
13:50:47 jakalx parts (~jakalx@base.jakalx.net) ()
13:55:24 sinity joins (~ezo.dev@193.200.83.122)
14:06:35 × lyle quits (~lyle@104.246.145.85) (Ping timeout: 250 seconds)
14:12:24 Guest|47 joins (~Guest|47@1.156.128.208)
14:12:44 × Guest|47 quits (~Guest|47@1.156.128.208) (Client Quit)
14:15:43 lyle joins (~lyle@104.246.145.85)
14:16:46 k8yun joins (~k8yun@user/k8yun)
14:22:38 nate3 joins (~nate@98.45.169.16)
14:22:45 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
14:25:11 kenran joins (~user@user/kenran)
14:27:26 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
14:28:03 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds)
14:28:41 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
14:29:35 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
14:30:37 × razetime quits (~quassel@117.254.34.169) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
14:33:53 × waldo quits (~waldo@user/waldo) (Ping timeout: 250 seconds)
14:37:46 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
14:41:41 × shapr quits (~user@68.54.166.125) (Ping timeout: 244 seconds)
14:41:51 jakalx joins (~jakalx@base.jakalx.net)
14:42:51 × lyle quits (~lyle@104.246.145.85) (Ping timeout: 268 seconds)
14:43:26 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
14:48:24 × ellensol_ quits (~ellen@178-78-210-152.customers.ownit.se) (Ping timeout: 264 seconds)
14:50:04 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
14:51:49 kenran` joins (~user@user/kenran)
14:54:07 × k8yun quits (~k8yun@user/k8yun) (Quit: Leaving)
14:54:33 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 252 seconds)
14:55:39 lyle joins (~lyle@104.246.145.85)
14:57:16 × kenran` quits (~user@user/kenran) (Remote host closed the connection)
14:59:46 × lyle quits (~lyle@104.246.145.85) (Ping timeout: 244 seconds)
14:59:53 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
15:02:14 nate3 joins (~nate@98.45.169.16)
15:04:30 Guest2951 joins (~Guest29@nmal-25-b2-v4wan-166405-cust169.vm24.cable.virginm.net)
15:04:43 Guest2951 parts (~Guest29@nmal-25-b2-v4wan-166405-cust169.vm24.cable.virginm.net) ()
15:08:32 mvk joins (~mvk@2607:fea8:5ce3:8500::778c)
15:09:21 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
15:09:28 waldo joins (~waldo@user/waldo)
15:11:52 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
15:12:19 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
15:13:09 ddellacosta joins (~ddellacos@89.45.224.100)
15:14:09 gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de)
15:15:08 rockymarine joins (~rocky@user/rockymarine)
15:16:32 × bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
15:16:58 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
15:17:39 lyle joins (~lyle@104.246.145.85)
15:24:44 bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex)
15:25:23 <fr33domlover[m]> Cool, the example really helps :)
15:26:09 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
15:26:48 × ddellacosta quits (~ddellacos@89.45.224.100) (Ping timeout: 264 seconds)
15:31:57 × lyle quits (~lyle@104.246.145.85) (Ping timeout: 252 seconds)
15:38:51 × cdimitroulas quits (~cdimitrou@194.32.120.166) (Ping timeout: 265 seconds)
15:42:14 bb010g joins (~bb010g@2001:470:69fc:105::9a5)
15:46:02 × kenran quits (~user@user/kenran) (Remote host closed the connection)
15:49:27 × mixphix quits (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca) (Ping timeout: 268 seconds)
15:51:17 jero98772 joins (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
15:51:36 × jespada_ quits (~jespada@cpc121060-nmal24-2-0-cust249.19-2.cable.virginm.net) (Ping timeout: 260 seconds)
15:51:47 × mmhat quits (~mmh@p200300f1c7062333ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
15:52:58 × kimjetwav quits (~user@2607:fea8:235e:b600:fded:756d:e09c:6c2d) (Remote host closed the connection)
15:54:58 jespada joins (~jespada@nmal-24-b2-v4wan-166357-cust1764.vm24.cable.virginm.net)
16:00:07 × Bulby[m] quits (~bulbyvrma@2001:470:69fc:105::1:fe0a) (Quit: You have been kicked for being idle)
16:00:33 mixphix joins (~cigsender@bras-base-otwaon237cw-grc-11-174-91-129-69.dsl.bell.ca)
16:03:59 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 265 seconds)
16:05:12 <hololeap> ski, that's an interesting question. it doesn't matter to me in this case but I'm interested in what each would look like.
16:06:52 __monty__ joins (~toonn@user/toonn)
16:07:22 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 265 seconds)
16:07:45 nitr0gen joins (~nitr0gen@103.235.2.145)
16:21:43 × cyphase quits (~cyphase@user/cyphase) (Ping timeout: 246 seconds)
16:23:05 × johnw quits (~johnw@2600:1700:cf00:db0:dd60:bc61:a3c9:2dac) (Ping timeout: 250 seconds)
16:23:36 cyphase joins (~cyphase@user/cyphase)
16:24:24 jargon joins (~jargon@184.101.88.60)
16:29:07 × nitr0gen quits (~nitr0gen@103.235.2.145) (Ping timeout: 265 seconds)
16:29:34 nitr0gen joins (~nitr0gen@2409:4040:e8f:1ec2:6a7:469b:8f63:5372)
16:36:07 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:509f:aac5:1bc5:5910)
16:38:57 × bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
16:40:19 kdaishi joins (~Thunderbi@mobile-access-5672fd-223.dhcp.inet.fi)
16:40:58 bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex)
16:41:37 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
16:43:36 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 264 seconds)
16:46:35 jinsun__ joins (~jinsun@user/jinsun)
16:46:35 jinsun is now known as Guest4802
16:46:35 jinsun__ is now known as jinsun
16:48:04 jinsun__ joins (~jinsun@user/jinsun)
16:48:04 jinsun is now known as Guest8606
16:48:04 jinsun__ is now known as jinsun
16:50:20 × Guest4802 quits (~jinsun@user/jinsun) (Ping timeout: 244 seconds)
16:50:51 × Guest8606 quits (~jinsun@user/jinsun) (Ping timeout: 244 seconds)
16:55:13 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
16:55:55 rockymarine joins (~rocky@user/rockymarine)
16:56:15 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
16:56:24 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
16:57:10 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
16:58:28 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
16:59:05 acidjnk joins (~acidjnk@p200300d6e7137a32f90b84488ac8cf0c.dip0.t-ipconnect.de)
17:02:56 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
17:03:03 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
17:03:26 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 265 seconds)
17:03:28 <EvanR> what is the rationale behind Show1
17:03:28 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
17:03:49 <EvanR> I mean, intuitively, it involves being able to show * -> *'s, but on the surface that makes no sense
17:04:00 <EvanR> to me
17:05:03 <geekosaur> I understand it as more giving you a Show for an f a when you have only the f (with Show a being a prerequisite)
17:06:49 × kdaishi quits (~Thunderbi@mobile-access-5672fd-223.dhcp.inet.fi) (Ping timeout: 265 seconds)
17:06:51 <geekosaur> or, if you prefer, an assertion that this f does not prevent showing f a
17:07:16 <EvanR> Show1 f => Show (Fix f) ...
17:07:19 <EvanR> instance
17:07:34 <EvanR> so the a is.....
17:07:45 <geekosaur> hrm
17:07:57 geekosaur doesn't understand Fix enough to say there
17:09:05 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
17:09:40 <geekosaur> but it does seem to fit what I said, presuming Fix f can do something useful in some context
17:10:14 <EvanR> somehow it makes sense now. It lets you show * -> *'s
17:10:39 <EvanR> now about deriving it
17:10:53 dmwit joins (~dmwit@2600:4040:264a:df00:422e:910b:6593:d3fb)
17:12:15 <dmwit> Does anybody know what (if anything) I have to be careful about when passing hasktorch Tensors between threads?
17:14:18 jakalx joins (~jakalx@base.jakalx.net)
17:15:42 rockymarine joins (~rocky@user/rockymarine)
17:19:20 Topsi joins (~Topsi@dyndsl-095-033-018-041.ewe-ip-backbone.de)
17:21:50 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: Lost terminal)
17:22:43 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: restarting computer, will come back soon)
17:23:50 × dmwit quits (~dmwit@2600:4040:264a:df00:422e:910b:6593:d3fb) (Ping timeout: 252 seconds)
17:28:12 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:32:55 × Midjak quits (~Midjak@82.66.147.146) (Ping timeout: 265 seconds)
17:35:11 justsomeguy joins (~justsomeg@user/justsomeguy)
17:36:29 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
17:37:06 ChaiTRex joins (~ChaiTRex@user/chaitrex)
17:38:13 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
17:43:44 <EvanR> can't derive instance of Show1, it's not a stock class (Eq, Show, etc). Try enabling DeriveAnyClass
17:44:30 <EvanR> it produces an instance with no liftShowsPrec what's the point
17:44:53 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 258 seconds)
17:45:06 × jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer)
17:45:33 <geekosaur> I think you have to go via Generics to get any of the *1 classes
17:45:49 <geekosaur> although there might be a proposal for some of them
17:46:11 jinsun joins (~jinsun@user/jinsun)
17:49:41 <geekosaur> meh, don't see it. unless it's been accepted but not implemented yet
17:51:57 leungbk joins (~user@2603-8000-1201-2dd2-d72d-d70e-f2fb-2233.res6.spectrum.com)
17:56:45 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
17:59:49 <geekosaur> don't see it there either, sigh
18:01:23 × mrianbloom quits (uid350277@id-350277.ilkley.irccloud.com) (Quit: Connection closed for inactivity)
18:07:56 <EvanR> by the time I write the Show1 instance, it will be ready xD
18:08:41 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 260 seconds)
18:11:50 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:509f:aac5:1bc5:5910) (Remote host closed the connection)
18:13:57 archsinner joins (~archsinne@2603-9000-8708-30f2-0000-0000-0000-070f.inf6.spectrum.com)
18:14:59 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 268 seconds)
18:15:51 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:509f:aac5:1bc5:5910)
18:19:57 rockymarine joins (~rocky@user/rockymarine)
18:29:28 × nitr0gen quits (~nitr0gen@2409:4040:e8f:1ec2:6a7:469b:8f63:5372) (Ping timeout: 246 seconds)
18:34:24 nitr0gen joins (~nitr0gen@103.235.2.145)
18:35:32 jinsun is now known as Guest7186
18:35:32 jinsun__ joins (~jinsun@user/jinsun)
18:35:32 × Guest7186 quits (~jinsun@user/jinsun) (Killed (molybdenum.libera.chat (Nickname regained by services)))
18:35:32 jinsun__ is now known as jinsun
18:43:07 jinsun__ joins (~jinsun@user/jinsun)
18:43:07 jinsun is now known as Guest9672
18:43:07 jinsun__ is now known as jinsun
18:43:32 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5)
18:44:00 × Guest9672 quits (~jinsun@user/jinsun) (Ping timeout: 244 seconds)
18:44:00 × leungbk quits (~user@2603-8000-1201-2dd2-d72d-d70e-f2fb-2233.res6.spectrum.com) (Ping timeout: 244 seconds)
18:45:49 leungbk joins (~user@cpe-142-129-149-172.socal.res.rr.com)
18:47:50 × nitr0gen quits (~nitr0gen@103.235.2.145) (Ping timeout: 265 seconds)
18:48:36 nitr0gen joins (~nitr0gen@2409:4040:e8f:1ec2:495b:6751:e4ab:2105)
18:53:21 edrx joins (~Eduardo@2804:18:580b:d1fe:c1d0:9f8d:e583:678c)
18:53:55 × cyphase quits (~cyphase@user/cyphase) (Ping timeout: 248 seconds)
18:55:24 cyphase joins (~cyphase@user/cyphase)
18:56:53 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: Be back in a sec)
18:57:59 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds)
18:58:33 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
18:58:41 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
18:59:58 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
19:00:41 docter_d joins (~docter_d@2001:9e8:33e6:2e00:2dee:1861:4e3d:6a1d)
19:00:54 sinity parts (~ezo.dev@193.200.83.122) ()
19:01:20 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
19:09:03 <edrx> hi all! I am trying to understand classes, instances, and inheritance, and I wrote this to have a minimalistic example to work on:
19:09:05 <edrx> http://angg.twu.net/HASKELL/Classes1.hs.html#class
19:09:43 <edrx> when I try ":load Classes1.hs" GHC yields this error: `m1' is not a (visible) method of class `C2'
19:10:43 <edrx> does that mean that if I make m1 visible in C2 I can override it? how do I make it visible?
19:11:07 <geekosaur> you're trying to use typeclasses as OOP. they aren't
19:11:20 <edrx> aaah
19:11:41 <geekosaur> % :info Ord
19:11:41 <yahb2> type Ord :: * -> Constraint ; class Eq a => Ord a where ; compare :: a -> a -> Ordering ; (<) :: a -> a -> Bool ; (<=) :: a -> a -> Bool ; (>) :: a -> a -> Bool ; (>=) :: a -> a -> Bool ;...
19:11:47 <edrx> yes, I don't have a good mental model for them yet... I'm trying to build it
19:11:51 <hololeap> can I pull in a library module as well as Main.hs when using runhaskell?
19:13:58 <hololeap> I'm having trouble with getting NoBuffering to stick since I split my Main.hs into an executable and a library, controlled by cabal
19:14:12 × raym quits (~aritra@user/raym) (Ping timeout: 264 seconds)
19:14:19 <hololeap> so I would like to try again with runhaskell, but it needs to know about my library module
19:14:25 <geekosaur> https://paste.tomsmeding.com/WReEoZJb seems to work
19:15:32 <geekosaur> if it's a compiled library then you may need to use --ghc-arg=--package --ghc-arg=pkgnamehere
19:16:30 <geekosaur> or if you;re using a cabal library then cabal exec runhaskell …
19:16:56 <hololeap> ok, that works, great
19:18:06 × cyphase quits (~cyphase@user/cyphase) (Ping timeout: 244 seconds)
19:18:22 <geekosaur> edrx, so a "superclass" is better thought of as a prerequisite. above I showed you (part of) how Ord is declared. it has Eq as a prerequisite, so it can derive other comparison operators using (==), (/=), and either compare or (<)
19:18:58 <geekosaur> you can't "override" things in the prerequisite, which is one reason the "superclass" terminology is bad
19:21:53 <geekosaur> it's more correct to say that you can *use* things from the prerequisite. you can't redefine them, though.
19:22:08 <hololeap> hm, yeah there is no buffering when I use runhaskell, but there is when the bin is compiled. I have `forM_ [stdout,stderr] (`hSetBuffering` NoBuffering)` at the top of my main function
19:22:44 <geekosaur> do you want to include stdin there?
19:23:10 cyphase joins (~cyphase@user/cyphase)
19:23:19 coot joins (~coot@213.134.165.79)
19:23:31 <c_wraith> I thought stderr defaulted to no buffering, too
19:24:21 <geekosaur> edrx, one place that demonstrates why treating typeclasses as OOP is bad: when we added Applicative as a prerequisite for Monad, many programs backformed it by saying `instance Applicative MyMonad where { pure = return; (<*>) = ap }`
19:24:49 <geekosaur> `return` is part of the Monad class, `ap` is defined for Monad instead of Applicative
19:25:01 <geekosaur> so it works backwards from what you'd expect from OOP
19:25:33 <geekosaur> we're defining the so-called "superclass" based on the "subclass" instead of the other way around!
19:26:03 <edrx> geekosaur: aah, I had just stumbled on that by googling... https://itecnote.com/tecnote/haskell-defining-a-new-monad-in-haskell-raises-no-instance-for-applicative/
19:27:34 kenran joins (~user@user/kenran)
19:27:54 <hololeap> geekosaur: no, it's just supposed to use sourceProcessFromStreams from conduit-extra to move stdout/stderr from a subprocess directly to stdout/stderr for the main process
19:27:55 <hololeap> http://sprunge.us/Ht4OLD
19:28:14 <geekosaur> this does not, by the way, mean that the relationship is backwards; it means that it's not truly a superclass-subclass relationship but something entirely different
19:28:44 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
19:29:17 <hololeap> so you can run a process that displays a real-time percentage or something and have it displayed in real-time through the haskell binary
19:29:43 <geekosaur> did you also unbuffer the process's output?
19:29:48 <hololeap> the problem is, when I compile the binary, it waits until the subprocess completes before showing any of the stdout/stderr
19:30:01 raym joins (~aritra@user/raym)
19:30:27 <hololeap> hm, no I'm not sure where to get a reference to its handle if I'm using sourceProcessFromStreams, but that may be the answer
19:30:41 <geekosaur> (note that this does not mean calling hSetBuffering on the handle for the other process! it makes its own decision as to buffering, so you have to use GNU stdbuf or use ptys instead of pipes or etc.)
19:31:07 kenran` joins (~user@user/kenran)
19:31:09 <hololeap> oh, well it works correctly when I run it with `cabal exec runhaskell`
19:31:36 <geekosaur> that doesn't really sound like it'd affect the other process
19:32:06 <geekosaur> the forM_ looks correct to me so I don't know why it wouldn't be taking effect
19:32:26 <geekosaur> unless something does output before you run it in which case, well, oops
19:32:38 <hololeap> is there a flag to cabal/ghc to use the same buffering strategy that runhaskell uses?
19:32:53 <geekosaur> I don't think so
19:33:32 <hololeap> this might have something to do with whatever conduit is doing behind the scenes
19:33:57 <edrx> well, I was trying to build a minimal example of classes and instances because the standard examples - the ones from the Prelude - come with tons of extras, like laws...
19:34:59 <geekosaur> we prefer the ones with laws, yes. but that's just preference (try to figure out laws for Num and friends sometime)
19:36:14 <geekosaur> I think the usual recommendation is to study Functor and replicate it without looking at the source
19:37:16 <geekosaur> in practice, a class declaration declares a record that you can't see, and an instance declaration specifies a possible value for that record based on the type(s) the instance is declared for
19:38:10 <geekosaur> when you have a function with a constraint `(Foo a) => …`, Haskell quietly passes the appropriate record value based on what type `a` represents to that function
19:38:56 × fluxit- quits (~fluxit@techsmix.net) (Quit: Bye!)
19:39:08 <geekosaur> when a class has a so-called "superclass", it means the instance record will (also) contain another instance record representing the appropriate "superclass" instance record
19:39:51 <geekosaur> this is why you can't redefine "superclass" methods in a "subclass": the instance can only pass on the "superclass" record, it can't modify it
19:40:26 <geekosaur> (I am describing how ghc does it. Some other Haskell compiler might do it differently, but at the moment the only real Haskell compiler is ghc.)
19:40:30 × kenran` quits (~user@user/kenran) (Remote host closed the connection)
19:40:50 × nitr0gen quits (~nitr0gen@2409:4040:e8f:1ec2:495b:6751:e4ab:2105) (Ping timeout: 244 seconds)
19:41:10 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Remote host closed the connection)
19:41:21 nitr0gen joins (~nitr0gen@103.235.2.145)
19:41:34 <geekosaur> technically all it should have to pass is a type witness (that is, proof of the type it's being used with), but the simplest such witness is just the dictionary for that type
19:42:05 <kenran> geekosaur: thanks for the advice about not using named pipes and going the socket route instead. Just had to add one different effect interpreter, replace the read/write with socket operations and everthing immediately worked. No weird bugs anymore :)
19:42:19 <geekosaur> np
19:42:54 <kenran> I'd still love to know what's wrong with named pipes on macOS in Haskell, but alas... I can always dig up the program code and try it again another time.
19:43:23 <edrx> is it common to have a class that defines the types of some methods but not default values for those methods? I tried to do that in my minimal example and got a warning - or error? - that said that I had to use a pragma if I really wanted to do that...
19:43:34 <geekosaur> I'd be interested in knowing if FreeBSD has the same issue, since much of that code was taken from FreeBSD
19:44:20 <geekosaur> edrx, usually we don't specify defaults, in fact. Can you show an example of a declaration that raises an error?
19:44:24 × rockymarine quits (~rocky@user/rockymarine) (Ping timeout: 268 seconds)
19:44:46 <edrx> sure, one min
19:44:57 × docter_d quits (~docter_d@2001:9e8:33e6:2e00:2dee:1861:4e3d:6a1d) (Ping timeout: 268 seconds)
19:45:10 <kenran> geekosaur: oh, was it? Yeah, that'd be interesting as well. One more datapoint I have is that it seems to happen on x86 and arm macOS.
19:45:52 <geekosaur> that doesn't surprise me, the implementation of named pipes wouldn't be platform dependent beyond basics like page size which is probably the same for both
19:47:43 acidjnk_new joins (~acidjnk@p200300d6e7137a32a8f89e31b171299c.dip0.t-ipconnect.de)
19:47:48 × acidjnk quits (~acidjnk@p200300d6e7137a32f90b84488ac8cf0c.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
19:49:52 <EvanR> edrx, often when you're thinking about default values, you're thinking about records of implementation/configuration instead of type classes
19:50:15 fef joins (~thedawn@user/thedawn)
19:50:28 <EvanR> where the record type defines the interface and particular record values define the implementation, and can be mixed and matched for purposes
19:50:38 <edrx> geekosaur: hm, I modified my test program and now I need to fix something else first... but your hint of "think that each type has a dictionary" has made many things clearer...
19:50:39 <EvanR> then you can create a default record and customize it
19:54:34 × tired quits (~tired@user/tired) (Quit: /)
19:55:13 tired joins (~tired@user/tired)
19:56:02 <edrx> EvanR: you mean records in this sense? https://www.haskell.org/definition/haskell2010.pdf#page=46
19:57:00 <edrx> (that looks like a good way to think about dictionaries of methods, btw)
19:57:21 <EvanR> data Employee = Employee { name :: String, salary :: Int }
19:57:27 <edrx> yep
19:58:01 <EvanR> data Driver m = Driver { putChar :: Char -> m (), getChar :: m Char }
20:01:14 nate3 joins (~nate@98.45.169.16)
20:01:26 pavonia joins (~user@user/siracusa)
20:02:34 × anon00 quits (~anon@46.102.157.245) (Quit: Konversation terminated!)
20:04:03 × nitr0gen quits (~nitr0gen@103.235.2.145) (Quit: Quit)
20:04:38 <geekosaur> I think it's actually a tuple in implementation, but you can think of a tuple as an anonymous record
20:05:10 <geekosaur> ("anonymous product type" if we're being all theoretical about it)
20:06:30 × tired quits (~tired@user/tired) (Quit: /)
20:06:31 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
20:07:27 <edrx> =)
20:07:54 tired joins (~tired@user/tired)
20:09:05 Midjak joins (~Midjak@82.66.147.146)
20:09:13 ddellacosta joins (~ddellacos@143.244.47.90)
20:10:37 <edrx> btw, this video about Core Haskell - <http://www.youtube.com/watch?v=fty9QL4aSRc>, "Vladislav Zavialov - Haskell to Core: Understanding Haskell Features Through Their Desugaring" has helped me a LOT
20:11:57 <edrx> it explains classes starting on 20:12. I need to watch that part again
20:12:04 <geekosaur> yes, it can be useful to trace a Haskell program through the desugarer to Core and then down to STG (which is even simpler)
20:12:18 <edrx> what is STG?
20:13:28 <geekosaur> it's the graph representing a Haskell program, which is simplified at runtime by the RTS's graph reduction machine
20:13:43 <edrx> ok!
20:13:45 <geekosaur> which is the simplest way to implement lazy evaluation
20:13:55 <geekosaur> you can look "graph reduction" up on wikipedia
20:14:34 <geekosaur> I do *not* recommend reading the STG papers for this; they're less about the why or the high level how than about the low level details of efficient graph reduction on a CPU
20:16:51 × archsinner quits (~archsinne@2603-9000-8708-30f2-0000-0000-0000-070f.inf6.spectrum.com) (Quit: archsinner)
20:17:09 <sclv> re graph reduction this video may be of interest as well https://www.youtube.com/watch?v=UPy7TXgrK1A
20:17:15 × waldo quits (~waldo@user/waldo) (Quit: quit)
20:17:25 <geekosaur> anyway the STG representation of a program is basically case and let
20:17:40 <geekosaur> everything else has gone away
20:17:54 archsinner joins (~archsinne@35.136.124.156)
20:18:16 <geekosaur> (or has become a value)
20:18:59 × bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 258 seconds)
20:19:31 <edrx> sclv: thanks!
20:21:08 bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex)
20:22:02 <geekosaur> there's also
20:22:06 <geekosaur> @hackage stgi
20:22:06 <lambdabot> https://hackage.haskell.org/package/stgi
20:22:17 <edrx> I was going to mention that! https://wiki.haskell.org/Ministg
20:22:37 <geekosaur> which you can use to visually trace reduction of a graph which is a simplified form of the one ghc uses
20:22:42 <edrx> it looks nice, but it is still a bit above my level...
20:22:51 <edrx> (or a lot above =/)
20:22:51 × leungbk quits (~user@cpe-142-129-149-172.socal.res.rr.com) (Ping timeout: 260 seconds)
20:23:36 <geekosaur> yeh, at the very least make sure you understand the Core level, then start poking at how the Core representation becomes the STG representation
20:23:50 <geekosaur> then you can use stgi to see how that is evaluated
20:24:21 <geekosaur> sadly it's not quite complete enough that someone could hook it into ghc and produce a visual trace of actual ghc code
20:31:15 × fef quits (~thedawn@user/thedawn) (Ping timeout: 258 seconds)
20:31:37 <edrx> gosh =( this - https://0x0.st/o4DR.txt - gives me this error: No instance for (C1 DD2) arising from the superclasses of an instance declaration in the instance declaration for `C2 DD2'
20:32:54 <edrx> building a good mental model of how classes work is turning out much harder than I expected ☹️
20:33:12 <geekosaur> remember that I called it a prerequisite instead of a superclass
20:33:36 <geekosaur> you have to declare the instance for C1 before you can declare the instance for C2
20:33:44 <edrx> let me try
20:33:46 michalz joins (~michalz@185.246.207.203)
20:33:48 <geekosaur> it does *not* do that for you
20:34:10 × archsinner quits (~archsinne@35.136.124.156) (Quit: archsinner)
20:34:59 <edrx> sorry, can you explain? my "instance C1 DD1" is two lines above "instance C2 DD2"...
20:35:08 archsinner joins (~archsinne@2603-9000-8708-30f2-0000-0000-0000-070f.inf6.spectrum.com)
20:35:30 <geekosaur> but do you have an `instance C1 DD2`?
20:35:39 <edrx> aaah! trying!
20:36:07 <edrx> works! thanks! =)
20:37:59 <edrx> wait =(
20:38:06 <edrx> if I need these two lines:
20:38:08 <edrx> instance C1 DD2
20:38:08 <edrx> instance C2 DD2
20:38:36 <edrx> then what is the role of the "C1 a =>" in "class C1 a => C2 a where ..."?
20:39:33 × archsinner quits (~archsinne@2603-9000-8708-30f2-0000-0000-0000-070f.inf6.spectrum.com) (Client Quit)
20:39:34 <geekosaur> "you must have a C1 instance in order to have a C2 instance"
20:39:49 <geekosaur> which is why I called it prerequisite instead of superclass
20:39:58 <edrx> aaaaahhhhh!!!!
20:42:16 <geekosaur> I'll refer you back tyo the Ord class I showed you: in order to do Ordering operations on a type, you first need to be able to do equality (Eq typeclass) on it
20:42:42 <geekosaur> this is different from OOP notions of "superclass", which is why I call it "prerequisite" instead
20:43:12 <edrx> yes, now it's clear!
20:47:15 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
20:48:11 × coot quits (~coot@213.134.165.79) (Quit: coot)
20:48:55 <edrx> is there a syntax for joining "instance C1 DD2" and "instance C2 DD2" into a single "instance" declaration? is the "where" after it going to be able to define methods for both C1 and C2?
20:49:11 <geekosaur> there is not and it cannot
20:49:43 <edrx> ok, makes some sense
20:49:59 <geekosaur> we don't normally relate things that way
20:50:02 <edrx> it will make more sense after I understand more details, I think
20:51:16 <ski> "you have to declare the instance for C1 before you can declare the instance for C2" -- well, you can actually do it syntactically later, in the source (because all declarations in a module can be mutually recursive, or out-of-order). but conceptually, it still holds that you need to declare the prerequisite/"superclass" instances, before you'll be allowed to declare the instance for the particular class
20:51:16 <geekosaur> Applicative to Monad is close, but even there there's an exception: ZipLists are Appplicative but not Monad. but otherwise it *would* be convenient to combine them because not only do you need Applicative to get Monad, but they have to be related in a specific way to work properly
20:52:03 <monochrom> EvanR: You may like to know that you can either go "instance Show1 f => Show (Fix f)" or turn on QuantifiedConstraints, UndecidableInstances and go "instance (forall a. Show a => Show (f a)) => Show (Fix f)"
20:52:51 <EvanR> yeah the Show1 f is what I'm still working on
20:52:56 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
20:53:18 <dolio> Show1 predates quantified constraints.
20:53:49 <monochrom> Show1 is probably motivated by lacking QuantifiedConstraints back then.
20:53:58 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Client Quit)
20:54:02 × jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
20:54:04 <dolio> Right.
20:54:23 jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
20:54:25 <ski> (oh, a pet peeve of mine : when people have two classes (perhaps with a common superclass), and claim that when constraints for both are in force for a type, that means that the methods of the two classes are expected to interact in a certain way according to some laws. this does not make sense, imho. you could have party A make one instance, party B make another instance, and then party C try to use both
20:54:31 <ski> instances, and get confused when they don't cohere. the proper way to solve this is to make a common subclass (possibly with zero methods), that specifies the intended interaction laws)
20:54:44 <monochrom> You can almost read liftShowsPrec's type "(Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> f a -> ShowS" as "Show a => Int -> f a -> ShowS".
20:55:28 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
20:57:14 <dolio> I think originally it was literally just a proxy for the quantified constraint, but it's somewhat more useful/flexible to lift a showing function than lift a Show instance (effectively).
21:00:55 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 244 seconds)
21:03:35 × chomwitt quits (~chomwitt@2a02:587:dc14:f500:f42c:42aa:75f3:5bbf) (Remote host closed the connection)
21:03:48 <edrx> ...aha, and this explains how functor laws, monad laws, etc, work: https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/rewrite_rules.html =)
21:05:20 dmwit joins (~dmwit@2600:4040:264a:df00:422e:910b:6593:d3fb)
21:05:28 talismanick joins (~talismani@2601:200:c100:c9e0::24ac)
21:05:42 ellensol joins (~ellen@178-78-210-152.customers.ownit.se)
21:08:16 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:08:17 × jargon quits (~jargon@184.101.88.60) (Remote host closed the connection)
21:08:24 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
21:08:35 LukeHoersten joins (~LukeHoers@user/lukehoersten)
21:10:54 × Haematophage quits (~colere@about/linux/staff/sauvin) (Ping timeout: 265 seconds)
21:10:59 Colere joins (~colere@about/linux/staff/sauvin)
21:13:09 Furor joins (~colere@about/linux/staff/sauvin)
21:13:42 <ski> hololeap : `StateT s (LogicT m) a' would not give you non-backtrackable state (being state that survives backtracking). not quite sure atm if `LogicT m (StateT s m) a' would, or if maybe you'd have to splice the `StateT s' inbetween the two `ContT's in `forall o. ContT () (ContT o m) a'
21:13:51 <ski> (hololeap : and if the only difference between that and `LogicT o (StateT s m) a' is that the latter also produces the final state .. hm, i guess it depends on whether it (the inner `ContT') does nqCPSy things or not)
21:14:08 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
21:14:08 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
21:14:08 wroathe joins (~wroathe@user/wroathe)
21:14:32 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:14:52 <ski> edrx : btw, "Interface-passing style" by Fare in 2010-02-17 at <https://fare.livejournal.com/155094.html> might be interesting
21:16:15 × Colere quits (~colere@about/linux/staff/sauvin) (Ping timeout: 252 seconds)
21:16:18 × dmwit quits (~dmwit@2600:4040:264a:df00:422e:910b:6593:d3fb) (Ping timeout: 252 seconds)
21:19:50 <edrx> ski: it has lots of good links! thanks! =)
21:21:08 <ski> edrx : no, laws associated with type class methods are not (necessarily) rewrite `RULES'
21:21:57 <edrx> where can I find more about that?
21:22:06 <geekosaur> edrx, rewrite rules are about optimization, not laws. they often *assume* law-abiding instances, but they are not in and of themselves laws
21:22:35 <geekosaur> usually useful laws can't actually be written in Haskell
21:23:40 <ski> edrx : anyway, a Java interface `Widget' more or less corresponds to `exists a. Widget a *> a' in Haskell, where `Widget a' would describe a type class where every method takes (exactly) one `a' as input (and otherwise does not reference `a') .. but to explain that more, i'd have to explain `exists' and `*>'
21:23:41 <geekosaur> there are other languages where you *can* write out the laws, such as Agda and Idris. (at a different price: you must not only carry around proofs for the laws, but you may take a speed hit during compilation or sometimes runtime)
21:24:08 × kenran quits (~user@user/kenran) (Remote host closed the connection)
21:26:28 <ski> methods in Java classes & interfaces implicitly take an object (`this') as input (and can reach into its innards). methods in Haskell type classes don't. however, they may take multiple `a's as in put ("binary methods") or produce `a's as output ("clone methods") (possibly being overloaded *only* on the result type, e.g. `readsPrec :: Read a => Int -> String -> [(a,String)]',`minBound,maxBound :: Bounded a
21:26:34 <ski> => a',`return :: Monad m => a -> m a',..)
21:27:29 leungbk joins (~user@cpe-142-129-149-172.socal.res.rr.com)
21:28:02 jargon joins (~jargon@184.101.88.60)
21:28:09 <ski> (being able to take multiple `a's as input may make you think a little about multi-methods (although therey's no run-time dispatching based on the particular kind of arguments you get, with type classes). it should probably make you think more about Abstract Data Types, where you can have `merge'-operations that take multiple data structures, and are able to see through the abstraction for all of them
21:28:15 <ski> (unlike in OO))
21:30:30 <ski> edrx : did i already link you to the "On Understanding .." papers ?
21:31:43 <edrx> if you did then I saved only the links, not the papers... can you send me them again?
21:32:24 <ski> "On Understanding Types, Data Abstraction, and Polymorphism" by Luca Cardelli,Peter Wegner in 1985-12 at <http://lucacardelli.name/Papers/OnUnderstanding.A4.pdf> ; "On Understanding Data Abstraction, Revisited" by William R. Cook in 2009-10 at <https://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf>
21:32:34 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
21:35:13 <edrx> thanks!
21:35:50 <edrx> the paper by Cardelli and Wegner was one of the first papers on Type Theory that I stumbled on... but it didn't make any sense to me at that time =P
21:36:01 <ski> first one talks about different notions of polymorphism, and also (iirc) talks a bit about abstract types, how they relate to existential quantification
21:36:43 <ski> while later paper talks a bit more about OO objects, and possibly about how that (in a different way) relates to existential quantification
21:36:53 <ski> TaPL also talks about these things, in some chapters
21:37:05 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 244 seconds)
21:37:34 gnawk joins (~gnawk@76-196-232-104.lightspeed.sndgca.sbcglobal.net)
21:37:55 <ski> @where TaPL
21:37:55 <lambdabot> "Types and Programming Languages" by Benjamin C. Pierce in 2002-02-01 at <https://www.cis.upenn.edu/~bcpierce/tapl/>
21:39:26 × vorpuni quits (~pvorp@2001:861:3881:c690:f9de:fbcb:2100:7597) (Remote host closed the connection)
21:40:17 <ski> edrx : oh, you might also find "Polymorphic Type Inference" by Michael I. Schwartzbach in 1995-03 at <https://cs.au.dk/~amoeller/mis/typeinf.p(s|df)>,<https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.1493> helpful
21:40:57 <edrx> totally unrelated question...
21:42:16 × michalz quits (~michalz@185.246.207.203) (Remote host closed the connection)
21:43:16 <edrx> thanks! =)
21:43:25 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
21:44:26 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
21:44:44 <edrx> in one of the courses that I teach I am experimenting with diagrams like the ones here, in pages 7 and 8 - http://angg.twu.net/LATEX/2022-1-C2-infs-e-sups.pdf#page=7
21:46:13 <edrx> in which I do a set comprehensions and quantifications with some extra annotations - for example, instead of just ∀ x ∈ {7,8,9}. 2.5 ≤ f(x)
21:47:03 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
21:47:14 × gnawk quits (~gnawk@76-196-232-104.lightspeed.sndgca.sbcglobal.net) (Remote host closed the connection)
21:47:41 <ski> i'm not sure what the `em's are intended to mean
21:47:51 <edrx> the extra annotations can say things like "draw the result of 2.5 ≤ f(x) at the point (x,f(x)) using the colors that I use for truth-values"
21:47:58 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
21:48:26 <edrx> "em" means "in", but I think that my explanation here is going to be clearer
21:48:59 <ski> mhm
21:49:58 kdaishi joins (~Thunderbi@mobile-access-6df0e5-30.dhcp.inet.fi)
21:50:59 × jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
21:51:04 × titibandit quits (~titibandi@xdsl-212-8-150-57.nc.de) (Remote host closed the connection)
21:51:05 <edrx> suppose that we start with:
21:51:10 <edrx> [(x,y) | x <- [1..3], y <- [x..3], x+y<6]
21:51:51 <edrx> I would like to add a clause to it that means "plot (x,y)" - the code could look like this,
21:52:19 <edrx> [(x,y) | x <- [1..3], y <- [x..3], x+y<6, _ <- plot x y]
21:53:31 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c) (Ping timeout: 246 seconds)
21:53:34 <edrx> but to produce the diagrams that I need these plotting clauses would have to add plot information to an extra list... in other languages I could do things like
21:54:00 <edrx> [(x,y) | x <- [1..3], y <- [x..3], x+y<6, _ <- table.insert(plotinfo, {x,y})]
21:54:30 <edrx> where the table.insert would modify that array plotinfo
21:55:41 <edrx> how would you do that in Haskell? in my beginner's view this seems to need several comprehensions running in parallel, or several "collect" clauses in a Common Lisp "loop"...
21:57:19 × leungbk quits (~user@cpe-142-129-149-172.socal.res.rr.com) (Ping timeout: 252 seconds)
21:58:47 × LukeHoersten quits (~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:00:03 × edrx quits (~Eduardo@2804:18:580b:d1fe:c1d0:9f8d:e583:678c) (Ping timeout: 248 seconds)
22:00:15 LukeHoersten joins (~LukeHoers@user/lukehoersten)
22:00:21 nate3 joins (~nate@98.45.169.16)
22:02:00 jpds1 joins (~jpds@gateway/tor-sasl/jpds)
22:02:28 × acidjnk_new quits (~acidjnk@p200300d6e7137a32a8f89e31b171299c.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
22:05:03 jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff)
22:07:36 <ski> @tell edrx hm, i think i would either look into one of the `ListT' alternatives (including `LogicT') (possibly also using `MonadComprehensions'), see if i could insert `IO' or `StateT' or `WriterT' into that for the plotting; or try to go for `ContT' directly .. or else separate the plot stuff, doing it to the result of this comprehension
22:07:36 <lambdabot> Consider it noted.
22:08:43 <ski> @tell edrx well, the various streaming packages could possibly also be worthwhile to take a look at
22:08:43 <lambdabot> Consider it noted.
22:08:49 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:509f:aac5:1bc5:5910) (Remote host closed the connection)
22:11:49 <ski> @tell edrx unrelated. you asked about `={...}=' notation for justifying equality reasoning steps earlier. i got that particular notation from (short paper, six pages) "Equality proofs in Cayenne" by augustss in 1999 at <https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.37.9415>
22:11:49 <lambdabot> Consider it noted.
22:20:27 qrpnxz joins (~qrpnxz@fsf/member/qrpnxz)
22:20:39 × LukeHoersten quits (~LukeHoers@user/lukehoersten) (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:20:56 rockymarine joins (~rocky@user/rockymarine)
22:22:37 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
22:22:44 <qrpnxz> lexi-lambda: hey lexi, i saw that delim prim ops got merged. Congrats! Has there been research into using these for coroutines? I'm very excited to play around with them for that kind of thing. Do you know what GHC release will have them?
22:24:48 anthezium joins (~anthezium@75.164.54.59)
22:25:41 jpds1 is now known as jpds
22:26:21 × anthezium quits (~anthezium@75.164.54.59) (Client Quit)
22:27:35 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:509f:aac5:1bc5:5910)
22:32:53 × talismanick quits (~talismani@2601:200:c100:c9e0::24ac) (Ping timeout: 244 seconds)
22:34:03 anthezium joins (~ted@75.164.54.59)
22:35:05 × anthezium quits (~ted@75.164.54.59) (Client Quit)
22:40:21 wroathe joins (~wroathe@user/wroathe)
22:41:01 anthezium joins (~ted@75.164.54.59)
22:42:51 Kaipei joins (~Kaiepi@142.68.249.28)
22:44:57 <anthezium> hey folks, is there a preferred way to do list operations on type-level lists lifted with DataKinds? Map a closed type family over a list of types, for instance?
22:45:35 <anthezium> I see there is a deprecated library on hackage for this (type-lists), but I am assuming it was deprecated in favor of something better
22:46:21 × Kaiepi quits (~Kaiepi@142.68.249.28) (Ping timeout: 260 seconds)
22:47:13 <geekosaur> I, uh, suspect there won't truly be anything better until Dependent Haskell happens
22:47:26 <geekosaur> also I don't find type-lists, did you mean something else?
22:51:27 × Midjak quits (~Midjak@82.66.147.146) (Quit: Leaving)
22:53:47 × kdaishi quits (~Thunderbi@mobile-access-6df0e5-30.dhcp.inet.fi) (Ping timeout: 252 seconds)
22:54:09 <anthezium> thanks geekosaur! oops, it is type-list: https://hackage.haskell.org/package/type-list-0.5.0.0
22:55:59 <geekosaur> I nnote it has a dependency on an older version of singletons; have you checked to see if newer versions supersede it?
22:58:14 <anthezium> geekosaur: Ah, Data.List.Singletons is what I want
22:58:21 <anthezium> geekosaur: thank you!
22:58:31 <anthezium> geekosaur: in singletons-base
23:04:22 jmdaemon joins (~jmdaemon@user/jmdaemon)
23:05:45 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
23:06:01 gentauro joins (~gentauro@user/gentauro)
23:07:50 × ddellacosta quits (~ddellacos@143.244.47.90) (Ping timeout: 268 seconds)
23:10:43 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 258 seconds)
23:13:07 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
23:19:01 × nate3 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
23:36:01 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 258 seconds)
23:37:31 <maralorn> Aaargh, note the difference between cabal run <prog> +RTS -s and cabal run -- <prog> +RTS -s …
23:37:34 <maralorn> I have been staring at the memory consumption of cabal for days.
23:37:53 <maralorn> without knowing that it wasn‘t about my programm at all …
23:38:13 <maralorn> Thinking I would be seeing some patterns and changes x
23:38:26 <geekosaur> alias R='cabal run --'
23:38:39 <maralorn> But I was actually reading tealeaves there …
23:38:50 <geekosaur> (I actually have that alias)
23:39:12 jpds joins (~jpds@gateway/tor-sasl/jpds)
23:39:32 <maralorn> The other day when we were talking about the weird memory profile of my program in #ghc, that was also just cabal /o\
23:40:00 <maralorn> And it was so weird because cabal basically doesn‘t do anything other than waiting for <prog> to finish.
23:40:27 <maralorn> Mistery solved.^^
23:42:15 vorpuni joins (~pvorp@2001:861:3881:c690:f9de:fbcb:2100:7597)
23:46:39 burnsidesLlama joins (~burnsides@client-8-86.eduroam.oxuni.org.uk)
23:46:41 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
23:47:13 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
23:51:56 × burnsidesLlama quits (~burnsides@client-8-86.eduroam.oxuni.org.uk) (Ping timeout: 244 seconds)
23:52:43 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)

All times are in UTC on 2022-10-01.