Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 329 330 331 332 333 334 335 336 337 338 339 .. 17991
1,799,076 events total
2021-06-07 18:48:46 <dminuoso> This is especially noticable in mtl-polymorphic code
2021-06-07 18:49:14 <Guest68> I've tried SPECIALIZE-ing everything in the module, but it made no difference. Are there any heuristics on what to INLINE?
2021-06-07 18:49:45 <dminuoso> INLINE, not generally as a rule of thumb
2021-06-07 18:49:52 <dminuoso> That one is an arcane art.. :-)
2021-06-07 18:50:10 <dminuoso> INLINABLE as a default however is fairly fine.
2021-06-07 18:52:04 jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net)
2021-06-07 18:54:27 × jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit)
2021-06-07 18:54:50 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-06-07 18:55:57 × benin03 quits (~benin@183.82.206.233) (Quit: The Lounge - https://thelounge.chat)
2021-06-07 18:57:13 ddellaco_ joins (~ddellacos@89.45.224.126)
2021-06-07 18:59:29 lavaman joins (~lavaman@98.38.249.169)
2021-06-07 18:59:34 jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net)
2021-06-07 18:59:35 <Guest68> Adding INLINABLE everywhere hasn't made any difference :(
2021-06-07 19:00:52 <maerwald> is there a high-level library for lzip?
2021-06-07 19:01:25 a6a45081-2b83 joins (~aditya@223.235.239.159)
2021-06-07 19:03:55 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds)
2021-06-07 19:04:51 bontaq` joins (~user@ool-18e47f8d.dyn.optonline.net)
2021-06-07 19:07:58 × ddellacosta quits (~ddellacos@86.106.121.44) (Remote host closed the connection)
2021-06-07 19:08:07 ddellacosta joins (~ddellacos@86.106.121.44)
2021-06-07 19:09:18 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-06-07 19:11:04 × jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2021-06-07 19:13:43 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-06-07 19:19:19 <dminuoso> Guest68: Can you share the code?
2021-06-07 19:19:26 <dminuoso> It's very hard to give qualified advice without even seeing it.
2021-06-07 19:19:30 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Read error: Connection reset by peer)
2021-06-07 19:19:40 azeem joins (~azeem@176.200.249.52)
2021-06-07 19:19:54 × mc47 quits (~yecinem@89.246.239.190) (Remote host closed the connection)
2021-06-07 19:20:00 × azeem quits (~azeem@176.200.249.52) (Read error: Connection reset by peer)
2021-06-07 19:20:02 × agumonke` quits (~user@88.160.31.174) (Read error: Connection reset by peer)
2021-06-07 19:20:14 azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it)
2021-06-07 19:22:24 econo joins (uid147250@user/econo)
2021-06-07 19:23:57 f33f046c-a02e joins (~aditya@223.178.225.24)
2021-06-07 19:24:39 × a6a45081-2b83 quits (~aditya@223.235.239.159) (Ping timeout: 245 seconds)
2021-06-07 19:24:42 ystael joins (~ystael@user/ystael)
2021-06-07 19:26:23 × ddellacosta quits (~ddellacos@86.106.121.44) (Remote host closed the connection)
2021-06-07 19:26:23 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90fb:e693:9986:91e0)
2021-06-07 19:26:50 <Guest68> dminuoso: https://paste.tomsmeding.com/Vj1sJXL5
2021-06-07 19:26:51 ddellacosta joins (~ddellacos@86.106.121.44)
2021-06-07 19:28:14 <dminuoso> Guest68: Mmm. Try -fexpose-all-unfoldings in addition to INLINABLE
2021-06-07 19:28:41 <dminuoso> The monad polymorphism could prevent inlining from occuring
2021-06-07 19:29:00 × berberman quits (~berberman@user/berberman) (Quit: ZNC 1.8.2 - https://znc.in)
2021-06-07 19:29:11 xsperry joins (~as@user/xsperry)
2021-06-07 19:29:48 × forell_ quits (~forell@host-178-216-90-220.sta.tvknaszapraca.pl) (Quit: ZNC - https://znc.in)
2021-06-07 19:30:16 <dminuoso> What is ListOnionT?
2021-06-07 19:32:14 × ddellacosta quits (~ddellacos@86.106.121.44) (Remote host closed the connection)
2021-06-07 19:32:28 ddellacosta joins (~ddellacos@86.106.121.44)
2021-06-07 19:32:35 × xprlgjf quits (~gavin@60.27.93.209.dyn.plus.net) (Remote host closed the connection)
2021-06-07 19:33:19 × Guest68 quits (~Guest68@82.40.121.143) (Quit: Ping timeout (120 seconds))
2021-06-07 19:33:49 × peterhil quits (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) (Ping timeout: 245 seconds)
2021-06-07 19:34:10 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-06-07 19:35:29 × mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Ping timeout: 245 seconds)
2021-06-07 19:35:45 Guest68 joins (~Guest68@82.40.121.143)
2021-06-07 19:36:07 <Guest68> -fexpose-all-unfoldings and INLINABLE was much much slower
2021-06-07 19:36:10 forell joins (~forell@host-178-216-90-220.sta.tvknaszapraca.pl)
2021-06-07 19:36:31 × favonia quits (~favonia@user/favonia) (Remote host closed the connection)
2021-06-07 19:36:36 <Guest68> data ListOnionT c m a = ListOnionT {getNil :: m a, getCons :: c -> m (Either a (ListOnionT c m a))}
2021-06-07 19:37:09 <Guest68> It's supposed to be list ReaderT [c] m a, but you can read the list one element at a time. i.e. unwrapping like an onion
2021-06-07 19:37:55 favonia joins (~favonia@user/favonia)
2021-06-07 19:38:14 × ubert quits (~Thunderbi@p200300ecdf259d3dfcd415488b1ba362.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2021-06-07 19:38:18 ub joins (~Thunderbi@p200300ecdf259d2d3d1bf7f6f1f48366.dip0.t-ipconnect.de)
2021-06-07 19:39:02 <dminuoso> Well, rather `ReaderT [c] (ExceptT a) m`, no?
2021-06-07 19:39:18 <dminuoso> (Or maybe flipped around, cant focus right now)
2021-06-07 19:40:06 <Guest68> The 'Either a' part is for shortcutting, so that you don't have to read the entire list.
2021-06-07 19:40:29 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 245 seconds)
2021-06-07 19:40:36 ub is now known as ubert
2021-06-07 19:40:55 <Guest68> pureListOnionT a = ListOnionT (pure a) (const $ pure $ Left a)
2021-06-07 19:40:57 <dminuoso> So this is a sort of streaming parser?
2021-06-07 19:41:01 <Guest68> Yes, exactly.
2021-06-07 19:43:01 <dminuoso> Is the intend to write a streaming parser library, or is this just an immediate solution to another problem?
2021-06-07 19:43:24 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-06-07 19:43:34 <Guest68> It's just for a personal project.
2021-06-07 19:44:50 <dminuoso> Guest68: Things that come to mind that could help: INLINE pragmas on some of those combinators (megaparsec for example simply INLINEs... everything - quite possibly not the best choice)
2021-06-07 19:45:14 <dminuoso> And turning those either effects into continuations
2021-06-07 19:46:04 <dminuoso> You should also use Writer from Control.Monad.Trans.Writer.CPS, the one you imported behaves very poorly
2021-06-07 19:46:46 <Guest68> So, replace 'Either l r' with 'forall a. (l -> a) -> (r -> a) -> a'?
2021-06-07 19:47:09 × favonia quits (~favonia@user/favonia) (Ping timeout: 245 seconds)
2021-06-07 19:47:16 <dminuoso> I think I would handroll the entire parser stack with continuations
2021-06-07 19:47:22 <dminuoso> Rather than using monad transformers
2021-06-07 19:47:27 chexum joins (~chexum@gateway/tor-sasl/chexum)
2021-06-07 19:47:33 favonia joins (~favonia@user/favonia)
2021-06-07 19:48:19 <dminuoso> Otherwise you will rely on deforestation to obtain any agreeable performance
2021-06-07 19:48:35 nschoe joins (~quassel@2a01:e0a:8e:a190:29db:2818:25aa:c67e)
2021-06-07 19:50:09 <Guest68> Could you point me toward anything I could read about that?
2021-06-07 19:51:32 <dminuoso> Guest68: Not sure. The rationale is quite easy, when you produce a Right constantly, and subsequently pattern match on it, it impedes further fusion/inlining
2021-06-07 19:52:25 <dminuoso> Perhaps someone else in this channel has good resources on this
2021-06-07 19:53:38 <dminuoso> Guest68: In many cases, GHC can apply optimization tricks to make the intermediate constructor disappear, until it cant.
2021-06-07 19:54:03 berberman joins (~berberman@user/berberman)
2021-06-07 19:54:41 dunkeln joins (~dunkeln@94.129.65.28)
2021-06-07 19:55:17 <monochrom> However, if the issue is that import vs #include causes an efficiency difference, then the issue is how many more pragmas to bark to ghc.
2021-06-07 19:56:00 <dminuoso> Guest68: Here's one example that GHC does to make working with intermediate lists often invisible:
2021-06-07 19:56:17 <dminuoso> https://hackage.haskell.org/package/base-4.15.0.0/docs/GHC-Base.html#v:build
2021-06-07 19:56:45 <dminuoso> (The surrounding optimization is called foldr/build fusion)
2021-06-07 19:56:52 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-06-07 19:57:16 <Guest68> That looks promising.
2021-06-07 19:57:18 × f33f046c-a02e quits (~aditya@223.178.225.24) (Quit: Konversation terminated!)
2021-06-07 19:57:29 <Guest68> I'll look into it.
2021-06-07 19:57:34 <Guest68> Thanks a lot for the help!
2021-06-07 19:57:36 <dminuoso> Guest68: also take a look at the megaparsec implementation
2021-06-07 19:57:45 <dminuoso> It should give you an idea how a continuation based parser could look like
2021-06-07 19:57:58 × kadoban quits (~kadoban@user/kadoban) (Quit: Bridge terminating on SIGTERM)

All times are in UTC.