Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 116 117 118 119 120 121 122 123 124 125 126 .. 17903
1,790,255 events total
2021-05-27 10:24:40 <kakuhen> a ɹoʇɔunℲ C -> D being a functor C^op -> D
2021-05-27 10:24:45 <tomsmeding> dminuoso: Oh! I messed up the parens
2021-05-27 10:25:01 <tomsmeding> fmap :: f b -> (f a -> (b -> a)) => Functor f
2021-05-27 10:25:03 <tomsmeding> should be that
2021-05-27 10:25:12 × autophagy quits (~mika@2a02:8109:8540:36a0::fccc) (Changing host)
2021-05-27 10:25:12 autophagy joins (~mika@user/autophagy)
2021-05-27 10:25:29 <tomsmeding> um
2021-05-27 10:25:33 <dminuoso> tomsmeding: well I intentionally set the parens the other way in my example, since I presumed all infixr and infixl to be flipped.
2021-05-27 10:25:49 <tomsmeding> fmap :: (f b -> f a) -> (b -> a) => Functor f, that
2021-05-27 10:25:56 × __monty__ quits (~toonn@user/toonn) (Client Quit)
2021-05-27 10:26:07 <tomsmeding> oh right maybe operator associativity is also flipped, hmm
2021-05-27 10:26:15 × kakuhen quits (~kakuhen@user/kakuhen) (Quit: Leaving...)
2021-05-27 10:26:16 <tomsmeding> perhaps this needs RFC discussion first
2021-05-27 10:26:21 <dminuoso> tomsmeding: Mmm, I just realized, this almost looks like a proof of `Functor f`
2021-05-27 10:26:42 <boxscape> `(f a -> f b) -> a -> b` almost feels like it could be the method for a reasonable class
2021-05-27 10:27:43 <tomsmeding> doesn't that hold exactly for all trivial newtypes or something
2021-05-27 10:27:50 × lcp quits (~hellcp@83.24.148.243.ipv4.supernova.orange.pl) (Quit: lcp)
2021-05-27 10:27:52 <boxscape> I guess that's just the dual of fmap?
2021-05-27 10:27:57 <boxscape> which would make it equivalent to fmap?
2021-05-27 10:28:03 <boxscape> maybe not
2021-05-27 10:28:08 ddellacosta joins (~ddellacos@89.46.62.35)
2021-05-27 10:28:44 <boxscape> you certainly can't get a -> b from IO a -> IO b, so no
2021-05-27 10:28:47 <dminuoso> tomsmeding: Yeah. It sort of looks like a dictionary constructor.
2021-05-27 10:29:00 <dminuoso> That makes me wonder
2021-05-27 10:29:14 <dminuoso> Do we have the machinery to craft dictionaries if we have the individual members as values in our hands?
2021-05-27 10:29:21 __monty__ joins (~toonn@user/toonn)
2021-05-27 10:29:28 <boxscape> yes, it's called unsafeCoerce
2021-05-27 10:29:38 × azeem quits (~azeem@dynamic-adsl-84-220-228-254.clienti.tiscali.it) (Quit: Connection closed)
2021-05-27 10:29:42 <merijn> dminuoso: reflection?
2021-05-27 10:29:54 <merijn> @hackage reflection
2021-05-27 10:29:54 <lambdabot> https://hackage.haskell.org/package/reflection
2021-05-27 10:30:13 aez is now known as zarebski
2021-05-27 10:30:17 <dminuoso> Mmm doesnt quite look like it
2021-05-27 10:31:16 Ranhir joins (~Ranhir@157.97.53.139)
2021-05-27 10:31:27 <boxscape> can you ensure any callee would use your constructed dictionary rather than ghc trying to find a different one?
2021-05-27 10:31:45 <boxscape> considering it can usually assume coherent instances
2021-05-27 10:32:34 × ddellacosta quits (~ddellacos@89.46.62.35) (Ping timeout: 264 seconds)
2021-05-27 10:33:04 <dminuoso> Well dictionaries are passed explicitly in core
2021-05-27 10:33:43 <boxscape> (ooh, ((f a -> f b) -> a -> b) isn't the dual of fmap because the arrow in the middle doesn't get flipped when you look at the dual of a functor, got it)
2021-05-27 10:33:57 <boxscape> dminuoso sure lots of things are possible if you program directly in core
2021-05-27 10:34:03 <dminuoso> withDict :: HasDict c e => e -> (c => r) -> r
2021-05-27 10:34:24 <dminuoso> So the principle machinery to feed reified dicts already exists in `constraints`
2021-05-27 10:35:15 <boxscape> hmm I guess since it's polymorphic that might guarantee that the dictionary you supply to withDict is the one that's used
2021-05-27 10:35:22 wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com)
2021-05-27 10:35:41 × poljar quits (~poljar@93-143-155-14.adsl.net.t-com.hr) (Remote host closed the connection)
2021-05-27 10:35:53 <dminuoso> Well, internally this is just pattern matching on `data Dict :: Constraint -> * where Dict :: a => Dict a`
2021-05-27 10:36:01 <dminuoso> So its still the constraint solver that does its magic
2021-05-27 10:36:05 poljar joins (~poljar@93-139-119-30.adsl.net.t-com.hr)
2021-05-27 10:36:50 yoctocell joins (~user@h87-96-130-155.cust.a3fiber.se)
2021-05-27 10:37:22 <dminuoso> I suppose the way to do what Im thinking, is simply newtypes
2021-05-27 10:37:45 × ubert quits (~Thunderbi@p200300ecdf259d7974882ed522245916.dip0.t-ipconnect.de) (Remote host closed the connection)
2021-05-27 10:37:45 ubert1 is now known as ubert
2021-05-27 10:37:53 <dminuoso> That is, create a newtype, supply an instance, and then use stuff like coerce/ala/friends
2021-05-27 10:38:04 ub joins (~Thunderbi@p200300ecdf259d7974882ed522245916.dip0.t-ipconnect.de)
2021-05-27 10:38:17 × nsilv quits (~nsilv@37.163.54.40) (Ping timeout: 265 seconds)
2021-05-27 10:40:42 <Philonous_> According to the haskell wiki. ByteStrings have 9 words overhead, why is that? As far as I can see it should 1 word for the constructor, 1 word for the unpacked Int (the length) and 1 for the ForeignPtr to the data
2021-05-27 10:40:56 ubikium joins (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net)
2021-05-27 10:42:37 × img quits (~img@2405:6580:b1c0:2500:94ef:e7f9:57a3:5892) (Quit: ZNC 1.8.1 - https://znc.in)
2021-05-27 10:42:54 img joins (~img@2405:6580:b1c0:2500:94ef:e7f9:57a3:5892)
2021-05-27 10:43:36 mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be)
2021-05-27 10:43:51 × smr quits (~smn@91-114-147-117.adsl.highway.telekom.at) (Ping timeout: 272 seconds)
2021-05-27 10:44:31 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
2021-05-27 10:44:35 tricklynch joins (~tricklync@216-180-94-57.starry-inc.net)
2021-05-27 10:44:44 ddellacosta joins (~ddellacos@89.46.62.59)
2021-05-27 10:44:50 __monty__ joins (~toonn@user/toonn)
2021-05-27 10:45:42 Robin_Jadoul joins (~Robin_Jad@152.67.64.160)
2021-05-27 10:48:11 × ubikium quits (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net) (Quit: Quit)
2021-05-27 10:48:13 winter joins (~winter@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com)
2021-05-27 10:49:21 × ddellacosta quits (~ddellacos@89.46.62.59) (Ping timeout: 272 seconds)
2021-05-27 10:49:57 ccntrq joins (~ccntrq@business-90-187-183-141.pool2.vodafone-ip.de)
2021-05-27 10:50:50 holy_ joins (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665)
2021-05-27 10:54:04 lavaman joins (~lavaman@98.38.249.169)
2021-05-27 10:54:24 ubikium joins (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net)
2021-05-27 10:55:08 × ubikium quits (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net) (Client Quit)
2021-05-27 10:55:55 ubikium joins (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net)
2021-05-27 10:57:03 tA joins (~thorn@121.220.36.168)
2021-05-27 10:58:12 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b043:8b77:c7da:42a0)
2021-05-27 10:58:38 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
2021-05-27 10:59:03 dustingetz joins (~textual@pool-173-49-123-198.phlapa.fios.verizon.net)
2021-05-27 11:00:22 imdoor joins (~imdoor@balticom-142-78-50.balticom.lv)
2021-05-27 11:01:25 × gawen quits (~gawen@user/gawen) (Quit: cya)
2021-05-27 11:01:28 × wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-05-27 11:02:08 lcp joins (~hellcp@83.24.148.243.ipv4.supernova.orange.pl)
2021-05-27 11:02:29 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b043:8b77:c7da:42a0) (Ping timeout: 252 seconds)
2021-05-27 11:02:31 nf is now known as cf
2021-05-27 11:02:37 wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com)
2021-05-27 11:02:44 epolanski joins (uid312403@id-312403.brockwell.irccloud.com)
2021-05-27 11:02:51 gawen joins (~gawen@user/gawen)
2021-05-27 11:03:01 ddellacosta joins (~ddellacos@89.46.62.65)
2021-05-27 11:03:26 × da39a3ee5e6b4b0d quits (~textual@2403:6200:8876:ee80:447b:c412:6cc3:c2bf) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-05-27 11:03:56 <[exa]> Philonous_: lazy or strict ones? I'd believe this could work with lazy ones.
2021-05-27 11:05:10 × gilligan quits (~gilligan@b2b-109-90-166-248.unitymedia.biz) (Remote host closed the connection)
2021-05-27 11:05:18 da39a3ee5e6b4b0d joins (~textual@2403:6200:8876:ee80:d5a4:34e6:41e0:8f20)
2021-05-27 11:06:06 YiChen joins (~user@222.94.45.136)
2021-05-27 11:07:46 × ddellacosta quits (~ddellacos@89.46.62.65) (Ping timeout: 265 seconds)
2021-05-27 11:09:20 × winter quits (~winter@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) (Quit: WeeChat 3.1)
2021-05-27 11:09:38 × tA quits (~thorn@121.220.36.168) (Ping timeout: 252 seconds)
2021-05-27 11:10:20 YiChen` joins (~user@222.94.45.34)
2021-05-27 11:12:07 × YiChen quits (~user@222.94.45.136) (Ping timeout: 265 seconds)
2021-05-27 11:12:41 × wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)

All times are in UTC.