Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-17 08:24:47 <dminuoso> If you want constant space.
2020-11-17 08:24:49 <dminuoso> No way around it
2020-11-17 08:25:25 <dminuoso> Look into conduit, pipe, streaming, etc
2020-11-17 08:25:30 <c_wraith> meh. streaming libraries don't guarantee constant space either. If you generate an arbitrary-size data structure, they use arbitrary space
2020-11-17 08:25:30 <ocamler> i see, nd pointers to a library? does conduit work here
2020-11-17 08:25:38 britva joins (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4)
2020-11-17 08:25:45 <ocamler> ah yeah in my case messages are constant sized
2020-11-17 08:25:54 × britva quits (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4) (Client Quit)
2020-11-17 08:25:57 <dminuoso> Sure, conduit would work
2020-11-17 08:26:29 kritzefitz joins (~kritzefit@fw-front.credativ.com)
2020-11-17 08:26:38 britva joins (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4)
2020-11-17 08:26:40 × ocamler quits (3263cbdb@50.99.203.219) (Remote host closed the connection)
2020-11-17 08:27:02 × britva quits (~britva@2a02:aa13:7240:2980:7da5:a1a0:c038:90b4) (Client Quit)
2020-11-17 08:27:07 ocamler joins (3263cbdb@50.99.203.219)
2020-11-17 08:27:40 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
2020-11-17 08:27:43 <PacoV> c_wraith: there is no function is the libs right, I've to write it.
2020-11-17 08:27:58 × ocamler quits (3263cbdb@50.99.203.219) (Remote host closed the connection)
2020-11-17 08:28:03 <c_wraith> It's just toList and fromList
2020-11-17 08:28:08 × drbean quits (~drbean@TC210-63-209-182.static.apol.com.tw) (Ping timeout: 256 seconds)
2020-11-17 08:29:09 <dminuoso> c_wraith: That's just necessity vs sufficiency. It is necessary to use a streaming library if you want constant-space. :p
2020-11-17 08:29:09 <c_wraith> https://hackage.haskell.org/package/unordered-containers-0.2.13.0/docs/Data-HashMap-Strict.html#v:toList and https://hackage.haskell.org/package/containers-0.6.4.1/docs/Data-Map-Strict.html#v:fromList
2020-11-17 08:29:15 <dminuoso> But certainly not sufficient.
2020-11-17 08:29:51 <c_wraith> Meh, I'm perfectly capable of using readFile in constant space - and perfectly capable of bailing out and saying it's the wrong tool for some problems.
2020-11-17 08:29:56 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
2020-11-17 08:31:07 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Remote host closed the connection)
2020-11-17 08:31:27 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
2020-11-17 08:32:00 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Client Quit)
2020-11-17 08:32:29 × cinimod_ quits (uid93893@gateway/web/irccloud.com/x-wrzxrzpvqphwukyg) (Quit: Connection closed for inactivity)
2020-11-17 08:32:29 <dminuoso> Well yeah, perhaps necessary is a bit too strong. But it's a lot more hassle to guarantee constant space because you have to be mindful of strictness, about accidentally leaving references
2020-11-17 08:32:37 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
2020-11-17 08:32:47 Boomerang_ joins (~Boomerang@xd520f68c.cust.hiper.dk)
2020-11-17 08:32:55 × Boomerang_ quits (~Boomerang@xd520f68c.cust.hiper.dk) (Remote host closed the connection)
2020-11-17 08:32:55 <dminuoso> (And the GHC simplifier can stab you in the back if it creates sharing where you dont expect it to)
2020-11-17 08:33:36 <dminuoso> It's hard to guarantee constant space and deterministic behavior with lazy IO
2020-11-17 08:33:52 × ulidtko quits (~ulidtko@193.111.48.79) (Read error: Connection reset by peer)
2020-11-17 08:35:03 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
2020-11-17 08:35:23 cfricke joins (~cfricke@unaffiliated/cfricke)
2020-11-17 08:35:26 × cfricke quits (~cfricke@unaffiliated/cfricke) (Client Quit)
2020-11-17 08:35:43 cfricke joins (~cfricke@unaffiliated/cfricke)
2020-11-17 08:35:48 × nados quits (~dan@69-165-210-185.cable.teksavvy.com) (Ping timeout: 272 seconds)
2020-11-17 08:36:01 borne joins (~fritjof@200116b8641c82003b6e7a122d52ed4c.dip.versatel-1u1.de)
2020-11-17 08:37:07 × Sgeo_ quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-11-17 08:37:31 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-11-17 08:40:07 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:c078:1a2e:5eb7:90ae) (Ping timeout: 272 seconds)
2020-11-17 08:40:41 oish joins (~charlie@228.25.169.217.in-addr.arpa)
2020-11-17 08:42:06 × Feuermagier_ quits (~Feuermagi@213.178.26.41) (Quit: Leaving)
2020-11-17 08:42:16 Feuermagier joins (~Feuermagi@213.178.26.41)
2020-11-17 08:45:33 × p3n_ quits (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) (Quit: ZNC 1.8.2 - https://znc.in)
2020-11-17 08:48:28 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection)
2020-11-17 08:49:03 × jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-17 08:49:25 sord937 joins (~sord937@gateway/tor-sasl/sord937)
2020-11-17 08:52:10 ericsagn1 joins (~ericsagne@2405:6580:0:5100:bab2:cd00:4d2d:7b87)
2020-11-17 08:52:43 m0rphism joins (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de)
2020-11-17 08:52:45 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-11-17 08:54:46 ulidtko joins (~ulidtko@193.111.48.79)
2020-11-17 08:55:35 raichoo joins (~raichoo@213.240.178.58)
2020-11-17 08:56:01 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-11-17 08:56:53 jedws joins (~jedws@101.184.175.183)
2020-11-17 08:56:57 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-zpttjkkcshfghzwp) (Quit: Connection closed for inactivity)
2020-11-17 08:57:23 teddpole joins (~teddpole7@2404:ab80:b:19c0:19e5:eb0d:10d8:2984)
2020-11-17 08:58:51 teddpole parts (~teddpole7@2404:ab80:b:19c0:19e5:eb0d:10d8:2984) ()
2020-11-17 09:00:01 × afb quits (~afb@185.163.110.116) ()
2020-11-17 09:00:04 × Fernando-Basso[m quits (fernando-b@gateway/shell/matrix.org/x-wqwrqhbwxnrfqluo) (Quit: Idle for 30+ days)
2020-11-17 09:02:34 Aquazi joins (uid312403@gateway/web/irccloud.com/x-fwnbgopbizdwfbcr)
2020-11-17 09:02:39 Yumasi joins (~guillaume@2a01cb09b06b29ead46a3aeadfb0149b.ipv6.abo.wanadoo.fr)
2020-11-17 09:03:08 kuribas joins (~user@ptr-25vy0ia86bt3ifa9hy0.18120a2.ip6.access.telenet.be)
2020-11-17 09:03:08 jespada joins (~jespada@90.254.245.49)
2020-11-17 09:03:40 <kuribas> is considered good practice to use empty type classes as constraints?
2020-11-17 09:04:10 <dminuoso> Considering I haven't it used in practice anywhere..
2020-11-17 09:04:16 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-11-17 09:04:20 <dminuoso> *seen it
2020-11-17 09:04:38 <kuribas> it's to see if a relation between phantom types holds
2020-11-17 09:04:51 <opqdonut> yeah that sounds about right
2020-11-17 09:05:10 <opqdonut> empty type families are common once you start doing type-level programming
2020-11-17 09:05:29 <kuribas> opqdonut: what's an empty type family?
2020-11-17 09:05:53 _ashbreeze_ joins (~mark@72-161-253-71.dyn.centurytel.net)
2020-11-17 09:05:54 <dminuoso> I guess its similar to things like `data Direction = Left | Right`, it still falls prey to boolean blindness because it doesn't carry any proofs aroud.
2020-11-17 09:05:56 <opqdonut> err I mean non-associated type families, which are kinda equivalent to type classes with no contents (methods)
2020-11-17 09:06:47 <kuribas> opqdonut: you mean a boolean valued type family?
2020-11-17 09:06:56 <opqdonut> so something like `concat :: (Add k m n) => Vec k a -> Vec m a -> Vec n a` for length-indexed lists
2020-11-17 09:07:16 <opqdonut> no, I'm confused, ignore me
2020-11-17 09:07:25 × ashbreeze quits (~mark@184-157-32-219.dyn.centurytel.net) (Ping timeout: 264 seconds)
2020-11-17 09:07:32 <opqdonut> that would be `n ~ (Add k m)` or so with type families
2020-11-17 09:07:35 <kuribas> here Add k m n is a type class constraint no?
2020-11-17 09:07:46 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
2020-11-17 09:07:47 <opqdonut> yeah, I wrote the class equivalent
2020-11-17 09:07:53 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 260 seconds)
2020-11-17 09:08:37 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
2020-11-17 09:08:42 p3n joins (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1)
2020-11-17 09:08:42 <dminuoso> In general empty typeclasses feel not very useful because you can't do much with them
2020-11-17 09:08:48 × jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-17 09:09:12 <dminuoso> The fact that two things relate does imply some fact on the value level
2020-11-17 09:09:24 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2020-11-17 09:09:32 <dminuoso> kuribas: Are these plain single typeclasses or MPTC?
2020-11-17 09:09:38 <kuribas> then I would have 'True ~ IsSubClass k1 k2 => Object k2 -> Attribute k1 t -> m t
2020-11-17 09:09:40 <kuribas> dminuoso: MPTC
2020-11-17 09:09:43 <dminuoso> kuribas: with fundeps?
2020-11-17 09:09:49 <kuribas> dminuoso: no
2020-11-17 09:09:53 × PacoV quits (~pcoves@16.194.31.93.rev.sfr.net) (Quit: leaving)
2020-11-17 09:09:54 Netsu joins (5f84a760@96-167-132-95.pool.ukrtel.net)

All times are in UTC.