Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-02-07

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:23 pyrimidine joined #moarvm
01:03 zakharyas joined #moarvm
01:55 timotimo you won't believe who wrote this week's weekly! https://p6weekly.wordpress.com/2017/02/07/2017-06-fosdem-after-math/ - click here to find out!
01:58 pyrimidine joined #moarvm
02:16 ggoebel joined #moarvm
02:21 [Coke] timotimo++
02:26 pyrimidine joined #moarvm
02:28 samcv timotimo, are we going to start advertising using Taboola?
02:28 samcv like sponsored news articles lol
02:32 timotimo i don't know what that is?
03:29 pyrimidine joined #moarvm
04:30 MasterDuke_ joined #moarvm
04:36 samcv it's sponsored news articles that are clickbaity
04:36 samcv it's an advertising platform like google adwords except it's like for sponsored ads
04:36 samcv eurr sponsored news i mean
05:53 JimmyZ samcv: re https://github.com/MoarVM/MoarVM/commit/fc3a77d27cf9e3533f8ee3e8834446ec3a88a392, looks like https://github.com/MoarVM/MoarVM/blob/b8c56a41bfb1a8cbd566cb60350b9887d3368038/src/strings/ops.c#L1532-L1704 also would be a good place to use that.
05:54 JimmyZ samcv: which reduces moarvm startup time too. :)
06:31 samcv JimmyZ, why does putting it in ops make startup time faster?
06:31 samcv enlighten me
06:32 samcv why not put everything in ops.c :P
06:50 JimmyZ samcv: MVM_string_cclass_init can be removed. so faster startup time
06:51 samcv ah
06:51 samcv well. it can be removed for just that one class right?
06:55 JimmyZ samcv: I am not sure ,but looks like static UPV_* are constants
06:55 samcv yep they store property value codes i think
06:55 JimmyZ yeah
06:55 samcv i mean i doubt it takes very long at all to call that
06:57 JimmyZ every moarvm startup time save helps rakudo startup time too, I would say :)
06:57 samcv yeah but like less than a ms lol
06:58 samcv i thought about cutting some of that out, but the gains would be insignificant so put it on the back burner
06:58 samcv not sure about moving the files though
07:22 pyrimidi_ joined #moarvm
07:24 samcv JimmyZ, how can i get mvm to use all my ram on purpose?
07:25 samcv i want to test out a script to kill moar if it gobbles up all my ram
07:56 nine samcv: why don't you just set a ulimit?
07:57 JimmyZ m: sub a() { a() }; a
07:57 camelia rakudo-moar 9f7e61: OUTPUT«MoarVM panic: Memory allocation failed; could not allocate 131072 bytes␤»
07:57 samcv good question nine
07:59 samcv how much should i set it for 16GB of ram?
07:59 samcv like 8GB?
08:01 samcv ok i'm setting it to 5GB i guess
08:01 nine 5 GiB sounds like plenty for MoarVM and any program really
08:02 samcv JimmyZ, i need something that doesn't kill itself
08:04 samcv oh nvm that one does. my ulimit worked :)
08:04 samcv perfect
08:04 samcv now i can not get sad
08:06 nine samcv: btw. if you've got a typical consumer SSD, it will suck tremendously at write work loads. It will start fast and slow to a crawl very soon and may even be slower than a plain old HDD.
08:06 samcv i have SSD
08:08 nine We have learned the very hard way that this is the biggest difference between consumer and data center SDDs.
08:09 nine I got myself one of these http://www.intel.com/content/www/us/en/solid-state-drives/solid-state-drives-750-series.html because running our work project's test suite which does a lot of setup gave me too much opportunity to do housework. Not even the mouse cursor would move much of the time.
10:02 jnthn timotimo++ # p6weekly
10:02 jnthn moarning all o/
10:03 zakharyas joined #moarvm
10:03 nwc10 Correct! :-)
10:04 nwc10 jnthn: running the spectest with harness6 (in a loop) under valgrind, I can't get it to trigger anything
10:04 nwc10 (the harness is under valgrind, not the tests that it is running)
10:04 jnthn Hmmm.
10:04 nwc10 yes, this is what I think, as doing the same thing with ASAN occasionally fails
10:04 jnthn As in, it works reliably every time for you, or just doesn't abort/SEGV
10:05 jnthn ?
10:05 jnthn It's odd indeed.
10:05 nwc10 the harness runs reliably (er, I think almost always. Maybe I got one of those Perl 6 exceptions at one point)
10:06 nwc10 as the spectest does a git pull, it can end up with newer spectests than the perl6-m that is running them, so sometimes they can fail
10:06 jnthn OK
10:06 * jnthn wonders if mtrace is on Linux what malloc_history is on OSX...
10:09 nwc10 I wasn't aware of either. They look similar. The OS X man page suggests that it can give you a backtrace
10:15 jnthn Well, the main interesting thing about malloc_history is that it keeps a full history of every malloc/free/realloc
10:15 jnthn Then you can query by address
10:16 jnthn After the fact
10:16 jnthn And since it's a full history, it can help explain things where the point of problem and point of crash are far apart
10:16 agentzh joined #moarvm
10:16 nwc10 this is useful
11:11 JimmyZ m: my \SCALE = 3; my \FANOUT = 2; sub divide-and-conquer($n, $depth) { say "$depth: $n" if 0; $depth <= 0 ?? $n !! [+] await do for ^FANOUT { start { divide-and-conquer($n / FANOUT, $depth - 1) } } }; say divide-and-conquer(1.0, SCALE);
11:11 camelia rakudo-moar 699013: OUTPUT«1␤»
12:30 zakharyas joined #moarvm
12:36 lucasb joined #moarvm
12:42 lucasb A question about style: there's +350 occurrences of the 'for (i = 0; i < foo; i++)' idiom. I once saw a macro that wraps this 'for' idiom and works like this: DO(5, printf("%d", i)).
12:42 lucasb Do you think this kind of macro clutters the source code?
12:43 lucasb here it is: #define DO(n,stm) {int i=0,_n=(n); for(;i<_n;i++){stm}}
12:43 lucasb copied from the J source code :)
12:43 lucasb grep -r -h -o 'for (i = 0; i < .*; i++)' src | wc -l
12:59 ggoebel joined #moarvm
13:04 samcv lucasb, i think most people know what it means, and it's less mysterious
13:05 samcv or more. i'm not sure. in different ways
13:06 samcv if you need to use the value of i, i think it's a downgrade. but if you are using it just to do somethnig X number of times it might be ok-ish
13:07 jnthn I think anyone whose written much see will pattern-match the typical for (...) idiom pretty quick
13:08 jnthn s/see/C/ # gah, not enough sleep
13:08 lucasb i c what u did
13:09 lucasb :)
13:09 lucasb samcv, jnthn: right, agreed
13:09 jnthn Macros also obscure things when debugging sometimes
13:09 jnthn Happens a bit with MVMROOT now and then
13:09 samcv i hope they will C it
13:09 samcv too much see!
13:54 pyrimidine joined #moarvm
14:18 agentzh joined #moarvm
15:18 pyrimidine joined #moarvm
16:50 agentzh joined #moarvm
16:55 pyrimidine joined #moarvm
17:17 geekosaur joined #moarvm
17:38 TimToady joined #moarvm
18:04 agentzh joined #moarvm
18:16 pyrimidine joined #moarvm
18:43 * IOninja friendly-reminds about PR https://github.com/MoarVM/MoarVM/pull/522 :")
18:47 jnthn Will get to it tomorrow :)
18:47 jnthn Have Perl 6 tuits all day tomorrow
18:47 IOninja \o/
19:03 * TimToady yays
19:04 * TimToady is still detangling all the incestuous bits of %*LANG...
19:11 IOninja "I want to find out where UTF-8 encoded command line arguments are getting mangled" anyone know? https://github.com/perl6/nqp/issues/346#issuecomment-278107030
19:12 jnthn IOninja: Hmm...looking at that one for a moment between cooking tasks...I'm not quite convinced it's a desirable change. :-( We try to prefix everything that we export MVMFoo (types) or MVM_foo (functions)
19:13 IOninja jnthn: OK, I copied the comment to the PR
19:14 IOninja I'm not the author, it's just it's the author's first ever contribution to OSS and they weren't sure of the process on Sunday :)
19:14 jnthn I feel kinda bad because it's his first contrib *and* somebody filed a ticket quite a while ago suggesting it, so it looked like a valid task :S
19:15 IOninja heh :} Well, rejected PRs are part of the processes.
19:27 pyrimidine joined #moarvm
19:33 jnthn About the earlier question: raw command line args are stashed away at https://github.com/MoarVM/MoarVM/blob/master/src/main.c#L186 which is just the raw bytes; decoding happens on first use, e.g. at https://github.com/MoarVM/MoarVM/blob/master/src/io/procops.c#L1202
19:33 jnthn There's already a different path for Windows
19:33 timotimo aye, i just posted that to the nqp issue
19:33 jnthn ah, OK, cool :)
19:34 timotimo hopefully nanis can figure out how to get this right for us
19:34 timotimo because i'm stumped :)
19:34 pyrimidine joined #moarvm
19:34 timotimo we can probably actually use wmain rather than main for moarvm when we build on windows
19:34 timotimo and perhaps sidestep most of that trouble
19:35 jnthn Probably
19:36 jnthn Though we'd also have to then decode it as utf-16 I guess :)
19:36 jnthn Which is fine
19:36 timotimo right, ifdefs all the way down
19:36 timotimo and using strlenw or something
19:38 jnthn Also an ifdef on the undecoded clargs I guess to use the wide data type
19:38 jnthn Then it should all match up
19:39 timotimo right
19:39 timotimo i'd suggest i take this task, but i don't have a windows ready to try it out :\
19:39 timotimo i guess i can cross-compile to windows and just run it with wine, hah
19:43 timotimo (no.)
19:43 timotimo (not going to go through that experience)
20:15 dogbert17 o/
20:15 dogbert17 'This file contains 4 heap snapshots. To select one to look' so now what?
20:17 dogbert17 have run a minimal spectest, i.e. approx 30 files and created a heap dump file with 4 snapshots. when the threshold was set to 10 I got 5 snapshots
20:36 pyrimidine joined #moarvm
20:37 timotimo try "help"
20:37 timotimo it'll tell you how to select a snapshot
20:37 timotimo the first thing will be "summary", usually
20:38 timotimo how big's the file when you compress it?
20:45 dogbert17 the one I have now is 230MB uncompressed
20:46 dogbert17 compressed it's 22 meg
20:48 dogbert17 the heap sizes displayed if I type 'summary' are a magnitude lower than the RSS displayed by ps at roughly the same time
20:48 dogbert17 s/lower/smaller/
20:58 dogbert17 timotimo, jnthn: here's a gist: https://gist.github.com/dogbert17/d6015aa9d051af86f4bd9d631b0bf2bc
21:47 timotimo dogbert17: that points roughly in the direction that our calculations for size are inaccurate
22:01 jnthn Note that some of that RSS will be for storing the profiles themselves, though
22:01 jnthn But yeah, I'm reckoning that ain't the whole story
22:02 dogbert17 jnthn, true (blames beer), I have updated the gist with how it looks without the --profile=heap option
22:02 timotimo oh, yeah, that's a whole lot of extra data
22:03 timotimo i wonder if we should employ some kind of compression scheme?
22:03 dogbert17 yeah, the heap profiler uses a lot of memory, tried it on one of my small scripts and it crashed :(
22:05 * jnthn hasn't had trouble with it, but has 16GB of RAM in this box :)
22:06 jnthn It's probably be better if it flushed to disk after each snapshot
22:06 dogbert17 this is too much for my box: 'my $numPrimes = 0; for (2...*) -> $x { if $x.is-prime && ++$numPrimes == 10_001 { say $x; last; }}'
22:07 timotimo yeah, but we have to run some perl6(actually nqp) code to create the string representation
22:08 jnthn Yeah, that's why it's the way it is at present :)
22:08 jnthn And we don't want the writing of it to influence things.
22:09 timotimo we can of course register a callable that we call into when the time comes
22:09 jnthn That's still risk influencing it though
22:09 jnthn Heh, that primes one must make quite a bit of garbage
22:10 jnthn Oh, I guess for 10,000 primes you've gotta test a lot of values
22:10 jnthn But still it's quite a few...guess SEQUENCE may be to thank
22:12 dogbert17 it was probebly not the best example to use :-)
22:12 jnthn Yeah, just up to 1000 primes it's a 224MB file
22:12 dogbert17 if you suspect it's a Project Euler problem you'ld be correct :)
22:15 dogbert17 https://projecteuler.net/problem=7
22:17 jnthn :)
22:17 jnthn Rest time; back tomorrow :)
22:17 dogbert17 nite
23:00 pyrimidine joined #moarvm
23:15 pyrimidine joined #moarvm

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary