Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 292 293 294 295 296 297 298 299 300 301 302 .. 17987
1,798,654 events total
2021-06-05 14:31:49 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
2021-06-05 14:32:30 ddellacosta joins (~ddellacos@86.106.143.183)
2021-06-05 14:35:55 <boxscape> % class A a where {test :: a -> ()}; instance A Int where {test = const ()}
2021-06-05 14:35:55 <yahb> boxscape:
2021-06-05 14:35:56 <boxscape> % test 45
2021-06-05 14:35:56 <yahb> boxscape: ; <interactive>:6:1: error:; * Ambiguous type variable `a0' arising from a use of `test'; prevents the constraint `(A a0)' from being solved.; Probable fix: use a type annotation to specify what `a0' should be.; These potential instance exist:; instance [safe] A Int -- Defined at <interactive>:5:45; * In the expression: test 45; In an equation for `it': it = test 45
2021-06-05 14:35:58 <boxscape> % class A a where {test :: a -> ()}; instance A Int where {test = const ()}; instance A Double where {test = const ()}
2021-06-05 14:35:58 <yahb> boxscape:
2021-06-05 14:36:00 <boxscape> % test 45
2021-06-05 14:36:00 <yahb> boxscape: ()
2021-06-05 14:36:10 <boxscape> it does seem strange to me that adding an instance makes things *less* ambiguous
2021-06-05 14:36:13 <boxscape> but I guess I can accept it
2021-06-05 14:36:49 <geekosaur> defaulting's a bit odd
2021-06-05 14:37:13 <geekosaur> the list of classes that can be defaulted through without ExtendedDefaultRules is also a bit arbitrary
2021-06-05 14:37:30 × ddellacosta quits (~ddellacos@86.106.143.183) (Ping timeout: 264 seconds)
2021-06-05 14:38:39 jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net)
2021-06-05 14:39:06 <boxscape> yeah, Num or any subclass of Num that's "defined in the Prelude or a standard library"
2021-06-05 14:39:32 <janus> standard library is more than just base?
2021-06-05 14:39:42 <boxscape> who knows, they don't say
2021-06-05 14:39:50 <boxscape> in the report, on that page
2021-06-05 14:41:00 <janus> ah, then it probably refers to the Haskell 2010 libraries : https://www.haskell.org/onlinereport/haskell2010/haskellpa2.html
2021-06-05 14:41:07 <boxscape> ah, right
2021-06-05 14:41:46 × mc47 quits (~yecinem@89.246.239.190) (Remote host closed the connection)
2021-06-05 14:41:52 favonia joins (~favonia@user/favonia)
2021-06-05 14:42:52 UpstreamSalmon joins (uid12077@id-12077.stonehaven.irccloud.com)
2021-06-05 14:43:00 × jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit)
2021-06-05 14:43:49 curiousgay joins (~quassel@178.217.208.8)
2021-06-05 14:46:06 × grepcake quits (~artyom@77.234.209.96) (Quit: Konversation terminated!)
2021-06-05 14:46:50 pritambaral joins (~pritam@user/pritambaral)
2021-06-05 14:47:22 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Quit: FinnElija)
2021-06-05 14:48:54 × imdoor quits (~imdoor@balticom-142-78-50.balticom.lv) (Quit: imdoor)
2021-06-05 14:49:30 × pbrisbin quits (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) (Ping timeout: 245 seconds)
2021-06-05 14:50:06 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
2021-06-05 14:52:27 slowButPresent joins (~slowButPr@user/slowbutpresent)
2021-06-05 14:52:48 favonia joins (~favonia@user/favonia)
2021-06-05 14:54:22 Hanicef joins (~gustaf@81-229-9-108-no92.tbcn.telia.com)
2021-06-05 14:54:55 × Guest2629 quits (~finn_elij@user/finn-elija/x-0085643) (Quit: Guest2629)
2021-06-05 14:55:13 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
2021-06-05 14:56:28 marinelli joins (~marinelli@gateway/tor-sasl/marinelli)
2021-06-05 14:57:43 neceve joins (~quassel@2a02:c7f:607e:d600:a95a:ecd2:e57a:3130)
2021-06-05 14:59:33 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:a54f:2e66:1417:26d8)
2021-06-05 15:02:25 AgentM joins (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net)
2021-06-05 15:03:18 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 264 seconds)
2021-06-05 15:06:33 × shriekingnoise quits (~shrieking@186.137.144.80) (Read error: Connection reset by peer)
2021-06-05 15:10:05 ddellacosta joins (~ddellacos@86.106.143.100)
2021-06-05 15:10:23 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
2021-06-05 15:12:45 × epolanski quits (uid312403@id-312403.brockwell.irccloud.com) (Quit: Connection closed for inactivity)
2021-06-05 15:14:33 × ddellacosta quits (~ddellacos@86.106.143.100) (Ping timeout: 268 seconds)
2021-06-05 15:15:35 × mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Read error: Connection reset by peer)
2021-06-05 15:15:59 mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be)
2021-06-05 15:16:24 × Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 268 seconds)
2021-06-05 15:16:36 × wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-06-05 15:17:13 <systemfault> It may be obvious... but was wondering: Can monoids always be combined in parallel?
2021-06-05 15:17:16 × xff0x quits (~xff0x@2001:1a81:53bd:ad00:17e2:a38d:f46d:1b9f) (Ping timeout: 265 seconds)
2021-06-05 15:17:25 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 244 seconds)
2021-06-05 15:17:59 xff0x joins (~xff0x@2001:1a81:53bd:ad00:82dd:e8fb:f0ad:2e66)
2021-06-05 15:18:29 <[exa]> systemfault: semigroups should guarantee that (a<>b)<>(c<>d) == a<>(b<>(c<>d)) right?
2021-06-05 15:18:40 <systemfault> Yeah, I believe so
2021-06-05 15:18:50 <[exa]> because lawful ones should be associative
2021-06-05 15:19:08 derelict joins (~winter@2603-6011-f901-9e5b-aed0-a4c6-fbb9-1828.res6.spectrum.com)
2021-06-05 15:19:12 × dixie quits (~dixie@real.wilbury.sk) (Ping timeout: 265 seconds)
2021-06-05 15:19:33 dixie joins (~dixie@real.wilbury.sk)
2021-06-05 15:20:59 <sshine> systemfault, associativity should ensure that, yes
2021-06-05 15:21:26 <sshine> systemfault, so lawful Monoids :)
2021-06-05 15:21:35 <systemfault> Great :) Thank you
2021-06-05 15:22:12 <sshine> but does (==) guarantee structural equivalence?
2021-06-05 15:22:36 favonia joins (~favonia@user/favonia)
2021-06-05 15:23:01 <sshine> e.g. I can think of certain caching data structures that may result in different non-normalized representations of the same value, but still yield equivalent... that's the only corner case I can think of.
2021-06-05 15:23:26 <systemfault> I'm glad that it's not an issue in my current case
2021-06-05 15:25:16 <ski> "but does (==) guarantee structural equivalence?" -- do you mean that internal representation is structurally the same ?
2021-06-05 15:25:20 safinaskar parts (~user@109.252.90.89) ()
2021-06-05 15:26:11 aerona joins (~aerona@2600:6c54:4600:f300:8166:afd5:9294:f1a6)
2021-06-05 15:26:14 <boxscape> note that the law in the Semigroup documentation doesn't mention (==), it says the law is "x <> (y <> z) = (x <> y) <> z"
2021-06-05 15:26:22 <boxscape> I guess it's a bit ambiguous what exactly = means here
2021-06-05 15:26:47 <monochrom> Data.Set.Set (==) does not use structural equivalence.
2021-06-05 15:26:49 <ski> observational equivalence, i suppose ?
2021-06-05 15:26:58 <[exa]> "preferably nothing very specific"
2021-06-05 15:27:10 <boxscape> ski i.e. equivalent wrt all functions exposed in the API for that type?
2021-06-05 15:27:42 haltux joins (~haltux@a89-154-181-47.cpe.netcabo.pt)
2021-06-05 15:27:43 <monochrom> "=" is mathematical equality.
2021-06-05 15:27:59 <boxscape> monochrom that's still ambiguous :P
2021-06-05 15:28:21 <monochrom> I think it is actually beneficial to leave it open.
2021-06-05 15:28:41 Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius)
2021-06-05 15:29:27 <boxscape> Idris has VerifiedSemigroup which uses structural equality IIUC
2021-06-05 15:29:42 <boxscape> but also has a non-verified Semigroup interface
2021-06-05 15:29:47 <monochrom> With Data.Set.Set you can refine it to "same elements" or API-observational equality or anything that makes mathematical sense for the intended use cases of Data.Set and it's OK.
2021-06-05 15:29:53 <boxscape> er, I think, anyway
2021-06-05 15:30:59 <ski> i suppose Idris doesn't have quotient types (?)
2021-06-05 15:30:59 <monochrom> With IO's "return x >>= f = f x" you either need a formal semantics of IO to define "=" or you accept that it is left informal and just say "behaviourial equality".
2021-06-05 15:31:18 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:a54f:2e66:1417:26d8) (Remote host closed the connection)
2021-06-05 15:32:44 Core5474 joins (~Core5474@2600:1700:7720:cf80:e124:f2c6:8838:3b4c)
2021-06-05 15:32:47 <boxscape> ski I believe that's right
2021-06-05 15:32:52 <ski> something like `observeRepresentation :: Set a -> IO (SetRepresentation a)' would still be okay, imho (although presumably of little use, in this specific case)
2021-06-05 15:34:56 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:a54f:2e66:1417:26d8)
2021-06-05 15:35:50 chomwitt joins (~Pitsikoko@athedsl-20549.home.otenet.gr)
2021-06-05 15:37:26 <ski> .. i wonder how much sense it would make to have a monad `Indet', used to model multiple possible representations
2021-06-05 15:38:00 leungbk joins (~user@2603-8000-1201-2dd2-dec4-9dba-549e-1771.res6.spectrum.com)
2021-06-05 15:39:21 <ski> so you would have `newtype Set a = MkSet (Indet (SetRepresentation a))', possibly, with `promiseEquivalentSolutions :: (Indet a -> b) -> (a -> b)'
2021-06-05 15:40:59 <ski> a value of type `Indet a' represents a non-empty set of `a's, where the implementation actually with just pick one element to compute. there'd also be `chooseIndet :: Indet a -> IO a'
2021-06-05 15:41:25 <ski> s/with just/will just/

All times are in UTC.