Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2016-02-29

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

All times shown according to UTC.

Time Nick Message
00:13 vendethiel joined #moarvm
02:13 timotimo so much bitrot in the moar-gdb.py
02:13 timotimo (because gdb now runs that with python 3)
02:13 timotimo and there's just a bunch of annoying changes all over the place that make the code a bit worse sometimes
02:19 dalek MoarVM/moar-gdb.py-python3: 6e5f50a | timotimo++ | tools/moar-gdb.py:
02:19 dalek MoarVM/moar-gdb.py-python3: a whole bunch of changes and debug spam for moar-gdb.py
02:19 dalek MoarVM/moar-gdb.py-python3:
02:19 dalek MoarVM/moar-gdb.py-python3: currently can't analyze the gen2 :(
02:19 dalek MoarVM/moar-gdb.py-python3: review: https://github.com/MoarVM/MoarVM/commit/6e5f50a7ab
02:19 timotimo but i'm really glad i finally started on this
02:19 timotimo it's been a bit overdue :)
02:19 timotimo the unbitrotting of that script, i mean
02:19 timotimo and now off towards bed
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:51 vendethiel joined #moarvm
07:04 domidumont joined #moarvm
07:09 domidumont joined #moarvm
07:28 vendethiel joined #moarvm
08:12 zakharyas joined #moarvm
08:14 domidumont joined #moarvm
08:38 sortiz joined #moarvm
08:48 domidumont joined #moarvm
09:37 vendethiel joined #moarvm
10:30 sortiz jnthn, Today I opened my first PR in MoarVM: Add serialize and deserialize to CPointer REPR. Your comments will be appreciated.
10:33 jnthn sortiz: I saw it. I worry just a little whether it'll be a foot gun (as in, people serialize pointers, which then of course point to total junk in most cases). :)
10:33 jnthn So want to go look at the use-case that inspired the patch.
10:34 timotimo the use case was to have a Pointer.new(-1)
10:34 timotimo as a sentinel value
10:35 jnthn o.O
10:35 timotimo that's what i thought, too
10:35 timotimo https://github.com/perl6/DBIish/commit/6f13c35d2e
10:35 jnthn Given MoarVM bytecode files are architecture independent, I do worry a tad what's going to happen with that if you compile on a 32-bit platform and use the bytecode file on a 64-bit one :)
10:36 timotimo yeah. ouch.
10:36 sortiz I totally aware of the traps to the unaware user. SQLite API uses that in a callback to mark a special case.
10:36 jnthn Granted you're *meant* to use the thing as cache, but in reality folks are gonna fat pack.
10:36 jnthn And probably fat-pack bytecode
10:37 jnthn So if we end up with something JAR like some day...you can see the fun :-)
10:38 timotimo well, if we fat-pack bytecode, might as well pack one for 32 and one for 64
10:38 sortiz The actual patch uses all the architecture dependent tricks needed, thought.
10:40 jnthn I just wonder if a simpler fix woulda been to s/constant/my/ :-)
10:40 timotimo probably, yeah
10:40 jnthn Anyway, will look more closely at the patch
10:41 sortiz I am clear that only works for such cases. Right now I avoid the constant, and construct it at runtime, no bit deal.
10:43 sortiz But was nice that the constant works well until forced precomp and the P6 code looks great. :)
10:44 sortiz And in C that kind of markers "pointers" are common.
10:47 sortiz On the other side, if that can't work, rakudo should be aware and fail at compile time.
10:49 jnthn The "cannot serialize" error *is* at the module's compile time, no?
10:50 sortiz Nop, the code compiles and runs. I detect the problem at panda install time.
10:51 timotimo so while you're testing it won't precompile at all?
10:51 jnthn I wonder if it's the silent "pre-comp failed, don't do it" thing
10:51 sortiz Seems to me that at runtime, if precomp fails, nothing bad happen.
10:52 jnthn Yeah...I think we should consider a warning in that case.
10:52 sortiz I detect the problem 'cus I try "panda --force install" and that 'force' forces the precomp
10:52 jnthn "Could not precompile Foo::Bar; please either make the module precompilation-safe or mark it with `no precompilation`."
10:53 timotimo and some way to get at the error message itself
10:53 jnthn *nod*
10:55 sortiz My first workaround was to add 'no precompile;' to the module, but I continue digging until found my solution.
10:56 jnthn Yeah, worth it work DBIish
10:56 jnthn s/work/for/
10:57 sortiz And the "no precompile" should be extended to module users, so I don't like that idea.
10:58 jnthn Well, my expectation is that the warning would be seen by module *developers* when they test
10:58 jnthn And so clue them in that something is wrong, rather than not finding out until panda install.
11:06 sortiz One unespected thing, to me, is that the --force given to panda propagates up to PR.precompile
11:08 jnthn I thought that we always precompiled on install?
11:12 sortiz The case was that I has an old DBIsh preinstalled, and never before try to install the new, panda refuses to reinstall it, so the --force. So I finally see the error.
11:26 vendethiel joined #moarvm
11:29 sortiz On other side, I doubt that can be arbitrary *instantiated* Pointers at compile time (unless the user want to shoot in the foot) and at runtime "Pointer[Foo].new(random).deref" can't be avoided ;-)
11:30 sortiz *whats
11:31 sortiz *wants # Uff, I need to sleep.
11:43 nine_ Actually if precompilation fails, we _should_ already get an error.
11:57 sortiz nine_, It's not what I saw. In fact panda (and travis-ci) were happy with the tests. Was until japhb++ reported issues at install time that my saga began.
12:00 moritz I guess our travis tests should run a "panda install ." in addition to running the tests
12:02 sortiz Agree
12:05 nine_ sortiz: is the error clearly a bug in your code?
12:07 sortiz Not a bug, was an attempt to make the code clear using constants. Imagine signal's SIG_IGN in perl6.
12:11 sortiz nine_, The SQLite C API define a few constants to mark special cases in callbacks, so I try to emulate that in P6, and somewhat works. You can see the builds history of DBIish in travis.
12:19 sortiz nine_, In fact I was fixing a long standing SQLite bug, you can see https://github.com/perl6/DBIish/commit/bb1682c92e80bcd01eff35b426eddfcd3bef232b when the constant was introduced.
12:20 nine_ The build was successful?
12:21 nine_ Ah, because you removed the Pointer(-1) again
12:21 sortiz That and the following.
12:22 sortiz I removed Pointer.new(-1) a few hours ago. See: https://travis-ci.org/perl6/DBIish/builds
12:37 sortiz The original commit was tested by travis's build #92, none has failed since. (The constant was removed for travis's build #97). So the precomp fails silently.
12:44 vendethiel joined #moarvm
12:49 sortiz nine_, If needed I can do specific testing, with and without the offending code and report the results.
14:42 vendethiel joined #moarvm
14:55 kjs_ joined #moarvm
15:23 dalek joined #moarvm
15:52 vendethiel joined #moarvm
17:17 vendethiel joined #moarvm
17:36 TimToady joined #moarvm
17:38 kjs_ joined #moarvm
18:16 kjs_ joined #moarvm
18:19 vendethiel joined #moarvm
18:20 kjs_ joined #moarvm
18:55 domidumont joined #moarvm
21:01 ggoebel16 joined #moarvm
22:04 dalek joined #moarvm
22:45 dalek MoarVM: 7820317 | (Salvador Ortiz)++ | src/6model/reprs/CPointer.c:
22:45 dalek MoarVM: Add serialize and deserialize to CPointer REPR
22:45 dalek MoarVM:
22:45 dalek MoarVM: In C land sn common practice to use constant fixed pointers for special
22:45 dalek MoarVM: cases, for example signal's SIG_IGN.
22:45 dalek MoarVM: A naive "constant SQLITE_TRANSIENT = Pointer.new(-1);" in
22:45 dalek MoarVM: DBDish::SQLite::Native trigger the error at Panda's install time.
22:46 dalek MoarVM: This add the missing bits, pass all nqp, rakudo spectest and fix the
22:46 dalek MoarVM: issue.
22:46 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7820317050
22:46 dalek MoarVM: b41c30d | jnthn++ | src/6model/reprs/CPointer.c:
22:46 dalek MoarVM: Merge pull request #341 from salortiz/cpointer-serialize
22:56 timotimo aarrrggghhh, python's scoping rules caused my big WTF from yesterday
22:56 jnthn .oO( Its scoping apparently doesn't rule... )
23:02 timotimo i'm getting somewhere with moar-gdb.py again
23:02 jnthn timotimo++
23:02 timotimo just gotta find out why it's trying to dereference some obviously bogus pointers
23:03 flussence .oO( "what are the scoping rules of an unladen python?" "python2 or python3?" "I don't know tha-AAAGH!" )
23:03 timotimo and ... ugh, unicode in python3
23:03 timotimo when will the pain end? :(
23:04 jnthn I thought Python 3 was the one with gooderer Unicode?
23:04 timotimo ah
23:04 timotimo perhaps
23:04 timotimo i print((something something).encode('utf-8'))
23:04 timotimo and that just comes out as
23:04 timotimo b'dutraindutraien \x23\x49\x043 etc etc'
23:04 geekosaur it's the one where it learned unicode, to everyone's regret
23:05 jnthn It's something in bad French about trains?
23:05 timotimo yeah, i'm no longer supposed to encode it before printing
23:06 timotimo strings:
23:06 timotimo [================================================== 9
23:06 timotimo assoc                 [======================================             7
23:06 timotimo QRegex                [=================================                  6
23:06 timotimo NFA                   [===========================                        5
23:06 timotimo 8D8EC6335AF518DA45550C209737037FBF219C57-1456680407.77609 [===========================                        5
23:06 timotimo all those common strings!
23:08 jnthn common strings...all those common strings...if you liked it shoulda put intern on it...
23:10 diakopter lolz
23:10 timotimo oh hey diakopter :)
23:11 diakopter oh hey timotimotimo
23:13 diakopter jnthn: I got vs2015 update 1 applied, woo.
23:13 diakopter time to torture it with rakmoar
23:15 timotimo those strings are only a sample, btw
23:15 * timotimo turns up the extra samples
23:17 timotimo say, jnthn, do you remember during startup all those little 24 byte big arrays are being allocated to store REPRData (iirc) on p6opaques (or something); is that something the fixed size allocator could help us with?
23:26 kjs_ joined #moarvm
23:30 kjs_ joined #moarvm
23:44 kjs_ joined #moarvm
23:54 jnthn diakopter: Nice...wonder if it'll lack the vs2015 JIT issue...
23:54 jnthn timotimo: Yeah, we could FSA those
23:59 jnthn 'night, #moarvm

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