Parrot 3.5.0 "Menelaus" released | parrot.org | Log: irclog.perlgeek.de/parrot/today
Set by moderator on 21 June 2011.
cotto 'night 00:01
dalek sella: baab31d | Whiteknight++ | setup.winxed:
Don't compile setup.winxed to setup.pir anymore. Parrot ships with winxed so we don't need to be generating PIR for compatibility
00:03
sella: 84af51e | Whiteknight++ | src/filesystem/ (3 files):
Use the system-specific path separator more faithfully. Add a new function for joining strings together with the path separator. Add an optional parent directory parameter to File constructor
sella: 50f4619 | Whiteknight++ | src/filesystem/File.winxed:
Change FileSystem.File.get_filehandle to use a global filehandle factory. Add a function for the user to set it to a custom instance.
sella: 2ba3236 | Whiteknight++ | src/filesystem/ (3 files):
Add a constructor to FileSystem.Visitor.Delete to get passed an error found by Eclesia++. Also, add error detection when we try to delete a file or dir that does not exist
00:15 theory left 00:25 kid51_at_dinner is now known as kid51 00:30 cotto left 00:32 daniel-s left 00:42 lichtkind left
bubaflub msg plobsing here is my first attempt at a script that converts old NCI definition files to new ones - gist.github.com/1044023. let me know what you think. also, i'm not sure about what to do with 't' and i'm not sure if it covers all signatures. 01:12
aloha OK. I'll deliver the message.
01:19 kid51 left 01:20 cotto joined
atrodo whiteknight: ping 01:28
whiteknight pong
atrodo I looked through the new embed api and my old code, and it looks like it solves a few of my old headaches 01:29
specifically, loading and getting a hll
whiteknight okay, good 01:32
atrodo and it looks like the last way i was doing things was generating a giant hash to reflect my data structures and the pmc to be ran, and calling in 01:34
so not a lot of in and out of execution
whiteknight ok 01:35
dalek sella: 48de3f3 | Whiteknight++ | src/filesystem/File (2 files):
Change get_os_pmc and get_filehandle to only look up the values one on the first iteration
01:36
sella: a1ba51b | Whiteknight++ | / (3 files):
Fix File and Directory tests to account for an extra call to exists during delete
sella: fc4f690 | Whiteknight++ | / (4 files):
Add functionality in TestStatus to add a cleanup routine that will run regardless of whether the test passes or fails. Use this to ensure we unregister our mock objects from the filesystem tests if they fail, so we don't get cascading failures
sella: 14fe948 | Whiteknight++ | / (3 files):
fix tests that weren't expecting me to be checking test.status again
atrodo so the only big issue, which is probably more about style, is the fact that I had to decorate each of these code blocks as a function 01:37
whiteknight what do you mean? 01:43
atrodo if i remember correctly, i had to decorate each code block for each parse node as a function in order to pass parameters into it
for example: github.com/atrodo/draak/blob/maste...pl0.gmr#L8 01:44
soh_cah_toa cotto: i have a surprise for you :) 01:47
cotto soh_cah_toa, I'm preparing to be surprised. 01:48
ok, go
sorear soh_cah_toa has zero-overhead data breakpoints working? 01:49
dalek rrot/soh-cah-toa/hbdb: cecd9ad | soh_cah_toa++ | / (7 files):
IPC test now passes
rrot/soh-cah-toa/hbdb: 7cd46c0 | soh_cah_toa++ | / (3 files):
Defined $HBDB and $PARROT package variables in Parrot::Test::HBDB to reduce duplicate code in the future
soh_cah_toa sorear: i wish :(
whiteknight atrodo: Okay, I'm clearly not familiar enough with draak
whiteknight vows to read more code
soh_cah_toa cotto: ^ there you go 01:50
whiteknight atrodo: are there any docs for draak?
atrodo whiteknight: there probably were at some bad ones at one point, in the old revision
cotto soh_cah_toa, nice 01:51
01:51 bubaflub left
whiteknight okay, I'm heading to bed now. 01:52
cotto whiteknight, 'night
atrodo night
soh_cah_toa now i can go back to beating those function pointers w/ a stick 01:53
cotto soh_cah_toa, you go
01:57 whiteknight left
soh_cah_toa :O 02:14
\\o/
i did it!
it recognizes commands now
cotto soh_cah_toa++ 02:15
soh_cah_toa i am SO happy :D
what until you see what it was. i only had to change one character in the file 02:16
cotto soh_cah_toa, your next mission, should you choose to accept it, is to abstract out the open3 and loop stuff into Test::More::HBDB 02:18
also, find some better test names
02:18 bubaflub joined
soh_cah_toa test names? 02:18
like the filenames you mean?
cotto Ideally, I should be able to figure out what a test file tests by looking at its filename
yes 02:19
soh_cah_toa oh, i just was following the conventions that all the other tests do
cotto orly?
soh_cah_toa yeah, in t/tools 02:20
cotto Ah. You were looking at the leftover files from a previous test run.
run make clean and they'll disappear
Also, catching the null PMC exception from hbdb_get_command isn't the right solution. I'm working on something better. That bit of Parrot's api is arguably broken. 02:21
soh_cah_toa i know. it was just a temporary fix
cotto soh_cah_toa, ok 02:22
soh_cah_toa oh wait. that's not where it's caught
i forgot to remove that
the only time that code executed was when i add print HBDB_STDIN "^D" in the test file but if you actually type ^D it doesn't 02:23
i handled it in fail() in frontend/hbdb/main.c
in readline_interactive(), somehow the string "^D" and the actual control character ^D are handled differently 02:24
cotto When you add a temporary fix, also add a TODO so I know not to bug you about it. There's a codingstd test to catch those, so it'll stand out. 02:25
soh_cah_toa i usually do. or i add /* STUB */ around the lines
it must've slipped
cotto readline_interactive returns PMCNULL on eof, which the pcc code tries to turn into a STRING, which causes the exception you're seeing.
ok
I don't know why it does it that way, but flh found the same bug and submitted a rejected patch ~2 years ago. 02:27
aloha, going to yapc::na?
aloha cotto: going to yapc::na is cotto or dukeleto or atrodo or atrodo or Util or kid51 or benabik
soh_cah_toa uh yeah, that's kinda weird
hey add me! 02:28
cotto aloha, going to yapc::na 2011?
aloha cotto: No clue. Sorry.
cotto aloha, going to yapc::na is also soh_cah_toa
aloha cotto: Okay.
cotto aloha, going to yapc::na is also soh_cah_toa
aloha cotto: Okay.
cotto aloha, going to yapc::na 2011?
aloha cotto: Sorry, I don't know.
cotto aloha, going to yapc::na?
aloha cotto: going to yapc::na is cotto or dukeleto or atrodo or atrodo or Util or kid51 or benabik or soh_cah_toa or soh_cah_toa
cotto there you go
you and atrodo had better be there twice
soh_cah_toa that's easy w/ the chronosynclastic infundibulum 02:30
cotto soh_cah_toa++ for an impressively unparseable phrase 02:32
soh_cah_toa kurt vonnegut? the sirens of titan? no?
cotto nope
soh_cah_toa lame-o ;)
atrodo will be bringing atrodo 2.0 if that counts 02:33
cotto depends on how well he can code 02:34
atrodo sadly, he can't 02:35
cotto I blame the parents.
atrodo we're still working on grammar and syntax
After watching supernnany, I always blame parents 02:36
02:36 rurban_ joined 02:40 rurban left, rurban_ is now known as rurban
dalek TT #2137 created by dukeleto++: t/src/embed.t fails when Parrot is configured with --without-libffi ... 02:49
TT #2137: trac.parrot.org/parrot/ticket/2137
02:51 cotto left
benabik aloha: going to yapc::na? 03:02
aloha benabik: going to yapc::na is cotto or dukeleto or atrodo or atrodo or Util or kid51 or benabik or soh_cah_toa or soh_cah_toa
benabik aloha: no, going to yapc::na is cotto or dukeleto or atrodo or Util or kid51 or benabik or soh_cah_toa
aloha benabik: Okay.
benabik aloha: going to yapc::na?
aloha benabik: going to yapc::na is cotto or dukeleto or atrodo or Util or kid51 or benabik or soh_cah_toa
benabik (going to yapc::na) .= uniq 03:03
dalek rrot/soh-cah-toa/hbdb: 86e7ac8 | soh_cah_toa++ | src/hbdb.c:
Commands are now recognized successfully
03:09
atrodo hurray! now I'm only going once 03:10
benabik I'll admit it. I just did that because I didn't want anyone else going more than me. 03:14
03:16 contingencyplan left 03:19 zby_home_ left 03:22 cotto joined
soh_cah_toa cotto: if you got a second, pull in my most recent changes and type "break" at the command prompt 03:27
cotto I lol'd 03:30
soh_cah_toa :D
cotto and, as promised, I don't see any hands
so, good job 03:31
bubaflub soh_cah_toa++
soh_cah_toa yay!
cotto yeah, that
soh_cah_toa++
soh_cah_toa so i'm working on the test refactoring you mentioned before. should i have the script use IPC::Open3 or should that be done in Parrot::Test::HBDB? 03:32
b/c that's probably the only test file i'll need that module for
cotto That part should be abstracted into Parrot::Test::HBDB
oh
are you sure you won't want more than one? 03:33
actually, that's the lazy approach
split it out when it looks like you'll want two or more files
soh_cah_toa b/c, like you said, they should be organized into separate tasks so i figured if i'm doing anything related to ipc, command i/o, whatever, it'd all be in one file 03:34
cotto In general, you should abstract as much noise out of the test file (or make it self-contained) so it's maximally clear which part of the code is the actual test and by extension, what it's testing 03:35
soh_cah_toa yes
cotto Abstracting will also make it easier to test more than one run of hbdb, which I imagine you'll want to do.
soh_cah_toa that's the thing i kinda don't like about this test. it kinda looks more like a script than an actual test
cotto It's really great that hbdb is getting some tests. 03:36
soh_cah_toa so far...3. yay me :)
cotto I think what you'll need to do is have one function to start the debugger with a fixed set of arguments and have it pass back a hashref of whatever's needed to run more tests against the running debugger. 03:37
my $hbdb = start_hbdb('foo.pbc', '--halp', '--quux=999');
hbdb_cmd_output_is($hbdb, 'break', 'lolz imma break now', "break command recognized"); 03:38
soh_cah_toa oooo...i like that
i gonna have to think about how to setup that hashref though 03:39
actually, maybe i'll just have it similar to hbdb_t
cotto that'll be the interesting part 03:40
soh_cah_toa but i do like the idea of organizing it into an actual hbdb-only test framework 03:41
cotto It's very valuable to make tests maximally easy to write. The less friction there is, the more likely you are to think "hey! I should write a test for that!" and do it. 03:42
chromatic++ had a great post about reducing friction
www.modernperlbooks.com/mt/2010/04/...ction.html 03:43
soh_cah_toa, in t/tools/hbdb_t2.t +43 , join is your friend 03:48
soh_cah_toa uhh...yeah. join() would make that a lot less ugly 03:49
03:53 bubaflub left
cotto soh_cah_toa, do you know how to get make test to run your tests? 03:56
soh_cah_toa no. i was actually gonna ask you that once i got these tests running but forgot 03:57
cotto They should be run by default if they're in t/tools and end in .t 04:01
lib/Parrot/Harness/DefaultTests.pm defines what the test harness will look for
if you're curious 04:02
soh_cah_toa that actually brings up my next question. would it be better to separate my tests in t/tools/hbdb and name them after their purpose like t/tools/hbdb/ipc.t or should they all go in t/tools and be named hbdb_* like t/tools/hbdb_ipc.t? 04:04
b/c if i do add a separate hbdb directory, i'll have to add it it @library_tests 04:05
cotto First, ipc isn't really a good description of the test. It'd say "run", "cmd" or "integration" would be preferable.
soh_cah_toa yeah 04:06
cotto second, that's your call can can be changed easily if/when needed
soh_cah_toa alright
cotto if there's more than a couple files, I'd break them out into a separate directory.
soh_cah_toa i personally like the idea of putting them in a separate directory. i just wanted to make sure that wasn't breaking some prefered style convention or something 04:07
cotto nope 04:08
I am in awe of how good my laptop's microphone is at picking things up. I had it recording during one the presentations sitting on my lap facing away from the presenter and I can hear everything just fine. 04:10
This'll be great for yapc
I'll just have to make sure that everyone knows I'm recording.
soh_cah_toa where was this? os bridge? 04:12
cotto yes
soh_cah_toa that looked like a pretty neat conference 04:13
cotto It's been pretty good so far.
Tomorrow is unconference day.
soh_cah_toa oh, didn't realize you were still there 04:14
cotto yup
that tomorrow, then on Saturday I fly out to Asheville 04:15
soh_cah_toa busy busy 04:16
cotto I think I'll end up being home for less than 12 hours. 04:19
soh_cah_toa time for me to call it quits 04:31
see ya later 04:32
04:32 soh_cah_toa left
dalek rrot/m0-spec: 4bfdb0a | cotto++ | docs/pdds/draft/pdd32_m0.pod:
the default exception handler must be installed by M0 code, not by the interp
04:40
05:27 woosley joined
dukeleto ~~ 06:46
.sleep() 06:48
06:50 contingencyplan joined 07:02 Eclesia joined
Eclesia hi 07:02
07:03 mj41 joined
sorear Hi. 07:03
07:47 mj41 left 08:42 jsut_ joined 08:47 jsut left 08:51 UltraDM joined 09:03 daniel-s joined 09:10 mj41 joined 10:01 ambs joined 10:12 woosley left 10:23 particle1 left 10:34 fperrad joined 10:36 rurban_ joined 10:40 rurban left, rurban_ is now known as rurban 10:48 particle joined 11:02 mj41 left
Eclesia question : Is it possible to access the caller object from a method . or said another way, access current execution stack of objects. 11:06
(for the current thread)
moritz Eclesia: yes, via getinterp 11:15
Eclesia nice :) 11:16
java only provide the stack in strings. the real objects are not accessible 11:17
moritz github.com/rakudo/rakudo/blob/mast...llFrame.pm uses that
11:17 dodathome joined
moritz rakudo: say callframe().line 11:18
p6eval rakudo b2bc99: OUTPUT«22␤»
moritz (p6eval prefixes each rakudo program with a prelude to prevent execution of unsafe methods, so the line number is actually correct)
11:18 daniel-s left 11:30 lucian joined 11:48 JimmyZ joined
atrodo =~ 11:53
11:58 lichtkind joined
Eclesia →… 12:25
12:29 whiteknight joined
whiteknight good morning, #parrot 12:32
moritz good morning whiteknight
whiteknight hello moritz. How are you doing today?
moritz whiteknight: a bit tired, otherwise just fine. What about you? 12:33
and TCIF!
Eclesia morning whiteknight
whiteknight hello Eclesia 12:35
Eclesia whiteknight: bad news : spawnw("parrot -o .....pbc .....pir" did not work :(
whiteknight Eclesia: I added several fixes to Rosella last night for you. new File(name, dir) works, Directory.delete_recursive is fixed, and something else I can't remember
Eclesia thanks
whiteknight Eclesia: what's the error? Syntax/compile problem? 12:36
Eclesia nothing ... he runs it, but says nothing
I dont have the code here since I'm a work.
at* 12:37
whiteknight oh, okay
12:37 bluescreen joined 12:38 jsut joined 12:42 jsut_ left
moritz if you are on linux/unix, you can run the program with strace, and see what actual system call is secuted 12:51
12:53 bubaflub joined 12:59 mtk left 13:05 mtk joined
Eclesia whiteknight: some more usefull methods for Entry(File,Directory) : canRead, canWrite. isHidden 13:21
canExecute*
I don't remember if I already asked, but is there something similar to *.jar files ? basicly a zip with pbc and additional resources images,texts... 13:30
moritz is not aware of such a thing for parrot 13:32
13:33 estrabd joined
whiteknight Eclesia: nothing like .jar files. 13:33
Eclesia: canRead, canWrite, and canExecute should be easy to do. isHidden I don't think Parrot has that ability yet 13:34
13:58 cogno joined
moritz it seems that the open opcode dies when it fails (good), but that's not documented (bad) 14:03
14:04 dmalcolm joined
dukeleto ~~ 14:04
Eclesia definitly wants a useable doc somewhere 14:05
14:13 UltraDM left 14:14 cogno left 14:16 cogno joined
whiteknight Eclesia: docs for what? I can write docs if I know what you are looking for 14:17
Eclesia whiteknight: a list of all available classes and methods with there arguments and return type :) 14:21
dalek sella/gh-pages: ff6332b | Whiteknight++ | libraries/test.md:
big updates to test library docs
whiteknight Eclesia: Oh, is that all? 14:22
we have docs.parrot.org, which is....not terrible 14:23
I've written some winxed docs too, although they are incomplete: whiteknight.github.com/Rosella/winxed/index.html
Eclesia whiteknight: I've seen the last one, it's the best I could find, great thanks for it. 14:24
14:24 mj41 joined
whiteknight I need to add more for it. Only 24 hours per day, however 14:26
Eclesia strange I have the same 24h limit too 14:27
14:29 PacoLinux left, PacoLinux joined
Eclesia whiteknight: don't know if it's possible : a convinient method : File.createTempFile(prefix,suffix). created in the temp folder and deleted when application stops. 14:43
14:44 cogno left
whiteknight Eclesia: yes, that would be useful, especially for testing 14:48
Eclesia (and for compiler, intermediate files) 14:50
whiteknight yes, good point
14:57 cogno joined 14:59 redicaps joined 15:01 mj41 left
cotto ~~ 15:08
15:11 cogno left, davidfetter joined 15:25 davidfetter left 15:32 hercynium joined 15:49 cotto left 16:18 Eclesia left 16:19 theory joined 16:20 zby_home joined 16:24 jsut_ joined 16:27 davidfetter joined 16:29 jsut left
dalek rrot: 25d1b0b | jonathan++ | / (5 files):
Update IMCC and LexInfo/LexPad to allow lexicals for register types other than PMCs.
16:35
rrot: a3b82ab | jonathan++ | / (5 files):
Add ops for working with lexicals in int/num/str registers.
rrot: 8ae61a0 | jonathan++ | t/ (2 files):
Toss tests invalidated by support added for natively typed lexicals.
rrot: 39218c2 | jonathan++ | t/op/lexicals.t:
Add tests for int/num/str lexicals.
p: abb69d9 | jonathan++ | / (3 files):
Bump to latest Parrot version to get natively typed lexical support and update NQPLexInfo/NQPLexPad to cope with that.
p: 97315f3 | jonathan++ | src/PAST/SixModelPASTExtensions.pir:
Add lexical_6model scope that knows how to look at the type and pick the correct register type when fetching/storing lexicals.
Coke sees a commit for non PMC lexicals go by! 16:39
whiteknight I don't think I say jnthn++ enough 16:42
16:43 cotto joined 16:48 theory left 16:53 he left
bubaflub newbie question: can someone explain exactly what "non-PMC lexicals" means? 16:59
cotto bubaflub, what part of it don't you understand?
do you know what lexicals are?
(as Parrot thinks of them)
bubaflub not exactly
i was thinking of lexically scoped variables, but that's just a shot in the dark 17:00
cotto that's right
17:00 redicaps left
cotto currently they can only be PMCs 17:00
so if you want an integer PMC, you have to use an Integer PMC.
whiteknight currently, apparently they can be anything
but like 20 minutes ago, it was the darkages 17:01
cotto oh
I didn't see that that'd been committed
whiteknight cotto: repeat after me: "jnthn++"
cotto jnthn++
What I really want to know is why chromatic's patch (or offer of a patch) was rejected. 17:02
whiteknight I wasn't aware he ever had a patch for it
you have a link or a copy of it or anything?
cotto I showed it to him last night and he said he'd written one.
17:03 Drossel joined
cotto I'll have to find some online evidence. 17:03
whiteknight I don't recall it, I certainly wouldn't have rejected it
and further, he's the great and powerful chromatic. He should have just committed.
cotto To be fair, barging ahead over the objections of others is what got is imcc. 17:04
*us
17:04 Kulag left
whiteknight cotto: did anybody object back in the day to IMCC? 17:06
or the changes that were made to it?
17:07 JimmyZ_ joined
cotto I got nothing 17:07
whiteknight, that's my impression 17:08
I think its author objected.
This is way before my time though, so I'm going by what I've heard.
whiteknight cotto: my impression has always been that IMCC is in its current state because not enough people cared what happened to it, not too many
cotto It started out as a prototype and afaict was never intended to be a long-term solution. 17:10
PerlJam cotto: so ... what whiteknight said :)
17:10 jsut joined
PerlJam the prototype worked "good enough" and everyone was off solving their own interesting problems that may have built on top of IMCC 17:11
17:11 JimmyZ left, JimmyZ_ is now known as JimmyZ
cotto sounds about right 17:11
plobsing my take is not that people didn't care, but cared about the wrong thing. Too much focus on what the syntax should show, not enough on what semantics should be exposed. Making the semantics fit the syntax is bass-ackward. 17:12
17:12 Drossel left 17:14 Kulag joined 17:15 cottoo joined, jsut_ left
cottoo random M0 thought: Is there any reason to have register types at all? A better solution may be to add an optional type annotation too the register name and have a flat register space. 17:15
e.g. R0 is the same as RP0, but RP0 indicates that the value is being used as a PMC, RS0 indicates that it's a String object, etc.
whiteknight yeah, that's probably true. Trying to get more syntax and semantics added to it, to support the growing number of uses. Nobody cared how any of that was added, so long as it worked and didn't break anything else 17:16
17:16 cotto left
jnthn__ cottoo: Interesting especially if we can specify arbitary sized "registers" 17:16
whiteknight cottoo: works fine until sizeof(void*) != sizeof(INTVAL) != sizeof(FLOATVAL)
jnthn__ cottoo: e.g. a native complex type could sit right in a register
Thus you get value object hanlding 17:17
whiteknight registers would have to be a union type, and there would be wasted space. I don't know whether that is a concern
jnthn__ But it's more complex
cottoo jnthn__, in m0 they're very fixed size
jnthn__ cottoo: Oh
plobsing cottoo: that may affect optimizability of generated C code and JIT
jnthn__ cottoo: Then...you get the issue whiteknight++ said.
plobsing unions dissable some optimizations
floating point registers could be mapped directly to special-purpose hardware 17:18
whiteknight ah, that's a good point too. Considering how infrequently N registers are used in comparison to I registers, that doesn't quite seem worthwhile
cottoo Yeah. I don't like the wasted space.
17:20 contingencyplan left
whiteknight jnthn__ do you have a moment to chat about classes? 17:21
NotFound And now.... 17:22
jnthn__ whiteknight: Sure
BTW, just patched Rakudo nom branch so it can make use of the natively typed lexical support. 17:23
Coke jnthn__: does it go faster/smaller/better?
whiteknight jnthn__: I want to start working towards getting rid of storing classes by string name in Parrot, and I want to decouple Class and NameSpace 17:24
jnthn__: I'm wondering if you think Parrot needs a way to organize Classes and other metaobjects internally, or if that should be left up to the HLLs?
dalek nxed: r1058 | NotFound++ | trunk/winxedst1.winxed:
allow lexicals of non-var types, following parrot recent changes, jnthn++
17:25
whiteknight doing it by string name is obviously the failz. Should we try to replace it with something else?
NotFound Ta-da!
whiteknight NotFound++
Coke whiteknight: integer! 17:26
jnthn__ Coke: We'll be able to use it a lot in primitives and get faster/smaller/better now. We need to implement some mildly clever optimizations before it is really useful for user-space code. Once we do those, yes, it'll be very nice :)
whiteknight: The way to see it is that a type (be it a class, or a role, or whatever) is just an object.
whiteknight: It may be that you install it in a namespace, or a lexpad, or wherever. 17:27
whiteknight jnthn__: Right. Right now, Parrot has a hash of Class objects internally, so when you do new_p_s, it looks up the class in a hash
jnthn__ whiteknight: Essentially, that installation is what really needs decoupling.
whiteknight the question is, do we want that same kind of parrot-looks-it-up functionality?
or, barring string names, we drop the internal registry on the floor and HLLs do it themselves
jnthn__ whiteknight: I don't think so. You'll get combinatorial blow-up.
whiteknight what do you mean?
jnthn__ whiteknight: e.g. a new op that takes a name and looks it up lexically, and another one that looks it up in the namespaces, and so forth. 17:28
whiteknight: IMHO it's better to de-couple "get hold of the thing we want an instance of" from "make the instance".
whiteknight so, delete the new_p_s opcode and not replace it with anything?
atrodo I'm liking this train of thought 17:29
jnthn__ whiteknight: I'd say so.
PerlJam assumes that there is a new_p_p opcode 17:30
whiteknight PerlJam: yes, but mostly it's used for the same thing: $P0 = new ["String"]
as opposed to $P0 = new "String"
so I want to get rid of that usage too
in my mind, the second argument of the new opcode should always be a metaobject, not a key to find a metaobject
because parrot doesn't know where to look 17:31
or, it shouldn't
jnthn__ whiteknight: 6model distinguishes type objects from metaobjects, fwiw.
whiteknight: Also, it'll let you make one instance from just having another one.
e.g.
whiteknight jnthn__: right, but in C# lingo that would just be "$P0 = new $P1.get_type()"
er, .GetType() 17:32
NotFound We can add the concept of 'instaceable'.
jnthn__ class Foo { }; my $x = pir::repr_instance_of(Foo); my $y = pir::repr_instance_of($x)
whiteknight NotFound: right, a role where the thing overrides VTABLE_intantiate
jnthn__ Here, both $x and $y end up being new instances of Foo
Basically, if you have an object, it's really cheap to say "another one of these"
whiteknight basically, the body of new_p_p should be "$1 = VTABLE_instantiate(interp, $2)"
jnthn__ Though it's not cloning, it's a clean instance. 17:33
whiteknight jnthn__: right
NotFound So we can talk about the thing without enumerating 'class, metaclass, metaobject, or...'
whiteknight So I want to get rid of the class registry. Then I want to get rid of the implicit coupling between Class and NameSpace. Methods shouldn't be stored in the NameSpace even if they're magically hidden. The NameSpace should not be usable to look up a Class and we can't expect a 1:1 relationship between the two 17:34
jnthn__ whiteknight: Sounds along the right lines.
whiteknight now, the user *could* store their classes in a namespace if they wanted, and NameSpaces should be a tree that's traversable by string keys, but that's still up to the users discretion
atrodo that sounds like a lot of perl5 legacy
jnthn__ Sure.
cottoo plobsing, in your mind, what would an ideal M0 register be able to do?
whiteknight jnthn__: thanks. I just wanted to make sure all these ideas would fly by the rakudo guys 17:35
PerlJam whiteknight: so, all object creations will look like: $P0 = get_thingy "Foo"; $P1 = new $P0; # where the get_thingy "Foo" portion can be any manner of obtaining a metaobject?
cottoo I hadn't considered something fancy like that, but it sounds like something worth making possible.
17:35 theory joined
jnthn__ whiteknight: We're already doing them, fwiw. :) 17:35
whiteknight PerlJam: no. No "get_thingy" with a string argument
plobsing cottoo: I'd like it to be able to do as much as possible without compromising optimization opportunities or conceptual simplicity
17:35 cottoo is now known as cotto
whiteknight PerlJam: the HLL would keep a reference around to the metaobject. Then it would be "$P0 = new $P1" 17:36
jnthn__ whiteknight: I think PerlJam meant something like "find_lex" as the get_thingy :)
whiteknight oh, okay
cotto plobsing, that's pretty fuzzy
PerlJam right
whiteknight then yes, the HLL manages the metaobject
cotto but interesting criteria, especially if we can make the more concrete
whiteknight the HLL can store it wherever the heck it wants. Or not store it at all and allow it to be garbage collected
jnthn__ whiteknight: Ah, I need to clarify something important.
whiteknight: You keep using "metaobject" as "the thing we install in the lexpad or namespace and call new on"
atrodo whiteknight> So how about language interop? How would py code get a new rakudo object? 17:37
jnthn__ whiteknight: 6model doesn't see it that way. The thing a language installs in the namespace or lexpad doesn't have to be the meta-object. In Perl 6, it's a type object.
NotFound You keep using that word...
plobsing cotto: it would be possible to do typeless registers. it would just mean that the compilation system would need to infer usage to optimize.
whiteknight atrodo: ask Rakudo for the Class object you want, then instantiate it
jnthn__ whiteknight: The meta-object is the thing that the get_how op gives you back when you give it an object.
cotto plobsing, the ops make that reasonable. 17:38
whiteknight atrodo: Between the two, Rakudo knows where it stores data, Parrot doesn't know where Rakudo stores data. So, ask Rakudo
jnthn__ whiteknight: In summary though, we should not dictate what a given HLL wants to put in the lexpad or package under a type name.
atrodo So parrot would be in charge of managing HLLs?
jnthn__ whiteknight: Because I'm not sure it's always the same thing.
whiteknight atrodo: I don't think Parrot should be managing anything, really
jnthn__ atrodo: Generally, HLL interop should be done with explicit importing, imo. 17:39
whiteknight jnthn__: whether it's one object or two objects, or whatever. Rakudo should manage them and not Parrot
atrodo jnthn__> I like that idea too. I'm just curious how that importing happens. How does Python know about Rakudo and how to talk to it?
jnthn__ atrodo: Today that's done through compreg. 17:40
plobsing cotto: there are complications, such as dead-register-reuse. if a register is reused by the compilers register allocator, the JIT cannot infer that the register is dead between the two live periods. this may result in a change-over of register types (int->float conversion) or vice-versa, which might be relatively expensive on a pipelined machine
NotFound jnthn__: as long as the thing provides VTABLE_instantiate, we shouldn't need to care.
whiteknight atrodo: Importing happens through compiler objects. The HLL registers the compiler object with Parrot (that's maybe the only thing Parrot keeps and manages)
everything else can look up the Rakudo compiler object and call methods on it
jnthn__ atrodo: You use compreg to look up a compiler object...and what whiteknight said :)
whiteknight "give me this meta-object or this type object" or, "give me a new instance of a thing"
jnthn__ Then we just try to encourage those compiler objects to implement the same kind of interface.
plobsing cotto: not to mention, how would you garbage collect contexts of typeless regsiters? we want a more precise GC, not a more conservative one.
whiteknight exactly. Right now we have no single compiler object interface, because Parrot tries to manage all the details internally 17:41
NotFound What about load_bytecode? Will you neeed a compreg and know the source language for that?
atrodo Okay, so parrot manages the list of HLLs and the languages handle the rest? That sounds like a good idea to me
whiteknight NotFound: Compiler object would have a .compile_file, .compile_string, .load_library methods, etc
atrodo: yes, that's my thought. Parrot doesn't know, and can't possibly support, how all possible HLLs are going to want to do things 17:42
PerlJam jnthn__: this strikes me as one of those areas where "encourage" really should be "require"
atrodo But it will have an interface/role/whatever on how to interact with another HLL?
cotto plobsing, that's not too hard if we know where in memory PMC pointers must point to.
NotFound whiteknight: nice, but if I just want to load some bytecode, having to know its source language is not nice.
whiteknight atrodo: That's something we don't have, but should
plobsing cotto: it's stack-walking all over again 17:43
whiteknight NotFound: load_bytecode should just load a .pbc file. Right now it can also load a .pir file and that's wrong
jnthn__ PerlJam: There's different levels of encouragement. ;-)
17:43 mj41 joined
whiteknight load_bytecode loads bytecode 17:43
because Parrot won't always have a .pir compiler anyway to fall back to
NotFound whiteknight: yes, but ususally we load it because we wanto to use something on it.
whiteknight One thing we could do is have a load opcode, and parrot can have a file extension map
atrodo I've always wondered, why can't I give parrot a rakudo file and it runs?
whiteknight so a .winxed file would be loaded by the winxed compiler 17:44
a .pir file would be IMCC
that's easy to do, just like compreg
NotFound whiteknight: but I also want to be able to load the compiled bytecode.
whiteknight NotFound: So load the bytecode. If the bytecode depends on a compiler, the bytecode should load that compiler
or make sure it is loaded
Parrot shouldn't be managing the dependencies for a library 17:45
If the library needs something, the library should load it
NotFound If I need a compreg to look for some instanceable thing, will be hard to use the compiled bytecode by itself.
whiteknight if it's a .PBC, we should be able to load and run the initialization routines without a compiler present
PerlJam whiteknight: be sure to consolidate all of these things that parrot should and shouldn't do for the future developers :)
whiteknight NotFound: .sub '' :load \\n load_language "Foo" \\n $P0 = compreg "Foo" \\n $P0.do_interesting_stuff() \\n .sub 17:46
it's not hard, and Parrot doesn't need to be involved in any of it 17:47
except the load_language and the compreg
PerlJam: I wrote up much of this stuff in a long, rambling blog post the other day. I'm chatting about it now to refine ideas and make sure the users think it's sane
NotFound whiteknight: back to initial point: I don't want to be forced know in what language some bytecode was compiled.
whiteknight NotFound: but the bytecode knows it. Load the bytecode. The bytecode loads the compiler 17:48
you don't need to know
NotFound whiteknight: then tell me how can I instantiate something provided for that bytecode.
whiteknight bytecode is just bytecode. Just call load_bytecode
PerlJam whiteknight: you've proven eminently sane to me so far :) 17:49
whiteknight NotFound: The library will come with docs. The docs will say how to use the library. Same idea
you can't use libgobject without knowing how to instantiate a gobject
cotto I feel like I'm missing something. Is there anything wrong with stack walking or are there just more efficient methods?
whiteknight You read the docs and find out how to do it
NotFound whiteknight: fine, as long as the answer is not forced to have "load_language ..." or "compreg..."
whiteknight Rosella has a particular way to create objects that requires special functions in NQP, and that's documented. You can't use Rosella from NQP without understanding how to make objects from it 17:50
NotFound: not forced to, no. If the library uses an easy, common object model and doesn't require special support, it's probably easy to make objects from it 17:51
but if you load in Rakudo, you're probably expected to instantiate and initialize objects in a certain way 17:52
NotFound whiteknight: if you are telling that the way to get instanceables is by mean of a compreg object, there will not be such easy way.
Unless load_bytecode returns a compreg-like object or something like that, 17:53
whiteknight NotFound: I said the way to get metaobjects could be through the compreg object
HLLs store their metaobjects and type objects in different places. You need to know how the HLL does it so you can get those metaobjects and create new objects
The compreg PMC is just one idea that an HLL could use for this purpose 17:54
Maybe the HLL stores the type objects in a namespace? or in a hash somewhere?
NotFound That's the full point. I don't think that knowing the language used to compile some bytecode should be a prerequisite to efectively use it.
whiteknight NotFound: How do you use a library if you don't know anything about the semantics of the library? 17:55
You have to know what the interface is before you start trying to create and use objects
And where type objects are stored is part of that interface
Maybe the library stores type objects in a hash, and provides a function to look them up by name 17:56
NotFound I think the net impact of that ideas in lnaguage interoperability is negative. 17:57
whiteknight jnthn__: Does Rakudo use parrot's string-based class registry to store type objects or metaobjects? 17:58
NotFound: What idea? That Parrot doesn't know in advance what the HLL wants to do?
NotFound whiteknight: that we will not have any equivalent of the current way of locating instanceables via namespace lookup. 17:59
jnthn__ whiteknight: No, as far as I know.
whiteknight: I mean, we may use it somewhere (e.g. PAST certainly does)
whiteknight: But not in the code we generate.
whiteknight NotFound: HLLs will provide their own mechanisms for accessing that data. HLLs can provide namespaces and do lookups like that if they want
NotFound: But Rakudo is already moving away from that system. Do we say that other languages can't interoperate with Rakudo because they do it differently? 18:00
or do we say that the interfaces need to be explicit and documented? We can't expect anything between languages is going to be transparent
NotFound There is a wide field between anything and nothing. 18:01
whiteknight we do provide a good basis for interop: common vtable interfaces, common opcodes, mechanisms for calling methods and working with attributes. We *can* provide a global data store for HLLs to use if we want, but we can't require them to use it 18:05
Again, Rakudo is already bypassing our class registry. Either we declare interop with Rakudo is impossible forever, or we say that we need better interfaces between HLLs 18:06
18:06 davidfetter left
NotFound Currently load_bytecode doesn't return nothing. So we don't have nothing to interface with. 18:06
whiteknight we have namespaces and HLL namespaces 18:07
we can look stuff up in those things
NotFound Yes. Now.
whiteknight Yes. Always
I don't want to get rid of NameSpaces
just make them more flexible, and less automatic and magic
I should be able to store 10 classes in a single namespace if I want. Not 1:1 18:08
NotFound I don't want magic, just some place where to look for things.
whiteknight NameSpaces are the first and probably best sources for that. But they aren't required and aren't universal
If a library or an HLL uses something different, users need to understand that 18:09
Right now we have a lot of magic, and we need to start cutting it out
NotFound I don't care if it's a NameSpace, a Hash, or a ConvolutedLastTendenceDictionary, as long as I have a way to get it.
atrodo ConvolutedLastTendenceDictionary++
whiteknight That's what I'm saying. The HLL needs to provide a way to get to it's type objects and its other global objects 18:10
That's the interface they need to provide
NotFound But not only via a compreg object.
whiteknight no. I think that's a possible option, where it makes sense 18:11
a Compiler library might make its public api through it's compreg
NotFound Then, fine.
whiteknight but a regular library wouldn't
Rosella doesn't have a compreg, for instance
but Rakudo and Winxed do
NotFound Winxed compiler has one, but compiled winxed code hasn't. That is the idea. 18:12
18:12 Eclesia joined
whiteknight Right. Rosella is compiled winxed code, and Rosella has a special interface for creating objects 18:13
and that interface doesn't use the Winxed compiler
brb 18:14
NotFound And for more mundane cases, you just have some instanceable things that users will want to intsantiate.
Or just functions to call.
18:16 JimmyZ left, Drossel joined
NotFound has nightmare where get_class does a SELECT is some remote database in some cloud... 18:17
18:17 Kulag left
atrodo Oh, that sounds like a good idea! 18:18
NotFound Don't tell it to the Ecmascript commitee!
plobsing wasn't that ES4? 18:19
atrodo Dear people that NotFound doesn't want me to tell,
NotFound Of course, the database answer is a url to download a thousand lines XML file. 18:21
atrodo with embedded XML that describes a JSON object that contains FORTRAN code that produces java
NotFound That's an implementation detail. 18:22
atrodo I think I saw someone at my last job make that system come to think about it
18:22 fperrad left 18:23 fperrad joined
dukeleto ~~ 18:23
NotFound More seriously, I've played with the idea of a distributed dungeon, when some rooms have doors that contains a url to download a json or something with other section of the dungeon. 18:26
But it will probably become a reincarnation of Microsoft Bob X-) 18:28
18:37 mj41 left 18:39 rurban__ joined
Eclesia whiteknight , NotFound : code to test the spawnw method : pastebin.com/YyLG2Ey7 18:39
whiteknight Eclesia: what's the output? 18:40
Eclesia whiteknight: nothing that's the problem :)
whiteknight doesn't create test.pbc, and no errors?
Eclesia yes
18:40 mj41 joined
whiteknight hmm. That's bad 18:40
18:41 rurban left
whiteknight Rosella Harness doesn't use spawn. I forgot that it uses FileHandle in pipe mode 18:42
So I guess I don't have an example of spawn working
spawnw
does it create test.pir? 18:43
Eclesia whiteknight: yes
whiteknight Eclesia: what OS do you use?
Eclesia linux (ubuntu) 18:44
whiteknight okay, same as me.
Eclesia whiteknight: you have an example of filehandle somewhere ? 18:45
whiteknight github.com/Whiteknight/Rosella/blo...inxed#L117
the spawn_and_execute function is what the Harness uses to run tests
and capture output
Eclesia Could not find sub spawn_and_execute 18:46
Could not find sub spawnw_and_execute 18:47
18:48 fperrad left 18:51 fperrad joined
dalek rrot/m0-spec: df3bc4c | cotto++ | docs/pdds/draft/pdd32_m0.pod:
call frames aren't necessarily fixed-size
18:52
whiteknight Eclesia: Are you trying to call it directly? It's a method on Rosella.Harness.TestFile 18:53
just copy the logic out for your own uses
Eclesia misunderstood
whiteknight var pipe = new "FileHandle"; 18:54
pipe.encoding('utf8');
string cmd = "..."
pipe.open(cmd, "rp");
string output = p
ipe.readall();
pipe.close();
hm, formatting fail
string output = pipe.readall();
18:56 dodathome left
dalek rrot: e93356d | dukeleto++ | NEWS:
Add a note to NEWS about new lexical awesomeness from jnthn++
19:00
cotto woot 19:02
whiteknight woot indeed 19:07
dukeleto i assume that will allow Rakudo to use a lot less memory ? 19:09
Eclesia searching for all the methods available on string 19:12
dukeleto Eclesia: perldoc src/pmc/string.pmc 19:13
NotFound Eclesia: spawnw takes an array with the command and its arguments. 19:14
You need something like: spawnw(["parrot", "-o", "test.pbc", "test.pir" ] ); 19:16
For examples look at the winxed driver. 19:17
Eclesia NotFound: thanks, going to try
NotFound I didn't implemented a version that takes a string becasue this way there are less security concerns. 19:18
Eclesia NotFound: thanks it works :) 19:19
whiteknight NotFound: winxed built-in spawnw is broken
oh shit, nevermind
Eclesia lol
NotFound It's probably the most tested feature ;) 19:20
whiteknight no, I was using it wrong
Eclesia NotFound: yesterday I also failed to use substring on a string ... ended using base = split(".", base)[0]; you have an example of substring ? 19:23
NotFound You mean substr? 19:24
Eclesia yes sorry
whiteknight Eclesia: I use substr a lot in the Rosella String library (but that's still beta)
Eclesia and replace,
NotFound There are no tests for it, I'll write something.
Eclesia searching for a Collection, List class 19:28
19:28 mtk left 19:29 mtk joined
whiteknight ResizablePMCArray 19:29
dalek nxed: r1059 | NotFound++ | trunk/t/basic/02predefuncs.t:
some tests for bulitin substr
19:31
NotFound replace is a bit more complicated, you can look at the pir tests in parrot t/op/string.t 19:35
19:36 mj41 left
NotFound The winxed builtin translates directly to the op. 19:36
Eclesia index, indexOf does not exist ? 19:37
NotFound indexof, all lowercase
dalek sella: a2b3b87 | Whiteknight++ | setup.winxed:
forward declare for OS, to suppress warnings
19:46
19:50 Eclesia left 19:54 mtk left 19:55 mtk joined, mtk left 19:56 mtk joined 19:58 bluescreen left 20:02 fperrad left 20:03 ambs is now known as All, All is now known as ambs 20:06 fperrad joined
cotto Has anyone else heard of the term "process virtual machine"? Wikipedia specifically lists Parrot as an example and the term is useful, but I'd never heard of it before. 20:08
NotFound thinks about writing an article about ConvolutedLastTendenceDictionary 20:11
whiteknight cotto: yeah, I've heard it
as opposed to a system VM
cotto whiteknight, what context? 20:12
right
whiteknight cotto: I don't remember where I learned it, but I've heard it and used it several times
I might have been the person who added that example to wikipedia
cotto It wouldn't be the first time I've unknowingly read something you've put on wikipedia. 20:13
I'm thinking about it in terms of what words to use on the M0 glossy. If someone doesn't know what a vm is, they definitely won't be less confused by "process vm". 20:14
Coke yawns 20:15
cotto yarns
Coke farms
cotto It's a trap! 20:16
Coke hurm. off by 2. whoops.
NotFound We can always resurrect the old terms p-code and p-machine. 20:17
cotto NotFound, let me clarify that I'm trying to make it *less* confusing. ;]
NotFound It will not be confusing for ucsd pascal users... but maybe there are not lot of them these days. 20:18
cotto Both of them probably already know what a vm is.
NotFound BTW, nice project for some fool^h^h^h^himaginative person: write a ucsd p-code interpreter in parrot. 20:20
cotto NotFound, is PIRRIC tested at all? 20:21
Coke we currently have 254338 .tap files in our smolder dir.
I suspect we're not removing any old ones.
NotFound cotto: I ran some trivial code with it this same week.
cotto NotFound, I'm surprised that it still works. no automated tests then? 20:22
whiteknight Coke: very likely not
Coke: Can you kill them with great thunder and vengence?
vengeance
NotFound cotto: I think pir files in examples are tested, but only for being compiled without errors.
20:23 ambs left
whiteknight we should jam a bunch of shit logic into IMCC to parse, understand, and verify NCI function signatures 20:24
Coke whiteknight: I'm peeking at it now. will try to clean things up this weekend fer realz.
whiteknight Coke++
cotto *must*not*feed*trolls*
Coke hurm. used to have a login for smolder. 20:28
20:28 fperrad left 20:29 fperrad joined 20:34 cjh left
Coke seen particle 20:36
aloha particle was last seen in #parrot 9 hours 47 mins ago joining the channel.
Coke particle: ping.
20:37 mj41 joined 20:40 fperrad left
particle last i know about smolder is that duke was moving it to a supercell vm 20:41
did that happen? it was a month or two ago iirc
20:41 alester joined 20:43 mj41 left
dukeleto particle: the plan was to move it over, but I didn't volunteer because I grealy dislike smolder 20:45
particle: greatly rather. And a general lack of time to do stuff that I dislike.
particle honestly, i think the answer to our constant smolder problems is jenkins.
dukeleto particle: does jenkins allow random people to submit results? 20:46
particle i don't really know. all i know is that it's not smolder, so it must be better.
i forget, is there a conf file on the parrot vm with the admin pw? 20:47
dukeleto particle: indeed. I've heard good things about BuildBot
particle: admin pass for smolder?
particle aye, i think coke++ is looking for it
dukeleto particle: ok, i will let him know what it is. 20:48
20:50 PacoLinux_ joined, PacoLinux left, PacoLinux_ is now known as PacoLinux 20:51 PacoLinux left 20:52 PacoLinux joined 20:57 whiteknight left
cotto I'm +1 to anything that doesn't leak so badly it kills the server. 21:00
Coke I'm pretty sure that we can tune some things. 21:02
ugh. apparnetly missed particle & dukeleto. 21:05
cotto dukeleto will probably be back soonish 21:07
21:11 lucian_ joined, contingencyplan joined 21:12 lucian left
dukeleto Coke: ping (privmsg) 21:19
Coke aloha, dukeleto? 21:21
aloha Coke: dukeleto is popular
tadzik :P 21:22
Coke alrightee. only one config option in the webterface for parrot: "save 250 full reports" 21:25
so, onto messing with things at the command line.
cotto schema.org reminds me of imcc 21:27
dalek nxed: r1060 | NotFound++ | trunk/winxedst1.winxed:
update lexicals in operators ++ and --
21:33
21:38 Coke left 21:39 coke joined, cotto left 21:42 Psyche^ joined, Patterner left, Psyche^ is now known as Patterner 21:59 Drossel left 22:02 Kulag joined 22:08 cotto joined 22:16 Kulag left 22:19 alester left 22:32 hercynium left 22:34 Kulag joined 22:44 soh_cah_toa joined
soh_cah_toa ~~ 22:46
22:47 cotto left 23:13 cjh joined 23:14 cotto joined 23:19 jsut_ joined 23:21 cotto left 23:24 jsut left 23:37 cjh left 23:38 cjh joined 23:53 lucian_ left 23:56 whiteknight joined
dukeleto ~~ 23:57