Parrot 4.7.0 "Hispaniolan" | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 4 September 2012.
00:19 arnsholt joined 00:29 kid51 joined
rurban Found some optimizability in the print_n and print_i ops and say variants. No need to go through STRING and various va_args 01:30
01:44 JimmyZ joined
JimmyZ hi rurban 01:45
rurban hi
JimmyZ rurban: is there any vmkit docs ? 01:48
rurban no idea yet. svn is empty 01:49
JimmyZ :( 01:50
I think rewrite parrot with vmkit is hard too, here are no developers 01:52
01:53 JimmyZ joined
rurban I'll try it alone 01:57
01:57 mvorl joined, mvorl left
rurban Does not look too hard. 01:57
JimmyZ can't find any document about vmkit 02:03
rurban Added github.com/parrot/parrot/issues/828 02:06
JimmyZ benabik: rakudo seems that it didn't use parrot's namespace and object model 02:07
benabik vmkit.llvm.org/publications/vmkit.html 02:14
JimmyZ: I thought it still used our namespaces.
JimmyZ benabik: I only see '.namespace []' in NQP.pir 02:16
rurban vmkit: In some paper they even mentioned explicitly perl as potential target
benabik Oh, yeah, it uses their own stashes.
:-/
JimmyZ so the pain is ops and pcc 02:17
benabik That's Rakudo's pain. 02:18
I think that the fact that they've replaced a lot indicates that there are more pain points than that.
MikeFair howdy all! :) 02:19
JimmyZ benabik: porting parrot to 6model will reduce more pain, me thinks
benabik JimmyZ: Yes, that would be nice. 02:20
JimmyZ loritor's goal is to reduce ops and pcc pain, me thinks 02:21
MikeFair So is VMKit a MRE on top of LLVM? 02:22
benabik LLVM + GC + threads 02:23
+ nice interface to JIT
MikeFair nods.
So is the question on the table about making a PASM/PIR -> VMKit port? 02:24
benabik It wasn't a question so much as random ponderings, on my part.
I'm not impressed by their GC.
GC written in Java compiled to LLVM by their custom JVM... 02:25
MikeFair Open Source I assume?
benabik yar
MikeFair The fact they have both a CLR and JVM means something about their design I think.. doesn't it? 02:26
I imagine things like GC improve over time 02:27
Given effort
Initial design decisions become much harder to rewrite
benabik That GC design is a design decision, kinda.
MikeFair (like to add a GC concept to the product later)
benabik: Ahh
benabik: not abstracted to allow for other models?
benabik MikeFair: Their chosen abstraction layer is in Java. 02:28
It's the only part of the system in Java, which makes it kinda odd.
rurban I came up with the idea on the Moose hackathon in Norway discussing parrot with pmichaud 02:29
MikeFair That kind of begs another question I've been having about a Parrot->Java backend -- how different is a basic Java object from a PBC
I mean they seem like much the same thing to me from my perspective 02:30
rurban jonathan should know that.
MikeFair Err PMC!!!
not PBC
benabik: So they have a JVM 'on the side' for object management for their VM? 02:31
benabik MikeFair: They compile Java to Java Bytecode, then bytecode to LLVM. 02:32
MikeFair benabik: That's interesting, kind of makes my musing about java byte code ->parrot byte code and vice versa seem not so unreasonable 02:33
rurban j3 is a jvm. the execute their gc in their environment. 02:34
benabik I think they basically use j3 to JIT the GC.
MikeFair yeah that makes more sense, I always thought of the GC engine as a "VM" thing, not something that would end up in my complied byte code
I mean if I dissambled the byte code for my program I might find references to "execute the GC" if I explicitly asked for it in my program, but I don't think I'll see any GC reclamation code in there 02:36
which means the 'algorithm' for actually doing GC comes from the execution host, not my compiled program (or in this case, their compiled java)
rurban MikeFair: A PMC can be dynamically added, a java class not 02:37
MikeFair rurban: OOOOHHHHHHHHH that's an important distinction....
rurban So it bypasses most compiler optimizations on classes and methods
But it can still be done, recompile method resolution and isa when loaded 02:38
MikeFair rurban: That doesn't make much sense to me though, I know that there are java programs that support plugin systems by adding JARs to its environment
rurban perl5 classes have the same problem.
jar yes, but not extending classes with roles e.g.
we can extend our type system 02:39
MikeFair ahhh so at runtime the types can be inherited from
and other things
rurban yep. our main advantage over jvm and .NET
MikeFair makes a mental note to reread up on what the heck roles are again. "they sound like an important concept not in many other systems" 02:40
rurban: That makes total sense
rurban I also have no good idea on roles.
MikeFair rurban: But if you made a Java class called "PMC" what wouldthe VM care?
rurban Though I listened to sartak's talk twice
registration with multi 02:41
MikeFair I mean aren't we writing our own type inheritance system?
and our own dispatch system
I guess I'm thinking it'd end up being the same thing that those LLVM guys just did
JVM would just handle GC 02:42
Sorry side tracked on to Parrot on Java
:)
I'm really curious what folks thought are on this. I have noticed that the Perl6 guys seem to have rewritten everything in a language they understand -- which I think of as 6model 02:44
benabik / rurban: Can you guys explain to me where 6model fits in the hierarchy of technology around here - I mean why is it needed and what's the disctintion between that and whatever Parrot does now? 02:45
rurban g d 02:46
whiteknight seems to know. me not
6model is like the perl6 mop, their object model and type system
MikeFair I think I found an overview 02:50
So I guess I'm left with the question is there seomthing different or "better" about Parrot's existing model? 02:51
I mean I can't imagine that there is anything in Perl6's object model that Parrot wouldn't want to be able to do
And if it's not a drastically different paradigm, it seems like the Parrot Object Model could rebase on 6model allowing it to take adavantage of the multiple backends that the Perl6 guys are targeting which would be "good" I think, right? 02:53
rurban I have no idea, sorry
MikeFair yeah, kind of hard to get a read on something from the outside looking in :)
rurban But we seem to take 6model, whiteknight will be working on it as soon as threads land.
MikeFair Yeah ok, that seems consistent with other things I've been seeing, like the new NQP being 6model based 02:54
It also seems kind of cool that it's going back and forth Parrot Object model guys bootstrap, discover limitations, Perl6 guys augment and create a new larger paradigm with seemingly more desirable features, Parrot guys wilthen consume and extend it again (perhaps?) and the cycle continues :) 02:57
rurban That's a normal bootstrapping cycle 02:58
It's just that the project started 2001, not 2010
MikeFair agreed
rurban The problem is there is not much progress in parrot, while there is a lot in perl6. 02:59
MikeFair Releted to the Compiler Toolkit, any idaes why I can't seem to match \\n character?
\\n nor $$ seem to ever find anything 03:00
sorear nqp: say("x" ~~ /\\n/) 03:01
p6eval nqp: OUTPUT«␤»
sorear nqp: say("\\n" ~~ /\\n/)
p6eval nqp: OUTPUT«␤␤»
rurban I'm not good in parsing, sorry
sorear seems \\n does match
MikeFair AHA!!! 03:04
MikeFair whacks head.
\\s+ matches \\n
So <.ws> was sucking it up
At least according to what I'm seeing in S05
JimmyZ I'm trying make cover parrot by run rakudo, to see how much parrot codes rakudo uses 03:06
MikeFair there's new \\h and \\v sequences where \\v equals "Vertical Whitespace" and \\h = "Horizontal Whitespace" (\\h == (\\s expect for the \\v stuff))
JimmyZ: What is make cover supposed to do? 03:07
JimmyZ MikeFair: see `make help` in parrot dir
rurban rakudo itself does not use parrot, nqp does. see the pir: calls
MikeFair soundsgood
JimmyZ I think it's good idea to rip out parrot code that rakudo didn't use 03:08
sorear parrot has goals other than "run rakudo" 03:14
JimmyZ I hate the goal 03:16
currently
rurban floatval != double are totally broken, almost fixed everything in rurban/va_arg_print_n. Are there no smokers for long double and such? 03:29
MikeFair ok i have a strange whitespace question, it seems that I have two kinds of ws needs, sometimes I need to include \\n and othertimes I don't want to include \\n 03:46
At least I'd like to avoid needing to hand code all the whitespace potentials 03:47
Could I use an embedded contextual to make this work?
Something like { ${NEWLINEOFF}=1 } <return> 03:48
and then in <ws> test for that?
dalek rrot/rurban/va_arg_print_n: 85d9301 | rurban++ | / (3 files):
[GH# 828] Avoid passsing non-double through va_list

va_list does not support float, long double nor __float128 on most systems. Promote FLOATVAL to double to avoid that.
04:21
rrot/rurban/va_arg_print_n: 6f0e533 | rurban++ | / (7 files):
[GH #828] Fix most tests for non-double floatval

Add more needed precisions to numeric tests, tested with intel long double.
Change a magic number in t/library/test_more.t 888.81<=>888.82 1e-2
   was not stable enough for intel long double
Use t/pmc/testlib/annotations.pbc for binary comparisons of packfiles since
   stringifying non-double numbers is not stable enough.
Fix src/dynoplibs/sys.ops doublesize to numvalsize. This only works for double.
rrot/rurban/va_arg_print_n: 2958219 | rurban++ | src/ops/ (2 files):
[GH #828] Optimize print_n/i and say_n/i

print_n/nc/i/ic and the say variants go through a full Parrot_io_printf with 3 va_start/va_end scenarios and a custom format string parser, and through char* -> STRING->char* conversion until the fixed FLOATVAL_FMT or INTVAL_FMT printf is done. Just to print a single int or number.
This also lost precision for non-double floatval's - if cast to (double). Now avoided.
rurban all tests pass now with long double. I'll tests with other floatval types also. 04:22
04:25 JimmyZ joined
JimmyZ rurban++ 04:25
rurban Nope, smokes are black. 04:28
05:00 mdupont joined
dalek rrot/threads: d351afe | rurban++ | src/pmc/task.pmc:
Fix a mailbox threads race, document another threads race

The mailbox threads race was improved by suggestion of nine++. TASK_recv_block_CLEAR(partner) writes concurrent with a read in !TASK_in_preempt_TEST(SELF). To repro: m parrot && ~/bin/tsan-r4356-amd64-linux-self-contained.sh ./parrot t/pmc/task.t
05:13
rurban get_num_cpus() tomorrow. I have no idea how to fix the documented race in TASK_recv_block_CLEAR(partner) 05:16
05:21 benabik joined 06:50 zby_home joined 07:26 tadzik joined 08:20 Psyche^ joined 09:39 tadzik joined 09:53 PacoAir joined 09:58 PacoAir joined
dalek kudo/nom: 286df2a | moritz++ | t/spectest.data:
four more passing test files (is this Christmas? :-)
10:20
10:46 whiteknight joined
whiteknight good morning, #parrot 10:47
tadzik good morning whiteknight 10:48
11:15 JimmyZ joined
whiteknight hello tadzik 11:30
blah. Every time I look at the source of Sub PMC I'm reminded that it needs to be radically cleaned 11:31
11:38 LizM joined 11:39 woolfy_ joined
dalek p: 1fbc5ed | jnthn++ | src/how/NQPClassHOW.pm:
Cannot use say in the meta-objects, as they are compiled without the setting.
12:02
kudo/nom: 81edc97 | jnthn++ | src/core/control.pm:
The spawnw op can in some cases throw an exception; be sure to handle it. Unbusts system.t on Windows.
12:08
12:08 Ultali joined
whiteknight msg nine it looks like Proxy is read-only and disallows writes. I thought there was a mechanism to schedule writes as tasks on the owner thread? 12:08
aloha OK. I'll deliver the message.
Ultali neat, I was just going to ask if anyone is interested/looking at threading 12:09
whiteknight Ultali: if all goes will with my fixing and testing, we could merge a new threading system within the next few days 12:10
dalek rrot/threads: a54a581 | rurban++ | / (70 files):
Merge remote-tracking branch 'origin/master' into threads
12:15
rrot/threads: cac1aa6 | Whiteknight++ | / (7 files):
Merge branch 'threads' of github.com:parrot/parrot into threads
rrot/threads: 51d178a | Whiteknight++ | / (3 files):
If we're using a Proxied CallContext as the outer ctx of a closure scheduled as a Task on a new thread, we need to de-proxy it. Create a dummy empty CallContext to serve in place of the Proxy. This fixes a segfault/assert_fail pointed out by tadzik++, although the behavior of his example is still not 100% as expected
whiteknight tadzik: Here's the first part of a fix for your lexicals example. Can you give it a spin and see if it's any better for you?
tadzik: the lexical variable appears to be read-only right now. I'm working on that
Ultali whiteknight: that's amazing news 12:17
moritz whiteknight++ 12:18
Ultali I just read your blog article from April last year
tadzik whiteknight: not really, I have to leave home quite soon
I think all my testcases are gisted, possibly someone else can try 12:19
whiteknight tadzik: okay, no rush. I've got a few other things I want to play with
Ultali: you're interested in threading?
Ultali I was just interested to see how parrot was going to manage threading in a way that might work for any scripting language that has its own threading model 12:20
whiteknight Ultali: So far we're just trying to provide a system with some low-level features, but we really need some use-cases to help shape it in the future 12:22
Ultali yeah any threading is good threading :)
whiteknight Okay, I think I can enable cross-thread proxied writes, but I don't want to do that until I find out from nine why they're disabled in the first place 12:25
12:28 mdupont joined
dalek p: ff65502 | jnthn++ | src/6model/reprs/P6opaque.c:
Improve wording of an error.
12:33
whiteknight Okay, I sent nine an email asking about a few things. I've got some things to do now and I'll try to work out the last few details soon. 12:34
unhandled exception behavior and exit behavior definitely need to change in a threaded world 12:50
One task having an unhandled exception shouldn't bring down the whole process, methinks
although exactly what it should do is not apparent 12:51
I feel like we should store the terminating exception in the Task, then unschedule the Task. 12:55
so that a different task can inspect and handle the error condition
but then we have to figure out what happens with the last task, and how we return error information back through the embedding API 12:56
(this issue wouldn't block a merge, I don't think, because it wouldn't affect existing code) 12:57
Ultali is the assumption there is a progenitor main thread of execution? if so why not catch all the unhandled exceptions in the threads and then rethrow them in the main thread when the last returns 13:09
dalek p: 6046125 | jnthn++ | src/pmc/nqplexpad.pmc:
Update NQP lexpad to support natively typed lexicals.
13:46
p: 6878bf4 | jnthn++ | src/QAST/Compiler.nqp:
Fix/improvement to type and scope handling in QAST::Compiler.
p: 0c0bab6 | jnthn++ | src/NQP/Actions.pm:
Implement natively typed lexicals.
p: e417703 | jnthn++ | t/nqp/64-native.t:
Add initial tests for native ints.
p: 341b6d5 | jnthn++ | src/NQP/Actions.pm:
Get natively typed paramters working.
14:48
p: 25f6e41 | jnthn++ | src/stage0/ (9 files):
Update bootstrap so we can start using native types in the compiler.
p: 105e817 | jnthn++ | src/QRegex/Cursor.nqp:
Scatter some type annotations in Cursor.
15:19 benabik joined
dalek p: c06c0e8 | jnthn++ | src/HLL/Grammar.pm:
Use native types in HLL::Grammar.
15:33
p: b7126b8 | jnthn++ | src/QRegex/NFA.nqp:
Use native types in QRegex::NFA.
kudo/nom: 5ac5f88 | jnthn++ | tools/build/NQP_REVISION:
NQP version bump for better error message and a slight performance win thanks to NQP having native types.
15:39
16:09 contingencyplan joined
rurban Anybody has an idea what happened to Parrot_runcode()? It is still documented and used in some tests 16:21
JimmyZ doesn't know 16:28
MikeFair Howdy all! :) 16:47
So I'm trying to figure out what this means again:
Error while compiling block : Error while compiling block : Error while compiling op if: invoke() not implemented in class 'NQPMu'
I tried to call a method on a null object
Specifically I passed in a null object as a parameter to the 'if' op? 16:48
arnsholt Sounds like an NQP bug 16:52
Try asking in #perl6
dalek rrot: d2ed3bb | rurban++ | t/src/extend.t:
skip outdated extend tests with old embed API [GH #829]

I also tried to convert extend_15 to the new API but failed to understand Parrot_runcode()
16:54
Heuristic branch merge: pushed 49 commits to parrot/native_pbc by rurban
rurban Oops. 16:56
17:02 lucian joined
whiteknight Parrot_runcode? I think that's gone and I don't remember what it's replaced with 17:02
rurban I pushed an idea, but it fails (t/src/extend_15.c) 17:05
I submitted a ticket for it github.com/parrot/parrot/issues/829
Who is refactoring the debugger? 17:06
seen petdance 17:10
aloha petdance was last seen in #parrot 508 days 15 hours ago saying "git checkout tt1931-nci-parameters-deprecation".
17:11 travis-ci joined
travis-ci [travis-ci] parrot/parrot#548 (master - d2ed3bb : Reini Urban): The build was fixed. 17:11
[travis-ci] Change view : github.com/parrot/parrot/compare/2...ed3bb3c4c1
[travis-ci] Build details : travis-ci.org/parrot/parrot/builds/2461260
17:11 travis-ci left
dalek rrot: c26e17a | rurban++ | config/gen/makefiles/root.in:
[cage] Makefile cover-clean. Make less noise and use echo

make -s clean listed all dirs to be cleaned up for gcov-generated files. Print only one line
17:15
rrot/threads: c36a7c5 | rurban++ | MANIFEST.generated:
dynpmc/os: and now actually install it

Sigh
17:29
rrot/threads: 216ce80 | rurban++ | MANIFEST.generated:
[CAGE] remove duplicate os.bundle in MANIFEST.generated
rrot/threads: f8e6af5 | rurban++ | MANIFEST.generated:
Merge branch 'master' into threads
rrot/threads: db4e6e5 | rurban++ | src/call/context.c:
[cage] bump src/call/context.c Copyright to 2012

Parrot_pcc_unproxy_context added, plus some threads THREAD_DEBUG additions.
18:17 brrt joined
dalek rrot: 4a4ec69 | rurban++ | t/src/checkdepend.t:
fix bogus t/src/checkdepend.t warnings

PARROT_HAS_(CORE|EXTRA)_NCI_THUNKS is in %PConfig, not %PConfig_Temp.
Skip warning for src/gc/malloc.c /usr/include/malloc.h when HAVE_USR_INCLUDE_MALLOC_H is undefined.
Skip warning for src/glut_nci_thunks.c glut_nci_thunks.str at all.
18:30
rrot/threads: d2ed3bb | rurban++ | t/src/extend.t:
skip outdated extend tests with old embed API [GH #829]

I also tried to convert extend_15 to the new API but failed to understand Parrot_runcode()
18:54
rrot/threads: c26e17a | rurban++ | config/gen/makefiles/root.in:
[cage] Makefile cover-clean. Make less noise and use echo

make -s clean listed all dirs to be cleaned up for gcov-generated files. Print only one line
rrot/threads: 4a4ec69 | rurban++ | t/src/checkdepend.t:
fix bogus t/src/checkdepend.t warnings

PARROT_HAS_(CORE|EXTRA)_NCI_THUNKS is in %PConfig, not %PConfig_Temp.
Skip warning for src/gc/malloc.c /usr/include/malloc.h when HAVE_USR_INCLUDE_MALLOC_H is undefined.
Skip warning for src/glut_nci_thunks.c glut_nci_thunks.str at all.
rrot/threads: d4aeea0 | rurban++ | / (2 files):
Merge branch 'master' into threads
rrot/threads: bd80582 | rurban++ | t/src/checkdepend.t:
Merge remote-tracking branch 'origin/master' into threads
rrot/threads: 8073f66 | rurban++ | config/gen/makefiles/root.in:
[cage] t/src/checkdepend.t for src/call/context

add new pmc_proxy.h dep
19:23 lucian joined
dalek rrot: 355cfb9 | rurban++ | lib/Parrot/Test.pm:
Enable VALGRIND tests with c_output test functions

E.g. POSTMORTEM=1 VALGRIND=tsan perl t/src/embed.t or VALGRIND=valgrind perl t/src/extend.t
19:28
rrot/threads: c579751 | rurban++ | lib/Parrot/Test.pm:
Enable VALGRIND tests with c_output test functions

E.g. POSTMORTEM=1 VALGRIND=tsan perl t/src/embed.t or VALGRIND=valgrind perl t/src/extend.t
19:34
rurban tsan is not able to reproduce benabik's threads bug in extend_19 19:36
20:06 travis-ci joined
travis-ci [travis-ci] parrot/parrot#551 (master - 355cfb9 : Reini Urban): The build was broken. 20:06
[travis-ci] Change view : github.com/parrot/parrot/compare/4...5cfb9b7ffe
[travis-ci] Build details : travis-ci.org/parrot/parrot/builds/2462799
20:06 travis-ci left
dalek p: c2b6104 | jnthn++ | src/HLL/Compiler.pm:
Avoid referencing QAST::Compiler before it has been compiled (only worked due to bugs).
20:08
p: 81a27e9 | jnthn++ | src/NQP/ (2 files):
Fix separate compilation issues that busted running multiple commands in the REPL and getting at the NQP compiler through compreg from a built NQP.
kudo/nom: 4dd1240 | jnthn++ | / (2 files):
Add a missing use statement/dependency, now that a separate compilation hole is closed in NQP.
rrot: 10f5111 | rurban++ | lib/Parrot/Test.pm:
Enable VALGRIND tests with more test functions

Now also pir. E.g. VALGRIND=tsan prove `find t/src -name \\*.t`
20:20
p: c0203bb | jnthn++ | / (2 files):
Fix parsing of pointy without sig. Closes #52.
20:22
rrot/threads: 5412296 | rurban++ | lib/Parrot/Test.pm:
Merge remote-tracking branch 'origin/master' into threads
20:30
20:36 travis-ci joined
travis-ci [travis-ci] parrot/parrot#552 (master - 10f5111 : Reini Urban): The build was fixed. 20:36
[travis-ci] Change view : github.com/parrot/parrot/compare/3...f5111d8a70
[travis-ci] Build details : travis-ci.org/parrot/parrot/builds/2463250
20:36 travis-ci left 21:18 NotFound joined
dalek rrot/rurban/va_arg_print_n: b04ce3f | rurban++ | / (4 files):
[GH #828] Probe if double is needed for va_arg or if native floatval does fine

Set new feature.h PARROT_VA_PTR_FLOATVAL to double or the given floatval, and use it in src/call/args.c
Print "stack|register (double)" in Configure va_arg result if a cast is required and precision is lost.
Still some va_arg casts missing, multidispatch.t and nci.t fail.
22:07
rrot/rurban/va_arg_print_n: c9827b7 | rurban++ | src/ (2 files):
[GH #828] Use more va_arg PARROT_VA_PTR_FLOATVAL
22:11 MikeFair joined 22:54 tadzik joined 22:59 benabik joined
rurban nine: here? I have a little efficiency problem dynamic MAX_THREADS from Parrot_get_num_cpus(). static Interp * threads_array[MAX_THREADS] vs runtime malloced on the heap 23:26
I think I solved it. MAX_THREADS can now be a bit higher. 23:33
I've used 16 and set the actual number dynamically 23:35
This could go as configure option or cmdline option also (--numthreads) if someone wants 4000 threads. 23:36
github.com/parrot/parrot/issues/830 Parrot_set_num_threads and --numthreads 23:47
23:47 TonyC joined
rurban g topo 23:49
23:54 nopaste joined