Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-12-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:07 Aisling joined #perl6
00:14 Whiteknight joined #perl6
00:15 jferrero joined #perl6
00:36 cspencer eric256: was the idea to have other people commit into that repo you'd set up, or start their own?
00:58 Limbic_Region joined #perl6
01:15 Limbic_Region joined #perl6
01:25 alanhaggai joined #perl6
01:35 lichtkind can you declare classes is finel?
01:35 lichtkind final
01:36 lichtkind There is no syntax for declaring individual classes closed or final.
01:36 lichtkind found it :)
01:36 cspencer in PIR, is there a way of writing a single multi method that runs on two different types?
01:36 cspencer ie) is there a way of doing an or in the :multi(...)  syntax?
01:39 dukeleto_ joined #perl6
01:40 alanhaggai_ joined #perl6
02:03 eric256 cspencer:  i would like to have other people commit to it
02:04 eric256 should i have setup a perl6 account and then started an examples repo? so it was perl6/examles instead of eric256/perl6-examples?
02:04 eric256 once it gets going i figured i'd be able to add a "make perl6-examples" to the parrot/language/perl6 make file ;)  but that can wait till there is stuff in it
02:05 eric256 i'm also wondering about getting a bot in here monitoring git and posting updates or aggregating updates to perl6 t/spec and perl6-examples in an RSS feed or something similar
02:05 cspencer that would be great, i wouldn't mind submitting a couple of the euler solutions myself :)
02:08 eric256 go for it, i'm hoping if we follow similar patterns as i setup for euler we could have multiple solutions for each problem and have something to run them all and compare run times etc
02:08 cspencer great, ok
02:08 cspencer i'll register for an account later on this evening
02:08 cspencer i assume you probably have to grant me perms. to commit?
02:09 eric256 actualy i think its fully public already
02:09 eric256 you'll just need to sign up and register a public key with it then add the repo
02:09 cspencer oh ok, i'll try to check out the repo. after dinner then, thanks :)
02:11 literal why not just update the the examples/euler in the pugs repo?
02:11 literal it's already there and changes to it are announced here
02:12 eric256 literal a number of those examples (i.e. most of them) don't work on rakudo
02:12 eric256 plus since they are language independent i thought it would be nice to get them out in a seperate repo
02:12 literal use fudge? :P
02:12 literal language independent?
02:12 eric256 plus commits to the examples for github are automatic i.e. no one has to approve you in order for you to add. so people don't have to come in here and get a commit bit
02:12 eric256 sorry
02:12 literal you mean implementation independent
02:12 eric256 implementation independent
02:12 eric256 yes
02:12 eric256 ;)
02:13 eric256 oh and github has a nice web based interface hehe
02:14 eric256 and i should probably add all of those reasons to the README ;)
02:22 pugs_svn r24548 | pmichaud++ | [t/spec]:  Unfudge a spectest in do.t.
02:32 eric256 pmichaud: did you do your post yet?
02:43 xuser joined #perl6
02:44 kisu_ joined #perl6
02:49 xuser joined #perl6
02:53 meppl joined #perl6
02:54 alc joined #perl6
03:08 alester joined #perl6
03:10 alester joined #perl6
03:11 alester left #perl6
03:12 alester joined #perl6
03:13 alester joined #perl6
03:19 * eric256 sings a little song to himself
03:19 cspencer eric256: you around?
03:19 cspencer oh, there you are
03:19 eric256 ha!
03:19 eric256 lol
03:19 cspencer i'm trying to do a push to the git repo, but it's telling me permission denied
03:19 eric256 yep and been adding to my own repo like crazy ;) well maybe not crazy but ...well adding to it
03:19 cspencer i've not used git much, do you have much insight on that?
03:19 cspencer heh
03:19 eric256 you signed up for git and added your public key?
03:20 cspencer i did indeed
03:20 eric256 then login and goto the perl6-examples and it has "Your Clone URL"
03:20 eric256 clicking on that gives you the code to create a local mirro
03:21 eric256 i'gve been using git for all of 5 hours...so i'm probably not going to be a ton of help if it all doesn't just work right ;)
03:21 cspencer hmm...the "Your Clone URL" is different from "Public Clone URL"?
03:22 cspencer hey, that's 10 times the experience i've got then! ;)
03:22 cspencer i'll fiddle with it for a while
03:26 eric256 yea you have to use the your clone in order to push
03:26 eric256 i also had to use the fix it had for Mac OS to get my linux to work
03:26 eric256 for ssh keys
03:27 cspencer hmm
03:27 cspencer ok
03:27 cspencer oh ok see, i have to fork it first
03:29 cspencer ah, there we go
03:30 eternaleye_ joined #perl6
03:31 lichtkind a lexikal my variable of a class is shared by all objects?
03:32 eric256 fork it?
03:32 eternaleye_ lichtkind: AIUI each object belonging to that class has a separate copy of that variable, each of which can be accessed by that object's methods, but not externally
03:32 eric256 i don't think thats the way to go about it...now we have different versinos
03:32 cspencer eric256: apparently...not sure it was the correct way to do it, but it seemed to work
03:33 lichtkind eternaleye_: you described attributes but what i mean is a real old school var
03:33 eric256 you should be able to push to mine
03:33 cspencer hmm
03:33 cspencer it informs me i don't have permissions to do so
03:33 eric256 odd
03:33 eric256 lemme look
03:33 eternaleye_ lichtkind: A 'my' variable declared in the class is an attribute AFAIK
03:34 lichtkind no isnt
03:34 lichtkind attributes are declared with has
03:34 eternaleye_ I was under the impression that that was how one declares a private attribute
03:35 eric256 try now cspencer on my fork/branch whatever ;)
03:35 cspencer alright, one sec
03:35 lichtkind eternaleye_: privat attr are : has $!attr;
03:36 lichtkind my and our has no effect on attributes - quote from s12
03:36 cspencer that did it
03:36 lichtkind there visibility comes from the twigil
03:37 cspencer do you have to manually add new users that can commit?
03:37 eric256 shoot apparently
03:37 eric256 well i don't care for that at all
03:37 cspencer heh, alright
03:37 eric256 though i did get a list of forks and the ability to apply them back automaticaly
03:37 eric256 well manualy by batch though
03:37 hercynium joined #perl6
03:37 eric256 still...hmm
03:37 cspencer hmm is right
03:40 lichtkind eternaleye_: thanks for effort but i seemed to be already bit deepr into this :)
03:41 lichtkind can anyone here aprove some weird oop question?
03:41 meppuru joined #perl6
03:41 lichtkind a lexikal var of a class is shared by all obj?
03:43 GitHub182 joined #perl6
03:43 GitHub182 perl6-examples: 3Eric Hodges master0 SHA1-4a5affe
03:43 GitHub182 Adding answer to euler #2
03:43 GitHub182 http://is.gd/cT6q
03:43 GitHub182 perl6-examples: 3Eric Hodges master0 SHA1-1161e69
03:43 GitHub182 Merge branch 'master' of git@github.com:eric256/perl6-examples
03:43 GitHub182 http://is.gd/cT6r
03:43 GitHub182 left #perl6
03:43 eric256 oh dear
03:43 eric256 oh good
03:43 eric256 lol
03:56 cspencer is that git-bot courtesy git hub?
03:56 meppuru good night
03:56 cspencer good night :)
03:57 meppuru ;)
03:57 eric256 cspencer: yep
03:57 eric256 but if it spews like that its going to annoy the crap out of everyone ;)
03:58 eric256 i'm trying to do euler problem 3 but i have to research the math first ;)
03:58 eric256 hehe
04:18 eternaleye_ eric256: This is inefficient, but it should work: http://dpaste.com/101484/
04:18 eternaleye_ (re Euler 3)
04:18 eternaleye_ Although, rakudo barfs on loop()
04:19 eternaleye_ or maybe it's the true, one sec
04:20 eternaleye_ Well, http://dpaste.com/101488/ segfaults rakudo r34100
04:22 eric256 rakudo: say Bool:true;
04:22 p6eval rakudo 34224: OUTPUT[Statement not terminated properly at line 1, near ":true;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
04:22 eric256 rakudo: say Bool:True;
04:22 p6eval rakudo 34224: OUTPUT[Statement not terminated properly at line 1, near ":True;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
04:22 eric256 rakudo: say Bool::true;
04:22 p6eval rakudo 34224: OUTPUT[Use of uninitialized value␤␤]
04:22 eric256 rakudo: say Bool::True;
04:22 p6eval rakudo 34224: OUTPUT[1␤]
04:25 eric256 with that change the error i get is "get_iter() not implemented in class 'Undef'"
04:25 eric256 but then i realize i haven't rebuilt my perl6 today, so i'm going to do that ;)
04:26 eternaleye_ It's likely the for @primes -> $prime {}
04:26 eternaleye_ I think that it's just that it's after the bool thing - Bool::true just allowed it to get to that error
04:26 eric256 rakudo: my @primes = (1,2,3,5); for @primes -> $prime { .say };
04:26 p6eval rakudo 34224: OUTPUT[Use of uninitialized value␤␤Use of uninitialized value␤␤Use of uninitialized value␤␤Use of uninitialized value␤␤]
04:26 eric256 rakudo: my @primes = (1,2,3,5); for @primes -> $prime { $prime.say };
04:26 p6eval rakudo 34224: OUTPUT[1␤2␤3␤5␤]
04:27 eternaleye_ Weird
04:27 eric256 rakudo: loop ( my Int $i = 1; $i <= sqrt( 100 ); ++$i ) { say $i };
04:27 p6eval rakudo 34224: OUTPUT[1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤]
04:28 eric256 rakudo: loop ( my Int $i = (1)[-1]; $i <= sqrt( 100 ); ++$i ) { say $i };
04:28 p6eval rakudo 34224: OUTPUT[Method 'postcircumfix:[ ]' not found for invocant of class 'Int'␤current instr.: 'postcircumfix:[ ]' pc 1568 (src/classes/Positional.pir:77)␤]
04:28 eric256 rakudo: loop ( my Int $i = list(1)[-1]; $i <= sqrt( 100 ); ++$i ) { say $i };
04:28 p6eval rakudo 34224: OUTPUT[1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤]
04:28 eric256 odd i thought maybe it was in there
04:30 eric256 rakudo: my Int Array @primes = ( 2 ); loop (my Int $i = @primes[-1]; $i < sqrt ( 100 ); ++ $i) { say $i };
04:30 p6eval rakudo 34224: OUTPUT[get_iter() not implemented in class 'Undef'␤current instr.: '_block14' pc 160 (EVAL_12:72)␤]
04:30 eric256 there it is
04:30 eric256 rakudo: my @primes = ( 2 ); loop (my Int $i = @primes[-1]; $i < sqrt ( 100 ); ++ $i) { say $i };
04:30 p6eval rakudo 34224: OUTPUT[2␤3␤4␤5␤6␤7␤8␤9␤]
04:30 * eric256 waits for perl6 to rebuild
04:31 eternaleye_ Well, that's interesting
04:33 eternaleye_ http://dpaste.com/101494/ dumps "Warning\n" to the terminal over and over
04:35 eternaleye_ Ah, that's the break; statements. It said last; wasn't okay, so that was a guess. What's perl6's equvalent to last?
04:39 eric256 i thought last. lol
04:39 eric256 maybe return?
04:39 eric256 rakudo: for (1..100) {.say; last; };
04:39 p6eval rakudo 34224: OUTPUT[1␤Could not find non-existent sub last␤current instr.: '_block29' pc 188 (EVAL_14:89)␤]
04:39 eric256 rakudo: for (1..100) {.say; return; };
04:39 p6eval rakudo 34224: OUTPUT[1␤No exception handler and no message␤current instr.: 'return' pc 14152 (src/builtins/control.pir:39)␤]
04:40 * eric256 goes to check the specs
04:40 eric256 could be its just not implemented yet
04:41 eric256 rakudo: for (1..100) {.say; last(); };
04:41 p6eval rakudo 34224: OUTPUT[1␤Could not find non-existent sub last␤current instr.: '_block29' pc 188 (EVAL_14:89)␤]
04:43 alester joined #perl6
04:46 eric256 rakudo: my $foo = 1; given (1) { when (1) {$foo = 2; break; $foo = 4} }; say $foo;
04:46 p6eval rakudo 34227: OUTPUT[2␤]
04:47 eric256 so break works in given
04:47 eric256 rakudo: for (1..100) {.say; break; };
04:47 p6eval rakudo 34227:
04:47 p6eval ..OUTPUT[1␤Warning␤2␤Warning␤3␤Warning␤4␤Warning␤​5␤Warning␤6␤Warning␤7␤Warning␤8␤Warning␤9␤Warning​␤10␤Warning␤11␤Warning␤12␤Warning␤13␤Warning␤14␤W​arning␤15␤Warning␤16␤Warning␤17␤Warning␤18␤Warnin​g␤19␤Warning␤20␤Warning␤21␤Warning␤22␤Warning␤23␤​Warning␤24␤Warning␤25␤Warning␤26␤Warning␤27␤...
04:47 eric256 opps.. apparently it doesn't work in a for loop. lmao
04:49 cspencer good night all
04:49 eric256 yea all the loop tests for last() are skipped, fudged for now..
04:51 eternaleye_ Well, those are optimizations ( cut runtime to ~1/8 )
04:53 eternaleye_ Oh, I just realized I made a major error. I just popped the last prime, not the greatest prime which divides $num
04:54 eternaleye_ So I'd have to loop over @primes and add any where $num % $prime == 0 to @divisors, then pop( @divisors )
04:55 eternaleye_ The basic idea is to create a list of all primes up to sqrt( num ) ( because nothing larger than it's square root will be a factor ) and find the biggest one that factors $num
04:55 GitHub186 joined #perl6
04:55 GitHub186 perl6-examples: 3Eric Hodges master0 SHA1-73de98f
04:55 GitHub186 Adding answer to euler #3
04:55 GitHub186 http://is.gd/cTC0
04:55 GitHub186 left #perl6
04:56 eric256 eternaleye_:  yea, thats my code, its just not good at finding primes ;)
04:59 eric256 bed time if you want to add to perl6-examples on github just @tell eric256 <your github id> and i'll add you when i get the message
04:59 eric256 later
04:59 eric256 left #perl6
05:25 xinming joined #perl6
05:50 pugs_svn r24549 | pmichaud++ | [t/spec]:  Unfudge tests for whatever star in array slices.
06:00 rakudo_svn r34231 | pmichaud++ | [rakudo]:  Add whatever star to list and array slices.
06:45 ashizawa joined #perl6
07:04 adc_penner joined #perl6
07:07 kisu joined #perl6
07:09 justatheory joined #perl6
07:20 rakudo_svn r34237 | pmichaud++ | [rakudo]: spectest-progress.csv update: 261 files, 5790 passing, 0 failing
07:25 eternaleye_ Does gather/take work yet?
07:25 pmichaud mostly.  It's not lazy yet.
07:25 eternaleye_ Ah.
07:26 eternaleye_ Do you know why Rakudo would segfault on this? http://dpaste.com/101510/ . The top error it gives (r34100) is Method 'HOW' not found for invocant of class 'Iterator'
07:27 pmichaud you're using @primes in sub testPrime before it's been defined?
07:28 pmichaud that'd be my initial guess.
07:28 eternaleye_ Oh, shoot
07:29 pmichaud but that gather loop is likely to act like an infinite loop for now, since we don't do laziness.  (At least I don't think we do.)
07:31 eternaleye_ Okay. Although, even this segfaults (setting @primes to (2, 3), defining the sub, and setting primes to (@primes, gather...) http://dpaste.com/101511/
07:32 pmichaud just a sec, I'll try on my box.
07:32 pmichaud and is it really a segfault, or just that it stops running?
07:32 eternaleye_ *** glibc detected *** ./perl6: corrupted double-linked list: 0x0000000002c44400 ***
07:32 pmichaud okay.
07:32 pmichaud did you perhaps try running as   parrot perl6.pbc instead of the perl6 "binary" ?
07:33 eternaleye_ Oh, I'll try that. I probably need sleep, sorry if I'm being slow
07:34 eternaleye_ Okay, no segfault then. Although the HOW error is still there.
07:34 pmichaud yes, I get the error also.  Something to do with assignment.
07:35 pmichaud checking.
07:36 pmichaud it's an assignment inside the gather
07:37 cspencer joined #perl6
07:39 eternaleye_ pmichaud: Not defining $isPrime as Bool fixes it, instead it starts eating memory eagerly :D Thanks!
07:39 pmichaud oh, yes.
07:39 pmichaud I think there's an issue with type constraints at the moment.
07:40 pmichaud I haven't been able to track it down precisely, but it wouldn't surprise me if that's the issue.
07:40 pmichaud also, it's looking to me as though gather/take might not be working all that well either.  It doesn't seem to know when to quit.
07:41 cspencer pm: i've got a patch that implements the Mapping interface for the Env object, resolving the issues in #57400.  have you had a chance to review the other Mapping.pir changes?
07:42 pmichaud not yet.
07:42 cspencer ok
07:42 pmichaud I'm writing blog posts now, then probably need some sleep.
07:42 cspencer heh, sure, fair enough :)
07:42 pmichaud so I'd apply Mapping.pir first thing tomorrow morning.
07:42 pmichaud how are you handling Mapping for Env, out of curiosity?
07:42 pmichaud I was planning to do it with a specialized Proxy object.
07:43 cspencer by implementing an iterator method for Env
07:43 cspencer oh ok
07:43 pmichaud an iterator for Env?
07:43 cspencer i had keys/values/pairs/etc. working for it
07:43 pmichaud maybe I'm thinking of a different issue.
07:43 cspencer http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=57400
07:44 pmichaud oh, it resolves the .keys, .kv, etc probems in #57400
07:44 cspencer perhaps not all of the issues, but it will work for all of the methods implemented in Mapping.pir
07:44 cspencer yes
07:44 pmichaud oh, that will be very nice.
07:45 cspencer yes, seems to be working well from my initial tests
07:45 pmichaud it should -- you have the correct approach for that.
07:45 cspencer good to hear :)
07:46 cspencer ok, i'll check back tomorrow then, going to get some sleep myself :)
07:46 cspencer have a good night
07:46 pmichaud you also -- great work!
07:46 cspencer thanks!
07:56 alanhaggai joined #perl6
08:04 pdcawley joined #perl6
08:36 maerzhase joined #perl6
08:37 iblechbot joined #perl6
08:44 ejs joined #perl6
08:45 ejs1 joined #perl6
08:52 masak joined #perl6
09:06 DemoFreak joined #perl6
09:10 eternaleye joined #perl6
09:10 masak joined #perl6
09:17 mpeter joined #perl6
09:23 masak rakudo: eval "sub x { say q<O, NI HAO> }"; say "before call"; x
09:23 p6eval rakudo 34238: OUTPUT[O, NI HAO␤before call␤Could not find non-existent sub x␤current instr.: '_block14' pc 107 (EVAL_13:47)␤]
09:23 masak um. fail.
09:23 * masak submits rakudobug
09:40 rakudo_svn r34239 | bernhard++ | [codingstd] trailing whitespace
09:57 masak github++ # they do so many things right!
10:05 ruoso @tell pmurias are you going to work on smopp5? or just embedding p5 without integrating the runloops?
10:05 lambdabot Consider it noted.
10:07 elmex joined #perl6
10:10 eternaleye @tell eric256 Euler #8 solution at http://dpaste.com/101537/
10:10 lambdabot Consider it noted.
10:16 jferrero joined #perl6
10:26 masak eternaleye: some pretty long lines in that piece of code...
10:26 masak also, things are indented twice each time.
10:27 pmurias joined #perl6
10:33 alech joined #perl6
10:34 eternaleye masak: The long line is a 1000-digit number from Euler
10:35 masak eternaleye: http://dpaste.com/101544/
10:35 eternaleye Oh, and the output thing. Oops
10:35 eternaleye That works!
10:35 masak :)
10:36 eternaleye @tell eric256 masak++ improved the formatting, http://dpaste.com/101544/
10:36 lambdabot Consider it noted.
10:38 gfldex_ joined #perl6
10:38 masak eternaleye: is this an original work, or did you copy it from the Pugs repo? I'm about to slap a license onto the perl6-examples repo, and I don't want to step on anyone's toes.
10:39 eternaleye masak: Original, but feel free to put on any licence. Artistic, GPL, LGPL, BSD, MIT are all fine
10:40 masak I'm going with Artistic 2.0, same as Pugs has.
10:43 eternaleye Grr, Euler #9 is annoying. I don't want to bruteforce it, so I'm solving for a & b, but I can't figure out how to factor 'ab - 1000a - 1000b + 500000 = 0'
10:53 masak eternaleye: ISTR that you can generate a pythagorean triplet from the previous one. that might help.
10:57 xinming_ joined #perl6
11:04 masak rakudo: for 1..500 -> $a { for $a+1..500 -> $b { my $c = sqrt($a*$a + $b*$b); next if $c != floor($c); say [$a, $b, $c].fmt("%d") if $a + $b + $c == 1000 } }
11:04 p6eval rakudo 34239: No output (you need to produce output to STDOUT)
11:04 masak ah. timeout.
11:04 masak ...and that was brute-forcing, I know. :)
11:05 masak rakudo: for 200..500 -> $a { for $a+1..500 -> $b { my $c = sqrt($a*$a + $b*$b); next if $c != floor($c); say [$a, $b, $c].fmt("%d") if $a + $b + $c == 1000 } } # cheating
11:06 p6eval rakudo 34239: OUTPUT[200 375 425␤]
11:06 masak I have no a-priori basis for starting at 200, I just wanted to show that the algorithm produces an answer.
11:11 masak TimToady: btw, I'm asking myself if the format parameter in .fmt shouldn't have a default "%s". in the above case, it would have allowed me to omit the "%d" argument (as I unconsciously assumed, despite having documented the method myself)
11:14 alech joined #perl6
11:17 masak rakudo: my @a = 1,2,3,4; say @a[*-1]
11:17 p6eval rakudo 34239: OUTPUT[4␤]
11:18 masak whoa! pmichaud++
11:20 donaldh joined #perl6
11:27 bsdperl joined #perl6
11:35 dmq joined #perl6
11:43 DemoFreak joined #perl6
11:45 GitHub64 joined #perl6
11:45 GitHub64 perl6-examples: 3Carl Masak master0 SHA1-08743c2
11:45 GitHub64 [README] various whitespace, capitalization and formatting changes
11:45 GitHub64 http://is.gd/cVDc
11:46 masak ooh, nice. one-time bots :)
11:47 masak the things they come up with nowadays...
11:48 masak whoever set that one up: could we have one that reports viklund/november commits to #november-wiki, too? kthxbai.
11:52 iblechbot joined #perl6
11:53 schmalbe joined #perl6
11:58 vixey joined #Perl6
11:59 pugs_svn r24550 | pmurias++ | [smop] started migrating to scons - SConstruct builds test 03
12:10 cspencer joined #perl6
12:11 alech joined #perl6
12:25 alech_ joined #perl6
12:31 alanhaggai joined #perl6
12:51 rjh- joined #perl6
12:59 alech joined #perl6
13:03 PZt joined #perl6
13:06 bacek joined #perl6
13:07 alanhaggai joined #perl6
13:08 bacek perl6: my @a=(1,2); say @a.WHAT
13:08 p6eval elf 24550, pugs, rakudo 34242: OUTPUT[Array␤]
13:08 bacek hmm...
13:08 bacek perl6: my @a=(1,2); say @a.perl
13:08 p6eval rakudo 34242: OUTPUT[[1, 2]␤]
13:08 p6eval ..pugs: OUTPUT[\(1, 2)␤]
13:08 p6eval ..elf 24550: OUTPUT[[1,2]␤]
13:09 bacek perl6: my @a=(1,2); my @b = eval @a.perl; say ~@b
13:09 p6eval rakudo 34242: OUTPUT[1 2␤]
13:09 p6eval ..elf 24550: OUTPUT[12␤]
13:09 p6eval ..pugs: OUTPUT[CaptSub {c_feeds = [:MkFeed {f_positionals = [:IFinite 1,IFinite 2:], f_nameds = []}:]}␤]
13:10 bacek perl6: my @a=(1,2); push @a, eval @a.perl; say ~@a
13:10 p6eval pugs: OUTPUT[1 2 CaptSub {c_feeds = [:MkFeed {f_positionals = [:IFinite 1,IFinite 2:], f_nameds = []}:]}␤]
13:10 p6eval ..elf 24550: OUTPUT[Undefined subroutine &GLOBAL::push called at (eval 121) line 4.␤ at ./elf_f line 3861␤]
13:10 p6eval ..rakudo 34242: OUTPUT[1 2 1 2␤]
13:11 bacek perl6: my @a=(1,2); push @a, eval @a.perl; say +@a
13:11 p6eval pugs, rakudo 34242: OUTPUT[3␤]
13:11 p6eval ..elf 24550: OUTPUT[Undefined subroutine &GLOBAL::push called at (eval 121) line 4.␤ at ./elf_f line 3861␤]
13:17 eric256 joined #perl6
13:26 eric256 @tell masak that bot is in the services channel of your repo ;)  just add sever,port and channel and the ncheck the "active" box and off it goes.
13:26 lambdabot Consider it noted.
13:26 Lorn joined #perl6
13:27 eric256 @tell masak ++ for adding licensing info ;)
13:27 lambdabot Consider it noted.
13:32 eric256 left #perl6
13:35 cspencer rakudo: my Int $x = Inf; say "x = $x"
13:35 p6eval rakudo 34242: OUTPUT[Type mismatch in assignment.␤current instr.: 'die' pc 14533 (src/builtins/control.pir:188)␤]
13:36 cspencer rakudo: my Num $x = Inf; say "x = $x"
13:36 p6eval rakudo 34242: OUTPUT[x = inf␤]
13:44 cspencer rakudo: say "Range: " ~ (1..10)
13:44 p6eval rakudo 34242: OUTPUT[Range: 1 2 3 4 5 6 7 8 9 10␤]
13:45 masak lambdabot: any messages for me?
13:46 masak apparently not. :)
13:46 lambdabot masak: You have 2 new messages. '/msg lambdabot @messages' to read them.
13:48 cspencer rakudo: Inf.say
13:48 p6eval rakudo 34242: OUTPUT[inf␤]
13:48 cspencer rakudo Inf.int.say
13:48 cspencer rakudo: Inf.int.say
13:48 p6eval rakudo 34242: OUTPUT[-2147483648␤]
13:50 rjh- rakudo: NaN.say
13:50 p6eval rakudo 34242: OUTPUT[nan␤]
13:53 masak cspencer: that Inf.int.say result seems a bit worrisome to me.
13:53 cspencer yeah
13:53 masak rakudo: say Inf.WHAT
13:53 p6eval rakudo 34242: OUTPUT[Num␤]
13:53 masak cspencer: care to report it?
13:53 cspencer pmichaud just implemented -Inf/Inf yesterday
13:53 masak cspencer: yep.
13:53 cspencer so it's probably just been overlooked for the moment
13:53 cspencer sure, i'll put it in
13:54 masak cspencer++
13:54 cspencer i wonder what the appropriate value for that would be
13:54 masak Inf
13:54 masak :)
13:55 cspencer heh, true :)
13:55 cspencer perhaps Inf needs to become its own class as somepoint
13:56 cspencer it should probably display as "Inf" or "-Inf" when printed as opposed to lowercase "inf"
13:56 masak yes, I thought about that too
13:56 rjh- while we're at it
13:56 rjh- rakudo: NaN.int.say
13:56 p6eval rakudo 34242: OUTPUT[-2147483648␤]
13:56 apeiron joined #perl6
13:56 masak popular value, that 2**31
13:56 cspencer heh, i'll put that in the ticket as well
13:56 masak er, -2**31
13:56 cspencer that was just put in yesterday too
13:56 rjh- same for -NaN and -Int i guess
13:57 rjh- *Inf
13:58 cspencer is there a method like .int that forces numeric (ie. Num) context?
14:04 pmurias pugs: +"123a"
14:04 lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
14:04 p6eval pugs: RESULT[123.0]
14:06 pmurias @tell ruoso i'll use pcl at first then i'll work on smopp5
14:06 lambdabot Consider it noted.
14:06 pugs_svn r24551 | pmurias++ | [smop] removed small memory leak
14:09 DemoFreak joined #perl6
14:16 masak @tell eric256 re git tutorial: http://www.newartisans.com/blo​g_files/git.from.bottom.up.php is really good. also http://www-cs-students.sta​nford.edu/~blynn/gitmagic/
14:16 lambdabot Consider it noted.
14:19 DemoFreak joined #perl6
14:19 pugs_svn r24552 | pmurias++ | [smop] removed another small memory leak
14:24 drbean joined #perl6
14:25 rjh- rakudo: (1,2,3) ~ (4,5)
14:25 p6eval rakudo 34243: RESULT["1 2 34 5"]
14:26 pugs_svn r24553 | moritz++ | [t] and [t/spec]
14:26 pugs_svn r24553 | moritz++ |  * more smartlinks
14:26 pugs_svn r24553 | moritz++ |  * moved passing_the_pair_class_to_a_sub.t to spec/integration.t
14:26 pugs_svn r24553 | moritz++ |  * test that optional params can't go before positional ones
14:26 pugs_svn r24553 | moritz++ |  * test that MAIN sub in eval() is not executed
14:26 pugs_svn r24553 | moritz++ |  * moved var/contextual.t, a vew oo/roles/*.t and blocks/wrap.t to spec/
14:26 pugs_svn r24553 | moritz++ |  * removed outdated oo/roles/properties.t
14:26 pugs_svn r24553 | moritz++ |  * moved arity tests to spec/, updated and enhanced
14:26 pugs_svn r24553 | moritz++ |  * remove unneeded evals
14:26 pugs_svn r24553 | moritz++ |  * merge oo/class/anonymous.t into spec/S12-class/anonymous.t
14:27 masak moritz_++, you madman! been using the train again?
14:27 pugs_svn r24554 | moritz++ | [t/spec]
14:27 pugs_svn r24554 | moritz++ | * added tests for $obj.@candidates(@args) and other
14:27 pugs_svn r24554 | moritz++ |   indirect method call syntaxes
14:27 pugs_svn r24554 | moritz++ | * added tests for various direct method call syntaxes
14:27 pugs_svn r24554 | moritz++ | * added tests for lvalue methods
14:27 pugs_svn r24554 | moritz++ | * tests for class methods, including 'method ^classmethod' syntax
14:27 moritz_ masak: no, just two days with not much to do
14:27 masak I sit in awe at your restlessness.
14:29 justatheory joined #perl6
14:31 alanhaggai joined #perl6
14:38 ejs joined #perl6
14:38 moritz_ oh, and I submitted three new bug reports
14:41 alanhaggai joined #perl6
14:42 masak not bad. :)
14:50 rakudo_svn r34245 | moritz++ | [rakudo] three more tests for t/spectest.data
14:50 vixey joined #Perl6
14:51 DemoFreak joined #perl6
14:52 masak moritz_: I finally got in touch with Mr Game Maker. druid is now public. http://github.com/masak/druid/
14:53 moritz_ Yes!
14:55 masak (turned out the best way to reach him was to challenge him to a game of Druid on a game server.)
14:55 moritz_ lol
14:55 moritz_ did you beat him?
14:55 eric256 joined #perl6
14:56 masak moritz_: still ongoing. very exciting. http://www.gamerz.net/pbmserv/Druid/Druid.php?539
14:56 masak and no, I don't expect to beat him. this is only my tenth game or so, ever. he must have played hundreds.
14:57 moritz_ what are the typical time scales for such a game?
14:57 masak moritz_: depends. this is asynch, so somewhere between a week and a year, I'd say.
14:57 masak synchronous games seldom last longer than two hours.
14:57 eric256 oh that game makes a lot more sense in the 3d view
14:57 lambdabot eric256: You have 1 new message. '/msg lambdabot @messages' to read it.
14:58 masak eric256: my ASCII implementation is 3d, too.
14:58 eric256 so red is trying to get a continuos line of red from left to right, and white is top to bottom? hmm
14:58 masak aye.
14:59 moritz_ rakudo: say (1..3).first({$_ % 2 == 0} )
14:59 p6eval rakudo 34244: OUTPUT[2␤]
14:59 moritz_ rakudo: say (1..3).reduce({$^a - $^b})
14:59 p6eval rakudo 34244: OUTPUT[-4␤]
14:59 masak anyone want to challenge me to a game on that server, I'm game.
14:59 moritz_ rakudo: say (1..3).reduce({$^a + $^b})
14:59 p6eval rakudo 34244: OUTPUT[6␤]
15:00 PerlJam moritz_: does .reduce() pat attention to the arity of the sub?
15:00 PerlJam s/pat/pay/
15:00 moritz_ rakudo: say (1..3).reduce({$^a + $^b + $^c})
15:00 moritz_ PerlJam: I think it needs arity 2
15:00 p6eval rakudo 34244: OUTPUT[6␤]
15:01 PerlJam heh
15:01 moritz_ rakudo: say (1..10).reduce({$^a + $^b + $^c})
15:01 p6eval rakudo 34244: OUTPUT[Use of uninitialized value␤55␤]
15:01 PerlJam that's interesting
15:01 pugs_svn r24555 | moritz++ | [t/spec] test that .first and .reduce work on ranges
15:01 moritz_ PerlJam: feel free to add tests and/or open a ticket
15:02 masak rakudo: say (1..10).reduce({})
15:02 p6eval rakudo 34244: OUTPUT[No applicable methods.␤␤current instr.: '_block14' pc 87 (EVAL_15:42)␤]
15:02 masak rakudo: say (1..10).reduce({ say "!" })
15:02 p6eval rakudo 34244: OUTPUT[Cannot reduce() using a unary or nullary function.␤current instr.: 'die' pc 14533 (src/builtins/control.pir:188)␤]
15:02 PerlJam yeah, it needs arity >= 2
15:02 masak oh, so it does have some checks.
15:02 * PerlJam is looking at the code now
15:03 eric256 rakudo: say (1..9).reduce({$^a + $^b + $^c})
15:03 p6eval rakudo 34244: OUTPUT[45␤]
15:03 masak PerlJam: are you also submitting a rakudobug? otherwise I am.
15:03 PerlJam go ahead
15:03 * masak submits rakudobug
15:03 eric256 whats the bug?
15:03 moritz_ rakudo: my $x = 0; say (1..9).reduce({$x++; $^a + $^b + $^c}); say $x
15:03 p6eval rakudo 34244: OUTPUT[45␤4␤]
15:03 masak eric256: the "Use of uninitialized value" warning above.
15:04 cspencer joined #perl6
15:04 moritz_ masak: maybe that's because it just doesn't work to reduce a list of every possible size with a three-arg function?
15:04 alester joined #perl6
15:04 eric256 but it was unitiliazed
15:04 masak moritz_: yes, now that I look at it, I think so too.
15:04 masak eric256: what was?
15:05 PerlJam still a bug though
15:05 PerlJam (IMHO)
15:05 eric256 $^b and $^c for the last run
15:05 masak PerlJam: aye, it shouldn't warn, methinks
15:05 masak eric256: you're right.
15:05 eric256 rakudo: (1).reduce( { $^a.say});
15:05 p6eval rakudo 34244: OUTPUT[Cannot reduce() using a unary or nullary function.␤current instr.: 'die' pc 14533 (src/builtins/control.pir:188)␤]
15:05 eric256 rakudo: (1).reduce( { $^a.say; $^b.say'});
15:05 p6eval rakudo 34244: OUTPUT[Statement not terminated properly at line 1, near "'});"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
15:05 eric256 rakudo: (1).reduce( { $^a.say; $^b.say;});
15:05 p6eval rakudo 34244: OUTPUT[Method 'iterator' not found for invocant of class 'Int'␤current instr.: 'parrot;Any;reduce' pc 10125 (src/builtins/any-list.pir:409)␤]
15:05 PerlJam yeah, it pushes an appropriate number of undef to fill out the arity of the sub.
15:05 eric256 rakudo: list(1).reduce( { $^a.say; $^b.say;});
15:06 p6eval rakudo 34244: RESULT[1]
15:06 rjh- how else would you handle it?
15:06 eric256 ohh but that should have the same error then
15:06 eric256 rakudo: list(1).reduce( { $^a + $^b;});
15:06 p6eval rakudo 34244: RESULT[1]
15:06 eric256 rakudo: list(1).reduce( { $^a + $^b + $^c;});
15:06 p6eval rakudo 34244: RESULT[1]
15:06 eric256 rakudo: list(1,2).reduce( { $^a + $^b + $^c;});
15:06 p6eval rakudo 34244: OUTPUT[Use of uninitialized value␤]
15:06 eric256 okay thats a bit weird
15:07 masak something inconsistent is going on.
15:08 rjh- in the first case the reduce block is never executed
15:08 PerlJam rakud: list().reduce( { $^a + $^b });
15:08 PerlJam rakudo: list().reduce( { $^a + $^b });
15:08 p6eval rakudo 34244: RESULT[undef]
15:09 eric256 rakudo: list(1,2).reduce( { $^a + ($^b//0) + ($^c//0);});
15:09 p6eval rakudo 34244: RESULT[3]
15:09 rjh- rakudo: list(1).reduce( { say "cake!" } );
15:09 p6eval rakudo 34244: OUTPUT[Cannot reduce() using a unary or nullary function.␤current instr.: 'die' pc 14533 (src/builtins/control.pir:188)␤]
15:09 pugs_svn r24556 | pmurias++ | [smop] removed memory leak
15:09 rjh- rakudo: list(1).reduce( { $^a + $^b; say "cake!" } );
15:09 p6eval rakudo 34244: RESULT[1]
15:09 eric256 no cake for you
15:09 cspencer reduce only takes two variables
15:09 PerlJam shouldn't list() produce an empty list?
15:09 eric256 cspencer: but why?
15:10 eric256 why not let someone reduce however they want?
15:10 cspencer well
15:10 eric256 rakudo: list(1..10).reduce( { $^a + ($^b//0) + ($^c//0);});
15:10 p6eval rakudo 34244: RESULT[55]
15:10 cspencer hmmm
15:10 rjh- wow
15:10 eric256 rakudo: list(1..4).reduce( { $^a + ($^b//0) + ($^c//0);});
15:11 p6eval rakudo 34244: RESULT[10]
15:11 masak rakudo: say list()
15:11 p6eval rakudo 34244: OUTPUT[␤]
15:11 jhorwitz joined #perl6
15:12 cspencer from what i understand, the first value into reduce acts as an accumulator of sorts, to which the second value is added or subtracted or whatevered
15:12 rjh- rakudo: list(1,2,3).reduce( { $^a + $^b * $^c } )
15:12 p6eval rakudo 34244: RESULT[7]
15:12 rjh- reduce works on 3 variables
15:12 cspencer hmmm
15:12 cspencer alright then :)
15:12 cspencer i didn't expect that
15:12 rjh- it slices the list in blocks of .arity, and runs the fn over them
15:12 rjh- i guess $^a is always the accumulator?
15:12 cspencer ah ok
15:12 cspencer yes
15:13 rjh- so .arity - 1
15:13 cspencer the first var should be the accumulator
15:13 cspencer i was probably working off the lisp definition of reduce which is why i expected it to be of arity 2 :)
15:13 rjh- rakudo: list(1,2,3,4,5).reduce( { $^a + $^b * $^c } )
15:13 p6eval rakudo 34244: RESULT[27]
15:13 rjh- yup
15:13 eric256 my above reduce would be : $^a = 1, $^b = 2, $^c = 3; then second step $^a = 6, $^b = 4, $^c = 0
15:14 eric256 which spec is reduce defined in?
15:15 cspencer S29
15:15 PerlJam S29:826
15:16 PerlJam (and it doesn't appear to be specced to allow for arbitrary arity :)
15:16 rjh- can reduce() be called with pointy subs
15:16 eric256 hmm spec implementation wants arity 2 ;(
15:16 rjh- (1..10).reduce -> $a, $b { $a * $b } or somesuch
15:16 PerlJam rjh: try it :)
15:16 rjh- rakudo: (1..10).reduce -> $a, $b { $a * $b }
15:16 p6eval rakudo 34245: OUTPUT[Statement not terminated properly at line 1, near "-> $a, $b "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
15:17 masak rakudo: (1..10).reduce(-> $a, $b { $a * $b })
15:17 p6eval rakudo 34245: OUTPUT[Statement not terminated properly at line 1, near "(-> $a, $b"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
15:17 PerlJam looks like "no"
15:17 rjh- pugs:  (1..10).reduce(-> $a, $b { $a * $b })
15:17 p6eval pugs: RESULT[3628800]
15:17 rjh- whoop
15:18 eric256 perl6: (1..10).reduce(-> $a, $b { $a * $b })
15:18 p6eval elf 24556: OUTPUT[Parse error in: /tmp/MkCxfDDRja␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: (1..10).reduce(-> $a, $b { $a␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
15:18 p6eval ..STD_r...
15:18 p6eval ..rakudo 34245: OUTPUT[Syntax error at line 1, near "\ufeff(1..10).r"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
15:18 p6eval ..pugs: RESULT[*** ␤    Unexpected "\65279("␤    expecting "use", statements or "}"␤    at /tmp/Le6AykRFyh line 1, column 10␤]
15:18 rjh- what is elf?
15:18 eric256 perl6: (1..10).reduce(-> $a, $b { $a * $b })
15:18 p6eval rakudo 34245: OUTPUT[Statement not terminated properly at line 1, near "(-> $a, $b"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
15:18 p6eval ..elf 24556: OUTPUT[AST handler circumfix:pblock partially unimplemented at ./elf_f line 2401␤]
15:18 p6eval ..pugs: RESULT[3628800]
15:18 eric256 unicode bit me agian
15:19 moritz_ perl6: say [*] 1..10
15:19 p6eval pugs, rakudo 34245: OUTPUT[3628800␤]
15:19 p6eval ..elf 24556: OUTPUT[Parse error in: /tmp/PyJUu1tmT0␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: say [*] 1..10␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤  STD_red/std.rb:210:in
15:19 p6eval .....
15:19 rjh- n/m
15:20 masak rjh-: Elf is a Perl 6 implementation in Perl 6.
15:21 rjh- thanks
15:30 cspencer rakudo: (1..Inf).elems.say
15:30 p6eval rakudo 34245: No output (you need to produce output to STDOUT)
15:33 masak sounds like the non-lazy answer. :)
15:34 rjh- rakudo: (1..Inf).elems
15:34 rjh- that was probably a mistake
15:34 p6eval rakudo 34245: No output (you need to produce output to STDOUT)
15:34 moritz_ no, the problem is that we don't have lazy lists yet
15:35 rjh- so rakudo infinite loops at list creation?
15:35 moritz_ presumably
15:35 rjh- isn't a Range an object with a start and end point, and an iterator?
15:35 moritz_ rakudo: (1..Inf); say "alive"
15:35 p6eval rakudo 34245: OUTPUT[alive␤]
15:36 moritz_ ah right, it loops on .elems
15:36 rjh- so presumably it runs the iterator when .elems is called
15:36 moritz_ aye
15:36 moritz_ that could be fixed by adding a Range.elems multi that does the "right" thing
15:37 rjh- rakudo: (1..10).elems
15:37 p6eval rakudo 34245: RESULT[10]
15:37 moritz_ rakudo: (1..10:by(2)).elems
15:37 p6eval rakudo 34245: OUTPUT[Statement not terminated properly at line 1, near ":by(2)).el"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
15:37 moritz_ ah, no adverbs on operators yet
15:38 pmurias is it possible to encode the LD_LIBRARY_PATH into an executable
15:38 rjh- is anyone working on adverbs?
15:39 cspencer i'm just working on a Range patch to deal with infinite lists in some cases
15:39 pmurias LD_LIBRARY_PATH='...' ... is getting annoying
15:39 cspencer i believe if you do an infinite range right now, it tries to flatten it to a list to do elems
15:41 rjh- am i confused or couldn't you determine .elems without generating a list
15:41 cspencer you could, but the Range implementation wasn't :)
15:42 rjh- :)
15:42 cspencer (or at least i don't think it was when i'd looked at it last)
15:42 cspencer i'm pretty sure it tries to flatten to a list in a lot of cases
15:42 cspencer i was going to work on that today to fix up the cases of infinite ranges
15:42 rjh- so the Range falls back to list methods automatically?
15:43 cspencer seems to in a lot of cases
15:43 rjh- rakudo: (1..10).pop
15:43 p6eval rakudo 34245: RESULT[10]
15:43 rjh- rakudo: (1..10).shift
15:43 p6eval rakudo 34245: RESULT[1]
15:43 Ferran left #perl6
15:43 rjh- rakudo: (1..10).unshift(1)
15:43 p6eval rakudo 34245: OUTPUT[Method 'unshift' not found for invocant of class 'Range'␤current instr.: '_block14' pc 83 (EVAL_15:43)␤]
15:43 rjh- rakudo: (1..10).push(1)
15:43 maerzhase joined #perl6
15:43 p6eval rakudo 34245: OUTPUT[Method 'push' not found for invocant of class 'Range'␤current instr.: '_block14' pc 83 (EVAL_15:43)␤]
15:44 masak so pop and shift are there, but not unshift and push?
15:44 rjh- rakudo: my $a = (1..10);
15:44 masak that's a bit unfair.
15:44 p6eval rakudo 34245: RESULT[1..10]
15:44 rjh- rakudo: my $a = (1..10); pop $a; $a ~~ Range
15:44 p6eval rakudo 34245: OUTPUT[No applicable methods.␤␤current instr.: '_block14' pc 101 (EVAL_15:48)␤]
15:44 * masak submits rakudobug
15:44 rjh- i can't imagine how you'd push onto a range
15:45 rjh- it would need to convert itself into a list
15:45 rjh- erm, array
15:45 rjh- rakudo: my $a = (1..10); pop $a;
15:45 p6eval rakudo 34246: OUTPUT[No applicable methods.␤␤current instr.: '_block14' pc 102 (EVAL_14:48)␤]
15:45 rjh- rakudo: my $a = (1..10); $a.pop;
15:45 p6eval rakudo 34246: RESULT[10]
15:45 masak yes, now that I think about it...
15:45 rjh- rakudo: my $a = (1..10); $a.pop; $a ~~ Range;
15:45 p6eval rakudo 34246: RESULT[1]
15:45 rjh- what?!
15:46 eric256 isn't (1..Inf, 5) allowed? i thought i saw that somewhere in the specs..dunno how that would work though
15:46 masak rjh-: pop is probably non-destructive in this case.
15:46 rjh- right, makes sense. pop/shift modify the start/end of the range
15:46 masak rakudo: my $a = (1..10); say $a.pop; say $a.pop
15:46 p6eval rakudo 34246: OUTPUT[10␤9␤]
15:46 masak or not. hm.
15:46 rjh- so push/unshift would need to change it to an Array, if they were implemented
15:46 masak rakudo: my $a = (1..10); say $a.pop; say $a.pop; say $a.WHAT
15:47 p6eval rakudo 34246: OUTPUT[10␤9␤Range␤]
15:47 masak rjh-: aye. I'll withhold that ticket.
15:47 alech joined #perl6
15:48 rjh- rakudo: my $a = (1..Inf, 5); say $a.WHAT
15:48 p6eval rakudo 34246: No output (you need to produce output to STDOUT)
15:49 ruoso joined #perl6
15:49 rjh- converts Range into Array and does list flattening
15:50 ruoso Hello!
15:50 lambdabot ruoso: You have 1 new message. '/msg lambdabot @messages' to read it.
15:50 cspencer rjh-: and probably runs out of memory creating an infinite list in the process, i imagine :)
15:51 rjh- would be a safe bet :)
15:52 pmurias ruoso: hi
15:53 pmurias ruoso: i hunted do the leaks ;)
15:54 pmurias s/do/down/
15:55 pmurias ruoso: you are ok with me switching from cmake-- to scons?
15:57 rjh- masak: i just read your post about using return in a code block. pretty spiffy, but what if the code block is executed a few more subs deep? it's not consistent
15:57 masak rjh-: it's a local variable.
15:57 rjh- right, i meant in the general sense
15:57 rjh- in perl 5 you can do sub foo { no warnings 'exiting'; last MOVE; }
15:58 rjh- that will exit the MOVE: { } block, no matter where it is
15:58 rjh- do you know if that can be done in Perl 6?
15:58 masak rjh-: I guess it can, but I haven't tried.
15:58 masak don't know if `last LABEL` is supported yet.
15:58 masak (by Rakudo)
15:59 rjh- i doubt it since Perl 5 didn't like the idea of using last to exit a sub :)
16:00 masak rjh-: I'm trying to understand exactly what you mean by "it's not consistent ... in the general sense". having trouble understanding exactly what danger it is you're referring to.
16:00 masak rjh-: as long as you only do it locally, you're fine, though.
16:00 masak rjh-: I can imagine that labels are only visible in the current lexical scope, or some such.
16:01 rjh- well, it may be that I want to 'flunk' the move several subroutines deep
16:01 rjh- in which case return will only exit the most immediately surrounding block
16:01 rjh- this is a throw/catch sort of thing. Ruby can do it with Kernel.throw
16:02 rjh- i think labels are dynamically scoped
16:02 masak rjh-: I think ruoso said that return is dynamically scoped, too.
16:03 masak so if I define the block in input_valid_move, I'm fine.
16:03 rjh- ahh!
16:04 masak btw, that code is online now: http://github.com/masak/dru​id/tree/master/druid.p6#L60
16:14 pugs_svn r24557 | pmurias++ | [smop] removed cmake-- support, scons is the default now
16:16 wolverian masak, I'd write the move cases as a given/when
16:17 masak wolverian: good idea.
16:17 masak wolverian: you mean the one on line 70, right?
16:18 eric256 hey perl 5 went Git ! ;)
16:18 wolverian masak, and the if on line 67.
16:18 masak and possibly also line 147.
16:18 wolverian pmurias, what's wrong with cmake? (just curious. haven't used scons.)
16:18 masak wolverian: ooh, true.
16:22 alanhaggai joined #perl6
16:24 pugs_svn r24558 | moritz++ | [S12] fixed small typo
16:24 cspencer is the '!FAIL'('...failure reason...') method supposed to cause an error to be thrown?
16:24 masak wolverian: fixed, thanks.
16:24 cspencer or does it just return an error string?
16:24 moritz_ cspencer: I think the plan is to throw an error if 'use fatal' is in effect
16:24 cspencer ok
16:26 pmurias wolverian: cmakes uses a custom "language"
16:26 wolverian yeah.
16:26 pmurias which makes specifing new build rules hard
16:28 hercynium joined #perl6
16:29 riffraff joined #perl6
16:31 pmurias wolverian: have you used cmake much?
16:32 pugs_svn r24559 | moritz++ | [t] move oo/methods/ref.t to spec/
16:33 wolverian pmurias, I haven't written my own rules.
16:35 eric256 man reading some p5p mailing lists...and il thought perl6 was disorganized ;)
16:36 moritz_ don't read devel-devel then ;-)
16:40 pmurias moritz_: devel-devel?
16:40 moritz_ erm, debian-devel
16:40 * moritz_ can't type today
16:42 alech_ joined #perl6
16:44 alanhaggai joined #perl6
16:46 eric256 don't some systems handle backwards compatibility by allowing multiple versions of the same thing to run concurrently? ie.e perl 5.8 and 5.10 and 5.12 and 6.0 all at the same time? seems like that would make developing the next version easier since you don't have to worry about backwards compatibility..hmm i hope perl6 is going that direction
16:46 moritz_ eric256: perl 6 explicitly breaks backwards compatiblity
16:46 moritz_ eric256: that's the whole point ;-)
16:48 rjh- perl5 and perl6 are seperate packages under virtually every package system i know of
16:48 rjh- i don't think you have to worry about that
16:49 moritz_ on my system rakudo now passes 5814 tests. YaY.
16:49 moritz_ rakudo: print 4814 - 5790
16:49 p6eval rakudo 34246: OUTPUT[-976]
16:49 * eric256 watches his point sail by
16:49 eric256 lol
16:49 moritz_ rakudo: print 5814 - 5790
16:49 p6eval rakudo 34246: OUTPUT[24]
16:50 pmurias eric256: the problem with such a scheme is what does /usr/bin/perl point to
16:50 rjh- eric256: a better answer -- you can declare the version of perl you want to use with a 'use' pragma
16:50 eric256 rjh-: thats exactly what i'm talking about
16:50 rjh- in perl 5.8.9 at least
16:51 eric256 and /usr/bin/perl just points to something that checks for use version and hands off
16:51 rjh- in perl6 it's more like the perl runtime pretends to be an older version
16:51 pmurias version declaration is specced
16:52 moritz_ if the binary is just called 'perl', then it has to assume perl 5 until it finds a 'class' keyword in the first line or a 'use v6';
16:53 eric256 as long as we arn't sitting here in 5 years arguing about addeing stuff to 6.5 that will break something in 6.0 ;)
16:54 pmurias chromatic wanted to add a 'class' keyword to perl5...
16:55 moritz_ pmurias: yes, if that's done, we have to just rely on 'use v6'
16:55 alech joined #perl6
16:57 rjh- ...so the proper approach is to name the binary perl6
16:57 rjh- ?
16:57 cspencer rakudo: ('a'..'a').say
16:57 p6eval rakudo 34246: OUTPUT[a␤]
16:57 aindilis joined #perl6
16:57 cspencer rakudo: 'a'.say
16:57 p6eval rakudo 34246: OUTPUT[a␤]
16:58 rjh- ('a'..'a').elems
16:58 rjh- rakudo: ('a'..'a').elems
16:58 p6eval rakudo 34246: RESULT[1]
16:58 eric256 rjh-:  i would think the proper approach would be to always declare your version ;)
16:58 rjh- hmm, i guess i think of perl 5 and 6 as entirely different languages, so 'version' seems misleading
17:01 cspencer rakudo: ('a'..'a').WHAT.say
17:01 p6eval rakudo 34246: OUTPUT[Range␤]
17:01 cspencer rakudo: < a >.WHAT.say
17:01 p6eval rakudo 34246: OUTPUT[Str␤]
17:01 Khisanth joined #perl6
17:02 khisanth_ joined #perl6
17:03 rjh- rakudo: [1,2,3] eqv (1,2,3)
17:03 p6eval rakudo 34246: OUTPUT[Could not find non-existent sub infix:eqv␤current instr.: '_block14' pc 123 (EVAL_13:51)␤]
17:03 cspencer rakudo: say "Range: " ~ ('a'..'a') ~ "\n";
17:04 p6eval rakudo 34246: OUTPUT[Range: a␤␤]
17:06 khisanth__ joined #perl6
17:06 iblechbot joined #perl6
17:06 azawawi joined #perl6
17:07 azawawi good evening
17:10 pmichaud good morning.  :-)
17:11 eric256 with github...is having people fork and then pulling in there updates better than having one large project with a ton of collaborators?
17:13 cspencer does perl 6 already support arbitrary precision integers?  or is that yet to come?
17:13 pmichaud yet to come.
17:13 cspencer ok
17:13 pmichaud we're waiting to see how Parrot decides to handle it, first.
17:13 cspencer ah ok
17:13 cspencer i'll just mark it as a TODO in my patch then
17:13 moritz_ actually pugs does implement it
17:14 cspencer moritz: sorry, i should have been more specific and said 'rakudo' :)
17:17 pmichaud rakudo:  my @a = 1..5;  say @a.elems;
17:17 p6eval rakudo 34246: OUTPUT[5␤]
17:17 cspencer pm: i've got a patch coming your way to deal with 1..Inf ranges a bit better
17:17 pmichaud okay
17:18 pmichaud just the elements function, or something more?
17:18 pmichaud sorry, .elems
17:18 cspencer that and stringification, conversion to int/num
17:19 pmichaud are you creating a new type, or ...?
17:19 hudnix_ joined #perl6
17:19 cspencer no, just modifying the existing Range and checking for infinite cases
17:19 pmichaud you mean stringification of ranges?
17:19 cspencer yes, that's right
17:19 pmichaud what's the spec say for that?
17:20 pmichaud rakudo:  say ~(1..5);
17:20 p6eval rakudo 34246: OUTPUT[1 2 3 4 5␤]
17:20 pmichaud that looks right to me.
17:20 moritz_ rakudo: say ~(1^..^5)
17:20 p6eval rakudo 34246: OUTPUT[2 3 4␤]
17:20 cspencer i meant in the case of a range of one to infinity
17:20 cspencer or negative infinity to one
17:21 pmichaud if you stringify 1..Inf, I would expect it to eat up all the space.
17:21 pmichaud i.e., to trail off forever.
17:21 ejs joined #perl6
17:21 cspencer i was just returning a string of "1..Inf" in that case
17:21 pmichaud I'd like to see a spec for that.
17:21 rjh- if you take the view that a range is just an optimised array
17:21 ejs joined #perl6
17:22 pmichaud i.e., if it's not specified that way, I don't want to introduce that particular behavior.
17:22 cspencer alright
17:22 pmichaud pugs:  say ~(1..Inf);
17:22 moritz_ pugs did lazyness only with one particular backend (not the default one)
17:23 p6eval pugs: No output (you need to produce output to STDOUT)
17:23 cspencer ah ok, pugs is probably creating an infinite list then
17:24 pmichaud anyway, I'd ask p6l what they wish to do in cases like this.  I.e., if we can detect that we're going to use an infinite amount of memory, then throw an exception or something instead of actually using up the memory.
17:24 cspencer ok
17:24 pmichaud Ranges need work in the spec anyway -- there are some contradictions.
17:26 pmichaud anyone know why bacek submitted RT #61598?  It appears to me that .elems already works on Array.
17:28 meppl joined #perl6
17:28 moritz_ rakudo: my @a = 1..4; say @a.elems
17:28 p6eval rakudo 34246: OUTPUT[4␤]
17:29 moritz_ pmichaud: dunno, ask him
17:29 rjh- rakudo: my @a = [1,2,3,4];
17:29 p6eval rakudo 34246: RESULT[[[1, 2, 3, 4]]]
17:30 rjh- rakudo: my $a = (1,2,3,4);
17:30 p6eval rakudo 34246: No output (you need to produce output to STDOUT)
17:30 moritz_ maybe I should change p6eval's output to use a different quoting character
17:30 moritz_ perhaps RESULT«...»
17:30 rjh- lol chevrons
17:30 pmichaud I was about to suggest that :-)
17:31 rjh- rakudo: my $a = (1,2,3,4); say defined $a; say $a;
17:31 p6eval rakudo 34246: OUTPUT[1␤1 2 3 4␤]
17:31 rjh- how come there's no output from that assignment?
17:31 pmichaud assignment doesn't normally do output?
17:31 rjh- rakudo: my @a = [1,2,3,4];
17:31 p6eval rakudo 34246: RESULT[[[1, 2, 3, 4]]]
17:31 moritz_ rakudo: say (my $a = (1, 2, 3)).perl
17:31 p6eval rakudo 34246: OUTPUT[[1, 2, 3]␤]
17:32 pmichaud I have no idea why/how evalbot is choosing to do its output.
17:32 pugs_svn r24560 | moritz++ | [irclog] use different result/output separator
17:32 moritz_ pmichaud: if (!length $response){ $program = '( ( do { ' . $program . "\n} ).perl ).print";
17:33 moritz_ pmichaud: that's what evalbot does to programs that doen't produce any output
17:33 moritz_ and then it executes $program again
17:33 rjh- makes sense
17:33 rjh- rakudo: 5
17:33 p6eval rakudo 34246: RESULT[5]
17:33 rjh- rakudo: my $a = 5;
17:33 p6eval rakudo 34246: RESULT[5]
17:33 pmichaud oh, perhaps the do { ... }  is changing things.
17:33 rjh- rakudo: my $a = [1,2,3];
17:34 p6eval joined #perl6
17:34 moritz_ sorry, just restarted p6eval, takes some time to reconnect
17:34 moritz_ rakudo: 4
17:34 p6eval rakudo 34246: RESULT«4»
17:34 rjh- rakudo: my @a = (1,2,3);
17:34 p6eval rakudo 34246: RESULT«[1, 2, 3]»
17:34 rjh- yay
17:34 rjh- rakudo: my $a = (1,2,3);
17:34 p6eval rakudo 34246: RESULT«[1, 2, 3]»
17:34 pmichaud yay
17:34 pmichaud _much_ nicer.
17:34 pmichaud moritz++
17:35 riffraff joined #perl6
17:36 alech_ joined #perl6
17:40 rakudo_svn r34247 | pmichaud++ | [rakudo]:  @*INC should be an Array, not a List (RT #61608, moritz++)
17:41 pmichaud moritz_: t/spec/S29-os/system-with-spaces.t   says at the top that the tests are relevant only for Pugs.  If that's true, perhaps the file doesn't belong in t/spec?
17:43 pdcawley joined #perl6
17:43 moritz_ pmichaud: dunno, I have a hard time figuring out what it actually does
17:43 moritz_ I'll move it to t/pugs/ for now
17:44 pmichaud that would be good.
17:44 moritz_ pmichaud++
17:44 pugs_svn r24561 | moritz++ | [t/spec] move a test to ../pugs/ that seems to be not generally relevant
17:48 moritz_ http://moritz.faui2k3.org/tmp/perl6-lines.png # some usage statistics
17:49 moritz_ (it's not so easy to export a chart from openoffice.org 2)
17:49 pmichaud I've noticed this.  I always have to go through openoffice draw.
17:51 moritz_ in the end I just made a screenshot
17:51 moritz_ I tried the xhtml export (for which I had to configure a java runtime environment first), and it simply didn't include the chart
17:52 pmichaud right.  openoffice draw works pretty good for me.  Just copy the chart to the clipboard, switch into draw, paste, resize to taste, export as <whatever>
18:04 alech joined #perl6
18:11 hudnix_ joined #perl6
18:25 adc_penner joined #perl6
18:34 Psyche^ joined #perl6
18:35 pugs_svn r24562 | pmichaud++ | [t/spec]:  unfudge passing tests in arity.t
18:51 adc_penner joined #perl6
19:05 alech joined #perl6
19:05 cspencer rakudo: (0..*).from.say
19:05 p6eval rakudo 34248: OUTPUT«0␤»
19:06 cspencer rakudo: (0..*).to.say
19:06 p6eval rakudo 34248: OUTPUT«Whatever<0xb661dd24>␤»
19:08 DemoFreak joined #perl6
19:12 ejs joined #perl6
19:27 alech_ joined #perl6
19:27 azawawi moritz_: ping pong
19:28 * azawawi [Padre::Plugin::Perl6] Syntax checking is up & running with full error messages from STD.pm ;-)
19:28 schmalbe joined #perl6
19:30 pugs_svn r24563 | lwall++ | [STD] some syntax tweaks for failing test parses
19:30 pugs_svn r24563 | lwall++ | [Makefile] make STD lexer gen part of standard make
19:30 * azawawi testing
19:34 Juerd_ joined #perl6
19:38 mberends joined #perl6
19:43 pasteling "azawawi" at 212.38.145.126 pasted "STD.pm failure parsing testcase" (34 lines, 500B) at http://sial.org/pbot/33987
19:44 azawawi TimToady: ping
19:45 azawawi TimToady: Please See the above to replicate the problem that i have been having with STD.pm after the latest context var emulation fix.
19:46 * azawawi hopes to release it soon to fix the 'use STD' dependency in Padre 0.22...
19:50 rakudo_svn r34249 | pmichaud++ | [rakudo]:  Refactor some Mapping methods (RT #61618, cspencer++)
19:50 rakudo_svn r34249 | pmichaud++ | * Patch courtesy Cory Spencer <cspencer@sprocket.org>
19:50 rakudo_svn r34250 | pmichaud++ | [rakudo]:  Eliminate strcasecmp from inf/nan conversions (particle++)
19:50 * eric256 watches cspencer burn it up ;)
19:51 eric256 and pmichaud++ aint to shabby either
19:51 pugs_svn r24564 | azawawi++ | [Syntax::Highlight::Perl6] Updated to latest STD.pm
19:54 pasteling "azawawi" at 212.38.145.126 pasted "Syntax::Highlight::Perl6 'make test failure results'" (44 lines, 1.9K) at http://sial.org/pbot/33988
19:54 pasteling "azawawi" at 212.38.145.126 pasted "Syntax::Highlight::Perl6 'make test failure results'" (44 lines, 1.9K) at http://sial.org/pbot/33989
20:09 bacek joined #perl6
20:10 pmichaud rakudo:  say "+Inf" < 3;
20:10 p6eval rakudo 34248: OUTPUT«0␤»
20:13 eric256 rakudo: say "+Inf".perl
20:13 p6eval rakudo 34248: OUTPUT«"+Inf"␤»
20:13 eric256 rakudo: say +Inf.perl
20:13 p6eval rakudo 34248: OUTPUT«inf␤»
20:13 eric256 rakudo: say -Inf.perl
20:13 p6eval rakudo 34248: OUTPUT«-inf␤»
20:13 eric256 cool
20:15 dalek joined #perl6
20:25 alech joined #perl6
20:34 pugs_svn r24565 | azawawi++ | [Syntax::Highlight::Perl6] Moved bin/ to more standard script/
20:34 pugs_svn r24565 | azawawi++ | [Syntax::Highlight::Perl6] Moved to Module::Install
20:36 pugs_svn r24566 | azawawi++ | [Syntax::Highlight::Perl6] Updated Changes
20:38 araujo joined #perl6
20:39 maerzhase1 joined #perl6
20:42 eric256 @seen cspencer
20:42 lambdabot cspencer is in #perl6. I last heard cspencer speak 1h 36m 26s ago.
20:42 eric256 cspencer: pig
20:42 eric256 cspencer: ping
20:43 eric256 lol
20:51 c9s_ joined #perl6
21:05 lichtkind joined #perl6
21:06 lichtkind TimToady: did you work for unisys or nasa when you created perl?
21:06 alech joined #perl6
21:11 pugs_svn r24567 | bacek++ | [spec] Added test to one element list reduce.
21:23 eric256 lichtkind: http://en.wikipedia.org/wiki/Perl
21:23 riffraff joined #perl6
21:23 lichtkind eric256: no i think i once talked with him and he said unisys
21:24 eric256 "Larry Wall began work on Perl in 1987, while working as a programmer at Unisys," thats what it says. who knows if its right or not
21:24 lichtkind eric256: a year later he come to JPL
21:24 * eric256 wants to work at NASA or JPL or anywhere ;)
21:25 lichtkind right later in article i just read the head
21:25 pugs_svn r24568 | azawawi++ | [Syntax::Highlight::Perl6] Updated MANIFEST.SKIP
21:26 eric256 who runs lambdabot?
21:28 eric256 nm
21:28 hudnix_ joined #perl6
21:32 alech joined #perl6
21:34 lichtkind eric256: thanks
21:34 eric256 yea i can't vouch for the veracity of that article though ;) being wikipedia and all
21:34 eric256 now i'm trying to figure out if i can write a irc bot in perl6 ;)
21:34 eric256 are network sockets working yet?
21:37 alech joined #perl6
21:37 riffraff joined #perl6
21:39 lichtkind eric256: no clue i just do p6 in theory
21:40 lichtkind maybe ask moritz_
21:44 * eric256 wonders if he could build a class with embeded PIR to do network communication...
21:47 donaldh joined #perl6
21:50 cspencer eric256: pong!
21:51 eric256 hey. i was going to ask you to commit a fork to perl6-examples, but i figured out how to write a small perl5 script to login to github and add users as collaborators, now i just need a bot to listen in here and people should be able to do perl6-exampes:@add eric256 and add themselves ;)
21:51 eric256 just gotta figure out the bot part ;)
21:51 cspencer ah, great :)
21:52 eric256 anyone know of examples for including PIR in rakudo?
21:52 Aisling joined #perl6
21:53 alech_ joined #perl6
21:56 lichtkind eric256: ask jnthn  :)
22:00 zev joined #perl6
22:01 alech joined #perl6
22:05 pmichaud eric256: including PIR in rakudo is just   q:PIR { ... }
22:06 pmichaud eric256: use %r for any return value you want from the q:PIR
22:06 eric256 thanks, yea i gotta get the http.pir example file working, then i should be able to start embeding it in a perl6 class ;) maybe
22:07 eric256 unfortunatly it appears that the example file doesn't even work at the moment
22:10 eternaleye joined #perl6
22:10 cspencer pm: how do you propose infinite ranges should be represented when converted to strings for the time being?
22:10 cspencer pm: i think the test files for pugs have them as "(1, 2, 3, ..., Inf)"
22:12 eric256 wouldn't the whatever work there? (1,2,3,*, Inf)
22:13 cspencer eric256: i think the whatever gets converted to an Infinity of some sort in the process
22:13 cspencer so: (0..*) becomes (0..Inf)
22:13 cspencer not sure though
22:15 zev joined #perl6
22:16 zev hello again, all
22:16 zev is there any major difference between using .local variables and registers like $I0 in PIR?
22:17 PerlJam zev: .locals have meaningful names.
22:18 eric256 zev:  you probably want #parrot on irc.perl.org for parrot questions, though a fair number of people are in both ;)
22:20 zev ok, but there isn't any reason not to use .locals?
22:21 PerlJam zev: no.
22:21 pmichaud cspencer: I don't have a proposal for representing ranges as strings.
22:21 cspencer ok
22:21 pmichaud cspencer: I suggest asking p6l.  :-)
22:22 cspencer oh right, sorry, you'd suggested that this morning :/
22:22 cspencer short term memory problem
22:22 zev PerlJam: thanks
22:22 pmichaud currently pugs represents them by eating up all memory.  :-)
22:22 pmichaud pugs:  say ~(1..5);
22:22 p6eval pugs: OUTPUT«1 2 3 4 5␤»
22:22 pmichaud pugs: say ~(1..Inf);  # wait a while
22:22 cspencer right, ok
22:23 p6eval pugs: No output (you need to produce output to STDOUT)
22:23 pmichaud "Whatever" gets converted to infinity if it's not inside of something that sets a context for the whatever
22:23 pmichaud for example,   @a[5..*]   isn't an infinite list.
22:23 pmichaud (unless @a is infinite)
22:23 cspencer right, ok
22:24 cspencer but (1..*) would be considered infinite
22:24 cspencer so the Whatever would become Inf
22:29 kisu joined #perl6
22:29 PerlJam It makes me wonder what  Whatever() becomes
22:29 PerlJam (the wrong thing I know)
22:29 PerlJam but I read (1..*) as (1..whatever), so why not spell it that way (modulo syntax)
22:30 PerlJam (1..Whatever()) doesn't work though
22:30 pmichaud "would become Inf"  is probably wrong.  "Evaluates as Inf" is more precise.
22:30 cspencer ah ok
22:30 pmichaud it still remains a Whatever object.
22:31 pmichaud PerlJam: perhaps you meant   Whatever.new() ?
22:31 PerlJam But that doesn't read as well :)
22:32 pmichaud neither of those read as well as (1..*)  :-)
22:33 PerlJam Do you lose the syntactic * when a Range is constructed? Or can you just output "($range.from..$range.to)" ?
22:33 PerlJam (I kind of thought it was lost)
22:33 pmichaud I don't quite understand "syntactic *"
22:34 pmichaud when a Range is constructed, it just keeps its endpoints.
22:34 duke_leto joined #perl6
22:34 pmichaud rakudo:  say (1..*).to.WHAT;
22:34 p6eval rakudo 34259: OUTPUT«Whatever␤»
22:35 PerlJam The string representation of a Range should be "($r.from..$r.to)"  IMHO.  But if the .to portion doesn't keep the "*", but is instead "+Inf" (or something), then we can't get "(1..*)" out of that.
22:35 pmichaud I don't think the string representation of a Range should be as you just gave
22:36 PerlJam er, "($r.from()..$r.to())" maybe
22:36 pmichaud that would mean:   ~(1..5, 7)  would stringify to "1..5 7"
22:36 PerlJam why not?
22:37 pmichaud if you're wanting a perlish representation of the Range, use .perl
22:37 PerlJam Hmm.
22:37 PerlJam I guess so.
22:38 pmichaud rakudo:  say *.perl;
22:38 p6eval rakudo 34259: OUTPUT«Statement not terminated properly at line 1, near ".perl;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
22:38 PerlJam Looks like a candidate for warning though.  ("Are you *sure* you want to evaluate 1..* here?" :)
22:39 pmichaud yes, I did recommend earlier that stringifying an infinite range could produce a failure/warning.
22:39 eric256 rakudo: say (*).perl
22:39 p6eval rakudo 34259: OUTPUT«Method 'perl' not found for invocant of class 'Whatever'␤current instr.: '_block14' pc 64 (EVAL_13:38)␤»
22:39 * pmichaud fixes.
22:42 Whiteknight joined #perl6
22:46 Limbic_Region joined #perl6
22:48 cspencer rakudo: say (0..Inf).perl
22:48 p6eval rakudo 34259: OUTPUT«0..inf␤»
22:48 zev how does one currently declare a regex in rakudo?
22:48 zev (or create anonymously)
22:51 pmichaud zev:   / pattern /
22:51 pmichaud zev:  my $regex = /pattern/
22:52 eric256 rakudo: my $test = /a/; say 'hello" ~~ $test;
22:52 p6eval rakudo 34259: OUTPUT«Statement not terminated properly at line 1, near "'hello\" ~~"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
22:52 eric256 rakudo: my $test = /a/; say "hello" ~~ $test;
22:52 p6eval rakudo 34259: OUTPUT«␤»
22:52 eric256 rakudo: my $test = /a/; say "hello a" ~~ $test;
22:52 p6eval rakudo 34259: OUTPUT«a␤»
22:52 eric256 okay...that wasn't entirely what i expected ;) lol
22:52 pmichaud what did you expect?
22:52 zev hrm.  it looks like the second form of subst doesn't quite work then
22:53 zev rakudo: say "foofoofoo".subst("foo", /bar/, :nth(2))
22:53 p6eval rakudo 34259: OUTPUT«foo_block22foo␤»
22:53 eric256 i guess just true or false, but this is far more usefull.. bad perl5-- ;)
22:53 alech_ joined #perl6
22:54 pmichaud zev:  you're trying to replace a string with a regex?
22:54 pmichaud that's.... odd.
22:55 zev oh, whoops.  I swapped the first and second args
22:55 pmichaud rakudo:  say "foofoofoo".subst(/foo/, 'bar', :nth(2))
22:55 p6eval rakudo 34259: OUTPUT«foobarfoo␤»
22:55 eric256 ohh now thats spiffy
22:55 pmichaud rakudo:  say "foofoofoo".subst(/foo/, 'bar', :nth(1|3))
22:55 zev but should it really put _block22 in there?
22:55 p6eval rakudo 34259: OUTPUT«barfoofoo␤»
22:55 pmichaud hmmm, that didn't work.  oh well.
22:55 pmichaud _block22 was the "name" of the regex.
22:56 pmichaud Perhaps it should stringify differently.
22:56 pmichaud But we're kinda stuck on subroutine types in parrot at the moment -- all we have is "Sub"
22:56 zev rakudo: say "foofoofoo".subst(/foo/, "bar", :nth(2))
22:56 p6eval rakudo 34259: OUTPUT«foobarfoo␤»
22:56 pmichaud and not an easy way to convert them to some other type.
22:59 DemoFreak joined #perl6
23:00 rakudo_svn r34260 | pmichaud++ | [rakudo]:  Add .perl to Whatever.
23:01 bacek__ joined #perl6
23:08 eric256 rakudo: say "foofoofoo".subst(/foo/, 'bar', :nth(2,3));
23:08 p6eval rakudo 34259: OUTPUT«Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.␤current instr.: 'die' pc 14617 (src/builtins/control.pir:188)␤»
23:08 eric256 rakudo: say "foofoofoo".subst(/foo/, 'bar', :nth(2));
23:08 p6eval rakudo 34259: OUTPUT«foobarfoo␤»
23:08 DemoFreak joined #perl6
23:09 zev is it perferable to attach a patch to an existing ticket or to create a new new ticket via email with the patch?
23:10 pmichaud attach to existing ticket.
23:10 zev ok
23:10 pmichaud perhaps change the subject to include [PATCH]
23:10 pmichaud if you're worried that it won't get noticed.
23:16 zev I'm getting a bunch of lines like "Missing test file: t/spec/S29-list/pick.t" when I try to make spectest.  I know I used to have to run some commands in t/, but I don't see scripts there anymore.  what am I missing?
23:17 pmichaud try   "svn up t/spec"
23:17 pmichaud although "make spectest" is supposed to do that for you.
23:18 alech joined #perl6
23:18 zev it is up to date, but I'm still getting missing files
23:19 pmichaud try removing t/spec entirely, then do "make t/spec" and get a fresh checkout.
23:20 stephens joined #perl6
23:21 zev that worked.  thanks
23:25 zev what's the difference between the .t and .rakudo files?
23:26 eric256 .rakudo are the same version of the .t file but fudged to work with rakudo
23:26 pmichaud .t are the original files.  .rakudo are the files after .... what eric256++ said
23:26 eric256 that way a different perl6 implementation can use the same test files and fudge/skip different tests
23:26 pmichaud .rakudo are the files where #?rakudo skip "..."  has been converted to comment out the skipped sections.
23:27 zev ah
23:27 DemoFreak joined #perl6
23:32 zev pugs question: is the git repository at git://github.com/audreyt/pugs.git kept in sync with svn?
23:33 zev err, I guess it doesn't actually matter because I don't think I can commit via git:// urls

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

Perl 6 | Reference Documentation | Rakudo