Parrot 4.5.0 "Buff-faced Pygmy Parrot" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 19 June 2012.
dalek kudo/nom: 690d774 | pmichaud++ | src/core/ (2 files):
Refactor prefix:<|> flattening for Ranges and other types.
00:03
00:44 Hunger joined 00:50 schmooster joined 06:25 Liz joined 07:49 rich joined 08:18 Liz joined 08:37 brrt joined
brrt once again, I am in need of help! who knows how CCLASS constants work 09:03
... or rather, how can I get CCLASS constants in winxed to be defined much like they seem to be in Rosella?\\ 09:04
09:23 kuku joined 09:47 kjs joined
dalek : cec69b1 | kjs++ | src/ (2 files):
add a m0_chunk to compiler.
09:49
brrt alright, now I have something working, but not quite as i like 10:00
whatever i do find_not_cclass finds the first value as not containing the cclass
moritz did you mean: first character? 10:08
if not, what do you mean by "first value"?
10:16 JimmyZ joined
JimmyZ good morning, kjs 10:16
kjs hi JimmyZ
JimmyZ hello
kjs JimmyZ: I'm generated instr nodes now rather than fprintf() the code to stdout 10:17
JimmyZ kjs: good 10:18
kjs this allows other phases for optimization. probably also a reg.allocator.
JimmyZ hmm, looks like not_gerd stopped his m0 10:19
kjs $REAL_LIFE may have come up
JimmyZ yeah
kjs: Do you know how to link to C-lib? not via lib-ffi 10:23
kjs: I mean m1
kjs lnink m1 to /a/ c-lib?
which lib to link with?
JimmyZ yep
kjs: glibc?
kjs just list it on the final gcc command? 10:24
when it invokes the linker
it links that one automatically no?
the runtime lib
JimmyZ kjs: that is, m1 calls c function directly
kjs m1 code calling a c function? 10:25
JimmyZ kjs: like C
kjs i'd say that's one through the ccall ops and friends
one=done
JimmyZ ok, maybe jited ffi 10:26
kjs what do you want to do? :-)
JimmyZ call fprintf function?
or something 10:27
maybe thread api
kjs JimmyZ: I think there will have to be support in M0 for that
JimmyZ yeah 10:28
kjs as it stands M1 's generated code is not always correct
things go wrong when passing complex structs as args
dalek : 414aada | kjs++ | src/instr.c:
fix linking instr nodes.
10:42
moritz ... and it doesn't just pass them by reference?
kjs moritz: you mean M1? 10:43
moritz 12:28 <@kjs> things go wrong when passing complex structs as args 10:44
that's what I was referring to
kjs moritz: right ok :-)
yes it's by "reference"
addresses received from gc_alloc, which are really malloc'd, are stored in I registers
and they're passed 10:45
that's where the tricky part starts, because it all /seems/ correct
but for some reason it isn't.
moritz :/
kjs and usually it's something that is overlooked. For days and weeks I've been staring at code wondering what's wrong with it, starting to point to M0, but at some point I figured it out and then all of a sudden it works 10:46
10:50 PacoAir joined
dalek : e0b61cc | kjs++ | / (2 files):
add a "failures" folder, which contians programs that should run but don't.
10:54
11:21 whiteknight joined
dalek : 46fe620 | kjs++ | failures/funcall.m1:
consecutive function calls dont work.
11:24
whiteknight good morning, #parrot 11:25
kjs well, the good news is that structs seem to be correctly implemented. The Bad news is that function calls are a PITA and don't work.
moritz why does that remind me of good ol' parrot? 11:35
JimmyZ well, I don't want to gdb function call again ;) 11:40
kjs JimmyZ: no? :-(
;-)
it mightn't be at the gdb level
JimmyZ yeah, last I gdb it, I got a lot of pain
kjs it's just the generated M0 code that is not complete
11:41 kid51 joined
dalek : 36554d5 | kjs++ | / (2 files):
update TODO to reflect status better
11:46
whiteknight brrt: ping 11:49
dalek : f806aa8 | kjs++ | src/gencode.c:
split up number into 2 parts if > 255.
11:55
: 6fd0f9b | kjs++ | src/gencode.c:
another fix for numbers > 255.
11:59
: 30a9ac2 | kjs++ | src/gencode.c:
add clarification and fix another case of int > 255.
12:06
12:11 brrt joined
dalek : 76970e5 | kjs++ | src/gencode.c:
not all expressions leave someting on the regstack. Ensure this is correct.
12:12
brrt moritz: yes, i meant 'first character' 12:14
as in Foo-Bar get transliterated too _oo_bar
however, simply using the ascii table and not caring about unicode works nicely, too :-) 12:18
moritz nqp: pir::find_not_cclass__IPI('Foo-Bar', pir::const::CCLASS_WORD)
p6eval nqp: OUTPUT«error:imcc:The opcode 'find_not_cclass_i_p_i' (find_not_cclass<3>) was not found. Check the type and number of the arguments␤ in file '(file unknown)' line 41␤»
moritz nqp: pir::find_not_cclass__IISII(pir::const::CCLASS_WORD, 'Foo-Bar', 0, 0) 12:21
p6eval nqp: OUTPUT«Class '!macro_const' not found␤current instr.: '_block1000' pc 24 ((file unknown):142759220) (/tmp/bUtupkQS2S:1)␤»
moritz nqp: pir::find_not_cclass__IISII(pir::const::CCLASS_ALPHANUMERIC, 'Foo-Bar', 0, 0) 12:22
p6eval nqp: OUTPUT«Class '!macro_const' not found␤current instr.: '_block1000' pc 24 ((file unknown):166577460) (/tmp/lEHDwUJK9r:1)␤»
brrt i know :-) 12:25
dalek : d5cd48d | kjs++ | src/gencode.c:
fix a few comments. more prep for moving to instr nodes.
brrt help nopaste 12:26
whiteknight gist.github.com 12:27
brrt pastebin.com/Ev9YGP4z
oh, that works 12:28
oh, hi whiteknight, do you happen to know why the CCLASS_* constants work in Rosella but not in 'plain' winxed?
moritz maybe a missing .include or so? 12:29
you could also check is_cclass
brrt gist.github.com/2983087 12:30
moritz: this also sprang to my mind, but reading the source code I just can't find where 12:31
oh, i have mail :-) 12:36
whiteknight brrt: yeah, I sent the answer in mail 12:40
in the parrot repo, the runtime/parrot/include/ folder contains lots of files with different constants 12:41
so if you need constants for different things, they're in that folder
brrt thats good to know 12:42
moritz so it was a missing include file?
brrt yes 12:43
and i also know why my loop was borked
because, well, i made a mistake, and my loop was wrong :-)
.. and now it works 12:47
gist.github.com/2983087 12:48
dalek : bf3025d | kjs++ | src/gencode.c:
unfreeze registers for symbols that go out of scope. Also fix a bug that popped up.
whiteknight brrt: nice 12:49
brrt is it safe to assume that (derrivatives of) stat will fail if a file does not exist? 13:00
or, in other words, how to check if you can read a file (in c?)
access(), thats it 13:01
NotFound ~~
brrt: the best way ti check if you can read is reading. 13:02
dalek : 0a50321 | kjs++ | src/gencode.c:
clean up and move functions on reg unfreezing.
13:03
NotFound Every other way can fail for unexpeted reasons.
brrt i guess thats true 13:04
whiteknight the OS PMC has a can_read() method 13:09
and a can_write() and a can_execute()
that's what Rosella uses
13:10 Psyche^ joined
whiteknight it's not perfect, as NotFound points out 13:10
brrt i'm doing this in the C layer, so I can't use those 13:13
whiteknight okay 13:14
access() then is a good initial test, then try to read and check error codes 13:15
NotFound The main problem with that kind of checks is: you call some function to check if you can do something. If the result is negative, you check error codes. Then you do something and if it fails check error codes. 13:20
So in the end you do the same thing twice and gain nothing. 13:21
dalek : 2aa70ad | kjs++ | src/gencode.c:
make code bit simpler.
13:22
brrt in which case I just read the bytecode files and be done with it 13:23
or fail, which i can trap
13:26 pmichaud joined
brrt hmm.. it seems adding an array of paths is not really worth it 13:38
where paths = search paths
dalek kudo/nom: d90f671 | moritz++ | docs/release_guide.pod:
[release_guide] remove SVNisms
brrt apache being bizzarre again 13:45
dalek kudo/nom: 4b2c1fe | moritz++ | docs/release_guide.pod:
[release_guide] remove redundancy with nqp's release guide

