Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-26 04:06:13 vg joins (~vg@139.59.59.230)
2020-11-26 04:07:15 <incertia> e.g. class MightHave a t where hasPrism :: Prism' t a
2020-11-26 04:07:41 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-11-26 04:07:46 <incertia> and then you would be able to lift up errors into more general contexts with mtl
2020-11-26 04:08:37 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 264 seconds)
2020-11-26 04:08:41 <incertia> throwE :: (MightHave e err, MonadError e m) => e -> m ()
2020-11-26 04:08:44 × DTZUZU quits (~DTZUZU@207.81.171.116) (Ping timeout: 260 seconds)
2020-11-26 04:09:00 × slack1256 quits (~slack1256@190.162.160.23) (Remote host closed the connection)
2020-11-26 04:09:06 <incertia> throwE = throwError . review hasPrism
2020-11-26 04:10:36 agrif is now known as minaj
2020-11-26 04:11:43 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-11-26 04:12:40 × drbean quits (~drbean@TC210-63-209-63.static.apol.com.tw) (Read error: Connection reset by peer)
2020-11-26 04:13:36 arpl joins (546babef@84-107-171-239.cable.dynamic.v4.ziggo.nl)
2020-11-26 04:14:46 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-26 04:16:17 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
2020-11-26 04:17:42 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
2020-11-26 04:18:29 adm_ joins (~adm@43.229.88.197)
2020-11-26 04:20:40 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-11-26 04:20:42 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2020-11-26 04:20:52 drbean joins (~drbean@TC210-63-209-33.static.apol.com.tw)
2020-11-26 04:21:13 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2020-11-26 04:21:34 <arpl> Is it useful to define a class for the sole purpose of creating a constraint (and the only 'proof' is having an instance)? So when you have a (higher order) function that takes a compression function, for instance, you can constrain it to only lossless compression.
2020-11-26 04:21:45 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
2020-11-26 04:21:46 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 246 seconds)
2020-11-26 04:23:22 adm_ joins (~adm@43.229.88.197)
2020-11-26 04:25:28 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
2020-11-26 04:25:36 × drbean quits (~drbean@TC210-63-209-33.static.apol.com.tw) (Ping timeout: 240 seconds)
2020-11-26 04:29:32 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Remote host closed the connection)
2020-11-26 04:30:13 × plutoniix quits (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Ping timeout: 264 seconds)
2020-11-26 04:31:31 × vg quits (~vg@139.59.59.230) (Quit: vg)
2020-11-26 04:31:46 vg joins (~vg@139.59.59.230)
2020-11-26 04:32:00 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
2020-11-26 04:32:13 vg joins (~vg@139.59.59.230)
2020-11-26 04:32:44 plutoniix joins (~q@ppp-223-24-94-50.revip6.asianet.co.th)
2020-11-26 04:32:44 × Fractalis quits (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Ping timeout: 240 seconds)
2020-11-26 04:35:32 nek0 joins (~nek0@mail.nek0.eu)
2020-11-26 04:36:10 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
2020-11-26 04:36:28 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-11-26 04:37:53 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
2020-11-26 04:41:31 conal joins (~conal@64.71.133.70)
2020-11-26 04:41:56 SanchayanMaity joins (~Sanchayan@171.76.82.54)
2020-11-26 04:41:59 Fractalis joins (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7)
2020-11-26 04:41:59 Tario joins (~Tario@201.192.165.173)
2020-11-26 04:42:38 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 272 seconds)
2020-11-26 04:44:30 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-11-26 04:46:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-11-26 04:46:31 matta joins (~user@24-113-169-116.wavecable.com)
2020-11-26 04:48:52 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 260 seconds)
2020-11-26 04:50:16 <koz_> arpl: It can be sometimes.
2020-11-26 04:50:46 <koz_> However, you almost always have some kind of behaviour to go with this constraint, so you may as well define that too.
2020-11-26 04:51:12 <koz_> Because otherwise, it tells you something but you can't do anything with this value you just got.
2020-11-26 04:53:11 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 256 seconds)
2020-11-26 04:54:31 <arpl> That is true and I understand that. It is certainly nice when there are laws associated with a class. But I was thinking about situations (and maybe my example wasn't quite right) where there are no laws associated and you just want the user of that function to 'acknowledge' a certain constraint by making an instance and 'promising' to obey (when
2020-11-26 04:54:31 <arpl> enforcement is not possible).
2020-11-26 04:54:49 × kupi quits (uid212005@gateway/web/irccloud.com/x-wpurhmmpfcznlitw) (Quit: Connection closed for inactivity)
2020-11-26 04:54:54 <koz_> If your type class lacks laws, you should ask yourself _especially_ hard if that's really what you want.
2020-11-26 04:55:06 <koz_> (in fact, certain folks would go so far as saying that all type classes should have them)
2020-11-26 04:55:40 <koz_> Also, I didn't say anything about _laws_ - I merely said that type classes which only satisfy a constraint, without some associated behaviour, have quite limited usefulness.
2020-11-26 04:55:53 <koz_> (although maybe I misunderstood and your type class _does_ have some methods?)
2020-11-26 04:56:10 <arpl> Fair enough. I was only wondering.
2020-11-26 04:57:20 <arpl> No, I was asking about a class with no methods, just to have some kind of constraint that should be acknowledged. I wasn't thinking about actually implementing something like that, just asking about the usefullness, if any.
2020-11-26 04:57:31 × vg quits (~vg@139.59.59.230) (Quit: vg)
2020-11-26 04:57:36 <koz_> Yeah, a type class with no methods has very limited utility.
2020-11-26 04:57:47 vg joins (~vg@139.59.59.230)
2020-11-26 04:57:53 <koz_> Mostly because 'some value satisfies a constraint' gives you very little you can actually _do_ with that value afterwards.
2020-11-26 04:58:04 <koz_> Because as far as the function it got passed into is concerned, it could literally be anything.
2020-11-26 04:58:05 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
2020-11-26 04:58:12 Tario joins (~Tario@201.192.165.173)
2020-11-26 04:58:20 vg joins (~vg@139.59.59.230)
2020-11-26 04:59:25 <arpl> Understood too. Just like the exhaustiveness check, this would be some 'user defined compiler warning' like: Are you sure this compression function is indeed lossless?
2020-11-26 05:00:09 <c_wraith>
2020-11-26 05:00:14 <c_wraith> err, sorry
2020-11-26 05:00:15 × electricityZZZZ quits (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-11-26 05:00:51 <koz_> Well, if a compression function is lossless, surely you want a type class with a 'compress' and 'decompress' method, with the law that 'compress . decompress == id'?
2020-11-26 05:01:30 <koz_> (and probably an associated type for the compression result, although you could just use ByteString or something)
2020-11-26 05:01:31 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2020-11-26 05:02:11 Tario joins (~Tario@201.192.165.173)
2020-11-26 05:02:30 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-26 05:02:48 <arpl> To make clear: This is beginner's question. Just learning Haskell. Yes, I agree ... compression would have associated laws/invariants. Thank you for your time. Back to just pondering : )
2020-11-26 05:03:47 × vg quits (~vg@139.59.59.230) (Quit: vg)
2020-11-26 05:04:05 vg joins (~vg@139.59.59.230)
2020-11-26 05:04:20 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
2020-11-26 05:04:34 vg joins (~vg@139.59.59.230)
2020-11-26 05:06:57 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
2020-11-26 05:11:57 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
2020-11-26 05:13:08 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 260 seconds)
2020-11-26 05:13:09 adm joins (~adm@43.229.88.197)
2020-11-26 05:14:09 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
2020-11-26 05:14:15 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4)
2020-11-26 05:15:15 × howdoi quits (uid224@gateway/web/irccloud.com/x-koaluaessvhmdatb) (Quit: Connection closed for inactivity)
2020-11-26 05:16:39 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
2020-11-26 05:17:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-11-26 05:18:47 Amras joins (~Amras@unaffiliated/amras)
2020-11-26 05:19:01 hackage typson-core 0.1.0.0 - Type-safe PostgreSQL JSON Querying https://hackage.haskell.org/package/typson-core-0.1.0.0 (aaronallen8455)
2020-11-26 05:19:50 adm_ joins (~adm@43.229.88.197)
2020-11-26 05:20:03 jedws joins (~jedws@101.184.180.34)
2020-11-26 05:20:25 × arpl quits (546babef@84-107-171-239.cable.dynamic.v4.ziggo.nl) (Quit: arpl)
2020-11-26 05:20:55 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 246 seconds)
2020-11-26 05:22:02 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-26 05:22:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)

All times are in UTC.