Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-03-16

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

All times shown according to UTC.

Time Nick Message
00:04 Geth ¦ MoarVM/master: 7 commits pushed by (Timo Paulssen)++
00:04 Geth ¦ MoarVM/master: fdda43e306 | useful hint about getting py tracebacks in gdb
00:04 Geth ¦ MoarVM/master: a7b5f13794 | throw out buggy rope stringifier
00:04 Geth ¦ MoarVM/master: aae9bf4364 | use debugname in object pretty printer
00:04 Geth ¦ MoarVM/master: c5f0840233 | allow keys in histograms
00:04 Geth ¦ MoarVM/master: 32f53af803 | use debugnames in histograms (or repr)
00:04 Geth ¦ MoarVM/master: 037c57da5e | allow a KeyboardInterrupt to stop moar-heap command
00:04 Geth ¦ MoarVM/master: 6ee576ff59 | more tracebacks if analyzing objects is buggy
00:04 Geth ¦ MoarVM/master: review: https://github.com/MoarVM/MoarVM/compare/6954d2033f...6ee576ff59
00:33 timotimo next up: stuff to explore frames with?
00:34 timotimo i don't think i want to write bytecode-dumping in python
00:34 timotimo good thing we already have that for --dump
00:36 timotimo let's see if i can hook that up somehow
00:43 MasterDuke timotimo: is this script loaded automatically if you use perl6-gdb?
00:44 timotimo yes, but multiple caveats
00:44 timotimo 1) you have to copy or link it into the same folder as the "moar" binary
00:44 timotimo 2) you have to whitelist it
00:44 timotimo i think that's all
00:44 MasterDuke how do you whitelist it?
00:45 timotimo gdb tells you how to do it
00:45 timotimo add-auto-load-safe-path /home/timo/perl6/moarvm/tools/moar-gdb.py
00:45 timotimo add-auto-load-safe-path /home/timo/perl6/install/bin/moar-gdb.py
00:45 timotimo this goes into ~/.gdbinit
00:46 timotimo in theory we can put the python script into the binary with a piece of linker script or something
00:50 timotimo i don't want to bother factoring out the stuff in bytecodedump so i can call it for individual frames
00:50 timotimo maybe later
00:50 timotimo what else ...
00:52 timotimo cat on lap
00:52 timotimo cannot continue working
01:02 timotimo okay, cat released me
01:03 timotimo i guess moar-gdb could teach gdb how to find fields in a P6opaque
01:03 timotimo and others
01:03 timotimo like CStruct and CPPStruct
01:05 MasterDuke bigints?
01:06 timotimo good point
01:11 Geth ¦ MoarVM: 1870340d84 | (Timo Paulssen)++ | tools/moar-gdb.py
01:11 Geth ¦ MoarVM: todo entries for pretty printing some of our REPRs
01:11 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/1870340d84
01:42 timotimo i don't see a way to provide a display hint of "no hint"
01:44 timotimo though mabe i can invent a value for "no hint" and just shrug it off
01:50 MasterDuke what are display hints?
01:50 timotimo https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing-API.html
02:21 timotimo for some reason recompiling my moar made rakudo instacrash when starting
02:21 timotimo i just turned debugging down :\
02:33 timotimo i've made a bit of progress with an mvmobject pretty printer
02:34 MasterDuke nice. i've made a bit of progress fixing int-uint tests, getting the fudging correct for both moar and jvm was annoying
02:35 timotimo pointer to None (IterationBuffer) of repr VMArray<error reading variable: Cannot access memory at address 0x18>
02:35 timotimo doesn't that sound like a whole lot of fun?
02:36 MasterDuke address 0x18? not much lower to go
02:36 timotimo clearly an offset from a null pointer :\
02:39 timotimo i'll go to bed now, continue this tomorrow
02:39 MasterDuke later...
02:40 timotimo laters!
02:40 timotimo goo dluck with the tests :)
02:46 MasterDuke thanks, think they're done, just created PR so some more eyes look them over
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
04:13 brrt joined #moarvm
04:16 vendethiel joined #moarvm
04:59 vendethiel joined #moarvm
06:19 stmuk_ joined #moarvm
06:52 domidumont joined #moarvm
07:38 brrt joined #moarvm
07:42 lizmat joined #moarvm
07:52 brrt good * #moarvm
07:52 brrt so.
07:52 brrt I was wrong about a rather central assumption, haha
07:53 brrt but
07:53 brrt the good bit is
07:53 brrt it's really simple to change
07:58 brrt but…. i recently talked about having ARGLIST and CALL as sepeate or joined tiles
07:58 brrt so now it turns out they've already been joined
07:58 brrt question is, do i want to keep it that way
08:24 brrt hmmm
08:24 brrt no
08:24 brrt i do want to distinguish between refs to ARGLIST and refs to CALL
08:30 zakharyas joined #moarvm
08:44 brrt joined #moarvm
09:50 jnthn moarning o/
09:52 dogbert17_ o/
09:52 * dogbert17_ debugging an ENOCOFFEE problem
09:53 brrt moarning jnthn, dogbert17_
09:53 dogbert17_ o/ brrt
10:02 brrt joined #moarvm
10:05 dogbert17_ so what's on the agenda today, SEGV's, memory leaks or CONC?
10:06 brrt CALL/ARGLIST worries
10:09 jnthn Having got spectest6 now running reliably, I'm breaking off the SEGV/leak fixing for a bit and giving some attention, at long last, to the plight of .hyper and .race
10:11 dogbert17_ are they totally broken or only partially so?
10:12 jnthn Pretty broken
10:13 jnthn Essentially, my prototype to figure out API made it into Rakudo proper :)
10:13 nwc10 when is the Rakudo release?
10:17 jnthn Saturday
10:19 nwc10 excellent
10:19 nwc10 and then Dogfood? :-)
10:21 jnthn Make spectest6 the default? Can certainly look in to that
10:24 nwc10 I think that that would be cool, but after the release
10:24 jnthn Yup
10:25 jnthn I should try it on Windows before that too, to be sure it's OK there
10:25 jnthn In theory it'll be faster than spectest5 there :)
10:26 nine timotimo: in Python you have to str(foo) all the time...
10:26 yoleaux2 14 Mar 2017 14:41Z <IOninja> nine: does 6.c-errata need any updates for require? t/spec/S11-modules/require.t is failing
10:26 yoleaux2 15 Mar 2017 12:00Z <brrt> nine: if he had any plans on going to polyconf
10:26 yoleaux2 15 Mar 2017 12:32Z <IOninja> nine: all the comments in this file say "return blah *type object* if none..." but all the codes return Nil. Is the code wrong or are the comments wrong? https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Handle.pm
10:26 yoleaux2 15 Mar 2017 14:10Z <IOninja> nine: never mind. ugexe++ found the answer in https://github.com/rakudo/rakudo/commit/​887c937d1d673ae5a4 and I updated the comments
10:26 IOninja hah
10:26 nine woah
10:26 IOninja nevermind mine, it's no longer relevant
10:26 nwc10 jnthn: yes, as long as you have >1 core :-)
10:26 jnthn 4 real, 8 virtual
10:26 IOninja FWIW, spectest6 was slower on my 24-core VM. AND it still has the issue that its test count is off from stectest5, so I'd be cautious with making it the default just yet.
10:27 * nine has at a 17 hour workday yesterday and is not entriely recovered yet
10:27 jnthn o.O
10:27 jnthn Ouch
10:27 jnthn IOninja: Slower on Linux isn't entirely surprising
10:27 IOninja nine: oh wait, one of mine is still relevant. There are 6.c-errata failures in t/spec/S11-modules/require.t
10:28 IOninja jnthn: but supposed to be faster on Windows?
10:28 nine IOninja: yeah, I need to look at those
10:28 jnthn IOninja: It's liable to be faster on Windows because spectest5 sets off tests in batches of TEST_JOBS, waits for those to complete, and then sets off the next batch, so if there's a slow test anywhere then it blocks progress on everything
10:29 IOninja Ah
10:46 geekosaur joined #moarvm
10:58 samcv jnthn, but it only does that on windows? it's different on linux?
10:58 timotimo yeah, it's different
10:59 timotimo also good morn'
10:59 timotimo i think i want to build a "mvmbreak" command for moar-gdb.py; you'd "mvmbreak push_o" and it'd create a breakpoint inside interp.c at the right place
10:59 samcv that seems silly. there must be a reason i guess
11:02 timotimo hm. google also accepts "microsoft" when you search for "windows"
11:04 jnthn samcv: I think it's because it's hard, without having real async support, to do better on Windows
11:20 brrt joined #moarvm
11:32 geekosaur joined #moarvm
11:35 geekosaur joined #moarvm
12:05 nwc10 reason - MS failed to implement socketpair() the way Berkley did
12:06 nwc10 or more, close
12:06 nwc10 er, implicit close
12:06 nwc10 implicit close at process exit (on any other platform I think) will cause pending socket data not yet sent to be sent
12:07 nwc10 Win32 drops it on the floor
12:07 nwc10 this behaviour is not orthogonal.
12:07 nwc10 this behaviour is not the way the de-facto spec (BSD) did it
12:07 nwc10 this behaviour is very annoying
12:08 timotimo yoloooooo~
12:08 nwc10 oh, and on Win32 perl *can* use select on sockets (and hence the product of socketpair)
12:08 nwc10 but not on the IPC mechanism (pipes, I think) that doesn't have this "drop it on the floor" feature.
12:09 geekosaur welcome to the utter hack that is winsock
12:09 geekosaur BSD sockets are kernel space
12:09 nwc10 aha, I can see where this is going
12:09 nwc10 and I didn't this
12:09 nwc10 but it explains a lot
12:09 geekosaur winsock is user space, the windows process termination functions do not in general permit a process to block termination or perform cleanup
12:09 nwc10 didn't $verb this where $verb was roughly "Realise"
12:10 nwc10 aha. yes
12:10 nwc10 because on *nix (and I think VMS, MVS, and therefore onwards RISC OS, AmigaOS ...)
12:10 nwc10 the sockets are in the kernel
12:10 geekosaur yep
12:10 nwc10 so the user process exits
12:10 geekosaur Windows had to be different :/
12:10 nwc10 and the kernel "deals" with it
12:10 nwc10 (sure, your data might never actually arrive - you quit, your fault you don't get to see any error message)
12:11 geekosaur heck, until NT4.0 killing a process could cause it to permanently leak memory
12:11 geekosaur (that's right, the kernel did not automatically clean up process memory, the process had to clean up itself --- and this again failed if forcibly terminated...)
12:12 ilmari wut
12:13 timotimo huh, that's ... interesting
12:14 timotimo we have to make sure moar on pre-nt4 will --full-cleanup by default!
12:14 geekosaur that was understandable in old-style windows. NT3.1 and 3.5? waaaat?
12:15 geekosaur (not that anyone cares about those any more. I dearly hope at least. I have heard there's still some win2000 deployed in various places, but that was at least mostly sane....)
12:16 ilmari perl5 supports win2k and later
12:16 timotimo i was quite amused recently when i read about the "three_finger_flag"
12:17 timotimo "If you are running under DOS this is the three finger salute, ctrl+alt+del. Most multitasking OS's will trap this combination before it reaches the Allegro handler, in which case you can use the alternative ctrl+alt+end."
12:29 dogbert17_ also note that harness6 is broken (leaks sockets) if you run it with TEST_JOBS=1 (the default)
12:31 dogbert17_ m: say [+] (1..100).race # RT #130576
12:31 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130576
12:31 camelia rakudo-moar 65b004: OUTPUT: «0␤»
12:32 dogbert17_ m: say [+] (1..100)
12:32 camelia rakudo-moar 65b004: OUTPUT: «5050␤»
12:32 geekosaur mm, actually i think the NT situation was a bit more complex. like you could register a cleanup handler, but if TerminateProcess got invoked while in the cleanup handler, cleanup aborted and that was what leaked
12:32 geekosaur and some ways of terminating a process didn't let the cleanup handler run before NT4
12:34 nwc10 and the poor machine would eventually die from memory starvationg? ...
12:34 nwc10 gah, bad fingers
12:34 nwc10 anyway,
12:34 * nwc10 reboots ilmari to prevent starvation
12:34 ilmari nwc10: typo of the day: perldoc -> perldog. clearly a sign I should go to brewdog for lunch
12:34 nwc10 :-)
12:35 ilmari they unfortunately don't have my favourite burger, the melted ego, any more :(
12:35 ilmari but they have a new one I want to try
15:58 MasterDuke_ joined #moarvm
16:03 MasterDuke_ jnthn: not to distract from hyper/race, but have you had a chance to look at https://github.com/MoarVM/MoarVM/pull/551 ?
16:03 yoleaux2 3 Mar 2017 15:29Z <brrt> MasterDuke_: it's a one day job
16:03 * [Coke] misread that as a "day one job"
16:04 MasterDuke_ heh. and i need to go back to the logs to see what the question was
16:05 timotimo the good thing about GC is that the more objects are already dead when we GC, the faster it is
16:07 MasterDuke_ ah right, about getting his JIT bisect tool to work with the current JIT
16:07 timotimo oh?
16:08 MasterDuke_ i asked it was a 5min or 5day job
16:08 MasterDuke_ this was when we were still trying to figure out that div_i bug
16:09 timotimo it really depends on what we want to achieve with it
16:09 jnthn MasterDuke_: Yeah, it looked better. I need to look more closely again though. Also I'm a bit worried about merging it before the weekend release, just in case it has any unintended consequences.
16:09 timotimo if we're fine with per-frame granularity, it'd be possible in like 30 minutes
16:09 timotimo if we want per-instruction granularity ... good luck!
16:12 MasterDuke_ jnthn: cool, just wanted to make sure it didn't slip through the cracks
16:14 MasterDuke_ jnthn, timotimo: while on the subject of reviewing things. i think https://github.com/perl6/roast/pull/254 makes the (int|uint)(8|16|32|64) tests better (and i think i have a fix for one or two of the todos in the works), but a second opinion would be appreciated
16:37 timotimo jnthn: do you think it'd be cleverer to write some code for "we don't use a normalizer at all" or to write "a normalizer that does nothing"?
16:42 timotimo i'm in a bit over my head, it feels like
16:43 jnthn Probably the "normalizer that does nothing" will require a lot less special cases :)
16:45 timotimo thought so, too
16:45 timotimo is decoderconfigure the right place to put the choice of normalization form?
16:47 jnthn Uh...hmm
16:47 jnthn Where are you doing to use it?
16:47 jnthn Thing is, at the moment Uni is a VMArray
16:48 timotimo i wasn't finding ops i could use to go from blob to vmarray
16:49 timotimo decodetocodes and encodefromcodes are marked NYI
16:49 jnthn ah, right
16:49 timotimo maybe that's where i should be looking instead for the null normalization bit?
16:49 jnthn yeah, those want to be I'd :)
16:49 timotimo "IRN" :)
16:49 jnthn Yeah, though the decoders still want a normalizer iirc
16:49 timotimo OK
16:49 timotimo we already have ops to go from a decoder ot a vmarray?
16:50 timotimo for decodestreams i mean
16:50 timotimo "decodertakebytes"?
16:51 jnthn Yeah, but that's just going to give you back bytes
16:52 timotimo huh? bytes from the input buffer?
16:52 jnthn I think the big question we really need to figure out is whether MVMString wants to be able to support codepoint level things
16:52 timotimo because after that there are no "bytes" any more :P
16:52 jnthn Yes, it's there to support mixed-mode text/byte I/O when we re-work IO::Handle to use the Decoder REPR
16:52 timotimo oh
16:53 timotimo allowing MVMString to do stuff that's not it NFG sounds like a "too many things on the same peg" situation
16:53 timotimo i.e. every string op would start off with "okay do we have to emulate grapheme semantics ourselves now?"
16:53 timotimo except if they already work with a grapheme iterator
16:54 timotimo hm. we probably already have a grapheme iterator path for almost all ops because of ropes
16:54 jnthn Yeah, we need to try and make sure we can lift out those kinds of checks
16:54 jnthn At specialization time
16:54 jnthn (the level ones)
16:55 jnthn I've been pondering how we're ever going to get the regex engine to accept Uni for example
16:55 jnthn And...if it's a VMArray that's gonna be a small nightmare
16:58 timotimo oh, yeah, that's true
16:58 timotimo oh, if the string itself has to be normalized from the start, we won't be able to match subsections of a regex in a different normalization mode?
16:59 timotimo or do we re-normalize the whole haystack and move to the right offset with an iterator?
17:00 jnthn All of these questions are why we kicked the Uni can down the road some ;-)
17:00 timotimo i can imagine :|
17:00 jnthn I think various operations are going to have to be OK with needle and haystack being NFG when the needle is Uni or NFC or whatever though
17:01 jnthn There's stuff in S05 for saying what level you want to work at
17:01 timotimo mhm
17:02 jnthn so (example) /:nfd \c[COMBINING ACUTE]/
17:02 timotimo okay so a possible way forward from here is: i implement a do-nothing-normalizer, it'll turn the Decoder into a mode where instead of Str it'll create Uni objects
17:02 jnthn We can try a path like that for now, yeah
17:02 timotimo and once we figure out if MVMString gets a non-nfg mode-of-operation, we'll be able to implement :norm(NF-anything-but-G) to create Str, too
17:02 jnthn I suspect we'll need to experiment a bit before we hit upon the right design
17:03 jnthn Well, it won't create Str
17:03 jnthn It's rather than Uni will become something with repr VMString or some such
17:03 jnthn Or a wrapper around one like Str is
17:03 timotimo oh
17:04 jnthn But I think I'd like to then encode the level at REPR-data level
17:04 jnthn So we can spesh on it
17:04 timotimo right
17:04 jnthn Well, normalization more than level
17:04 jnthn So yeah, if we want to really Do This Right then that might be a logical first step
17:04 timotimo what would you consider a sane enum value for NULL normalization?
17:05 timotimo 0 is already NFD
17:05 timotimo (because of the bitmask-backed design)
17:06 jnthn Hm, we can always shift them right one or something
17:08 timotimo so 1 would be null normalization and it'd mask all other bits in comparisons and all others would have a 0 LSB?
17:09 jnthn #define MVM_NORMALIZE_COMPAT_DECOMP(form) (form & 1)
17:09 jnthn #define MVM_NORMALIZE_COMPOSE(form)       (form & 2)
17:09 jnthn #define MVM_NORMALIZE_GRAPHEME(form)      (form & 4)
17:09 jnthn So those would become 2, 4, 8
17:09 jnthn And then the LSB can be a normalize bit
17:09 jnthn So NFG would be 8 + 4 + 1
17:10 timotimo ah, so more like only normalize if LSB is set
17:10 jnthn Yeah
17:13 jnthn Righty, I should go rest a bit then make kebabs :)
17:14 timotimo mhhh kebabs
17:15 domidumont joined #moarvm
17:20 domidumont joined #moarvm
17:27 zakharyas joined #moarvm
17:30 domidumont joined #moarvm
17:31 lizmat joined #moarvm
18:00 timotimo so, MVM_string_decodestream_create isn't public API, right? because it's not MVM_PUBLIC? so it'll be fine to put a normalization number parameter in
18:03 timotimo how come we don't have an "outside-world normalization form code" for NFG?
18:03 timotimo NFC, NFD, NFKC, and NFKD in that order. i'll put NULL at the front (where it can have 0)
18:05 timotimo i wonder what the NYI "encodenorm" op will do
19:03 agentzh joined #moarvm
21:40 ggoebel joined #moarvm
21:49 samcv oh so we're coming up with more normalization things. fun!
21:56 MasterDuke joined #moarvm
22:13 jnthn samcv: Well, mostly figuring out how we can properly support codepoint-level strings
22:13 jnthn (Uni and the various subclasses)
22:13 jnthn For those with use-cases taht need 'em
22:18 TimToady joined #moarvm
22:57 Geth ¦ MoarVM/null-normalization: 922d709f3c | (Timo Paulssen)++ | 11 files
22:57 Geth ¦ MoarVM/null-normalization: WIP on adding a normalization that does nothing
22:57 Geth ¦ MoarVM/null-normalization: review: https://github.com/MoarVM/MoarVM/commit/922d709f3c
22:57 timotimo samcv: are you interested in picking up my WIP? i have no previous experience inside the whole encoding/decoding business
23:00 MasterDuke heh. like the red queen, so much work to do nothing
23:00 timotimo in what card game is the red queen supposed to do nothing? :P
23:01 MasterDuke off with your head!
23:54 Geth joined #moarvm

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