Parrot 4.6.0 "Wild Parrots of Telegraph Hill" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 19 August 2012.
00:50 kid51 joined
MikeFair hello whiteknight 00:54
whiteknight hello MikeFair
MikeFair whiteknight: Are you the one who is doing Winxed and working on the debugging stuff? 00:55
whiteknight I'm one of them, yes
MikeFair I was wondering if there was a way to encapsulate the compilation and execution into an XML fragment 00:56
it's kind of just a thought forming in my brain at the moment but for some reason I keep drawing parallels to parrot and byte code execution and network packets and network debugging... 00:58
have you ever seen the output of WireShark?
Or some related tool that is showing the higher level protocol built up from the network packets?
whiteknight yes, I use wireshark pretty frequently 00:59
MikeFair I only bring it up because it seems the process of disassembling network protocols seems to be similar to multiple languages running over the byte codes 01:00
it's like Parrot is a CPU, that is receiving messages over the network from the compiler tools 01:01
whiteknight i can sort of see that. It's certainly not something I've thought about before
MikeFair Yeah neither had I
whiteknight but it's in my brain now.
MikeFair It just kind of showed up one day as I was thinking about the nature of how Parrot is always passing the frame full of registers around
hehe :)
Which then led me to the concept of network encapsulation and the various layers there 01:02
So then I saw this XML fragment <HLL lang="perl6"> print "Hello World\\n"<ASNTree>....<NPQ>...<PBC>...<x86>....</x86></PBC></NPQ></ASNTree></HLL> 01:03
Or something like that 01:04
I don't understand the particular internals, but it seems that there's layered system that could be captured in the process very much like a networking stack 01:05
At the time I was investigating a lot of erlang and ZeroMQ, so I envisioned each piece of the compilation stack as a separate service sending and receiving messages from the other pieces/layers 01:06
It became more of a compilation service, rather than a compilation process 01:07
err service chain
whiteknight sounds like an interesting tool for some uses. Seems like it would not be performance-friendly in the general case
MikeFair Well ZeroMQ has a zero copy, in process, message passing mechanism that is designed to be very performant, it seems to me at least as performant as the existing stuff (passing a pointer) 01:09
dalek rrot/leto/get_pointer: 1c498be | dukeleto++ | / (3 files):
Fix get_pointer for Integer and Float and add a currently failing test
MikeFair whiteknight: I mean I don't want to say that it would be performant, but it just seemed that it was the right way to pass a shared memory pointer between separate processing libraries
Where does the peformance come from today? 01:10
whiteknight well, I don't want to pretend Parrot has great performance right now
but we definitely don't want to do anything to make it worse
MikeFair I gues I should also say that this was a reporting/debugging/output format, not an internal memory model
MikeFair nods. 01:11
If I'm understanding the Parrot execution engine right, there's this array of memory pages that hold the registers and register types
I'm assuming that almost 100% of the time, that's never more than one page 01:12
Then there's a pointer to this page that gets passed around to all the subs
This is a mental model, I haven't looked at the code 01:13
whiteknight yeah, that's close enough. We've got an object called a CallContext which holds the register set as a heap-alloced array
MikeFair (s/array/linked list/)
whiteknight CallContexts are linked together in sort of a linked list or tree
MikeFair Then I envisiond that each thread would have its own CallContext list/tree 01:16
whiteknight yes
MikeFair So where I started my thing was CallContext ~~ Ethernet Frame 01:17
err not frame, payload
anyway, I guess that's not so relevant right now 01:18
MikeFair is still grokking the world
Because there's two distinct parts, the data registers and the code 01:19
So I understand the CallContext piece, but I don't quite get the code part of it
I submit 'print "hello world\\n";' in 'perl6' 01:20
Then calls up models Perl6/Grammar.pm and Perl6/Actions.pm which begin to work on my text
(In NPQ land) 01:21
01:22 MikeFair joined
MikeFair wonders what he missed. 01:22
whiteknight what do you mean? 01:24
MikeFair Sorry, the IRC client just went non-responsive for a bit then I saw the disconnect
i'm seeking to wrap my brain around I get from 'print "hello world\\n";' to something coming up on my terminal 01:25
Where in memory do the subs and modules get stored 01:26
I'm looking see if my ideas arond seeing it as a chain of messages going through the layers is a good mental model for itall (and hopefully to be turned into a performant execution paradigm) 01:27
I think if the layers could separated then it'd be easier to inspect/debug/work with etc. 01:28
If the layers model even applies, I think it does 01:29
HLL is the top layer, ASN the next layer, not sure what goes here? winxed/NPQ/PASM..., then PBC, then hardware architecture
whiteknight We've got a big memory block containing the bytecode. Subroutines are just offsets into the bytecode block 01:30
MikeFair I can see how the CallContext can be passed around simply and easily by passing the pointer around
So the PBC gets generated how, I mean that code has to come from something that thinks in a higher order from that 01:32
is that the ASN 01:33
or is there something between the ASN and the byte code
Err AST -- Abstract Syntax Tree
whiteknight depends where you're coming from 01:34
MikeFair Or is the AST an older thing that I learned about years ago
whiteknight PIR code is assembly-like, we parse it with flex/bison to an internal tree and serialize that to bytecode
Something like Perl6 is much more complicated than that
MikeFair So while each sub will only have one place that created it, there are many sources that can add byte codes into that memory block? 01:35
Or does it all go through PIR at some point? 01:36
Or asked another way, could the compiler and execution chain be represented by a series of commands separated by pipes on the command line? (for an individual HLL expression) 01:39
whiteknight it all goes through PIR at one point. Once the bytecode is built, it's read-only 01:49
so after the compiler releases it, it's static
we don't enforce that formally, yet, but that's the case
01:52 kid51_ joined
MikeFair cool 02:11
So there could be a memory blocked that stored the PIR with pointers to the Bytecode offsets? 02:14
Or in my layered model <pir>command<pbc>bytecodes</pbc></pir> 02:15
whiteknight Yeah, I don't see why not
02:16 kid51 joined
MikeFair I'm just seeing this as one big code expansion tree, where each level is a different language 02:16
02:16 schmoo joined
whiteknight okay, I guess here's the first question I have: What's the big benefit of this format? 02:17
What problem do you have in mind that this will solve?
MikeFair Debugging, inspection, navigation of the active code 02:18
whiteknight Okay, well we have pointers and annotations in the bytecode that point back to information about the original source
filename, line number, etc
and then a debugger can lookup that file, read out that line and have that information there
02:18 kid51_ joined
MikeFair whiteknight: But what about run-time generated code 02:19
whiteknight like the intermediate formats?
MikeFair whiteknight: that then gets evaluated
whiteknight okay, I see what you're saying
MikeFair whiteknight: no more like I have a sub that generates code at runtime which then gets compiled and executed
right
whiteknight ah, okay
MikeFair Remote debugging 02:20
where I don't have the source
Well I guess that wouldn't really apply, because the source would be on the executed system I'm inspecting 02:21
But the idea is that I could connect to the parrot executable and inspect the world of it 02:25
through a DOM representation
I imagine the DOM represenation would be created by the debugger itself, but it would do it by walking the internal data structures 02:26
You could then use a tool like wireShark to watch the exeution in a similar way you watch network packets in WireShark
Each session would be a single HLL expression 02:27
The metaphor still needs to be adjusted a bit I think, I think the layers model captures the multiple possible source languages 02:29
I was considering the case where I have some Perl code that generates javaScript (or some DSL) that it then usese the toolchain to compile and execute 02:30
If the inspection tool generated a DOM tree then I could navigate the level I needed.... For instance, in the case of the DSL, I might actually be debugging my Grammar, not the DSL itself 02:32
Grammar/Actions -- the PIR being generated
whiteknight I think there is a gem of an idea here, I'm going to need some time to think it over 02:34
MikeFair nods.
Certainly
whiteknight Anyway, It's passed my bedtime already.
We can definitely talk later 02:35
MikeFair I'm glad to hear that i'm not totally bonkers with this in concept
:)
whiteknight :)
goodnight
MikeFair whiteknight: Thanks so much for taking the time to hear it
goodnight
04:28 Util joined 04:29 pmichaud joined, PerlJam joined 04:30 p6eval joined 04:31 Coke joined 05:18 MikeFair joined 06:05 fperrad joined 06:19 tadzik joined 08:18 Psyche^ joined 10:49 whiteknight joined
whiteknight good morning, #parrot 10:57
11:43 lucian joined
moritz good morning whiteknight, * 11:49
whiteknight hello moritz 11:53
12:09 JimmyZ joined
whiteknight no dalek today? 12:13
moritz: I just pushed a few commits that, I think, fix some socket issues 12:14
I'm not sure if they fix the issues Rakudo has been seeing
but I am making progress
JimmyZ whiteknight++ 12:23
moritz whiteknight: I can't build that branch (nopste forthcoming) 12:48
whiteknight blah
moritz whiteknight: perlpunks.de/paste/show/5038c9b9.4945.27a 12:49
whiteknight weird 12:52
moritz that was after make -j5, and then a serial 'make' after that 12:54
now trying after cleaning out and without any parallelity 12:55
JimmyZ hmm, builds here 12:57
with make -j4 12:58
moritz huh, worked fine on second attempt (without any -j option)
13:02 ambs joined
ambs Probably I should ask on #perl6 on the other server I can't remember the name, but probably you can answer me. Is there a Perl 6 Pod formatter out there in Perl 6? 13:03
moritz ambs: yes. perl6 --doc $file prints out the documentation in text format, with --doc=HTML and Pod::To::HTML installed you can get HTML out
ambs moritz: thank you (trying to get the releance on this grant proposal news.perlfoundation.org/2012/08/201...prove.html 13:04
moritz ambs: I'm having trouble myself figuring that out, which is why I haven't commented yet 13:07
ambs :) 13:08
moritz I think it's a worthy goal, but so far this project has been very decoupled from the Perl 6 community
ambs this seems a Perl 5 module. I would prefer to see the effort writing a Perl 6 module :-|
moritz the only communication so far was through the blog post and the grant proposal
ambs right. 13:09
thank you :) 13:11
moritz whiteknight: all rakudo socket tests pass now. Running a full spectest run now 13:28
a more thorough test would be to also run the LWP::Simple test suite, for example
JimmyZ nice 13:34
whiteknight moritz: All of them? That's...surprising 13:39
considering I fixed what I thought was an unrelated problem
but yes, I would definitely want to see the output of LWP::Simple's test suite 13:40
moritz whiteknight: that's with the patch that sets .encoding('utf8') on the handle
whiteknight moritz: okay
moritz I'm doing a 'panda install LWP::Simple' now (which also runs the test suite), but slow machine is slow :(
and I run a spectest in parallel 13:41
load average of 5.03 on 2 cores
whiteknight yeouch 13:42
moritz \\o/ all LWP::Simple tests pass
JimmyZ \\o/ 13:43
whiteknight okay, that's all the validation I need 13:44
13:44 kid51 joined
moritz now testing HTTP::Client 13:47
that one fails its tests with 'Connection refused' 13:50
I'll try on another machine to see if it passes on master
but of course that other machine doesn't have panda installed yet *sigh* 13:53
whiteknight okay, that's someplace to start 14:11
thanks moritz++
moritz fails their test on master too 15:13
JimmyZ time to merge io_cleanup1? 15:15
15:39 JimmyZ joined 15:50 contingencyplan joined 17:21 schmoo joined 18:35 lucian joined 18:45 sivoais joined 21:22 bubaflub joined 22:11 dalek joined 23:08 lucian joined