Also split bumping of VERSION and NQP_REVISION into separate steps
13:46
13:46 dngor joined
dalek nxed: ac94006 | NotFound++ | winxedst1.winxed:
backport some changes in variable creation to stage 1
13:47
whiteknight blah. For some reason winxed can't do $include_const in my io_cleanup1 branch 13:59
NotFound whiteknight: the StringHandle fix is not in parrot master yet. 14:01
whiteknight yeah, but I made the same fix to the generated .pir in my branch
okay, the I/O parts of the $include_const mechanism appear to be working correctly. The file is opening and the lines are being read 14:16
NotFound whiteknight: There has been some change in white space, line ending, whatever... in the .pasm generated files? 14:24
The parsing in include_cost is not very smart. 14:25
whiteknight it's parsing fine. It's calling createconst and setvalue with the correct name/value
NotFound The what don't work? 14:26
Some problem with scope?
whiteknight wait... 14:28
it's not reading the last line of the file. That's the problem 14:29
NotFound Uh...
Maybe there was a difference between readall and read(0) after all.
whiteknight for (string line = file.readline(); !file.eof(); line = file.readline()) {
so it's reading the last line, then checking !file.eof() and exiting before processing the last line 14:30
I wonder why this worked in master?
benabik Perhaps master only sets EOF when you try to read past EOF?
NotFound whiteknight: ah, yeah, I always tough that the eof handling was "suboptimal". 14:31
whiteknight benabik: very possible. I may be setting it too early now
NotFound The problem may be to find a fix that works with both ways during transition.
whiteknight I want to try to keep the old semantics here 14:32
it is hard sometimes because the old semantics are so bad
NotFound Mmmm... yes, I think in think this case parrot was doing right. 14:33
The C semantic for that cases is clean. 14:34
The corner cases for readline are lines without appropiate line ending. 14:35
Unfortunately, a lot of people believe that text files withoout appropiate text line ending is fine. 14:36
whiteknight this semantic doesn't make sense to me. If we read all the data out of the file, we are at eof 14:38
NotFound whiteknight: How do you know that? Say you are reading from a socket. 14:40
whiteknight sockets don't have EOF
because they are sockets, not files
in master, sockets do not have EOF flag 14:41
NotFound Amazing. 14:42
whiteknight that makes sense. You can only have End-Of-File on a file
sockets would have End-Of-Socket, or something like that 14:43
and even then, you're only at EOS when the socket is disconnected
NotFound whiteknight: yeah, but in that semantic EOF is just an abstract word, meaning "haven't read anything"
dalek kudo/nom: 115ab2f | pmichaud++ | docs/release_guide.pod:
Move "create release announcement" into step 1.
14:44
NotFound whiteknight: the point is simplicity: you don't need different ways for different types of string, and you don't need to read-ahead or ask the filesystem. 14:45
s/string/stream
whiteknight yes, in the new system we don't have different ways. They are all handled the same
and when you're out of data, you're at EOF
well, FileHandles are, anyway
socket.is_eof is currently unimplemented 14:46
dalek kudo/nom: 5921c70 | pmichaud++ | docs/release_guide.pod:
Move the "make sure everything compiles/runs" testing step to _after_ the "update NQP and versions" steps.
NotFound Maybe we should provide a check-eof method, to make easy the implementation of differente semantics in HLLs and user code. 14:49
14:54 kjs joined
whiteknight we have the .eof() method that checks the flag 14:56
NotFound But the flag is "I've read past eof". 14:58
brrt today,e veryting seems to happen by voodoo to me 14:59
benabik In C land, EOF isn't a position in the file, it's an error flag.
So if you read to the end of the file, it's not triggered because no error has occurred yet. 15:00
NotFound In fact there is no error, but a "readed 0 bytes" condition. 15:01
If you get 0 bytes, you check whatever happened if you're interested. 15:03
And here lies the probles with read-lnes interfaces. sometimes they don't provide enough information. 15:04
dalek : e2630e8 | kjs++ | src/ (2 files):
Remove unused code, simplifying assignments.
15:12
nxed: ebe124a | NotFound++ | winxedst1.winxed:
backport changes in declarations to stage 1
whiteknight This semantic makes much more sense at the C level than it does at the Parrot level 15:22
if I know we're at the end of the file without having attempted to read past it, we should be able to access that information 15:23
15:23 plobsing joined
NotFound whiteknight: The problem is that in general you don't know. 15:23
You've just opened a file without reading. Are you at eof? 15:24
You need to actively look for it.
You can check the buffer... what if unbuffered?
Too much complication for supposedly just checking a flag. 15:25
whiteknight it ends up being more complicated doing it this way 15:27
15:28 JimmyZ joined
NotFound whiteknight: and the worse problem: you can implement read-ahead EOF on top of read-past-eof, but you can't the other way. So in low level you must provide the non read-ahead anyway. 15:29
whiteknight okay, I think I've got this fixed 15:31
The complication is, because we use read-ahead buffering, we hit EOF on the file before we're allowed to report it to the user 15:32
NotFound whiteknight: but that is a buffering implementation problem, not the EOF semantic. 15:33
whiteknight well, we have two different EOF's: One according to the file descriptor and one according to the handle PMC
NotFound Yeah, but the semantic is what we decide to report to the user. 15:34
dalek rrot/whiteknight/io_cleanup1: 58cce6f | petdance++ | include/parrot/exit.h:
reran the headerizer and got proper annotations
15:35
rrot/whiteknight/io_cleanup1: 870463a | petdance++ | src/runcore/subprof.c:
redid the #if on getticks() to wrap the contents of the function, but not the declaration
rrot/whiteknight/io_cleanup1: 7e95bfb | alvis++ | docs/pdds/draft/pdd13_bytecode.pod:
This fixes the 'oddness' reported by rurban yesterday in #ps.
rrot/whiteknight/io_cleanup1: cdde363 | alvis++ | docs/pdds/ (27 files):
While I was here: This removes useless, empty lines between the '=head2 Abstract' and the '=head2 Synopsis' command paragraphs in most, but not all, of the pdds.
rrot/whiteknight/io_cleanup1: 1bd030e | alvis++ | include/parrot/parrot.h:
Make 'PARROT_MAGIC', at least, agree with the '*.pbc' files; although, it's unused and, evidently, useless.
rrot/whiteknight/io_cleanup1: 5a43b68 | jkeenan++ | src/runcore/subprof.c:
[codingstd] Move ASSERT_ARGS to immediately after start of function. ayardley++
rrot/whiteknight/io_cleanup1: 80a0c23 | Whiteknight++ | / (30 files):
Merge branch 'master' into whiteknight/io_cleanup1
rrot/whiteknight/io_cleanup1: f28a4ef | Whiteknight++ | / (8 files):
Add in a new ->set_eof function to the io_vtable. Use that to set the EOF flag at a much higher level, ignoring low-level buffer-initiated reads that pass EOF on the file descriptor.
whiteknight with that last fix, winxed builds from the repo and rosella appears to be building
NotFound whiteknight++ 15:37
whiteknight yeah, Rosella builds and passes all tests 15:39
NQP builds fine. trying Rakudo now 15:50
kjs JimmyZ: ping 15:51
JimmyZ kjs: pong
kjs do you hvae time for a quick test on M1?
JimmyZ kjs: make test? 15:52
kjs Could you run this code through M1?
void main() {
int a, b, c;
a = 1;
b = 2;
}
it segfaults here. if you remove "c" from the list,it's fine. weird. 15:53
JimmyZ kjs: wfm 15:55
kjs it works as shown above?
mm ok. that's good.
JimmyZ kjs: m1 segfault?
kjs yes
i was cleaning up 15:56
i'm unifying pmcs and structs
JimmyZ kjs: oh, I did not update m1
kjs havent committed yet
just found it's segfaulting
could you update and see if it works fo ryou?
JimmyZ kjs: still wfm 15:57
kjs latest commit is: Remove unused code, simplifying assignments.
?
JimmyZ kjs: yes 15:58
kjs ok well then i just introduced the error
i wont commit then
mind you, make test still runs here
it's just the above code.
JimmyZ kjs: yep 15:59
kjs: it outputs 16:00
set_imm I0, 0, 1
set I1, I0, x
set_imm I0, 0, 2
set I2, I0, x
kjs also "compilation done"?
JimmyZ well, several days ago also output I3
kjs: hmm. not done 16:01
kjs what do you mean?
JimmyZ m1: src/gencode.c:167: unfreeze_registers: Assertion `comp->registers[type][regno] == 2' failed.
kjs mmm 16:02
weird
dalek p/toqast: ef4ed30 | jnthn++ | docs/QASTMAP:
Start a list of tasks and design issues related to QAST migration.
p/toqast: 46cf8f8 | jnthn++ | src/PAST/NQP.pir:
Start getting some more of the 6model primitives into the nqp:: namespace.
16:03
p/toqast: bc64ed0 | jnthn++ | src/how/NQP (5 files):
Use nqp::setwho and nqp::newtype.
p/toqast: 01558df | jnthn++ | src/how/NQPClassHOW.pm:
Eliminate a pir::isa usage.
p/toqast: 73ebd23 | jnthn++ | src/stage0/ (8 files):
Update bootstrap.
p/toqast: 777e36f | jnthn++ | src/how/NQPClassHOW.pm:
Tentatively add a way to re-parent a class to NQP's class meta-object, so we'll (hopefully) be able to get Perl 6's meta-objects to say they're ~~ Any.
p/toqast: 0db5015 | jnthn++ | src/ (2 files):
Get NQP to use a BUILDPLAN just like Rakudo does. Improves build methods support also.
p/toqast: fcc9a23 | jnthn++ | src/how/NQPClassHOW.pm:
Implement attribute introspection in the non-:local case.
p/toqast: 4019f2a | jnthn++ | src/NQP/Grammar.pm:
Remove a leftover from the now-gone regex engine.
p/toqast: 32d6401 | jnthn++ | src/ (16 files):
Merge branch 'master' into toqast
JimmyZ sleeps 16:06
dalek : ab0b519 | kjs++ | src/ (7 files):
remove PMC; unify with struct. Fix bug with unused variables.
whiteknight ...and Rakudo builds fine 16:12
dalek : e3056fd | kjs++ | src/ (3 files):
emit a warning about unused variables.
16:14
kudo/nom: 3a0e404 | jnthn++ | docs/ChangeLog:
Add a note on meta-object improvement to ChangeLog.
16:23
: 86d1027 | kjs++ | src/semcheck.c:
check PMCs as if they were structs, since they really are.
16:24
16:28 kjs joined
dalek : 394809c | kjs++ | src/ (3 files):
cleanups.
16:48
: e101e64 | kjs++ | src/semcheck.c:
simplify; use vfprintf().
16:53
16:54 tuxit joined
dalek kudo/toqast: 1891283 | jnthn++ | / (11 files):
Add a qperl6 that can be used to gradually do the QAST migration, while still using the normal compiler to build CORE.setting.
16:58
17:14 zby_home joined
dalek kudo/nom: bd0e5c0 | pmichaud++ | src/core/EnumMap.pm:
Fix EnumMap.perl to use objects typename instead of hardcoded "EnumMap".
17:26
kudo/nom: f798fb1 | pmichaud++ | src/core/Bool.pm:
Fix pre/post-increment/decrement on undefined Bool containers. sisar++ RT #113816
17:52
kudo/toqast: 9914c45 | jnthn++ | src/QPerl6/World.pm:
Correct an outdated comment.
18:02
kudo/toqast: 3b80143 | jnthn++ | src/QPerl6/ (2 files):
Tentatively start to change to PAST::Block into QAST::Block; leave a case where things are a little more invovled. Note, breaks everything. :-)
kudo/toqast: 8a4ca80 | jnthn++ | src/QPerl6/ (2 files):
Translate various PAST::Val to their QAST equivalents; again, a few outliers/tricky cases left for now.
kudo/toqast: d646a75 | jnthn++ | src/QPerl6/ (2 files):
PAST::Stmt/PAST::Stmts to QAST::Stmt/QAST::Stmts, apart from one trickier case.
kudo/toqast: 4dc8dad | jnthn++ | src/QPerl6/ (2 files):
Switch .get_ref calls over to using QAST::WVal.
18:16 benabik joined
dalek kudo/nom: 7d394e2 | moritz++ | src/core/ (3 files):
move succ and pred from Real to Numeric
18:50
18:55 rich joined 19:00 brrt joined 19:15 brrt joined
dalek sella: 3f62546 | Whiteknight++ | s (4 files):
Add in a new Tag.Collection type. Add in some helper methods to get a list of all child nodes with a given name from a Tag or a Collection.
19:55
sella: ae7a3f1 | Whiteknight++ | src/unstable/xml/ (2 files):
New methods to get tags by attribute name/value pair matches, and soem cleanup
20:11 LizM joined
brrt hey, wait, run() is some kind of builtin? 20:12
20:12 LizM joined 20:14 kjs joined
brrt i'm guessing it is, because renaming my function fixes literally everything 20:15
or not 20:19
20:23 birdwindupbird joined 20:34 brrt left 20:40 brrt joined 20:51 LizM_ joined 20:58 LizM joined
dalek d_parrot: 4d20676 | (Bart Wiegmans)++ | / (8 files):
Rename mod_parrot.winxed to echo.winxed, to make its purpose more clear
21:01
d_parrot: cf9c2fd | (Bart Wiegmans)++ | / (13 files):
Inching ever closer to cgi running
21:02 brrt left 21:04 contingencyplan joined
whiteknight brrt: I don't know if run() is a winxed builtin 21:26
23:25 kid51 joined
nopaste "kid51" at 70.85.31.226 pasted "whiteknight/io_cleanup1 branch: failures in t/pmc/filehandle.t" (77 lines) at nopaste.snit.ch/144947 23:27
whiteknight thanks kid51++
moritz whiteknight: src/io/socket.c: In function ‘io_socket_seek’: 23:34
src/io/socket.c:370:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
whiteknight thanks
moritz whiteknight: that's on whiteknight/io_cleanup1 (linux amd64, gcc 4.6.3) 23:35
dalek rrot/whiteknight/io_cleanup1: 9f92b2d | jkeenan++ | src/io/ (3 files):
[codingstd] No semicolons after ASSERT_ARGS(). Add one macro; re-run headerizer. Six files still failing c_function_docs.t.
23:42
nopaste "kid51" at 70.85.31.226 pasted "whiteknight/io_cleanup1 branch: 'make' failures with g++" (8 lines) at nopaste.snit.ch/144948 23:46