Logs: freenode/#haskell
| 2020-10-08 16:09:16 | → | isovector1 joins (~isovector@172.103.216.166) |
| 2020-10-08 16:09:17 | × | isovector1 quits (~isovector@172.103.216.166) (Remote host closed the connection) |
| 2020-10-08 16:09:51 | <c_wraith> | anyway, it's very probable there's a space leak in the foldl' starting on line 18. |
| 2020-10-08 16:10:32 | <dminuoso> | Keep in mind you'll have to compile the program and dependencies with profiling |
| 2020-10-08 16:10:40 | <dminuoso> | So it's probably best to quickly wrap that into a cabal project |
| 2020-10-08 16:10:54 | <c_wraith> | all the foldl' is doing is making sure the tuple is evaluated. That's probably not what you meant. |
| 2020-10-08 16:11:21 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-matykgsofoxxiiee) |
| 2020-10-08 16:11:27 | <leungbk> | dminuoso: So, `./dijkstra +RTS p -RTS`? The executable says `dijkstra: unexpected RTS argument: p`. |
| 2020-10-08 16:11:43 | <c_wraith> | you need to add -rtsopts to the flags when compiling |
| 2020-10-08 16:11:59 | <leungbk> | This is simply a standalone file for a practice coding competition. |
| 2020-10-08 16:12:48 | → | cyphase joins (~cyphase@unaffiliated/cyphase) |
| 2020-10-08 16:13:32 | <leungbk> | c_wraith: I think that's what I meant? I wanted the tuple to be evaled since I needed to construct an updated distance/predecessor/set to use for the next call of `loop` |
| 2020-10-08 16:14:11 | <c_wraith> | you want *the components* of the tuple to be evaluated. |
| 2020-10-08 16:14:22 | <c_wraith> | You're telling it to stop after it gets the (,,) constructor |
| 2020-10-08 16:15:06 | × | quicksilver quits (~jules@roobarb.crazydogs.org) (Ping timeout: 256 seconds) |
| 2020-10-08 16:15:13 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 264 seconds) |
| 2020-10-08 16:15:21 | → | GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) |
| 2020-10-08 16:15:21 | × | GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host) |
| 2020-10-08 16:15:21 | → | GyroW_ joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-08 16:16:07 | × | chele quits (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 2020-10-08 16:16:08 | <monochrom> | TIL: cabal repl sets the environment variable HASKELL_DIST_DIR to e.g. /home/trebla/tmp/quv/dist-newstyle/build/x86_64-linux/ghc-8.8.4/quv-0.1.0.0/x/quv |
| 2020-10-08 16:16:23 | × | dan64- quits (~dan64@dannyadam.com) (Quit: ZNC - http://znc.in) |
| 2020-10-08 16:16:38 | <leungbk> | I'm confused. How would I evaluate the components of the tuple without doing something like a simultaneous fold of the tuple's components? |
| 2020-10-08 16:17:00 | <c_wraith> | leungbk: in particular, nothing in the loop causes the second or third elements of the tuple to be evaluated during the loop. |
| 2020-10-08 16:17:29 | <Cale> | leungbk: Either pattern matching on them, or using seq would do it. |
| 2020-10-08 16:17:37 | <monochrom> | I was kind of looking for that because if you use --builddir=foo then it will be s/dist-newstyle/foo/ and I was wondering if I wrote my own tool how would I know that. |
| 2020-10-08 16:17:55 | <c_wraith> | So both of those elements are chains of thunks that refer to the entire history of Set/Map insert calls |
| 2020-10-08 16:18:44 | <leungbk> | c_wraith: So strict-eval would solve the memory issue? That's unexpected to me since Set and IntMap.strict are evaluated strictly afaiu. |
| 2020-10-08 16:19:27 | hackage | reflex-dom-pandoc 0.6.0.0 - Render Pandoc documents to HTML using reflex-dom https://hackage.haskell.org/package/reflex-dom-pandoc-0.6.0.0 (sridca) |
| 2020-10-08 16:19:29 | <c_wraith> | The easiest fix is turning on the BangPatterns extension and modifying the lambda to look at (!oldDistances, !oldTree, !oldPredecessors) |
| 2020-10-08 16:20:46 | <c_wraith> | leungbk: that means *when they are forced to be evaluated* that they will be evaluated "fully" (to within the requirements of the type. Set only evaluates as much as necessary to balance the tree, Map only evaluates the keys as much as necessary to balance the tree and the values to WHNF) |
| 2020-10-08 16:20:51 | <monochrom> | The example I shown was from an exe-only package. I wonder if it's different for a lib package, or I guess more precisely a lib target "cabal repl exe:..." vs "cabal repl lib:..." |
| 2020-10-08 16:21:36 | <c_wraith> | leungbk: but your loop never does anything to cause oldTree or oldPredecessors to be evaluated at all. |
| 2020-10-08 16:21:42 | <monochrom> | c_wraith: Good eyes, I missed that. |
| 2020-10-08 16:21:45 | → | quicksilver joins (~jules@roobarb.crazydogs.org) |
| 2020-10-08 16:22:12 | <c_wraith> | leungbk: all it does with them is throw them into a thunk behind the (,,) constructor |
| 2020-10-08 16:22:54 | → | tzh joins (~tzh@2601:448:c500:5300::143b) |
| 2020-10-08 16:23:10 | <c_wraith> | leungbk: and so when foldl' forces the state to WHNF for the next iteration, the (,,) constructor is evaluated, but no further. |
| 2020-10-08 16:23:38 | <c_wraith> | monochrom: It's the first thing I look for when someone asks about too much memory use :) |
| 2020-10-08 16:23:38 | × | ralejs quits (~ralejs@2620:10d:c093:400::5:a494) (Read error: Connection reset by peer) |
| 2020-10-08 16:23:59 | → | ralejs joins (~ralejs@2620:10d:c093:400::5:a494) |
| 2020-10-08 16:24:12 | → | oisdk joins (~oisdk@2001:bb6:3329:d100:7807:4c86:5073:949e) |
| 2020-10-08 16:24:35 | × | alp quits (~alp@2a01:e0a:58b:4920:2089:d0d:8a96:a625) (Ping timeout: 272 seconds) |
| 2020-10-08 16:24:35 | × | Franciman quits (~francesco@host-95-247-31-62.retail.telecomitalia.it) (Quit: Leaving) |
| 2020-10-08 16:25:06 | <monochrom> | I looked for that too, but failed. |
| 2020-10-08 16:25:26 | <leungbk> | c_wraith: Thanks a lot, I think I'm getting a better sense of the issue. I'll need to investigate more on my own. |
| 2020-10-08 16:25:43 | <monochrom> | I stopped after I checked that "nextDist = du + weight" is kosher because "nextDist < ..." happened right away. |
| 2020-10-08 16:26:27 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-08 16:27:12 | → | hari1 joins (~hari@195.206.169.184) |
| 2020-10-08 16:27:37 | → | snakemas1 joins (~snakemast@213.100.206.23) |
| 2020-10-08 16:27:49 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 2020-10-08 16:28:21 | → | geekosaur joins (ac3a3bad@172.58.59.173) |
| 2020-10-08 16:29:42 | → | psygate joins (~psygate@unaffiliated/psygate) |
| 2020-10-08 16:31:22 | → | thir joins (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) |
| 2020-10-08 16:31:40 | × | knupfer quits (~Thunderbi@200116b82ce4df00fc254dbd4df5ac33.dip.versatel-1u1.de) (Quit: knupfer) |
| 2020-10-08 16:31:55 | → | knupfer joins (~Thunderbi@200116b82ce4df0099f7a7f92d599557.dip.versatel-1u1.de) |
| 2020-10-08 16:31:58 | × | knupfer quits (~Thunderbi@200116b82ce4df0099f7a7f92d599557.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-08 16:32:25 | → | knupfer joins (~Thunderbi@200116b82ce4df000c5e28fdad441edb.dip.versatel-1u1.de) |
| 2020-10-08 16:32:25 | × | knupfer quits (~Thunderbi@200116b82ce4df000c5e28fdad441edb.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-08 16:32:26 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-08 16:32:40 | → | knupfer joins (~Thunderbi@200116b82ce4df005d12f8a54a91044c.dip.versatel-1u1.de) |
| 2020-10-08 16:33:08 | × | jonatanb quits (~jonatanb@79.184.190.239.ipv4.supernova.orange.pl) (Quit: Leaving...) |
| 2020-10-08 16:34:07 | → | brandly joins (~brandly@c-73-68-15-46.hsd1.ma.comcast.net) |
| 2020-10-08 16:35:31 | <troydm> | what's easies way to strip .0 from number? |
| 2020-10-08 16:36:04 | <troydm> | like I have Double, and I want to print it without leading .0 |
| 2020-10-08 16:36:22 | × | borne quits (~fritjof@200116b864a02a00739dc2dd650b1f65.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 2020-10-08 16:39:18 | → | mgalese joins (60e67243@pool-96-230-114-67.bstnma.fios.verizon.net) |
| 2020-10-08 16:40:43 | × | fendor_ quits (~fendor@2001:629:3200:547:455f:533c:2a97:94e2) (Remote host closed the connection) |
| 2020-10-08 16:41:27 | <[exa]> | troydm: can you throw a few examples? |
| 2020-10-08 16:41:49 | <[exa]> | 'stripping .0' sounds like 'round' or 'truncate' but no idea if that's precisely what you wanted |
| 2020-10-08 16:42:01 | <troydm> | [exa]: nvm, figured it out |
| 2020-10-08 16:42:11 | <[exa]> | uh ok |
| 2020-10-08 16:42:49 | <geekosaur> | sounds like they discovered printf %g appending ".0" and wanting it not to |
| 2020-10-08 16:42:59 | <geekosaur> | or show |
| 2020-10-08 16:44:18 | × | thir quits (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 2020-10-08 16:44:27 | → | thir joins (~thir@p200300f27f0fc60038c1b16891cbfa03.dip0.t-ipconnect.de) |
| 2020-10-08 16:45:13 | <Clint> | people use %g? |
| 2020-10-08 16:45:33 | <geekosaur> | someone asked abou it the other day in here |
| 2020-10-08 16:46:20 | <Clint> | hmm |
| 2020-10-08 16:46:49 | <geekosaur> | of course, there's also "people use printf?" but there's no accounting for taste |
| 2020-10-08 16:47:12 | <geekosaur> | but I think showGFloat has the same behavior |
| 2020-10-08 16:49:01 | <maralorn> | Does anyone know of a Code formater that preserves or even introduces { ; } for all layout blocks? |
| 2020-10-08 16:49:58 | <geekosaur> | does SPJ count? |
| 2020-10-08 16:50:39 | <c_wraith> | he's not very automatic |
| 2020-10-08 16:52:23 | × | livvy quits (~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds) |
| 2020-10-08 16:55:05 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds) |
| 2020-10-08 16:55:50 | × | nineonine quits (~nineonine@216-19-190-182.dyn.novuscom.net) (Remote host closed the connection) |
| 2020-10-08 16:56:21 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 2020-10-08 16:56:42 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:a16f:75:586:b3b0) (Remote host closed the connection) |
| 2020-10-08 16:56:45 | <maralorn> | Who? |
| 2020-10-08 16:57:12 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:a16f:75:586:b3b0) |
| 2020-10-08 16:57:59 | <ski> | SPJ |
| 2020-10-08 16:58:49 | × | geekosaur quits (ac3a3bad@172.58.59.173) (Ping timeout: 245 seconds) |
| 2020-10-08 16:59:44 | × | mgalese quits (60e67243@pool-96-230-114-67.bstnma.fios.verizon.net) (Remote host closed the connection) |
| 2020-10-08 17:00:47 | <monochrom> | haha |
| 2020-10-08 17:01:48 | <monochrom> | I think the real objection is economical. SPJ is too expensive to hire for code formatting. |
| 2020-10-08 17:02:20 | <maerwald> | wow, that would be a boss move... |
| 2020-10-08 17:02:34 | <maerwald> | "what's your code formatter?" - "SPJ" |
| 2020-10-08 17:02:36 | × | kritzefitz quits (~kritzefit@2003:5b:203b:100:c23e:baff:feb8:8cdb) (Remote host closed the connection) |
| 2020-10-08 17:02:39 | <dolio> | I would never let SPJ format my code. |
All times are in UTC.