Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-12 06:05:11 Varis joins (~Tadas@unaffiliated/varis)
2021-03-12 06:05:16 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 06:05:26 nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 06:06:07 × plutoniix quits (~q@184.82.214.51) (Ping timeout: 265 seconds)
2021-03-12 06:09:00 shellin parts (bab726a6@186.183.38.166) ()
2021-03-12 06:10:03 × nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 06:12:24 aqd joins (~aqd@84.20.147.33)
2021-03-12 06:13:28 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
2021-03-12 06:17:52 graf_blutwurst joins (~user@2001:171b:226e:adc0:51ba:fe70:8240:4759)
2021-03-12 06:18:17 × xff0x_ quits (~xff0x@2001:1a81:520c:1100:8f7b:fec1:f600:70b) (Ping timeout: 260 seconds)
2021-03-12 06:19:14 xff0x_ joins (~xff0x@2001:1a81:520c:1100:ac8b:f992:eea7:f98a)
2021-03-12 06:20:10 × carlomagno quits (~cararell@148.87.23.9) (Quit: Leaving.)
2021-03-12 06:22:40 <nshepperd2> huh, apparently Data.Map.keysSet is not productive
2021-03-12 06:22:48 plutoniix joins (~q@184.82.214.51)
2021-03-12 06:23:14 <nshepperd2> i had just sort of assumed that it was, but of course it can't be because the definition of Data.Set.Set is fully strict
2021-03-12 06:24:26 nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 06:24:51 <nshepperd2> so something like Set.lookupLT x (Map.keysSet mymap) is actually O(n)
2021-03-12 06:27:28 ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 06:27:51 × Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007)
2021-03-12 06:30:03 × stree quits (~stree@68.36.8.116) (Quit: Caught exception)
2021-03-12 06:30:12 × Khisanth quits (~Khisanth@24.sub-174-244-147.myvzw.com) (Ping timeout: 246 seconds)
2021-03-12 06:30:29 stree joins (~stree@68.36.8.116)
2021-03-12 06:31:36 × ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 246 seconds)
2021-03-12 06:31:45 skdjnsdfknkjn joins (4962725d@c-73-98-114-93.hsd1.nm.comcast.net)
2021-03-12 06:32:04 sord937 joins (~sord937@gateway/tor-sasl/sord937)
2021-03-12 06:32:42 <curiousgay> monochrom: I didn't expect that learning Haskell will help me better understand object-oriented programming o_O
2021-03-12 06:33:09 × ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer)
2021-03-12 06:33:23 <siraben> curiousgay: in what regard?
2021-03-12 06:35:26 bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 06:35:32 × fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
2021-03-12 06:35:44 <curiousgay> siraben: it's just Haskell has polymorphism and inheritance, I thought inheritance is specific to OO and thought it's a harmful feature, but now I realize Haskell has the same kind of inheritance as Go - interface inheritance, the existence of which I didn't realize until now
2021-03-12 06:36:12 <siraben> multiple inheritance would be the harmful feature, right?
2021-03-12 06:36:26 <curiousgay> no
2021-03-12 06:36:40 <siraben> What's interface inheritance
2021-03-12 06:36:52 <siraben> oh it's like subtype polymorphism
2021-03-12 06:37:18 <curiousgay> both Go and Haskell support multiple inheritance, but in terms of interfaces
2021-03-12 06:37:46 <curiousgay> I guess you'll understand better if I say type classes in Haskell are interfaces
2021-03-12 06:38:09 <siraben> Right.
2021-03-12 06:38:35 × _Alleria quits (~AllahuAkb@2603-7000-3040-0000-84d6-f6e9-5a5d-a878.res6.spectrum.com) (Ping timeout: 240 seconds)
2021-03-12 06:38:58 <nshepperd2> interface inheritance as opposed to datatype inheritance
2021-03-12 06:39:17 dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 06:39:30 <curiousgay> well yeah, I still consider datatype inheritance being harmful, instead I prefer composition
2021-03-12 06:39:44 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-12 06:39:49 <siraben> Hm I'm not familiar with OOP terms, what's datatype inheritance?
2021-03-12 06:40:21 <nshepperd2> the OOP term would be 'class' inheritance
2021-03-12 06:40:28 × bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2021-03-12 06:40:30 <siraben> Oh ok.
2021-03-12 06:40:46 <nshepperd2> making a new class my smooshing together all fields and methods from an old class with new stuff
2021-03-12 06:41:05 <siraben> Does newtype solve the problem of having overlapping instances (e.g. additive or multiplicative monoid on Int)
2021-03-12 06:41:49 <c_wraith> > mappend 3 4 :: Sum Int
2021-03-12 06:41:52 <lambdabot> Sum {getSum = 7}
2021-03-12 06:41:52 Alleria_ joins (~AllahuAkb@2603-7000-3040-0000-ac9e-148c-2486-fb78.res6.spectrum.com)
2021-03-12 06:41:55 <c_wraith> > mappend 3 4 :: Product Int
2021-03-12 06:41:57 <lambdabot> Product {getProduct = 12}
2021-03-12 06:42:15 <siraben> Right, yes. Just wondering about what the specific problem is called in OOP
2021-03-12 06:42:18 <curiousgay> nshepperd2: I've seen terms implementation/code inheritance https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)
2021-03-12 06:43:03 <curiousgay> siraben: well, when there are multiple terms used to mean the same thing, it becomes confusing to explain
2021-03-12 06:43:07 arrowsvc_ joins (~arr@2.93.163.35)
2021-03-12 06:43:23 × nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 06:43:28 Khisanth joins (~Khisanth@24.sub-174-244-147.myvzw.com)
2021-03-12 06:43:48 × dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 06:44:13 <siraben> confusingly I've seen "covariant" in an OO context o.O
2021-03-12 06:44:37 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-12 06:45:21 <nshepperd2> the type of inheritance that haskell typeclasses have makes sense, because it has a rational interpretation as logical implication
2021-03-12 06:46:24 <nshepperd2> ie. considered as logical propositions, 'class Foo a => Bar a' just means that Bar a implies Foo a
2021-03-12 06:48:06 <nshepperd2> which in turn makes sense because there can only ever be one instance for a given type (there's never any question about 'which' Foo a is implied)
2021-03-12 06:48:08 × jneira quits (5127adbf@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.173.191) (Quit: Connection closed)
2021-03-12 06:48:09 <curiousgay> but now I'm confused what is object-oriented programming if Haskell is not one
2021-03-12 06:48:42 <curiousgay> to my brain Haskell feels like functional and object-oriented at the same time
2021-03-12 06:48:48 <siraben> nshepperd2: yeah
2021-03-12 06:49:07 <nshepperd2> whereas implementation/datatype/class inheritance is bad because it doesn't mean anything, it's just mashing things together to make new things
2021-03-12 06:51:23 dyeplexer joins (~lol@unaffiliated/terpin)
2021-03-12 06:51:27 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2021-03-12 06:52:04 <siraben> class inheritance isn't the same as subtyping?
2021-03-12 06:52:07 × waleee-cl quits (uid373333@gateway/web/irccloud.com/x-jncmlyhymogdqmtq) (Quit: Connection closed for inactivity)
2021-03-12 06:52:10 cfricke joins (~cfricke@unaffiliated/cfricke)
2021-03-12 06:54:32 <nshepperd2> well, subtyping is a rather general term
2021-03-12 06:54:54 <nshepperd2> you might say that class inheritance is a subtype of subtyping
2021-03-12 06:55:50 <nshepperd2> something like "class Foo : public Bar { ... }" in C++ means that Foo is a subtype of Bar, but that doesn't necessarily tell you anything useful
2021-03-12 06:56:15 [exa] joins (exa@unaffiliated/exa/x-5381537)
2021-03-12 06:56:28 × redmp quits (~redmp@172.58.30.171) (Quit: leaving)
2021-03-12 06:56:51 nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 06:57:04 johannes joins (~johannes@i577BCD21.versanet.de)
2021-03-12 06:57:09 <sshine_> siraben, subtyping is a more general concept, as far as I understand.
2021-03-12 06:57:19 johannes is now known as kenran
2021-03-12 06:57:48 <siraben> I see. I guess I should read the object calculus in TAPL or something, OOP is just so weird sometimes :P
2021-03-12 06:57:49 × kenran quits (~johannes@i577BCD21.versanet.de) (Remote host closed the connection)
2021-03-12 06:58:13 <sshine_> siraben, yeah, it seems like the OO concepts weren't made for formal rigor, so those who attempt it are in for a treat.
2021-03-12 06:58:13 johannes joins (~johannes@i577BCD21.versanet.de)
2021-03-12 06:58:35 <siraben> sshine_: yeah it's just like a compatibility relation ≤ on the set of types, I forget what kind of algebraic structure it induces
2021-03-12 06:59:03 <siraben> Ah, a lattice
2021-03-12 06:59:29 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-03-12 07:01:29 idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
2021-03-12 07:01:38 <sshine_> what are you up to lately, siraben?
2021-03-12 07:01:43 × nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 07:01:44 × zymurgy1 quits (~zymurgy@li607-220.members.linode.com) (Quit: WeeChat 1.4)
2021-03-12 07:01:59 zymurgy joins (~zymurgy@li607-220.members.linode.com)
2021-03-12 07:02:23 <siraben> sshine_: might be better to go to #haskell-offtopic
2021-03-12 07:02:44 investing joins (676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237)
2021-03-12 07:04:40 jumper149 joins (~jumper149@ip185225.wh.uni-hannover.de)

All times are in UTC.