Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-31 17:15:44 __monty__ joins (~toonn@unaffiliated/toonn)
2021-03-31 17:16:16 <ski> however, it seemed to happen that with `df' in the same module, it managed to, in that case, avoid this. probably due to specialization, and possibly also inlining. but it didn't manage to do that with `dff' in a different module
2021-03-31 17:16:31 <ski> that's my theory about the behaviour you observed, anyway
2021-03-31 17:16:39 <gaff> ski: primes is shared because it is not a function, is suppose?
2021-03-31 17:16:46 <ski> if you're curious, you could dive into core, or profile, or so
2021-03-31 17:16:49 <ski> yep
2021-03-31 17:16:57 <gaff> reasoning from your statements
2021-03-31 17:18:35 <gaff> ski: i am not familiar with `DMR`. what does it stand for, in full?
2021-03-31 17:18:36 <ski> it's like if you had said `isPrime n = ..n.. where primes = ...', or `isPrime n = let primes = ... in ..n..' (or, in the `let'-floating case, it would be `isPrime = let primes = ... in \n -> ..n..', which would share `primes' over the body of `isPrime', but not across calls to it. i guess whether it would share among recursive calls depends on whether it would float it out of the recursion or not)
2021-03-31 17:19:11 <geekosaur> "dreaded monomorphism restriction"
2021-03-31 17:19:35 <gaff> ah, i know that, just didn't know the abbreviation.
2021-03-31 17:19:45 <geekosaur> "monomorphism restriction" is its proper name. "dreaded" is more or less because of this :)
2021-03-31 17:20:01 <gaff> i see
2021-03-31 17:20:37 <ski> (also, in actuality, it would probably be more like `isPrime @i n = ..i..n.. where myPrimes = primes @i', where `primes' is the polymorphic one, defined on the top-level, and `myPrimes' is the specialization of it, to the particular type `i' (with corresponding `Integral' instance dictionary) that was used for this particular call to `isPrime')
2021-03-31 17:21:14 <gaff> i see
2021-03-31 17:21:59 <ski> (so that `isPrime @i n = ..i..n.. where myPrimes = primes @i' would then be translated into `isPrime @i iDict n = ..i..n.. where myPrimes = primes @i iDict', passing the dictionary to `primes' to get the resulting list, then sharing that list, by naming it `myPrimes' and reusing that name)
2021-03-31 17:22:03 nbloomf joins (~nbloomf@2600:1700:ad14:3020:4485:5098:cb7a:cbe1)
2021-03-31 17:22:26 <gaff> ah
2021-03-31 17:23:08 <ski> anyway, i'm not totally sure on the details that it actually does. but it could do something along these lines
2021-03-31 17:24:20 <gaff> ski: using rank types does entail a performance cost sometimes.
2021-03-31 17:24:55 <gaff> in this case, at least, for example.
2021-03-31 17:26:56 <ski> there's no higher-rank stuff here
2021-03-31 17:27:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-03-31 17:27:27 <ski> the performance related stuff here is about the class constraints, implemented by passing dictionaries
2021-03-31 17:27:38 <gaff> i see
2021-03-31 17:27:50 <ski> (and how that precludes the sharing of results)
2021-03-31 17:27:57 <gaff> okay, i will have to remember that
2021-03-31 17:28:05 jamm_ joins (~jamm@unaffiliated/jamm)
2021-03-31 17:28:45 <gaff> this problem came as a surprise to me. i have never seen it before.
2021-03-31 17:29:05 <gaff> i suppose that's things come to you when you are young
2021-03-31 17:30:03 <gaff> ski: thanks much. appreciate your help, indeed.
2021-03-31 17:30:34 dyeplexer joins (~lol@unaffiliated/terpin)
2021-03-31 17:30:48 <ski> np
2021-03-31 17:32:12 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 246 seconds)
2021-03-31 17:32:35 <gaff> ski: one way i could track this kind of stuff is to load the code in ghci and step through it line by line.
2021-03-31 17:32:47 <ski> i guess
2021-03-31 17:32:54 <gaff> ah
2021-03-31 17:33:27 MartinR23 joins (d9f579b1@pd9f579b1.dip0.t-ipconnect.de)
2021-03-31 17:33:43 <ski> one can learn to watch out for things that are intended to be shared, but are overloaded
2021-03-31 17:34:10 <ski> (or, at least, to relatively quickly realize that could be the culprit, in the case of a problem)
2021-03-31 17:34:37 <gaff> also, the thought of changing the type to INT came to me earlier, but i, for some reason, dismissed it without checking it out.
2021-03-31 17:34:54 <gaff> i see
2021-03-31 17:35:16 <gaff> nice tips. thanks
2021-03-31 17:35:58 <gaff> despite these issues, i love writing code in haskell. it is so elegant.
2021-03-31 17:38:52 × borne quits (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) (Ping timeout: 276 seconds)
2021-03-31 17:40:12 × gaff quits (~user@49.207.224.136) (Quit: ERC (IRC client for Emacs 27.1))
2021-03-31 17:41:33 DTZUZU joins (~DTZUZO@205.ip-149-56-132.net)
2021-03-31 17:44:05 jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client")
2021-03-31 17:44:34 × DTZUZU_ quits (~DTZUZO@207.81.119.43) (Ping timeout: 268 seconds)
2021-03-31 17:44:47 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
2021-03-31 17:45:10 × argento quits (~argent0@191.81.225.82) (Ping timeout: 268 seconds)
2021-03-31 17:51:22 × geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
2021-03-31 17:52:11 isBEKaml joins (~isBEKaml@unaffiliated/isbekaml)
2021-03-31 17:54:00 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds)
2021-03-31 17:54:22 gitgood joins (~gitgood@80-44-12-39.dynamic.dsl.as9105.com)
2021-03-31 17:55:02 DTZUZU_ joins (~DTZUZO@205.ip-149-56-132.net)
2021-03-31 17:55:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-31 17:55:41 × fuzzy_id quits (~user@1.red-88-0-41.dynamicip.rima-tde.net) (Ping timeout: 260 seconds)
2021-03-31 17:55:47 × DTZUZU quits (~DTZUZO@205.ip-149-56-132.net) (Read error: Connection reset by peer)
2021-03-31 17:56:15 TheMule joins (~TheMule@aftr-37-201-195-154.unity-media.net)
2021-03-31 17:56:20 × TheMule quits (~TheMule@aftr-37-201-195-154.unity-media.net) (Client Quit)
2021-03-31 17:56:20 × gitgood quits (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) (Client Quit)
2021-03-31 17:56:26 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2021-03-31 17:58:35 frozenErebus joins (~frozenEre@37.231.244.249)
2021-03-31 17:58:45 Guest41032 joins (~laudiacay@67.176.215.84)
2021-03-31 17:59:20 gitgood joins (~gitgood@80-44-12-39.dynamic.dsl.as9105.com)
2021-03-31 17:59:32 × MartinR23 quits (d9f579b1@pd9f579b1.dip0.t-ipconnect.de) (Quit: Connection closed)
2021-03-31 18:01:02 DTZUZU_ is now known as DTZUZU
2021-03-31 18:01:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-03-31 18:02:19 mouseghost joins (~draco@wikipedia/desperek)
2021-03-31 18:03:33 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 260 seconds)
2021-03-31 18:04:43 <Uniaika> MrMobius:
2021-03-31 18:04:43 × mrlazos quits (~mrlazos@46-44-92.adsl.cyta.gr) (Read error: Connection reset by peer)
2021-03-31 18:04:47 <Uniaika> woops, sorry!
2021-03-31 18:05:28 mrlazos joins (~mrlazos@46-44-92.adsl.cyta.gr)
2021-03-31 18:06:14 × mrlazos quits (~mrlazos@46-44-92.adsl.cyta.gr) (Remote host closed the connection)
2021-03-31 18:06:49 borne joins (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de)
2021-03-31 18:06:50 × Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 260 seconds)
2021-03-31 18:06:50 × stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds)
2021-03-31 18:06:53 × bodisiw quits (~bodiskw@cpe-74-138-114-237.kya.res.rr.com) (Quit: Leaving)
2021-03-31 18:07:27 isBEKaml parts (~isBEKaml@unaffiliated/isbekaml) ()
2021-03-31 18:07:53 geekosaur joins (82650c7a@130.101.12.122)
2021-03-31 18:08:12 TheMule joins (~TheMule@2a02:908:3a3:8660:e095:501c:2700:5d7c)
2021-03-31 18:10:25 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-03-31 18:10:55 × TheMule quits (~TheMule@2a02:908:3a3:8660:e095:501c:2700:5d7c) (Client Quit)
2021-03-31 18:11:23 TheMule joins (~TheMule@aftr-37-201-195-154.unity-media.net)
2021-03-31 18:11:39 × dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection)
2021-03-31 18:11:56 TheMule is now known as mkDoku
2021-03-31 18:12:13 conal joins (~conal@64.71.133.70)
2021-03-31 18:12:26 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-03-31 18:12:39 × rajivr quits (uid269651@gateway/web/irccloud.com/x-vhalmegvcwkpzygm) (Quit: Connection closed for inactivity)
2021-03-31 18:19:05 × __minoru__shirae quits (~shiraeesh@109.166.57.243) (Ping timeout: 268 seconds)
2021-03-31 18:19:45 Pickchea joins (~private@unaffiliated/pickchea)
2021-03-31 18:19:58 vicfred joins (~vicfred@unaffiliated/vicfred)
2021-03-31 18:20:07 stree joins (~stree@68.36.8.116)
2021-03-31 18:22:36 <tomsmeding> Under what conditions is a ByteString null-terminated?
2021-03-31 18:23:03 Sgeo_ joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
2021-03-31 18:23:24 <tomsmeding> as in: does bytestring itself null-terminate things sometimes, or is this always the user's task?
2021-03-31 18:24:18 Sgeo__ joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
2021-03-31 18:24:55 olle joins (~olle@i5E8666BD.versanet.de)

All times are in UTC.