Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-02-22

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:50 Limbic_Region joined #perl6
01:02 zophy joined #perl6
01:03 zophy joined #perl6
01:06 zophy joined #perl6
01:16 justatheory joined #perl6
01:35 zophy joined #perl6
01:45 araujo joined #perl6
01:56 cspencer joined #perl6
01:58 aindilis` joined #perl6
02:11 cspencer_ joined #perl6
02:23 cognominal joined #perl6
02:26 Tene_ joined #perl6
02:32 cognominal joined #perl6
02:38 Psyche^ joined #perl6
02:41 shinobi-cl left #perl6
02:43 cspencer joined #perl6
02:49 justatheory joined #perl6
02:51 aindilis joined #perl6
03:27 shinobi-cl joined #perl6
03:32 wknight8111 joined #perl6
03:38 alester joined #perl6
03:59 pugs_svn r25485 | putter++ | [elfparse] Regexp aggregation optimization exists.  Still quite slow and big.
04:16 zophy joined #perl6
04:18 zophy joined #perl6
04:45 Casan joined #perl6
04:47 s1n1 joined #perl6
04:47 MrKrueger joined #perl6
04:54 xuser joined #perl6
05:02 dukeleto joined #perl6
05:40 s1n2 joined #perl6
05:46 aindilis` joined #perl6
05:50 s1n1 joined #perl6
05:59 MrKrueger goodnight
05:59 MrKrueger goodn ight
05:59 MrKrueger good night
06:07 justatheory joined #perl6
06:33 xinming_ joined #perl6
06:50 s1n1 pmichaud, jnthn: make sure you guys check for pull requests
06:50 abra joined #perl6
06:51 s1n1 left #perl6
07:12 shinobi-cl left #perl6
08:25 cotto joined #perl6
08:28 drbean joined #perl6
09:03 xinming joined #perl6
09:05 bacek joined #perl6
09:20 barney joined #perl6
09:22 mberends joined #perl6
09:43 mikehh cotto over in #parrot has a patch for rakudo - http://nopaste.snit.ch/15695
09:44 mikehh I applied it and make test passes and make spectest looks good so far
09:50 viklund joined #perl6
09:50 viklund @seen masak
09:50 lambdabot I saw masak leaving #perl6 14h 32m 11s ago, and .
09:58 bacek cotto++
10:03 mikehh t/spec/S29-list/reverse.rakudo                               (Wstat: 0 Tests: 50 Failed: 15)
10:03 mikehh Failed tests:  1, 3-4, 6-8, 11-14, 38-39, 41, 44-45
10:04 mikehh All the other spectest's pass
10:04 mikehh It takes forrrreverrrr
10:04 mikehh Files=314, Tests=9254, 1379 wallclock secs (10.10 usr  2.45 sys + 2390.08 cusr 131.14 csys = 2533.77 CPU)
10:07 viklund joined #perl6
10:10 DemoFreak joined #perl6
10:19 bacek commit f7c0c0bcc9543117160b0607c8f380da5dff904c
10:19 bacek Author: Moritz Lenz <moritz@faui2k3.org>
10:19 bacek Date:   Thu Feb 19 23:09:29 2009 +0100
10:19 bacek move Str.reverse to setting/
10:19 bacek
10:19 bacek I have no idea why reverse($str) still works, but it does.
10:19 bacek Its actually not quite true.
10:24 iblechbot joined #perl6
10:24 M_o_C joined #perl6
10:30 abra joined #perl6
10:30 bacek moritz_: you Str.reverse broke spectest.
10:33 bacek moritz_: it should be 'is export()' and "join('')".
10:35 pmurias joined #perl6
10:40 bacek perl6: say "abc".split.reverse.join
10:40 p6eval pugs: OUTPUT«abc␤»
10:40 p6eval ..elf 25485: OUTPUT«Use of uninitialized value $_[1] in regexp compilation at ./elf_h line 121.␤Use of uninitialized value $sep in join or string at ./elf_h line 187.␤cba␤»
10:40 p6eval ..rakudo f23eda: OUTPUT«No applicable methods.␤␤current instr.: 'parrot;P6metaclass;dispatch' pc 109 (src/classes/ClassHOW.pir:85)␤»
10:41 bacek perl6: say "abc".split('').reverse.join
10:41 p6eval pugs: OUTPUT«cba␤»
10:41 p6eval ..rakudo f23eda: OUTPUT«c b a␤»
10:41 p6eval ..elf 25485: OUTPUT«Use of uninitialized value $sep in join or string at ./elf_h line 187.␤cba␤»
10:56 ejs joined #perl6
11:20 |MoC| joined #perl6
11:48 drbean purl: default_view is also 'TT'
11:49 drbean Oops.
12:08 alexn_org joined #perl6
12:25 masak joined #perl6
12:31 masak hello #perl6, you wonderful channel you!
12:34 mikehh joined #perl6
12:51 Aisling joined #perl6
12:54 fridim_ joined #perl6
13:30 Whiteknight joined #perl6
13:32 dalek rakudo: 2a2293d | (Carl Masak)++ | src/pmc/perl6str.pmc:
13:32 dalek rakudo: applied patch to fix recent change in string.pmc
13:32 dalek rakudo: After recent String ATTR conversion by cotto, the Rakudo build started
13:32 dalek rakudo: segfaulting on some systems. This patch, also by cotto++, unbreaks the build.
13:32 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​a2293ddf562d29246b3d1567728eae959004227
13:33 jnthn cotto++
13:35 masak jnthn: OH HAI
13:41 jnthn masak: HAI
13:44 jnthn masak: BTW that patch probably means we now only work with Parrot's since the change.
13:44 jnthn So perhaps need to bump PARROT_REVISION?
13:44 * masak could not parse that
13:44 masak "work with Parrot's"?
13:44 jnthn ...
13:44 jnthn Parrots
13:44 jnthn fail
13:44 jnthn :-)
13:44 masak did Rakudo ever work with other animals?
13:45 jnthn :-P
13:45 masak no, seriously. I don't understand what it is you're saying.
13:46 jnthn The point is that the PARROT_REVISION file that gives the revision of Parrot that we grab for people who do configure with --gen-parrot likely needs updating now.
13:46 masak ok.
13:46 jnthn Because that patch fixes us to work with revisions of Parrot since the change that broke things.
13:46 masak I know nothing about the file, the config flag, or the need for such an update. :)
13:46 masak but feel free to fix.
13:46 jnthn Aye, thus why I'm mentioning it. ;-)
13:47 masak thanks. :)
13:47 jnthn Sure, will do. Just so you know for the future. :-)
13:47 masak aye.
13:53 * jnthn builds and tests against latest Parrot revision just to be sure.
14:04 rindolf joined #perl6
14:05 jnthn Heh, the svn up of the spectests is where I notice I had a couple of uncomitted unfudges...
14:06 masak heh
14:12 jnthn Tests looking good so far. :-)
14:16 jnthn Hmm. Fail in num/sqrt.t
14:18 jnthn And it log.t and in list reverse.
14:18 jnthn I can believe some of them are Win32-specific, but not list reverse.
14:20 masak failed 15/50 seubtests in S29-list/reverse
14:20 jnthn Aye
14:20 jnthn Ah
14:21 jnthn moritz moved it to the setting
14:21 masak otherwise, fine.
14:21 jnthn OK, then sqrt and log are Win32 nasties.
14:22 dalek rakudo: 1533598 | jnthn++ | build/PARROT_REVISION:
14:22 dalek rakudo: Bump Parrot revision up, now we support new String PMC.
14:22 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​533598a3e6e7de844a8fdb1aa280d6ee08e9a36
14:22 icwiener joined #perl6
14:24 masak so, just to clarify: the PARROT_VERSION thing says 'download this particular version of Parrot if using the parrot-inside-rakudo setup, because it's the one last known to work', yes?
14:24 masak s/one last/last one/
14:24 jnthn Yes.
14:24 jnthn As far as I understand it. ;-)
14:25 jnthn Str.reverse fixed.
14:25 masak nice.
14:26 dalek rakudo: 2a9382c | jnthn++ | src/setting/Str.pm:
14:26 dalek rakudo: Fix Str.reverse that was added to setting.
14:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​a9382caec8e887e979c2320cc72873ac44d628e
14:27 * jnthn afk for a bit
14:33 mikehh joined #perl6
14:42 masak all spectests pass here.
14:46 mikehh I am building on AMD64 platform now - ok on i386
14:50 simcop2387 joined #perl6
14:51 ejs joined #perl6
14:58 Guest3744 joined #perl6
14:58 Guest3744 hola
14:58 Carlos alguna chica kiere hablar¿
15:00 Guest93012 left #perl6
15:02 masak Guest93012: Este canal es de alrededor de Perl 6. Prueba #chicas-que-kiere-hablar.
15:03 * skids wonders if "perl6" means anything in -- what was that portuguese?
15:03 masak Spanish, I think.
15:03 skids Oh, well bad spanish.  Yeah I guess.
15:06 skids Maybe we need to teach evalbot to hablar con los lonely hombres.
15:14 mberends masak: you're even more of a cunning linguist than I had thought
15:14 masak no, just using Google Translate.
15:15 mberends cunning
15:16 mberends quo vadis proto?
15:18 masak it vadis fairly well, I guess.
15:18 jeremiah_ joined #perl6
15:18 masak I pushed a few changes just a couple of hours ago.
15:18 masak other than that, I haven't touched it.
15:19 meppl joined #perl6
15:19 masak viklund++ used proto to install November on feather this morning, and found a number of deficiencies that need addressing. I threw him a commit bit, but I think he ran out of tuits in the meantime.
15:19 mberends ook, I'll pull the the updates in soon. let me know about the deficiencies. is it ready for a bash -> perl5 migration?
15:20 mberends keyboad--
15:20 mberends (blame the hardware)++
15:21 masak mberends: bash->perl5: definitely ready. there's nothing holding it back.
15:22 masak question is: which one do we want to do first: the migration, or a cleanup of the env var/.bash_profile mess?
15:23 mberends probably migration first, that may inherently help the cleanup
15:23 masak aye.
15:23 masak sounds good.
15:23 masak for the cleanup, I think we should go with a config file that's generated the first run of proto.
15:23 mberends agreed
15:23 masak so proto runs for the first time, sees that there's no config file, generates one and exits.
15:24 masak the config file should be filled with sane defaults.
15:24 s1n jnthn: ping, did you see my pull request?
15:24 masak that way, the user won't be hurt if she just re-runs proto without caring about the config file.
15:26 mberends ideally proto would have options to maintain the config, without asking the user to edit said file
15:27 mberends a 'proto help' would be nice, and a 'proto menu'
15:29 masak I think I'm leaning towards config settings rather than options.
15:29 masak definitely 'proto help' (which would have to reside in the bootstrap script)
15:29 masak I don't really see what you want with a 'proto menu'.
15:30 masak doesn't sound very Unix-y to me.
15:30 gravity joined #perl6
15:31 mberends fair enough, just an idea to attract newbies. Do we aim for a 'proto showconfig' and similar?
15:35 masak as a rule, as few subcommands as possible, I think. :)
15:36 masak there might be a use for 'proto showconfig', but it'd basically be a cat of the config file.
15:37 lambdabot joined #perl6
15:38 mberends yes, we add only when the need arises. today's work will be simply bash->perl5 with as few side effects as possible.
15:38 mikehh ok - all spectest's pass on linux AMD64 - Kubuntu Intrepid
15:38 mikehh it took ages though - Files=314, Tests=9254, 1936 wallclock secs (12.14 usr  3.34 sys + 3486.83 cusr 164.51 csys = 3666.82 CPU)
15:41 mberends spectest just completed on eeebuntu i386, 2797 wallclock secs (intel atom 1.6GHz)
15:42 masak mberends: cool. in the meantime, I'll investigate a few errors in November that viklund++ noticed.
15:43 masak mberends: another idea that I don't know if I told you about are 'pseudopackages' -- packages which are not installed by proto itself, but which might be good to include in proto's model. these include 'parrot', 'rakudo' and 'proto'.
15:43 mikehh running i386 on the same comp - Files=314, Tests=9254, 1379 wallclock secs (10.10 usr  2.45 sys + 2390.08 cusr 131.14 csys = 2533.77 CPU)
15:44 jnthn s1n: Yes, they're on my pile of patches people want me to review and apply. ;-)
15:44 masak today I had an idea to make a pseudopackage for 'november-apache' too, to make installation of November as a web app really simple.
15:44 nihiliad joined #perl6
15:45 mberends apache is usually provided by the distro package system - lots of variation there
15:46 s1n jnthn: okay, was just wondering
15:47 s1n wasn't really sure if the new patch sumitting process was working
15:47 mikehh that's 40% longer on AMD86 vs i386 - we need to get --optimize to run on AMD86 :)
15:47 s1n jnthn: if you end up approving that patch, i think i can move a lot more over, but i don't want to waste my time unless it gets approved
15:48 shinobi-cl joined #perl6
15:48 s1n mikehh: you mean amd64?
15:48 mikehh yeah - my bad
15:49 jnthn s1n: Kinda trying to work out git/github still. :-|
15:50 jnthn s1n: So suppose I want to cherry-pick some commits (is that how it works?) How can I find those easily on github to review them?
15:50 jnthn If I look at say http://github.com/s1n/rakudo/commits/ I don't see them...
15:51 jnthn Ah, here... http://github.com/s1n/rakudo/commits/rt_work
15:51 s1n jnthn: i think you will have those messages on your dashboard
15:51 s1n jnthn: yes, that's my fork and branch
15:52 s1n according to github, i'm supposed to send pull requests
15:52 s1n not really sure how you're supposed to use them, i'm new to git/github myself
15:52 jnthn *nod*
15:53 jnthn OK, reviewing your patch... :-)
15:53 s1n thanks! :)
15:53 jnthn This line:
15:53 jnthn $out ~= '^' if($!from_exclusive);
15:53 jnthn I think that's wrong?
15:53 jnthn $out ~= '^' if $!from_exclusive;
15:53 jnthn Is what I'd expect.
15:53 s1n oh, nitpick?
15:53 jnthn erm, maybe syntax error in fact...
15:53 jnthn std: $out ~= '^' if($!from_exclusive);]
15:53 p6eval std 25485: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/vDVnprruoD line 1:␤------> [32m$out ~= '^' if[31m($!from_exclusive);][0m␤    expecting nofun␤Other potential difficulties:␤  Variable $out is not predeclared at /tmp/vDVnprruoD line 1:␤------>
15:53 p6eval .....
15:53 s1n didn't complain
15:53 jnthn std: $out ~= '^' if($!from_exclusive);
15:53 s1n hmm odd, why did that work for me....
15:53 p6eval std 25485: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/AsuqL0Hzyc line 1:␤------> [32m$out ~= '^' if[31m($!from_exclusive);[0m␤    expecting nofun␤Other potential difficulties:␤  Variable $out is not predeclared at /tmp/AsuqL0Hzyc line 1:␤------>
15:53 p6eval .....
15:54 jnthn Yes, I thought so.
15:54 jnthn if(...) is a sub call, always.
15:54 s1n oh yeah, i keep forgetting
15:54 s1n lemme see if i can fix it and push it
15:54 jnthn I think Rakudo gets that wrong at the moment, though...
15:55 s1n i brought that up to TimToady but i was the only one in here that thought if() !~ if () was wrong
15:55 zamolxes joined #perl6
15:56 jnthn Also this line worries me:
15:56 jnthn $from_truth &= $topic == $!from if !$!from_exclusive;
15:56 s1n man, keeping 2 working repo's is a PITA
15:56 jnthn Is that not going to construct a junction?
15:56 s1n jnthn: why?
15:56 s1n i dunno what junctions really are
15:57 pmurias joined #perl6
15:57 jnthn rakudo: my $x = 1; $x &= 2; say $x.perl;
15:57 p6eval rakudo 2a9382: OUTPUT«get_iter() not implemented in class 'Integer'␤current instr.: 'prefix:=' pc 20834 (src/builtins/misc.pir:17)␤»
15:57 s1n i got lazy and that seemed like what i wanted
15:57 s1n ooo that's not good
15:57 jnthn std: my $x = 1; $x &= 2; say $x.perl; # just curious...
15:57 p6eval std 25485: OUTPUT«ok 00:02 33m␤»
15:58 jnthn I suspect that since $x foo= $y is really my $x = $x foo $y, then $x &=2 is $x = $x & 2;
15:58 jnthn oops, didn't mean that "my" to sneak in there...
15:58 masak seems reasonable.
15:58 s1n that doesn't sound wrong to me...
15:59 s1n ianvgwp6y (lol, "i am not very good with perl 6 yet")
16:00 jnthn :-)
16:00 s1n jnthn: so do you see anything wrong with the ACCEPTS?
16:00 jnthn Well, the use of &= was in there...
16:01 jnthn Doing
16:01 jnthn my Bool $from_truth = Bool::True;
16:01 jnthn Followed right away by
16:01 jnthn $from_truth = $topic > $!from;
16:01 s1n i'm abbreviating that
16:01 jnthn Seems a tad odd though.
16:01 jnthn my Bool $from_truth = $topic > $!from;
16:01 s1n i didn't want to do 2 if/else for the exclusiveness
16:01 s1n yeah, that's what i'm building now
16:02 jnthn Oh, you maybe meant &&= rather than &=
16:02 s1n gimme a second, i'll push an update after i finish building
16:02 s1n ahhh yeah oops heh, fat finger :)
16:02 jnthn rakudo: my $x = True; $x &&= True; say $x;
16:02 p6eval rakudo 2a9382: OUTPUT«1␤»
16:02 jnthn rakudo: my $x = True; $x &&= False; say $x;
16:02 p6eval rakudo 2a9382: OUTPUT«1␤»
16:02 jnthn ...erm.
16:02 * jnthn summons masak
16:03 s1n hmm, that seems wrong
16:03 masak ta-daa!
16:03 jnthn masak: Hey look rakudobug"
16:03 masak ooh!
16:03 * masak submits
16:03 jnthn s1n: Always be sure to both make test and make spectest too, BTW, if you aren't already doing that, before submitting patches.
16:03 s1n i'm surprised there's no test for that already
16:04 jnthn rakudo: my $x = True && False; say $x;
16:04 p6eval rakudo 2a9382: OUTPUT«0␤»
16:04 s1n jnthn: i wanted to submit the code first before i added the test....
16:04 s1n uh oh, i can't build the setting...
16:04 jnthn s1n: OK, but to make sure it passes all other/existing tests, I mean.
16:04 masak rakudo: True && False
16:04 p6eval rakudo 2a9382: RESULT«Could not locate a method 'perl' to invoke on class ''.␤current instr.: 'die' pc 16659 (src/builtins/control.pir:204)␤»
16:04 s1n jnthn: oh okay, will do in the future
16:05 masak and another one!
16:05 masak rakudo: say True && False
16:05 p6eval rakudo 2a9382: OUTPUT«0␤»
16:05 jnthn rakudo: say True.perl
16:05 p6eval rakudo 2a9382: OUTPUT«Could not locate a method 'perl' to invoke on class ''.␤current instr.: 'die' pc 16659 (src/builtins/control.pir:204)␤»
16:05 * masak submits that too
16:05 jnthn masak: Ah, but we already haz ticket for this.
16:05 s1n sounds like Bool setting isn't working
16:05 masak ok.
16:05 jnthn It's missing .perl method on enum members.
16:06 jnthn And True and False are...well...enum-ish.
16:06 jnthn In fact, I fear that may be the thing we didn't have a spec for...though maybe I did ask about that recently...
16:06 jnthn Oh yes, IIRC the answer was enum elements .perl-ify to their long name.
16:06 jnthn So for enum Foo <Bar Baz>; Bar.perl is Foo::Bar.
16:07 s1n hmm, gen_setting segfaults on parrot r36930
16:07 jnthn But enums want a refactoring anyway.
16:07 jnthn s1n: Get the Parrot revision matching your build/PARROT_REVISION file.
16:08 s1n jnthn: if you pull my build patches, i added support to use "or-later" parrot revision, that's why i was using that revision
16:08 jnthn I'm not sure I want to pull that patch, given it is the cause of your current problems. ;-)
16:09 s1n (just add a '+' on the end)
16:09 s1n oh no, you don't have to use it, but it's there for those people who might want to pull in something new automatically :)
16:09 jnthn Ah, OK.
16:09 s1n i reverted it by just removing the '+' :)
16:09 s1n it's a nice feature to have in case someone forgets to update the revision
16:10 jnthn I think best is to submit that one to pmichaud for him to consider. :-)
16:10 s1n i did
16:10 jnthn OK, great.
16:10 s1n well, i'm rebuilding now, i'll try out those fixes and push the change
16:10 jnthn One final note - you can replace self.from.perl; with $.from.perl
16:11 s1n jnthn: yes i can, still getting use to the new syntax
16:11 jnthn (And yes, I know, in Pair.pm I used the self.from.perl, until moritz_++ asked me what on earth I was thinking... :-))
16:11 s1n jnthn: i started using the $!var and didn't fix the $.var
16:12 s1n jnthn++ for the setting work
16:12 s1n makes things much more pleasant
16:13 jnthn s1n++ for contributing :-)
16:14 s1n jnthn: i like contributing as long as patches don't get indefinitely ignored :)
16:15 s1n jnthn: btw, is there any way to make setting build errors easier to track down? there's nothing really to indicate pc or line...
16:16 s1n jnthn: too few arguments passed (0) - 1 params expected
16:16 s1n current instr.: 'parrot;Bool;pick' pc 23803 (src/gen_setting.pir:335)
16:17 s1n everything fails with that parrot revision...
16:18 jnthn Oh, hmm
16:18 * jnthn is confused
16:18 s1n jnthn: yup, r36856, that's why i added the 'or-later' revision support
16:18 jnthn s1n: Paste me one line below that in the backtrace.
16:18 s1n called from Sub 'parrot;Perl6;Grammar;Actions;statement_block' pc 117983 (src/gen_actions.pir:453)
16:18 jnthn Yes, that one *was* fun to track down... :-)
16:19 jnthn OK, seems now you have too early a revison of Parrot. Which is...odd.
16:19 s1n heh
16:19 jnthn I don't know how easy/hard this is
16:19 s1n hence my change :)
16:19 s1n but now the latest revision segfaults during build
16:19 jnthn But can you pull in the latest from Rakudo's master?
16:19 jnthn Then you can use the latest revision of Parrot...
16:19 s1n jnthn: by latest you mean svn head?
16:20 jnthn Yes.
16:20 jnthn That or what is in the latest PARROT_REVISION in the rakudo master repo (if that's the correct git terminology...)
16:20 s1n jnthn: again, i'll just use my or-later patch, but it segfaults generating the gen_setting.pir with svn head
16:21 s1n huh?
16:21 jnthn That's because you don't have the changes to Rakudo that make it not segfault with latest Parrot.
16:21 s1n are you asking to try the version in rakudo's build/PARROT_REVISION?
16:21 s1n jnthn: what changes? (github commit link?)
16:22 jnthn http://github.com/rakudo/rakudo/commit/2​a2293ddf562d29246b3d1567728eae959004227 and http://github.com/rakudo/rakudo/commit/1​533598a3e6e7de844a8fdb1aa280d6ee08e9a36
16:23 s1n jnthn: okay, i think the terminology i want is to fast-forward my branch to rakudo's master...
16:23 s1n lemme see what i can do here
16:25 justatheory joined #perl6
16:27 s1n yay, i'm now a sysadmin of my own repo, fun
16:28 s1n i can't merge because i'm in the middle of a conflicted merge
16:29 s1n i'm stuck, i can't seem to do anything now
16:36 Tene joined #perl6
16:41 mberends joined #perl6
16:56 cspencer joined #perl6
17:03 jan_ joined #perl6
17:03 jhorwitz joined #perl6
17:22 alexn_org joined #perl6
17:24 aindilis joined #perl6
17:29 Southen joined #perl6
17:31 s1n jnthn: that logic is wrong, lemme fix it first
17:49 r0bby_ joined #perl6
17:52 samlh joined #perl6
17:52 p6eval joined #perl6
18:20 cspencer rakudo: my @vals = (1..5); @vals[1..*].say
18:20 p6eval rakudo 2a9382: OUTPUT«2345Use of uninitialized value␤␤»
18:21 cspencer rakudo: my @vals = (1..5); @vals[0..*].say
18:21 p6eval rakudo 2a9382: OUTPUT«12345Use of uninitialized value␤␤»
18:21 cspencer is this a bug?  i'm presuming that the * should match the final array subscript, though it looks like it's going one further...
18:28 skids rakudo: my @vals = (1..5); @vals[1..*-1].say
18:28 p6eval rakudo 2a9382: OUTPUT«2345␤»
18:29 skids I would say it is going one further, but not a bug, since [*-1] is documented as the last element.
18:29 skids * would then be the next element that could be added.
18:30 cspencer hmm, alright.
18:31 skids Which is now that I think of it is going to save me a lot of "push" statements :-)
18:33 cspencer there're a number of examples in S09 using the @array[0..*] notation, though i'm not sure it's clear that you'd get that particular behavious
18:33 cspencer er
18:33 cspencer behaviour
18:33 cspencer (or at least not clear to me, i suppose) :)
18:36 skids Hrm I would say yes the "to the largest allocated index" is iffy and may need to be corrected.  As to whether the "to the largest specified index" also needs to change, that's above my head.
18:36 skids The parts where the splat is a whole range and not an endpoint, though, are probably fine.
18:37 TimToady * is not the last element
18:37 TimToady you are generalizing falsely
18:37 TimToady * is whatever the current operator makes of it
18:38 cspencer TimToady: so in the case of array subscripts, what would the correct behaviour be?
18:38 TimToady subscripting with * gives you all the elements, not the last one.  it's - that turrns *-1 into a closure
18:39 TimToady and subscripting treates a closure differently than *
18:39 TimToady anyway, sorry to snipe and run, but I gotta go &
18:39 cspencer alrighty
18:39 skids Ah, so it would have to be [*-0] to do a push.
18:40 cspencer (so as i understand it, the current behaviour is a bug then?) :)
18:40 s1n jnthn: i'll have to get this committed later, it looks like managing this fork is taking longer than making the changes, so i may refork or something
18:43 skids rakudo: my @vals = (1..5); @vals[1..*-0].say
18:43 p6eval rakudo 2a9382: OUTPUT«2345Use of uninitialized value␤␤»
18:44 jnthn s1n: Sounds like git makes life forking hard now and then. ;-)
18:44 skids rakudo: my @vals = (1..5); @vals[1..*-0].kv.say
18:44 p6eval rakudo 2a9382: OUTPUT«021324354Use of uninitialized value␤␤»
18:45 jnthn s1n: Anyway, just let me know when you've something you want me to review. :-)
18:45 skids rakudo: my @vals = (1..5); @vals[1..*].kv.say
18:45 p6eval rakudo 2a9382: OUTPUT«021324354Use of uninitialized value␤␤»
18:46 cspencer rakudo: my @vals = (1..5); @vals[1..*].kv.join(' ').say
18:46 p6eval rakudo 2a9382: OUTPUT«Use of uninitialized value␤0 2 1 3 2 4 3 5 4 ␤»
18:50 skids well either it's a bug, or S09 needs a little love in a couple of places.  I think TimToady was just setting me straight before I tried to @a[*] = $pushed_value which would have been quite wrong.  But he's no longer here to ask :-)
18:52 cspencer heh :)  i'll try to get more clarification later
18:53 cspencer i think though that by "matching all the elements", it's probably a bug
18:53 cspencer oops, he said "gives you all the elements"
18:54 skids I think he was talking about [*] not [N..*]
18:55 skids Speaking of S09 (and S02)...
18:56 skids The heretofor unimplemented postcircumfix adverbs -- would be nonsense with @[][] slices.
18:56 skids (only usable with @[;])
18:56 skids If I am correct?
18:58 skids (or perhaps usable on the last [] in @[][] but yielding different behavior)
19:00 Psyche^ joined #perl6
19:00 cspencer hmmm....i'm not sure either
19:01 Helios joined #perl6
19:02 skids I was thinking of trying to add them, and by that I mean I was thinking of finding out how fast and hard I would fail at trying to add them :-)
19:03 Helios joined #perl6
19:17 skids std: %a{'a','b'}:p
19:17 p6eval std 25485: OUTPUT«Potential difficulties:␤  Variable %a is not predeclared at /tmp/gssWgHPgq8 line 1:␤------> [32m[31m%a{'a','b'}:p[0m␤ok 00:02 34m␤»
19:18 skids std: my %a; %a{'a','b'}:p
19:18 p6eval std 25485: OUTPUT«ok 00:03 36m␤»
19:18 IllvilJa joined #perl6
19:19 skids hrm ok maybe they are already over there...
19:28 Ariens_Hyperion joined #perl6
20:26 Avada joined #perl6
20:39 Grrrr joined #perl6
21:14 |jedai| joined #perl6
21:19 cspencer rakudo: multi foo(Bool :$baz = Bool::False, *@vals) { say "foo" }; foo(:baz(Bool::True), 1, 2, 3);
21:19 p6eval rakudo 2a9382: OUTPUT«No applicable candidates found to dispatch to for 'foo'␤current instr.: '_block14' pc 91 (EVAL_16:47)␤»
21:19 cspencer pugs: multi foo(Bool :$baz = Bool::False, *@vals) { say "foo" }; foo(:baz(Bool::True), 1, 2, 3);
21:19 p6eval pugs: OUTPUT«foo␤»
21:20 cspencer is rakudo's MMD not working correctly in the above example?
21:23 jnthn Hmm...well, named params don't participate int he dispatch...but even so that call looks to me like it shoulda worked...
21:25 cspencer jnthn: it seems to be the Bool type in the signature that does it
21:26 cspencer rakudo: multi foo(Int :$baz = 1, *@vals) { say "foo" }; foo(:baz(2), 1, 2, 3);
21:26 p6eval rakudo 2a9382: OUTPUT«foo␤»
21:30 jnthn Hmm..curious.
21:30 Gruber joined #perl6
21:30 jnthn cspencer: File a ticket, I'll look into it.
21:30 cspencer will do
21:31 Gruber joined #perl6
21:31 jnthn thanks
21:39 dukeleto joined #perl6
21:42 mikehh joined #perl6
21:52 shinobi-cl joined #perl6
21:52 cspencer_ joined #perl6
22:00 jferrero joined #perl6
22:08 ejs joined #perl6
22:16 mikehh joined #perl6
22:20 shinobi-cl is the "foreach" keyword gonna be inexistent on perl6?
22:24 s1n akkk
22:25 s1n managing a fork and keeping it in sync with the master rakudo is extremely problematic
22:25 pmurias shinobi-cl: the c-style for is now called loop
22:25 shinobi-cl yes, i know... is just that i think that "foreach" is more explicit on what the keyword does
22:26 shinobi-cl is the p6 "for"exactly the same as "foreach" in p5?
22:26 shinobi-cl or it is "�mproved" someway?
22:26 pmurias shinobi-cl: for @array -> $foo {...}
22:32 cspencer_ rakudo: join
22:32 p6eval rakudo 2a9382: OUTPUT«No applicable methods.␤␤current instr.: '_block14' pc 59 (EVAL_16:38)␤»
22:32 cspencer_ rakudo: join()
22:32 p6eval rakudo 2a9382: OUTPUT«No applicable methods.␤␤current instr.: '_block14' pc 59 (EVAL_16:38)␤»
22:32 cspencer_ pugs: join()
22:32 p6eval pugs: OUTPUT«*** No compatible multi variant found: "&join"␤    at /tmp/AueW2ItfjA line 1, column 1 - line 2, column 1␤»
22:34 skids shinobi-cl: there will be precious little use of traditional incremental for loops what with for (0..N :by(M)) and various other improvements, and the pointy blocks make it pretty explicit
22:36 skids e.g why would you do a for loop to go through an array when you can do for (@array.kv) -> $index, $value is rw { ... }
22:36 jnthn Those parens are not needed too, I imagine. :-)
22:37 s1n jnthn: i'm rebuilding now, i finally figured out what i had to do :)
22:37 jnthn s1n: Yay. :-)
22:37 s1n it's got my fork's changes, fast-forwarded with recent rakudo changes, and it's pulling the right version of parrot right now :)
22:38 s1n it was a _real_ pain, i'll need to modify that wiki page
22:41 shinobi-cl rakudo: my $val = 5; my @result = [|] (1,2,3,4,5); say $val ~~ @result ?? "found!" !! "missing"; @result = (1,2,3,4,5); say $val ~~ one(@result) ?? "found!" !! "missing"
22:41 p6eval rakudo 2a9382: OUTPUT«missing␤found!␤»
22:41 shinobi-cl mmmm, i would have expected to both examples would show "found!"
22:41 shinobi-cl rakudo: [|] (1,2,3,4,5);
22:41 p6eval rakudo 2a9382: RESULT«any(1, 2, 3, 4, 5)»
22:42 shinobi-cl rakudo: [^] (1,2,3,4,5);
22:42 p6eval rakudo 2a9382: RESULT«one(1, 2, 3, 4, 5)»
22:42 shinobi-cl rakudo: my $val = 5; my @result = [^] (1,2,3,4,5); say $val ~~ @result ?? "found!" !! "missing"; @result = (1,2,3,4,5); say $val ~~ one(@result) ?? "found!" !! "missing"
22:42 p6eval rakudo 2a9382: OUTPUT«missing␤found!␤»
22:42 shinobi-cl pugs: my $val = 5; my @result = [^] (1,2,3,4,5); say $val ~~ @result ?? "found!" !! "missing"; @result = (1,2,3,4,5); say $val ~~ one(@result) ?? "found!" !! "missing"
22:42 p6eval pugs: OUTPUT«missing␤found!␤»
22:47 jnthn shinobi-cl: They're different.
22:47 jnthn shinobi-cl: In one case you have an array as the RHS of the smartmatch, and in the other a junction.
22:48 shinobi-cl ahh i see
22:48 shinobi-cl pugs: my $val = 5; my $result = [^] (1,2,3,4,5); say $val ~~ $result ?? "found!" !! "missing"; @result = (1,2,3,4,5); say $val ~~ one(@result) ?? "found!" !! "missing"
22:48 p6eval pugs: OUTPUT«*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "@result" requires predeclaration or explicit package name␤    at /tmp/t6LIF5LPEH line 1, column 97␤»
22:48 shinobi-cl pugs: my $val = 5; my $result = [^] (1,2,3,4,5); say $val ~~ $result ?? "found!" !! "missing"; my @result2 = (1,2,3,4,5); say $val ~~ one(@result2) ?? "found!" !! "missing"
22:48 p6eval pugs: OUTPUT«found!␤found!␤»
22:50 shinobi-cl is a little confusing since the sigils for scalar and junctions are the same
22:50 shinobi-cl is a matter of getting used to
22:51 shinobi-cl is not that the sigils are the same, is just that $results is a reference to a junction, right?
22:52 jnthn Well, in this case the issue is that you end up auto-threading over the things in the junction, whereas in the other case you end up calling Array's ACCEPTS
22:56 shinobi-cl a juntcion is a brand-new kind of container? at the $, @, % and & level?
22:57 fruchtix joined #perl6
22:57 jnthn No, it's not a container.
22:57 jnthn It's best to see it as a value that is many values at the same time.
22:58 fruchtix left #perl6
22:58 shinobi-cl ahhh ok.
22:59 shinobi-cl pugs: my $junction = one((1,2), (3,4)); say (1,2) ~~ $junction;
22:59 p6eval pugs: OUTPUT«one()␤»
22:59 shinobi-cl pugs: my $junction = one((1,2), (3,4)); say ?((1,2) ~~ $junction);
22:59 p6eval pugs: OUTPUT«one()␤»
22:59 Ariens_Hyperion joined #perl6
23:00 shinobi-cl rakudo: my $junction = one((1,2), (3,4)); say ?((1,2) ~~ $junction);
23:00 p6eval rakudo 2a9382: OUTPUT«1␤»
23:00 shinobi-cl rakudo: my $junction = one((1,2), (3,4)); say (2,1) ~~ $junction;
23:00 p6eval rakudo 2a9382: OUTPUT«1␤»
23:00 shinobi-cl rakudo: my $junction = one((1,2), (3,4)); say (2,5) ~~ $junction;
23:00 p6eval rakudo 2a9382: OUTPUT«1␤»
23:01 jnthn rakudo: say one((1,2), (3,4)).perl
23:01 p6eval rakudo 2a9382: OUTPUT«one(1, 2, 3, 4)␤»
23:01 jnthn Which I believe is correct.
23:01 shinobi-cl rakudo: my $junction = one([1,2], [3,4]); say (2,5) ~~ $junction;
23:01 p6eval rakudo 2a9382: OUTPUT«0␤»
23:01 shinobi-cl rakudo: my $junction = one([1,2], [3,4]); say (1,2) ~~ $junction;
23:01 p6eval rakudo 2a9382: OUTPUT«1␤»
23:01 shinobi-cl :D
23:01 shinobi-cl rakudo: my $junction = one([1,2], [3,4]); say (2,1) ~~ $junction;
23:01 p6eval rakudo 2a9382: OUTPUT«0␤»
23:02 justatheory joined #perl6
23:02 shinobi-cl rakudo: my $junction = one((1,2), (3,4)); say 2 ~~ $junction;
23:02 p6eval rakudo 2a9382: OUTPUT«1␤»
23:04 shinobi-cl rakudo: my $junction = one((1,2), (3,2)); say 2 ~~ $junction;
23:04 p6eval rakudo 2a9382: OUTPUT«0␤»
23:26 s1n jnthn: i sent you a pull request
23:52 wayland joined #perl6
23:59 Ariens_Hyperion joined #perl6

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

Perl 6 | Reference Documentation | Rakudo