Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-07-24

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:00 [particle] cxreg: do like they do on the cpan
00:00 cxreg um
00:00 [particle] make those tests optional
00:00 oha isn't supposed that a *dbi will be tested using a mock driver?
00:01 oha (just asking for curiosity)
00:01 cxreg who knows.  MiniDBI ships with a functioning mysql and Pg, and some not-quite-as-functional others such as CSV
00:01 [particle] oha: we're in the infancy stage here, so we don't really have standards yet
00:01 [particle] make it work, then make it good.
00:01 oha got it
00:02 dotan joined #perl6
00:03 oha does gather and infinite list works on rakudo?
00:04 colomon oha: yes
00:04 colomon with caveats, but yes
00:05 oha then i can't understand something
00:05 colomon rakudo: say (1, 4, 16 ... *).munch(20).perl
00:05 p6eval rakudo f196e8: OUTPUT«(1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456, 1073741824, 4294967296, 17179869184, 68719476736, 274877906944)␤»
00:05 oha lemme narrow it a bit. what happen if i use a infinite list with a junction?
00:05 colomon something like any(1...*) ?
00:05 oha yep, for example
00:05 oha will be hang?
00:06 colomon that's what I would expect.
00:06 colomon but I'm not the most knowledgeable about junctions.
00:06 jnthn Yeah, junctions + infinite lists don't to together.
00:06 jnthn *GO
00:07 [particle] junctions are not lazy
00:07 colomon basically, you don't want to use infinite lists anywhere that you suspect might need to know all the elements in the list.
00:07 kensanata joined #perl6
00:08 jnthn Right. Junctions want to know all of the possibilities. When you consider junction auto-threading, things get even more fun.
00:08 jnthn Of course, we could say "ah, the auto-threading doesn't really call anything at that point, it just will if you use that junction", but I'm not sure that's just not delaying an innevitable explosion until further down the line in most junction use cases.
00:09 oha i've tried with rakudo a prime generator using gather/take
00:09 jnthn Plus it's a bit too surprising.
00:09 oha but i was not able to make it work lazy
00:09 jnthn oha: If you're using any with an infinite list, it won't work.
00:09 oha nope
00:09 oha that's what i expected too
00:09 jnthn oha: There's ways to do it, just not that way. :-)
00:11 colomon hmmm.... if you're talking about checking a number against a lazy sequence of primes to see if it is prime, what you need is a way to know when to stop looking at that sequence of primes.  Presumably that's pretty easy if they are ordered....
00:13 * lue is looking at the Go language, and still likes Perl6 :)
00:13 oha colomon, probably i must work on this a bit more
00:13 colomon actually, that sounds like a really interesting test for Rakudo.
00:13 oha lemme check something more
00:15 * colomon is staring at mandelbrot and thinking that if series was just expanded to use .abs as an ending condition on a series, the inner loop could just be a series.....
00:15 supernovus Projects added, documentation added, pull request sent.
00:16 colomon supernovus++
00:17 colomon rakudo: say ({ @_.unpolar(@_) } ... { $_.abs > 10 }).perl
00:17 p6eval rakudo f196e8:  ( no output )
00:18 PythonPup joined #perl6
00:18 colomon ah, we still don't allow Code for the RHS.  :|
00:18 colomon rakudo: say ({ @_.unpolar(@_) } ... 10).perl
00:19 p6eval rakudo f196e8:  ( no output )
00:19 colomon rakudo: say ({ @_.unpolar(@_) } ... 10).munch(10).perl
00:19 p6eval rakudo f196e8: OUTPUT«(Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0))␤»
00:20 colomon rakudo: say (-> *@a { @a.unpolar(@a) } ... 10).munch(10).perl
00:20 p6eval rakudo f196e8: OUTPUT«(Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0), Complex.new(0, 0))␤»
00:20 colomon huh
00:21 PythonPup Howdy.  I came here from an article talking about screencasts for perl6.  Does anyone have a pointer to a non-flash version of the videos, so I can watch them?
00:22 supernovus I added SCGI to the pls list too, it was already on the proto list. I'm not sure if the demand for SCGI is enough to warrant adding it to R* though (unless lots of people are going to be doing web apps, in which case SCGI is much, much faster than CGI... and simpler than FastCGI (which is already on my TODO list))
00:22 oha http://pastebin.com/J4TmtjXL
00:22 oha i expected this should not loop
00:22 jnthn PythonPup: Hi! szabgab who created them hangs out here, but I think it may be sleep time where he is now.
00:23 colomon oha: you can't do @primes = an infinite list
00:23 PythonPup I'll try later, then.  Thank you.
00:23 jnthn Welcome.
00:23 colomon with very tight exceptions where it might work.
00:23 colomon you want my @primes := gather ... etc
00:23 oha oh!
00:24 colomon still don't know if that will work with the additional internal reference to @primes.
00:24 supernovus Anyway, DateTime::Utils is definitely my big suggestion for a bundled module with R* :-)
00:24 jnthn phenny: tell szabgab PythonPup is looking for non-Flash versions of your Perl 6 screencasts; I know you mentioned some AVI version or something to. Is there a link to them somewhere?
00:24 phenny jnthn: I'll pass that on when szabgab is around.
00:24 oha colomon, great, using := it works
00:24 colomon oha: actually ... wait, really?
00:25 colomon I would have thought you would get an infinite loop anyway, because you're ... ah, I see.
00:25 colomon maybe.
00:25 jnthn colomon: Sounds feasible that it would...
00:25 oha yep
00:25 jnthn colomon: Since you're bound the thingy containing the gather iterator to that variable.
00:25 jnthn colomon: And can then look at the re-ified part.
00:26 jnthn colomon: = may well be a bit too eager for it to work.
00:26 * [Coke] runs parrot profiling tool against "say 3*2". this could take a while. :P
00:26 colomon it's the "for @primes" bit that has me tied in knots
00:26 jnthn [Coke]: You'll mostly measure startup time, but that is interesting too :-)
00:27 jnthn [Coke]: Esp because every time we share off that, we shave off some hundreds times that for the test suite run :-)
00:27 [Coke] jnthn: it's too slow to measure anything else on this laptop. :P
00:27 colomon gotta go, being kicked out of library.  ;)
00:28 jnthn .oO( They ban Perl 6 hacking in libraries now? )
00:28 [Coke] it's subversive.
00:29 jnthn But we switched to git!
00:29 oha lol :)
00:29 oha oh btw [Coke] i think i've found the heisenbug on the Match
00:30 oha i've replied to the ticket, is it enough?
00:31 dotan rakudo: 'foo' ~~ m/:i  OO/;
00:31 dotan How can I do a case-insensitive test for a string in a variable? /$a/ works, /:i string/ works, /:i $a/ doesn't work :(
00:31 p6eval rakudo f196e8:  ( no output )
00:32 [Coke] oha - that should get your reply into RT, yes.
00:32 supernovus Anyway, have a good ('day','night','morning','evening').pick(1);
00:32 oha [Coke], ok.
00:32 [Coke] dober... den? vecher? whichever.
00:33 jnthn [Coke]: Which slavic language were you aiming for? :-)
00:33 jnthn dotan: /:i $a/ should work, I believe - somebody filed a bug ticket about that recently: http://rt.perl.org/rt3/Ticket/Display.html?id=76500
00:34 jnthn dotan: But it didn't get fixed yet.
00:34 [Coke] jnthn: bulgarian.
00:35 jnthn [Coke]: Can't help you there then. :-(
00:35 [Coke] I cannot remember which is evening, or day, or which.
00:35 jnthn den will be day
00:35 [Coke] I think leka nosht is good night.
00:36 jnthn I've studied a decent bit of one West Slavic language, amd currently studying an East Slavic language, but never got to do any of the South Slavic ones just yet.
00:36 jnthn Would like to some day though. :)
00:37 mberends jnthn: o/
00:37 jnthn mberends!! :D
00:37 jnthn mberends: How's things?
00:38 colomon joined #perl6
00:38 mberends dobro jutro! Fine here in London, just had a dinner with much wine :-] <- happy glazed grinning look
00:39 colomon you have a dobro?   # http://en.wikipedia.org/wiki/Dobro
00:39 jnthn uh-oh...
00:39 jnthn oh, phew, it's something quite innocent :-)
00:40 jnthn colomon: I assume they are good. ;-)
00:40 jnthn mberends: That sounds nice :-)
00:40 jnthn mberends: I've just taken care of a Krusovice and am now onto a Trashy Blonde. :-)
00:41 colomon jnthn:  "Dobro means good in any language" was apparently an old company slogan
00:42 jnthn colomon: nice
00:43 jnthn colomon: Oooh! The founders were actually Slovak!
00:43 colomon yeah, I didn't know that until I read the wikipedia article just now.
00:43 jnthn Wow. :-)
00:43 jnthn slovakia++
00:44 dotan left #perl6
00:44 colomon I just knew a dobro was a cool resonator guitar, I know a guy from Toronto who plays one.  (In addition to playing guitar, mandolin, 4-string banjo, fiddle, etc.)
00:45 mberends colomon, you've culturally enlightened us :)
00:49 mberends with the Zavolaj patch from cxreg++, NativeCall can now reference any Parrot internal function by not specifying an external library. I'm sure that's quite significant, but I'm racking my woozy brane for actual examples to demonstrate this capability (apart from fork, which started the fun). Any ideas?
00:49 jnthn mberends: Segfaults!
00:49 * mberends shoots jnthn with a champagne cork
00:50 jnthn mberends: I struggle to think of a good practical use off-hand. I mean, most Parrot functionality is already exposed through PMCs etc.
00:51 mberends indeed
00:51 jnthn mberends: I wonder if you could use the embedding interface to embed Rakudo in itself.
00:51 jnthn ;-)
00:52 mberends pass that to the Department of Useless Information
00:52 jnthn mberends: Maybe call the libc backtrace function so you can write a module to print a C stack backtrace at any point in a Perl 6 program. :-)
00:53 jnthn That might even be occasionally useful. :-)
00:53 mberends that might actually work.. hmm, profiling hooks?
00:54 jnthn I think that's mostly done by running under a profiling runcore.
01:10 kkrev joined #perl6
01:16 [Coke] P6Object::HOW is the biggest sink on startup.
01:16 [Coke] and that's 3 lines of PIR that I don't see how to speedup.
01:17 jnthn [Coke]: Whoa...really?
01:17 [Coke] if I'm reading this right.
01:18 [Coke] ah, that could be inclusive.
01:18 [Coke] ah, much better. =-)
01:18 jnthn Yeah, but it shouldn't be calling anything, just returning something.
01:19 [Coke] also, the profiler could be stupidly broken. =-)
01:25 oha my @a := gather { ... @a[1..$x] ... }; # this works :)
01:25 drakej joined #perl6
01:27 [Coke] non inclusive, looks like Perl6::Cool.(but no function name given)
01:28 jnthn huh, weird
01:29 jnthn (the lack of name)
01:30 jnthn rakudo: Cool.^methods(:local).perl.say
01:30 p6eval rakudo f196e8: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ...
01:30 p6eval ..}, { …
01:30 jnthn rakudo: Cool.^methods(:local).join(', ').say
01:30 p6eval rakudo f196e8: OUTPUT«unpolar, floor, from-radians, asech, ord, capitalize, round, pred, split, match, acosh, words, lc, p5chop, to-radians, sinh, cotan, acotan, atan2, trim, asec, trim-leading, cotanh, ucfirst, sech, tan, rand, cos, truncate, fmt, trans, sqrt, asin, cosh, succ, subst, sign,
01:30 p6eval ..Numeric, ch…
01:33 jnthn [Coke]: It's kinda tricky to guess what's going on there.
01:34 jnthn [Coke]: Oh...the loadinit blocks are all anonymous
01:34 jnthn [Coke]: How dominant is it?
01:34 jnthn [Coke]: Also, is antying in ClassHOW quite high in the list?
01:34 drakej left #perl6
01:35 timbunce joined #perl6
01:38 [Coke] perl6cool and perl6any dominate.
01:39 [Coke] then parrot post compiler;pir
01:39 [Coke] then 3 anon _blocks.
01:39 [Coke] drops off after that.
01:40 jnthn [Coke]: Inclusive or exclusive?
01:42 sorear std: { package Foo { }; }; { package Foo { }; }
01:42 p6eval std 31795: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegal redeclaration of symbol 'GLOBAL::<Foo>' (from line 1) at /tmp/MLFseHD1cM line 1:␤------> [32m{ package Foo { }; }; { package Foo [33m⏏[31m{ }; }[0m␤Check failed␤FAILED 00:01 114m␤»
01:42 jnthn [Coke]: Also, any chance you could mail me the file you're feeding into kcachegrind?
01:42 TiMBuS joined #perl6
01:42 jnthn [Coke]: I'm a bit tired to do anything with this data tonight, but I'd like to browse it some more tomorrow.
01:43 sorear phenny: ask TimToady - STD.pm6:5623-5624 contains a check for $name ~~ /^\&/ && $name eq ''.  When is this true?
01:43 phenny sorear: I'll pass that on when TimToady is around.
01:45 [Coke] jnthn: I can show you how I created it, if you want. ^_^
01:46 jnthn [Coke]: Feel free to send that too - I have done so some time ago, but forgot the steps. :-)
01:46 jnthn (Thus why I have KCachegrind set up here already :-))
01:46 jnthn (Was some fun on Win32 :-))
01:50 [Coke] jnthn: I'll put it on feather:
01:50 [Coke] ┗━$━∫ scp parrot.out.2312.bz2 coke@feather.perl6.nl:public_html/
01:50 jnthn [Coke]: thanks
01:58 * jnthn -> rest
02:00 colomon how do you say to stderr?
02:01 colomon rakudo: $ERR.say "hello"
02:01 p6eval rakudo f196e8: OUTPUT«===SORRY!===␤Confused at line 22, near "$ERR.say \""␤»
02:01 colomon rakudo: $*ERR.say "hello"
02:01 p6eval rakudo f196e8: OUTPUT«===SORRY!===␤Confused at line 22, near "$*ERR.say "␤»
02:02 colomon hey, that one was right.  :\
02:02 colomon rakudo: note "Hello"
02:02 p6eval rakudo f196e8: OUTPUT«Hello␤»
02:02 xinming joined #perl6
02:08 lue wello o/
02:12 jaldhar joined #perl6
02:13 colomon \o
02:13 sorear Hi!
02:20 kkrev joined #perl6
02:29 colomon rakudo: say 90302 / 5151
02:29 p6eval rakudo f196e8: OUTPUT«17.530964861192␤»
02:35 Eevee joined #perl6
02:41 colomon pmichaud: ping?
02:44 colomon pmichaud: my current analysis suggests that the very straightforward for loop structure in mandelbrot is taking most of the execution time.
02:44 colomon much more time than the complex math
02:44 dalek niecza: 1e1b8ee | sorear++ |  (4 files):
02:44 dalek niecza: Make classes into a kind of package
02:44 dalek niecza: review: http://github.com/sorear/niecza/commit/1e1b8ee939053fe4fba80ac3ad5e30a3c3ddb6df
02:44 dalek niecza: 52f6d38 | sorear++ |  (2 files):
02:44 dalek niecza: Implement "grammar"
02:44 dalek niecza: review: http://github.com/sorear/niecza/commit/52f6d3847a8e33f16d505a4f6f606de185548252
02:46 sorear colomon: I can absolutely beleive that
02:47 colomon sorear: I'm glad one of us can believe it.
02:47 colomon I'm trying translating it to a "loop" loop right now.
02:48 colomon yeah, wow.
02:49 colomon total time with math, 10.5s
02:49 colomon with just loop, 10s
02:49 colomon er, that's a "for ^17" loop;
02:49 sorear lists are the first thing in niecza that actually needed to be microoptimized
02:49 colomon with "loop ($i = 0; $i < 17; $i++)" 2.75s
02:50 sorear they're suprisingly heaviweight
02:50 colomon with no loop at all, 1.5s
02:50 sorear and they're EVERYWHERE
02:50 colomon yeah
02:51 dalek niecza: 231d396 | sorear++ |  (2 files):
02:51 dalek niecza: Unbreak GLOBAL::
02:51 dalek niecza: It was a simple bootstrap problem, trying to create the initial $?GLOBAL
02:51 dalek niecza: before Scalar was defined.  Oops.
02:51 dalek niecza: review: http://github.com/sorear/niecza/commit/231d396aceed28d0c3c1da35f3075052dbb887aa
02:51 colomon the idea that rewriting to replace "for ^$total_iterations" with "loop ($i = 0; $i < $total_iterations; $i++)" might be such a massive improvement makes me kind of sad.
02:52 sorear well, we can do that replacement automatically
02:53 colomon as far as I know, there aren't any optimizations of that nature in Rakudo yet.
02:53 colomon personally, I'd hope to drastically improve list performance first.
02:53 colomon then make that transformation automatic.  :)
02:59 synth joined #perl6
03:00 TiMBuS rakudo: Any := 1; say 'ok?'
03:00 p6eval rakudo f196e8: OUTPUT«ok?␤»
03:00 TiMBuS 3:
03:01 sorear niecza: Any := 1; say 'ok?'
03:01 p6eval niecza 4aabaad: OUTPUT«can't open CORE_ast.store: No such file or directory at CompilerDriver.pm line 40␤»
03:01 TiMBuS aa, baad
03:02 sorear uh, moritz is running 'make' after pulls right?
03:05 colomon phenny: tell pmichaud that I knocked 60% off the mandelbrot-color.pl execution time by switching from "for ^$total_iterations" with "loop ($i = 0; $i < $total_iterations; $i++)" in the inner loop.  Complex math appears to have relatively little effect on the overall execution time for this script.
03:05 phenny colomon: I'll pass that on when pmichaud is around.
03:05 TiMBuS i can't really follow the code in infix:<:=>. pir::isnull(pir::getprop__PsP('type', $target)) seems to always be null
03:06 justatheory joined #perl6
03:06 TiMBuS or always not null? well, its not entering the if loop
03:06 TiMBuS if block* i think my brain is broken
03:09 meppl joined #perl6
03:12 _jaldhar joined #perl6
03:16 envi^home joined #perl6
03:20 kkrev joined #perl6
03:23 TiMBuS rakudo: my Int $a; $a := 'string'; $a.say
03:23 p6eval rakudo f196e8: OUTPUT«You cannot bind a variable of type Str() to a variable of type Int().␤  in 'infix:<:=>' at line 678:CORE.setting␤  in main program body at line 22:/tmp/7Wqu_Yvxhx␤»
03:24 cruftius_minimus joined #perl6
03:25 TiMBuS rakudo: my @a; @a.WHAT.say
03:25 p6eval rakudo f196e8: OUTPUT«Array()␤»
03:43 kkrev joined #perl6
03:46 dalek niecza: 1521ceb | sorear++ |  (3 files):
03:46 dalek niecza: Implement sub is export
03:46 dalek niecza: review: http://github.com/sorear/niecza/commit/1521ceb24ca4ba17d2042783d2d522ee730b179e
03:46 dalek niecza: 64fc764 | sorear++ |  (2 files):
03:46 dalek niecza: Factor out ok and plan into Test.pm6
03:46 dalek niecza: review: http://github.com/sorear/niecza/commit/64fc7648b98818e90832a33c5f7f1d110bd8e716
03:48 sorear Why is module_name a proto regex?
03:57 DemoFreak joined #perl6
03:59 meppel joined #perl6
04:00 kkrev joined #perl6
04:19 TimToady sorear: we used to have a variant form to recognize 'use v6-alpha' after that was no longer stadard
04:19 phenny TimToady: 01:43Z <sorear> ask TimToady - STD.pm6:5623-5624 contains a check for $name ~~ /^\&/ && $name eq ''.  When is this true?
04:19 sorear ah.
04:19 TimToady and my line 5623 doesn't look like that
04:21 kkrev joined #perl6
04:22 kjjkvnf joined #perl6
04:24 sorear mine looks like             elsif $name ~~ /^\&/ { self.sorry("Illegal redeclaration of routine '$sid'$loc") unless $name eq '';
04:26 TimToady yeah, found it
04:26 sorear what line is that for you?
04:27 TimToady the previous routine had s/\&// there
04:27 agentzh joined #perl6
04:27 pugssvn r31796 | lwall++ | [STD] various little cleanups
04:37 kkrev joined #perl6
04:43 pmichaud good evening, #perl6
04:43 phenny pmichaud: 03:05Z <colomon> tell pmichaud that I knocked 60% off the mandelbrot-color.pl execution time by switching from "for ^$total_iterations" with "loop ($i = 0; $i < $total_iterations; $i++)" in the inner loop.  Complex math appears to have relatively little effect on the overall execution time for this script.
04:44 pmichaud ah, since my next plan was to update 'for', that information is timely.  :)
04:44 pmichaud colomon: ping
04:47 kkrev joined #perl6
04:50 astrojp left #perl6
04:52 sorear uh oh, what is pmichaud going to do to for
04:54 pmichaud fix it so it uses .map (as it's supposed to)
04:54 TimToady does .map still use introspection rather than partial binding?
04:54 pmichaud yes.
04:54 sorear partial binding?
04:55 pmichaud I know we need to fix that...but we'll likely look at it as part of jnthn++'s other refactors happening in the next 3-4 months
04:55 kkrev joined #perl6
04:55 pmichaud it'll be much cleaner to do then.
04:55 TimToady sorear: when you bind to sig such as for map -> $a, $b, just let the binder count the args are turn the new arg cursor
04:56 TimToady s/are/and/
04:56 TimToady /turn/return/
04:56 ashleydev joined #perl6
04:57 TimToady it's part of the reason for the switch to immutable cursors
04:58 sorear What's the advantage of the New Way?
04:59 pmichaud better mapping to multis
05:00 pmichaud simply using .count isn't sufficient to know how many args to use when using .map with a multi
05:02 TimToady and just a basic feeling that introspection should be used only as a last resort
05:03 mafs joined #perl6
05:06 TimToady signature matching is just another form of pattern matching, really
05:09 sorear Is it possible to do partial binding from Perl 6, or is it an implementation hook thingie?
05:11 pmichaud iirc, part of the reason for defining it was to make it possible to do in Perl 6
05:11 pmichaud otherwise we have a key operation that isn't expressible in Perl 6 :)
05:12 pmichaud jnthn, moritz, masak, colomon (and others):  I'd like to hold the freeze on PARROT_REVISION through the R* release.  Let me know if it looks like we won't be able to do this.
05:13 justatheory joined #perl6
05:21 kkrev joined #perl6
05:31 dalek niecza: 99b7b7e | sorear++ |  (5 files):
05:31 dalek niecza: Implement use statements
05:31 dalek niecza: review: http://github.com/sorear/niecza/commit/99b7b7e7d1c4c118000956b28a93625e1770b84e
05:31 dalek niecza: 3402517 | sorear++ |  (2 files):
05:31 dalek niecza: Build and use Test.dll as part of the test system
05:31 dalek niecza: review: http://github.com/sorear/niecza/commit/34025174ea51d48728a860a4dd957fe2a62d9fd4
05:35 kkrev joined #perl6
05:43 kkrev joined #perl6
05:45 sorear niecza *could* run spectests now, but all the ones I'm looking at use features that aren't going to be implemented anytime soon
05:45 sorear most importantly 'eval'
05:47 * sorear decides it's time to flesh out the regex compiler
05:47 pmichaud sorear: I feel your pain.  I didn't like the fact that the spectests relied so much on eval() either.
05:48 pmichaud you might be able to get by with having things like dies_ok simply skip the test altogether.
05:50 kkrev joined #perl6
05:52 cxreg pmichaud: you still trying to get parrot fixes in?
05:54 cxreg looks like it might come down to the wire on pg 9.0 vs r*
05:55 cxreg maybe not, they're saying mid-august
05:56 pmichaud cxreg: I'm planning that R* will use the 2.6.0 release of Parrot
05:56 pmichaud so, if a fix is not in already, it's not likely to make it for R*, unless it's Very Important
05:57 pmichaud but as long as it makes it into Parrot 2.7.0 it should be able to go into R*'s august release
05:57 sorear for some reason I thought R* was trimonthly
05:59 pmichaud well, ideally I'd like it to be trimonthly, but I think realistically we'll have too many early bugfixes and changes for the first few months to do that
05:59 pmichaud so we'll start out monthly, and then as the fix flood dissipates we'll slow down to bimonthly or trimonthly
06:01 pmichaud if R* has a relatively easy way to say "update my compiler to a later version" then we might be able to not do monthly releases early on.  (and R* should probably have that feature :)
06:02 TiMBuS how do you tell what 'type' of scalar was passed to a function. referring to the sigil type ($, @, or %)
06:03 TiMBuS not the actual type of the variable
06:03 pmichaud TiMBuS: I don't quite understand the question.
06:04 kkrev joined #perl6
06:05 TiMBuS pmichaud, well I'm trying to fix &infix:<:=> so it properly checks the 'type' of the sigil for assignment
06:06 TiMBuS @a := 'foo' should be disallowed for example (according to moritz_)
06:06 pmichaud the variable already knows its type
06:07 pmichaud you don't have to check the sigil at runtime
06:07 pmichaud it's already been placed into the container's 'type' property
06:07 pmichaud rakudo:  my @a := 'foo';  # testing
06:07 p6eval rakudo f196e8:  ( no output )
06:07 pmichaud rakudo:  my @a := 'foo';  say @a; # testing
06:07 p6eval rakudo f196e8: OUTPUT«foo␤»
06:08 pmichaud rakudo:  my @a;  say pir::getprop__PsP('type', @a);
06:08 p6eval rakudo f196e8: OUTPUT«Null PMC access in type()␤  in main program body at line 22:/tmp/ZVhnYAokbM␤»
06:08 TiMBuS yeah but @a implies 'does Positional'
06:08 pmichaud hmmmmmm
06:08 pmichaud right
06:08 TiMBuS my Array @a
06:08 cxreg i'm having some pretty epic fail trying to execute NCI functions from plparrot so far :D
06:08 TiMBuS however,
06:08 pmichaud so it's supposed to already have a Positional 'type' property
06:08 pmichaud so, that's a bug in the code that sets up @a, not the code that does ':='
06:09 TiMBuS that always returns null unless you set it
06:09 pmichaud TiMBuS: and it should've been set by the declaration.
06:09 TiMBuS rakudo:  my Array @a; say pir::getprop__PsP('type', @a);
06:09 TiMBuS ah
06:09 p6eval rakudo f196e8: OUTPUT«Null PMC access in type()␤  in main program body at line 22:/tmp/FR2KGiPTmY␤»
06:09 TiMBuS well that usually works :/
06:09 TiMBuS maybe i did it wrong
06:10 pmichaud well,  my Array @a means  "Positional of Array"
06:10 pmichaud anyway, the problem is in the @a declaration, not :=
06:11 TiMBuS how about this one:
06:11 TiMBuS rakudo: Any := 1; say 'ok'
06:11 p6eval rakudo f196e8: OUTPUT«ok␤»
06:11 kkrev joined #perl6
06:12 pmichaud for that one, we need to have a property that distinguishes containers from values, I suspect
06:12 pmichaud and := should check for that property
06:12 pmichaud there's also been speculation of a "bindrw" property, that indicates whether something can be rebound or no.  That would also solve that problem.
06:16 TiMBuS that's a little bit over my head now. I don't know how/where rakudo sets up its pmcs (actions.pm?)
06:18 snarkyboojum joined #perl6
06:18 pmichaud yes, actions.pm
06:19 pmichaud jnthn++ would be able to say exactly where the type information gets attached to the declared variable
06:19 pmichaud oh, for "Any := 1"  we just need to decide how to mark that something is bindable.
06:21 TiMBuS if something is readonly can you bind it to something? if not you could check for rw
06:22 pmichaud there's two forms of readonly-ness
06:22 pmichaud there's the readonly-ness of the container for assignment
06:22 pmichaud and readonly-ness for binding
06:22 pmichaud they're separate operations
06:23 pmichaud sub foo($x is rw) { ... }    # one can assign to $x and bind $x
06:23 pmichaud sub foo($x) { ... }   # one can rebind $x but cannot assign to it
06:23 TiMBuS ahh its pointer const all over again
06:24 szabgab I have not been following it, is there any news about a windows installer for Rakudo * that would also include Padre ?
06:24 phenny szabgab: 00:24Z <jnthn> tell szabgab PythonPup is looking for non-Flash versions of your Perl 6 screencasts; I know you mentioned some AVI version or something to. Is there a link to them somewhere?
06:25 pmichaud szabgab: I haven't heard anything like that yet.
06:25 szabgab I saw it somewhere discussed
06:25 szabgab but maybe I just dreamt :)
06:25 pmichaud then I don't know.  That sounds like it would be very useful.
06:25 pmichaud could padre be installed via 'proto'?
06:26 pmichaud or is that just asking too much?
06:27 PythonPup szabgab, Yes, I would like to watch the screencasts, but I can't install Flash.  Are they available in another form?
06:27 szabgab pmichaud: I think the better approach would be to bundle rakudo with stand alone padre
06:28 pugssvn r31797 | pmichaud++ | [t/spec]:  Fix test bug in next/last for .map, unfudge test.
06:28 PythonPup pmichaud has been talking up perl6 locally and I'd like to see where it is at now.
06:28 kkrev joined #perl6
06:28 szabgab PythonPup: I have bot ogv and avi files on my disk
06:28 pmichaud szabgab: probably.  But I think that means we'd need separate Windows and *nix Rakudo Star distributions.
06:28 pmichaud (which we might indeed need -- just not sure we'll be ready for that by Thursday)
06:28 szabgab PythonPup: I can upload them to my server and link to them as well
06:29 sjohnson joined #perl6
06:29 PythonPup szabgab, ogv is almost always my first choice.  That would be nice.  Thanks.
06:29 szabgab pmichaud: I am not sure how you would NOT need? After all parrot is binary there
06:30 dalek rakudo: 369f1e0 | pmichaud++ | src/builtins/control.pir:
06:30 dalek rakudo: Refactor &return, &next, &last, &redo.
06:30 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/369f1e077698371c2f95067d54c24407f9959a2d
06:30 dalek rakudo: da9910a | pmichaud++ | src/builtins/MapIter.pir:
06:30 dalek rakudo: Add loop control handling to MapIter.
06:30 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/da9910a24bac3321e40a9bb5ca4ef89f83ab3c3a
06:30 dalek rakudo: 27f7a5b | pmichaud++ | src/builtins/MapIter.pir:
06:30 dalek rakudo: Some next/last bugfixes for .map .
06:30 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/27f7a5bf6bd63352d9fcb5999b609ac4ce44d3e5
06:31 pmichaud ...parrot is binary?
06:31 szabgab btw have any people came to the channel in response to my latest screencast?
06:31 pmichaud I don't understand.
06:31 szabgab Rakudo * would include Parrot, right?
06:32 szabgab compiled to the local OS
06:32 szabgab so that's already different
06:32 pmichaud I think it's going to include the Parrot sources
06:32 szabgab oh so you are only talking about source code distro
06:32 pmichaud I don't think it will include binaries.  If we do that, we'd have to build a different Rakudo * for each platform, and we're not yet at all close to being set up to do that.
06:32 pmichaud it's a distro in the same sense that Perl 5.12 is a distro
06:33 szabgab ok, I got it now
06:33 pmichaud I expect that we'll create a source distro, and then individual platforms will take R* and build binaries using their native package managers
06:33 pmichaud in the Windows case, it should be possible to bundle Padre as well at that point
06:34 pmichaud eventually we may be building the binaries directly... but probably not for this first release.
06:34 pmichaud (I don't think anyone on the current team has much expertise in that anyway... so I'm hoping we'll attract more contributors there.)
06:34 pmichaud also, we can hand out commitbits to the R* repo more freely (i.e., without CLAs)
06:35 sorear TiMBuS: Don't worry about getting := exactly right
06:35 sorear TiMBuS: it's not going to be possible to have := right until the variable refactor
06:35 sorear so just try to do the best approximation
06:36 szabgab I just ping CSJewell on #padre asking for a bundle of Padre and Rakudo * but he might be sleeping at this hour :)
06:36 PythonPup szabgab, I came to the channel as a result of an article about your screencast that was mentioned on Hacker News.
06:36 szabgab PythonPup: link?
06:39 TiMBuS sorear, ok then. I'll see if I can at least add the 'type' property to vars at declaration time. that'll probably be 'good enough'
06:39 PythonPup article 190 currently points to http://szabgab.com/perl6.html#screencast
06:40 PythonPup It is described as  Perl6's screencasts
06:44 moritz_ good morning
06:45 sorear good morning moritz_
06:51 kkrev joined #perl6
06:59 szabgab PythonPup: the first two entries were uploaded: http://szabgab.com/perl6.html  please let me know if they work for you
07:00 gfx joined #perl6
07:02 PythonPup I am playing the first one now.  It looks good.  Thank you.
07:04 dalek nqp-rx: 11e10ac | moritz++ | src/Regex/Cursor.pir:
07:04 dalek nqp-rx: Fixt RT #75484 - random incomplete Match objects
07:04 dalek nqp-rx: Patch courtesy by Francesco Rivetti
07:04 dalek nqp-rx: oha++
07:04 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/11e10acb379a69ee2f3c9e0f17391c27737127ab
07:04 dalek nqp-rx: f8bc67e | moritz++ | src/stage0/ (4 files):
07:04 dalek nqp-rx: update bootstrap files with fix for RT #75484
07:04 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/f8bc67e9754d4ff394a387509d248b664e536c13
07:06 pmichaud moritz:  in backscroll I left a note that I'm wanting to hold the PARROT_REVISION freeze until after R*.  Does the commit above pose a problem for that?
07:07 moritz_ pmichaud: no, we can wait until after R* with that
07:07 pmichaud okay, good.
07:07 moritz_ it's something that re-surfaces every few months, and I'm glad when it's fixed, but it's not that important
07:07 moritz_ oha++
07:08 moritz_ I've added the bootstrap files to the parrot 2.6 release locally to test it
07:08 moritz_ testing parrot now
07:11 * sorear just had an extremely evil idea for niecza
07:11 sorear method WHICH() { (state %){self} //= (state $)++ }
07:12 sorear the CLR doesn't give you a unique integer for each object, but it does give you hash tables.
07:15 Raynes joined #perl6
07:17 kkrev joined #perl6
07:34 kkrev joined #perl6
07:43 kkrev left #perl6
07:45 ManateeLazyCat joined #perl6
07:55 envi_home joined #perl6
07:58 ManateeLazyCat left #perl6
08:03 pmichaud std:  say Nil 3, 4
08:03 p6eval std 31797: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/iE8VvV7qii line 1:␤------> [32msay Nil [33m⏏[31m3, 4[0m␤    expecting any of:␤   bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 116m␤»
08:03 szabgab rakudo: say 2 ++ 3
08:03 p6eval rakudo 27f7a5: OUTPUT«5␤»
08:03 szabgab rakudo: say 2 +++ 3
08:03 p6eval rakudo 27f7a5: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/yCQtOUWo72␤»
08:04 szabgab rakudo: say 2 ++ + 3
08:04 p6eval rakudo 27f7a5: OUTPUT«5␤»
08:04 szabgab rakudo: say 2 ++ ++ + 3
08:04 p6eval rakudo 27f7a5: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/09Dnu6H6i1␤»
08:05 sorear niecza: say 2 ++ + 3
08:05 p6eval niecza 64fc764: OUTPUT«[31m===[0mSORRY![31m===[0m␤Postfix found where infix expected (omit whitespace?) at /tmp/CGOrMgwOdD line 1:␤------> [32msay 2 [33m⏏[31m++ + 3[0m␤    expecting any of:␤   bracketed infix␤  infix␤  infix or meta-infix␤Parse failed␤»
08:06 szabgab rakudo: 2++3
08:06 p6eval rakudo 27f7a5: OUTPUT«===SORRY!===␤Confused at line 22, near "2++3"␤»
08:06 moritz_ std: 2++3
08:06 p6eval std 31797: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/j7foCAKQw7 line 1:␤------> [32m2++[33m⏏[31m3[0m␤    expecting any of:␤   POST␤   bracketed infix␤    infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤       statement modifier loop␤Parse
08:06 p6eval ..failed␤FAILED 00:01 115m␤»
08:15 oha_ joined #perl6
08:22 dalek niecza: 5799a21 | sorear++ | Niecza/Actions.pm:
08:22 dalek niecza: Implement &foo syntax
08:22 dalek niecza: review: http://github.com/sorear/niecza/commit/5799a21f67d80de77639b42ec43b22d09766d9ca
08:22 dalek niecza: e71aae9 | sorear++ |  (2 files):
08:22 dalek niecza: Implement exportation of packageoids
08:22 dalek niecza: review: http://github.com/sorear/niecza/commit/e71aae98001fd2edb51114a602ecfd946e1a9961
08:22 dalek niecza: 41d943c | sorear++ |  (3 files):
08:22 dalek niecza: Turn the regex engine into a loadable module
08:22 dalek niecza: review: http://github.com/sorear/niecza/commit/41d943c3edac61b1500f9281075e08f9bcec7f7a
08:22 dalek niecza: 6d24c27 | sorear++ | Niecza/Actions.pm:
08:22 dalek niecza: Fix classes always turning into Any() when exported
08:22 dalek niecza: review: http://github.com/sorear/niecza/commit/6d24c27a334a3aec08fd49d0aef2ca42e88b0995
08:23 sorear stefan@stefans:~/niecza$ ./niecza_eval -e 'use RegexEngine; say "abcaaab" ~~ /ca*b/'
08:23 sorear 1
08:23 sorear soon there will be a few more features...
08:27 pmichaud ....just catching up on twitter posts... wow.
08:27 pmichaud Lots of retweets of "Perl Creator Hints at Imminent Perl 6 Release"  :)
08:29 sorear "hints"?
08:30 sorear Aren't hints supposed to be subtle?
08:31 pmichaud no, not necessarily.
08:31 pmichaud my wife has learned that her hints to me have to be non-subtle or I'm likely to miss them altogether :)
08:31 sorear pugs: say $*IN.lines.[0]
08:31 p6eval pugs: OUTPUT«*** No such method in class Scalar: "&lines"␤    at /tmp/x2wxfeR7iP line 1, column 5 - line 2, column 1␤»
08:32 sorear pugs: say lines
08:32 p6eval pugs: OUTPUT«*** No such subroutine: "&lines"␤    at /tmp/53DNf3hFzM line 1, column 5 - line 2, column 1␤»
08:32 sorear pugs: say $*IN.^methods(:local)
08:32 p6eval pugs: OUTPUT«*** No such method in class Class: "&methods"␤    at /tmp/wI5weXskgp line 1, column 5 - line 2, column 1␤»
08:32 sorear pugs: say slurp
08:32 p6eval pugs: OUTPUT«*** ␤    Unexpected end of input␤    at /tmp/ZCMJxGF_GQ line 2, column 1␤»
08:32 * sorear out
08:33 envi_home2 joined #perl6
08:34 cibs joined #perl6
08:34 oha i expect that gather { .. } return an object, is there a way to refer to it inside gather { ... } ?
08:35 oha something like "self"
08:35 pmichaud gather returns a List
08:35 dalek niecza: b417e13 | sorear++ | RegexEngine.pm6:
08:35 dalek niecza: Implement ? and + in regexes
08:35 dalek niecza: review: http://github.com/sorear/niecza/commit/b417e13b8b288e1d10735770c1e79b72d266e9a1
08:35 pmichaud I don't think there's a way to refer to it from inside the gather.
08:35 oha actually if i @list := gather { ... @list ... } # works
08:36 cognominal rakudo:  sub a($a) { $a = 1 }; a(1)
08:36 p6eval rakudo 27f7a5: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in 'a' at line 22:/tmp/k4o2wB9hR7␤  in main program body at line 22:/tmp/k4o2wB9hR7␤»
08:38 envi^home joined #perl6
08:39 cognominal rakudo:  sub a(int $a) { $a = 1 }; a(1)
08:39 p6eval rakudo 27f7a5: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 22, near " $a) { $a "␤»
08:40 envi_home3 joined #perl6
08:41 cognominal rakudo:  sub a($a is copy) { $a = 1 }; a(1)
08:41 p6eval rakudo 27f7a5:  ( no output )
08:42 szabgab rakudo: state $x = 2;
08:42 p6eval rakudo 27f7a5: OUTPUT«===SORRY!===␤"state" not yet implemented at line 22, near "= 2;"␤»
08:43 cognominal hum, with value argument not implemented, that will make signature so verbose :(
08:45 cognominal sub a(int $a) { $a = 1 }; a(1)   # would be nice to  implement it as to accept an Int and check it for non borderline values (NaN, undefined and such)
08:47 cognominal rakudo:  sub b ($a is rw) {}; sub a($a) { b($a) }; a(1)
08:47 p6eval rakudo 27f7a5:  ( no output )
08:54 kensanata joined #perl6
08:58 colomon pmichaud: pong
08:59 JimmyZ joined #perl6
09:02 JimmyZ hello , does Perl 6 support something like __call/__get/__set in PHP?
09:04 JimmyZ just think it's useful in OO
09:05 mberends cognominal: bonjour, how's Silver Bullet coming along?
09:11 pugssvn r31798 | pmichaud++ | [t/spec]:  Refudge a test in wrap.t that fails after switching 'for' to use '.map'.
09:12 cognominal Hi mberends. Hitting many problems with pattern matching and the like... Maybe I am too obsessed with experimenting with every Perl 6 feature than getting a deliverable :(
09:12 pmurias joined #perl6
09:13 mberends cognominal: addicted to 'le crack syntaxique' ?
09:14 cognominal :)
09:14 dalek rakudo: f16df61 | pmichaud++ | src/ (2 files):
09:14 dalek rakudo: Refactor Block.arity and Block.count; we now compute and cache it as
09:14 dalek rakudo: part of the .signature.
09:14 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f16df61d9687c765b005cc142e2476e14fb78384
09:14 dalek rakudo: 7d181b9 | pmichaud++ | src/builtins/Signature.pir:
09:14 dalek rakudo: Fix forgotten goto after counting slurpy param.
09:14 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7d181b9854c914541488ac049523dc920ebec56b
09:14 dalek rakudo: b0e743b | pmichaud++ | src/Perl6/Actions.pm:
09:14 dalek rakudo: Switch statement_control:sym<for>  to use ".map" instead of :pasttype<for>.
09:14 dalek rakudo: At the moment, the 'for' statement is still "eager"; this maintains a bit
09:14 dalek rakudo: of continuity and compatibility until sink is more fully in place
09:14 dalek rakudo: (coming next).
09:14 jferrero joined #perl6
09:29 isBEKaml joined #perl6
09:29 dual joined #perl6
09:41 szabgab how can I export a subroutine from a module to the main namespace?
09:43 szabgab found it, never mind :)
09:56 pmurias szabgab: you shouldn't be doing that
09:57 colomon pmurias: why?
09:58 pmurias maybe i misunderstood the question
09:59 pmurias but you should import stuff to lexical scopes
09:59 pugssvn r31799 | pmichaud++ | [t/spec]:  Remove tests that incorrectly treat Nil as a function.
09:59 pmurias szabgab: you want to do something like export stuff from Foo::Bar::Internals to Foo::Bar
09:59 szabgab so instead of automatically export it I should import?
10:00 szabgab for now I am writing a sample implementation of the Mython language
10:00 szabgab my $answer ← 42;
10:00 szabgab say 2 ≠ 3;
10:00 szabgab say 2↑2;
10:00 szabgab stuff like this
10:01 szabgab so I'd like to have as little disturbance as possible , and declare the infix operators in Mython.pm
10:01 szabgab is there already a way to extend perl 6?
10:02 pmurias you mean add new operators or extend the grammar?
10:02 pmichaud iiuc, the standard mechanism for exporting things is simply to mark them as "is export".
10:02 szabgab oh I see there is a Mython language :(
10:02 szabgab f ← λ x: x↑2
10:02 szabgab a ← f(2)
10:03 szabgab ideally I' be able to write code like the above
10:03 pmurias pmichaud: but things are exported to the lexical scope not the main namespace by default
10:03 pmichaud pmurias: correct
10:03 colomon szabgab: as far as I know, exporting operators from modules does not work properly yet.
10:03 szabgab it worked for me :)
10:03 colomon at least, I had major issues with it when I tried it last week.
10:03 pmichaud pmurias: ...depending on what you mean by "main namespace"  :-)
10:03 szabgab with is export
10:04 xinming joined #perl6
10:04 pmichaud it wouldn't surprise me if it appears to work in some cases and not in others
10:04 pmichaud (in Rakudo)
10:04 pmichaud jnthn and I did some revisions of operator overloading late last week, though
10:05 pmichaud (maybe even early this week -- I'm not sure I remember when.... checking log)
10:05 colomon oooo.
10:05 colomon will try things again
10:05 szabgab let's hope it will work on the version I am using on monday for the presentation :)
10:05 pmichaud I know there's a problem that overloaded operators will "leak" out of the lexical scopes in which they're supposed to be.
10:05 szabgab jnthn: had some awesome example of sorting I think at BPW
10:05 colomon pmichaud: turns out the biggest concern with the mandelbrot tests isn't the speed, it's the crashing.  :(
10:06 szabgab but I have not written it down   it started with something like    multi sub f([]) { }  I think
10:06 szabgab anyone with such cool examples?
10:06 pmichaud colomon: I'm curious to know if mandelbrot runs any faster/slower using 'for' and the fixes I just pushed this evening.
10:07 pmichaud szabgab: http://en.wikipedia.org/wiki/Perl_6#Quicksort
10:07 colomon pmichaud: yow, that's a major overhaul!
10:08 colomon give me a moment and I'll do a side-by-side comparison on my linux box.
10:08 szabgab pmichaud: thanks
10:08 pmichaud colomon: that's fine.  it could be either faster or slower -- I don't know which.
10:08 szabgab he said wiki but I was searching in the perl 6 wiki
10:08 pmichaud it does eliminate the use of the Parrot iterator, though
10:08 szabgab and could not find it
10:09 pmichaud szabgab: I found it with "perl 6 quicksort" on google :)
10:10 pmichaud colomon: more importantly, it starts to bring 'for' to follow the true specification by making it the same as 'map'
10:10 colomon pmichaud: right
10:11 pmichaud next I plan to work on sink context a bit, so that 'for' at the end of a statement list isn't evaluated eagerly.
10:12 pmichaud and by "next" I mean "after going to sleep and awakening again".  :-)   It's 03h12 here now...
10:13 colomon pmichaud: it's going to be a bit before I have results, have to rebuild rakudo to yesterday then re-run.
10:14 pmichaud colomon: no problem -- I'll read the backscroll later
10:14 pmichaud and I'm more curious than "need to know".  I suspect the loop() form is still a bit faster, although at some point we need to find a way to make that not be the case
10:15 pmichaud anyway, I'm falling asleep at the kbd here, so I'll bbiaw
10:15 colomon o/
10:27 wamba joined #perl6
10:43 envi^home joined #perl6
10:43 colomon pmichaud: took 8m25s pre-new-for, 8m35s with latest Rakudo
10:45 colomon that's on my 64-bit Linux box with lots of memory, versus the "loop" version taken 4m30s on my slower MacBook Pro.
10:49 colomon s/taken/which takes/
10:53 envi_home2 joined #perl6
10:57 whiteknight joined #perl6
11:06 envi^home joined #perl6
11:25 xabbu42 joined #perl6
11:36 envi_home2 joined #perl6
11:38 colomon pmichaud: hmmm, just tried Vector again to check on operators and modules.  Seems that the new dot product infix:<⋅> operator exports correctly, but infix:<+> for Vector does not.
11:40 envi^home joined #perl6
11:57 dalek rakudo: 9c4a3c8 | moritz++ | src/Perl6/ (2 files):
11:57 dalek rakudo: allow compilation of :g(1) in s///
11:57 dalek rakudo: partially reverts 4195e9a26e1841c80b999303a81d4706f456e2bb.
11:57 dalek rakudo: Patch mostly by jnthn++
11:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9c4a3c80b3bb11f36e939e87f68d8ff4df1fccf0
11:57 dalek rakudo: 3f03fec | moritz++ | src/core/Match.pm:
11:57 dalek rakudo: preserve .ast in Match.new. Implement eqv for matches
11:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3f03fec0e91362e66527063ee9f86cd7e2e0b798
12:02 pugssvn r31800 | colomon++ | Add test for exporting a multi infix:<+> operator.
12:03 pugssvn r31801 | colomon++ | [t/spec] Update the count on import-subs.t.
12:04 colomon moritz_: you out there?
12:04 moritz_ yes
12:05 colomon I need another brain on this.
12:05 colomon .oO(or possibly, I need a brain on this)
12:05 moritz_ on what?
12:05 * moritz_ lacks context
12:05 colomon I'm trying to Vector.pm working on current Rakudo.
12:06 colomon It compiles fine.
12:06 colomon but when I try to import it and its infix:<+>, I get Can't take numeric value for object of type Vector
12:06 colomon ie, it ignores infix:<+>(Vector, Vector) in favor of infix:<+>(Any, Any)
12:07 moritz_ did you check the candidate list, with Mu + Mu?
12:07 colomon I figured it was something ...
12:07 colomon wait, what?  just say Mu + Mu, or... ?
12:07 moritz_ rakudo: Mu + Mu
12:07 p6eval rakudo b0e743: OUTPUT«No applicable candidates found to dispatch to for 'infix:<+>'. Available candidates are:␤:(Any $x = { ... })␤:(Int $a, Int $b)␤:(Num $a, Num $b)␤:(Rat $a, Rat $b)␤:(Rat $a, Int $b)␤:(Int $a, Rat $b)␤:(Complex $a, Complex $b)␤:(Date $d, Int $x)␤:(Int $x, Date $d)␤:(Real $a,
12:07 p6eval ..Real $b)…
12:07 moritz_ that gives you the candidate list
12:08 moritz_ in the error message
12:08 colomon (what I started to say is that I thought it just hadn't been implemented, so I added a test for it to the spectests -- and that test works.)
12:08 moritz_ jnthn++ for it
12:08 colomon jnthn++ moritz_++
12:08 moritz_ last I looked, the test suite only had tests for importing new operators, not importing additional multis
12:08 moritz_ and multis weren't exported last I looked, either
12:09 colomon moritz_: yes, as I said, I just added a test for that, and the test works.
12:09 moritz_ "huh"
12:09 colomon see Exportops.pm and imported-subs.t
12:09 moritz_ colomon: did you try it with and without precompilation?
12:09 colomon yeah, exactly.
12:09 colomon yes (with and without)
12:10 colomon I've been running without for the last bit here, just because it's easier on my "think up something crazy and try it" debugging cycle
12:10 szabgab huh, what is this Parrot rewrite thing and how does it affect Rakudo?
12:10 szabgab http://blog-en.jochen.hayek.name/2010/07/parrot-everything-we-have-heard-so-far.html
12:11 moritz_ szabgab: the idea is to make JIT compilation easier by introducing a micro code ("Lorito")
12:11 colomon moritz_: Vector + is definitely not in the applicable candidates
12:11 moritz_ colomon: thought so
12:12 colomon oh, that's interesting
12:12 moritz_ colomon: you haz no 'is export' on infix:<+> in Vector.pm
12:12 colomon I just tried the Mu+Mu trick in imported-subs.t, and it doesn't see any + OTHER than the one I just defined.
12:13 moritz_ then add a (probably failing) test for the ordinary +
12:13 colomon already on it.
12:14 colomon as for Vector, here's my current signature:
12:14 colomon multi sub infix:<+> (Vector $a, Vector $b where { $a.Dim == $b.Dim }) is export(:DEFAULT)
12:15 colomon agh, so in test suite version, we can only see special infix:<+>
12:15 colomon in Vector version, we see everything but the special infix:<+>
12:15 colomon seems like there's a strong clue there somewhere.
12:15 JimmyZ joined #perl6
12:15 moritz_ looks like http://rt.perl.org/rt3/Ticket/Display.html?id=74104
12:16 colomon could it have something to do with "module Exportops;" ?
12:16 moritz_ maybe
12:16 colomon weird
12:17 JimmyZ hello
12:17 moritz_ maybe try to put the operators into the class (weird, I know), and add an 'is export' to them
12:17 envi_home2 joined #perl6
12:19 pugssvn r31802 | colomon++ | [t/spec] Add additional test for importing infix:<+> which is very fudged.
12:20 colomon moritz_++: if I put it inside the class, it is visible, and everything else is hidden.
12:21 moritz_ so if you do a 'use Foo', it only imports from module or class Foo
12:21 moritz_ which kinda makes sense
12:21 JimmyZ class Foo { }; class Bar{ method a() { } };, I want to call  Foo.(), and I want Foo object can automatically call Bar.a() when there is no a() method in Foo. How can I do it?
12:21 JimmyZ err, I want to call Foo.a()
12:22 moritz_ rakudo: class Foo { has $.x handles <a> = ::Bar }; class Bar { method a() { say "in Bar.a" } }; Foo.new.a
12:22 p6eval rakudo b0e743: OUTPUT«in Bar.a␤»
12:22 moritz_ JimmyZ: like that?
12:23 patrickas joined #perl6
12:23 szabgab is the a 3rd part for < and  lt  operators similar to cmp to <=> and leg ?
12:23 moritz_ szabgab: yes, it's called 'before'
12:23 moritz_ rakudo: say 'a' before 'b'
12:23 p6eval rakudo b0e743: OUTPUT«1␤»
12:24 JimmyZ moritz_: I am not sure, just like magic method __call in PHP,
12:24 szabgab rakudo: 1 before '1'
12:24 moritz_ rakudo: say 2 before 10
12:24 p6eval rakudo b0e743:  ( no output )
12:24 p6eval rakudo b0e743: OUTPUT«1␤»
12:24 szabgab rakudo: 1 before 'a'
12:24 felliott joined #perl6
12:24 p6eval rakudo b0e743:  ( no output )
12:24 szabgab rakudo: say 1 before 'a'
12:24 p6eval rakudo b0e743: OUTPUT«1␤»
12:24 moritz_ rakudo: class Foo { method postcircumfix:<( )>() { Bar.a() } }; class Bar { method a() { say "in Bar.a" } }; Foo.new.a
12:24 p6eval rakudo b0e743: OUTPUT«Method 'a' not found for invocant of class 'Foo'␤  in main program body at line 22:/tmp/VrkCNNqix8␤»
12:24 moritz_ rakudo: class Foo { method postcircumfix:<( )>() { Bar.a() } }; class Bar { method a() { say "in Bar.a" } }; Foo.()
12:25 p6eval rakudo b0e743: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in 'Foo::postcircumfix:<( )>' at line 22:/tmp/jYcjBiGHqc␤  in main program body at line 22:/tmp/jYcjBiGHqc␤»
12:25 szabgab rakudo: say 1 after 'a'
12:25 moritz_ rakudo: class Foo { method postcircumfix:<( )>() { Bar.a() } }; class Bar { method a() { say "in Bar.a" } }; Foo.new().()
12:25 p6eval rakudo b0e743: OUTPUT«0␤»
12:25 p6eval rakudo b0e743: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in 'Foo::postcircumfix:<( )>' at line 22:/tmp/0qCobPTLHB␤  in main program body at line 22:/tmp/0qCobPTLHB␤»
12:25 envi^home joined #perl6
12:25 moritz_ rakudo: class Foo { method postcircumfix:<( )>(*@) { Bar.a() } }; class Bar { method a() { say "in Bar.a" } }; Foo.new().()
12:25 p6eval rakudo b0e743: OUTPUT«Could not find sub &Bar␤  in 'Foo::postcircumfix:<( )>' at line 22:/tmp/OBd8YzYCRk␤  in main program body at line 22:/tmp/OBd8YzYCRk␤»
12:25 moritz_ rakudo: class Foo { method postcircumfix:<( )>(*@) { ::Bar.a() } }; class Bar { method a() { say "in Bar.a" } }; Foo.new().()
12:25 p6eval rakudo b0e743: OUTPUT«in Bar.a␤»
12:26 moritz_ JimmyZ: there you go
12:26 envi_home3 joined #perl6
12:27 JimmyZ now Bar has many methods, 100 now, and I want Foo can call they when there is not a such method in Foo.
12:27 JimmyZ err, them
12:28 moritz_ JimmyZ: sounds like you want delegation with wild cards
12:28 oha JimmyZ, why you do not: Foo is Bar?
12:28 JimmyZ and for some resean, I can't extends bar
12:29 moritz_ JimmyZ: look into t/spec/S12-attributes/delegation.t - Rakudo passes all the tests cases in there
12:29 JimmyZ oha, so I can't is Bar
12:29 JimmyZ moritz_: thanks, looking now
12:33 colomon phenny: tell jnthn please look at the skipped test in S06-operator-overloading/imported-subs.t
12:33 phenny colomon: I'll pass that on when jnthn is around.
12:33 colomon phenny: tell jnthn If you can fix that, I think we can get the core of Vector.pm back on-line pretty easily
12:33 phenny colomon: I'll pass that on when jnthn is around.
12:36 JimmyZ moritz_: thanks, that's what I want :)
12:36 moritz_ JimmyZ: glad it helped
12:36 rv2733 joined #perl6
12:37 JimmyZ hehe
12:38 rv2733 joined #perl6
12:40 colomon moritz_: thanks for your help
12:40 moritz_ colomon: you're very welcome
12:40 gbacon joined #perl6
12:43 moritz_ colomon++ # for adding the tests
12:44 moritz_ http://rotty.yi.org/irclogs/freenode/%23scheme/2010-07-23/#e93
12:44 * moritz_ amused
12:45 envi^home joined #perl6
12:45 moritz_ my $x = 'abcdefg'; $x ~~ s:p(2)/<.alpha>/X/; say $x
12:45 moritz_ abXdefg
12:47 moritz_ (locally here)
12:47 envi_home2 joined #perl6
12:47 colomon what is :p?
12:47 moritz_ :pos
12:47 isBEKaml position, would be my guess. :)
12:47 moritz_ right
12:48 colomon oh, right.  starting position for match.
12:48 colomon moritz_++
12:48 moritz_ also coming up: c/continue, p/pos, x, nth, and with a bit of luck 1st, 2nd, 3rd, 4th
12:49 macroron joined #perl6
12:50 isBEKaml moritz_: I have seen TimToady++ occasionally use 2nd, 3rd and so on. Initially, I thought of them as IRC usage. Then I read them in the specs and was truly amazed :)
12:50 moritz_ $ cat test.pl
12:50 moritz_ my $x = 'abcdefg'; $x ~~ s:2nd/<.alpha>/X/; say $x
12:50 moritz_ $ ./perl6 test.pl
12:50 moritz_ aXcdefg
12:50 isBEKaml moritz_++ !!
12:51 moritz_ "soon available in the compiler of your trust" or so :-)
12:51 isBEKaml does s:nth work?
12:51 moritz_ yes
12:51 isBEKaml passing nth around like a param?
12:51 moritz_ s:nth(2) is the same as 2:2nd
12:51 moritz_ in fact you can also write s:4nd if you want to confuse people :-)
12:52 moritz_ waiting for a spectest
12:52 isBEKaml so you don't exactly look for adverbs. :)
12:52 isBEKaml th, rd, st don't matter at all. :)
12:52 moritz_ well, they do, but they are aliases
12:53 moritz_ in general (\d+) <identifier> translates to :identifer($0)
12:53 nimiezko joined #perl6
12:53 moritz_ :4foo copmplains about 'foo' not being a valid adverb on a substitution
12:53 isBEKaml what would happen if i just enter s:1rd/foo/bar/ ?
12:53 colomon isBEKaml: it should work, I think
12:53 moritz_ same as s:nth(1)/foo7bar/
12:54 colomon we're not going to grammar check your numeric postfix to make sure you got it right.
12:54 moritz_ right
12:54 isBEKaml yes, that was my thinking. but it should be one of rd, st, th so as not to throw people off. ;)
12:55 masonkramer joined #perl6
12:55 moritz_ right
12:55 isBEKaml or to throw off readers of code. (pranky)
12:55 moritz_ st, nd, rd, th and nth are aliases
12:55 isBEKaml I see.
12:56 moritz_ now that jnthn++ has fixed argument passing adverbs, this patch was almost trivial
12:56 moritz_ let's hope that it doesn't throw up any weird errors
12:56 isBEKaml right, jnthn++
12:57 moritz_ his patch wasn't terribly complicated either, I just didn't have the idea to do it that way
12:58 isBEKaml even as I can't frequent IRC very much these days. I was pleasantly surprised to see audrey back (reading from IRC logs)
12:58 isBEKaml s/./,/
12:59 isBEKaml and with great timing, just as we were going into tenth anniversary! Another great blog post by masak++!
13:04 isBEKaml moritz_: is joyofsix up?
13:04 moritz_ isBEKaml: doesn't have any content yet
13:04 moritz_ and I don't know what to put up, to be honest
13:05 moritz_ and currently I'm entangled with too many projects
13:05 isBEKaml moritz_: oh... I vaguely remember discussing about it.
13:06 isBEKaml wait, why not title p6book that way? ;)
13:07 moritz_ we don't have adequate imagery for that :-)
13:09 isBEKaml :)
13:10 isBEKaml rakudo: ("fertile minds", "great idiots", "brilliant losers").pick(2).say # ;)
13:10 p6eval rakudo 9c4a3c: OUTPUT«fertile mindsbrilliant losers␤»
13:13 isBEKaml szabgab: I saw the first of your screencasts. keep 'em coming!
13:13 isBEKaml szabgab: btw, I can haz transcripts? :)
13:13 szabgab isBEKaml: I'll write up some text later
13:14 szabgab I think for th 4th I already have on my blog
13:14 isBEKaml szabgab: great! :)
13:17 isBEKaml szabgab: I too have issues with flash content. Glad you sorted them out with ogv.
13:17 szabgab that's the original
13:18 pugssvn r31803 | moritz++ | [t/spec] refudge some s:g/// tests
13:18 pugssvn r31804 | moritz++ | [t/spec] :1st, :2nd etc. adverbs on substitutions
13:18 dalek rakudo: 96a0ffe | moritz++ |  (5 files):
13:18 dalek rakudo: allow all the adverbs on s/// that Cool.subst understands
13:18 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/96a0ffe9e702711ce53126388ecfafae395265e1
13:18 colomon rakudo: say 1, 2, 4 ... 3
13:19 p6eval rakudo 9c4a3c:
13:19 p6eval ..OUTPUT«124816326412825651210242048409681921638432768655361310722621445242881048576209715241943048388608167772163355443267108864134217728268435456536870912107374182421474836484294967296858993459217179869184343597383686871947673613743895347227487790694454975581388810995116277762199023255552…
13:19 colomon patrickas++
13:22 azert0x joined #perl6
13:22 * moritz_ thinks that s:g[w+] .= uc; # should be implementable now with reasonable effort
13:23 colomon \o/
13:23 moritz_ but I guess I should focus on preparing my yapc talk instead
13:27 oha i was looking at the issue where sub f($a,$b?,$c?) { say "$a|$b|$c"; } f(1,,2); => 1|2|Any
13:27 oha and i found something
13:28 oha but i'm not able to isolate
13:29 oha i see that in NQP Grammar.pm are defined 2 list with different precedence. the tigher allow the nulltermish so i suppose that f(1,,2) is parsed like [1,],2
13:30 moritz_ you can check with --target=parse
13:30 oha moritz_, perl6 --target=parse file.pl6
13:30 oha right?
13:30 moritz_ oha: right
13:31 moritz_ maybe nqp-rx supports that too
13:31 moritz_ yes, it does
13:31 moritz_ ./parrot_install/bin/parrot-nqp --target=parse comma.pl6
13:31 moritz_ $large_parse_tree
13:32 oha but why there are 2 list layers?
13:32 * moritz_ has no idea
13:33 moritz_ oha: maybe the nullterm is to allow trailing commas
13:33 moritz_ std: 1, 2, ;
13:33 p6eval std 31802: OUTPUT«ok 00:01 116m␤»
13:33 moritz_ std: 1, 2,,
13:33 p6eval std 31802: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix , instead at /tmp/ZYVmBdFaLo line 1:␤------> [32m1, 2,[33m⏏[31m,[0m␤Parse failed␤FAILED 00:01 116m␤»
13:35 oha moritz_, yes, the matter is that it should be in the looser op
13:35 oha i'll keep checking. ty for the tip. this is going to make my life easier :)
13:36 moritz_ oha: btw you should only ever need to change the hand-written sources in nqp-rx, and then run 'make bootstrap-files'
13:36 oha i probably have misplaced things
13:37 oha cauz what nqp-rx make install is in 2.5.0 but the rakudo parrot is 2.6.0
13:37 moritz_ ah, your nqp-rx and rakudo are using different parrot versions
13:38 moritz_ normally you don't run 'make install' in nqp-rx at all
13:38 moritz_ the usual flow is:
13:38 moritz_ 1) you change something in nqp-rx
13:38 moritz_ 2) make test
13:38 moritz_ 2) make bootstrap-files
13:38 snarkyboojum where is the appropriate place to send nqp-rx patches?
13:39 moritz_ cp src/stage0/*.pir $rakudo_dir/parrot/ext/nqp-rx/src/stage0/
13:39 moritz_ 4) 'make install' in parrot
13:39 moritz_ 5) recompile rakudo
13:39 moritz_ the hilarity of bootstrapping compilers spread over various projects
13:39 oha good, i was just fixing stage0 files by hand
13:40 moritz_ snarkyboojum: most people have commit access, so that doesn't happen very often. Maybe github pull request, and pester people on IRC if it's not pulled :-)
13:41 snarkyboojum perl6-compiler@perl.org and bugs-bitbucket@rt.perl.org?
13:41 moritz_ only the first
13:42 snarkyboojum moritz_: oh ok - not sure it's appropriate but have two very minor ones here http://gist.github.com/488688 and http://gist.github.com/488693
13:42 moritz_ rakuo: my $x = 'abcdefg'; $x ~~ s:2x:nth(2,4)/./X/; say $x
13:43 isBEKaml rakudo: my $x = 'abcdefg'; $x ~~ s:2x:nth(2,4)/./X/; say $x # moritz_++ :)
13:43 p6eval rakudo 96a0ff: OUTPUT«aXcXefg␤»
13:43 moritz_ hugme: add snarkyboojum to nqp-rx
13:43 * hugme hugs snarkyboojum. Welcome to nqp-rx!
13:43 moritz_ snarkyboojum: I'm too lazy to apply those - please push yourself :-)
13:44 snarkyboojum moritz_: oooh :) so you're ok with them then? :D
13:44 zulon joined #perl6
13:44 snarkyboojum how does nqp-rx updates get pulled into parrot?
13:44 moritz_ yes
13:44 snarkyboojum s/does/do/
13:44 moritz_ snarkyboojum: 'make bootstrap-files', and then copying the result
13:44 moritz_ snarkyboojum: see my enumeration from 6 minutes ag
13:45 snarkyboojum moritz_: ah ok - so I just push from a checked out nqp-rx git repo then - will backlog :)
13:45 moritz_ snarkyboojum: there's also docs/bootstrapping.pod
13:45 moritz_ yes
13:45 isBEKaml rakudo: my $x = 'abcdefg'; $x ~~ s:nth(2,4)/./X/; say $x
13:45 p6eval rakudo 96a0ff: OUTPUT«aXcXefg␤»
13:45 isBEKaml moritz_: the s:2x isn't needed there? superfluous, it seems.
13:45 moritz_ right
13:46 moritz_ my $x = 'abcdefg'; $x ~~ s:nth(* %% 2)/./X/; say $
13:46 moritz_ rakudo: my $x = 'abcdefgehij'; $x ~~ s:nth(* %% 2)/./X/; say $x
13:46 isBEKaml rakudo: my $x = 'abcdefg'; $x ~~ s:2x/./X/; say $x
13:46 p6eval rakudo 96a0ff: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode'␤  in 'Cool::Numeric' at line 1744:CORE.setting␤  in 'Cool::Numeric' at line 1745:CORE.setting␤  in 'Cool::match' at line 6399:CORE.setting␤  in 'Cool::subst' at line 2092:CORE.setting␤  in 'Substitution::ACCEPTS' at
13:46 p6eval ..line 5…
13:46 p6eval rakudo 96a0ff: OUTPUT«XXcdefg␤»
13:46 moritz_ seems we have eliminated the closure form
13:47 moritz_ too bad :-)
13:47 isBEKaml rakudo: my $x = 'abcdefg'; $x ~~ s:g(* %% 2)/./X/; say $x
13:47 p6eval rakudo 96a0ff: OUTPUT«XXXXXXX␤»
13:47 isBEKaml :D
13:47 moritz_ :g is just checked for truth
13:47 isBEKaml rakudo: my $x = 'abcdefg'; $x ~~ s:nth(* % 2)/./X/; say $x
13:47 p6eval rakudo 96a0ff: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode'␤  in 'Cool::Numeric' at line 1744:CORE.setting␤  in 'Cool::Numeric' at line 1745:CORE.setting␤  in 'Cool::match' at line 6399:CORE.setting␤  in 'Cool::subst' at line 2092:CORE.setting␤  in 'Substitution::ACCEPTS' at
13:47 p6eval ..line 5…
13:48 isBEKaml ah, yes.
13:48 moritz_ rakudo: my $x = 'abcdefg'; $x ~~ s:g(2, 4 ... *)/./X/; say $x
13:48 p6eval rakudo 96a0ff: OUTPUT«XXXXXXX␤»
13:48 moritz_ rakudo: my $x = 'abcdefg'; $x ~~ s:st(2, 4 ... *)/./X/; say $x
13:48 p6eval rakudo 96a0ff: OUTPUT«aXcXeXg␤»
13:48 moritz_ rakudo: my $x = 'abcdefg'; $x ~~ s:st(2, 4 ... *):2x/./X/; say $x
13:48 p6eval rakudo 96a0ff: OUTPUT«aXcXefg␤»
13:48 isBEKaml rakudo: my $x = 'abcdefg'; $x ~~ s:p(2,4 ... *)/./X/; say $x
13:48 p6eval rakudo 96a0ff:  ( no output )
13:49 moritz_ :p wants a single Int, I think
13:49 moritz_ anyway, :nth(list) and :x mix
13:49 snarkyboojum moritz_: thanks for your help :)
13:49 moritz_ snarkyboojum: thanks for your patches :-)
13:49 isBEKaml snarkyboojum! :)
13:50 snarkyboojum isBEKaml: o/
13:50 dalek nqp-rx: 43942d0 | snarkyboojum++ | src/Regex/P6Regex/Grammar.pm:
13:50 dalek nqp-rx: Update "obsolete error" message
13:50 dalek nqp-rx: Change message for obsolete usage to "Unsupported", inline with
13:50 dalek nqp-rx: Perl 6 usage.
13:50 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/43942d01f6b43ffd00193b2d3e91ccb3efebe679
13:50 dalek nqp-rx: 964a1b0 | snarkyboojum++ | src/Regex/P6Regex/Grammar.pm:
13:50 dalek nqp-rx: Change message for incorrect character range usage
13:50 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/964a1b076d07cbf88e970c986f037bd536bad463
13:57 isBEKaml snarkyboojum: 2 patches and how's things? :)
13:59 snarkyboojum isBEKaml: well - looking forward to rakudo star :) and you?
13:59 isBEKaml snarkyboojum: me too. starry eyed. :)
13:59 isBEKaml 5 days to go.
14:02 oha is still miss something, while i can perl6 --target=parse src.pl6 i can't parrot-nqp --target=parse src.pl6
14:03 tylercurtis joined #perl6
14:04 oha it seems like it was the say statement
14:04 moritz_ huh, works here
14:04 moritz_ (note that --target and -e don't mix)
14:05 oha no idea, but sub foo($a,$b?,$c?) { say "Ok"; } fails, while ... { "Ok"; } works
14:22 jferrero joined #perl6
14:31 pmichaud say "Ok";   isn't valid in NQP.
14:31 moritz_ ah right, need parens
14:33 moritz_ rakudo: 5 ~~ .say
14:33 p6eval rakudo 96a0ff: OUTPUT«Any()␤»
14:34 am0c joined #perl6
14:34 cognominal rakudo:  my $a = [ "this", "is", "so", "gross" ]; my $b = [ "that", "is", "so", "funny" ];  my $c = $b[2..3]; $a[3] =  $c ;  say $a.perl
14:34 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", ("so", "funny")]␤»
14:35 cognominal pmichaud, how can I get an subarray instead of a sequence?
14:35 cognominal rakudo:  say (1,2) eqv [1,2]
14:35 oha pmichaud, ok!
14:35 p6eval rakudo 96a0ff: OUTPUT«0␤»
14:36 cognominal rakudo:  my $a = [ "this", "is", "so", "gross" ]; my $b = [ "that", "is", "so", "funny" ];  my $c = $b[2..3]; $a[3] =  @( $c ) ;  say $a.perl
14:36 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", ("so", "funny")]␤»
14:37 cognominal rakudo:  my $a = [ "this", "is", "so", "gross" ]; my $b = [ "that", "is", "so", "funny" ];  my $c = $b[2..3]; $a[3] =  $c.flat ;  say $a.perl
14:37 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", ("so", "funny")]␤»
14:37 cognominal I am a desperate Perl 6 hacker...
14:38 moritz_ try it with splice
14:38 zulon joined #perl6
14:39 cognominal as?
14:39 moritz_ or maybe I misunderstood what you want
14:39 moritz_ what do you want $a to contain?
14:40 cognominal $a[3]  should be [ "so", "funny" ]
14:40 moritz_ then don't use .flat
14:40 moritz_ or [ ... ] if necessary
14:41 cognominal it seems  $a[3] = ... gives a scalar context so that the sequence is not converted to an array
14:41 moritz_ rakudo: my $x = (1..3); say $x.perl;
14:41 cognominal wrapping the left side in @( ) does not help
14:41 p6eval rakudo 96a0ff: OUTPUT«1..3␤»
14:41 moritz_ rakudo: my $x = [(1..3).flat]; say $x.perl;
14:41 p6eval rakudo 96a0ff: OUTPUT«[1, 2, 3]␤»
14:42 cognominal tried with [ (...) ] and ended up with [(...)]
14:44 wamba joined #perl6
14:47 dalek nqp-rx: 88f0d0d | snarkyboojum++ | t/p6regex/rx_ (2 files):
14:47 dalek nqp-rx: Update tests for obsolete/unsupported messages
14:47 dalek nqp-rx: Change tests to look for 'Unsupported' not 'Obsolete'
14:47 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/88f0d0d1a5100756c1e9f80ba21df049678143ac
14:49 moritz_ pmichaud: any idea where $_ topicalization of the RHS of ~~ should be handled in the actions?
14:52 pmichaud moritz_: I'd guess method EXPR
14:52 moritz_ pmichaud: I guess that's over my head, then
14:53 pmichaud cognominal: did you figure out the array-ness above?
14:54 cognominal I filed the problem as #76698
14:54 pmichaud it's not a problem, afaict
14:54 * pmichaud looks at the ticket
14:55 cognominal thx
14:55 pmichaud the code is behaving correctly according to the spec, afaict
14:56 pmichaud if you want to create an array, use [ ... ]
14:56 cognominal but I will end up with  [ ( ... ) ]
14:57 pmichaud rakudo:  my $a = [<this is so gross>];  my $b = [<that is so funny>];  my $c = [ $b[2..3] ];  $a[3] = $c;  say $a.perl;
14:57 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", ["so", "funny"]]␤»
14:57 pmichaud like that.
14:57 pmichaud you can also do
14:58 pmichaud rakudo:  my $a = [<this is so gross>];  my $b = [<that is so funny>];  $a[3] = [ $b[2..3] ];  say $a.perl;
14:58 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", ["so", "funny"]]␤»
14:58 tylercurtis Should Rakudo's README still refer to the "languages/rakudo/" directory?
14:58 pmichaud tylercurtis: it should not
14:58 cognominal now suppose I get an intermediary variable
14:59 ashleydev joined #perl6
14:59 cognominal rakudo:  my $a = [<this is so gross>];  my $b = [<that is so funny>];  my $c = $b[2..3];  $a[3] = [ $c ];  say $a.perl;
14:59 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", [("so", "funny")]]␤»
14:59 pmichaud right, because $c is a Seq
15:00 pmichaud in this case, $a[3] is an Array with one element
15:00 pmichaud (that one element is a 2-element Seq)
15:00 tedv joined #perl6
15:00 tylercurtis pmichaud: "In general this means that in the C<languages/rakudo/> directory you make your changes, and then type" in the section on submitting patches.
15:01 pmichaud tylercurtis: I'll fix it later today, or if you want to send in a patch that would be awesome :)
15:01 pmichaud tylercurtis++
15:01 tylercurtis pmichaud: Will do. What should I change it to?
15:01 cognominal so  how do I get a mere subarray given an scalar intermdiary variable when it contains a Seq?
15:02 tylercurtis rakudo:  my $a = [<this is so gross>];  my $b = [<that is so funny>];  my $c = $b[2..3];  $a[3] = [ |$c ];  say $a.perl;
15:02 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", [\("so", "funny")]]␤»
15:02 pmichaud rakudo:  my $a = [<this is so gross>];  my $b = [<that is so funny>];  my $c = $b[2..3];  $a[3] = [ @($c) ];  say $a.perl;
15:02 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", ["so", "funny"]]␤»
15:02 cognominal pmichaud++
15:02 moritz_ tylercurtis, pmichaud: I've pushed a simple improvement to the README - feel free to improve further
15:02 pmichaud @($c) converts the scalar Seq into a flattening Seq
15:03 pmichaud tylercurtis++ moritz_++
15:03 pmichaud could also do  $c.list
15:03 isBEKaml rakudo: my $a = [<this is so gross>];  my $b = [<that is so funny>];  my $c = $b[2..3]; $a[3] = @($c); $a.perl.say
15:03 pmichaud or $c.flat
15:03 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", ("so", "funny")]␤»
15:03 cognominal that deserves to be in the Perl 6 book
15:04 pmichaud isBEKaml: that one looks wrong to me  now
15:04 dalek rakudo: c3d62c0 | moritz++ | README:
15:04 dalek rakudo: [README] a few updates regarding patch creation, tylercurtis++
15:04 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c3d62c02235be9e8c93a7fe9b9fd54ce0acf877a
15:04 isBEKaml pmichaud: yes, seems so. RHS in list context, if I'm not wrong.
15:05 pmichaud well, and so is the lhs :-)
15:05 whiteknight joined #perl6
15:05 pmichaud I think that perhaps should've ended up with   ["this", "is", "so", "so"]
15:06 isBEKaml $a[3] doesn't seem to be in list context since we just pull up the index of an array.
15:06 isBEKaml I was expecting it to flatten, i.e., without parens.
15:06 isBEKaml rakudo: my $a = [<this is so gross>];  my $b = [<that is so funny>];  my $c = $b[2..3]; $a[3] = $c.list; $a.perl.say
15:06 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", ("so", "funny")]␤»
15:08 pmichaud but $a[3] is in list context, because it's a list assignment
15:08 pmichaud it's not a scalar assignment
15:09 pmichaud er, "item assignment"
15:09 dalek rakudo: b20bcae | moritz++ | README:
15:09 dalek rakudo: [README] various small udpates: link to CREDITS, mention perl6 --version, and
15:09 dalek rakudo: point to perl6.org
15:09 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b20bcae0c851f78f97bcf346c9164b7fff6542f6
15:10 TimToady rakudo: my $a = [<this is so gross>];  my $b = [<that is so funny>];  my $c = $b[2..3]; $a[3,4] = $c.list; $a.perl.say
15:10 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", "so", "funny"]␤»
15:10 pmichaud yeah, rakudo gets that right
15:10 TimToady yeah, the other looks funny to me
15:11 pmichaud right now .[ ]  tends to remove the parcel when the subscript ends up with a single element
15:11 pmichaud so that   my $b = $a[3] + 1;    works
15:12 jnthn o/
15:12 phenny jnthn: 12:33Z <colomon> tell jnthn please look at the skipped test in S06-operator-overloading/imported-subs.t
15:12 phenny jnthn: 12:33Z <colomon> tell jnthn If you can fix that, I think we can get the core of Vector.pm back on-line pretty easily
15:12 moritz_ I thought onw-element parcels should behave like their contents anyway?
15:12 isBEKaml maybe I'm missing something. the fourth element in [$a] is an array. so, it's still an element. :)
15:13 tylercurtis moritz_++, I was just about to suggest mentioning --version.
15:13 pmichaud isBEKaml: I don't what you mean by "the fourth element in [$a] is an array"
15:13 pmichaud *don't know
15:13 pmichaud that confuses me.
15:14 isBEKaml pmichaud: "this" - 1 element. ("so", "funny") - an element. fourth item in the $a list.
15:14 pmichaud isBEKaml: you mean after the assignment?
15:15 pmichaud isBEKaml: my point is that   $a[3] = $c.list is a list assignment
15:15 pmichaud so it's the same as
15:15 isBEKaml pmichaud: what confuses me is, when we have a list of strings, one of the items in the list is another list. why doesn't rakudo complain when we assign a list as one of the elements by way of manipulation?
15:15 dalek rakudo: 6caf77f | moritz++ | README:
15:15 dalek rakudo: [README] link to download section directly; remove senetence about no longer
15:15 dalek rakudo: applicable REPL limitations
15:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/6caf77f649e507a6102ad23856a816fdf0f8418f
15:16 pmichaud "one of the items in the list is another list"?
15:16 isBEKaml pmichaud: nested lists.
15:16 pmichaud there's no nested list there before the assignment.
15:16 isBEKaml pmichaud: after the assignment.
15:16 pmichaud ...and there shouldn't be one after the assignment (more)
15:16 tylercurtis rakudo: my $a = [<this is so gross>];  my $b = [<that is so funny>];  my $c = $b[2..3]; $a[3] = $c.list; $a.perl.say; $a[3].WHAT.say
15:16 p6eval rakudo 96a0ff: OUTPUT«["this", "is", "so", ("so", "funny")]␤Seq()␤»
15:17 pmichaud my $c = $b[2..3];  $a[3] = $c.list
15:17 pmichaud should be the same as
15:17 pmichaud $a[3] = ('so', 'funny')
15:17 jnthn colomon: I'll try and look at that today.
15:17 pmichaud which since it's a list assignment, only the word 'so' should go into $a[3]
15:18 pmichaud (and thus rakudo is currently getting it wrong)
15:19 pmichaud (it's a list assignment because $a[3] is not a simple scalar)
15:19 isBEKaml pmichaud: "why doesn't rakudo complain when we assign a list as one of the elements by way of manipulation?" So we are in agreement?
15:20 isBEKaml or it shouldn't complain but only eat the first element from the result list into $a ?
15:20 pmichaud oh, one *can* assign a list to a scalar -- that's perfectly legal
15:20 pmichaud and one can assign a list to an array element
15:20 pmichaud but it would need to be
15:20 pmichaud $a[3] = $c.item;
15:21 pmichaud or even   $a[3] = $($c)
15:21 pmichaud or even  $a[3] = $c    since $c is already an item
15:21 xinming_ joined #perl6
15:22 pmichaud so, rakudo shouldn't complain about the fact that the scalar ends up holding a list
15:22 pmichaud (and it doesn't)
15:23 pmichaud (it doesn't complain, that is)
15:23 pmichaud ENOTAWAKEYET
15:24 patspam joined #perl6
15:26 pmichaud ~
15:26 pmichaud 15:20 <isBEKaml> or it shouldn't complain but only eat the first element from the result list into $a ?
15:26 isBEKaml joined #perl6
15:26 pmichaud that part is absolutely correct, except only the first element from the result list should go into $a[3].
15:27 pmichaud it shouldn't complain, and only one element of the list on the rhs ends up in the array
15:27 pmichaud (because we only had one element on the lhs)
15:28 pmichaud time to wake up, finish packing, and make my way to the airport
15:28 pmichaud bbiab
15:28 * TimToady is going to the airport right now to pick up a rental car so we can drive to Bremerton
15:29 pmichaud TimToady: have fun in Bremerton :)
15:29 pugssvn r31805 | moritz++ | [t/spec] test for RT #58488, multiple redefinition of same class in eval
15:29 TimToady then Seattle, then Barcelona
15:29 TimToady I'll be offline for most of next week
15:29 pmichaud TimToady: I'm surprised the rental car company will let you drive to Barcelona :)
15:29 TimToady :P
15:30 pmichaud have a great time next week.  We'll try not to screw up the language/launch too much while you're away.  :-)
15:30 TimToady try to keep everyone in line :)
15:30 isBEKaml pmichaud: thanks to irc logging. I could even follow when networks go into a tizzy. :)
15:30 pmichaud TimToady: did you see the PC World article about the SOTO?
15:31 TimToady nod
15:31 pmichaud TimToady: it was massively retweeted
15:31 TimToady "stable"  :)
15:31 moritz_ TimToady: have the appropriate amount of fun
15:31 pmichaud yes, I saw that too :)
15:31 pmichaud oh well.
15:31 cognominal pmichaud? URL?
15:31 pmichaud I think that people assume that whenever a release is announced that the word "stable" must be implied.
15:31 cognominal for the PC World article?
15:32 pmichaud http://www.pcworld.com/businesscenter/article/201743/
15:33 TimToady afk &
15:33 pmichaud I think I'll leave a comment about "stable" in the article :)
15:34 isBEKaml pmichaud: from what you said, am I right in thinking that a scalar element and a list element are two different things? <a b c d> <a b c <d e f>>  are different and should behave differently. or are they legal?
15:34 isBEKaml pmichaud: please disregard the nested "<". I was just sayin'. :)
15:35 isBEKaml rakudo: my $a = [<this is so gross>];  my $b = [<that is so funny>];  my $c = $b[2..3]; $a[2] = $c.list; $a.perl.say;
15:35 p6eval rakudo 96a0ff: OUTPUT«["this", "is", ("so", "funny"), "gross"]␤»
15:36 jnthn pmichaud: Wow, you switched for to map?! :-)
15:36 isBEKaml pmichaud: the ("so", "funny") is treated as an item in the $a list.
15:36 jnthn pmichaud: Nice!
15:36 cognominal nice article.
15:36 pmichaud isBEKaml: my point is that it shouldn't be.
15:37 pmichaud I don't understand the notion of "list element"
15:37 isBEKaml pmichaud: so I'm thinking by the type bounds of $a which is essentially a list of strings, we shouldn't be nesting lists here.
15:37 pmichaud jnthn: yes, I switched for to map.  Only statement 'for' at the moment, still need to do the statement modifier.
15:38 pmichaud isBEKaml: $a doesn't have a type on it
15:38 pmichaud isBEKaml: there's no constraint there saying that $a can only contain Str
15:38 [mark] joined #perl6
15:38 pmichaud $a is just an array.
15:39 [mark] left #perl6
15:39 isBEKaml rakudo: my $a = [ 1..3 ]; $a[4] = "String"; $a.perl.say;
15:39 p6eval rakudo 96a0ff: OUTPUT«[1, 2, 3, Any, "String"]␤»
15:41 isBEKaml pmichaud: right. the "of strings" is redundant there. I meant that we shouldn't nest lists there.
15:41 pugssvn r31806 | moritz++ | [t/spec] RT #76644, "statement" autoquoted hash key does not collide with "state" declarator
15:41 isBEKaml pmichaud++ # patience! :)
15:42 pmichaud isBEKaml: if you're saying that the array shouldn't contain a nested list, that's not accurate.
15:43 pmichaud isBEKaml: if you're saying that the assignment shouldn't be resulting in a nested list, that's accurate.  Rakudo is treating the assignment as an item assignment when it should be acting like a list assignment.
15:43 isBEKaml pmichaud: nested lists are useful. but assignments should just not take a list when it's just an element on the left.
15:44 pmichaud isBEKaml: ...except that in list assignment,   $a[3] is a list.
15:44 * moritz_ is sure the nigh infinite assign.t has failing tests for that
15:44 pmichaud it's not "just an element".
15:44 pmichaud and list assignment doesn't complain when there are extra values left over.
15:44 isBEKaml pmichaud: exactly.
15:45 pmichaud and by "$a[3] is a list", I mean that $a[3] is a list containing a single scalar container
15:45 pmichaud which can then have a value from the lhs assigned to it
15:45 pmichaud anyway, I guess we're ultimately agreeing.
15:45 pmichaud comment added to pc world article
15:46 isBEKaml right. :)
15:46 tylercurtis pmichaud: "list assignment doesn't complain when there are extra values left over." S03 disagrees: "If there are any elements left over, a warning is issued unless the list on the left ends with * or the final iterator on the right is defined in terms of *."
15:47 pmichaud tylercurtis: I've asked since then and was told that it doesn't complain.
15:47 pmichaud (or perhaps I'm misremembering what I actually asked, but I'm pretty sure I remember correctly here.)
15:47 moritz_ I gues the last sentence is too vague
15:48 moritz_ "or the final iterator on the right is defined in terms of *."
15:50 dalek rakudo: 928f9da | moritz++ | t/spectest.data:
15:50 dalek rakudo: run two more test files
15:50 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/928f9daccffad338c2d2aec3fce9dac475655ed6
15:51 ashleydev_ joined #perl6
15:51 moritz_ rakudo: my $x = 3; subset X of Int where { $_ > $x };
15:51 p6eval rakudo 96a0ff:  ( no output )
15:51 tylercurtis pmichaud: alright, then. IWBNI someone changed S03 to reflect that, if so.
15:51 pmichaud I'm searching the #perl6 logs to verify it first
15:51 pmichaud (and that's a particularly difficult search)
15:52 moritz_ rakudo: my Int $multiple_of; subset Num::Multiple of Int where { $^num % $multiple_of == 0 }
15:52 p6eval rakudo 96a0ff:  ( no output )
15:52 moritz_ in t/spec/S12-subset/subtypes.t that dies
15:52 moritz_ with Symbol '$multiple_of' not predeclared in <anonymous>
15:53 pmichaud I bet the where clause is incorrectly lexically scoped in the PAST tree
15:53 jnthn moritz_: Yeah, I ran into that one recetly too.
15:53 jnthn pmichaud: It is, I tracked it down, but was too tired at that point to fix it.
15:53 pmichaud i.e., it's being attached to a begin block instead of its correct lexical outer block
15:53 jnthn Right.
15:54 oha i think i've found a way to not allow calls like f(1, ,3);
15:54 jnthn std: f(1, ,3);
15:54 p6eval std 31805: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix , instead at /tmp/uaLKZEsfZw line 1:␤------> [32mf(1, [33m⏏[31m,3);[0m␤Parse failed␤FAILED 00:01 117m␤»
15:55 Raynes joined #perl6
15:55 oha but the error message isn't that nice
15:56 tylercurtis rakudo: sub f {...}; f(1, ,3);
15:56 p6eval rakudo 96a0ff: OUTPUT«Too many positional parameters passed; got 2 but expected 0␤  in 'f' at line 22:/tmp/oz8eZQejCe␤  in main program body at line 22:/tmp/oz8eZQejCe␤»
15:56 tylercurtis rakudo: say(1, ,3);
15:57 p6eval rakudo 96a0ff: OUTPUT«13␤»
16:00 oha the problem was that in NQP/Grammar.pm the arglist use nextterm<nullterm>, which means that it is allowed empty terms after the first
16:00 oha i've changed the cheat/hll-grammar.pir to correctly allow only lastterm to be null
16:01 oha using :lastterm<nullterm>
16:01 oha but the grammar is going panic now
16:01 oha Confused at line 2, near "foo(1,,3,)"
16:01 oha current instr.: 'parrot;HLL;Grammar;panic' pc 552 (ext/nqp-rx/src/stage0/HLL-s0.pir:357)
16:02 oha does anyone have hints?
16:02 moritz_ rakudo: use Test; my subset Num::Even of Num where { $^num % 2 == 0 }
16:02 p6eval rakudo 96a0ff:  ( no output )
16:02 moritz_ rakudo: use Test; my subset Num::Even of Num where { $^num % 2 == 0 }; ok my Num::Even $c = 6;
16:02 p6eval rakudo 96a0ff: OUTPUT«Type check failed for assignment␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/dmh1tdkhQR␤»
16:02 moritz_ "huh".
16:02 pmichaud oha: nqp's grammar should generally follow whatever pattern STD.pm6 uses for the same thing.
16:03 oha pmichaud, what do you mean?
16:03 pmichaud since STD.pm6 doesn't have a notion of :lastterm (afaict), NQP's grammar shouldn't have one either.
16:04 pmichaud (does it currently, ooc?)
16:04 pmichaud (it does not)
16:04 oha pmichaud, ok but actually std do not allow f(1,,3); while rakudo do
16:05 oha http://rt.perl.org/rt3/Ticket/Display.html?id=54804
16:05 pmichaud oha: right.  so we should figure out how std disallows  f(1,,3)  and use that pattern.
16:05 pmichaud we shouldn't come up with a different mechanism for checking.
16:05 pugssvn r31807 | moritz++ | [t/spec] mostly rewrite subtypes.t. Previously it assumed types leaking out of eval and similar niceties
16:05 pmichaud (and :lastterm sounds like a "different mechanism" to me)
16:05 oha pmichaud, dunno really
16:06 moritz_ pmichaud: it checks the presence of an infix in term position (if no term matches), and then dies
16:06 pmichaud moritz_: yes, looks that way
16:06 pmichaud method badinfix
16:07 pmichaud called from  term:sym<miscbad>
16:07 oha anyway, here the diff: http://pastebin.com/ge4MBV3E
16:08 colomon are people getting intermediate fails on S10-packages/basic.t
16:08 colomon ?
16:08 pmichaud colomon: yes, I am.
16:08 moritz_ colomon: I do, yes
16:08 pmichaud oha: yes, I would likely end up rejecting that patch, because it moves us farther away from STD
16:08 moritz_ colomon: maybe related to http://rt.perl.org/rt3/Ticket/Display.html?id=76692
16:09 colomon moritz_: so that was what you and jnthn were looking at the other day?
16:09 colomon (or was that masak?)
16:10 moritz_ colomon: no; but it might be related
16:12 oha where can i see how STD handle the extra ending infix for list?
16:14 jnthn moritz_: I spent a couple of hours on 76692 so far with little more grasp of what's up. :-(
16:14 moritz_ jnthn: :(
16:15 jnthn colomon: (package/basic.t) yes
16:15 colomon jnthn: :( (re 76692)
16:17 moritz_ std: 1, ,
16:17 p6eval std 31806: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix , instead at /tmp/4zhnxtr7hg line 1:␤------> [32m1, [33m⏏[31m,[0m␤Parse failed␤FAILED 00:01 116m␤»
16:17 oha std: 1,3,
16:17 p6eval std 31806: OUTPUT«ok 00:01 116m␤»
16:19 MichaelRWolf joined #perl6
16:19 oha sorry but i'm still confused. std does not allow empty elems BUT the last. nqp allow all elems to be empty but first.
16:20 pmichaud oha: right.  that's a bug in nqp.
16:20 oha so if i can't change add :lastterm to let it work, i need to know what other approach i should use
16:21 pmichaud oha: I'm saying that the approach you're taking to fix it (by changing :nextterm  to :lastterm and checking things in EXPR) is the wrong fix
16:21 oha s/add/adding
16:21 oha pmichaud, i got it really
16:21 pmichaud the approach to use is the one that STD.pm uses
16:21 oha the problem is that i didn't get what is the right fix
16:21 pmichaud STD.pm has a special term  called term:sym<miscbad>
16:22 pmichaud it looks to see if an infix operator is being found in a term position, and if so, it then complains.
16:22 pmichaud NQP and Rakudo should do the same.
16:22 moritz_ pmichaud: I'm trying that in Rakudo right now
16:22 pmichaud moritz_: I don't know that it will work out super cleanly, but it's worth a try :)
16:22 pmichaud ltm might get in the way.
16:23 oha so what should do is to not change :nextterm to :lastterm but to remove it completely, and allow an extra infix?
16:23 pmichaud oha: no, :nextterm is a part of STD.pm (or at least it was when NQP was written... checking)
16:23 zulon joined #perl6
16:23 pmichaud right
16:23 oha moritz_, oh, in that case is better if i search for other tasks
16:23 pmichaud :nextterm *is* the way that STD.pm handles the trailing comma
16:23 pmichaud so we don't want to remove it.
16:23 pmichaud (because that would move us farther away from STD.pm :-)
16:24 moritz_ pmichaud: I have my doubts too, but I'm trying anyway :-)
16:25 moritz_ huh
16:25 moritz_ now I get  "Confused" for 1, ,
16:27 moritz_ should <infixish> also match what <infix> matches?
16:27 pmichaud yes, at least according to HLL::Grammar
16:28 moritz_ hm, rakudo has its own infixish
16:28 oha moritz_, seems so to me
16:28 moritz_ | <OPER=infix> <![=]>
16:28 moritz_ right
16:33 moritz_ hum, causes a parse failure in return.t, causes 1, ,  to die with "Confused", and I can't seem to find a way to trigger it. Weird.
16:35 moritz_ aka "not good"
16:35 Trashlord joined #perl6
16:37 pmichaud moritz_: what line of return.t ?
16:38 oha return use a looser level on the EXPR() then arguments
16:39 pmichaud oh, in nqp?
16:39 * pmichaud cant find the failing test.
16:39 moritz_ pmichaud: with my local patch, that is
16:40 pmichaud I'm looking for the test line that fails
16:40 pmichaud not the actual failure :)
16:40 jnthn colomon: Think I have a fix for that failing imported-subs.t text. sspectesting now.
16:40 jnthn s/text/test/
16:40 moritz_ 28
16:40 moritz_ is(foobar2(), Nil, '
16:40 tylercurtis jnthn++
16:41 pmichaud is(foobar2(), Nil, '... bare return worked with a statement modifier');
16:41 pmichaud that one?
16:41 moritz_ right
16:41 pmichaud I don't see a "1, ,"  there
16:41 * pmichaud is confused.
16:42 moritz_ I think I didn't provide enough context
16:42 moritz_ I just wanted to say that the patch doesn't work.
16:42 colomon jnthn: \o/
16:42 moritz_ the symptoms are 1) a failure in return.t
16:42 moritz_ 2) ./perl6 -e '1, ,' says "Confused", not the error message I want
16:43 pmichaud note that the current master also gives that error message for #2
16:43 moritz_ rakudo: 1, ,
16:43 pmichaud so the problem might be something else other than the miscbad term
16:43 p6eval rakudo 96a0ff: OUTPUT«===SORRY!===␤Confused at line 22, near "1, ,"␤»
16:43 moritz_ print(1,,2)
16:44 moritz_ rakudo: print(1,,2)
16:44 p6eval rakudo 96a0ff: OUTPUT«12»
16:44 moritz_ huh. Now I can't build rakudo anymore
16:44 pmichaud I'm just saying that '1, ,' might not be a good test case for your patch :)
16:44 * moritz_ Confused
16:44 moritz_ yes
16:44 pmichaud std:  1, ,
16:44 p6eval std 31807: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix , instead at /tmp/qGCLratHTg line 1:␤------> [32m1, [33m⏏[31m,[0m␤Parse failed␤FAILED 00:01 116m␤»
16:44 pmichaud not sure *why* it's not a good test case
16:45 * moritz_ uses the magic 'git checkout .' incantation to get back to his regularly scheduled program
16:45 pmichaud maybe it's unable to parse comma as the last thing in the source as an infixish
16:45 pmichaud yes, that's it
16:45 pmichaud rakudo: 1, ,
16:45 p6eval rakudo 96a0ff: OUTPUT«===SORRY!===␤Confused at line 22, near "1, ,"␤»
16:45 pmichaud rakudo: 1, ,0
16:45 p6eval rakudo 96a0ff:  ( no output )
16:46 pmichaud (and it looks like p6eval chops my trailing spaces)
16:46 pmichaud pmichaud@plum:~/rakudo$ ./perl6 -e '1, , '
16:46 pmichaud pmichaud@plum:~/rakudo$
16:49 cognominal it would would be nice to have splices expressed like $a[[2..3]]
16:49 moritz_ this is Perl 6, not Mathematica
16:50 cognominal hum, I played mathematica... 20 years ago.  Sun had a license then.
16:50 cognominal Forgot the syntax.
16:52 cognominal ho, := works   boy, I will soon lack pretext for whining.
16:52 pmichaud cognominal: you can always say  $a[(2..3)]  if you prefer :)
16:52 cognominal can be lhs?
16:54 pmichaud sure
16:54 pmichaud and you can do   $a[2..3,]   if you want to emphasize slice-ness :)
16:55 cognominal hum, why the parenthesis are needed.
16:55 cognominal ??
16:55 pmichaud they aren't needed
16:55 pmichaud I said you *could* do it, not that you have to :)
16:55 cognominal :)
16:55 pmichaud $a[2..3]  is also a slice
16:55 pmichaud (as long as $a has at leas 4 elements)
16:55 pmichaud *least
16:56 moritz_ are parameter traits NYI?
16:56 jnthn colomon: gah...I set it off spectesting without setting TEST_JOBS to something other than 1. This'll take forever.
16:56 * moritz_ is somewhat concerned by the fact that we don't run any tests for custom traits
16:56 jnthn moritz_: No, but probably easy.
16:56 jnthn moritz_: Routine traits work.
16:57 jnthn And package ones in theory also do.
16:57 jnthn Attribute ones not yet. I may have those fixed for R* or maybe not.
16:57 jnthn *sigh* So much I want to do.
16:58 moritz_ rakudo: rule f { has $.x }; (4 but f(3).x
16:58 p6eval rakudo 928f9d: OUTPUT«Useless declaration of has-scoped rule in a module; add our or my to install it in the lexpad or namespace␤===SORRY!===␤Confused at line 22, near "(4 but f(3"␤»
16:58 moritz_ rakudo: role f { has $.x }; say (4 but f(3).x
16:58 p6eval rakudo 928f9d: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
16:58 cognominal jnthn, we need a Rakudo HyperWhatever soon  :)
16:58 jnthn missing )
16:58 moritz_ rakudo: role f { has $.x }; say (4 but f(3)).x
16:58 p6eval rakudo 928f9d: OUTPUT«Could not find sub &f␤  in main program body at line 22:/tmp/O85srtluoK␤»
16:58 jnthn cognominal: :P
16:58 moritz_ rakudo **
16:58 jnthn :-)
16:59 moritz_ jnthn: ah, that's why the traits tests don't pass
16:59 moritz_ rakudo: **
16:59 p6eval rakudo 928f9d: OUTPUT«===SORRY!===␤Confused at line 22, near "**"␤»
16:59 jnthn moritz_: Yeah, that magical RoleName(arg) syntax is why we can't run some of the others yet
17:00 jnthn moritz_: Dunno whether we should tweak the tests.
17:00 jnthn moritz_: Or implement that syntax.
17:00 jnthn moritz_: Maybe it won't be too hard.
17:00 moritz_ jnthn: we need to do the coercion syntax at some point anyway
17:01 cognominal Rakudo Star, Rakudo SuperStar, Rakudo HyperStar could be significant releases before Rakudo 1.0   :)
17:02 moritz_ there'll never be a 1.0
17:02 jnthn moritz_: It's not a co-ercion, though...
17:03 moritz_ rakudo: say 1.0 cmp 2010.06
17:03 moritz_ jnthn: yeah, but same syntax
17:03 p6eval rakudo 928f9d: OUTPUT«-1␤»
17:03 jnthn moritz_: troo
17:03 justatheory joined #perl6
17:05 tylercurtis moritz_: how about a 6.0.0?
17:06 moritz_ tylercurtis: I guess that at some point we will declare that Rakudo now implements Perl 6.0.0
17:06 pmichaud there will be a Perl 6.0.0, but that's a language specification, not a Rakudo version :)
17:06 pmichaud and I wonder if there will be a point at which we declare that Perl 6.0.0 is whatever Rakudo implements at that time :)
17:07 pmichaud (as far as feature coverage, not bugs)
17:07 zulon joined #perl6
17:07 * moritz_ finds it far more interesting how much Perl 6 he can use today
17:07 pmichaud okay, I'm heading off to airport now. be back when (if?) I get wifi there
17:08 jnthn pmichaud: Safe travels.
17:09 isBEKaml pmichaud: haffun! :)
17:16 oha oha@oha-laptop:~/work/perl6$ ./parrot_install/bin/parrot-nqp -e 'foo(1,,3)'
17:16 oha expecting element, found infix at line 1, near ",3)"
17:17 moritz_ \o/
17:17 oha http://pastebin.com/Q3G9tazL
17:18 oha but that's not finished
17:18 oha i hardcoded a comma
17:18 oha moritz_, is it the aproach you were looking for?
17:19 moritz_ oha: I don't know, it's not code I'm familiar with... you ahve to ask pmichaud when he comes back online
17:20 oha i'll do
17:20 oha probably it could work as a starting point
17:23 dalek rakudo: 667781a | (Solomon Foster)++ | src/core/operators.pm:
17:23 dalek rakudo: Port patrickas++'s series operator patch to master.  This enables testing for
17:23 dalek rakudo: series-ending conditions in the LHS list, and handles the sign-changing
17:23 dalek rakudo: geometric series absolute value test as well.
17:23 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/667781a67d3cac059dcad4591347078fcc0e3122
17:24 cognominal rakudo: say Capture.does(Positional)
17:25 p6eval rakudo 928f9d: OUTPUT«0␤»
17:25 moritz_ cognominal: that's wrong (and known)
17:25 pugssvn r31808 | jnthn++ | [t/spec] Unfudge test for imported multis not clobbering all outer-scoped candidates.
17:25 jnthn colomon: fix pushed
17:25 moritz_ jnthn+++
17:25 moritz_ jnthn++ even :-)
17:26 jnthn rakudo: class A { method foo { True } }; if A ~~ .foo { say "yay" }
17:26 p6eval rakudo 928f9d: OUTPUT«Method 'foo' not found for invocant of class ''␤  in main program body at line 22:/tmp/uqrc7cHCSp␤»
17:29 moritz_ why not "class 'Any'" ?
17:29 dalek rakudo: 2f7b8bc | jonathan++ | src/Perl6/Module/Loader.pm:
17:29 dalek rakudo: Fix imports of multis, such that they incorproate lexically outer-scoped
17:29 dalek rakudo: definitions too. This means you can import, for example, infix:<+> from a module
17:29 dalek rakudo: without it hiding all the infix:<+> from the setting.
17:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2f7b8bc72d4907a09acab5cce05306ef95b9b367
17:29 dalek rakudo: a37a5e4 | (Jan Ingvoldstad)++ | README:
17:29 dalek rakudo: Info about "git pull" and quick-and-dirty build problem resolution
17:29 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
17:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a37a5e430951442966dc0441ed5976e76d23d68d
17:29 dalek rakudo: 926a08e | moritz++ | src/Perl6/Grammar.pm:
17:29 dalek rakudo: give NYI message for HyperWhatever
17:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/926a08e3d72c9edc2583fb8fe3c8b3b43c9a4c1a
17:32 masonkramer joined #perl6
17:34 colomon jnthn++ !!!!
17:36 moritz_ rakudo: my ($foo, $bar = "baz") = <a>; say "$foo $bar"
17:36 p6eval rakudo 928f9d: OUTPUT«a Any()␤»
17:36 moritz_ is that correct?
17:37 moritz_ or should that return 'a baz'?
17:39 jnthn moritz_: It should complain at you that the signature is too complex to turn into a list.
17:39 moritz_ right, just read the ticket.
17:39 jnthn rakudo: my ($foo, $bar = "baz") := <a>; say "$foo $bar"
17:39 p6eval rakudo 928f9d: OUTPUT«a baz␤»
17:39 jnthn That's probably what you want if you're after signature binding semantics. :-)
17:41 * moritz_ is after closing tickets
17:41 lue ohai o/
17:41 jnthn moritz_: I'm trying to patch the smart-match thingy at the moment.
17:41 jnthn moritz_: It's a PITA.
17:43 moritz_ jnthn: quite understandable. And low priority
17:44 kraai joined #perl6
17:44 jnthn > class A { method foo { True } }; if A ~~ .foo { say "yay" }
17:44 jnthn yay
17:44 moritz_ \o/
17:45 jnthn Well, didn't spectest yet ;-)
17:45 pugssvn r31809 | moritz++ | [t/spec] RT #74348, error messages from subset type checks
17:46 jnthn moritz_: Will spectest it now.
17:48 jnthn moritz_: I guess some will be unfudge-able from this.
17:50 pugssvn r31810 | moritz++ | [t/spec] test that .[] is defined oin Any, and .[0] returns self for scalars. Tests RT #58372
17:51 kraai How, if at all, can I help with the Debian packaging of parrot and/or rakudo?
17:51 phenny kraai: 28 May 18:20Z <moritz_> tell kraai that I've merged his 'book' branch with lots of typo corrections. Thank you very much!
17:51 kraai Ah, great!
17:51 moritz_ kraai: Rakudo needs parrot, so the first step would be to make sure parrot-2.6.0 is packaged for Debian
17:51 jnthn arggh...LOADS of test fail :-/
17:52 moritz_ jnthn: legitimate? or wrong tests?
17:52 moritz_ kraai: it would be really cool to have Rakudo packages in Debian
17:52 moritz_ rakudo: my $x; $x<b>; say "alive";
17:52 p6eval rakudo 928f9d: OUTPUT«alive␤»
17:53 jnthn moritz_: Nah, my changes have broken things badly, somehow.
17:53 moritz_ :(
17:53 kraai moritz_: I filed a bug report and patch required to build parrot 2.6.0 packages that could be used to build rakudo 2010.07: http://bugs.debian.org/584500.
17:54 moritz_ kraai++
17:54 kraai Is it OK to do an NMU?
17:55 * moritz_ is not familiar enough with Debian development process to answer that
17:56 kraai OK, I'll try the Debian Parrot packages mailing list, then.  Thanks.
17:56 moritz_ kraai++
17:56 moritz_ kraai: might also be worth talking to allison on irc.perl.org#parrot, she's done quite a bit of work for the .deb packages from the parrot side
17:57 kraai moritz_: Thanks for the suggestion, will do!
17:58 pugssvn r31811 | moritz++ | [t/spec] .{ }-indexing scalars. RT #58372
17:59 kraai moritz_: Is "allison" her nick?
17:59 moritz_ kraai: yes... though not online currently :(
18:00 kraai OK, I'll send the email and wait, then.
18:01 envi^home joined #perl6
18:02 kraai Is parrot 2.6.0 going to be the parrot version required by Rakudo Star?
18:02 moritz_ yes
18:02 kraai moritz_: OK, thanks.
18:07 pugssvn r31812 | moritz++ | [t/spec] line numbers when accessors fails, RT #76112
18:08 moritz_ rakudo: warn()
18:08 p6eval rakudo 928f9d: OUTPUT«Warning at line 22:/tmp/LmfNhe_WUQ␤»
18:12 moritz_ rakudo: try { warn }
18:12 p6eval rakudo 928f9d:  ( no output )
18:18 tylercurtis moritz_: the API I'm designing for the LLVM PassManager equivalent for my GSoC might alleviate your uneasiness about having to add methods to Perl6::Compiler to add optimizations to some extent.
18:18 tylercurtis moritz_: With the Tree::Optimizer class I'm in the process of implementing in the pass-manager branch of my GSoC repo, you would only need to add a single method to the compiler. Right now, all it supports is simple subs for passes, but I'll post a blog post later today on parrot.org describing how it will work.
18:18 tylercurtis moritz_: The single method would be something like "method optimizepast ($past) { my $opt := Tree::Optimizer.new; $opt.register(some-optimization-sub); $opt.run($past); }".
18:18 moritz_ tylercurtis: sounds good
18:19 moritz_ tylercurtis: I'm currently entangled in way too many projects, and don't poor much tuits into the optimiation branch. Should change after R* and YAPC::EU (I just fear your gsoc project will be over then)
18:21 Sanitoeter joined #perl6
18:22 pugssvn r31813 | colomon++ | [t/spec] Add two new tests that don't work (fudged out).
18:23 TSa joined #perl6
18:23 s1n joined #perl6
18:24 pugssvn r31814 | moritz++ | [t/spec] test file for warnings
18:25 M_o_C joined #perl6
18:27 moritz_ down to 3 tickets that need testing, but are otherwise resolved
18:27 dalek rakudo: a22f027 | moritz++ | t/spectest.data:
18:27 dalek rakudo: run warn.t
18:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a22f027a86628cff8a37e275cf1ab8d0c0bf2ae0
18:28 jnthn moritz_: Great!
18:29 moritz_ kraai: you forgot to add the patch to RT #76704
18:30 moritz_ kraai: it's something I've been wanting for some time, but forgot to do it :-)
18:30 kraai Argh.
18:30 kraai It makes the Debian package fail to build a second time.  :(
18:31 kjeldahl joined #perl6
18:33 kraai I've attached the patch.  Thanks for letting me know it was missing.
18:33 tylercurtis moritz_: My GSoC will be almost over after YAPC::EU, but I certainly intend to keep working on the library afterwards. (although I won't feel as guilty when I spend a day hacking on Rakudo and other things I'm not getting paid for instead ;)
18:34 pugssvn r31815 | colomon++ | [t/spec] Add a simpler case of op= failing for imported operators.
18:39 dalek rakudo: a9db7c0 | (Matt Kraai)++ | build/Makefile.in:
18:39 dalek rakudo: Make the clean target remove perl6_group.* and src/binder/bind.o.
18:39 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
18:39 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a9db7c0338a0804091aa908e174f5002a06fd052
18:46 pugssvn r31816 | colomon++ | [t/spec] Properly fudge that last test.
18:46 frettled mmmm, fudge
18:51 * moritz_ segfaults
18:54 hanekomu_9 joined #perl6
18:55 * frettled segways.
18:57 moritz_ jnthn: btw 'perl6 proof-of-concept install zavolaj' in pls also segfaults here (binder in the backtrace)
19:01 jnthn moritz_: Does it always segfault for installing anything, or just that?
19:01 * jnthn wonders what the last changes to the binder were
19:01 pmichaud hello
19:02 colomon jnthn: so, now Vector + works, but (automatically generated) Vector += doesn't.
19:02 moritz_ jnthn: ran 4 times, 4 segfaults
19:03 jnthn colomon: That won't be getting fixed anytime soon.
19:04 colomon jnthn: I kind of thought that might be trouble.
19:04 jnthn colomon: It's the same difficult underlying issue as why things need to be declared our if you want to get them to work as meta-operators.
19:04 jnthn colomon: It's a pretty deep issue though - one that I hope to discuss with pmichaud++ at YAPC::EU.
19:05 cono joined #perl6
19:05 colomon jnthn++
19:06 jnthn My "make $_ be the LHS of smart-match while we evaluate teh RHS" patch seems to be looking OK in the spectests.
19:07 azert0x joined #perl6
19:07 tylercurtis colomon, jnthn: does overloading existing operators in modules now work?
19:07 moritz_ jnthn: \o/
19:07 colomon tylercurtis: yes
19:07 colomon jnthn++
19:09 tylercurtis jnthn++ I can start making some progress on my unit-correct math library now. :)
19:09 colomon I should have Vector.pm up and running again in a few minutes, if I don't get sidetracked.
19:10 jnthn \o/
19:11 jnthn moritz_: I wonder if it's worth trying to bisect to find when proof-of-foncept started to segfault.
19:11 jnthn moritz_: Or SVG.
19:11 colomon (may take a few days for the other stuff provided in the Vector package.)
19:11 moritz_ jnthn: maybe... I'll go a-hunting for a good revision
19:11 jnthn moritz_++
19:14 audreyt joined #perl6
19:15 Tene audreyt!
19:15 moritz_ doesn't look genuine
19:15 pmichaud although ChanServ accepted the nick
19:15 moritz_ pmichaud: yes, it only checks nicks, not host mask
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
19:16 was kicked by ChanServ: CLEAR USERS used by audreyt (): u really shouldnt use nick!*@* masks in access listings ;)
21:12 _ilbot2 joined #perl6
21:12 Topic for #perl6is now »ö« | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: http://irc.pugscode.org/ | UTF-8 is our friend!
21:12 moritz_ supposed to be... but seems it's not working
21:15 frettled joined #perl6
21:16 moritz_ now the logging is back
21:18 moritz_ the site is awefully slow though
21:18 * moritz_ has no idea why
21:24 felliott joined #perl6
21:26 Kodi joined #perl6
21:28 sbp joined #perl6
21:28 sbp heh
21:29 azert0x_ joined #perl6
21:29 mathw joined #perl6
21:31 azert0x_ joined #perl6
21:32 mberends moritz_: the Zavolaj test target was work that was hardly begun and then abandoned. I'll clean it out.
21:33 moritz_ mberends++
21:34 tylercurtis nqp: class Foo { has @!arr; method f() { @!arr[5] := 0; say(@!arr[5]); }; Foo.new.f;
21:34 p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 2208 (src/Regex/Cursor-builtins.pir:199)␤»
21:35 tylercurtis nqp: class Foo { has @!arr; method f() { @!arr[5] := 0; say(@!arr[5]); } }; Foo.new.f;
21:35 p6eval nqp: OUTPUT«0␤»
21:35 tylercurtis nqp: class Foo { has @!arr; method f() { @!arr.push(0); say(@!arr.pop); } }; Foo.new.f;
21:35 p6eval nqp: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤current instr.: 'parrot;Foo;f' pc 177 (EVAL_1:66)␤»
21:37 azert0x_ joined #perl6
21:40 colomon joined #perl6
21:44 lue ohai o/
21:44 [Coke] ... OHIO?
21:45 moritz_ tylercurtis: are those NQP weirdnesses, or just normal RPA behaviour?
21:46 oha .... i-oha
21:49 tylercurtis moritz_: my guess is that has @!foo doesn't cause the attribute to be initialized to a RPA. @!foo[4] := 4; vivifies it to one, but .push (or pir::push) doesn't.
21:53 Sanitoeter joined #perl6
21:54 tylercurtis moritz_: so, normal Parrot behavior, but a bit unintuitive.
21:56 Kodi left #perl6
22:03 felliott__ joined #perl6
22:05 am0c joined #perl6
22:07 pochi joined #perl6
22:08 Sanitoeter joined #perl6
22:14 timbunce joined #perl6
22:17 eternaleye joined #perl6
22:18 kraai joined #perl6
22:25 Addisonian left #perl6
22:25 ymon joined #perl6
22:28 azert0x_ joined #perl6
22:33 Eevee joined #perl6
22:36 timbunce joined #perl6
22:37 timbunce joined #perl6
22:56 eternaleye joined #perl6
22:56 hanekomu_9 joined #perl6
23:04 au|irc joined #perl6
23:11 plobsing joined #perl6
23:13 cxreg joined #perl6
23:13 cxreg dude wut
23:14 bit-man joined #perl6
23:14 bit-man left #perl6
23:24 kensanata joined #perl6
23:27 Dee joined #perl6
23:33 Eddward joined #perl6
23:34 Eddward There's an article at http://programmingpraxis.com/2010/07/23/happy-numbers/ about happy numbers.
23:34 Eddward I left a solution there in p6 that seems to work.
23:35 Eddward I was wondering if someone could find something more idiomatic.
23:38 cognominal the spec don't talk about a deep-copy method so as to deep copy whole data structures
23:39 colomon Eddward: looking....
23:41 lue joined #perl6
23:42 cognominal rakudo:  (1..2).map:  2 * *
23:42 p6eval rakudo f7fdd5:  ( no output )
23:43 cognominal rakudo: say  (1..2).map:  2 * *
23:43 p6eval rakudo f7fdd5: OUTPUT«24␤»
23:43 colomon Eddward: actually, that seems like pretty god idiomatic p6 to me.
23:43 colomon I might suggest replacing split('') with comb(/\d/)
23:44 cognominal rakudo:  sub double($a)  {  2 * $a }  (1..2).map:  double(*)
23:44 p6eval rakudo f7fdd5: OUTPUT«===SORRY!===␤Confused at line 22, near "sub double"␤»
23:44 cognominal Apparently the * magic does not apply when used as an sub argument
23:48 colomon cognominal: no, because some subs take non-magic * as an argument.
23:49 Eddward I tried n(*).  Didn't like it.
23:49 colomon you can just use &n
23:50 colomon for $num, &n ... *
23:50 Eddward I thought I did.  Maybe not.  I have a lot of error to fix to get it working.
23:50 Eddward It was my first try at a real p6 script.
23:50 cognominal colomon: that makes sense... And when I talk non-sense as too often  here, It means I need to sleep or take a rest. Good night
23:50 cognominal Edward++ # nice script
23:50 colomon o/
23:51 Eddward Thanks
23:51 Eddward I need to learn comb better.  I didn't know what to use it for.
23:51 Eddward p6 needs a perldoc -f
23:52 colomon Eddward: http://gist.github.com/489111
23:52 colomon that's my version.
23:52 colomon but really, it's just very minor tweaks from yours.
23:52 colomon I wouldn't be surprised if someone comes up with a brilliantly better approach, but yours is very solid.
23:53 colomon Eddward: comb is basically like split, except you specify what you are looking for rather than the bits in between what you are looking for.
23:53 Eddward cool
23:56 sorear joined #perl6
23:56 Eddward Are there sdl or opengl bindings for rakudo?
23:57 colomon I think they exist / are being worked on for parrot, but as far as I know they're not there for Rakudo yet.
23:58 sorear Tene: ping
23:58 Tene sorear: pong
23:58 sorear The all-TZ staff needs their cinnamon buns back

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

Perl 6 | Reference Documentation | Rakudo