Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-02-09

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

All times shown according to UTC.

Time Nick Message
00:01 agentzh joined #moarvm
00:16 pyrimidine joined #moarvm
00:34 pyrimidine joined #moarvm
00:37 Ven joined #moarvm
00:43 IOninja It's cause I don't know C and when I looked online at math lib it only had abs() for int.
00:44 IOninja Or rather stdlib
00:51 pyrimidine joined #moarvm
01:09 zakharyas joined #moarvm
01:10 pyrimidi_ joined #moarvm
01:28 pyrimidi_ joined #moarvm
01:35 pyrimidi_ joined #moarvm
01:46 pyrimidi_ joined #moarvm
01:48 IOninja What's the worst environment do we support? Like if I wanted to test if it's OK to use that fabs thing for abs_n?
01:49 IOninja MSVC or something? Is that the worst? Is it free?
01:49 * IOninja goes to bed but will read the backlog
02:04 pyrimidi_ joined #moarvm
02:23 pyrimidine joined #moarvm
02:40 pyrimidine joined #moarvm
02:48 ilbot3 joined #moarvm
02:48 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
02:58 dogbert11 joined #moarvm
02:58 pyrimidi_ joined #moarvm
03:01 moritz joined #moarvm
03:17 pyrimidi_ joined #moarvm
03:35 pyrimidi_ joined #moarvm
03:53 pyrimidi_ joined #moarvm
04:10 pyrimidi_ joined #moarvm
04:29 pyrimidi_ joined #moarvm
04:47 pyrimidine joined #moarvm
04:51 pyrimidine joined #moarvm
05:06 pyrimidine joined #moarvm
05:23 pyrimidine joined #moarvm
05:40 pyrimidine joined #moarvm
05:44 samcv i get some warnings if i compile with same extra options with gcc
05:44 samcv but the warnings are only for the 3rdparty libraries that use `-pedantic`
05:44 samcv warning: ‘-pedantic’ is not an option that controls warnings [-Wpragmas]
05:44 samcv we don't use pedantic but some of the 3rd party libs do
05:45 samcv looks like libuv and libatomic_ops have it applied
05:58 pyrimidine joined #moarvm
06:03 Geth ¦ MoarVM: samcv++ created pull request #530: Enforce consistent commenting style
06:03 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/530
06:16 pyrimidine joined #moarvm
06:24 pyrimidine joined #moarvm
06:29 zostay_ joined #moarvm
06:33 moritz joined #moarvm
07:12 brrt joined #moarvm
07:12 brrt good * #moarvm
07:25 pyrimidine joined #moarvm
07:33 timotimo samcv: i think it has to be -fpedantic rather than -pedantic
07:33 timotimo yo brr
07:33 samcv may be timotimo
07:47 brrt joined #moarvm
08:27 pyrimidine joined #moarvm
08:49 pyrimidine joined #moarvm
08:52 pyrimidi_ joined #moarvm
09:55 pyrimidine joined #moarvm
09:58 jnthn morning o/
09:58 timotimo oh
09:58 timotimo i *just* wrote a message for you on #perl6 %)
10:00 jnthn IOninja: You can get a free version of MSVC, though the easiest way to check if it supports a function is to google "<function name> msdn" to see if it's in their docs :P
10:00 jnthn https://msdn.microsoft.com/en-us/library/aa272573(v=vs.60).aspx suggests fabs is available, anyway
10:01 jnthn http://landinghub.visualstudio.com/visual-cpp-build-tools to download the compiler
10:06 Geth ¦ MoarVM: a109b79391 | (Samantha McVey)++ | 6 files
10:06 Geth ¦ MoarVM: Enforce consistent commenting style
10:06 Geth ¦ MoarVM:
10:06 Geth ¦ MoarVM: Use /* */ instead of //
10:06 Geth ¦ MoarVM:
10:06 Geth ¦ MoarVM: // commenting is not part of C standards before C99
10:06 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a109b79391
10:06 Geth ¦ MoarVM: 65972ecbce | (Jonathan Worthington)++ | 6 files
10:06 Geth ¦ MoarVM: Merge pull request #530 from samcv/comments
10:06 Geth ¦ MoarVM:
10:06 Geth ¦ MoarVM: Enforce consistent commenting style
10:06 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/65972ecbce
10:06 samcv morning jnthn
10:07 jnthn o/ samcv
10:08 samcv something new i learned today. that // comments is not defined in standards before C99
10:08 samcv suprised me
10:08 jnthn Yeah, that's one reason I've stuck with /* */ :)
10:08 jnthn I tend to use // for my debug comments
10:09 samcv yeah. some of our 3rd party ones use //
10:09 jnthn 'cus they look out of place, so I spot them before I push :)
10:09 samcv so enforcing it would be a bad idea
10:09 jnthn Ah, k
10:09 samcv unless we can only do it for MoarVM itself but that's more work
10:09 jnthn Yeah, not worth the time when there's so many more important things to do :)
10:12 dogbert11 o/
10:13 dogbert11 jnthn, did you see the result of my kludge-experiment yesterday? "jnthn: did an experiment, changing the last line of is_full_collect to 'return percent_growth >= MVM_GC_GEN2_THRESHOLD_PERCENT || promoted > some fixed value;' solved my problems with HARNESS_TYPE=6 TEST_JOBS=2 and running htmlify.p6 on my machine."
10:14 samcv really?
10:15 dogbert11 yup
10:15 samcv what is this some fixed value
10:16 dogbert11 I had set it to 30 meg when I tested
10:16 dogbert11 I also tried 135 megs which also worked
10:16 samcv so 3e7 ?
10:17 dogbert11 yes
10:17 samcv kk
10:18 dogbert11 note that when mentioning htmlify I didn't use the --parallel option
10:19 samcv OO::Monitors is good? should i try it out sometime?
10:20 dogbert11 what's the preferred way to write something to stdout/stderr from within moarvm, I would like to print some data for later analysis?
10:20 samcv i read the description and wasn't totally sure how I would use it. it seemed pretty abstract from the description
10:20 samcv fprintf(stderr, "whatever")
10:20 dogbert11 cool thx
10:21 samcv stdout won't go anywhere, well at least doing printf
10:21 samcv never tried fprintf(stdout
10:21 dogbert11 good to know
10:21 samcv i get Tried to get the result of a broken Promise running htmlify.p6
10:22 samcv https://gist.github.com/7be2ec5920f525f6aad1242a07e187b0 this is what i changed in MVM
10:24 dogbert11 are you using --parallel?
10:24 samcv yep
10:24 dogbert11 or does the exception say something about ab path method
10:24 samcv https://gist.github.com/a6068059d446c8eda419e9e408dd637d
10:25 jnthn dogbert11: Yeah, saw that, been pondering exactly what to do with this information. :-)
10:25 samcv weird why did gist auto do a .rb file
10:25 samcv i just did gist -P
10:25 samcv oh well
10:25 dogbert11 jnthn, me too :)
10:26 samcv can you checkout all your gists?
10:26 samcv it seems like they use git in the backend for gists but
10:26 dogbert11 It seems to me that rss is increasing much to rapidly in some cases which throws the percentage calculation off
10:27 dogbert11 samcv: have never tried
10:27 jnthn dogbert11: I wonder if we should calculate an upper threshold based on amount of RAM in the host machine.
10:27 samcv are you running htmlify.p6 with --parallel=2?
10:27 jnthn "Fixed" upper threshold that is
10:28 dogbert11 samcv: I run it without --parallel, before that didn't work either due to running out of memory (am on 32 bit ...)
10:28 jnthn samcv: I guess I'm biased 'cus I wrote OO::Monitors. :P It's just a way to write a class that acquires a lock on entry to any of its methods and releases it at method exit.
10:29 samcv oh ok dogbert11
10:29 samcv ah ok
10:29 jnthn samcv: Without actually having to manage the lock yourself
10:29 jnthn Plus it supports condition variables
10:29 samcv so you can write a class with anything you want inside it?
10:29 samcv and it will have magical lockingness
10:29 jnthn Essentially yes, with the usual caveats
10:29 samcv that makes it much easier to understand then
10:30 jnthn (Caveats being stuff like: if you return mutable state to the outside world, all bets are off. And if you start calling monitors from monitors then you can create deadlock situations.)
10:31 dogbert11 jnthn: sounds like an interesting idea
10:31 jnthn (These aren't anything Perl 6 specific, just laws of nature, or whatever. :))
10:31 jnthn dogbert11: I think libuv has a function to get that info
10:32 jnthn https://github.com/libuv/libuv/blob/v1.x/include/uv.h#L1388
10:33 dogbert11 something like 'if (promoted > (physmem / some-cleverly-selected-value)) return 1 ?
10:33 jnthn Something like that
10:34 jnthn I don't have a food feel for the cleverly selected value though :)
10:34 jnthn You're probably in a better place than I am to tune it :P
10:34 samcv pick a random number :)
10:34 dogbert11 would it be costly performancewise you think
10:34 samcv so what does this function we're talking about do?
10:34 samcv nvm reading the comment :)
10:35 jnthn :)
10:35 samcv oh wait that's the one above it
10:35 jnthn samcv: We're discussing how we decide when to do full GC collections
10:35 samcv ok great
10:35 jnthn Which is costly
10:35 samcv for sure
10:35 jnthn So we try and be clever about it
10:35 dogbert11 I noticed yesterday when I used the hardcoded 30 meg limit that I lost ~5% perf when parsing the setting
10:35 jnthn Like, a better criteria here once won me 10% of CORE.setting parse time
10:35 jnthn *off
10:36 samcv wow
10:36 dogbert11 if the value was 135 meg the loss was much smaller
10:36 samcv so if that function always returns 0 will it never GC?
10:36 jnthn dogbert11++ has discovered the current behavior is sub-optimal on memory-constrained machines though.
10:36 samcv well never do full gc
10:36 jnthn samcv: Yes, which is a good way to go pretty fast until you run out of memory :P
10:36 samcv dogbert11, how much memory do you have
10:37 dogbert11 3 gigs in my vm
10:37 samcv ok so uhm
10:37 samcv how much other memory use by other programs
10:37 samcv going to set my ulimit to some value
10:37 samcv and try and build the docs
10:38 * dogbert11 which reminds me about the filehandle problem when running make spectest HARNESS_TYPE=6 and only one test job
10:40 dogbert11 jnthn: I guess I will do some experiments and then write a PR unless you figure out something more clever in the meantime :)
10:40 jnthn Please do. I'm currently fixing the double-close-of-async-socket=SEGV issue
10:40 jnthn And then need to go worry about $other-job for a bit.
10:41 jnthn Where it's looking a bit like my internal prototype written in Perl 6 is suddenly at risk of escaping to actual users. :O
10:41 dogbert11 oops
10:41 jnthn As prototypes go it's pretty well written, and it's not CPU-bound, except the part that is which uses a native library. :)
10:42 dogbert11 which probably means that it's actually doing its job well
10:43 jnthn It's decently reliable. :)
10:43 jnthn Like, I've not seen it fall in a heap for a long time.
10:43 jnthn It found a few bugs in Rakudo/Moar that got patched.
10:43 jnthn It's using supply/whenever blocks and Proc::Async a ton
10:50 dogbert11 is the SEGV bug you're fixing something you've found in your own code?
10:51 pyrimidine joined #moarvm
10:52 pyrimidi_ joined #moarvm
10:59 jnthn dogbert11: No, tony-o reported it yesterday
11:00 samcv so it's only using 900MB for me right now
11:00 samcv been running the docbuild for a while
11:00 samcv where in it does it take up most of the memory dogbert11
11:03 jnthn use Test; my $t = IO::Socket::Async.listen("localhost", 5007).tap: -> $conn { }; my $conn = await IO::Socket::Async.connect("localhost", 5007); lives-ok { for ^5 { $conn.close; sleep 0.05; } }; $t.close
11:03 jnthn m: use Test; my $t = IO::Socket::Async.listen("localhost", 5007).tap: -> $conn { }; my $conn = await IO::Socket::Async.connect("localhost", 5007); lives-ok { for ^5 { $conn.close; sleep 0.05; } }; $t.close
11:03 camelia rakudo-moar a21d2f: OUTPUT«Unhandled exception: cannot close a closed socket␤»
11:03 jnthn That's the good case...note how it actually brings down the VM :/
11:03 jnthn (Fixed locally)
11:07 jnthn m: use Test; my $t = IO::Socket::Async.listen("localhost", 5007).tap: -> $conn { }; my $conn = await IO::Socket::Async.connect("localhost", 5007); dies-ok { $conn.close; await $conn.write("42") }; $t.close
11:07 camelia rakudo-moar a21d2f: OUTPUT«ok 1 - ␤»
11:07 jnthn use Test; my $t = IO::Socket::Async.listen("localhost", 5007).tap: -> $conn { }; my $conn = await IO::Socket::Async.connect("localhost", 5007); dies-ok { $conn.close; await $conn.write("42".encode("ascii")) }; $t.close
11:07 jnthn m: use Test; my $t = IO::Socket::Async.listen("localhost", 5007).tap: -> $conn { }; my $conn = await IO::Socket::Async.connect("localhost", 5007); dies-ok { $conn.close; await $conn.write("42".encode("ascii")) }; $t.close
11:07 camelia rakudo-moar a21d2f: OUTPUT«Unhandled exception: cannot write to a closed socket␤»
11:08 jnthn That one did too
11:08 jnthn Moar tests
11:09 samcv jnthn, so if i have a string that's encoded it utf8-c8, can i just 'filename.txt'.IO.spurt($string, :encoding('utf8-c8')) or do i need to .encode('utf8-c8')
11:09 jnthn That should work
11:09 samcv oh looks like i need to do the .encode
11:09 jnthn though the name may be :enc not :encoding
11:09 samcv oh
11:10 samcv yes it's :enc
11:10 samcv and :enc for slurp too i guess?
11:11 jnthn I sure hope so :)
11:12 samcv commented https://github.com/MoarVM/MoarVM/issues/525#issuecomment-278354329
11:12 samcv but still not sure how they are to URI-encode a utf8-c8 string :\
11:12 samcv which is why i asked about how to extract the codepoints from that
11:14 jnthn m: use Test; my $t = IO::Socket::Async.listen("localhost", 5007).tap: -> $conn { }; my $conn = await IO::Socket::Async.connect("localhost", 5007); $conn.close; is $conn.Supply.list, (); $t.close
11:14 camelia rakudo-moar a21d2f: OUTPUT«invalid argument␤  in sub is at /home/camelia/rakudo-m-inst-2/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 139␤  in block <unit> at <tmp> line 1␤␤»
11:15 jnthn wat?
11:15 jnthn m: use Test; my $t = IO::Socket::Async.listen("localhost", 5007).tap: -> $conn { }; my $conn = await IO::Socket::Async.connect("localhost", 5007); $conn.close; is $conn.Supply.list, (); $t.close
11:15 camelia rakudo-moar a21d2f: OUTPUT«invalid argument␤  in sub is at /home/camelia/rakudo-m-inst-2/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 139␤  in block <unit> at <tmp> line 1␤␤»
11:15 jnthn heh
11:15 jnthn I wonder where on earth invalid argument came from
11:15 jnthn Anyway, also sorted out :)
11:21 Geth ¦ MoarVM: 2b0739d85b | (Jonathan Worthington)++ | src/io/asyncsocket.c
11:21 Geth ¦ MoarVM: Sort out semantics of closed async sockets.
11:21 Geth ¦ MoarVM:
11:21 Geth ¦ MoarVM: * Further requests to close will have no effect, so close of an
11:21 Geth ¦ MoarVM:   async socket is idempotent. Useful when people are doing timeout
11:21 Geth ¦ MoarVM:   things that race with normal close. Previously could bring down the
11:21 Geth ¦ MoarVM:   VM or even cause SEGV.
11:21 Geth ¦ MoarVM: * A write on a closed socket will properly signal the error through
11:22 Geth ¦ MoarVM: <…commit message has 7 more lines…>
11:22 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/2b0739d85b
11:23 samcv idempotent is a nice word
11:24 jnthn :)
11:25 jnthn .oO( Idempotence is not a medical condition )
11:25 samcv heh
11:25 samcv you sure?
11:25 samcv i am unconvinced
11:26 jnthn Not my joke, it's a well-known distributed systems paper :P
11:26 samcv ah lol
11:26 samcv is death idempotent?
11:27 jnthn Depends how you define death, I guess... :)
11:28 * jnthn does version bumps
11:28 jnthn Hopefully this fixes the crash in HTTP::Server::I::Forgot::It's::Full::Name
11:30 samcv wonder what the name with the most :: on cpan is
11:30 samcv longer than that
11:32 jnthn samcv: oh btw, you asked about how to get the codepoints; .NFC.list or .ords on a Str will get you the codepoints it's made up of
11:32 samcv i know... but
11:32 samcv if it's a utf8-c8 encoded one
11:32 samcv it gets private use ones
11:33 jnthn Sure, but you can .encode('utf8-c8').decode('utf8')
11:33 samcv but that gives you NFC?
11:33 jnthn Yes
11:33 jnthn Ah, you want to go from bytes straight to a Uni
11:33 samcv i want the original codeponits
11:33 samcv yep
11:33 samcv very much what i want
11:34 jnthn Yeah, we didn't end up implementing that yet
11:34 jnthn It's not particularly hard to do
11:34 samcv that would be nice
11:34 jnthn Just need to figure out the API somewhat
11:34 samcv yea
11:34 jnthn :norm(Uni) was one idea
11:35 jnthn Where :norm(Str) would be NFG
11:35 jnthn And :norm(NFC) and :norm(NFD) work
11:36 samcv yea
11:37 jnthn OK, that's the closed async socket stuff tidied up
11:39 jnthn Lunch now, then should do $other-task this afty I guess :)
11:42 samcv ===SORRY!=== Error while compiling: Variable '$other-task' is not declared
11:42 jnthn Nice try :D
11:45 jnthn lunch &
11:51 pyrimidine joined #moarvm
12:47 pyrimidine joined #moarvm
12:51 geekosaur joined #moarvm
12:53 pyrimidine joined #moarvm
13:10 zakharyas joined #moarvm
13:54 pyrimidine joined #moarvm
14:07 IOninja Thanks (re links to stuff). I'll submit a better version of abs_n soonish
14:56 pyrimidine joined #moarvm
15:11 brrt joined #moarvm
15:37 brrt joined #moarvm
15:49 pyrimidine joined #moarvm
18:30 pyrimidine joined #moarvm
18:59 moritz brrt++ # http://brrt-to-the-future.blogspot.de/2017/02/register-allocator-update.html
19:45 jnthn brrt++ # nice post
19:46 TimToady brrt++ # persistence
19:46 jnthn That also :)
19:55 pyrimidine joined #moarvm
20:21 brrt joined #moarvm
20:53 timotimo brrt: you spelled it "quant" rather than "quaint" i think?
21:01 brrt oh, i think i did
21:01 brrt thanks
21:01 brrt i'll fix it
21:02 brrt fixed :-)
21:03 brrt oh, the jit-data-section bit has been merged
21:03 brrt awesome
21:03 brrt that means i'm going to merge that into even-moar-jit
21:05 brrt did you know there is such a thing as preview merge in magit? (mind=blown)
21:05 brrt :-o
21:14 brrt damnit, get_label_for_obj is not implemented in the new jit....
21:26 pyrimidine joined #moarvm
21:33 geekosaur joined #moarvm
21:42 pyrimidine joined #moarvm
21:44 timotimo i.m not sure i know what that is :)
21:52 pyrimidi_ joined #moarvm
23:13 agentzh joined #moarvm
23:59 pyrimidine joined #moarvm

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