Parrot 4.4.0 "Banana Fanna Fo Ferret" | parrot.org | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 12 June 2012.
whiteknight wowsers 00:21
kid51++
Ha! I think I've found my pointer error 00:39
My calculation for the amount of free space in the buffer was wrong, based on the old buffer architecture 00:41
dalek rrot/whiteknight/io_cleanup1: a651df2 | Whiteknight++ | src/io/ (2 files):
Fix my broken calculation for the amount of space in the buffer available for writing. This fixes at least one segfault (maybe more) and at least one broken test.
00:45
whiteknight And as an added bonus, All the extra assertions I jammed in there help with quality assurance
blah 01:07
blah blah blah
our IO PMCs are horribly inconsistent 01:08
$S0 = h.'readline'() 01:09
if h is closed and is a FileHandle, this throws an exception. A closed/disconnected socket returns 0. A closed StringHandle reads like normal
We would expect StringHandle to be usable in place of a FileHandle at least, maybe a socket too. This is extremely useful for testing 01:10
Actually, StringHandle throws an exception before it's been opened the first time, but is perfectly readable after it's been opened then closed 01:11
so that's even better 01:12
Oh, better still! 01:13
the Socket.readline() method returns 0 if the socket is closed, but if you pass a socket to Parrot_io_readline it throws an exception because you cannot readline a socket
so we're at what, 5 completely different behaviors depending on type and state? 01:14
Children, repeat after me while I say the F word
If anybody wonders why I'm rewriting this damned system, this is the reason why 01:15
whatever. Bed. 01:47
02:46 alvis joined
dalek : dea1c43 | jimmy++ | t/fib.m1:
add a fib test
03:06
: c2e1ae2 | jimmy++ | benchmark/fib.m1:
add benchmark/fib.m1
03:23
: 61b19c8 | jimmy++ | t/fib.m1:
change 28 to 22, so when make test, m0 won't hang
03:26
: 80f20fa | jimmy++ | t/fib.m1:
remove debug code
03:29
cotto I lolled then I realized that holy mackerel, there's a fib running on top of M0. jimmyz++ 03:39
03:43 crab2313 joined 03:44 JimmyZ joined
JimmyZ cotto: fib(28) eats all my memory and hangs 03:45
:P
cotto I'm so proud.
c-m0 or p5-m0? 03:46
JimmyZ cotto: c-m0
dalek : 6d544a2 | jimmy++ | src/gencode.c:
reduce allocated memory in M0
05:23
06:04 brrt joined
dukeleto JimmyZ++ # nicely done on fib.m1 06:41
cotto srsly 06:44
07:01 brrt joined 07:30 dngor joined
dalek : e4ece94 | jimmy++ | src/gencode.c:
remove redundant m0 code, and some clean up
07:47
08:19 lucian joined 08:20 kjs joined
kjs dukeleto: ping 08:37
dalek : 1534c85 | kjs++ | / (9 files):
add types to returning values.
08:39
: 93fdf74 | kjs++ | / (3 files):
comment out functions to remove warnings. add a test for returning strings.
: e13af4e | kjs++ | / (3 files):
some cleanup. refactoring. comments.
: 1320284 | kjs++ | / (6 files):
improve return test. improve code slightly.
: 1451181 | kjs++ | src/ (4 files):
cleaning up in the parser a bit. a block isa expression, but only wrap when necessary.
: 1323f0e | kjs++ | / (2 files):
fix a bug. Note to self: don't try to be too cheap with registers.
: 1ace92b | kjs++ | src/gencode.c:
Add some comments to gencode_funcall.
: 41fd16c | kjs++ | / (2 files):
clarify code a bit. clean up test.
: 058ea3e | kjs++ | src/gencode.c:
fix another bug in returning values.
: 462e624 | kjs++ | t/funcall.m1:
add a fancy test file with nested function calls.
: 3e50bc5 | kjs++ | src/gencode.c:
fix a comment.
: 49bc986 | kjs++ | src/gencode.c:
add a few comments.
: bb635e2 | kjs++ | src/gencode.c:
fix conflicts i hope
08:51 szbalint joined
dalek : f6c2295 | jimmy++ | t/return2.m1:
added a new test for return
09:10
: cecf5e4 | kjs++ | src/gencode.c:
remove a line thats commented out.
09:18
10:15 mtk joined 10:22 brrt joined 11:00 brrt left 11:31 preflex_ joined 11:33 JimmyZ joined
kjs hi JimmyZ 11:34
JimmyZ dukeleto, cotto: kjs++ actually
hello kjs
kjs hi there. I had some conflicts this morning, I'm not sure what I did 11:35
but it seems to be fixed now
JimmyZ kjs: yep
kjs did you see anything of that/
JimmyZ kjs: it's trivial ;) 11:36
kjs i didnt' think so :-)
JimmyZ: return2.m1 fails for me, but it's due to the unuse_reg; if i turn that off it works 11:37
JimmyZ kjs: fails for me too. that's why I commit it
kjs ah. I think the TAP protocol has special keywords for that 11:38
like SKIP or something
or TODO
JimmyZ kjs: I'm +1 to TODO
kjs but it's interesting that it fails.
the unuse_reg system is not easy!
JimmyZ: you commented out some code in gencode_return, indicating it was not needed 11:40
JimmyZ kjs: yeah, I wanted revert this commit 11:43
kjs i already fixed it
JimmyZ kjs: but now it's not needed
kjs JimmyZ: I agree there's code generated that shouldn't be there always
but it needs to be fixed in a different way. It's not so important if dead code is generated now. We can optimize that later 11:44
JimmyZ kjs: yeah, I just got confused by the m0 code
kjs it's from the m0_poke_caler exampler 11:45
-r
dalek : 758fb57 | jimmy++ | src/gencode.c:
add more unuse_reg
11:46
JimmyZ kjs: I was a bit discouraged by the fib(28) ;) 11:47
kjs I was ENcouraged!
it worked!
well, fib(22)
that's a good sign, as it's "complex" code 11:48
JimmyZ kjs: yeah, fib(22) was ENcouraged
kjs did you try to run with perl-m0?
JimmyZ kjs: yeah, worse
kjs ha! does fib(28) work in Perl 5 code? 11:49
JimmyZ kjs: fib(28) works when I gave c-m0 1.4G memory 11:50
kjs well it's a lot of m0_chunks I suppose
however, is there no way to take advantage of tail recursion?
JimmyZ kjs: gc_alloc op east many memory 11:51
kjs: perl-m0 didn't seem to work with fib(28)
kjs JimmyZ: I mean, if you calculate fib 28 with perl 5 code 11:52
JimmyZ kjs: but perl-m0 didn't eat memory
kjs not m1 or m0 code, but written in Perl 5
(or perl 6 :-)
JimmyZ kjs: I tried, fib(28) in perl5 is very fast, but fib(35) is not so good ;) 11:53
kjs mm ok. 11:54
well perhaps gerdr-m0 does a better job
i don't know why it is
dalek : da93887 | kjs++ | t/return2.m1:
TODO a test as it doesn't work yet.
11:55
kjs what about parrot?
JimmyZ: I think, not sure, but SKIP and TODO directives only work if you write "not ok" rather than "nok" in the output. 11:56
JimmyZ kjs: parrot is slow, many years ago 11:58
*was
11:59 kid51 joined
kjs but it would run fib(28)? 11:59
JimmyZ kjs: sure 12:00
dalek : 4aebbe9 | jimmy++ | t/return2.m1:
fix test
: 2645b68 | kjs++ | examples/life.m1:
add examples folder. add life.m1. Stolen from Lua distribution. Need to convert into M1.
12:01
: 1b908a4 | jimmy++ | examples/benchmarks/fib.m1:
re-add fib.m1 to benchmarks, I don't know why it lost
12:06
JimmyZ git-- 12:07
kjs JimmyZ: probably my fault
i'm not very handy with git
JimmyZ kjs: git removes without a commit 12:09
kjs I'm using github for mac
as a client
no command line
so i might have messed a few thing up 12:10
dalek : e517f59 | kjs++ | examples/life.m1:
start to convert game of life to M1. Many things to do, and many bugs to fix .
12:11
kid51 kjs: ping 12:13
kjs kid51: pong
kid51: did you get that file you requested? 12:14
kid51 I don't think your attachment made it to github: github.com/parrot/parrot/issues/79...nt-6326104
kjs no i dont know how to attach it. didnt see a button so i replied to the email. didn't that work?
kid51 Apparently not.
kjs will copy paste the contents as a comment? 12:15
kid51 github issues--
kjs *will I ?
kid51 Yes, just paste your comments in the GUI
If you precede the contents of config_lib.pir with 3 backticks
```
and follow them with 3 backticks
```
... your code paste will appear in monospace font. 12:16
kjs at the beginning and end on sep lines?
kid51 IIRC it works either on those lines or before or after those lines.
There is a preview button.
I admit, I don't know how to fix your problem, but seeing the results of configuration might give someone else a clue.
IIRC 2-4 years ago we frequently got 'dyld' configuration errors on Darwin. 12:17
kjs ok the bacticks dont seem to work
ok this doesn't look great. 12:18
kid51 Well, if worse comes to worse, you could send email to parrot-dev with output as attachment. 12:19
Or to me individually, and then I could paste into gui
kjs how long do nopaste snippets hang around?
i could send a link to that
kid51 Several days at least.
Yeah, try that.
kjs aloha, nopaste?
aloha kjs: nopaste is is nopaste.snit.ch (works with the script in $_PARROT/tools/dev/nopaste.pl)
kid51 I'm at YAPC and have to get ready for this day's meetings,
nopaste "kjs" at 89.101.178.50 pasted "no zlib on mac :-(" (293 lines) at nopaste.snit.ch/144067 12:20
kid51 So I'll check in later in the day.
kjs kid51: I commented again with the link 12:21
nopaste.snit.ch/144067?tidy=on&...Format+it!
12:23 crab2313 joined
dalek : d86e4a3 | kjs++ | src/gencode.c:
need to invoke gencode_block() rather than exprlist for if, while and do-while.
12:33
12:43 crab2313 joined 12:51 jashwanth joined 13:09 Psyche^ joined
JimmyZ crab2313: what's your problem? 13:11
crab2313 JimmyZ: m1's Makefile missed a CFLAGS
JimmyZ crab2313: are you on linux? 13:12
crab2313 JimmyZ: yes
JimmyZ: and I try -m32 on a 64-bit machine
JimmyZ crab2313: what CFLAGS?
crab2313 JimmyZ: m1$(EXE):
JimmyZ crab2313: feel free patch it 13:13
crab2313 patch or pull request?
JimmyZ pull request :)
if you like 13:14
13:14 kjs joined, kjs_ joined
dalek website: jharper1++ | Small Progress in Security Sandbox 13:26
website: www.parrot.org/content/small-progre...ty-sandbox
13:46 isBEKaml joined 14:05 whiteknight joined
whiteknight good morning, #parrot 14:05
isBEKaml whiteknight: o/ 14:06
whiteknight hello isBEKaml
isBEKaml high activity on #parrot recently. :)
14:10 dduncan joined
whiteknight yes, it makes me very happy to see so many people hacking 14:20
dalek : 5117a8d | kjs++ | src/gencode.c:
unuse_reg(rhs) is invoked later. Should never be done before the usage of a reg.
14:24
14:27 kjs_ joined 14:28 kjs joined
dalek : 78db1b1 | kjs++ | src/ (3 files):
add a commandline flag for switching off reg. optimizer.
14:29
kjs JimmyZ: I added a "-r" option to switch off unuse_reg(). 14:31
JimmyZ kjs: great
kjs return2.m1 test fails becaus of that I think
so there are some issues with this system. 14:32
dalek : 607010c | kjs++ | src/gencode.c:
refactor common code.
14:44
14:45 isBEKaml_ joined 14:49 mtk joined
dalek : eb72f0a | kjs++ | src/gencode.c:
refactoring of math ops code generation.
14:52
isBEKaml whiteknight: Yes, I'm super stoked to see so much activity on this channel, really. Makes me want to get into something parrot-y tonight. :) 14:53
dalek : aab86a4 | kjs++ | src/gencode.c:
... and actually remove old code.
14:55
whiteknight isBEKaml: please do! 15:02
dalek : 231ea72 | kjs++ | / (2 files):
add a comment to show off use of nested c comments. add a little bit text to design doc.
15:04
: f07569b | kjs++ | src/gencode.c:
small fixes; unuse a reg. and fix a location of a return statement.
15:12
JimmyZ kjs: I wanted to rename use_reg to alloc_reg and unuse_reg to free_reg ;) 15:18
kjs JimmyZ: I'd like to _fix_ use_reg and unuse_reg first :-)
JimmyZ kjs: +1 15:19
kjs ... but if you prefer the name change, by all means, go ahead
JimmyZ kjs: I'm not hurry.
kjs perhaps the system is too buggy. i'm not sure 15:20
return2 test isn't working because of it
JimmyZ kjs: yeah
kjs JimmyZ: also, I've tried return getstring() ; basically, returning the return value of another funtion
and that doesnt work either. not sure if related to usereg system though 15:21
JimmyZ: so the whole function calling, an returning values code seems a bit wonky at the moment.
JimmyZ kjs: yeah, I realized it too. 15:24
kjs: looks like m0 is a blocker now 15:26
kjs JimmyZ: I don't want to blame M0 too quickly... 15:27
it's more than likely that M1 is generating random stuff.
I must admit, I don't fully grasp the function invocation and returning
15:28 kid51 joined
kjs JimmyZ: it's a bit bizarre; sometimes it works, sometimes it doesnt', so it's likely to be a coincidence if it does; apparently, some registers have the right value, and in other cases they dont 15:30
dalek : 21c71fd | jimmy++ | src/gencode.c:
added a unuse_reg
: 8421ee6 | jimmy++ | / (3 files):
Merge branch 'master' of github.com:parrot/m1
15:31
JimmyZ sleeps 15:35
benabik ~~ 15:39
whiteknight hello benabik 15:50
benabik o/ whiteknight
15:56 kid51 joined 15:58 isBEKaml joined 16:07 kid51 joined
dalek : b579c94 | kjs++ | src/ (4 files):
refactoring of chained assignments (a = b = c = 42.)
16:14
kid51 kjs: ping 16:16
kjs kid51: poing
kid51 Is the email address listed for you in CREDITS the best place for you to get mail? 16:17
kjs it's a different one than my "daily" one
but i check it when hacking on parrot related tings
kid51 k
I will send you a diff of my config_lib.pir vs. yours 16:18
kjs ok
kid51 Two different versions of parrot on darwin.
old vs young
But I think you may pick up some things relevant to those config errors/warnings
kjs ok , thanks! 16:19
kid51 I'm at YAPC, so I can't stay continuously on channel here, but I will either send email or post to that ticket.
kjs no rush
hows YAPC?
kid51 mail sent; going to other building now to hear Tom Christiansen (for the first time) 16:23
dalek : 091ec31 | kjs++ | t/assignchain.m1:
add another test to assign chain.
16:33
dukeleto ~~ 16:52
kjs hi dukeleto
dukeleto kjs: howdy! 16:53
kjs how are things
dukeleto kjs: not sure yet. I will tell you after my first cup of coffee :)
kjs :-) 16:54
dukeleto kjs: it is awesome to see all the activity on m1!
kjs dukeleto: Yes I'm quite happy with the progress
dukeleto it is coming along really fast. Awesome to watch.
kjs we're running into some problems now though
and I'm not sure if it's M1 or M0
16:54 dmalcolm joined 16:55 PacoAir joined
kjs function calling and particularly returning values seems to be the most difficult and error-prone part 16:55
dukeleto: I saw you had a "test_suite" branch on M1 16:56
dukeleto kjs: yeah 16:58
kjs: i didn't merge stuff, becaue the tests weren't passing on my machine
17:00 brrt joined
brrt hello! 17:00
dalek : 84972ea | kjs++ | src/semcheck.c:
remove exprlist as it is not necessary.
17:06
benabik Does winxed not support natively typed attributes? 17:08
Hm. Does parrot suppose natively typed attributes? (i.e. non-PMC)
17:09 dngor joined
brrt i have no idea 17:10
try it out
benabik It does not. Sad.
Parrot doesn't, I mean.
brrt makes sense, in a way 17:15
benabik Not really.
brrt its hard to do untyped attributes safely
17:15 jashwanth joined
brrt and if you provide a type, why not make it a full-fledged pmc 17:15
benabik Because a PMC is very heavyweight to store an int. 17:16
brrt has no idea what the size of an pmc is
benabik Well given that the pointer to the PMC is the same size as the integer... 17:17
brrt true enough
Coke this might be possible in a post-6model universe. 17:20
17:34 tuxit joined 17:45 brrt1 joined
cotto ~~ 17:51
17:52 lucian joined
moritz if your write your own PMC in C, then it can be typed 17:52
(I guess that much is obvious)
brrt thats really elegant, writing your pmc in c :-p 17:55
anyway, repeating my incorrectly placed question 17:56
are there any examples of extending classes in winxed?
17:57 whiteknight joined
brrt maybe the riight person to ask... whiteknight, do you know any examples of extending classes in winxed? 17:59
whiteknight What kinds of classes, classes defined in winxed or PMCs defined in parrot core?
brrt defined in winxed 18:00
whiteknight (unfortunately, the two are different subtly)
brrt ... oh, wait
haha, i'd like to extend StringHandle actualloy
but never mind that
whiteknight Do yourself a favor and has-a a StringHandle instead of is-a one
save yourself a lot of hassle 18:01
dalek : 248dec4 | kjs++ | / (3 files):
fix some code on returning. add a test on void return.
brrt alright :-) i'm not so hell-bent on that stringhandle anyway
but suppose I want to extend a winxed-class A with class B
how?
moritz when you talk about "extend", do you mean subclassing? 18:02
brrt .. yes, thats what i mean
whiteknight class Foo : Bar { }
brrt php-lingo eating my brain apparantly 18:03
ok, how do I call a Bar method in Foo?
moritz (it's Moose lingo too)
dalek : e107001 | kjs++ | src/semcheck.c:
return function's return type for funcalls.
18:04
whiteknight brrt: Once you override, you inherit all the same methods and properties 18:05
unless you override a Bar method in Foo, then calling it is a little tricky
There isn't an easy super() yet
brrt ah, i see 18:06
javascript style Bar.<funcname>.apply(self, arguments), does that work?
whiteknight no
not exactly.
brrt ok 18:08
whiteknight I'm looking for an example fo ryou now
you can ask the object for it's Class, and then ask the Class for the parent hierarchy
moritz in nqp you'd do something like pir::find_method(Bar, 'methodname').(self, arg1, arg2)
maybe something like that would work in winxed too? 18:09
whiteknight yeah, that probably would too
brrt thats similar enough
whiteknight I think Winxed could really benefit from a super() method of some variety
brrt oh, by the way 18:10
those pull requests i made, they are probably invalid now?
whiteknight brrt: I'll look at them tonight
brrt no i mean, i don't actually expect them to 'work' 18:11
whiteknight ok 18:12
brrt as i deleted my fork on github and made a new one
i still have the old repositiory 18:13
oh, by the way, you know what we should have?
a search function for docs.parrot.org
moritz brrt: I find a copy of parrot's source and the ack command to be more useful than docs.parrot.org 18:14
PerlJam ack++
moritz a search function might change that
brrt i seriously need to check this ack tool out 18:15
moritz cpanm App::Ack
and then ack 'perlregex' 18:16
brrt great
moritz or ack -Q '$string'
and it skips .git directories for you, for example
PerlJam brrt: I'm shocked that there is someone here who hasn't used ack.
moritz and .svn
PerlJam brrt: shocked I say!
brrt i used grep mostly
and git-grep
moritz well, with grep I always write grep -r 'foo' and then wait for two minutes 18:17
until I notice it tries to read from STDIN, because I forgot the directory name :-)
PerlJam brrt: ack is one of those tools that once you start using it, you wonder how you got along without it.
moritz: that same thing happens to me every time I try to use grep these days 18:18
moritz PerlJam: though it happened even before I knew about ack :-)
PerlJam (in fact, it happened last night before I came to my senses and installed ack on a particular system) 18:19
18:19 brrt1 joined
brrt1 back! 18:20
Coke cannot live without ack, especially on his win7 dev box for work.
moritz can somebody please revive slavorg? I'm tired of playing opbot all the time :-)
brrt1 moritz: i have that very same thing
ooh, that is a nice tool 18:22
whiteknight moritz: do you have any idea who runs slavorg? 18:23
moritz whiteknight: no 18:24
Coke someone will have to dig through the logs, I'm sure someone said it somewhen.
whiteknight well, if we can't fix slavorg, maybe we need to commission a new bot 18:27
Coke parrot: writing new code since 2001, even when we don't have to. ;) 18:28
whiteknight the good thing is that IRC bot software and bot frameworks are already done. All we need is somebody to set one up
18:28 kid51 joined 18:30 Timbus joined
brrt oh another fun question! walking way ahead of myself as usual 18:30
moritz I'm asking the #london.pm folks; they used to have a slavorg instance too 18:31
brrt but is there anyway to both get at and modify the grammars' of compilers from compreg?
moritz compreg($lang).parsegrammar 18:32
or 18:33
compreg($lang).parsegrammar($newgrammar)
brrt ooh, shiny 18:35
18:37 bluescreen joined, slavorg joined
whiteknight that's if the particular compiler has a .parsegrammar method 18:37
winxed is recursive-descent, so you can't really do that
but NQP does have it
moritz well, it works for HLL::Compiler based grammars 18:38
whiteknight right, yes
brrt any idea why i'm asking?
:-)
whiteknight of which NQP was the best example for a while
18:39 slavorg joined
moritz slavorg: trust brrt 18:40
opbots: names 18:41
opbots: trust brrt
hm, works in london.pm, just very, very slow 18:42
slavorg: trust Timbus 18:43
slavorg But I already trust brrt 18:44
But I already trust timbus
moritz slavorg: you are slow 18:45
Coke aloha, slavorg? 18:56
aloha Coke: slavorg is a bit flaky with nickname changes and sometimes needs a good kick
19:00 brrt left
benabik hah 19:01
19:23 dduncan joined
dalek kudo/nom: a3407de | moritz++ | src/core/ (2 files):
generialize cmp candidate from Pair to Enum
19:52
: 61e5ff9 | kjs++ | src/semcheck.c:
minor fixes.
19:55
: be64b4d | kjs++ | src/ (3 files):
allow parsing multi-dim arrays. also fix AST.
19:55 kid51 joined
dalek rrot: 5185a3a | jkeenan++ | lib/Parrot/Pmc2c/Attribute.pm:
This should have been deleted as part of Issue #789.
20:12
Heuristic branch merge: pushed 29 commits to parrot/pmc_emitter_document by jkeenan 20:24
20:25 dduncan joined 20:42 dngor joined
dalek : b6174a5 | kjs++ | src/gencode.c:
need to think a little bit more about multi-dimensional arrays. This commit provides some documentation about how the AST is constructed.
20:56
: 654475b | kjs++ | src/gencode.c:
add a comment about setting pointer to parent in handling indexes..
21:10
21:41 darbelo joined 22:00 kjs joined 23:13 whiteknight joined
whiteknight good evening, #parrot 23:20
Blah. I love it that Parrot_io_socket_handle unconditionally returns 0 to signal failure 23:46
er, I mean success
0 means success, when most other functions use 1 for success and 0 or less for failure 23:47