Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-07-12

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:22 Sunbeam joined #Perl6
00:45 * avar writes sub postfix: instead of sub suffix: and gets a compilation error
00:45 simcop2387 joined #perl6
01:03 SmokeMachine joined #perl6
01:14 ihrd1 joined #perl6
01:14 tann_ rakudo: my $x = 1..3.pick; say $x; $x = (1..3).pick; say $x;
01:15 p6eval rakudo 02d0ed: OUTPUT«1␤1␤»
01:15 ihrd1 left #perl6
01:15 tann_ rakudo: my Int $x = 1..3.pick;
01:15 p6eval rakudo 02d0ed: OUTPUT«Assignment type check failed; expected Int, but got Range␤in Main (/tmp/OxDd1GvoIZ:2)␤»
01:16 tann_ rakudo: my Int $x = (1..3).pick;
01:16 p6eval rakudo 02d0ed: OUTPUT«Assignment type check failed; expected Int, but got Array␤in Main (/tmp/eH2R05ZDNP:2)␤»
01:16 tann_ rakudo: my Int $x = (1..3).pick.int;
01:16 p6eval rakudo 02d0ed:  ( no output )
01:17 tann_ rakudo: my Int $x = +(1..3).pick;
01:17 p6eval rakudo 02d0ed: OUTPUT«Assignment type check failed; expected Int, but got Num␤in Main (/tmp/tx4EyBLBZV:2)␤»
01:18 tann_ rakudo: my Int $x = +(1..3).pick.int;
01:18 p6eval rakudo 02d0ed:  ( no output )
01:21 tann_ rakudo: my Int $x = (1..10).pick.int; print $x;
01:21 p6eval rakudo 02d0ed: OUTPUT«1»
01:22 tann_ rakudo: my Int $x = (1..10).pick.int; say $x;
01:22 p6eval rakudo 02d0ed: OUTPUT«1␤»
01:22 Ehtyar joined #perl6
01:22 tann_ rakudo: my Int $x = (1..10).pick(*).int; say $x;
01:22 p6eval rakudo 02d0ed: OUTPUT«10␤»
01:23 qwd joined #perl6
01:23 tann_ tann: rakudo: my Int $x = (1..10).pick.shift; say $x;
01:26 tann_ rakudo: my Int $x = (1..10).pick.shift; say $x;
01:26 p6eval rakudo 02d0ed: OUTPUT«7␤»
01:38 ihrd joined #perl6
01:38 ihrd left #perl6
01:57 shinobi-cl left #perl6
02:25 literal so, are Num and Int subsets of Scalar?
02:26 pmichaud afaik, there's not a Scalar type
02:26 pmichaud std:  Scalar
02:26 p6eval std 27507: OUTPUT«ok 00:02 36m␤»
02:26 pmichaud although I could be wrong.
02:27 literal rakudo: my Scalar $foo = 'bar'; say $foo.perl;
02:27 p6eval rakudo 02d0ed: OUTPUT«Malformed declaration at line 2, near "Scalar $fo"␤in Main (src/gen_setting.pm:3340)␤»
02:27 pmichaud oh, sorry, there is one.
02:27 pmichaud It's the Scalar container type
02:27 pmichaud my $x is Scalar;  # example
02:29 literal is there a difference between "my $x is Scalar" and "my Scalar $x" ?
02:31 pmichaud yes.
02:31 pmichaud "my Foo $x"   is the same as "my $x is Scalar of Foo"
02:32 literal ah
02:33 literal hm, does that mean that "my Scalar $x" is the same as "my $x is Scalar of Scalar", or is that impossible?
02:38 pmichaud that's what it would mean, yes.
02:39 pmichaud "my Array @a"  is the same as "my @a is Array of Array"
02:39 literal yeah
02:46 literal hm, Apocalypses and Exegeses are not in the pugs repo
03:03 kst joined #perl6
03:06 pmichaud literal: svn.perl.org/perl6
03:06 literal ok
03:06 pmichaud actually
03:06 pmichaud literal: svn.perl.org/perl6/doc/trunk
03:09 literal there's also a book there which hasn't been moved to the pugs repo
03:14 KyleHa joined #perl6
03:14 KyleHa std: say for 1
03:14 p6eval std 27507: OUTPUT«ok 00:02 36m␤»
03:14 KyleHa rakudo: say for 1
03:14 p6eval rakudo 02d0ed: OUTPUT«say requires an argument at line 2, near "for 1"␤in Main (src/gen_setting.pm:2460)␤»
03:15 KyleHa rakudo: for 1 { say }
03:15 p6eval rakudo 02d0ed: OUTPUT«say requires an argument at line 2, near "}"␤in Main (src/gen_setting.pm:2460)␤»
03:15 KyleHa rakudo: for 1 { .say }
03:15 p6eval rakudo 02d0ed: OUTPUT«1␤»
03:15 KyleHa rakudo: .say for 1
03:15 p6eval rakudo 02d0ed: OUTPUT«1␤»
03:17 KyleHa rakudo: say() for 1
03:17 p6eval rakudo 02d0ed: OUTPUT«say requires an argument at line 2, near " for 1"␤in Main (src/gen_setting.pm:2460)␤»
03:21 pmichaud I think std might actually be wrong with "say for 1"
03:21 pmichaud unless the spec changed again.
03:21 pmichaud std: say
03:21 p6eval std 27507: OUTPUT«ok 00:02 36m␤»
03:21 pmichaud hmmm.
03:21 pmichaud std:  say()
03:21 KyleHa I'm looking at this:  http://rt.perl.org/rt3/Tic​ket/Display.html?id=61494
03:21 p6eval std 27507: OUTPUT«ok 00:02 36m␤»
03:22 pmichaud rakudo:  say  for 1
03:22 p6eval rakudo 02d0ed: OUTPUT«Could not find non-existent sub for␤»
03:22 pmichaud that's the bug that masak++ is referring to.
03:22 KyleHa So with the extra space, it gives the wrong error message and the "extra argument" message is correct?
03:23 KyleHa If that's it, I'll write a test for it.
03:23 pmichaud std:  print
03:23 p6eval std 27507: OUTPUT«ok 00:02 36m␤»
03:23 pmichaud iirc, both "say" and "print" require an argument.
03:23 pmichaud with the extra space, you're correct -- Rakudo gives the wrong error message.
03:24 pmichaud the "say requires an argument" message is what it should be generating
03:24 KyleHa Okeydoke.
03:33 KyleHa Where would a test for that go?  8-)
03:34 KyleHa S02-whitespace_and_comments looks kinda right, but the tests in there are unrelated.
03:37 kane_ joined #perl6
03:44 alester joined #perl6
03:47 frew_ joined #perl6
03:48 mepplock joined #perl6
03:52 justatheory joined #perl6
03:56 pugs_svn r27508 | kyle++ | [t/spec] Test for RT #61494
04:06 synth joined #perl6
04:09 drbean_ joined #perl6
04:16 pugs_svn r27509 | kyle++ | [t/spec] Test for RT #61500
04:21 sri_kraih joined #perl6
04:26 nihiliad1 joined #perl6
04:31 Khisanth joined #perl6
05:02 justatheory joined #perl6
05:15 frew_ joined #perl6
05:34 mikehh joined #perl6
05:34 kate21de joined #perl6
05:36 tann joined #perl6
05:39 mikehh joined #perl6
05:45 mikehh joined #perl6
06:07 tann hola
06:08 tann rakudo:  for 1..10 { my @a = 1..5; my $i = (0..4).pick; say $i; }
06:08 p6eval rakudo 02d0ed: OUTPUT«3␤2␤4␤4␤2␤4␤4␤1␤4␤0␤»
06:08 araujo hola
06:08 tann rakudo: for 1..10 { my @a = 1..5; my $i = (0..4).pick; @a[$i,@a.end] = @a[@a.end,$i]; say @a.perl }
06:08 p6eval rakudo 02d0ed: OUTPUT«[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤»
06:09 tann that's just aweful :)
06:09 tann i'm not sure if it's a bug or that's how it's supposed to work?
06:10 tann the former shows $i is randomly picked
06:10 tann the latter shows that $i is fixed (methinks, a range object)
06:27 bpetering joined #perl6
06:34 araujo rakudo: my %h = { 'foo' => 'bar' }; for %h.keys -> $k { say "$k => %h{$k}"; }
06:34 p6eval rakudo 02d0ed: OUTPUT«foo => %hfoo␤»
06:34 araujo bug?
06:34 lisppaste3 bpetering pasted "Getting Started with Perl 6 on Windows" at http://paste.lisp.org/display/83450
06:37 cbk_ araujo: maybe like this?
06:37 cbk_ araujo: maybe like this?
06:37 cbk_ araujo: maybe like this? my %h = { 'foo' => 'bar' }; for %h.keys -> $k { say $k => %h{$k}; }
06:37 cbk_ rakudo: my %h = { 'foo' => 'bar' }; for %h.keys -> $k { say $k => %h{$k}; }
06:37 p6eval rakudo 02d0ed: OUTPUT«foo        bar␤»
06:37 araujo mmm
06:38 araujo I thinkn that's actually different?
06:42 frew_ joined #perl6
06:49 tann rakudo: my %h = (foo => 'bar'); for %h.keys -> $k { say "$k => {%h{$k}}" }
06:50 p6eval rakudo 02d0ed: OUTPUT«foo => bar␤»
06:51 tann araujo: but it's better just do for %h.kv -> $k, $v { say "$k => $v" }
06:51 araujo oh, i see
06:52 araujo tann, so, this is how it is intended to work?
06:52 tann rakudo: my %h = (foo => 'bar'); for %h.kv -> $k, $v { say "$k => $v" }
06:52 p6eval rakudo 02d0ed: OUTPUT«foo => bar␤»
06:52 tann araujo: yes
06:52 araujo I see
06:53 tann araujo: interpolation nows strictly for scalars...if you want to evaluate something, put it inside the curly brackets
06:53 araujo ah , so, only scalars can be interpolated?
06:53 tann yes
06:53 araujo I mean, without curly
06:54 araujo right
06:54 tann correcto
06:54 * araujo was just checking some rakudo examples and found this
06:54 tann rakudo: say "me can do math {2 * 3 + 4}"
06:54 p6eval rakudo 02d0ed: OUTPUT«me can do math 10␤»
07:00 eternaleye_ araujo: It's specced that arrays interpolate with a final [], but Rakudo doesn't do it currently
07:00 eternaleye_ perl6: my @a = 1,2,3; say "@a"; say "@a[]";
07:00 jauaor joined #perl6
07:00 p6eval elf 27509, rakudo 02d0ed: OUTPUT«@a␤@a[]␤»
07:00 p6eval ..pugs: OUTPUT«@a␤1 2 3␤»
07:01 eternaleye_ Here, Pugs is correct
07:01 araujo pelr6: my %h = { 'foo' => 'bar' }; for %h.keys -> $k { say "$k => %h{$k}"; }
07:03 tann eternaleye_: did you see my earlier whining?
07:03 eternaleye_ araujo: Typo in 'pelr6:'
07:03 araujo perl6: my %h = { 'foo' => 'bar' }; for %h.keys -> $k { say "$k => %h{$k}"; }
07:03 tann methinks, it's quite treacherous thing
07:03 p6eval pugs: OUTPUT«foo => bar␤»
07:03 p6eval ..rakudo 02d0ed: OUTPUT«foo => %hfoo␤»
07:03 p6eval ..elf 27509: OUTPUT«$k => %h{$k}␤»
07:03 araujo mm.. pugs got it
07:04 tann pugs: for 1..10 { my @a = 1..5; my $i = (0..4).pick; say $i; }
07:04 p6eval pugs: OUTPUT«0␤0␤1␤4␤3␤1␤4␤1␤2␤1␤»
07:04 araujo :P
07:05 tann pugs: for 1..10 { my @a = 1..5; my $i = (0..4).pick; @a[$i,@a.end] = @a[@a.end,$i]; say @a.perl }
07:05 p6eval pugs: OUTPUT«\(1, 2, 3, 5, 4)␤\(1, 2, 3, 5, 4)␤\(5, 2, 3, 4, 1)␤\(5, 2, 3, 4, 1)␤\(1, 2, 3, 4, 5)␤\(1, 2, 3, 4, 5)␤\(1, 2, 3, 4, 5)␤\(1, 2, 3, 5, 4)␤\(5, 2, 3, 4, 1)␤\(1, 2, 3, 5, 4)␤»
07:05 eternaleye_ tann: I don't think I understand what the second snippet with $i does
07:05 tann swapping positions of two elements in the array
07:07 tann eternaleye_: i think it's a rakudo bug
07:07 tann pugs seems to understand it a bit though not random enough
07:09 eternaleye_ tann: Actually, it's exacxtly random -  if $i and @a.end are equal, no swap occurs!
07:09 eternaleye_ *exactly
07:10 tann eternaleye_: supposedly so, but rakudo seems to think that it's a range object
07:10 eternaleye_ This happened to occur 3 times, but may occur differently on subsequent runs
07:11 tann eternaleye_: it always occurs that way because rakudo seems to interpret it .pick with 1 (ie. the size of the set pick returns)
07:11 eternaleye_ tann: I was meaning that Pugs's answer was ideally correct - I agree Rakudo is incorrect here. I was disputing your statement that Pugs' answer was insufficiently random
07:12 ihrd joined #perl6
07:12 eternaleye_ rakudo: for 1..10 { my @a = 1..5; my $i = (0..4).pick.shift; @a[$i,@a.end] = @a[@a.end,$i]; say @a.perl }
07:12 tann eternaleye_: hence, *seems* :)  'cause i didn't sufficiently have enough runs :)
07:12 p6eval rakudo 02d0ed: OUTPUT«[1, 2, 3, 5, 4]␤[1, 2, 3, 4, 5]␤[1, 2, 3, 4, 5]␤[1, 2, 3, 4, 5]␤[5, 2, 3, 4, 1]␤[5, 2, 3, 4, 1]␤[5, 2, 3, 4, 1]␤[5, 2, 3, 4, 1]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤»
07:13 eternaleye_ tann: I think the bug may be that .pick _should_ return a capture and is returning an Array instead
07:13 tann eternaleye_: yes, .shift coerces
07:14 tann eternaleyes_: the spec says .pick returns *a selection* of randomly picked items....not sure if "a selection" should always be an array?
07:14 tann eternaleye_: methinks, *a selection* means a list?
07:15 tann if it is, then the last value of the list should be assigned to the scalar instead?
07:15 eternaleye_ phenny: tell pmichaud It seems .pick is returning an Array rather than a List/Capture - 'rakudo:  for 1..10 { my @a = 1..5; my $i = (0..4).pick; @a[$i,@a.end] = @a[@a.end,$i]; say @a.perl }' gives a result which indicates to me that $i is being given the result of '+@( (1..4).pick )' (ie, 1)
07:15 phenny eternaleye_: I'll pass that on when pmichaud is around.
07:17 eternaleye_ tann: a selection should be a List, which is essentially a Capture - but a single-item capture in item context returns its item, not a one-item array
07:17 tann eternaleye_: ok, thanks.
07:19 tann was hacking an in-place quicksort and that .pick trick took me a while to trace :(
07:20 eternaleye_ phenny: tell pmichaud Actually, $i is most likely getting a 1-item Array object containing a random value, and its use in scalar context is yielding the 1
07:20 phenny eternaleye_: I'll pass that on when pmichaud is around.
07:22 eternaleye_ phenny: tell pmichaud Also, to correct my earlier typos: s/1..4/0..4/; s/scalar/item/
07:22 phenny eternaleye_: yeah, sure, whatever
07:23 eternaleye_ I was not aware phenny++ had knowledge of sarcasm
07:23 eternaleye_ Probably set for < 30s between messages
07:26 ihrd left #perl6
07:29 xinming joined #perl6
07:30 jauaor joined #perl6
07:30 Su-Shee joined #perl6
07:30 Su-Shee good morning, future.
07:34 tann Su-Shee: 'mornin
07:35 xinming_ joined #perl6
07:37 araujo rakudo: say "Squares: {map {$_ * $_}, 1 .. 10}";
07:37 p6eval rakudo 02d0ed: OUTPUT«Squares: 1 4 9 16 25 36 49 64 81 100␤»
07:42 tann rakudo: say <lesnar mir fedor>.pick;
07:42 p6eval rakudo 02d0ed: OUTPUT«fedor␤»
07:42 tann what a smart cookie!
07:47 iblechbot joined #perl6
07:50 xinming joined #perl6
07:52 nacho__ joined #perl6
08:06 jauaor joined #perl6
08:53 barney joined #perl6
08:59 kate21de1 joined #perl6
09:13 Chillance joined #perl6
09:14 agentzh left #perl6
09:26 M_o_C joined #perl6
09:36 sri_kraih joined #perl6
09:51 agentzh joined #perl6
09:53 mikehh joined #perl6
09:58 iblechbot_ joined #perl6
10:11 DemoFreak joined #perl6
10:18 ejs joined #perl6
11:00 icwiener joined #perl6
11:38 rff joined #perl6
11:46 ilogger2 joined #perl6
11:51 pugs_svn r27510 | kyle++ | [t/spec/TODO] Note recent change to filetests
11:51 Whiteknight joined #perl6
11:57 masak joined #perl6
11:58 lucs joined #perl6
11:58 masak good news, and yet another indication of my own incompetence: the trouble I've been having with smoking November on feather seems to have been due to old .pir files. now everything works.
12:17 fridim_ joined #perl6
12:53 riffraff joined #perl6
13:16 masak quiet here today.
13:17 masak this trick worked in late 2008: http://perlbuzz.com/2008/12/database-acce​ss-in-perl-6-is-coming-along-nicely.html
13:17 masak does it still work? is anyone using databases from Perl 6?
13:20 Su-Shee no. this is until today the only example I know anyway.
13:20 masak exactly. it's a bit curious, I think.
13:21 masak anyway, there's a DBDI.pm in ext/SQLite3/
13:21 masak I'll try the snippet and see how far I get.
13:23 Su-Shee yes. that's the example I mention sometimes.
13:23 Su-Shee it's also the "wrap lib x in parrot and wrap this into perl6" example.
13:24 masak I'd like to do that with a number of libraries.
13:24 payload joined #perl6
13:26 masak the script, somewhat predictably, does not work.
13:27 masak for one, it has a redeclaration of $stm, but that's only a warning.
13:27 Su-Shee sooner or later it has to be done; what's perl without bindings to the usal libs?
13:27 masak but then it dies in DBDI::Driver::SQLite3
13:28 masak Su-Shee: I'm getting interested again, now that I'm to draft an MVC framework for the Web.pm project.
13:28 payload joined #perl6
13:29 Su-Shee masak: it's not just databases - what about ssl, for example?
13:29 masak right.
13:29 Su-Shee masak: compression libs, crypto libs...
13:29 pmichaud good morning, #perl6
13:29 phenny pmichaud: 07:15Z <eternaleye_> tell pmichaud It seems .pick is returning an Array rather than a List/Capture - 'rakudo:  for 1..10 { my @a = 1..5; my $i = (0..4).pick; @a[$i,@a.end] = @a[@a.end,$i]; say @a.perl }' gives a result which indicates to me that $i is being given the result of '+@( (1..4).pick )' (ie, 1)
13:29 phenny pmichaud: 07:20Z <eternaleye_> tell pmichaud Actually, $i is most likely getting a 1-item Array object containing a random value, and its use in scalar context is yielding the 1
13:29 phenny pmichaud: 07:22Z <eternaleye_> tell pmichaud Also, to correct my earlier typos: s/1..4/0..4/; s/scalar/item/
13:29 masak pmichaud: \o
13:30 pmichaud (known bugs :-)
13:30 Su-Shee masak: and we haven't even started yet with gtk or tk or qt or wx or a perl6 version of perlmagick..
13:31 masak Su-Shee: much to do.
13:32 Su-Shee indeed.
13:32 masak lurkers: it would be very cool to see a proof-of-concept of Perl 6 talking to some windowing lib. just so you know.
13:32 Su-Shee masak: and all not simple tasks "let's do it this weekend as a first time project"
13:32 masak yes, true.
13:33 Su-Shee masak: I _think_ someone popped up an SDL window..
13:33 masak oh, nice.
13:33 pmichaud masak: Tene's been working on one in #parrot the past couple of days.
13:33 masak pmichaud: cool!
13:33 masak Tene++
13:34 pmichaud he has parrot popping up a dialog box, even :-)
13:34 Su-Shee I think, that's what I read.
13:59 alester joined #perl6
14:03 last joined #perl6
14:09 FurnaceBoy joined #perl6
14:09 * masak just filled in the GSoC mid-term mentor survey
14:15 rfordinal joined #perl6
14:15 nihiliad joined #perl6
14:16 masak ok, next line of inquiry: can we agree on a good plan to make this code work? http://gist.github.com/145647
14:17 masak in Perl 5, pack is List-->Str and unpack is Str-->List, yah?
14:17 masak will those be List-->Buf and Buf-->List, respectively, in Perl 6?
14:19 masak if so, I guess, the (~$/) term will have to be encoded (did I get that right this time?) as a Buf in the first arg to the unpack call.
14:20 pmichaud can't it be done using sprintf or .fmt instead, though?
14:20 masak hm. maybe.
14:20 pmichaud I'd think something like
14:21 pmichaud $/.bytes.map( { .fmt("%02d") } )
14:21 pmichaud oops
14:21 pmichaud $/.bytes.map( { .fmt("%02x") } )
14:21 masak erm, .bytes returns a number.
14:21 pmichaud where ".bytes" is whatever encoding is to be done
14:21 pmichaud right
14:22 masak did you mean .encode?
14:22 pmichaud yeah
14:22 masak yes, that's probably a way to move forward.
14:22 masak thanks.
14:22 pmichaud or even
14:22 pmichaud $/.encode(...)>>.fmt("%02x")
14:22 masak yes. :)
14:22 pmichaud of course, that means we need Buf to work :-|
14:23 masak all the ingredients are there, it's just a matter of implementing it, I think.
14:23 masak I can give it a shot.
14:23 pmichaud my rakudo day has been shot -- I have to shuttle wife+kids to camp (wife's car isn't working properly this morning)
14:36 * masak looks in t/spec for any Buf tests
14:40 masak StephenPollei: is that Lojban in t/spec/S02-builtin_data_types/declare.t? :)
14:42 masak how does one match against the parameter of parametrized type? can I write @a ~~ Array[Int] and have it DWIM?
14:47 masak I got many comments on http://use.perl.org/~masak/journal/39236 , to my delight. one of them stands out as especially interesting: http://use.perl.org/comments​.pl?sid=43314&amp;cid=69402
14:48 masak as far as I know, we have a 'system default encoding' in Perl 6. one is not always forced to specify an encoding.
14:48 masak are we sure we're not making a design mistake there?
14:50 rfordinal left #perl6
14:59 Su-Shee left #perl6
15:05 cls_bsd joined #perl6
15:10 finanalyst joined #perl6
15:11 amoc joined #perl6
15:12 Jedai joined #perl6
15:16 ejs joined #perl6
15:20 kane_ joined #perl6
15:22 pmichaud masak: iirc, TimToady++ has been saying something like "UTF-8 in the west" and "UTF-16 in the east"  or something like that
15:22 pmichaud I don't know that there's a a system default encoding beyond that
15:23 masak how will an instance of Rakudo know whether it's in the east or in the west?
15:24 pmichaud masak: I don't know.  ENOSPEC :-)
15:24 pmichaud anyway, at the moment Rakudo defaults to utf-8
15:25 masak oki.
15:25 masak I'm in the process of adding a Buf type to Rakudo, just to see how far I get on my own.
15:27 pmichaud I'll be eager to see that.
15:28 masak also, I noticed that pun had broken down due to fixes to Rakudo's .eof behaviour.
15:28 masak so I'm fixing that. :)
15:30 iblechbot joined #perl6
15:31 finanalyst joined #perl6
15:37 eternaleye_ masak: re DBDI, wasn't davef working on translating JDBC?
15:37 masak no idea.
15:38 eternaleye_ masak: (yesterday):davef
15:38 eternaleye_ trying to translate JDBC API to P6 as a starter for the new DBI. Working my way through the errors/warnings trying to get a clean run for Tim.
15:39 eternaleye_ Seems like he might be the one to talk to
15:39 masak ah, right. now I remember.
15:40 masak yes, I'd be glad to discuss solutions with davef.
15:44 jferrero joined #perl6
15:52 explorer joined #perl6
15:52 spx2 joined #perl6
15:52 masak rakudo: sub foo() {}; foo("bar"); say "alive"
15:52 p6eval rakudo 02d0ed: OUTPUT«alive␤»
15:52 masak is that right, I wonder?
15:53 pmichaud No, it's wrong.
15:53 pmichaud It's a parrot bug.
15:53 masak :/
15:53 pmichaud Parrot doesn't do argument checking on subs that have no parameters.
15:54 eternaleye_ roadtrip &
15:59 rfordinal joined #perl6
15:59 rfordinal left #perl6
15:59 masak what's the values of $?ENC and $?NF ?
16:05 Psyche^ joined #perl6
16:14 mdxi joined #perl6
16:15 pmichaud afk # roadtrip
16:20 masak phenny: tell pmichaud this is how far I got: http://gist.github.com/145678 -- when running this on t/spec/S32-str/encode.t, I get "Method 'decode' not found for invocant of class 'Perl6Buf'", which makes me think I've gone wrong somewhere.
16:20 phenny masak: I'll pass that on when pmichaud is around.
16:26 justatheory joined #perl6
16:50 desertm4x joined #perl6
16:57 desertm4x Hi! I've got a question regarding setters. I can't figure out how to override a default setter. Is it as simple as creating a method that has the same name as the attribute?
17:03 ruoso joined #perl6
17:12 moritz_ oh hai
17:14 ruoso heya!
17:24 drusepth joined #perl6
17:30 masak joined #perl6
17:30 masak desertm4x: yes.
17:31 masak moritz_: greetings!
17:31 pugs_svn r27511 | moritz++ | [t/spec] tests for Array.rotate
17:31 moritz_ hi masak, how was/is the weekend?
17:32 pugs_svn r27512 | moritz++ | [t/spec] lists in scalar context become Capture
17:32 pugs_svn r27513 | moritz++ | [t/spec] split(..., :all)
17:32 pugs_svn r27514 | moritz++ | [t/spec/TODO]  jnthn++ and masak++ wrote some of those tests, remove from TODO
17:32 masak moritz_: still ongoing :)
17:32 pugs_svn r27515 | moritz++ | [t/spec] simplified and corrected split.t
17:32 pugs_svn r27515 | moritz++ |
17:32 pugs_svn r27515 | moritz++ | It remains to be seen how much it is a now a duplicate of split-simple.t, or
17:32 pugs_svn r27515 | moritz++ | vice versa
17:32 pugs_svn r27516 | moritz++ | [t/spec] test $obj.*@candidates
17:32 pugs_svn r27517 | moritz++ | [t/spec] more .rotate tests
17:33 fridim_ joined #perl6
17:36 masak moritz_: seems yours was productive. :P
17:37 moritz_ masak: the train travels were, yes
17:40 dalek rakudo: 38a7fea | moritz++ | src/setting/List.pm:
17:40 dalek rakudo: List.rotate
17:40 dalek rakudo: Don't know if that should go into Any or List, the current spec situation is
17:40 dalek rakudo: ... "suboptimal"
17:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​8a7fea4cbbd6c48b3e62cdb5ee7e790bea0a70b
17:40 dalek rakudo: 08928df | moritz++ | t/spectest.data:
17:40 dalek rakudo: [t/spectest.data] run split.t; restore alphabetical order
17:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​8928df70e4af4013eb0bfde02256262728ecf6e
17:40 dalek rakudo: d6f9537 | moritz++ | src/setting/Any-str.pm:
17:40 dalek rakudo: :all flag for Str.split
17:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​6f9537bf5c7777a5c58558d7d0d0c6dd2297a52
17:40 dalek rakudo: 4403ec7 | moritz++ | t/spectest.data:
17:40 dalek rakudo: test Array.rotate
17:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​403ec7476a630fc92cce9e1d057174e2396e964
17:40 masak moritz_: whoa. moritz_++
17:40 masak moritz_: if you have time, you could help me by explaining why, after applying http://gist.github.com/145678, the file t/spec/S32-str/encode.t gives "Method 'decode' not found for invocant of class 'Perl6Buf'"
17:42 moritz_ masak: why do you need all that P6META magic?>
17:42 moritz_ I mean you could simply declare a whole new class in Perl 6, no?
17:42 masak moritz_: yes, you might be right. I'll try that next.
17:43 moritz_ anyway, I'll play a bit with your patch, maybe I find somethiing useful
17:44 moritz_ I think the one non-trivial thing about Buf's will be to make the IO operations accept then without decoding to Str first
17:44 masak I have to drop offline again; we're watching Harry Potter here. feel free to apply the patch if you get it to work.
17:45 moritz_ have fun!
17:45 masak thanks! :)
17:47 Jedai joined #perl6
17:49 ilogger2 joined #perl6
17:53 payload joined #perl6
18:12 nihiliad joined #perl6
18:14 fridim__ joined #perl6
18:15 ruoso mildew: say "Hello evalbot!"
18:15 p6eval mildew: OUTPUT«Use of uninitialized value $profile in string eq at mildew line 295.␤Use of uninitialized value $profile in string eq at mildew line 295.␤Hello evalbot!␤»
18:16 pugs_svn r27518 | ruoso++ | [re-mildew] fix warning on line 295
18:31 masak joined #perl6
18:34 tann joined #perl6
18:39 kidd_ joined #perl6
18:42 * ruoso just sent a proposal on the 'overriding methods declared by roles' issue...
18:42 explorer joined #perl6
18:46 moritz_ ruoso++
18:46 xinming_ joined #perl6
18:48 ruoso I think that solves a bit the problem, since roles that degenerate to interfaces still don't require any additional keyword
18:49 moritz_ aye
18:49 moritz_ I don't like the 'augment method' though
18:49 moritz_ hm
18:49 ruoso you don't like the keyword or the concept?
18:49 moritz_ the keyword
18:50 moritz_ thinking a bit more about it, it's exactly the thing we do for classes
18:50 moritz_ so not too bad
18:50 ruoso yeah... that's what I thought
18:51 moritz_ glad to see that TimToady++ re-thought the file test thing
18:51 masak when does one use 'augment method' and when 'supersede method'?
18:52 Tene masak: Yes, I have Parrot talking to a gui lib
18:52 masak Tene: wootness.
18:52 ruoso masak, see my last post to p6l
18:52 masak ruoso: aye, I will.
18:52 Tene masak: I wrapped Elementary, one of the Enlightenment libraries.
18:52 masak Tene: I think you should blog about it, unless you already have.
18:53 Tene masak: I was planning on adding some OO to it first.
18:53 Tene masak: there are some significant issues about putting any real effort into it, though...
18:54 masak oki, your choice. just pointing out that what you have already is blog-worthy.
18:54 Tene 1) Not exactly commonly installed or convenient to build.  It's fairly experimental, even for the Enlightenment folks
18:54 Tene 2) It randomly segfaults on startup, in the library parts, not Parrot.
18:55 masak moritz_: I arrived at a much smaller, cleaner patch thanks to your tip. pushing it now.
18:55 Tene However, I did get callbacks working.
18:55 masak Tene: sounds very promising.
18:55 Tene and I trust you much more than myself about what's blog-worthy.
18:56 * moritz_ sees that masak++ is No. 2 to on the ironman feed list, and wonders if that's sorted by frequency, or ranking somehow
18:56 masak moritz_: URL?
18:56 masak oh, that list.
18:56 masak it might be that I was among the first to apply.
19:00 moritz_ anyway, with parrot HEAD the spectests are much cleaner now
19:00 masak moritz_: oh, and your tests in t/spec/S32-str/encode.t are nice and all, but I made 5 out of 7 pass by letting .encode return [] and .decode ""
19:00 masak :P
19:00 moritz_ "Non-zero wait status: 6" twice
19:01 masak I think we need more tests.
19:01 * masak writes some more tests
19:01 moritz_ and two infinite recursion cases
19:02 Tene masak: oh, and the wrapped lib is usable from all of the HLLs.
19:02 masak Tene: handy.
19:02 moritz_ masak: uhm, what did you do to eqv to make that work=
19:02 moritz_ s/=/?/
19:02 masak moritz_: Buf does Positional
19:02 dalek rakudo: 0bca00c | masak++ |  (3 files):
19:02 dalek rakudo: implemented skeletal Buf type
19:02 dalek rakudo: The current implementation does not do anything useful, it just
19:02 dalek rakudo: adds stubbed .encode and .decode methods to Str and Buf, respectively.
19:02 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​bca00c45869ba2e67625733d05c3e5e712b1991
19:03 moritz_ masak: bah, you're evil
19:03 moritz_ making it return an empty list...
19:04 masak moritz_: :>
19:04 moritz_ so only the tests fail that do a sting comparison
19:04 masak aye.
19:04 masak fixing that now.
19:04 moritz_ maybe it should even be 'does Positional[Int]' if Rakudo can handle that
19:06 tann p6eval: .say for 10..1;
19:07 moritz_ rakudo: .say for 10..1
19:07 p6eval rakudo 08928d:  ( no output )
19:07 moritz_ 10..1 is an empty range
19:07 tann pugs: .say for 10..1;
19:07 p6eval pugs:  ( no output )
19:07 masak rakudo: class Blargh does Positional[Int] { }
19:08 p6eval rakudo 08928d:  ( no output )
19:08 masak moritz_: good idea. I'll add that.
19:09 moritz_ rakudo: class A does Positional[Int]; my $x = A.new; $x.push: 5; say $x;
19:09 p6eval rakudo 08928d: OUTPUT«Method 'push' not found for invocant of class 'A'␤»
19:09 moritz_ rakudo: class A does Positional[Int]; my $x = A.new; $x[0] = 5; say $x
19:09 p6eval rakudo 08928d: OUTPUT«elements() not implemented in class 'A'␤in Main (/tmp/6En0Vwxzrf:2)␤»
19:09 moritz_ rakudo: class A does Positional[Int]; my $x = A.new; $x[0] = 5; say "alive"
19:09 funky left #perl6
19:09 p6eval rakudo 08928d: OUTPUT«elements() not implemented in class 'A'␤in Main (/tmp/xKfxmyyh1m:2)␤»
19:09 tann moritz_: so how can i go *backward*? ie. 10..1
19:10 masak moritz_: you don't get .push or .[] just because you do Positional...
19:10 moritz_ tann: it's supposed to be 10..1:by(-1), but it's not yet implemented
19:10 moritz_ masak: sure I get []
19:10 Whiteknight joined #perl6
19:10 moritz_ masak: the question is where it stores it
19:10 tann pugs: .say for 10..1:by(-1);
19:10 p6eval pugs: OUTPUT«*** ␤    Unexpected ":by"␤    expecting "_", fraction, exponent, term postfix or operator␤    at /tmp/FQcLffNzNb line 1, column 15␤»
19:10 moritz_ uhm, I mean I should get it
19:10 masak moritz_: then that's a bug? the 'elements' thing?
19:11 moritz_ not 100% sure
19:11 moritz_ S02 says "The C<Positional>
19:11 moritz_ role implies the ability to support C<< postcircumfix:<[ ]> >>."
19:11 tann rakudo: for 1..10 { my @a = 1..5; my $i = (0..4).pick; @a[$i,@a.end] = @a[@a.end,$i]; say @a.perl }
19:11 moritz_ that's a bit vague, I'd say
19:11 p6eval rakudo 08928d: OUTPUT«[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤[1, 5, 3, 4, 2]␤»
19:11 tann moritz_: seems like a bug in rakudo
19:12 masak moritz_: aye
19:12 moritz_ rakudo: my @a = 1..5; for 1..10 { my $i = (0..4).pick; @a[$i,@a.end] = @a[@a.end,$i]; say @a.perl }
19:12 p6eval rakudo 08928d: OUTPUT«[1, 5, 3, 4, 2]␤[1, 2, 3, 4, 5]␤[1, 5, 3, 4, 2]␤[1, 2, 3, 4, 5]␤[1, 5, 3, 4, 2]␤[1, 2, 3, 4, 5]␤[1, 5, 3, 4, 2]␤[1, 2, 3, 4, 5]␤[1, 5, 3, 4, 2]␤[1, 2, 3, 4, 5]␤»
19:13 moritz_ tann: agreed; care to submit a bug report?
19:13 moritz_ rakudo: say my $i = (0..4).pick; say $i.perl
19:13 p6eval rakudo 08928d: OUTPUT«2␤[2]␤»
19:13 moritz_ uhm.
19:13 moritz_ tann: maybe not a bug...
19:13 pugs_svn r27519 | masak++ | [t/spec/S32-str] fudged encode.t for Rakudo
19:13 pugs_svn r27519 | masak++ |
19:13 pugs_svn r27519 | masak++ | Also added two tests to check against a vacuous Buf implementation.
19:14 moritz_ tann: if it returns an array, it's always 1 in numeric context
19:14 tann moritz_: should be a list instead of an array?
19:14 tann pugs: for 1..10 { my @a = 1..5; my $i = (0..4).pick; @a[$i,@a.end] = @a[@a.end,$i]; say @a.perl }
19:14 p6eval pugs: OUTPUT«\(1, 2, 5, 4, 3)␤\(1, 2, 3, 4, 5)␤\(1, 5, 3, 4, 2)␤\(1, 2, 3, 5, 4)␤\(5, 2, 3, 4, 1)␤\(5, 2, 3, 4, 1)␤\(5, 2, 3, 4, 1)␤\(1, 2, 5, 4, 3)␤\(1, 2, 3, 5, 4)␤\(1, 2, 3, 4, 5)␤»
19:14 moritz_ maybe it should be a scalar instead of a container of scalars
19:15 tann moritz_: pugs seems to get it right
19:15 moritz_ S32 says "Due to the normal semantics of returning a C<Capture>, a pick of a
19:15 moritz_ single element may be used as an item without requiring C<.[0]>."
19:15 moritz_ ok, rakudo doesn't do captures
19:16 masak nor Parcels.
19:16 * moritz_ sees no Parcel in the spec
19:16 masak it's from a future spec. :P
19:16 tann moritz_: if it's not a bug in rakudo, it can be quite an outrageous feature that breaks lots of code :)
19:17 frettled joined #perl6
19:17 masak rakudo: say 4[0]
19:17 p6eval rakudo 08928d: OUTPUT«Method 'postcircumfix:[ ]' not found for invocant of class 'Int'␤»
19:17 masak rakudo: say 4.list[0]
19:17 moritz_ tann: ok, it's a bug ;-)
19:17 p6eval rakudo 08928d: OUTPUT«4␤»
19:18 masak tann: if you want something backwards-compatible (which works after the correct behaviour is implemented), you can do @a.pick.list[0]
19:19 tann masak: yes, me aware of that
19:20 dalek rakudo: d9bf358 | masak++ | t/spectest.data:
19:20 dalek rakudo: [spectest.data] added t/spec/S32-str/encode.t
19:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​9bf35808efdbf5590f56bdba9b4451bcc7151aa
19:20 tann masak: the problem is in the spec, there's an example along the line "if  you really want a random integer, you probably need my $n = (1..100).pick;"
19:21 masak what's problematic about it?
19:22 tann masak: and i follow that to pick a random index for my quicksort pivot which actually turns out to be an array obj...and when used as an array index, it hideously screws up my quicksort  :)
19:22 masak tann: welcome to the world of development on top of Rakudo.
19:22 masak if you don't like workarounds, it's going to be a bumpy ride. :)
19:23 |Jedai| joined #perl6
19:23 moritz_ tann: I'm working on a fix
19:23 masak moritz_++
19:24 tann masak: was trying to demonstrate some cool stuff in p6 in my blog .... and in this instance, the new shiny .pick .... but unfortunately, hasn't worked yet :(
19:24 tann moritz_: mucho gracias!
19:24 tann now i can finish my blog :)
19:24 masak ...post.
19:25 * masak has a pet peeve
19:25 moritz_ masak: only one? ;-)
19:25 masak :P
19:25 tann masak: don't let it shorten your longevity
19:26 masak oh, surely not. sour people are better conserved.
19:26 moritz_ tann: bah, it's not that easy...
19:26 moritz_ I thought that I could just return a single element from .pick()
19:26 moritz_ but that trips up another test
19:26 masak interesting. which one?
19:26 moritz_ which tests that [[1,2],[3,4]] does not flatten
19:27 masak ah, of course.
19:27 masak spectests++
19:27 tann spec says .pick returns a "selection" .. ie. list/capture  or array?
19:28 moritz_ rakudo: for 1..5 { say [[1, 2], [3, 4]].pick.perl }
19:28 p6eval rakudo 08928d: OUTPUT«[[1, 2]]␤[[1, 2]]␤[[3, 4]]␤[[3, 4]]␤[[3, 4]]␤»
19:28 masak std: Selection
19:28 p6eval std 27519: OUTPUT«Undeclared name:␤      Selection used at 1 ␤ok 00:02 36m␤»
19:28 moritz_ tann: a capture, I'd presume
19:28 moritz_ rakudo: for 1..5 { say [[1, 2], [3, 4]].pick(*).perl }
19:28 p6eval rakudo 08928d: OUTPUT«[[1, 2], [3, 4]]␤[[3, 4], [1, 2]]␤[[1, 2], [3, 4]]␤[[3, 4], [1, 2]]␤[[3, 4], [1, 2]]␤»
19:29 masak moritz_: wow, that could make for a good rap song generator.
19:29 moritz_ I don't understand that... with my local patch it also says [[1, 2], [3, 4]] or [[3, 4], [1, 2]]
19:29 moritz_ then why does test 15 fail?
19:30 masak rakudo: for 1..3 { .say for ['funk that woozy', 'whoz da op?'].pick(*) }
19:30 p6eval rakudo 08928d: OUTPUT«whoz da op?␤funk that woozy␤funk that woozy␤whoz da op?␤whoz da op?␤funk that woozy␤»
19:30 masak yo.
19:31 moritz_ lol
19:31 moritz_ uhm
19:31 moritz_ I was looking at the wrong test
19:32 moritz_ masak: care to look at test 14?
19:32 moritz_ erm, 15
19:32 moritz_ ok ?([[1, 2], [3, 4]].pick.[0].join('|') eq any('1|2', '3|4')), '[[1,2],[3,4]].pick does not flatten';
19:32 moritz_ is that .[0] actually correct?
19:32 moritz_ I mean if it returns a single item
19:32 masak well, the item is an Array...
19:32 moritz_ then it should just be .pick.join('|')
19:32 masak oh. yes.
19:33 moritz_ so, test FAIL, patch WIN?
19:33 pmurias joined #perl6
19:33 pmurias ruoso: hi
19:33 masak seemingly.
19:36 tann moritz_: looks like a bogus test
19:36 pugs_svn r27520 | moritz++ | [t/spec] extended and corrected pick.t
19:37 moritz_ I think it's from the time before we had the explicit Capture return
19:37 tann ah...
19:37 tann time to recompile :)
19:37 * moritz_ just pushed
19:37 dalek rakudo: f55d489 | moritz++ | src/builtins/any-list.pir:
19:37 dalek rakudo: make one-item List.pick() return a scalar
19:37 dalek rakudo: Ideally this should always return a capture, which behaves like its payload if
19:37 dalek rakudo: it only stores a single scalar. Since we don't have captures at the moment,
19:37 dalek rakudo: this seems to be a sensible workaround for people using the result of
19:37 dalek rakudo: @numbers.pick as array index.
19:37 dalek rakudo: tann++ for bringing this to our attention again.
19:37 tann kudos to moritz_, the man
19:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​55d489c146e7153be8d2432cc739bfbc8448349
19:38 masak $moritz_.push($kudos)
19:39 * moritz_ bows
19:39 tann $moritz_.push($RAkudos)
19:40 moritz_ http://dotnetmasters.com/historyofcfamily.htm btw, nice read
19:40 moritz_ while writing this patch I found my PIR to be rather rusty
19:40 payload i have a  sub foo($a, $b)  .... can i pass a  @x = 1,2  so that  $a = 1 and $b = 2  ? like the python    foo(*array)   ?
19:41 moritz_ I needed about 6 recompiles until I got the Perl 6 equivalent of @result == 1 ?? @result[0] !! @result working
19:41 moritz_ payload: foo(|@x)
19:41 payload ah thx
19:42 * moritz_ noticed he just hilighted payload in that commit message ;-)
19:42 szabgab joined #perl6
19:43 payload rakudo: my @x = 2,5; say "moufoo".substr(|@x)
19:43 p6eval rakudo 08928d: OUTPUT«ufoo␤»
19:43 payload rakudo: my $x = [2,4]; say "moufoo".substr(|$x)
19:43 p6eval rakudo 08928d: OUTPUT«ufoo␤»
19:44 payload rakudo: say "moufoo".substr(|(2,3))
19:44 p6eval rakudo 08928d: OUTPUT«ufo␤»
19:46 tann "C# is introduced as part of the release version of Microsoft .NET. C++ developers on the Microsoft platform rejoice over the concept of “managed code”, which means they finally receive the same automatic memory management features that Visual Basic has had since 1991 and Java has had since 1995."  and perl 1987? :)
19:46 araujo hah
19:47 moritz_ and lisp since...
19:49 payload before 0 i think
19:50 payload rakudo: say time
19:50 p6eval rakudo f55d48: OUTPUT«1247428209.46307␤»
19:50 moritz_ rakudo: say Temporal.new
19:51 p6eval rakudo f55d48: OUTPUT«Null PMC access in getprop()␤in Main (src/gen_setting.pm:3340)␤»
19:51 moritz_ .oO( ... )
19:51 moritz_ rakudo: say Nonexistant.new
19:51 p6eval rakudo f55d48: OUTPUT«Could not find non-existent sub Nonexistant␤»
19:51 SmokeMachine joined #perl6
19:51 moritz_ rakudo: say non-existent.new # lame, I know
19:51 p6eval rakudo f55d48: OUTPUT«Could not find non-existent sub non-existent␤»
19:53 tann rakudo: my @a = 1..5; @a.rotate(2); say @a.perl;
19:53 moritz_ tann: p6eval doesn'T like the bold markers
19:54 moritz_ rakuO: my @a = 1..5; say @a.rotate(2).perl
19:54 tann moritz_: uh oh...didn't know i just committed a sin :)
19:54 moritz_ rakudo: my @a = 1..5; say @a.rotate(2).perl
19:54 p6eval rakudo f55d48: OUTPUT«[3, 4, 5, 1, 2]␤»
19:54 moritz_ tann: not a sin, it just didn't match ^rakudo:
19:59 tann moritz_: should there be a visible link to rt on rakudo.org? or that  would just lead to too many bogus tickets?
20:00 moritz_ tann: id would not, since you can't submit throug the web interface anyway ;-)
20:01 moritz_ anyway, if you tell me which page it would fit on I can add it
20:01 tann oh man, submitting rakudo bugs is so unix-like :)
20:02 tann moritz_: methinks, "how to help" (or possibly "project status")?
20:03 payload rakudo: "foo".match(/bar/).perl.say;$/.perl.say;
20:03 p6eval rakudo f55d48: OUTPUT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ ast  => "",␤ Str => "",␤ from => 3,␤ to   => -2,␤)␤undef␤»
20:04 payload not the correct result i think
20:04 moritz_ payload: what woulc you have expected?
20:04 payload should be from => 0, to => 0    and maybe   $/   should contains the same instead of being undef ?
20:05 moritz_ from => 0, to => 0 could be successful zero-width match
20:05 moritz_ anything evaluation to False in boolean context is allowed, afaict
20:06 payload but what does from => 3, to => -2 tell me?
20:08 moritz_ nothing interesting
20:10 tann rakudo: my @a = 1,2,3; say @a.perl; my @b = [1,2,3]; say @b.perl; say @b[0].perl;
20:10 p6eval rakudo f55d48: OUTPUT«[1, 2, 3]␤[[1, 2, 3]]␤[1, 2, 3]␤»
20:11 tann should @b.perl shows [[1, 2, 3]]?
20:11 moritz_ yes
20:11 tann oh, it does
20:11 moritz_ because you store an array in the first item
20:11 tann need new glasses
20:13 nbrown joined #perl6
20:15 icwiener_ joined #perl6
20:34 payload rakudo: my $m = "foo".match(/o/);$m.perl.say;$/.perl.say;
20:34 p6eval rakudo f55d48: OUTPUT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ ast  => "o",␤ Str => "o",␤ from => 1,␤ to   => 2,␤)␤undef␤»
20:34 payload rakudo: my $m = "foo" ~~ /o/;$m.perl.say;$/.perl.say;
20:34 p6eval rakudo f55d48: OUTPUT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ ast  => "o",␤ Str => "o",␤ from => 1,␤ to   => 2,␤)␤Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ ast  => "o",␤ Str => "o",␤ from => 1,␤ to   =>
20:34 p6eval ..2,␤)␤»
20:35 payload match doesnt set $/... i have to find the spec for that
20:36 moritz_ S05 probably, either way
20:37 kate21de joined #perl6
20:40 tann_ joined #perl6
20:41 payload i think the match method isnt specced
20:41 moritz_ see http://perlcabal.org/syn/S05.html#Substitution
20:46 payload it's not specced and not tested that the match method should not set $/
20:47 moritz_ so let's get some spec clarification, shall we?
20:47 payload yes ^^
20:47 payload but i think the current behaviour is wrong
20:47 payload it should set $/
20:51 moritz_ mail sent.
20:56 kate21de1 joined #perl6
21:04 nihiliad joined #perl6
21:04 dukeleto joined #perl6
21:22 Jedai joined #perl6
21:24 mtkatwork joined #perl6
21:24 mtkatwork left #perl6
21:27 nacho__ joined #perl6
21:29 ruoso moritz_, just replied to your message...
21:29 * ruoso .oO( is using twitter too much, now he thinks that should notify people after sending a message )
21:35 nbrown_ joined #perl6
21:35 payload "notify people after sending a message" sounds like xmpp
21:36 payload is there twitter to xmpp stuff? ^^
21:42 ruoso payload, surprisingly, even if twitter is itself implemented over XMPP technology, it doesn't expose itself via XMPP
21:43 ruoso which is a shame, since if it was the XMPP federation would allow a lot of nice things to happen
21:43 ruoso but otoh wouldn't force everyone to use their crappy service...
21:44 * ruoso considered re-implementing what twitter does by adhering to XMPP as-is
21:44 * ruoso thought, otoh, that it would be too much work for too few benefits
21:46 skids joined #perl6
21:55 explorer joined #perl6
22:03 nbrown joined #perl6
22:05 broquaint joined #perl6
22:07 tann_ rakudo: my @a = 1..5; @a.delete(3); say @a.perl;
22:07 p6eval rakudo f55d48: OUTPUT«Null PMC access in isa()␤in method Any::map (src/gen_setting.pm:191)␤called from method List::perl (src/gen_setting.pm:939)␤called from Main (/tmp/y5mpTXjJ4S:2)␤»
22:08 tann_ moritz_: ^^ not yet implemented?
22:09 moritz_ tann_: no, bug.
22:09 tann_ pugs: my @a = 1..5; @a.delete(3); say @a.perl;
22:09 p6eval pugs: OUTPUT«\(1, 2, 3, undef, 5)␤»
22:09 moritz_ (and I think it's known already)
22:10 moritz_ http://rt.perl.org/rt3/Tic​ket/Display.html?id=67446
22:10 tann_ rakudo: my @a = 1..5; @a.splice(3.1); say @a.perl;
22:10 p6eval rakudo f55d48: OUTPUT«[1, 2, 3, 4]␤»
22:11 moritz_ 3.1?
22:11 tann_ guess: offset, length :)
22:11 tann_ like p5 :)
22:11 moritz_ with ., not , ?
22:12 tann_ oopsie
22:13 tann_ rakudo: my @a = 1..5; @a[2].delete; say @a.perl;
22:13 p6eval rakudo f55d48: OUTPUT«Method 'delete' not found for invocant of class 'Int'␤»
22:13 tann_ pugs: my @a = 1..5; @a[2].delete; say @a.perl;
22:13 p6eval pugs: OUTPUT«*** Argument is not a Hash or Array element or slice in delete: VInt 3␤    at /tmp/LpwgxwPJrp line 1, column 15-27␤»
22:14 ihrd joined #perl6
22:15 davef joined #perl6
22:15 pmichaud hello
22:15 phenny pmichaud: 16:20Z <masak> tell pmichaud this is how far I got: http://gist.github.com/145678 -- when running this on t/spec/S32-str/encode.t, I get "Method 'decode' not found for invocant of class 'Perl6Buf'", which makes me think I've gone wrong somewhere.
22:15 s1n pmichaud: where in the spec is the best place to find WALK details?
22:16 moritz_ s1n: S12
22:16 s1n moritz_: thanks
22:16 moritz_ pmichaud: I think you can safely ignore masak's message, he already pushed a version that doesn't suffer from that problem
22:17 pmichaud moritz_: okay, ignoring.  :-)
22:17 moritz_ pmichaud: btw with rakudo master and parrot HEAD I'm down to 4 four failures in 'make spectest'
22:17 pmichaud moritz_: yes, and I know the cause (and fix) for two of them.
22:17 moritz_ two are non-zero wait status
22:17 pmichaud As soon as my spectest finishes here I should be able to fix the other two.
22:17 moritz_ and two are infinite recursions
22:17 ihrd left #perl6
22:17 pmichaud (the infinite recursions are the ones I'm fixing)
22:18 moritz_ ok
22:18 moritz_ btw I get the same error both on gcc-4.3 and on clang HEAD
22:18 pmichaud the non-zero wait status ones aren't easily fixed -- they have to do with exception issues in Parrot, I think.
22:22 payload rakudo: my $_ = [1,2,3,4]; .[0..^*/2].say; .[*/2..^*].say;
22:22 p6eval rakudo f55d48: OUTPUT«12␤34␤»
22:22 payload rakudo: my $_ = [1,2,3,4,5]; .[0..^*/2].say; .[*/2..^*].say;
22:22 p6eval rakudo f55d48: OUTPUT«123␤345␤»
22:22 moritz_ somehow your code really looks scary ;-)
22:23 payload ^^
22:24 payload maybe it's too late to think well but how do i split an array into halfs?
22:24 pmichaud depends on how you want a odd-element array to split
22:24 payload without overlapping
22:24 moritz_ payload: basically like you did, but adding an .int
22:25 pmichaud keep in mind that rakudo's ranges don't always handle * correctly
22:25 pmichaud (bare *, that is)
22:26 moritz_ or go to */2 -1 instead of ^*/2
22:26 pmichaud or just use splice.
22:26 moritz_ anyway, bed time for me, see you all tomorrow
22:27 dukeleto joined #perl6
22:28 payload oh yes
22:28 payload splice looks nicer
22:28 payload */2-1 works also
22:29 payload but  i don't know where to spam  .int ^^
22:31 payload argh damn
22:31 payload splice is destroying
22:32 pmichaud true, it does modify the array.
22:32 pmichaud I would guess    [0..(*/2).floor]  and  [(*/2).floor^..*]
22:33 pmichaud although rakudo will probably have a little difficulty with ..* in the latter.
22:34 payload yes it has... i will use   .elems for now
22:52 ihrd joined #perl6
22:52 ihrd left #perl6
23:13 dalek rakudo: d153cdc | pmichaud++ | src/classes/Num.pir:
23:13 dalek rakudo: Clean up Num.succ and Num.pred, which were infinite looping.
23:13 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​153cdc8ab1df98df276d55bca8ca002251a206e
23:13 dalek rakudo: 4024702 | pmichaud++ | build/PARROT_REVISION:
23:13 dalek rakudo: Bump PARROT_REVISION to take advantage of latest gc cleanups.
23:13 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4​0247027b8d418df485c51a683e5ab7193c36dc7
23:15 s1n what is a Selector?
23:17 s1n WALK's :omit and :include take a Selector, is that a regex? the example uses $?CLASS though

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

Perl 6 | Reference Documentation | Rakudo