Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-16 12:17:09 ukari joins (~ukari@unaffiliated/ukari)
2021-03-16 12:18:13 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection)
2021-03-16 12:18:48 × dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 245 seconds)
2021-03-16 12:18:59 <curiousgay> olligobber: that's a container called Set
2021-03-16 12:19:16 heatsink joins (~heatsink@2600:1700:bef1:5e10:7c0e:3b57:dfb:2cb4)
2021-03-16 12:19:28 <merijn> curiousgay: Set is a common name for what we in Haskell call "types" in type theory
2021-03-16 12:19:42 <merijn> (or was Set for kinds? I forget)
2021-03-16 12:19:55 <merijn> Anyway, Set is rather ambiguous
2021-03-16 12:20:27 <curiousgay> merijn: so in type theory a type class can be considered a set class?
2021-03-16 12:20:59 molehillish joins (~molehilli@ip98-167-226-26.ph.ph.cox.net)
2021-03-16 12:21:24 <merijn> I don't think anyone would recognise/understand that term
2021-03-16 12:21:38 × aarvar quits (~foewfoiew@2607:fb90:f33:157e:1175:1d12:3f7a:f4b9) (Ping timeout: 264 seconds)
2021-03-16 12:21:55 <merijn> So..."no"?
2021-03-16 12:23:22 <curiousgay> hm, set is actually a mathetical term for types, where function takes a value in set A and produces a value in set B
2021-03-16 12:24:02 × heatsink quits (~heatsink@2600:1700:bef1:5e10:7c0e:3b57:dfb:2cb4) (Ping timeout: 264 seconds)
2021-03-16 12:24:25 <hpc> sort of
2021-03-16 12:24:38 <hpc> something like natural numbers is a set, but then there's also power sets and other weird things
2021-03-16 12:26:29 codygman` joins (~user@47.186.207.161)
2021-03-16 12:26:35 dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-16 12:26:51 zebrag joins (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr)
2021-03-16 12:26:58 <curiousgay> I thought that "set" instead of "class" would sound more mathematical and less object-oriented
2021-03-16 12:27:18 <merijn> What makes "class" object oriented?
2021-03-16 12:27:52 <merijn> Besides bias from people who learned OO first
2021-03-16 12:28:40 Sorna joins (~Sornaensi@077213203030.dynamic.telenor.dk)
2021-03-16 12:28:46 <merijn> "class" as word describing "a collection of things matching some common characteristics" is hardly an OO invention
2021-03-16 12:29:13 <dminuoso> curiousgay: Also, "instance" should have been "member" instead. ;)
2021-03-16 12:29:24 <dminuoso> `member Functor [] where ...`
2021-03-16 12:29:31 <ocharles> Is there anyway to force cabal to "keep going" when building a multi-component project? It's weird, if one component fails to build, that'll usually stop cabal, but restarting cabal will try at least one more thing. Constantly re-running cabal gets me to a fixed point where only one thing is failing, but it's annoying to keep having to up-enter
2021-03-16 12:29:35 <curiousgay> merijn: but that's also a definition of set
2021-03-16 12:29:39 zar joins (~zar@fw1.ciirc.cvut.cz)
2021-03-16 12:29:45 <merijn> There's a reason why people use terms like "class" when describing, say, "a class of ships"
2021-03-16 12:29:50 <Logio> class is also a mathematical term, when considering set-like things that cannot be sets
2021-03-16 12:30:11 Sorny joins (~Sornaensi@79.142.232.102.static.router4.bolignet.dk)
2021-03-16 12:30:11 <dminuoso> isnt `type` yet another synonym for `set` too?
2021-03-16 12:30:25 <curiousgay> it is
2021-03-16 12:30:34 <Logio> types have different axioms, going to fundamentals
2021-03-16 12:31:04 <Logio> intuitively they are similar
2021-03-16 12:31:22 <Uniaika> ocharles: not that I know of :/ But if it's not in the Cabal guide, could you please open a ticket asking to fix this?
2021-03-16 12:31:24 <Taneb> dminuoso: you can do different things with types and sets! You can't take the intersection of two types, for example
2021-03-16 12:31:28 <Uniaika> we ought to have more How-Tos
2021-03-16 12:31:28 <curiousgay> dminuoso: when I was learning OO, "instance" was the variable holding a value of some type
2021-03-16 12:31:38 <merijn> ocharles: afaik there isn't
2021-03-16 12:31:44 <dminuoso> Taneb: Sure I can. It's by definition always Void! :P
2021-03-16 12:31:49 × dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 276 seconds)
2021-03-16 12:31:53 <ocharles> Uniaika: I don't think there's a how to if it can't be done :) I think I'll raise an issue. Might as well add to the pile of 1000 ;)
2021-03-16 12:32:17 <ocharles> also, hi!
2021-03-16 12:32:23 <merijn> ocharles: Per component builds aren't that well sorted out yet, tbh
2021-03-16 12:32:40 × Sornaensis quits (~Sornaensi@79.142.232.102.static.router4.bolignet.dk) (Ping timeout: 265 seconds)
2021-03-16 12:32:48 <codygman`> Merijn the 'query in progress issue' for postgres with persistent/Data.Pool was because of an imprecise exception we found out: https://github.com/yesodweb/persistent/issues/1199#issuecomment-799803365
2021-03-16 12:33:10 <curiousgay> Taneb: fair enough :)
2021-03-16 12:33:16 <Logio> dminuoso: by what definition though?
2021-03-16 12:33:46 × Sorna quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 276 seconds)
2021-03-16 12:34:14 <dminuoso> Logio: If I consider a type to be a collection of values, then they dont intersect since each value has a unique type.
2021-03-16 12:34:15 <merijn> codygman`: Spidey sense...tingling
2021-03-16 12:34:24 <dminuoso> Though, with polymorphic values, this gets more interesting I suppose.
2021-03-16 12:34:36 <dminuoso> (Is a polymorphic value an intersection between types?)
2021-03-16 12:35:08 <Logio> dminuoso: you haven't defined intersection, so you can't say that they do not intersect
2021-03-16 12:35:12 <dminuoso> I suppose
2021-03-16 12:35:42 × cr4zsci quits (b07a57f1@176.122.87.241) (Quit: Connection closed)
2021-03-16 12:35:48 <curiousgay> even if intersection between types was possible, it doesn't sound practical at all
2021-03-16 12:35:49 <dminuoso> I was just implicitly burrowing the set theoretic notion of intersection.
2021-03-16 12:36:04 <Logio> dminuoso: burrowing indeed :)
2021-03-16 12:36:24 <Logio> burying definitions is what leads to ambiguity
2021-03-16 12:36:24 <curiousgay> s/types/types or type classes/
2021-03-16 12:37:33 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 245 seconds)
2021-03-16 12:37:58 <merijn> codygman`: there's a whole bunch of unsafe foreign imports in in postgresql-libpq, now I'm wondering it that's messing with exceptions
2021-03-16 12:38:04 <lortabac> I am pretty sure I have seen type systems in which intersection is possible
2021-03-16 12:39:07 <codygman`> merijn: I was reading that section in Parallel and Concurrent programming and that made me think the same. It doesn't help that running PQ.finish, PQ.cancel, PQ.flush etc all seemingly have no effect when the connection is busy.
2021-03-16 12:40:31 <merijn> codygman`: unsafe foreign imports make me worried, because I don't trust anyone to be sufficiently paranoid about them :p
2021-03-16 12:40:45 <codygman`> I will remind you though that I wasn't able to reproduce the same issue with postgresql-simple and Data.Pool... but 1) I might have not made them perfectly equivalent and 2) unsafe foreign import could be it and could be some interaction that only happens between libpq and persistent for... reasons
2021-03-16 12:41:29 <lortabac> if I remember correctly, there was a type system for Erlang where each type was a sum of possible constructors, so you could have for example the type true+false and the type true+false+maybe
2021-03-16 12:41:30 <merijn> I mean, it could be a bug in postgresql-simple too :p
2021-03-16 12:41:55 <codygman`> I also found a use of atomicModifyIORef that didn't have a seq soon after in persistent... but I think that would only affect performance?
2021-03-16 12:42:49 <merijn> I mean, what if postgresql-simple assumes something is threadsafe, but it isn't?
2021-03-16 12:43:08 geowiesnot_bis joins (~user@87-89-181-157.abo.bbox.fr)
2021-03-16 12:43:40 <merijn> codygman`: Or, what if postgres uses thread local storage, meaning operations on a connection should always be from the same thread or...
2021-03-16 12:43:55 geekosaur joins (82650c7a@130.101.12.122)
2021-03-16 12:44:34 × mouseghost quits (~draco@wikipedia/desperek) (Read error: Connection reset by peer)
2021-03-16 12:44:36 <codygman`> I did at least try using withAsyncBound for that last problem... There could have been confounding factors though.
2021-03-16 12:44:39 berberman joins (~berberman@unaffiliated/berberman)
2021-03-16 12:44:42 × coot quits (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-03-16 12:44:51 <codygman`> This might corroborate your suspicions of postgresql-simple: https://github.com/lpsmith/postgresql-simple/issues/177#issuecomment-229001308
2021-03-16 12:44:57 × berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
2021-03-16 12:45:06 mouseghost joins (~draco@87-206-9-185.dynamic.chello.pl)
2021-03-16 12:45:06 × mouseghost quits (~draco@87-206-9-185.dynamic.chello.pl) (Changing host)
2021-03-16 12:45:06 mouseghost joins (~draco@wikipedia/desperek)
2021-03-16 12:45:55 <merijn> codygman`: oh!
2021-03-16 12:46:14 <merijn> codygman`: I wonder if somewhere deep down that calls a foreign import that's marked as interruptible
2021-03-16 12:46:37 <merijn> codygman`: Leading the RTS to interrupt it with a signal, causing libpq to report an error
2021-03-16 12:47:21 <merijn> codygman`: Because timeout shouldn't work on code blocked in a foreign call
2021-03-16 12:47:27 <merijn> Unless it's marked interruptible
2021-03-16 12:47:48 <merijn> but, tbh, nobody should be using interruptible, because the state of GHC signal handling is a clusterfuck
2021-03-16 12:48:39 <codygman`> I just searched postgresql-simple and see no uninterruptible: https://github.com/haskellari/postgresql-simple/search?q=uninterruptible
2021-03-16 12:48:42 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2021-03-16 12:49:02 <merijn> interruptible, not uninterruptible :p
2021-03-16 12:49:17 <codygman`> :D None for that one either
2021-03-16 12:49:18 <merijn> codygman`: foreign calls are uninterruptible by default
2021-03-16 12:51:48 <codygman`> Hm it sounds like PG.rollback doesn't block either: https://github.com/lpsmith/postgresql-simple/issues/177#issuecomment-229089849
2021-03-16 12:51:49 <codygman`>
2021-03-16 12:52:11 <merijn> Rule 1 of multi-threaded/concurrent programming

All times are in UTC.