Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 162 163 164 165 166 167 168 169 170 171 172 .. 5022
502,152 events total
2020-09-23 18:14:57 tomku joins (~tomku@unaffiliated/tomku)
2020-09-23 18:15:16 thir joins (~thir@pd9e1baba.dip0.t-ipconnect.de)
2020-09-23 18:17:27 × eric quits (~eric@2804:431:c7d4:b4fa:51d1:5637:ed81:5491) (Ping timeout: 240 seconds)
2020-09-23 18:19:00 × GyroW quits (~GyroW@unaffiliated/gyrow) (Remote host closed the connection)
2020-09-23 18:19:15 GyroW joins (~GyroW@ptr-48ujrfb8c7gfd2lu92q.18120a2.ip6.access.telenet.be)
2020-09-23 18:19:15 × GyroW quits (~GyroW@ptr-48ujrfb8c7gfd2lu92q.18120a2.ip6.access.telenet.be) (Changing host)
2020-09-23 18:19:15 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-09-23 18:20:05 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-23 18:21:48 MasterGruntR75 joins (~MasterGru@s91904426.blix.com)
2020-09-23 18:21:59 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-23 18:23:34 × ulidtko quits (~ulidtko@193.111.48.79) (Quit: FIN)
2020-09-23 18:24:23 × coot quits (~coot@37.30.51.178.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-09-23 18:24:41 coot joins (~coot@37.30.51.178.nat.umts.dynamic.t-mobile.pl)
2020-09-23 18:25:11 <AWizzArd> In Snap a Config is a Monoid. It exports `setXYZ val Config` to change certain aspects of the defaultConfig. I want to change two settings. Is there a "trick" to do this in a more clever way? let conf = setX myX (setY myY defaultConfig)
2020-09-23 18:25:12 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2020-09-23 18:25:59 × coot quits (~coot@37.30.51.178.nat.umts.dynamic.t-mobile.pl) (Client Quit)
2020-09-23 18:26:34 <AWizzArd> If I want to add Z and also A, B and C then this nesting will get pretty deep.
2020-09-23 18:27:07 × Igloo quits (~igloo@matrix.chaos.earth.li) (Ping timeout: 246 seconds)
2020-09-23 18:27:33 × carlomagno quits (~cararell@inet-hqmc02-o.oracle.com) (Ping timeout: 260 seconds)
2020-09-23 18:28:12 × LKoen quits (~LKoen@81.255.219.130) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
2020-09-23 18:29:10 <AWizzArd> I thought about something like bind defaultConfig >*> setX myX >*> setY myY ...
2020-09-23 18:29:22 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-23 18:29:52 × knupfer quits (~Thunderbi@200116b824c6e600d814586ad38a67f6.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2020-09-23 18:30:13 carlomagno joins (~cararell@inet-hqmc02-o.oracle.com)
2020-09-23 18:31:47 × NinjaTrappeur quits (~ninja@unaffiliated/ninjatrappeur) (Ping timeout: 240 seconds)
2020-09-23 18:32:06 Saten-san joins (~Saten-san@ip-62-235-13-88.dsl.scarlet.be)
2020-09-23 18:33:04 NinjaTrappeur joins (~ninja@unaffiliated/ninjatrappeur)
2020-09-23 18:37:19 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-23 18:38:03 kupi joins (uid212005@gateway/web/irccloud.com/x-vbhsyiijbvqyjery)
2020-09-23 18:39:12 × thir quits (~thir@pd9e1baba.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-09-23 18:40:15 × Saten-san quits (~Saten-san@ip-62-235-13-88.dsl.scarlet.be) (Quit: WeeChat 2.8)
2020-09-23 18:41:03 abhixec joins (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net)
2020-09-23 18:41:23 <maralorn> AWizzArd: Is it a Monoid in the sense of the type class?
2020-09-23 18:41:33 × mirrorbird quits (~psutcliff@2a00:801:44a:a00b:20c3:c64:eb15:73a2) (Ping timeout: 272 seconds)
2020-09-23 18:41:40 × asan quits (~yan4138@61.170.146.94) (Ping timeout: 260 seconds)
2020-09-23 18:41:58 asan joins (~yan4138@124.78.124.81)
2020-09-23 18:42:42 <AWizzArd> maralorn: yes
2020-09-23 18:42:45 × shafox quits (~shafox@106.51.234.111) (Remote host closed the connection)
2020-09-23 18:42:59 <maralorn> AWizzArd: Then you want either fold [defaultConfig, setX myX, setY myY] or defaultConfig <> setXmyX <> setY myY.
2020-09-23 18:44:23 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 240 seconds)
2020-09-23 18:44:30 Igloo joins (~igloo@matrix.chaos.earth.li)
2020-09-23 18:44:50 <AWizzArd> maralorn: I thought exactly about that second variant, with (<>).
2020-09-23 18:45:47 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
2020-09-23 18:46:47 <AWizzArd> maralorn: I just didn’t see that the "second parameter" would be filled in via <>.
2020-09-23 18:47:26 <AWizzArd> (<>) :: Semigroup a => a -> a -> a
2020-09-23 18:47:44 <AWizzArd> The defaultConfig :: Config so a = Config
2020-09-23 18:48:20 <AWizzArd> Now setX :: X -> Config -> Config
2020-09-23 18:48:42 knupfer joins (~Thunderbi@200116b824c6e600248dd0fffe923b3f.dip.versatel-1u1.de)
2020-09-23 18:48:42 × knupfer quits (~Thunderbi@200116b824c6e600248dd0fffe923b3f.dip.versatel-1u1.de) (Client Quit)
2020-09-23 18:48:47 × Raito_Bezarius quits (~Raito_Bez@unaffiliated/raito-bezarius/x-8764578) (Remote host closed the connection)
2020-09-23 18:48:47 <AWizzArd> So I thought that setX X would have the type Config -> Config
2020-09-23 18:48:54 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
2020-09-23 18:48:56 knupfer joins (~Thunderbi@i5E86B476.versanet.de)
2020-09-23 18:49:08 × Igloo quits (~igloo@matrix.chaos.earth.li) (Ping timeout: 260 seconds)
2020-09-23 18:49:11 × cerdito_faldero quits (~cerdito@10.85-87-120.dynamic.clientes.euskaltel.es) (Remote host closed the connection)
2020-09-23 18:49:27 <maralorn> Ah, yeah. It does.^^
2020-09-23 18:49:31 ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
2020-09-23 18:49:33 Raito_Bezarius joins (~Raito_Bez@unaffiliated/raito-bezarius/x-8764578)
2020-09-23 18:49:54 <AWizzArd> It is extremly close to what I want, which is "bind for monoids".
2020-09-23 18:49:58 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
2020-09-23 18:50:36 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-23 18:51:42 geekosaur joins (42d52102@66.213.33.2)
2020-09-23 18:52:43 × ahmr88 quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Remote host closed the connection)
2020-09-23 18:53:05 <maralorn> AWizzard: The question is this. What exactly does setX do? Can't you just do defaultConfig <> myX
2020-09-23 18:53:19 <maralorn> Ah, okay
2020-09-23 18:53:30 <maralorn> I see that's probably a dumb question.
2020-09-23 18:54:43 W3BV1P3R joins (~W3BV1P3R@2601:3c0:4100:1793:4079:6d19:ed51:ce60)
2020-09-23 18:54:49 × W3BV1P3R quits (~W3BV1P3R@2601:3c0:4100:1793:4079:6d19:ed51:ce60) (Max SendQ exceeded)
2020-09-23 18:54:58 <maralorn> But of course what you really want there is function composition. So setX myX $ setY myY $ defaultConfig would just work fine. Although that is boring because it doesn‘t use the Monoid instance.
2020-09-23 18:55:00 Igloo joins (~igloo@matrix.chaos.earth.li)
2020-09-23 18:55:08 __monty__ joins (~toonn@unaffiliated/toonn)
2020-09-23 18:55:39 W3BV1P3R joins (~W3BV1P3R@c-73-5-91-226.hsd1.tn.comcast.net)
2020-09-23 18:55:43 × W3BV1P3R quits (~W3BV1P3R@c-73-5-91-226.hsd1.tn.comcast.net) (Max SendQ exceeded)
2020-09-23 18:56:18 <AWizzArd> maralorn: also a very good idea, I was just wondering if I could indeed gain anything from it being a Semigroup/Monoid.
2020-09-23 18:58:11 <maralorn> AWizzArd: You can do it: defaultConfig <> foldMap (\f -> f emptyConfig) [setX myX, setY myY]
2020-09-23 18:58:15 <maralorn> But not sure if that's worth it.^^
2020-09-23 18:58:24 <AWizzArd> Hehe yes :)
2020-09-23 18:58:38 <AWizzArd> In the end it must be doable by folding.
2020-09-23 18:59:06 thir joins (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de)
2020-09-23 18:59:09 <maralorn> Of course, but that would again not use the Monoid instance
2020-09-23 19:00:03 <maralorn> foldr ($) defaultConfig [setX myX, setY myY]
2020-09-23 19:00:51 Ariakenom_ joins (~Ariakenom@h-98-128-229-34.NA.cust.bahnhof.se)
2020-09-23 19:00:55 <AWizzArd> exactly
2020-09-23 19:00:59 <maralorn> And so I can spend an evening on all possible rewrites of a single line of Haskell.
2020-09-23 19:01:20 <AWizzArd> Well, for now I will just live with the nested settings.
2020-09-23 19:01:25 <AWizzArd> maralorn: but it was fun :)
2020-09-23 19:01:47 × shad0w_ quits (~shad0w_@160.202.37.157) (Remote host closed the connection)
2020-09-23 19:03:14 ubert joins (~Thunderbi@91.141.1.30.wireless.dyn.drei.com)
2020-09-23 19:03:41 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2020-09-23 19:03:51 × dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-226.hsi8.kabel-badenwuerttemberg.de) (Quit: WeeChat 2.7.1)
2020-09-23 19:04:05 × Ariakenom quits (~Ariakenom@h-98-128-229-34.NA.cust.bahnhof.se) (Ping timeout: 240 seconds)
2020-09-23 19:07:17 × arguapacha quits (uid134895@gateway/web/irccloud.com/x-mqnmnbqhiqkhrgzy) (Quit: Connection closed for inactivity)
2020-09-23 19:07:53 Saten-san joins (~Saten-san@ip-62-235-13-88.dsl.scarlet.be)
2020-09-23 19:09:24 bennofs_ joins (~quassel@dslb-188-106-234-119.188.106.pools.vodafone-ip.de)
2020-09-23 19:09:32 × Igloo quits (~igloo@matrix.chaos.earth.li) (Ping timeout: 272 seconds)
2020-09-23 19:10:14 ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
2020-09-23 19:12:11 × thir quits (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-09-23 19:12:35 × bennofs quits (~quassel@dslb-188-106-255-124.188.106.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
2020-09-23 19:12:42 coot joins (~coot@37.30.51.178.nat.umts.dynamic.t-mobile.pl)
2020-09-23 19:13:21 × Saten-san quits (~Saten-san@ip-62-235-13-88.dsl.scarlet.be) (Ping timeout: 265 seconds)

All times are in UTC.