Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-09-08

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 bacek joined #perl6
00:24 finchely joined #perl6
00:24 eternaleye joined #perl6
00:25 sail0r joined #perl6
00:38 eternaleye joined #perl6
00:52 [particle]1 joined #perl6
01:01 sail0r left #perl6
01:04 * ruoso can't get cmake to produce a debug build
01:05 alanhaggai joined #Perl6
01:26 Auzon joined #perl6
01:26 finchely left #perl6
01:39 ywc joined #perl6
01:41 justatheory joined #perl6
01:45 pugs_svn r22187 | ruoso++ | [smop] array iterator almost working... the return of prefix:<=> needs to be better defined. re set SMOP_LOWLEVEL_MEM_TRACE in cmake and find out that the files .m0ld have many leaks...
01:46 ruoso @tell pmurias, I found out that SMOP_LOWLEVEL_MEM_TRACE was not set in the compiling process... and now I've found a lot of leaks in mold
01:46 lambdabot Consider it noted.
02:11 bacek joined #perl6
02:25 charsbar_ joined #perl6
02:36 jfredett joined #perl6
02:36 a-jing joined #perl6
02:37 a-jing left #perl6
02:42 SamB joined #perl6
02:46 sail0r joined #perl6
02:46 jfredett joined #perl6
03:17 sail0r left #perl6
03:28 ilogger2_ joined #perl6
03:36 awwaiid joined #perl6
04:03 rafl joined #perl6
04:49 cnhackTNT joined #perl6
04:49 cnhackTNT joined #perl6
04:50 pjcj joined #perl6
04:59 rafl joined #perl6
05:04 cnhackTNT joined #perl6
05:05 cnhackTNT joined #perl6
05:24 Psyche^ joined #perl6
05:48 ashizawa joined #perl6
06:02 Southen_ joined #perl6
06:52 ilogger2 joined #perl6
07:06 drbean joined #perl6
07:09 zamolxes joined #perl6
07:14 iblechbot joined #perl6
07:14 pmurias joined #perl6
07:36 barney joined #perl6
07:39 elmex joined #perl6
07:40 BinGOs joined #perl6
07:55 viklund joined #perl6
08:38 Myoma joined #PERL6
08:48 zamolxes joined #perl6
09:53 pmurias joined #perl6
10:06 PZt joined #perl6
10:13 a-jing joined #perl6
10:13 a-jing left #perl6
10:23 baest joined #perl6
10:28 baest joined #perl6
10:35 smg joined #perl6
10:40 wknight8111 joined #perl6
11:15 meppl joined #perl6
11:30 jferrero joined #perl6
11:40 BinGOs joined #perl6
12:01 a-jing joined #perl6
12:01 a-jing left #perl6
12:10 jferrero joined #perl6
12:25 sri_work joined #perl6
12:33 jhorwitz joined #perl6
12:51 Lunchy joined #perl6
13:29 cognominal joined #perl6
13:34 barney joined #perl6
13:46 justatheory joined #perl6
13:49 TJCRI joined #perl6
14:01 clintongormley joined #perl6
14:01 clintongormley left #perl6
14:16 cjfields joined #perl6
14:18 ruoso joined #perl6
14:20 ron joined #perl6
14:20 ruoso pmurias, hi
14:21 ron perl6: my $y = (12, 11, undef, 10).reduce({ $^a + $^b }); say "ok"; say $y;
14:21 p6eval rakudo 30888: OUTPUT[Use of uninitialized value␤ok␤33␤]
14:21 p6eval ..pugs: OUTPUT[ok␤33␤]
14:21 p6eval ..elf 22187: OUTPUT[Useless use of a constant in void context at (eval 121) line 3.␤Useless use of a constant in void context at (eval 121) line 3.␤Use of uninitialized value $Main::b in addition (+) at (eval 121) line 3.␤Use of uninitialized value $Main::a in addition (+) at (eval 121) line
14:21 p6eval ..3.␤Can'...
14:23 ron is rakudo's final conclusion of * 33 * ok ??
14:38 pmurias ruoso: hi
14:40 moritz_ ron: I think it is
14:40 moritz_ ron: it's a good sign that it's the same as pugs' output (even thoug it contains a warning))
14:41 ron you did notice the undef in the list which, I think, * should * at least have issued the warning ...
14:42 moritz_ ron: well, pugs doesn't do any warnings yet, I think
14:43 ron that's right, I am working on 58646 and Failure handling and am wondering if reduce should have returned Failure in some form here.  There is some code for that though it doesn't cover the case just tested ...
14:44 moritz_ ron: I don't think it should. There'a resonable way to define undef+Int, so we shouldn't unnecessarily die
14:44 moritz_ ron: just like in perl 5
14:45 rdice joined #perl6
14:45 ron s/is some/seems to be some/
14:46 moritz_ pmichaud experimented with making those warnings fatal, which broke too much stuff to be pratical
14:47 ron Ok - thx much, I'll move on to other aspects of the problem then ...
14:48 moritz_ ron: if you're working on Failure stuff... it would be nice if $! could be tested for truthness
14:48 moritz_ rakudo: my $x = try { die 1; } say "yes" if ?$x
14:48 p6eval rakudo 30888: OUTPUT[Statement not terminated properly at line 1, near "say \"yes\" "␤␤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)␤]
14:48 moritz_ rakudo: my $x = try { die 1; }; say "yes" if ?$x
14:49 p6eval rakudo 30888: OUTPUT[Null PMC access in can()␤current instr.: 'parrot;Perl6Object;infix:=' pc 37 (src/gen_builtins.pir:45)␤]
14:49 moritz_ rakudo: my $x = try { die 1; }; say "yes" if ?$!
14:49 p6eval rakudo 30888: OUTPUT[Null PMC access in can()␤current instr.: 'parrot;Perl6Object;infix:=' pc 37 (src/gen_builtins.pir:45)␤]
14:49 moritz_ rakudo: my $x = try { die 1; }; say $x
14:49 p6eval rakudo 30888: OUTPUT[Null PMC access in can()␤current instr.: 'parrot;Perl6Object;infix:=' pc 37 (src/gen_builtins.pir:45)␤]
14:49 moritz_ rakudo: my $x = try { die 1; }; say $!
14:49 p6eval rakudo 30888: OUTPUT[Null PMC access in can()␤current instr.: 'parrot;Perl6Object;infix:=' pc 37 (src/gen_builtins.pir:45)␤]
14:49 moritz_ uhm.
14:49 moritz_ rakudo: say "still alive"
14:49 p6eval rakudo 30888: OUTPUT[still alive␤]
14:50 ron I think I have at least part of the solution to the original request on failure changes and will try to look into your concern too ...
14:56 pmurias cycling&
15:16 justatheory joined #perl6
15:25 justatheory joined #perl6
15:31 justatheory joined #perl6
15:37 Exodist joined #perl6
15:44 justatheory joined #perl6
15:51 orafu joined #perl6
15:57 REPLeffect joined #perl6
16:08 zamolxes joined #perl6
16:09 abwesend_ joined #perl6
16:09 abwesend_ left #perl6
16:31 pmurias joined #perl6
16:31 armagad joined #perl6
17:08 ruoso joined #perl6
17:08 meppl good night
17:09 hercynium joined #perl6
17:10 pmurias meppl: good night
17:10 meppl ;)
17:10 ruoso Hello!
17:11 pmurias Hi!
17:19 pmurias ruoso: it is possible to determine a memory leak under ref counting without destroying everything
17:19 ruoso pmurias, I don't think so...
17:20 pugs_svn r22188 | ruoso++ | [smop] avoids stopping to release objects if there is a null constant...
17:21 ruoso pmurias, that's the basic argument against refcounting
17:23 jan_ joined #perl6
17:23 ruoso pmurias, btw... test/31 is leaking only two values... it's probably going to be easier to catch the bug there...
17:25 * pmurias always thought it's disposing of circural references correctly
17:26 pmurias * incorrectly
17:26 pmurias * not dispososing of circural references at all
17:26 ruoso er... we can't have circular references...
17:26 ruoso that's the other basic argument against refcounting...
17:28 pmurias we leak memory when they happen
17:28 ruoso sure, we do...
17:30 ruoso but that's not the case in test/31
17:30 ruoso and I think when we catch that one, the others should become more evident...
17:34 pugs_svn r22189 | ruoso++ | [smop] fix leak in native_int... test/31 no longer leaks, but that means the other leaks are not related to this one.
17:39 ruoso pmurias, one thing I didn't get... did you said that there are circular references in SMOP?
17:40 pmurias no
17:40 ruoso ah... ok
17:40 pmurias i'm not aware of any
17:41 ruoso good...
17:43 justatheory joined #perl6
18:10 TimToady n
18:10 TimToady bleh
18:10 meppl joined #perl6
18:15 pmurias TimToady: what the context of an argument to a multi?
18:16 armagad joined #perl6
18:17 pugs_svn r22190 | ruoso++ | [smop] some code review, trying to hunt down the memory leaks
18:23 zamolxes joined #perl6
18:31 pugs_svn r22191 | ruoso++ | [smop] still trying to find the leak
18:32 ron joined #perl6
18:34 justatheory joined #perl6
18:45 TimToady pmurias: depends on the proto, if any.  when unknown, an argument assumes list context, (more like capture context, really)
18:47 justatheory joined #perl6
18:48 ruoso TimToady, but "capture context" is really "no context", isn't it?
18:51 TimToady more or less
18:51 justatheory joined #perl6
18:52 TimToady except that the capture boundaries are important insofar as a given capture will be bound to a single parameter (in the absence of prefix:<|>)
18:53 TimToady s/single parameter/single scalar parameter/
18:53 TimToady slurpies can pull from multiple captures, of course
18:54 TimToady but given sub foo ($x, *@y) {...}, foo(bar(), baz()) will put all of bar's results into $x
18:54 TimToady even if bar returns a list
18:55 TimToady that's the sense in which capture context is more than "no context"
18:56 ruoso but... is there a way that the return of baz() will be treated as more than one argument?
18:57 ruoso I thought foo(bar(), |baz()) would be needed to provide that behaviour
18:58 TimToady the | there is useless because @y is slurpy
18:58 ruoso o.O
18:59 TimToady a | is useful only for spreading a single capture out over multiple scalar parameters
19:00 ruoso or to turn an object into a list of arguments...
19:00 ruoso foo(|@parameters)
19:00 meppl joined #perl6
19:00 TimToady once you're binding slurpies in list context it doesn't care about capture/list boundaries
19:00 TimToady extension of the p5 notion that () is invisible in list context
19:02 rakudo_svn r30908 | pmichaud++ | [rakudo]: spectest-progress.csv update: 158 files, 3288 passing tests
19:02 zostay joined #perl6
19:02 ruoso pugs: sub foo ($a) {say $a.WHAT}; my @a = (1,2,3); foo(@a)
19:02 p6eval pugs: OUTPUT[Array␤]
19:02 ruoso pugs: sub foo ($a) {say $a[0], $a[1], $a[2]}; my @a = (1,2,3); foo(@a)
19:02 p6eval pugs: OUTPUT[123␤]
19:02 ruoso pugs: sub foo ($a, $b, $c) {say $a, $b, $c}; my @a = (1,2,3); foo(@a)
19:02 p6eval pugs: OUTPUT[*** No compatible multi variant found: "&foo"␤    at /tmp/kEMeQdRpyT line 1, column 57 - line 2, column 1␤]
19:02 ruoso pugs: sub foo ($a, $b, $c) {say $a, $b, $c}; my @a = (1,2,3); foo(|@a)
19:02 p6eval pugs: OUTPUT[*** No compatible multi variant found: "&foo"␤    at /tmp/5Misj5I2ZZ line 1, column 57 - line 2, column 1␤]
19:03 TimToady pugs: sub foo ($a) {say $a[0], $a[1], $a[2]}; foo((1,2,3))
19:03 p6eval pugs: OUTPUT[123␤]
19:03 TimToady pugs: sub foo ($a) {say $a[0], $a[1], $a[2]}; foo(1,2,3)
19:03 p6eval pugs: OUTPUT[*** No compatible multi variant found: "&foo"␤    at /tmp/59vf2YOldf line 1, column 41 - line 2, column 1␤]
19:03 TimToady pugs: sub foo ($a, *@b) {say $a[0], $a[1], $a[2], @b}; foo((1,2,3), (1,2,3))
19:03 p6eval pugs: OUTPUT[123123␤]
19:04 ruoso pugs: sub foo ($a, @b) {say $a[0], $a[1], $a[2], @b}; foo((1,2,3), (1,2,3))
19:04 p6eval pugs: OUTPUT[123123␤]
19:04 TimToady pugs: sub foo ($a, *@b) {say $a[0], $a[1], $a[2], @b}; foo((1,2,3), 1,2,3)
19:04 p6eval pugs: OUTPUT[123123␤]
19:04 TimToady pugs: sub foo ($a, @b) {say $a[0], $a[1], $a[2], @b}; foo((1,2,3), 1,2,3)
19:04 p6eval pugs: OUTPUT[*** No compatible multi variant found: "&foo"␤    at /tmp/Z5DoaKrKQI line 1, column 49 - line 2, column 1␤]
19:04 TimToady slurpy ignores the ()
19:05 ruoso slurpy takes the rest of the positional arguments
19:06 ruoso but there needs to be positional arguments
19:06 TimToady which are scalars, and pay attention to ()
19:07 TimToady once you switch to slurpy, () is ignored
19:08 ruoso but when that relates to foo(bar())
19:08 ruoso bar() is a single positional argument
19:08 TimToady bar returns a capture, so how it gets bound depends on the definition of foo
19:08 TimToady all bar knows by default is that it's returning a capture
19:08 TimToady it doesn't necessarily know whether it will be bound to a scalar or a slurpy
19:09 ruoso sure... but it is a single positional argument anyway
19:09 ruoso prefix:<|> is the thing that does the capture expasion...
19:09 ruoso *expansion
19:09 TimToady it's a single positional argument only when bound to a scalar
19:10 TimToady list context also does capture expansion
19:10 TimToady (but not slice context)
19:13 TimToady anyway, the pugs behavior seems to be correct here
19:13 TimToady (except pugs doesn't implement slice context yet)
19:16 ruoso TimToady, capture seems too magical yet...
19:17 ruoso TimToady, if the user wants to implement a capture type on its own? which API it would need to follow?
19:19 ruoso TimToady, I really can't see how capture gets from this magical state to low-level implementation...
19:21 ruoso pugs: sub foo ($a, *@b) {say $a[0], $a[1], $a[2], @b[0]}; foo((1,2,3), (1,2,3))
19:21 p6eval pugs: OUTPUT[1231␤]
19:24 ruoso pugs: sub foo ($a, *@b) {say $a[0], $a[1], $a[2], @b[0]}; sub bar { (1,2,3) }; foo((1,2,3),bar())
19:24 p6eval pugs: OUTPUT[1231␤]
19:25 TimToady I have no idea what you mean by "magical" here, unless you think pugs is magical somehow...
19:26 TimToady but it's likely that captures are an irreducably fundamental type
19:28 ruoso TimToady, hmm... that's a new assumption...
19:31 ruoso and it can indeed make our life much easier
19:33 eternaleye joined #perl6
19:38 jferrero joined #perl6
19:38 [particle]1 captures have made their way into parrot core, mainly because of this design
19:40 ruoso the problem is the opposite case... when someone wants to use a non-native capture...
19:54 TimToady that's like asking for a non-native version of Lisp's . operator, I suspect
19:54 TimToady or user-defined quarks :)
19:58 hercynium joined #perl6
20:03 ron rakudo: my $x = 1 .. 1; $x.pop; my $y = $x.pop; try {die $!}; say $!; try {die "abc"}; say $!; say "ok"; say $y'
20:03 p6eval rakudo 30912: OUTPUT[Statement not terminated properly at line 1, near "'"␤␤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)␤]
20:04 ruoso TimToady, alright... so "Capture" needs to be renamed to "capture" and promoted to a native type... which is not what's listed on the specs atm
20:04 ron rakudo; my $x = 1 .. 1; $x.pop; my $y = $x.pop; try {die $!}; say $!; try {die "abc"}; say $!; say "ok"; say $y;
20:04 ron rakudo: my $x = 1 .. 1; $x.pop; my $y = $x.pop; try {die $!}; say $!; try {die "abc"}; say $!; say "ok"; say $y;
20:04 p6eval rakudo 30912: OUTPUT[Null PMC access in get_string()␤abc␤ok␤Undefined value popped from empty range␤␤]
20:07 ron working on Failure again ...  Ranges have the new !FAIL technology and gives nice warning messages but am not sure about writing tests that capture and validate the messages ...
20:15 pugs_svn r22192 | ruoso++ | [smop] more plumbing... there was circularity in some code... mold frames now dont add a refcount when it stores itself on its registers..
20:15 * ruoso home &
20:38 Ehtyar joined #perl6
20:39 ron hmm... well I at least have patches that make other builtins behave like range so unless someone will claim I don't understand the area I will post them against the TODO report
20:45 wknight8111 joined #perl6
20:51 rakudo_svn r30914 | julianalbo++ | rename pmc attributes struct from Parrot_<type> to Parrot_<type>_attributes RT#48014
20:54 simcop2387-vnc joined #perl6
21:39 eternaleye joined #perl6
21:45 rakudo_svn r30915 | julianalbo++ | forgot to update perl6 mutable_pmc.template in previous commit
21:56 xinming joined #perl6
22:02 justatheory joined #perl6
22:25 eternaleye joined #perl6
22:30 simcop2387 joined #perl6
22:50 smg joined #perl6
22:58 s1n joined #perl6
23:05 dduncan joined #perl6
23:18 Jedai joined #perl6
23:25 Auzon joined #perl6
23:26 pjcj joined #perl6
23:50 a-jing joined #perl6
23:50 sri_work_ joined #perl6
23:50 a-jing left #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo