Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-05

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:02 ruoso joined #perl6
00:02 ash_ aya1: is rw and is readonly is only for public accessors you know, right?
00:02 aya1 oh, it only for public
00:03 ash_ has $!a; is no accessors
00:03 ash_ has $.a; is a public accessor (but not a public writer)
00:03 aya1 yup i'm know about private
00:03 aya1 :) got it
00:03 ash_ has $.a is rw; is public blah blah
00:03 aya1 now need just got how make new without bless :)
00:03 aya1 :)
00:04 ash_ bless is what makes a new instance of an object
00:04 ash_ you don't have to use .new
00:04 snarkyboojum you have to call bless in a custom constructor
00:04 aya1 i'm mean other define method not trought bless
00:04 aya1 like:
00:05 aya1 class A {
00:05 aya1
00:05 aya1 has $!a is rw;
00:05 aya1 has $!b = 'test';
00:05 aya1
00:05 aya1 method new($c) {
00:05 aya1 $!a = 'test';
00:05 aya1 }
00:05 aya1
00:05 aya1 method test() {
00:05 aya1 say $.b;
00:05 aya1 }
00:05 aya1 };
00:05 ash_ ah
00:05 aya1 like it be in BUILD before :)
00:06 ash_ see, new needs to return the results of self.bless
00:06 aya1 i'm know :)
00:06 aya1 as in v5 :)
00:06 snarkyboojum aya1: nopaste is your friend
00:06 sorear aya1: please use a pastebin for anything longer than 3 lines
00:06 aya1 okay sorry :)
00:09 snarkyboojum aya1: http://perlcabal.org/syn/S12.html​#Construction_and_Initialization has some good info on how this works
00:09 aya1 one sec i'm look
00:09 aya1 thanks for link :)
00:11 sjohnson rakudo: say 'yo dudes'
00:11 p6eval rakudo ecb4b0: OUTPUT«yo dudes␤»
00:12 aya1 snarkyboojum: it that i'm already know :) but anyway thanks :) i'm just no like bless :-D
00:12 aya1 and attributes defenition throught it
00:12 aya1 :)
00:12 ash_ rakudo: say [*] 1, 1, *+* ... 20
00:12 p6eval rakudo ecb4b0: OUTPUT«3120␤»
00:13 buu joined #perl6
00:23 tjyang joined #perl6
00:25 snarkyboojum aya1: no worries - the specs are good place to get this info :)
00:25 aya1 :-D lol but anyway hated bless :) or build but it not so right as need
00:38 bpalmer joined #perl6
00:41 benji-man joined #perl6
00:41 LaVolta joined #perl6
00:45 kid51 joined #perl6
00:47 aya1 hmm is there some profiler or method to check speed? :) Just v5 version of same code work a lot faster, or it slower cos use modules from v5?
00:47 sorear try timing it
00:47 sorear if it's less than 10,000 times slower than p5, it's doing well
00:47 masonkramer joined #perl6
00:48 aya1 hmm so 10,000 is ok result from v5 to v6?
00:48 sorear now, yes
00:49 benji-man is there a guide to setting up emacs for Unicode support, a good way to enter the french quotes, etc. ?
00:50 aya1 sorear: oh than it ok, if on eye than diff around 4-5 seconds in execution
00:51 aya1 v5 execute in 3 second,
00:51 aya1 v6 execute in 7 second around it
00:51 benji-man aya1: not bad!
00:52 aya1 :) it cos it request info from direct host :) in other case for me it very slow
00:52 aya1 just v6 like freezes for few second than request and output, v5 looks like without this freez
00:54 benji-man w.r.t. emacs, i've saw something on perlmonks suggesting switching briefly into TeX mode for unicode char. entry, but that seems kinda nasty
00:57 rcfox benji-man: You could use the compose key?
00:57 rcfox Compose > > = »
00:59 rcfox In Ubuntu, System -> Preferences -> Keyboard -> Layouts -> Options -> Compose Key Position
01:01 ash_ in OS X if you want to do « or » you just do Option + |
01:02 snarkyboojum » yep - works nicely :)
01:02 ash_ or, you can change your input mode to unicode hex, and do the hex code for various unicode chars
01:03 ash_ those would be like Option + 2525 = ┥ for instance
01:04 ash_ .u die face 3
01:04 phenny U+2682 DIE FACE-3 (⚂)
01:04 ash_ .u die face 1
01:04 phenny U+2680 DIE FACE-1 (⚀)
01:04 ash_ .u die face 6
01:04 phenny U+2685 DIE FACE-6 (⚅)
01:05 cognominal rakudo:  ([ [ 5], [3] ]).sort: *.[0]).perl
01:05 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near ").perl"␤»
01:06 cognominal rakudo:  ([ [ 5], [3] ]).sort: { $_[0] }).perl
01:06 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near ").perl"␤»
01:07 cognominal rakudo: ([ [ 5], [3] ].sort: { $_[0] }).perl
01:07 p6eval rakudo ecb4b0:  ( no output )
01:07 cognominal rakudo: ([ [ 5], [3] ].sort:  *[0] ).perl
01:07 p6eval rakudo ecb4b0: OUTPUT«No candidates found to invoke for method 'sort' on object of type 'Array'; available candidates have signatures:␤:(Mu : &by = { ... };; *%_)␤␤  in main program body at line 22:/tmp/PoCrt68bxV␤»
01:08 plobsing joined #perl6
01:09 ash_ rakudo: my @die = "⚀" .. "⚅"; say @die.pick;
01:09 p6eval rakudo ecb4b0: OUTPUT«⚂␤»
01:09 ash_ i rolled a 3
01:11 JimmyZ_ joined #perl6
01:12 JimmyZ_ Hello, LaVolta
01:12 tylercurtis joined #perl6
01:12 LaVolta JimmyZ_:  说中文吧?
01:12 LaVolta JimmyZ_:  或者小窗?
01:13 JimmyZ_ 你是哪里人?
01:20 rcfox rakudo: say ~("⚀" ... "⚅");
01:20 p6eval rakudo ecb4b0: OUTPUT«⚀ ⚁ ⚂ ⚃ ⚄ ⚅␤»
01:20 rcfox Hah, neat.
01:22 tylercurtis rakudo: class Bar { multi method foo () {...} }; say Bar.^methods(:local)>>.Str
01:22 p6eval rakudo ecb4b0: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in main program body at line 1␤»
01:23 avuserow rkaudo: my $x = "⚀"; for (1 .. 5) { $x.say; $x++}
01:23 avuserow rakudo: my $x = "⚀"; for (1 .. 5) { $x.say; $x++}
01:23 p6eval rakudo ecb4b0: OUTPUT«⚀␤⚁␤⚂␤⚃␤⚄␤»
01:24 tylercurtis std: :$<foo>
01:24 p6eval std 31906: OUTPUT«ok 00:01 114m␤»
01:24 aya1 left #perl6
01:25 tylercurtis cognominal: I think the :$<foo> form was only recently added to STD. Rakudo probably just hasn't yet caught up.
01:26 avuserow what is :$<foo>?
01:26 tylercurtis avuserow: the same as :foo($<foo>).
01:27 avuserow and is $<foo> different from $foo?
01:27 rcfox rakudo: say "⚀" + "⚂";
01:27 p6eval rakudo ecb4b0: OUTPUT«0␤»
01:27 tylercurtis avuserow: $<foo> is $/<foo>
01:27 rcfox Aw.
01:27 avuserow oh!
01:27 avuserow regex matches
01:28 avuserow useful!
01:28 avuserow mostly because it's exactly what I imagined it would be
01:28 [Coke] rakudo: say ("⚀" ... "⚅").pick(3, :replace);
01:28 p6eval rakudo ecb4b0: OUTPUT«⚀⚃⚄␤»
01:32 avuserow rakudo: sub infix:<d>($l, $r) {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $l; return @dice.pick($r, :replace);} say 1d5;
01:32 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "sub infix:"␤»
01:33 avuserow rakudo: sub infix:'d' {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $^l; return @dice.pick($^r, :replace);} say 1d5;
01:33 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "sub infix:"␤»
01:33 avuserow sorry rakudo, I'm confused too now.
01:35 rcfox rakudo: role rollable { method infix:<d>($l,$r) { my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $l;      cono       return @dice.pick($r, :replace);}
01:35 rcfox Whoops.
01:35 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
01:36 rcfox rakudo: role rollable { method infix:<d>($l,$r) { my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $l; return @dice.pick($r, :replace);} }; my $a = 1; $a does rollable; $a d 5;
01:36 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "$a d 5;"␤»
01:36 rcfox :\
01:36 ghyspran joined #perl6
01:36 avuserow rcfox: my method is causing some confusion somehow
01:37 avuserow rakudo: sub infix:<!> {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $^l; return @dice.pick($^r, :replace);}; say 5 ! 5;
01:37 p6eval rakudo ecb4b0: OUTPUT«⚃⚁⚁⚂⚃␤»
01:38 rcfox rakudo: sub infix:<'d'> {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $^l; return @dice.pick($^r, :replace);}; say 5 d 5;
01:38 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "say 5 d 5;"␤»
01:39 avuserow rakudo: sub infix:<d> {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $^l; return @dice.pick($^r, :replace);}; say 5 d 5;
01:39 rcfox I guess you can't use letters?
01:39 ghyspran joined #perl6
01:39 avuserow (best I have so far)
01:39 p6eval rakudo ecb4b0: OUTPUT«⚄⚀⚃⚃⚃␤»
01:39 rcfox Oh.
01:39 tylercurtis rakudo: sub infix:<d>($l, $r) {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $l; return @dice.pick($r, :replace);} say 1 d 5;
01:40 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "sub infix:"␤»
01:40 tylercurtis rakudo: sub infix:<d>($l, $r) {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $l; return @dice.pick($r, :replace);}; say 1 d 5;
01:40 avuserow (to any dice game geeks, I'm sorry about probably using XdY incorrectly)
01:40 p6eval rakudo ecb4b0: OUTPUT«⚀⚀⚀⚀⚀␤»
01:40 tylercurtis avuserow: you just have it backwards.
01:41 tylercurtis avuserow: and it probably won't work for anything bigger than a d6.
01:41 avuserow yeah, probably not
01:41 avuserow it'd more useful for it to give out the total
01:41 avuserow but that doesn't let us use cute unicode characters
01:43 avuserow rakudo: sub infix:<d> {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $^l; return @dice.pick($^r, :replace);}; say 7 d 7;
01:43 p6eval rakudo ecb4b0: OUTPUT«⚀⚀⚂⚅⚅⚀⚅⚃␤»
01:43 avuserow rakudo: sub infix:<d> {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $^l; return @dice.pick($^r, :replace);}; say 12 d 12;
01:43 p6eval rakudo ecb4b0: OUTPUT«⚀⚅⚂⚀⚅⚄⚀⚂⚀⚄⚁⚀⚂⚀⚄⚀⚅␤»
01:44 ash_ rakudo: say "⚅"++;
01:44 p6eval rakudo ecb4b0: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 6552:CORE.setting␤»
01:44 tylercurtis rakudo: say "⚅".succ;
01:44 p6eval rakudo ecb4b0: OUTPUT«⚀⚀␤»
01:44 rcfox Uh.
01:44 avuserow cute!
01:44 tylercurtis rakudo: say "z".succ
01:44 p6eval rakudo ecb4b0: OUTPUT«aa␤»
01:44 rcfox rakudo: say "⚅".succ.succ;
01:45 p6eval rakudo ecb4b0: OUTPUT«⚀⚁␤»
01:45 avuserow it's a base 6 numbering system :o
01:45 rcfox Yeah.
01:45 rcfox With dice!
01:45 rcfox Interesting...
01:45 avuserow too bad "⚅".succ  is not "⚀⚅"
01:46 avuserow then it'd add up :D
01:46 rcfox rakudo: my $a = "⚀"; say $a++ for 0..20;
01:46 p6eval rakudo ecb4b0: OUTPUT«⚀␤⚁␤⚂␤⚃␤⚄␤⚅␤⚀⚀␤⚀⚁␤⚀⚂␤⚀⚃␤⚀⚄​␤⚀⚅␤⚁⚀␤⚁⚁␤⚁⚂␤⚁⚃␤⚁⚄␤⚁⚅␤⚂⚀␤⚂⚁␤⚂⚂␤»
01:47 rcfox rakudo: say "⚀".Num;
01:47 p6eval rakudo ecb4b0: OUTPUT«0␤»
01:49 avuserow rakudo: say "11".Num; say "asd".Num;
01:49 p6eval rakudo ecb4b0: OUTPUT«11␤0␤»
01:53 plol joined #perl6
02:47 jakk joined #perl6
02:49 rcfox rakudo: my $a = */*; say $a(2,3);
02:49 p6eval rakudo ecb4b0: OUTPUT«0.666666666666667␤»
02:51 rcfox rakudo: my $a = */*; say $a(2,{sin(0.2)});
02:51 p6eval rakudo ecb4b0: OUTPUT«Method 'Num' not found for invocant of class 'Block'␤  in 'Cool::Numeric' at line 1746:CORE.setting␤  in 'Cool::Numeric' at line 1747:CORE.setting␤  in 'infix:</>' at line 6552:CORE.setting␤  in <anon> at line 22:/tmp/tG544xapjY␤  in main program body at line
02:51 p6eval ..22:/tmp/tG544xapjY␤»
02:51 rcfox rakudo: my $a = */*; say $a($a(1,2),$a(9,11));
02:52 p6eval rakudo ecb4b0: OUTPUT«0.611111111111111␤»
02:55 jakk_ joined #perl6
02:57 [Coke] rakudo: my $a = */*; say $a($a(1,2),$a(9,11)).perl;
02:57 p6eval rakudo ecb4b0: OUTPUT«11/18␤»
02:57 rcfox Heh!
02:57 rcfox rakudo: my $a = */*; say $a($a(27,2),$a(9,11)).perl;
02:57 p6eval rakudo ecb4b0: OUTPUT«33/2␤»
02:58 rcfox rakudo: my $a = */*; say $a($a(1,1),$a(1,1)).perl;
02:58 p6eval rakudo ecb4b0: OUTPUT«1/1␤»
03:08 LaVolta what? Perl 6 got such a feature?
03:24 sekimura1 joined #perl6
03:26 drbean joined #perl6
03:28 [Coke] which feature now?
03:28 sorear whatever currying, I would guess
03:29 Mowah joined #perl6
03:30 [Coke] that or the Rats.
03:43 ash__ joined #perl6
03:48 ash__ rakudo: say ~ (1, 3) x (2, 4)
03:48 p6eval rakudo ecb4b0: OUTPUT«1 31 3␤»
03:56 bit_ joined #perl6
03:57 bit_ hi,  I was testing the Rakudo star on my pc today and I notice that it was a little slow to run.
03:57 bit_ is this normal ?
03:57 melte yes.
03:58 melte well, if it is only a little slow, then that might be an exception
03:58 melte because for the rest of us it is *really* slow currently
03:58 melte xD
03:58 bit_ hehe, yea, I was trying to be a political
03:58 bit_ it is very slow indeed
03:59 bit_ do you know why it is that slow ?
03:59 melte well
03:59 melte it is more important to implement the language and make feature improvements
03:59 melte than to focus on optimization atm
04:00 bit_ sure... I thought it would be something like that
04:00 bit_ the language is nice, I like it
04:01 ash__ joined #perl6
04:01 melte cool
04:01 bit_ thank you melte, see ya =)
04:01 melte an unofficial poll of #perl6 finds the language very popular
04:04 ash___ joined #perl6
04:05 [Coke] not that we're self selecting or anything.
04:06 melte 0 selection bias
04:43 LaVolta joined #perl6
04:45 sorear snarkyboojum: moritz_: Would you take a look at the 'msbuild' branch of niecza and see if it compiles for anyone but me?
04:56 jrtayloriv joined #perl6
04:57 sorear oh dear.  chandon almost has threads working in parrot, I need to hurry
04:58 jrtayloriv joined #perl6
05:06 jrtayloriv left #perl6
05:15 REPLeffect joined #perl6
05:16 omajgat joined #perl6
05:16 omajgat left #perl6
05:33 sorear anybody else who has a history of building niecza is also invited to comment.
05:37 kaare joined #perl6
05:46 NiiHiiL joined #perl6
05:48 NiiHiiL joined #perl6
05:57 wamba joined #perl6
06:08 Su-Shee joined #perl6
06:15 sorear awful quiet.
06:19 moritz_ sorear: how would i compile that branch?
06:22 sorear "xbuild"
06:23 * moritz_ tries
06:23 NiiHiiL joined #perl6
06:28 sorear wanted: git-ack
06:29 wtw joined #perl6
06:45 dalek rakudo: 0128ccd | pmichaud++ | docs/ROADMAP:
06:45 dalek rakudo: Initial ROADMAP updates from Pisa hackathon.
06:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​128ccdaa344d5e6386dc920916458ab6f26fbae
06:46 plobsing n
06:46 sorear interesting, I can *almost* get a working .WHICH from mono primitives
06:46 sorear unfortunately... it aliases objects which are exactly 8GB apart
06:47 moritz_ niecza: say 'from msbuild branch'
06:47 p6eval niecza : OUTPUT«Can't locate Niecza/Grammar.pm in @INC (@INC contains: STD_checkout /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux /opt/perl-5.12.1/lib/site_perl/5.12.1 /opt/perl-5.12.1/lib/5.12.1/x86_64-linux /opt/perl-5.12.1/lib/5.12.1 .) at CompilerDriver.pm line 27.␤BEGIN failed--compilati…
06:47 moritz_ I guess I'll switch back to master :-)
06:48 * sorear wants to get rid of master, though!
06:48 sorear moritz_: did the build go through at all?
06:49 sorear that error message is incompatible with a successful build
06:49 sorear which means you have error messages for me
06:52 moritz_ sorear: it fell out of the window and my broken ssh conneciton :(
06:52 * moritz_ -> breakfast
07:09 kiffin joined #perl6
07:11 timbunce joined #perl6
07:12 squeeky morning.
07:13 pmichaud squeeky: good morning
07:21 sorear I want to know where all my enthusiasm for hacking niecza went
07:21 sorear it vanished, and now all that's left is a bunch of irritated negativity
07:21 sorear all I do now seems to be harassing evalbot maintainers
07:22 mulander morning all
07:22 sorear hello
07:22 mulander sorear: I find Your niecza project really interesting
07:23 masak joined #perl6
07:23 masak oh hai, #perl6!
07:23 mulander sorear: maybe focus on promoting it for a while? Write some rationale and theorycrafting articles for people.
07:23 masak wow, http://try.rakudo.org/shell is looking great! (those responsible)++
07:23 mulander sorear: I found out about niecza by seeing it called here and had to google it up and dig into your github readme to have 'some' idea on what you're doing.
07:24 masak may I suggest that "Made possible by the guys that brought you Rakudo." be changed to "Created by the people that brought you Rakudo."? there's a reading of the word "guys" which only includes about half of the population.
07:24 _sri http://kraih.com/usingperl6-sri.jpg # a book cover (for those who missed it yesterday)
07:24 am0c joined #perl6
07:25 sorear google is scary fast
07:25 * sorear was thinking "wait, it's on google already?"
07:25 mulander first result for niecza
07:25 masak _sri: nice.
07:25 mulander is your github page :)
07:25 sorear so I check - 3rd hit - today's IRC log
07:25 mulander at least while I'm logged in.
07:25 sorear specifically, something I said two hours ago
07:26 sorear was a phrase search hit.
07:26 masak odd difference: "my $x = 5" in the Rakudo REPL outputs "5". in http://try.rakudo.org/shell it outputs nothing.
07:26 sorear I remember when indexing took months
07:26 LaVolta I got a single arrow ...
07:27 masak LaVolta: right. I got the arrow too.
07:27 masak LaVolta: it's not actually part of the output.
07:28 LaVolta masak:  JimmyZ_ contacted me, and it's just begun...
07:29 LaVolta gotta keep the terms consistently...so I have to grab a copy of Chinese version of the Camel Book :-P
07:30 masak :)
07:30 masak LaVolta++ JimmyZ++
07:30 sorear ye're starting the zh_CN Using Perl 6?
07:31 dalek yapsi: 715b5ea | masak++ | lib/Yapsi.pm:
07:31 dalek yapsi: [Yapsi] bumped SIC version
07:31 dalek yapsi: Between releases, the SIC version is always the version number of the
07:31 dalek yapsi: upcoming release.
07:31 dalek yapsi: review: http://github.com/masak/yapsi/commit/71​5b5ea420f07c669fb00670528452f0266ee3e9
07:31 dalek yapsi: d5ed674 | masak++ | lib/Yapsi.pm:
07:31 dalek yapsi: [Yapsi.pm] renamed 'lexvar' into 'var'
07:31 dalek yapsi: This is after realizing that both 'state' variables and contextual variables
07:31 dalek yapsi: are really lexical variables underneath; having all of these be called
07:31 dalek yapsi: 'lexvar' just seemed wrong. So 'var' now introduces a lexical variable, and
07:31 dalek yapsi: future flags (something like :dynamic and :state, perhaps) will modify those
07:31 dalek yapsi: lexvars to be have like contextual variables and state variables, respectively.
07:31 dalek yapsi: review: http://github.com/masak/yapsi/commit/d5​ed674077faddda0fb45fe050fe19cd3d3d1e30
07:31 masak dalek's output could easily be a lot smaller.
07:31 LaVolta sorear:  no...it's Syn in chinese
07:31 masak I have a PDF of my presentation from yesterday, but I don't know where to upload it. :/ it weighs in at 86 MB.
07:32 LaVolta PDF? how could it be that large
07:32 sorear CPAN is at our fingertips.  IO::Compress::GZip, MIME::Base64
07:33 sorear LaVolta: PDF scans of 1000 page books run in to that size range
07:33 masak LaVolta: there's an image on every slide. most of those are identical, but my PDF merging tool doesn't seem to realize that.
07:33 sorear LaVolta: there are, of course, much better tools for compressing book scans.  But djvu isn't considered a "least common denominator" format, and you're lucky if you can get anything it i
07:33 sorear in it
07:33 masak the images themselves are ~300kB jpeg images.
07:34 sorear masak: burn a CD and mail it?
07:34 squeeky masak: ve have vays to compress it
07:34 sorear punch a firewall hole and use bittorrent?
07:34 LaVolta or rapidshare :-P
07:35 sorear put it on feather2 while Juerd isn't looking?
07:35 masak squeeky: without losing resolution in the images?
07:35 masak I guess I could .tar.gz it...
07:35 * masak tries that
07:35 foodoo joined #perl6
07:35 Ross joined #perl6
07:37 uniejo joined #perl6
07:38 pmichaud (try.rakudo.org)  --- why does it add semicolons to my input?
07:48 moritz_ good morning
07:48 moritz_ http://www.perlmonks.org/?node_id=852795
07:48 sorear good morning moritz_
07:49 sorear pmichaud: how copiable of a state is rakudo's autovivification in?
07:49 jedai joined #perl6
07:50 snarkyboojum sorear: FWIW, I get a build failure with xbuild, but I get one with make in master anyway (still haven't worked out the build error on my mac)
07:51 snarkyboojum sorear: and it's the same error, so at least it's consistent :) i.e. can't open unicode maps from $HOME/lib
07:55 sorear Weird.
07:55 sorear Hmm
07:55 snarkyboojum when running ./std CORE.setting
07:55 sorear Do you have $HOME/lib in env anywhere *other* than... OH
07:55 snarkyboojum at stage0
07:55 sorear That's basically my gen-parrot
07:56 sorear The niecza build system is $PERL6LIB-tight
07:56 sorear the STD one... notsomuch
07:56 cono rakudo: class A { has $.x is rw }; my A $a .= new; $a.x = 5; $a.x.say
07:56 p6eval rakudo ecb4b0: OUTPUT«5␤»
07:56 cono any other way to use setter of a rw field $.x ?
07:57 cono $a.x(5) ?
07:57 moritz_ no
07:57 uniejo joined #perl6
07:57 cono ok, thanks
07:58 pmichaud sorear: shouldn't be too bad to copy (and improve upon).  The magic is in Any-list.pm
07:58 pmichaud afk, moving to conference venu
07:59 pmichaud *venue
07:59 moritz_ hurry up
07:59 moritz_ first talk starts in 1
07:59 moritz_ :-)
08:02 cono rakudo: class A { has $.x is rw }; my A $a .= new(:x(5)); $a.say
08:02 pugssvn r31907 | sorear++ | [STDeco] Hide $PERL6LIB during bootstrap.  snarkyboojum++
08:02 p6eval rakudo ecb4b0: OUTPUT«A()<0x74ef590>␤»
08:02 sorear snarkyboojum: could you change STD_REVISION to 31907 and tell me if it works
08:02 cono which method I need to override to print 5 ?
08:02 sorear Stringy
08:03 cono sorear: thanks
08:03 sorear possibly Str
08:03 moritz_ rakudo: class A { has $.x is rw; method Str { ~$.x} }; my A $a .= new(:x(5)); say $xa
08:03 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "say $x\x{7f}a"␤»
08:03 moritz_ rakudo: class A { has $.x is rw; method Str { ~$.x} }; my A $a .= new(:x(5)); say $x
08:03 p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "say $x\x{7f}"␤»
08:03 moritz_ rakudo: class A { has $.x is rw; method Str { ~$.x} }; my A $a .= new(:x(5)); say a
08:03 p6eval rakudo ecb4b0: OUTPUT«Could not find sub &a␤  in main program body at line 22:/tmp/c4L_2oJ0Pv␤»
08:03 moritz_ rakudo: class A { has $.x is rw; method Str { ~$.x} }; my A $a .= new(:x(5)); say $a
08:03 snarkyboojum sorear: will have a play - cheers
08:03 p6eval rakudo ecb4b0: OUTPUT«5␤»
08:03 * moritz_ distracted
08:04 cono ah, moritz_++ :)
08:05 azawawi joined #perl6
08:05 azawawi hi
08:05 masak azawawi! \o/
08:05 masak azawawi: we're at YAPC::EU! where are you?
08:05 azawawi has anyone tried compiling blizkost on perl 5.12.1 (linux)?
08:05 azawawi masak: im working :)
08:06 sorear azawawi: that's my development environment.  it works great.
08:06 azawawi masak: next year I plan to go there :)
08:06 pmichaud (stringy)  Rakudo needs some rework on stringy.
08:06 pmichaud I've started it several times, but it's not clear to me what the get_string vtable should correspond to.  :-|
08:06 azawawi sorear: could you git pull and try it again... im getting this weird compilation error
08:07 TiMBuS rakudo: my @a = (1,2); my %b = @a; @a.perl.say; #Is this a bug?
08:07 p6eval rakudo ecb4b0: OUTPUT«[]␤»
08:08 pmichaud looks like a big bug
08:08 moritz_ yes
08:08 moritz_ please submit
08:08 TiMBuS yeah i did it yesterday in here but no one noticed i guess
08:08 azawawi blizkost compilation error on a $HOME-installed perl 5.12.1 http://perl.pastebin.com/dJ1777a0
08:08 masak TiMBuS++ # how did we miss that one? o.O
08:09 TiMBuS also: searching to see if it had been reported brought up #74302 which seems to be fixed
08:09 moritz_ rakudo: my @a = (1,2); my @ = @a; @a.perl.say;
08:09 pmichaud looks like .hash is *really* broken
08:09 pmichaud I'll fix it.
08:09 p6eval rakudo ecb4b0: OUTPUT«[1, 2]␤»
08:09 pmichaud rakudo:  my @a = (1,2);  @a.hash;  @a.perl.say;
08:09 p6eval rakudo ecb4b0: OUTPUT«[]␤»
08:09 sorear azawawi: The Configure error wasn't enough of a clue?  maybe it should unlink("Makefile")
08:09 moritz_ pmichaud: which might explain why %() tend to segfault way too often
08:09 TiMBuS i submitted the patch for .hash
08:10 pmichaud TiMBuS: is the patch in the ticket?
08:10 TiMBuS but its probably wrong!
08:10 TiMBuS yes
08:10 sorear azawawi: your $HOME perl is not correctly configured for embedding (yes, embedding needs special configuration as of 5.12)
08:10 sorear azawawi: there should be a really big warning banner from Configure.pm
08:10 sorear pl
08:10 TiMBuS it just calls &hash which just.. does %h = @_
08:10 pmichaud I don't see a patch in the ticket.
08:11 azawawi sorear: i didnt see it at first...thanks
08:11 pmichaud ah, that's backwards.
08:11 * sorear is a bit annoyed with #p5p for this
08:11 pmichaud &hash should probably be calling .hash, not vice-versa.
08:11 sorear perhaps wrongly
08:11 TiMBuS .hash *was* calling sub 'hash' shich doesnt exist
08:11 dalek rakudo: b627e33 | pmichaud++ | src/core/Cool-num.pm:
08:11 dalek rakudo: Add constant 'i' (RT #76994).
08:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​627e33318a01894cfd878e0c996a2b683e68867
08:12 moritz_ http://nopaste.snit.ch/22572
08:12 azawawi sorear: im trying to figure out why blizkost does not work on strawberry 5.12.1. The dll does not load... as if it never linked to perl.
08:12 azawawi sorear: that's why i tried it on linux.
08:12 moritz_ that nopaste contains the first set of notes from the Rakudo hackaton at YAPC::EU
08:12 pmichaud "Speeeeeeed"  :-)
08:13 pmichaud I did a ROADMAP update this morning, also.  Patches welcomed.
08:13 * moritz_ adds a few more e's to the heading
08:13 TiMBuS http://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=75584 that's where I submitted the patch pmichaud, but clearly it needs a bit more work. the other bug must have something to do with !STORE
08:14 TiMBuS ..probably
08:14 pmichaud TiMBuS: yeah, the patch is backwards there.
08:14 sorear seen jnthn
08:14 pmichaud (you corrected the code, but the original was wrong)
08:15 TiMBuS yep
08:15 pmichaud anyway, I should be able to clean it up.
08:15 thebird joined #perl6
08:15 snarkyboojum sorear: that's gets past the stage0 error, now a get the same error later in the process when trying to execute perl tryfile STD.pm6
08:16 sorear snarkyboojum: line in Niecza.proj needs to be changed to PERL6LIB=./lib:. $(Perl) tryfile STD.pmc
08:16 sorear pm6
08:17 snarkyboojum sorear: thanks.. will have a play a bit later - bbl
08:18 TiMBuS heres the bug in hash's !STORE:        my $items = $to_store.flat;
08:18 TiMBuS i guess it isn't making a copy?
08:18 cono which analog of: $self->SUPER::something($val) in rakudo?
08:19 moritz_ cono: which of the N super classes do you mean?
08:20 pmichaud TiMBuS: yes, it's not making a copy (more)
08:20 pmichaud I'm not sure what it should do there.  Let me look at Array!STORE
08:20 cono moritz_: class A is B { method something($val) { B.something($val) ... something like that, but without typing name of a base class
08:21 moritz_ cono: method something($val) { nextsame }
08:21 cono nextsame?
08:21 moritz_ nextsame
08:21 cono trying
08:22 cono And $val will be going to base method ?
08:22 cono automaticaly?
08:22 moritz_ yes
08:22 cono cool
08:22 moritz_ that's the 'same' part
08:22 TiMBuS Array!STORE is verry different and also a confusing mind maze :/
08:22 moritz_ you can also do nextwith($other_value)
08:22 pmichaud TiMBuS: right
08:23 cono moritz_++: got it! thanks! :)
08:23 pmichaud TiMBuS: try changing
08:23 TiMBuS so many calls to !flat...
08:24 pmichaud my $items = $to_store.flat;
08:24 pmichaud to
08:24 TiMBuS and eager
08:24 pmichaud my $items = $to_store.Seq;
08:25 TiMBuS not .Seq.eager()?
08:25 pmichaud we don't need eagerness here.
08:25 pmichaud the while loop will end up making it "eager"
08:25 TiMBuS of course
08:26 pmichaud also, fwiw, lines like
08:26 moritz_ masak: re your p6l question, if options are like adverbs, it would make sense to ignore unknown options, just we do it with named params in method calls
08:26 pmichaud self{.key} = .value;
08:26 pmichaud make this *really* much slower than it ought to be.
08:27 moritz_ what would be the faster alternative?
08:27 sorear pmichaud: why:?
08:29 dalek rakudo: e65cb72 | masak++ | docs/ROADMAP:
08:29 dalek rakudo: [docs/ROADMAP] whitespace therapy
08:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e​65cb72f6313e0dadc458da78bbaf9a0d88ab90a
08:29 masak moritz_: indeed. but I'm not sure the analogy carries over to Pod, which is after all a different (sub-)language.
08:29 TiMBuS > my @a = (1,2); my @ = @a; @a.perl.say;
08:29 TiMBuS [1, 2]
08:29 TiMBuS yey
08:30 TiMBuS \:3/uh
08:30 masak moritz_: I'm trying to think of all the forces involved (typos, future additions of recognized options) and similar scenarios (HTML tag soup, XSLT forward-compatibility).
08:30 TiMBuS my %b = @a * (whoops)
08:30 moritz_ masak: fair point. Will ponder more
08:32 pmichaud self{.key}  ends up doing postcircumfix:{ }  on self
08:32 pmichaud which ends up calling .at_key
08:32 pmichaud which ends up doing a .WHENCE-based based proxy
08:32 pmichaud which then gets filled in on assignment
08:32 pmichaud !STORE really ought to be allowed to do a lot more low-level access than that.
08:33 pmichaud faster would be to put the values directly into $!storage
08:35 smash joined #perl6
08:36 TiMBuS or into the Hash pmc, before even assigning it to $!storage
08:36 pnu rakudo: say 1/0; # isn't this wrong, mathematically speaking?
08:36 p6eval rakudo ecb4b0: OUTPUT«Inf␤»
08:36 pmichaud TiMBuS: right
08:36 pmichaud but the values shouldn't be bound directly -- need to create Perl6Scalar containers for each
08:37 pmichaud anyway, we can leave the self{.key}  items for now... it's just going to make hash storage and creation a fair bit more expensive than I think it ought to be :)
08:39 pmichaud I think there's also an argument to be made that building a hash from a list ought to be done in EnumMap, not Hash
08:39 cono rakudo: class A { method x($v) { $v.say }; }; class B is A { method x($v) { nextsame; say "B.x method" }; }; my B $b .= new; $b.x(5)
08:39 p6eval rakudo ecb4b0: OUTPUT«5␤»
08:39 cono where is B.x method ?
08:40 schacon joined #perl6
08:40 TiMBuS pmichaud, i can do it if you want, but pir::* confuses me a little bit. can i go like:  $a := pir::new__Ps('Hash')
08:40 TiMBuS and it wont box it
08:40 moritz_ rakudo: class A { method x($v) { $v.say }; }; class B is A { method x($v) { callsame; say "B.x method" }; }; my B $b .= new; $b.x(5)
08:40 p6eval rakudo ecb4b0: OUTPUT«5␤B.x method␤»
08:41 pmichaud if you use := it will box
08:41 pmichaud (eventually, if not now)
08:41 cono moritz_: thanks again and again :)
08:41 moritz_ cono: nextsame() is a tail call, ie replaces the current method
08:41 cono got it
08:41 cono thanks
08:41 TiMBuS i assume a normal = will also box?
08:42 pmichaud but boxing is okay -- it could be unboxed again when doing the setattribute later
08:42 pmichaud (pir::descalarref will unbox)
08:42 pmichaud so I'd suggest the := for now
08:43 pugssvn r31908 | sorear++ | [STD] Fix lexical package snafu - much easier than it looked?
08:43 pnate joined #perl6
08:45 cono moritz_: http://home.cono.org.ua/LinkedList.pm any ideas what I need to add? :)
08:45 TimToady on the &foo = vs &foo := question, I'm wondering if the second indirection is the same as the one used by .wrap
08:45 sorear ooh .ua I think that's a new one for here
08:46 sorear \o/ It's a TimToady
08:46 sorear How is YAPC::EU?
08:47 TimToady my ancestors came via .ua, though it wasn't .ua at the time...
08:48 TimToady well, I'm done with my talk, so starting to get my brane back.  was amused by a P5 syntax hacking talk that is basically reinventing some of P6 badly :)
08:48 moritz_ TimToady: I thought mostly the same
08:48 moritz_ cono: a test suite :-)
08:49 cono ok :)
08:49 TimToady so .warp could be implemented using =, maybe
08:49 TimToady *ra
08:49 frettled What?  Someone is considering breaking the P5 syntax to … *bogglies*
08:50 pnate joined #perl6
08:50 TimToady to basically implement a poorer version of leave
08:50 frettled .warp would be a nice method for multi-dimensional arrays
08:50 frettled tut tut tut
08:51 TimToady and the syntax hackery doesn't really understand the concept of grammatical categories when adding keywords
08:52 sorear if this is still basically cored D:D, they sort of do - it's term:<name> is parsed// all the way down
08:52 TimToady and, of course, they had to resort to XS to generate AST
08:53 TimToady I think this was something else
08:53 TimToady heh, the network is slow enough here that it thought I was trying to paste a line that I typed...
08:54 sorear hmm, I seem to have broken import Num <e pi i>
08:55 TimToady good thing you put a ? at the end   :)
08:55 sorear ?
08:56 TimToady when you said it seemed easy
08:56 sorear ah
08:56 sorear I'm actually testing another fix now
08:56 sorear in package Foo { #`( $*IN_DECL is still true! ) $bar++ #`( no error ) }
08:57 masak heh, maybe .warp is what we should rename .subst to :P
08:57 masak hm, maybe not... :)
08:57 pnu rakudo: say (0.5).WHAT; my Num $a = 0.5;
08:57 p6eval rakudo e65cb7: OUTPUT«Rat()␤Type check failed for assignment␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/12tfOTVYD9␤»
08:58 pnu Numeric role would work as type constraint there, but shouldn't that coerce too?
08:58 sorear pnu: there is no implicit coercion in Perl 6
08:58 pnu S02: .. "Rat", which is generally usable anywhere a "Num" is usable ..
08:58 frettled masak: I think it's only our sense of humor that's been through .warp ;)
08:59 frettled pnu: in Rakudo, you have to use scientific notation for direct assignment to Num, AFAICT.
09:00 masak frettled: :)
09:01 TimToady sorear: sure there are implicit coercions in Perl 6, for some definition
09:01 pmichaud rakudo:  my Num $a = 0.5.Num;
09:01 masak is #`{comment with braces} allowed?
09:01 p6eval rakudo e65cb7:  ( no output )
09:01 pmichaud rakudo:  my Num $a = 0.5.Num;  say $a.WHAT;
09:01 sorear masak: yes
09:01 p6eval rakudo e65cb7: OUTPUT«Num()␤»
09:01 TimToady that's what Cool is all about,for instance
09:01 masak do you have to put a ; after the closing brace if you want to write something after it on the same line?
09:01 TimToady and it seems silly not to autocoerce a Rat to a Num
09:02 pnu ok, so in general we should just use Numeric role as type constraint and let the compiler choose what exact type it will use to represent the numeric literal you've created..?
09:02 moritz_ timbunce++ # showing things live in his talk that he never tried before
09:02 moritz_ pnu: yes
09:02 pmichaud masak: you don't need the ;, no.
09:02 moritz_ pnu: or Real, if you want to exclude Complex
09:02 masak timbunce++ # generally hoopy frood
09:02 pnu rakudo: say 1/0; # isn't this wrong, mathematically speaking?
09:03 p6eval rakudo e65cb7: OUTPUT«Inf␤»
09:03 masak pmichaud: that's what I suspected/hoped. I'm just trying to motivate to myself why that shouldn't be needed.
09:03 sorear What's the default scope of a 'constant'?  'my'?
09:03 masak {} *always* means a block... except when not.
09:03 pmichaud masak: in this case, it's a bracketing character
09:03 pmichaud rakudo:   say qq{hello, masak++};   # not a block.
09:03 p6eval rakudo e65cb7: OUTPUT«hello, masak++␤»
09:03 TimToady pnu: we try to return in-band failures in preference to throwing exceptions in P6, and Inf is a mild failure
09:04 moritz_ masak: just like... everything in Perl 6 has the "except when no" attached to it
09:04 masak moritz_: ...except when it doesn't :P
09:04 moritz_ right :-)
09:04 masak today's autopun.
09:04 moritz_ but I haven't found many of those
09:04 masak no, it's a small exception.
09:05 masak ususally, the exceptions are bigger.
09:05 masak so it's a sort of exception, I guess.
09:05 TimToady pnu: this is because exceptions are not friendly to vector ops
09:06 TimToady coffee, biab &
09:07 TimToady whoops, misread schedule, coffee in 13 mintues
09:08 pmichaud 23 minutes, I think.
09:08 pmichaud (they asked yesterday that we not show up early :-)
09:08 sorear oh, I didn't break it
09:08 am0c joined #perl6
09:08 sorear I fixed a bug that CORE.setting was relying on
09:09 TimToady yes, 23, 21 now
09:09 moritz_ TimToady: should we complain about non-sensical regex adverbs?
09:09 moritz_ TimToady: like s:overlap/.../../ or so
09:09 TimToady std: m:huh/bar/
09:09 p6eval std 31908: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unrecognized adverb :huh(1) at /tmp/WstFJMsss_ line 1:␤------> [32mm[33m⏏[31m:huh/bar/[0m␤Check failed␤FAILED 00:01 116m␤»
09:09 moritz_ TimToady: non-sensical != not recognized
09:09 TimToady why shouldn't we complain?
09:09 moritz_ std: rx:overlap/a/
09:09 p6eval std 31908: OUTPUT«ok 00:01 116m␤»
09:10 moritz_ TimToady: I don't know, just happened to find that std doesn't complain where I would
09:10 pnu timtoady: ah, i see..
09:10 TimToady std doesn't check stemantics
09:10 TimToady *sem
09:10 pnu rakudo: say 1/0 == 2/0;
09:10 p6eval rakudo e65cb7: OUTPUT«1␤»
09:10 briang joined #perl6
09:10 pnu still.. that's not right.
09:11 TimToady it's righter than blowing up the rocket
09:11 pnu true
09:11 sorear note that the current rules for failures are almost certainly going to change
09:12 sorear right now they're probably worse than C++
09:12 TimToady in what sense are you thinking that?
09:13 sorear sub nasty { for fail, fail -> { .say }; } # throws two exceptions
09:13 pmichaud ...it does?
09:13 moritz_ no
09:13 sorear sub looks-safe { try { nasty; CATCH { say $!; return } } } # as specced this catches one exception and lets the other propagate
09:14 masak rakudo: say (1/0)
09:14 pmichaud seems to me that &nasty would throw one exception.
09:14 p6eval rakudo e65cb7: OUTPUT«Inf␤»
09:14 frettled ooh.. hmm.
09:14 sorear pmichaud: using a failure outside boolean context pushes the failure onto CALLER::<$!>
09:14 sorear pmichaud: at the end of &nasty, $! contains two failures
09:15 frettled rakudo: say ((1/0)/(2/0))
09:15 p6eval rakudo e65cb7: OUTPUT«Divide by zero␤  in 'infix:<div>' at line 3517:CORE.setting␤  in 'Rat::new' at line 3819:CORE.setting␤  in 'infix:</>' at line 3908:CORE.setting␤  in 'infix:</>' at line 3896:CORE.setting␤  in main program body at line 22:/tmp/8SFHrcZ4ea␤»
09:15 pmichaud sorear: fail()  exits the routine immediately.
09:15 sorear how about
09:16 frettled That was interesting.  1/0 => Inf, 1/0 == 2/0 => 1, (1/0)/(2/0) => kaboom
09:16 sorear sub nasty { for "bad1", "bad2" -> { slurp($_).say }; }
09:16 pmichaud sorear: I'd expect that to return a list containing two failures
09:17 sorear in any event, the misbehavior I'm pointing out is in looks-safe
09:17 sorear it's quite easy to write code which looks like it traps all exceptions, but doesn't
09:17 sorear you actually need to loop over $! and handle each exception in a catch
09:21 TimToady returning without handling $!.pending should rethrow
09:21 pugssvn r31909 | sorear++ | [STD] Clear $*IN_DECL in body of packageoids so package Foo { $frog++ } fails
09:22 TimToady the sample code in S04 is probably not quite right in that respect
09:22 frettled rakudo: say (1/0).Rat
09:22 p6eval rakudo e65cb7: OUTPUT«Inf␤»
09:22 frettled hm
09:22 frettled rakudo: say (1/0)/0
09:22 p6eval rakudo e65cb7: OUTPUT«Inf␤»
09:22 pugssvn r31910 | sorear++ | [CORE.setting] constants inside class Num need to be declared our for visibility outside the class to work
09:22 frettled rakudo: say (1/0)/(1/0)
09:22 p6eval rakudo e65cb7: OUTPUT«Divide by zero␤  in 'infix:<div>' at line 3517:CORE.setting␤  in 'Rat::new' at line 3819:CORE.setting␤  in 'infix:</>' at line 3908:CORE.setting␤  in 'infix:</>' at line 3896:CORE.setting␤  in main program body at line 22:/tmp/H91pNO3ybg␤»
09:23 TimToady the code at S04:1012 should have LEAVE semantics
09:23 frettled rakudo: say Inf/Inf
09:23 p6eval rakudo e65cb7: OUTPUT«NaN␤»
09:23 TimToady such that it cannot be  bypassed by return
09:23 frettled rakudo: say Inf/0
09:23 p6eval rakudo e65cb7: OUTPUT«Divide by zero␤  in 'infix:</>' at line 3791:CORE.setting␤  in 'infix:</>' at line 3429:CORE.setting␤  in main program body at line 22:/tmp/f1XOl3YfOe␤»
09:24 frettled rakudo: say 0/Inf
09:24 p6eval rakudo e65cb7: OUTPUT«0␤»
09:24 TimToady rakudo: say Inf/0E0
09:24 frettled rakudo: say 0/0
09:24 p6eval rakudo e65cb7: OUTPUT«Divide by zero␤  in 'infix:</>' at line 3791:CORE.setting␤  in main program body at line 22:/tmp/rCsQzqB_zO␤»
09:24 p6eval rakudo e65cb7: OUTPUT«Divide by zero␤  in 'infix:<div>' at line 3517:CORE.setting␤  in 'Rat::new' at line 3819:CORE.setting␤  in 'infix:</>' at line 3908:CORE.setting␤  in main program body at line 22:/tmp/i99elHDrWJ␤»
09:24 frettled I think this handling of division by zero is LTA :)
09:25 pmichaud there are undoubtedly several places in rakudo where things die instead of fail
09:26 simcop2387 joined #perl6
09:27 twalsh joined #perl6
09:28 uniejo joined #perl6
09:28 pnu well.. 0/0 and Inf/Inf are both NaN, and i believe that's correct, but 0/0 dies immediately, Inf/Inf doesn't...
09:29 pmichaud pnu: right.  I suspect that one of the &infix:</> multis isn't checking for a zero denominator
09:30 pmichaud our multi sub infix:</>($a, $b) { +$a / +$b;
09:30 pmichaud }
09:30 pmichaud looks like the culprit.
09:30 pmichaud oh, wait, that can't be it
09:30 pmichaud multi sub infix:</>(Num $a, Num $b) { pir::div__NNN($a, $b)
09:30 pmichaud }
09:31 pmichaud that one
09:31 pmichaud src/core/Num.pm:238
09:31 pugssvn r31911 | sorear++ | [STDeco] Reboot, so that the stage0 compiler can properly handle CORE.setting
09:31 pmichaud needs to have   fail "Division by zero" if $b == 0;
09:32 tadzik joined #perl6
09:32 frettled \o/
09:34 pmichaud afk, break
09:36 bbkr rakudo: 1/"0.0";
09:37 p6eval rakudo e65cb7: OUTPUT«Divide by zero␤  in 'infix:</>' at line 3791:CORE.setting␤  in 'infix:</>' at line 3429:CORE.setting␤  in 'infix:</>' at line 436:CORE.setting␤  in main program body at line 22:/tmp/KytTnUcUcN␤»
09:42 sorear au|zzz horrendously broke STD a week ago
09:43 moritz_ :samecase implies :i - does that mean that m:samecase// is allowed?
09:43 bpalmer left #perl6
09:43 moritz_ I vote for 'no'
09:46 envi^home joined #perl6
09:52 pugssvn r31912 | sorear++ | [STDeco] Revert r31762 by audreyt; the "inplace guard" causes massive nondeterministic failures in automated STD builds.
09:55 au|irc sorear: wow. the optimization backfired? sorry about that...
09:57 au|irc oh, it's the "use lib", not the optimization
09:57 sorear the STD bootstrap procedure relies critically on setting PERL5LIB
09:57 sorear the @INC modification breaks that
09:58 au|irc ok... the STD.pm-on-CPAN broke the bootstrap procedure, which was what motivated 31762
09:58 sorear so it uses the wrong version of STD.pm to build other stages
09:58 au|irc got it
09:58 au|irc sorries again :)
09:58 x3nU how do i convert string to bytes (Buf) in perl6?
09:58 sorear .encode IIRC
09:59 jferrero joined #perl6
10:01 pnu specs could mention IEEE 754(-2008) if it aims to implement the NaN and Inf rules as specified there..?
10:02 sorear better to do that /quietly/
10:02 sorear 754 has a very vocal hatedom these days
10:02 bbkr rakudo: sub prefix:<sub>($a) {1234}; say sub {}; # torturing Rakudo...
10:02 p6eval rakudo e65cb7: OUTPUT«1234␤»
10:02 bbkr \o/
10:03 moritz_ rakudo++
10:04 szabgab joined #perl6
10:11 mberends joined #perl6
10:11 x3nU sorear: but how do i use it? i can't find anything about it
10:12 sorear masak++ is busy implementing it
10:13 moritz_ std: sub d($x where ( 1 <= $x <= 100 ) ) { }
10:13 p6eval std 31912: OUTPUT«ok 00:01 117m␤»
10:14 moritz_ rakudo: sub d($x where ( 1 <= $x <= 100 ) ) { }
10:14 p6eval rakudo e65cb7:  ( no output )
10:14 * moritz_ thought that it required { }
10:14 cono moritz_: If method returns gather list, how to test it? is $x.iterate, <a b>, "bla-bla-bla" ?
10:15 moritz_ cono: I prefer $x.iterate.join('|'), 'a|b', ...;
10:15 cono ah, thanks
10:15 moritz_ is() does string comparison
10:16 tadzik cono: I usually do is $list.sort, <ba ba ba>
10:16 moritz_ tadzik: that is not very robust
10:17 tadzik moritz_: what do You mean?
10:17 sorear ok, niecza is now running on current std with much better package handling
10:17 moritz_ tadzik:it can't distinguish 'a b' from 'a', 'b'
10:17 NiiHiiL joined #perl6
10:17 moritz_ which is fine if you know there are no whitespace in it
10:17 tadzik oh, you're right
10:17 moritz_ but I like to be explicit, and use '|' as a separator
10:18 cono I wrote: is $x.iterate.map({~$_}).join('|'), "a|b", "Iterate";
10:18 sorear now I need au++ or pmurias++ or someone who groks STD-on-CPAN to re-fix STD in a way that doesn't completely bork the bootstrap
10:18 moritz_ the map is superfluous
10:18 moritz_ .join also coerces to strings
10:18 sorear after that, I'll have moritz++ try again
10:19 cono moritz_: w/o map I had:  got: 'Any()|Any()'
10:19 moritz_ huh.
10:19 moritz_ sounds like a bug
10:19 tadzik hmm
10:19 tadzik http://github.com/rakudo/rakudo/commit/0128​ccdaa344d5e6386dc920916458ab6f26fbae#L0R28
10:19 moritz_ cono: see if you can reporduce it
10:19 tadzik what VM's are planned?
10:19 moritz_ tadzik: .NET, maybe V8
10:19 cono moritz_: I'll try to minimize code for "rakuo:"
10:19 * sorear out.
10:19 tadzik V8 is this JS stuff, right?
10:20 moritz_ I'll blog about it in the next few days
10:20 moritz_ tadzik: yes
10:22 bbkr are there any HTTP::Request/Response modules for Rakudo?
10:23 moritz_ not sure, need to ask mberends++
10:24 moritz_ jnthn++ # nice examples in his slides
10:25 tomaw joined #perl6
10:26 tadzik are the slides on the web?
10:26 moritz_ tadzik: you have to ask them when he's done
10:26 tadzik a'right
10:26 Mowah joined #perl6
10:35 am0c joined #perl6
10:37 Italian_Plumber joined #perl6
10:41 cono moritz_: http://paste.org.ru/?qh4zgz
10:42 cono moritz_: with map: a,b
10:42 mberends joined #perl6
10:46 mberends bbkr: I'm not sure if http://github.com/mberends/http-server-simple or http://www.gitorious.org/http-daemon contain the sort of code you're looking for.
10:49 smash (newbie question alert) anyway i can manipulate @*INC ?
10:49 tadzik yep
10:49 moritz_ smash: yes, but you need to do it in a BEGIN block to take effect early enough
10:49 dalek rakudo: 7083478 | moritz++ | src/Perl6/ (2 files):
10:49 dalek rakudo: Implement :i and :s on rx//; refactor adverb validation a bit
10:49 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​083478198dc0e6040d5148373f8e6cadc205c58
10:49 moritz_ BEGIN { @*INC.push('lib') }
10:50 smash fair enough
10:50 smash moritz_: thank you
10:51 bbkr mberends: not exaclty. gitorious.org/http-daemon/ has such classes but they are written inline and are missing a lot of functionality offered by P5 HTTP::Request/Response classes. I think I'll create proper HTTP::Request and HTTP::Response classes that can be easily reused (with grammars, so they can be both used on server and client side). after that I plan to release JSON::RPC
10:52 pmichaud pmichaud@plum:~/rakudo$ ./perl6
10:52 pmichaud > say 3 ~~ True;
10:52 pmichaud Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead at line 1, near " True;\n"
10:53 pmichaud > say 3 ~~ False;
10:53 pmichaud Smartmatch against False always fails; if you mean to test the topic for truthiness, use :!so or *.not or !* instead at line 1, near " False;\n"
10:53 moritz_ pmichaud++
10:53 pmichaud we now need to fix t/spec/S03-smartmatch/any-bool.t
10:53 bbkr moritz_: I already reported that in your JSON::Tiny - https://rt.cpan.org/Public​/Bug/Display.html?id=55720 - safer to use unshift to modify @*INC :)
10:55 jettero joined #perl6
10:55 bbkr rakudo: say ~@*INC
10:55 p6eval rakudo e65cb7: OUTPUT«lib /home/p6eval/.perl6/lib /home/p6eval//p1/lib/parrot/2.​6.0-devel/languages/perl6/lib .␤»
10:56 mberends bbkr: great! the HTTP::Daemon is only really a proof of concept, so extending it would be useful. I expect to use HTTP::Server::Simple::PSGI more myself.
10:57 whiteknight joined #perl6
10:59 jettero the last time I looked at perl6 (2008?) I asked about XS (or the 6 equiv) on #perl6 at perl.org and I was told there's no solution for that yet... is that still the case?  Is there a faq on that?
11:00 tadzik jettero: http://github.com/jnthn/zavolaj
11:00 tadzik jettero: it's a native call interface
11:00 jettero right, nci
11:00 jettero I wish I could memorize that.  Seems as you approach 40, you forget things you don't use.  pfft
11:00 sorear I'm doing that already at 19
11:01 jettero heh
11:01 jettero my brain didn't used to be quit as mushy.  Sucks. :)
11:02 meppl joined #perl6
11:02 snarkyboojum sorear: thanks - adding PERL6LIB=./lib:. gets past the 'perl tryfile STD.pm6' error. Now I get to Target SAFE.cs and end up with another error "error CS0006: cannot find metadata file `Kernel.dll'" - see http://gist.github.com/509560
11:02 jettero well, that nci stuff seems really nice.  I'm looking at the sqlite3.p6 and it's about 600 times easier than xs
11:02 jettero you can actually read it
11:02 tadzik that's right
11:03 jettero wow, how exciting
11:03 jettero I have to read the rest of this now.  Did he pick up the libs in bytecode? or did parrot add support for that?
11:03 tadzik no idea
11:04 snarkyboojum jettero: what are you reading?
11:04 jettero snarkyboojum: I was reading the sqlite3.p6 example in the NCI git
11:04 snarkyboojum jettero: link?
11:05 jettero now I'm reading the nativecall.pm6 .. in particular: http://is.gd/e40EJ   <--- does Q:PIR drop bytecode into the output?
11:05 jettero I have to learn perl6 now I guess.  I'm all geeked out
11:05 snarkyboojum Q:PIR is effectively inline PIR as I understand it
11:05 jettero that's certainly what it looks like
11:06 snarkyboojum jettero: so not bytecode, but ends up in the PIR output by Rakudo I guess
11:06 jettero I learned about 1% parrot speak and like 1% perl6 so far.  Kinda like learning to pronounce Russian and then stopping
11:06 jettero yeah, I think of PIR as bytecode, clearly wrong, but I don't know the words yet
11:06 snarkyboojum just PIR :)
11:07 jettero well, I know that *now*
11:08 jettero tadzik: do you happen to know if that's the only NCI? or are there others also?
11:08 jettero I recall that there was no concensus on how things should be done
11:08 tadzik jettero: I don't think there are any others
11:08 snarkyboojum other NCI?
11:09 jettero in that case, I find zavolaj a rather unusual name.
11:09 jettero probably US centric on my part
11:09 sorear snarkyboojum: q:p{Niecza.proj} ~~ s:g/cswrite/writecs/
11:09 sorear (why am I making so many typos.)
11:10 snarkyboojum jettero: jnthn loves his slovak languages, so there's a few interesting Perl 6 modules names like that :)
11:10 snarkyboojum sorear++ # for never sleeping
11:11 jettero svieks!
11:12 jettero seems PIR has instructions to pick up libs, or else he's pulling these functions in from somewhere I can't see, "$lib = pir::loadlib__Ps($libname);"
11:14 sorear pir::loadlib is just dlopen
11:17 snarkyboojum jettero: see rakudo/parrot/src/nci/extra_thunks.nci for the NCI signature definitions.. as I understand it, to interface with external libs, relevant signatures need to be added here and built into parrot
11:17 snarkyboojum I'm yet to play with it, but I have a project in mind :)
11:18 xinming joined #perl6
11:19 snarkyboojum sorear: I'm getting further! latest error - 'AOT compilation is not supported on this platform', http://gist.github.com/509584
11:20 snarkyboojum sorear: perhaps that's the fault of my mono install :|
11:22 jettero sorear: makes sense.  presumably loadlib would choose LoadLibrary in windows? or is this a *nix specific thing?
11:24 rgrau joined #perl6
11:25 smash moritz_: http://blogs.perl.org/users/smash/ i'm sure that you answer earlier will help others
11:25 pnu rakudo: sub foo ( Any ::T $x ) { say T; say '1'.T }; foo(1);
11:25 p6eval rakudo e65cb7: OUTPUT«Int()␤Method 'T' not found for invocant of class 'Str'␤  in 'foo' at line 22:/tmp/jDKsG5zh3x␤  in main program body at line 22:/tmp/jDKsG5zh3x␤»
11:25 pnu how can I coerse to type T.. which is Int in this case?
11:25 tadzik smash: you can mention PERL6LIB there
11:26 tadzik pushing to @*INC does not look familiar
11:30 sorear snarkyboojum: Delete all the mono --aot calls from Niecza.proj, then
11:30 snarkyboojum sorear: if I remove aot and rebuild, things "work", and when I run ./niecza_eval I see lovely things like --> http://gist.github.com/509600
11:30 sorear snarkyboojum: the --aot usage is just a speed hack
11:31 snarkyboojum sorear: thought as much - see above :)
11:31 sorear geeze what's wrong with your mono
11:31 snarkyboojum sorear: hehe - I'm happy with that response :P
11:31 snarkyboojum sorear: at least build works ;)
11:31 sorear might try removing --debug=casts from CompilerDriver.pm
11:32 snarkyboojum sorear: I'd say "what's wrong" with my mono is that I installed it from an OS X disk image ;_
11:33 sorear snarkyboojum: ppc?
11:33 snarkyboojum intel
11:33 snarkyboojum i7
11:33 sorear odd
11:33 meppl joined #perl6
11:35 sorear anyways --debug=casts is in no way necessary
11:37 snarkyboojum sorear: fwiw, there are no --debug=casts references in CompilerDriver.pm, the only reference is in ./niecza_eval, removing it from there fixes the repl - http://gist.github.com/509604
11:38 snarkyboojum sorear: thanks for your help - hope my pestering has ironed a few things out :)
11:40 sorear How slow is it?
11:40 envi^home joined #perl6
11:40 sorear With --aot the REPL usually takes about a second per line
11:40 snarkyboojum sluggish
11:41 snarkyboojum about a second per line here
11:41 snarkyboojum without it
11:43 snarkyboojum sorear: also, here's a diff showing what I ended up changing http://gist.github.com/509612
11:44 pugssvn r31913 | sorear++ | [STDeco] Rework Makefile to make stages more similar to each other, also reduces 3 stages to 2.  ** LIKELY BREAKS SNAPTEST AND STD-DIST **
11:47 adde joined #perl6
11:50 snarkyboojum first time I've had Niecza building and running on my mac anyway - so w00t
11:50 sorear I'll apply those changes once I finish what I'm doing with STD...
11:54 timbunce joined #perl6
11:57 uniejo joined #perl6
11:59 plol joined #perl6
12:00 moritz_ http://kraih.com/usingperl6-sri.jpg
12:01 squeeky _sri++
12:04 bbkr Is there any way to restrict class attribute with regexp? something like class Address { has $.zip where /^\d\d-\d\d\d$/ } ?
12:07 moritz_ yes
12:08 moritz_ rakudo: subset Zip of Str where /^\d\d-\d\d\d/; class Address { has Zip $zip }; say Adrress.new(zip => '20-123').pperl
12:08 p6eval rakudo e65cb7: OUTPUT«===SORRY!===␤Confused at line 22, near "subset Zip"␤»
12:08 takadonet morning all
12:08 moritz_ rakudo: subset Zip of Str where /^\d\d-\d\d\d/; class Address { has Zip $.zip; }; say Adrress.new(zip => '20-123').perl
12:09 p6eval rakudo e65cb7: OUTPUT«===SORRY!===␤Confused at line 22, near "subset Zip"␤»
12:09 moritz_ std: subset Zip of Str where /^\d\d-\d\d\d/; class Address { has Zip $.zip; }; say Adrress.new(zip => '20-123').perl
12:09 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unrecognized regex metacharacter - (must be quoted to match literally) at /tmp/C5328S2e89 line 1:␤------> [32msubset Zip of Str where /^\d\d-[33m⏏[31m\d\d\d/; class Address { has Zip $.zip; [0m␤Unable to parse regex; couldn't find final '/' at
12:09 p6eval ../tm…
12:09 moritz_ rakudo: subset Zip of Str where /^\d\d\-\d\d\d/; class Address { has Zip $.zip; }; say Adrress.new(zip => '20-123').perl
12:09 p6eval rakudo e65cb7: OUTPUT«Could not find sub &Adrress␤  in main program body at line 22:/tmp/xbjsGdXuu5␤»
12:09 moritz_ rakudo: subset Zip of Str where /^\d\d\-\d\d\d/; class Address { has Zip $.zip; }; say Address.new(zip => '20-123').perl
12:09 p6eval rakudo e65cb7: OUTPUT«Address.new(zip => "20-123")␤»
12:09 moritz_ rakudo: subset Zip of Str where /^\d\d\-\d\d\d/; class Address { has Zip $.zip; }; say Address.new(zip => '20-foo').perl
12:09 p6eval rakudo e65cb7: OUTPUT«Address.new(zip => "20-foo")␤»
12:10 moritz_ hum
12:10 moritz_ seems to be not yet enforced :(
12:12 bbkr moritz++
12:12 moritz_ http://www.perlmonks.org/?node_id=852900
12:13 smash joined #perl6
12:15 bluescreen joined #perl6
12:15 pugssvn r31914 | sorear++ | [STDeco] FindBin returns, this time aware of the bootstrapping procedure and less likely to screw it up.
12:17 moritz_ sorear: still interested in build errors from the msbuild branch?
12:17 tadzik smash: how about mentioning PERL6LIB in http://blogs.perl.org/users/smash/2010/08/per​l6-modules-in-rakudo-baby-steps-part-1.html? Pushing to @*INC may seem a little cryptic
12:17 timbunce sorear/jnthn : if I have a perl5 array ref returned from blitzkost, how can I access the elements?
12:17 smash tadzik: sure, or feel free to comment and add the info
12:18 bbkr rakudo: class A {enum E <a b c>; has E $.x;}; A.new(x => "p").x.say # enforcing enum values NYI?
12:18 p6eval rakudo e65cb7: OUTPUT«p␤»
12:18 tadzik shabble: I'd have to register to comment, I hate that :/
12:19 sorear moritz_: yes, but i'd like to finish fixing snarkyboojum's build errors first
12:20 tadzik bah, smash ↑
12:20 tadzik damn you, tab-completion
12:20 tadzik shabble: pardon
12:20 moritz_ sorear: http://nopaste.snit.ch/22575
12:21 moritz_ tadzik: I commented
12:21 tadzik moritz_++
12:21 smash moritz_++
12:22 moritz_ it might have eated it :(
12:22 smash rakudo: %*ENV.perl
12:23 p6eval rakudo e65cb7: OUTPUT«Method 'key' not found for invocant of class 'String'␤  in <anon> at line 4682:CORE.setting␤  in 'Any::join' at line 1␤  in 'EnumMap::perl' at line 4688:CORE.setting␤  in main program body at line 22:/tmp/qLkpRZPr5_␤»
12:23 moritz_ there's a parrot limitation that you can't iterate over the environment :(
12:23 smash oh, right
12:23 smash moritz_: fixable limitation ?
12:23 moritz_ smash: I hope so :-)
12:24 smash err, i mean 'quick fixable' ?
12:24 moritz_ I have no idea
12:25 sorear moritz_: yeah that's something snarkyboojum found
12:25 sorear fixing it
12:25 uniejo joined #perl6
12:26 whiteknight joined #perl6
12:27 timbunce member:sorear/member:jnthn : if I have a perl5 array ref returned from blitzkost, how can I access the elements? (I'm writing a DBDI->DBI driver)
12:27 Guest94224 joined #perl6
12:29 sorear you'll likely need to do something like my $fetch = eval 'sub { $_[0][$_[1]] }', :lang<perl5>
12:29 sorear moritz_: fix pushed
12:29 timbunce sorear: eek! ok, thanks
12:29 TimToady this stupid network won't let me check in with svn...
12:30 frettled no room for SSH tunnel goodness?
12:30 sorear the parrot aggregate API is quite ill defined
12:30 moritz_ tadzik: neither me
12:30 moritz_ meant TimToady, sorry
12:30 TimToady perhaps if I switch to https it might work
12:30 sorear see also: %*ENV refusing to enumerate
12:30 moritz_ didn't work reliably for me
12:31 * sorear goes and attempts to sleep for longer than the average compile run time
12:31 szbalint NQP++
12:38 ruoso joined #perl6
12:42 takadonet left #perl6
12:42 Mowah joined #perl6
12:44 takadonet joined #perl6
12:55 [Coke] (can't iterate over env is bug in parrot) - is there a trac ticket for this?
12:58 moritz_ not sure... there's a source code comment for it
12:58 Ross joined #perl6
12:58 moritz_ src/pmc/env.pmc
12:58 moritz_ C<Env> is a singleton class which provides access to the system environment.
12:58 moritz_ XXX Think about returning Pair back. Currently there is no way to iterate over
12:58 moritz_ environment I<keys>.
13:02 [Coke] moritz_: http://nopaste.snit.ch/22578
13:02 [Coke] so, it it least mostly works.
13:03 [Coke] ... why Env is not subclassing Hash, I unno.
13:04 moritz_ [Coke]++
13:04 snarkyboojum that is one sexy book cover
13:04 tomaw joined #perl6
13:05 moritz_ star: use LWP::Simple; say "alive"
13:05 p6eval star 2010.07: OUTPUT«alive␤»
13:06 LaVolta joined #perl6
13:11 timbunce sorear/jnthn: eval 'sub { use Data::Dumper; warn Dumper([@_]); $_[0][$_[1]] }', :lang<perl5> gives Assertion failed: (*strp), function Perl_av_make, file av.c, line 406 :(
13:11 moritz_ sorear: build worked
13:11 * timbunce thinks I'll have to start contributing to blitzkost...
13:15 __rnddim__ joined #perl6
13:15 Guest23195 joined #perl6
13:15 bbkr how to write uppercasing in substitution in P6? for example I need to translate following P5 code: s/some_capture_here/\U$1/
13:17 io joined #perl6
13:18 TimToady rakudo: $_ = "foo"; s/o/{uc $/.Str}/; .say
13:18 p6eval rakudo 708347: OUTPUT«fANY()<0X357EFC0>o␤»
13:18 [particle] urk
13:18 TimToady hmm
13:18 bbkr rakudo: $_ = "foo"; s/(o)/{uc $/.Str}/; .say
13:19 p6eval rakudo 708347: OUTPUT«fANY()<0X357EFC0>o␤»
13:19 TimToady rakudo: $_ = "foo"; s[0] = $/.uc; .say
13:19 p6eval rakudo 708347: OUTPUT«foo␤»
13:19 TimToady rakudo: $_ = "foo"; s[0] = $/.Str.uc; .say
13:19 p6eval rakudo 708347: OUTPUT«foo␤»
13:20 TimToady rakudo: $_ = "foo"; say $_.subst(/o/, { uc $/.Str })
13:20 p6eval rakudo 708347: OUTPUT«fANY()<0X357EFC0>o␤»
13:20 TimToady rakudo: $_ = "foo"; say $_.subst(/(o)/, { uc $0.Str })
13:20 p6eval rakudo 708347: OUTPUT«fANY()<0X7DAA300>o␤»
13:20 bbkr rakudo: $_ = "foo"; s/(o)/{uc $0.Str}/; .say
13:20 p6eval rakudo 708347: OUTPUT«fANY()<0X74D6680>o␤»
13:21 TimToady most of those should work
13:22 bbkr rakudo: $_ = "foo"; s/(o)/{.uc}/; .say
13:22 p6eval rakudo 708347: OUTPUT«fFOOo␤»
13:22 bbkr blah :)
13:22 bbkr rakudo: $_ = "foo"; s:g/(o)/{.uc}/; .say
13:23 p6eval rakudo 708347: OUTPUT«fFOOFOO␤»
13:23 TimToady .uc takes the original $_
13:23 [Coke] rakudo:  $_ = "foo"; s:g/(o)/{.uc $0}/; .say
13:23 p6eval rakudo 708347: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
13:24 TimToady two terms in a row
13:24 TimToady std: $_ = "foo"; s:g/(o)/{.uc $0}/; .say
13:24 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row (method call requires colon or parens to take arguments) at /tmp/xQnjLsGx4P line 1:␤------> [32m$_ = "foo"; s:g/(o)/{.uc [33m⏏[31m$0}/; .say[0m␤    expecting any of:␤   bracketed infix␤  infix or meta-infix␤      statement
13:24 p6eval ..modifier loop…
13:24 [Coke] rakudo:  $_ = "foo"; s:g/(o)/{$0.uc}/; .say
13:24 p6eval rakudo 708347: OUTPUT«Method 'uc' not found for invocant of class ''␤  in <anon> at line 22:/tmp/f6rAkygB1A␤  in <anon> at line 2108:CORE.setting␤  in 'Cool::subst' at line 1␤  in main program body at line 22:/tmp/f6rAkygB1A␤»
13:24 [Coke] closerrr.
13:25 TimToady star: $_ = "foo"; s/o/{uc $/.Str}/; .say
13:25 p6eval star 2010.07: OUTPUT«fANY()<0X38DB120>o␤»
13:29 bbkr spec is so poor in explaining this :(
13:29 TimToady in explaining bugs?  :)
13:30 bbkr no, in explaining how to use capture in substitution
13:31 TimToady star: $_ = "foo"; s/(o)/$0.uc()/; .say
13:32 p6eval star 2010.07: OUTPUT«Method 'uc' not found for invocant of class ''␤  in <anon> at line 22:/tmp/wp46RHWgrF␤  in <anon> at line 2095:CORE.setting␤  in 'Cool::subst' at line 1␤  in main program body at line 22:/tmp/wp46RHWgrF␤»
13:32 TimToady star: $_ = "foo"; s/(o)/(~$0).uc()/; .say
13:32 p6eval star 2010.07: OUTPUT«f(~Any()).uc()o␤»
13:32 TimToady star: $_ = "foo"; $_ ~~ s/(o)/(~$0).uc()/; .say
13:32 p6eval star 2010.07: OUTPUT«f(~Any()).uc()o␤»
13:33 masonkramer joined #perl6
13:33 TimToady oops :)
13:34 [Coke] it's ok, TimToady, it's not just you. =-)
13:34 TimToady star: my $x = "foo"; $x ~~ s/(o)/$0.Str.uc()/; $x.say
13:34 p6eval star 2010.07: OUTPUT«fANY()<0X7301830>o␤»
13:34 TimToady not matching the o for some reason
13:35 TimToady or the typical rakudo confusion over making $/ avaailable to the rhs
13:35 vcrini joined #perl6
13:36 javs joined #perl6
13:36 thrn joined #perl6
13:37 TimToady star: $_ = 'foo'; my $x; s/$x=[o]/{$x.uc}/; .say
13:37 p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "s/$x=[o]/{"␤»
13:37 snarkyboojum sorear: FWIW, the new ContinueOnError attributes on the Exec tasks running mono --aot etc are still failing for me, i.e. not continuing on error :)
13:38 drbean joined #perl6
13:38 meppl joined #perl6
13:41 tomaw joined #perl6
13:41 meppl joined #perl6
13:42 [particle] star: $_ = 'foo'; .subst(:g, /o/, 'O'); .say
13:42 p6eval star 2010.07: OUTPUT«foo␤»
13:42 TimToady .=
13:42 [Coke] star: $_ = 'foo'; .subst(:g, /o/, 'O').say
13:42 p6eval star 2010.07: OUTPUT«fOO␤»
13:43 [particle] oops
13:43 [Coke] Looks like subst is returning-but-not-modifying.
13:43 bbkr yep. that works. but I need access to capture result :(
13:43 TimToady .subst isn't supposed to modify
13:44 TimToady .=subst is modify
13:44 [particle] star: $_ = 'foo'; .=subst(:g, /o/, 'O'); .say
13:44 p6eval star 2010.07: OUTPUT«fOO␤»
13:44 [particle] and it works :), but not for bbkr's use case :(
13:45 TimToady it's the $/ scoping problem
13:45 bbkr rakudo: $_ = "foo"; s:g[o] = "O"; .say # checking if this one will modify...
13:45 p6eval rakudo 708347: OUTPUT«fOO␤»
13:45 bbkr hmm
13:48 TimToady star: $_ = 'foo'; my $x; s/(o){$x = $0}/{$x.uc}/; .say
13:48 p6eval star 2010.07: OUTPUT«fOo␤»
13:48 TimToady there you go
13:51 moritz_ star: $_ = 'foo'; .=subst(:g, /o/, { .uc }); .say
13:51 p6eval star 2010.07: OUTPUT«fOO␤»
13:51 * moritz_ out-golfed TimToady :-)
13:51 moritz_ star: $_ = 'foo'; .=subst(:g, /o/, *.uc); .say
13:51 tadzik different effect :)
13:52 TimToady only due to a rakudo bug :P
13:52 p6eval star 2010.07: OUTPUT«fOO␤»
13:52 moritz_ now come the excuses
13:52 timbunce yeah! I have a working perl5 DBI driver for perl6 DBDI (for some value of working) thanks to blitzkost
13:52 moritz_ \o/
13:52 tadzik star: $_ = 'foo'; .=subst(:g, /o/, 'O'); .say
13:52 p6eval star 2010.07: OUTPUT«fOO␤»
13:52 tadzik ha ha :)
13:52 moritz_ timbunce: something to show off for your talk :-)
13:52 [particle] timbunce++
13:52 moritz_ tadzik: you're cheating - we had that before
13:52 tadzik oh
13:53 moritz_ you're now on the YAPC screen - say hi :-)
13:53 tadzik hi!
13:54 cono \o/
13:54 [particle] hello europe!
13:54 tadzik yay, I'm on YAPC!
13:54 * bbkr thanks everyone for help
13:54 cono rakudo: "hello".say
13:54 p6eval rakudo 708347: OUTPUT«hello␤»
13:54 TimToady hello YAPC people !!!
13:54 snarkyboojum hello YAPC!
13:54 pmichaud moritz_++ lied; no screen now :-P
13:55 tadzik oh you!
13:55 TimToady aww
13:55 * snarkyboojum knew it :P
13:55 [particle] damn... just when i'm ready for my close-up
13:55 jaldhar joined #perl6
13:56 ambs joined #perl6
13:56 takadonet hey everyone!
13:57 takadonet damn it...
13:58 plobsing joined #perl6
14:00 LaVolta http://www.reddit.com/r/programming/com​ments/cxage/diving_into_perl_6/c0vygmo # interesting, strong discussion
14:02 tadzik wow, my propaganda image got to the very top :)
14:02 ambs joined #perl6
14:02 tadzik but is it a strong discussion? I see Perl people pacifying Python trolls, but maybe I'm biased :)
14:02 Axius joined #perl6
14:03 LaVolta tadzik:  I mean the choice of words....
14:03 tadzik oh, yeah
14:04 tadzik But I'm really suprised seeing ulyanov's reaction, Perl is attacked all the time on reddit, but with such stupid arguments it's not even funny
14:04 tadzik * I'm not really suprised
14:05 LaVolta i guess reddit's a place filled with snake lovers..
14:05 tadzik snake lovers, or Perl haters? I have nothing against snake lovers I must say. _Some_ of them are kind and polite peopl
14:06 tadzik but as I said in one of the comments, I sometimes feel as some of them learn the hate towards Perl just after learning Python's data types and control flow statements
14:06 Axius hello
14:06 tadzik hello Axius
14:07 Axius tadzik: hi
14:08 LaVolta yes agreed, I have nothing against them, but some people seem to developed a habit...
14:09 LaVolta pardon my broken english, you can understand that.
14:09 tadzik yep
14:09 tadzik they seem to do nothing but bashing Perl all the time
14:09 LaVolta that's my point :)
14:10 [Coke] this is why the p5 folks should like p6. Now we can draw their fire.
14:10 tadzik they're probably jealous that "dying Perl" has still more job offerts and is still more popular on github
14:11 LaVolta tadzik, btw, is that font called DejaVu?
14:12 pmurias joined #perl6
14:13 tadzik LaVolta: which one, the code?
14:13 LaVolta yes
14:15 tadzik gvim says it's monospace
14:16 PerlJam blah.
14:16 LaVolta okay, thanks :)
14:17 jdv79 joined #perl6
14:18 kiffin left #perl6
14:25 molaf joined #perl6
14:27 takadonet ..
14:36 M_o_C joined #perl6
14:39 squeeky that's a bit
14:53 timbunce joined #perl6
14:56 uniejo joined #perl6
14:56 bbkr rakudo: grammar A {token t { .}; }; "abc" ~~ m/ foo <A::t> / # what am I doing wrong here? how can I include token from grammar into regex?
14:57 p6eval rakudo 708347: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 22, near "::t> / # w"␤»
14:58 moritz_ bbkr: currently you can't :(
14:58 moritz_ bbkr: you can call A.parse(:rule<t>)
14:58 moritz_ + a string argument
14:58 bbkr moritz_: thanks
15:01 bbkr hmm, where do I pass string to match? A.parse("abc", rule => "t") ?
15:01 pmichaud bbkr: yes.
15:01 bbkr awesome, that will do. thanks
15:04 alester joined #perl6
15:04 wamba left #perl6
15:05 wamba joined #perl6
15:05 bbkr rakudo: grammar A {token t { ^\d\d$ }; }; say "OK" if A.parse("22", :rule<t>);
15:05 p6eval rakudo 708347: OUTPUT«OK␤»
15:05 bbkr rakudo: grammar A {token t { ^\d\d$ }; }; say "OK" if A.parse("22", rule => 't');
15:05 p6eval rakudo 708347: OUTPUT«===SORRY!===␤Malformed regex at line 22, near "=> 't');"␤»
15:05 bbkr hmm, why the second case do not work? bug?
15:06 moritz_ parsing bug, probably
15:06 moritz_ it commits to parse it as a rule declarator
15:06 TimToady std: grammar A {token t { ^\d\d$ }; }; say "OK" if A.parse("22", rule => 't');
15:06 ashleydev joined #perl6
15:06 p6eval std 31912: OUTPUT«ok 00:01 117m␤»
15:06 * bbkr reports
15:06 dalek rakudo: 1270a9c | pmichaud++ | docs/ROADMAP:
15:06 dalek rakudo: Add 'constant' into ROADMAP.
15:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​270a9c68b310b1337b3685a6328a010cfc55117
15:06 dalek rakudo: aa7de66 | pmichaud++ | docs/ROADMAP:
15:06 dalek rakudo: Merge branch 'master' of github.com:rakudo/rakudo
15:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​a7de6662d80b24b820fc65309aca5f18817de22
15:06 dalek rakudo: c716715 | pmichaud++ | src/Perl6/Grammar.pm:
15:06 dalek rakudo: Give an error for smartmatching against 'True' or 'False'.
15:06 dalek rakudo: (Should be a .worry, but we'll live with .panic for now.)
15:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​716715817e6735832604e903389453f47df5d97
15:06 dalek rakudo: 590f3ba | pmichaud++ | src/Perl6/Grammar.pm:
15:06 dalek rakudo: Also warn for use of Bool::True and Bool::False in smartmatch (based on local
15:06 dalek rakudo: speculation with TimToady++).
15:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​90f3ba0ffab5ae4a689f71bc86a22cdfe3ddfad
15:06 dalek rakudo: 7e356cc | pmichaud++ | src/Perl6/ (2 files):
15:06 dalek rakudo: Merge branch 'master' of github.com:rakudo/rakudo
15:06 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​e356cc737f7f1a1fc4490f3afc143fa3d76052c
15:07 dalek rakudo: 19931fe | pmichaud++ | README:
15:07 dalek rakudo: Update README with pointer to Rakudo Star distributions.
15:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​9931fea011b4c80443f3fd43906d4c205ae2ab3
15:07 moritz_ http://blogs.perl.org/users/miro​d/2010/08/perl-6-impression.html
15:07 TiMBuS $P0 = new ['Perl6Scalar'], item\n   setprop $P1, "rw", true #ooh god how did i manage that
15:08 mkt joined #perl6
15:10 Juerd left #perl6
15:11 smash pmichaud: do you have a link for your NQP presentation ?
15:12 moritz_ smash: they are usually on http://www.pmichaud.com/2010/pres/ somwhere
15:12 adde joined #perl6
15:12 mkt someone know about mencoder?
15:13 moritz_ I know something about it; but I don't know the connection to Perl 6
15:15 smash moritz_: found it, thank you
15:17 * LaVolta 's sleepy, good nite #perl6
15:17 moritz_ o/
15:18 jam_repl joined #perl6
15:18 io left #perl6
15:19 justatheory joined #perl6
15:19 alester TimToady: is http://perlmonks.com/?displayt​ype=displaycode;node_id=848629 anywhere stored?
15:19 alester Want a canonical version to point to.
15:19 [Coke] alester: I think it's in pugs.
15:20 pmichaud it's in the pugs repo
15:20 pmichaud actually, it's on perl6.org
15:20 [Coke] https://svn.pugscode.org/p​ugs/docs/Perl6/Cheatsheet
15:20 pmichaud canonical is the perl6.org location
15:20 ash_ joined #perl6
15:21 pmichaud http://svn.pugscode.org/pugs/docs​/Perl6/Cheatsheet/cheatsheet.txt
15:21 pmichaud oops
15:21 pmichaud okay, I guess it's the pugs location :-)
15:22 jam_repl hello y'all - newbie needs help with  REPL interactive mode - can I get vim keybindings?
15:22 [Coke] is ?regex? from p5 gone?
15:23 [Coke] the REPL is using the readline library under the covers.
15:24 moritz_ [Coke]: yes, ?foo? is gone (yay)
15:24 [Coke] ah, found my ?regex? in the spec. danke.
15:26 bbkr rakudo: class A { method BUILD (Pair) {}; }; A.new("foo"=>"bar") # why does this fail? IMO it should match signature
15:26 p6eval rakudo 708347: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in 'A::BUILD' at line 22:/tmp/prMnHVq8le␤  in main program body at line 22:/tmp/prMnHVq8le␤»
15:26 moritz_ bbkr: new != Build
15:27 moritz_ I'm kinda surprised the call to .new() doesn'T fails
15:29 jam_repl Or - How do I repeat last command in REPL?
15:29 rcfox Press up.
15:29 alester I have to say I'm getting more and more interested in the stuff I see going on.
15:30 bbkr moritz_: ah, I get it. "new" takes Pair and search for BUILD with () signature because key from Pair passed to new doesn't match any Build signature...
15:31 bbkr rakudo: class A { method BUILD (Pair $a) {}; }; A.new(a => ("foo"=>"bar")) # checking...
15:31 p6eval rakudo 708347:  ( no output )
15:31 bbkr yep, that was it
15:32 alester Just to be able to do  $sum = [+] @list makes me wet my pants.
15:32 alester and the .perl method.
15:33 jam_repl arrow up?  gives me ^[[A
15:33 alester Must not have readline.
15:34 [particle] jam_repl: are you on linux or windows?
15:34 moritz_ jam_repl: which probably means that you didn't have libreadline-dev installed when you configured parrot
15:35 jam_repl os X rakudo star install
15:35 pmichaud alester: btw, I came up with a simpler version of is_prime_by_factors
15:35 alester ok
15:35 pmichaud sub is_prime($n) { !(2..($n.sqrt)).grep( $n %% * ); }
15:36 alester yeah, I have that.
15:36 pmichaud okay, good.
15:36 pmichaud I thought about tweeting it :-)
15:36 alester wait, no, I don't have the * one
15:36 alester what's $n %% *
15:36 pmichaud is $n evenly divided by the candidate factor
15:36 ash_ joined #perl6
15:36 TimToady same as $n % * == 0
15:36 tadzik pmichaud: http://www.pmichaud.com/2010/pres/ya​pceu-rakudo/slides/slide41i.html#end typo in TIMTOWTDI?
15:36 pmichaud same as  { $n % $_ }
15:36 jam_repl so I need to rebuid with libreadline-dev to get correct functionality?
15:36 alester It's the * I don't get
15:37 pmichaud er, same as  { $n %% $_ }
15:37 pmichaud * in an expression autocurries
15:37 alester meaning what
15:37 pmichaud so   * + $x   is the same as  { $^a + $x }
15:37 pmichaud i.e., it gets treated as a closure with a parameter
15:37 alester ok.
15:37 alester I don't know $^a, but ok
15:37 rcfox pmichaud: Couldn't you do something like 2,3,5,7.. ?
15:37 pmichaud multiple *'s translate into multiple params
15:38 rcfox There's no sense in checking the even numbers.
15:38 pmichaud rcfox: yes, to avoid the evens
15:38 alester rcfox: Yes, that's trivial, that's not the point.
15:38 rcfox Okay.
15:38 pmichaud sub is_prime($n) { !(2, 3, 5 ...($n.sqrt)).grep( $n %% * ); }
15:38 * rcfox shrugs.
15:39 rcfox rakudo: say ~(2,3,5 ... 15);
15:39 p6eval rakudo 708347: OUTPUT«Unable to figure out pattern of series␤  in main program body at line 1␤»
15:39 tadzik do parametrized modules work?
15:39 rcfox rakudo: say ~(2,3,5,7 ... 15);
15:39 p6eval rakudo 708347: OUTPUT«2 3 5 7 9 11 13 15␤»
15:40 tadzik rcfox: it uses the 3 numbers before ...
15:40 alester My prime tester with the backtracking regex is dog slow, as we'd exepct.
15:40 tadzik rcfox: and figures out whether it's an arithmetical or geometrical series
15:40 alester but VERY dog slow
15:41 rcfox tadzik: Well, 2,3,5 is a different pattern than 3,5,7.
15:41 tadzik rcfox: but it's not a series
15:41 jam_repl If I get  ^[[A for up arrow... do I need to reinstall with libreadline-dev?
15:41 pmichaud jam_repl: likely.
15:41 moritz_ jam_repl: yes, and then rebuild rakudo and parrot
15:41 tadzik recompile parrot, no?
15:41 tadzik oh
15:42 alester So the way to remove odd canddiates would be
15:42 alester @candidates = @candidates.grep( * % 2 );
15:42 alester right?
15:42 ambs left #perl6
15:42 pmichaud or even
15:42 alester or is that shortenable?
15:42 pmichaud @candidates .= grep( * % 2 )
15:42 moritz_ @candidates.=grep(...)
15:42 jam_repl cool thank you
15:42 pmichaud but you want * %% 2
15:42 pmichaud if you want to keep the even candidates
15:42 jam_repl I'll do that then
15:42 alester .= means "gets concatenated"! :-)
15:42 moritz_ rakudo: my @can = 1, 2, 3, 4, 5; @can.=grep(* %% 2); say @can.perl
15:43 p6eval rakudo 708347: OUTPUT«[2, 4]␤»
15:43 pmichaud in perl 6, .= means "in place"
15:43 moritz_ alester: in your universe, maybe :-)
15:43 alester I do NOT want the evens.
15:43 pmichaud concatenation is  ~=
15:43 alester pmichaud: I know, I was kidding.
15:43 pmichaud alester: you said "remove odd candidates"  :-)
15:43 alester It's weird to see .= mean something entirely different.
15:43 alester oh, no, I meant remove even, keep odd
15:44 tadzik Sorry, we do not support marshaling most things to Perl 5 yet.
15:44 tadzik :(
15:46 phenicsl joined #perl6
15:47 moritz_ std: BEGIN{ push @*INC, 'C:\Rakudo\lib';}
15:47 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤ 'BEGIN' used at line 1␤Check failed␤FAILED 00:01 116m␤»
15:47 timbunce can someone give me commit bits to the zavolaj and blitzkost repros?
15:47 rokoteko alester: to put it in perl5. sub foo { my $x = shift; sub { $x + shift; }; my $five_plus = foo(5); print $five_plus->(10); .. in perl6. my &sub := 5 + *; ..
15:47 alester Yes, I understand, rokoteko .
15:47 rokoteko alester: okie. just helps me to understand also. been reading through moritz_'s article :)
15:48 alester which one?
15:48 rokoteko perl 5 to 6.
15:49 alester link?
15:49 rokoteko alester: http://perlgeek.de/blog-en/perl-5-to-6/
15:49 moritz_ or http://perlgeek.de/en/article/5-to-6 if you want to read them in-order
15:50 alester posted to Perlbuzz
15:50 alester I'm going to be a one-man Perl 6 flamethrower.
15:50 moritz_ alester++
15:50 pmichaud I think we tend to throw hugs, not flames.  :-)
15:51 timbunce pmichaud: speaking of hugs, can someone give me commit bits to the zavolaj and blitzkost repros?
15:51 moritz_ hugme: throw flames at alester
15:51 moritz_ hugme: list projects
15:51 hugme moritz_: I know about Math-Model, Math-RungeKutta, MiniDBI, book, gge, hugme, ilbot, java2perl6, json, modules.perl6.org, november, nqp-rx, nqpbook, perl6-examples, perl6-wtop, process-cmd-args, proto, pugs, star, svg-matchdumper, svg-plot, tardis, temporal-flux-perl6syn, try.rakudo.org, tufte, ufo, web, yapsi
15:52 moritz_ sorry, neither are on hugme. You need to ask jnthn++
15:52 alester regexes can be anonymous, right?
15:52 moritz_ yes
15:52 pmichaud alester: yes.
15:52 timbunce thanks moritz_. jnthn can you add them to hugme (no great rush)?
15:52 alester Is this a valid construction then?
15:52 alester my %hash = (
15:52 alester 'this' => 'that',
15:52 alester 'year' => 2112,
15:52 alester 'matcher' => regex { ^ M(r|rs|s) \s+ (\w+) \s+ Wall $ },
15:52 alester );
15:53 pmichaud should be okay.
15:53 moritz_ runs fine
15:53 moritz_ say %hash<matcher>.WHAT
15:53 moritz_ Regex()
15:54 mkt joined #perl6
15:54 alester ok, but it doesn't actually show the regex in .perl
15:54 alester that's what threw me off.
15:54 moritz_ that's because we don't decompile regexes yet
15:54 pmichaud we don't have a way to go from code objects to source yet
15:55 alester oh, ok
15:55 pmichaud very likely to show up rsn, though.
15:56 mkt_ joined #perl6
15:56 rcfox Well, once macros are implemented, you could capture the code into a Str when you're creating the regex.
15:56 ash_ joined #perl6
15:56 alester I don't approve of this "matches start at $0 now" crap.  Gosh darn it.
15:56 rcfox (Also for Blocks.)
15:56 alester Twice now I've been bitten but it.
15:57 moritz_ alester: would you want $1 to be an alias to $/[0] ? :-)
15:57 pmichaud rcfox: yes, but that gets a little expensive.  better is to store the entire source once and then keep track of offsets.
15:57 alester OK, I need another example of something that decompiles nicely in .perl
15:57 alester to put in my example.
15:57 ash_ moritz_: hi, have you seen http://try.rakudo.org/shell yet?
15:57 tadzik how about an object?
15:57 pmichaud currently .perl is a little ugly  (more)
15:57 alester tadzik: Suggestions of one I don't have to build on my own?
15:57 moritz_ ash_: no - looking now
15:57 pmichaud and beyond that, I have some real issues with .perl's definition in the spec
15:58 rcfox rakudo: say (0.5).perl;
15:58 pmichaud alester: maybe .perl on a Rat?
15:58 p6eval rakudo 708347: OUTPUT«1/2␤»
15:58 tadzik alester: well, how about a yourself-defined class?
15:58 ash_ moritz_: the default page when you go to try.rakudo.org is still the temp page that was up before
15:58 ash_ but i put the shell there so i can get it working and have comments from the larger public, for now
15:58 alester tadzik: I don't want to create a class for this example.
15:58 tadzik star: class A { has $.b;}; my $a = A.new; $a.b = 7; say $a.perl
15:58 p6eval star 2010.07: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/dvjjLW3_12␤»
15:58 tadzik alester: but this is nice :)
15:58 alester ok, how do I build a Rat.
15:58 rcfox rakudo: say (0.5).perl; # alester, look at me!
15:58 tadzik oops
15:58 ash_ its very basic, but it works, i think its an alright starting point for now
15:59 p6eval rakudo 708347: OUTPUT«1/2␤»
15:59 tadzik star: class A { has $.b is rw;}; my $a = A.new; $a.b = 7; say $a.perl
15:59 p6eval star 2010.07: OUTPUT«A.new(b => 7)␤»
15:59 moritz_ ash_: it's great.
15:59 moritz_ I just wonder why it doesn't autoprint
15:59 ash_ there are some bad spots, like any kind of error, i don't handle well yet
15:59 ash_ moritz_: i am putting all the text you write into a temp file and executing it
16:00 ash_ its not using the repr
16:00 rcfox pmichaud: You're probably right. I don't know anything about the internals, so that never occurred to me.
16:00 ash_ only stuff that comes out of the stdout gets printed
16:00 tadzik ash_: wouldn't piping to and from REPL be funnier?
16:00 moritz_ why doesn't it use the REPL?
16:00 moritz_ that was the original plan :-)
16:00 alester What do I do if I just want 0.5 to be 0.5, not rational?
16:01 pmichaud alester: .Num
16:01 ash_ i was having trouble doing that and being able to give it some input from stdin
16:01 TimToady 0.5 is a rationanal number
16:01 pmichaud or 0.5e0
16:01 risou joined #perl6
16:01 ash_ since i wanted to setup a sample input file so people can try the i in io
16:01 rcfox Also, thing is sketchy:
16:02 rcfox rakudo: sub foo(Num $a) {}; foo(0.5);
16:02 p6eval rakudo 708347: OUTPUT«Nominal type check failed for parameter '$a'; expected Num but got Rat instead␤  in 'foo' at line 22:/tmp/ionI23FB5t␤  in main program body at line 22:/tmp/ionI23FB5t␤»
16:02 rcfox s/thing/this/
16:02 TimToady that should probably be made to dwym
16:02 pmichaud rakudo:  sub foo(Numeric $a) { };  foo(0.5)
16:02 p6eval rakudo 708347:  ( no output )
16:03 rcfox I realize Rats are different from Nums, but shouldn't it at least try calling .Num()?
16:03 ash_ moritz_: http://github.com/moritz/try.rakudo.or​g/blob/master/frontend/cgi/try.pl#L58 is how i am running the program, using IPC::Run (from cpan) with a timer,
16:03 TimToady rakudo: sub foo($a as Num) {}; foo(0.5)
16:03 p6eval rakudo 708347:  ( no output )
16:03 pmichaud rcfox: type constraints don't coerce
16:03 rcfox Hm.
16:03 sundar joined #perl6
16:04 ash_ rakudo: say lines;
16:04 p6eval rakudo 708347: OUTPUT«Land der Berge, Land am Strome,Land der Äcker, Land der Dome,Land der Hämmer, zukunftsreich!Heimat bist du großer Söhne,Volk, begnadet für das Schöne,vielgerühmtes Österreich,vielgerühmtes Österreich!Heiß umfehdet, wild umstrittenliegst dem Erdteil du inmitten,einem starken
16:04 p6eval ..Herzen …
16:04 moritz_ ash_: it's a start :-)
16:04 TimToady rakudo: sub foo(Real $a) { say $a}; foo(0.5)
16:04 ash_ thats the same text i am using on try.rakudo.org
16:04 p6eval rakudo 708347: OUTPUT«0.5␤»
16:04 ash_ any suggestions for improvement will be greatly apperciated
16:04 gfldex :->
16:05 moritz_ we had some cdode that talked to the REPL
16:06 ash_ well, there is one other thing about how i am doing it, i am cheating a good bit in terms of the history
16:06 moritz_ I noticed :-)
16:06 ash_ i save up all the text that you write into the terminal and send the whole thing every time i make a request
16:06 ash_ making it completely stateless
16:06 ash_ the browser stores the command history not the server
16:07 TiMBuS pmichaud, i rewrote Hash!STORE in Q:PIR. "for 1..100 {my %h = ^100 };" takes 12 seconds in master, 7 seconds in my branch. seems significant.
16:07 moritz_ http://moritz.faui2k3.org/tmp/caveat.jpg once the slow upload finishes
16:07 TiMBuS not sure if its sane or safe though!
16:07 ash_ i also keep track of the stuff you get back from the server, and only display the difference each time you get stuff back
16:08 patrickas joined #perl6
16:08 moritz_ http://moritz.faui2k3.org/tmp/caveat.png actually
16:08 ash_ so, there are some obvious places this could not function to well, but ya, its a start
16:08 ash_ lol
16:08 macroron joined #perl6
16:08 ash_ good example
16:08 rokoteko hm. so no replacement parameter in substr() anymore? .. what's the perl6 way to do my $data = substr $buf, 0, $len, ''; ?
16:08 alester https://twitter.com/perlbuzz/status/20398645820
16:09 mkt joined #perl6
16:09 moritz_ rakudo: say substr 'abcdefg', 0, 4, ''
16:09 p6eval rakudo 708347: OUTPUT«No applicable candidates found to dispatch to for 'substr'. Available candidates are:␤:(Mu : Any $start, Any $length?;; *%_)␤␤  in main program body at line 22:/tmp/Rpg5OY2uzA␤»
16:09 moritz_ ouch
16:10 rokoteko moritz_: I just learnt that from your currying tutorial. it probably would have failed miserably if fourth parameter was available? ;)
16:10 alester Time and repetition will get the positive mindshare we need.
16:11 moritz_ rokoteko: I thought it worked. Weird.
16:12 rokoteko .. so, let's for a while imagine substr() had a fourth parameter. my &f := &substr.assuming('Hello, World');
16:13 rokoteko .. say f(0, 2); .. vs. &x := &f(0, 2); say &x(''); # are these different?
16:13 ash_ moritz_: do you have any thoughts on how to get try.rakudo.org to work any better? I am worried about keeping the command history on the server, or possibly keeping the repr's for each connection alive while the connection still works, that would cause huge memory issues, i was hoping i could work out an easier way of managing this and keeping it as stateless as possible
16:14 moritz_ ash_: there's no way we get around keeping the sessions, if we want it to be good
16:14 moritz_ ash_: and not worry too mouch about resources for now
16:15 phenicsl joined #perl6
16:16 rokoteko moritz_: and I agree. it's bit wierd if it doesn't exist for. I hope there is something equivalent, or even better! :)
16:16 phenicsl Hi, I found follow example on synopsis 05: """perl6 -e 'my token ab { "ab" }; "abb" ~~ /<&ab>/; say $/.perl' """. It was strange to me that token ab is used as <&ab> rather than just <ab>. Does anyone know why the extra "&" here? Thanks!
16:16 rokoteko s/for/anymore/
16:17 moritz_ rokoteko: just write a patch for it :-)
16:17 ash_ phenicsl: it has to do with lexical scope, if i am not mistaken
16:17 moritz_ phenicsl: 'my' installs the token into the lexical scope
16:17 ash_ normal regex's don
16:17 ash_ t
16:18 ash_ err
16:18 moritz_ and <&foo> looks into the lexical scope, instead of doing a method lookup, like <foo>
16:19 phenicsl OK, got it, thanks very much.
16:19 ash_ normal regex's don't know about all of the tokens that exist globally, they only know whats in the perl6grammar, <ab>  would look in the grammar the regex belongs to for the token ab
16:19 rokoteko moritz_: ahh. you have to call .assuming() each time you want to curry one parameter more?
16:19 tadzik http://pb.rbfh.de/16Y8EK4WZRQrw -- is it common?
16:20 moritz_ tadzik: I've experienced the same
16:20 moritz_ rokoteko: sorry, I'm currently to unconcentrated.. ask me again on Sunday, after YAPC and $friends_wedding :(
16:21 phenicsl ash_: so if we define a token foo inside a grammar, then we could just use <foo> to refer to that token?
16:21 tadzik yep
16:21 rokoteko star: my &f := &substr.assuming('Hello, World'); &x := &f(0); &z := &f.assuming(0); say &f(1) ~ "  " ~ &f(2) ~ "/" ~ &z(1) ~ " " ~ &z(2)
16:21 p6eval star 2010.07: OUTPUT«Could not find sub &x␤  in main program body at line 22:/tmp/pxfpLGu_CR␤»
16:21 ash_ inside a grammar, yes, for instance: grammar Foo { token ab { ab }; token bar { <ab> } }; would be fine
16:22 ash_ star: my &f := &substr.assuming('Hello, World'); my &x := &f(0); my &z := &f.assuming(0); say &f(1) ~ "  " ~ &f(2) ~ "/" ~ &z(1) ~ " " ~ &z(2)
16:22 rokoteko moritz_: no probs. thanks for all the help in your tutorials! :)
16:22 p6eval star 2010.07: OUTPUT«ello, World  llo, World/H He␤»
16:22 ash_ you were missing some my's
16:23 rokoteko ah. not used to strict in irc. thanks. so it definitely seems to work differently. puzzling.
16:27 bened joined #perl6
16:27 TiMBuS rakudo: sub z {"foo"~$_}; my &x := &z(1); &x.WHAT.say
16:27 p6eval rakudo 708347: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in 'z' at line 22:/tmp/0IS1JV5gp_␤  in main program body at line 22:/tmp/0IS1JV5gp_␤»
16:27 TiMBuS aa
16:28 TiMBuS rakudo: sub z {"foo"~$^a}; my &x := &z(1); &x.WHAT.say
16:28 jferrero joined #perl6
16:28 rokoteko star: my &s = * + * + *; my &t := &s(1, 2); my &x1 := &s(1); my &x2 := &s(2); say t(3) ~ "/" ~ x2(3)
16:28 p6eval rakudo 708347: OUTPUT«Str()␤»
16:28 p6eval star 2010.07: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤  in <anon> at line 2:/tmp/Oz75kCK1xv␤  in main program body at line 22:/tmp/Oz75kCK1xv␤»
16:29 ash_ rakudo: sub z {"foo"~$_}; my &x := &z.assuming(1); &x.WHAT.say
16:29 TiMBuS rokoteko, you arent binding &x to &f(0)
16:29 p6eval rakudo 708347: OUTPUT«Code()␤»
16:29 ash_ TiMBuS: i think you meant .assuming
16:29 TiMBuS nope :p
16:29 ash_ oh, okay
16:29 TiMBuS rokoteko tried it
16:29 ash_ i thought you were trying to curry
16:29 rokoteko star: my &s = * + * + *; my &t := &s.assuming(1, 2); my &x1 := &s.assuming(1); my &x2 := &s.assuming(2); say t(3) ~ "/" ~ x2(3)
16:29 p6eval star 2010.07: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤  in <anon> at line 2:/tmp/KIEt_qIgud␤  in main program body at line 1␤»
16:29 rokoteko TiMBuS: where's my mistake?
16:30 rokoteko ahh...
16:30 TiMBuS my &x := &f(0);
16:30 rokoteko star: my &s = * + * + *; my &t := &s.assuming(1, 2); my &x1 := &s.assuming(1); my &x2 := &x1.assuming(2); say t(3) ~ "/" ~ x2(3)
16:30 p6eval star 2010.07: OUTPUT«6/6␤»
16:30 bened Hi, I have a question about Rakudo: How can I load a module or grammar that is in the same directory? use lib ... and BEGIN are not available :)
16:30 rokoteko star: my &s = * + * + *; my &t := &s(1, 2); my &x1 := &s.assuming(1); my &x2 := &x1(2); say t(3) ~ "/" ~ x2(3)
16:30 p6eval star 2010.07: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤  in <anon> at line 2:/tmp/377lenw0O6␤  in main program body at line 22:/tmp/377lenw0O6␤»
16:30 moritz_ bened: BEGIN { @*INC.push('.') }; use localmodule;
16:31 tadzik looking at http://github.com/masak/proto​/blob/pls/lib/App/Pls.pm#L137 where does it actually build stuff? I see it buildinig the deps and then calling the build which... calls the build-helper again. Am I missing something?
16:31 * moritz_ -> gone
16:31 ash_ rakudo: say @*INC;
16:31 bened Ah, thanks :)
16:31 TimToady or set PERL6LIB, I think
16:31 p6eval rakudo 708347: OUTPUT«lib/home/p6eval/.perl6/lib/home/p6eval//p​1/lib/parrot/2.6.0-devel/languages/perl6/lib.␤»
16:31 ash_ rakudo: say ~@*INC;
16:31 p6eval rakudo 708347: OUTPUT«lib /home/p6eval/.perl6/lib /home/p6eval//p1/lib/parrot/2.​6.0-devel/languages/perl6/lib .␤»
16:31 ash_ i thought it added . to the list already...
16:31 ash_ rakudo: say ~@*INC[*-1;
16:31 p6eval rakudo 708347: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 22␤»
16:31 ash_ rakudo: say ~@*INC[*-1];
16:31 rokoteko star: my &s = * + * + *; my &t := &s(1, 2); my &x1 := &s.assuming(1); my &x2 := &x1(*); say t(3) ~ "/" ~ x2(3)
16:32 p6eval rakudo 708347: OUTPUT«.␤»
16:32 p6eval star 2010.07: OUTPUT«Not enough positional parameters passed; got 2 but expected 3␤  in <anon> at line 2:/tmp/sIXtSPG6tF␤  in main program body at line 22:/tmp/sIXtSPG6tF␤»
16:32 TimToady there it be
16:32 tadzik couldn't -1 on array just be *-1?
16:32 TimToady not and also be a mistake
16:33 tadzik But what is the reason for that, why not just use negative indexes like in Perl 5?
16:33 TiMBuS rokoteko, no i was explaining that you cant bind a sub to a sub call, which you previously tried
16:33 TimToady because sometimes @a[$index] goes negative by mistake
16:34 jaldhar joined #perl6
16:35 rokoteko TiMBuS: &sub(1, 2) *always* calls a sub? my &appl = &sub.assuming(1); is a partial application. is it not possible to do my &appl = &sub(*); ?
16:35 rokoteko ops. s/=/:=/
16:35 bened Oh, true, its in @*INC. Ok, different problem: How do I load grammars, I thought I could just use "use".
16:36 TimToady a grammar should load just like any other class
16:36 TiMBuS rokoteko, i think that is the case
16:36 rokoteko TiMBuS: ok. thank you for explaining. :)
16:37 TimToady bened: how do you know it's not loading when you use 'use'?
16:37 TiMBuS i do think that you can add multiple params to .assuming however, which you asked about before
16:38 bened I get "Unable to find module".
16:39 TimToady what extension are you using?
16:39 bened .pg
16:39 rokoteko TiMBuS: nods. I was trying to ask "do you always need to call .assuming() when you want to curry more parameter(s)" .. I understood that you can ask it to curry many parameters at once. :)
16:39 TimToady try .pm
16:40 bened That works, thanks :)
16:40 rokoteko it's just bit broad syntax, I assumed() more compact.
16:40 TimToady .pg is a rakudoism for its builtin grammar
16:40 bened Ah, ok.
16:40 TimToady so probably really NQP
16:41 bened It might be nice to separate grammers from other modules in big projects.
16:41 bened But maybe that must be done by name anyway.
16:41 rokoteko star: my &f = "* + * + *"; &f .= assuming($_) for 1..2; say f(3)
16:41 p6eval star 2010.07: OUTPUT«Method 'assuming' not found for invocant of class 'Str'␤  in main program body at line 22:/tmp/6edMKyQqQg␤»
16:41 TimToady they're just classes, so you can already separate them
16:41 TiMBuS rokoteko, i see then. but you raise a good point about := &sub(0) being a shortcut for &sub.assuming(0). it kinda makes sense...
16:42 rokoteko star: my &f = "* + * + *"; &f := &f.assuming(1); &f := &f.assuming(2); say f(3)
16:42 bened Yeah, I ment by filename.
16:42 p6eval star 2010.07: OUTPUT«Method 'assuming' not found for invocant of class 'Str'␤  in main program body at line 22:/tmp/xsD8Ue2XB6␤»
16:42 cdarroch joined #perl6
16:42 cdarroch joined #perl6
16:42 TimToady I don't think &sub(0) and &sub.assuming(0) should do the same thing
16:42 TiMBuS no its more to do with the binding
16:42 TimToady that latter just makes a 0-ary sub
16:43 rokoteko but when you are assinging it as in &f := &sub(0) .. why not then?
16:43 TimToady &sub is a function ref, and the postfix always calls it
16:43 TiMBuS it kinda breaks the rules of perl6 ^yeah that
16:44 TimToady &foo is not a special form like it is in Perl 5; it's more just like a scalar that happens to be restricted to holding a sub ref
16:44 rokoteko ah. asked that earlier if &sub(0) *always* calls the sub. then tried &f := &sub(*) :) .. maybe it works with the $sub syntax?
16:45 rokoteko star: my $x = * + * + *; my $y = $f(1); my $z = $y(2); say ~$y(3)
16:45 p6eval star 2010.07: OUTPUT«===SORRY!===␤Symbol '$f' not predeclared in <anonymous> (/tmp/DzEVQhWx1p:22)␤»
16:46 rokoteko star: my $x = * + * + *; my $y = $x(1); my $z = $y(2); say ~$y(3)
16:46 p6eval star 2010.07: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤  in <anon> at line 2:/tmp/G1gB4yZTRH␤  in main program body at line 22:/tmp/G1gB4yZTRH␤»
16:46 rokoteko no luck. :/... ok .assuming() it is then. ;)
16:46 pmichaud ...do we still have .pg files in Rakudo?
16:46 TimToady unlike in Haskell, you must be explicit about partial binding
16:46 pmichaud I thought we'd eliminated all of them.
16:47 TimToady bened: see ^^
16:48 bened pmicaud: I only used the extension because I read it in some old tutorial. So probably not.
16:49 rokoteko ok. now after I got bit carried away with the currying.. is there a suggested perl6 way of doing my $data = substr $buf, 0, $len, ''; ?
16:49 bened Oh, wait. The "old tutorial" happens to be the perl6book bundeled with Rakudo Star. ;) In the first comment of the first code section of chapter 10
16:50 TimToady s/. ** {$len}//
16:50 pmichaud bened: that's obviously a bug then --I'll fix it.  many thanks for reporting on it!
16:51 pmichaud bened:      # file lib/JSON/Tiny/Grammar.pm
16:51 pmichaud bened: that one?
16:51 bened Yeah. My pleasure by the way.
16:51 pmichaud bened: now fixed... bened++
16:51 pmichaud it'll be correct in the next edition of the book :)
16:52 dalek book: b47f718 | pmichaud++ | src/grammars.pod:
16:52 dalek book: We no longer use ".pg" for grammar extensions -- change it to ".pm".
16:52 dalek book: review: http://github.com/perl6/book/commit/b4​7f7183dc11df26f9288920e8abed3ecddfa776
16:52 rokoteko TimToady: really? there's no performance difference between using a regex instead of substr() with replacement?
16:52 bened Ok :)
16:53 TimToady rokoteko: I didn't say that :)
16:53 TimToady but I don't think rakudo implements 4-arg substr
16:53 pmichaud does the spec define/allow 4-arg substr?
16:53 ingy TimToady! o/
16:54 rokoteko I learnt today it does not. :)
16:54 xinming_ joined #perl6
16:54 * ingy is headed off to YAPC::Vancouver
16:54 BooK ingy: there is a YAPC::Vancouver ?
16:54 desertm4x joined #perl6
16:54 pmichaud yeah, S32 doesn't hint at the existence of 4-arg substr.
16:55 BooK I was contacted some time ago to setup Act for it, but I don't think there was any further contact
16:55 TimToady pmichaud: it did when substr was only defined as "just like in Perl 5" :P
16:55 BooK ingy: http://vanpw.org/ is not helpful
16:56 pmichaud TimToady: I tend to think of very little in Perl 6 as still being defined as "just like in Perl 5"  :P
16:56 TimToady rakudo: $_ = "now is the time"; substr($_,0,3) = 'then'; .say
16:56 p6eval rakudo 19931f: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/xAtWvbQFNk␤»
16:56 TiMBuS rokoteko, I had the exact same problem. heres what I used: $head = $line.substr(0, $index); $line := $line.substr($index+1);
16:56 TimToady well, I note that substr *is* specced as 'is rw'
16:57 pmichaud oh
16:57 pmichaud maybe I didn't notice that part. :)
16:57 pmichaud you're correct, it "is rw"
16:57 pmichaud okay, we can fix that now.
16:57 pmichaud just a useful application of .WHENCE :-)
16:57 pmichaud *another
16:57 ash_ pmichaud: i know you have been interested in this: http://try.rakudo.org/shell is setup, but i think i am going to have to re-do my back end... anyway, its still very primitive
16:58 rokoteko TiMBuS: hmm. interesting!
16:58 pmichaud ash_: I tried a version earlier today -- it looked like a good start.
16:58 pmichaud I've tried again various times today and for some reason the wifi here doesn't let me connect
16:58 TiMBuS i obviously didnt use := since it didnt work when i first wrote it
16:58 TimToady pmichaud: note that it must also support substr() += and suc
16:58 TimToady h
16:58 pmichaud TimToady: that should be okay
16:59 pmichaud should fall out naturally, I think.
16:59 TimToady which is the main reason for preferring that over 4-arg
16:59 pmichaud I might even try implementing it tonight after dinner.
17:01 Holy_Cow joined #perl6
17:01 mkt joined #perl6
17:02 risou joined #perl6
17:04 pmichaud mmmmm, screencast recording of NQP talk worked out well.  :)
17:04 [particle] \o/
17:04 [particle] pmichaud: did you do it the way we discussed at yapc::na?
17:05 pmichaud [particle]: close -- didn't have a webcam image of me speaking
17:05 pmichaud but it does record the slides and audio
17:05 tadzik pmichaud: is it available somewhere?
17:05 pmichaud tadzik: I'll have to transcode it into something more compact -- right now it's a raw recording
17:06 pmichaud the audio on my rakudo star talk is a little weak because I was so far away from the mike
17:06 rokoteko star: my &f := * + *; my &x = &f.assuming(3); &f := * - *; say ~x(3)
17:06 p6eval star 2010.07: OUTPUT«0␤»
17:06 rokoteko is this due lazy evaluation? can you make it eager?
17:07 [particle] yeehah, the blue angels have arrived!
17:07 pmichaud oh, actually audio for R* talk might be okay
17:07 rokoteko ie. make the first assignment of my &f := * + *; just last..
17:07 TimToady [particle]: as long as you're getting doppler shifts downward, they're going to miss you
17:07 bened rakudo: say "-" ~~ /<[-._]>/
17:07 pyrimidine joined #perl6
17:07 p6eval rakudo 19931f: OUTPUT«===SORRY!===␤Unsupported use of - as character range;in Perl 6 please use .. at line 22, near "._]>/"␤»
17:08 bened star: say "-" ~~ /<[-._]>/
17:08 p6eval star 2010.07: OUTPUT«===SORRY!===␤Obsolete use of hyphen in enumerated character class;in Perl 6 please use .. instead at line 22, near "._]>/"␤»
17:08 bened star: say "-" ~~ /<[\-._]>/
17:08 p6eval star 2010.07: OUTPUT«-␤»
17:08 TimToady std: say "-" ~~ /<[-._]>/
17:08 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
17:08 TimToady std doesn't care when - is first
17:09 TimToady std: say "-" ~~ /<[.-_]>/
17:09 p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of - as character range; in Perl 6 please use .. at /tmp/oJq4rDXJuN line 1:␤------> [32msay "-" ~~ /<[.-_[33m⏏[31m]>/[0m␤Parse failed␤FAILED 00:01 116m␤»
17:09 TimToady std: say "-" ~~ /<[._-]>/
17:09 p6eval std 31912: OUTPUT«ok 00:01 116m␤»
17:10 pmichaud I still need to work on getting rid of my "ummms"  in my talk.  It's probably less noticeable in person, but when there's only audio and no video, it's pretty pronounced.  :-|
17:11 TimToady you need to adopt some of those phrases that politicians love while they're thinking
17:11 pmichaud TimToady: I already have those as well, but they don't go over well at a YAPC :)
17:11 tadzik "I know you have to think for a while about what I just said"
17:11 TimToady I'm glad you asked that; let me say this about that; let me make one thing perfectly clear...
17:12 Trashlord joined #perl6
17:12 pmichaud I'm glad you asked; yes, we've been thinking about something like that, but it's not entirely clear that this is the exact approach we should be taking, because, you know, there might be other considerations, although you make a very strong case here, I'm entirely certain we're not quite done here yet.
17:14 pmichaud anyway, the screencasts seem to have recording reasonably well; I'll transcode them down soonish and people can watch and critique them from there :)
17:14 pmichaud *recorded
17:14 pmichaud the star talk is 721MB, the nqp talk is 657MB
17:14 * TimToady ==> get-clan-for-dinner()
17:15 pmichaud shouldn't the feed operator show up *after* you get the clan?  ;-)
17:15 ash_ pmichaud: are those talks going to be on the interwebs one day?
17:15 pmichaud I guess in terms of precedence, it does.  :)
17:15 pmichaud ash_: if I can find somewhere to host them, yes.
17:15 ash_ neat
17:15 takadonet pmichaud: what format are they in?
17:16 pmichaud yapc::eu has also been videotaping the speakers, so they may appear that way as well.
17:16 pmichaud my talks are just laptop screen + audio
17:16 pmichaud (er, my talk videos are just ...)
17:16 pmichaud takadonet: x264 primarily, with pcm audio
17:17 azert0x joined #perl6
17:17 pmichaud I did full-res captures with lossless/fast compression, knowing that I'd transcode them down a bit later.
17:19 TiMBuS pmichaud, referring to previous discussion: <TiMBuS> pmichaud, i rewrote Hash!STORE in Q:PIR. "for 1..100 {my %h = ^100 };" takes 12 seconds in master, 7 seconds in my branch. seems significant.
17:19 TiMBuS can i gist/paste the function somewhere for you? i dont know if its patch-worthy
17:20 pmichaud TiMBuS: sure.  I have to leave in about 5 mins, but I can let you know if it's on the right track.
17:22 TiMBuS http://gist.github.com/510046 well it seems to pass the standard tests, but it looks pretty scary
17:22 masak joined #perl6
17:22 masak oh hai!
17:22 masak I'm almost over my panic now.
17:23 PerlJam greetings
17:23 PerlJam masak: what panic?
17:23 TiMBuS i only make the value a p6scalar. and only if its not from another Enum/EnumMap (since I assume enum/enummaps already have scalar $!values)
17:23 [particle] why a parrot Hash?
17:24 pmichaud TiMBuS: but in a Hash they need to be separate scalars
17:24 masak PerlJam: a consistent one that stretched over the Yapsi release, slidesmaking, and GSoC work.
17:24 pmichaud otherwise you're really binding them instead of creating new ones
17:24 TiMBuS but .list makes a copy
17:24 pmichaud it isn't require to (more)
17:25 TiMBuS or.. hrm. enums still arent copied
17:25 pmichaud and I don't see where .list is being used here.
17:25 TiMBuS if its an EnumMap: item = item.'list'()
17:26 pmichaud that's not required to make copies or scalars, iiuc
17:26 itz kudos to all perl6 speakers at YAPC!  inspiring stuff
17:26 pmichaud at any rate, it might end up with values that aren't Perl6Scalar or 'is rw', which is of course important.
17:27 pmichaud I'd recommend doing a new Perl6Scalar for every bind, and also be sure to set the 'rw' and 'scalar' properties on each.
17:27 TiMBuS so is the solution to just put everything in a new Perl6Scalar or do I need to drag &infix<=> into all of this (you beat me to it)
17:27 pmichaud other than those minor nits, I think this version is very usable (and yes, should be significantly faster for hash creation)
17:28 pmichaud okay, gotta run.  bbl
17:28 TiMBuS ok, thanks :)
17:28 masak rakudo: sub postfix:<!>($n) { [*] 1..$n }; say (1, 2, 3)>>!
17:28 p6eval rakudo 19931f: OUTPUT«===SORRY!===␤Could not find sub &postfix:<!>␤»
17:28 * masak submits rakudobug
17:29 masak I think I see why that would occur.
17:29 [Coke] OH NOES, alester called it the /official/ cheat sheet. Doom to follow.
17:30 masak [Coke]: I realized today, that not only is Yapsi unofficially official, it's also officially unofficially official.
17:30 masak s/\,//
17:32 alester It's not?
17:32 alester It's not official?
17:32 alester It's in a repo.  That sounds official!
17:32 masak rakudo: sub infix:<+++>($a, $b) { ($a + $b) div 2 }; say 10 >>+++<< 14
17:32 alester Just like if something is printed in a book, it's accurate!
17:32 p6eval rakudo 19931f: OUTPUT«===SORRY!===␤Could not find sub &infix:<+++>␤»
17:32 masak alester: officially, it's in a repo.
17:32 cotto_work http://github.com/blog/692-perl-6-on-github
17:33 TiMBuS rakudo: our sub infix:<+++>($a, $b) { ($a + $b) div 2 }; say 10 >>+++<< 14
17:33 p6eval rakudo 19931f: OUTPUT«12␤»
17:33 masak oh :/
17:33 masak should that be necessary?
17:33 masak I mean, I'm only using the +++ in the current scope.
17:33 alester OH NOES EvanCarroll called it the official status
17:33 TiMBuS nope. the bug has something to do with the dispatcher not looking in the scope
17:34 * masak adds TiMBuS' discovery to the ticket.
17:34 bened left #perl6
17:35 jaldhar joined #perl6
17:38 pmurias joined #perl6
17:38 pmurias ruoso: hi
17:38 pmurias ruoso: did use v6-alpha support {use v6-alpha;say "perl 6 code here"};print "perl 5 code here\n"?
17:43 Axius joined #perl6
17:44 masak perlito should be better known.
17:45 avuserow oh, wow, MiniPerl6 is still kicking around? Awesome.
17:45 jfried joined #perl6
17:46 tadzik cotto_work: did You write it?
17:47 cotto_work tadzik: no.  I just thought it'd be nice to see some Rakudo love on github's official blog
17:47 Eevee joined #perl6
17:48 rwt joined #perl6
17:49 masak should .^isa($type) and .^does($type) accept Str values? the spec doesn't say.
17:51 tadzik hrm, 'make' fails when I run it by "run 'make'", or even: run "make -f {cwd}/Makefile", while the Makefile is perfectly fine. Funny thing, if I open a REPL, chdir to that dir and run "make" it works fine. What can be the problem?
17:54 Rati joined #perl6
17:58 Rati Hi there
17:58 Rati Can any one help me get started ..I am totally new here.
17:59 PerlJam Rati: sure ... Have you downloaded Rakudo Star?
17:59 masak Rati: welcome!
18:00 PerlJam Rati: http://rakudo.org/how-to-get-rakudo
18:00 PerlJam (just in case you haven't :)
18:00 Rati Thanks PerlJam & masak
18:00 Rati I haven't :)
18:00 tylercurtis joined #perl6
18:00 masak Rati: if you're eager to use Perl 6, you can do it here on the channel :)
18:01 masak rakudo: say "OH HAI Rati!"
18:01 p6eval rakudo 19931f: OUTPUT«OH HAI Rati!␤»
18:01 masak Rati: and there's also http://try.rakudo.org/shell
18:01 Trashlord joined #perl6
18:02 PerlJam Rati: and if you have any questions, feel free to ask.
18:02 Rati That's cool :)
18:03 tadzik hello Rati :)
18:03 Rati Yes I will, Thanks.
18:03 Rati hi tadzik
18:05 * masak .oO( and if we're being helpful to the point of annoying you, let us know :P )
18:05 tadzik :D
18:05 tadzik that's possible, the hapiness around might be overwhelming sometimes :)
18:06 Rati I currently have a windows box, is it any easier on a UNIX ?
18:06 PerlJam hugme: hug Rati and tadzik and masak
18:06 * hugme hugs Rati
18:06 Rati :)) That's funny
18:06 PerlJam hugme: you need to get a tad smarter
18:06 tadzik Rati: it's equally easy I think
18:06 Rati :D
18:08 masak PerlJam: you need to use non-breaking spaces for that to work :)
18:08 masak nom &
18:09 tadzik horray!
18:09 tadzik I present you protominus, a module installed that "just works", except when it doesn't: http://gist.github.com/510123
18:09 tadzik more fun and a GH repo on the way
18:14 mkt joined #perl6
18:16 tadzik star: say "foo >> bar"
18:16 p6eval star 2010.07: OUTPUT«foo >> bar␤»
18:17 * rokoteko hugs hugme
18:17 tadzik oh you
18:19 Axius joined #perl6
18:20 Su-Shee shouldn't a simple version of proto better be called neutro? ;)
18:21 tadzik well, it might be :)
18:21 tadzik Su-Shee++ # nice idea
18:21 [Coke] I find that idea... electric.
18:22 PerlJam [Coke]: don't be so negative.
18:25 perimosocordiae joined #perl6
18:26 Italian_Plumber joined #perl6
18:29 Su-Shee well the idea is free of charge.
18:30 tadzik so is the effect: http://github.com/tadzik/neutro
18:30 tadzik as always, patches/ideas/criticism welcome
18:30 Su-Shee you put a new spin on installing perl6 modules!
18:30 tadzik you mean a working installer? :)
18:31 rokoteko can I somehow do in-place .assuming() ? ie. some of the things ive tried: .. my &f = * + * + *; &f = &f.assuming($_) for 1..2;  .. my &f = * + * + *; &f := &f.assuming(1); &f := &f.assuming(2);  my &f = * + * + *; &f .= &f.assuming(1); &f .= &f.assuming(2); .. starting to get bit clueless.
18:32 tylercurtis rakudo: my &f = * + * + *; &f = &f.assuming($_) for 1..2; say f(3);
18:32 p6eval rakudo 19931f: OUTPUT«maximum recursion depth exceeded␤  in main program body at line 1␤»
18:33 perimosocordiae tadzik: you use two names: is it neutro or protominus?
18:33 tylercurtis rakudo: my &f = * + * + *; say f(1, 2, 3);
18:33 tadzik perimosocordiae: oh, the codename was protominus. Thanks for pointing this out
18:33 p6eval rakudo 19931f: OUTPUT«6␤»
18:33 tadzik perimosocordiae++
18:33 rokoteko tylercurtis: well, that's different. :) but yes.
18:34 tylercurtis rakudo: my &f = * + * + *; &f = &f.assuming(1); say f(2, 3);
18:34 p6eval rakudo 19931f: OUTPUT«maximum recursion depth exceeded␤  in main program body at line 1␤»
18:34 tylercurtis rakudo: my &f = * + * + *; my &g = &f.assuming(1); say g(2, 3);
18:34 p6eval rakudo 19931f: OUTPUT«6␤»
18:34 tylercurtis rakudo: my &f = * + * + *; my &g = &f.assuming(1); &f = &g; say g(2, 3);
18:34 p6eval rakudo 19931f: OUTPUT«maximum recursion depth exceeded␤  in main program body at line 1␤»
18:35 tylercurtis Interesting.
18:35 rokoteko rakudo: my &f := * + *; my &g := &f.assuming(3); &f := * - *; say g(3)
18:35 p6eval rakudo 19931f: OUTPUT«0␤»
18:35 rokoteko .. this makes me wonder if it's even doable.
18:36 rokoteko rakudo: my &f := * + *; my &g := &f.eager.assuming(3); &f := * - *; say g(3)
18:37 p6eval rakudo 19931f: OUTPUT«Method 'eager' not found for invocant of class 'WhateverCode'␤  in main program body at line 22:/tmp/oq1CdKBqIw␤»
18:37 PerlJam rokoteko: why do you want this?
18:37 rokoteko PerlJam: I dunno. why do I want perl6?
18:37 mkt joined #perl6
18:37 rokoteko same reason. :)
18:38 rokoteko Im mainly curious if it's "supposed to" work or not.
18:38 PerlJam makes sense to me  :)
18:38 tylercurtis rakudo: grammar Foo { token TOP { 'b' } }; say Foo.parse('abc').Bool; # this is right
18:38 p6eval rakudo 19931f: OUTPUT«0␤»
18:38 tylercurtis rakudo: grammar Foo { token TOP { 'b' } }; say Foo.parse('bc').Bool; # I don't think this is.
18:38 p6eval rakudo 19931f: OUTPUT«1␤»
18:38 tylercurtis rakudo: grammar Foo { token TOP { 'b' } }; say Foo.parse('ab').Bool; # Also right.
18:38 p6eval rakudo 19931f: OUTPUT«0␤»
18:39 tylercurtis Grammar.parse seems to anchor to the beginning of the string but not to the end.
18:39 Rati PerlJam: I will just take both of them to the appointment on 12th
18:39 Rati & 16th u can take off
18:40 Rati Oh I am sorry !! Wrong windo
18:40 PerlJam heh
18:41 Rati PerlJam: I have rakudo/parrot installed
18:41 tommyd joined #perl6
18:44 PerlJam Rati: excellent! Now you're ready to play
18:44 Rati yup
18:45 PerlJam Rati: See perl6.org for some resources.
18:47 imarcusthis joined #perl6
18:57 kiffin joined #perl6
19:01 jfried joined #perl6
19:06 cono joined #perl6
19:06 [particle] joined #perl6
19:08 tadzik http://pb.rbfh.de/33F4qYmX1WjSy a bug, isn't it?
19:08 tadzik (maybe even a bug I can fix)
19:09 beggars joined #perl6
19:10 jaldhar joined #perl6
19:15 beggars rakudo: say 'x' * 3;
19:15 p6eval rakudo 19931f: OUTPUT«0␤»
19:20 [particle] something's not right in this channel...
19:21 Axius_ joined #perl6
19:21 [particle] left #perl6
19:21 kiffin > say 'x' * 3;
19:21 kiffin 0
19:21 kiffin >
19:22 kiffin that doesn't seem right
19:22 kiffin would expect 'xxx'
19:22 tadzik star: say "x" * 3
19:22 p6eval star 2010.07: OUTPUT«0␤»
19:23 kiffin how do i get perl6 to backtrack history with up-key?
19:23 kiffin instead of ^[[A
19:23 tadzik do you have readline installed?
19:23 rokoteko star: say 'x' xx 3
19:23 p6eval star 2010.07: OUTPUT«xxx␤»
19:23 kiffin how can i tell?
19:23 tadzik what OS do You use?
19:24 kiffin linux/ubuntu 10.04
19:24 kiffin same probs with cpan
19:25 tadzik you probably nead something like readline5-dev
19:25 tadzik libreadline5-dev
19:25 tadzik iirc
19:25 kiffin cpan Term::ReadLine ?
19:25 tadzik not from CPAN
19:25 kiffin sudo get-apt install?
19:26 kiffin and then it just works
19:26 tadzik should be
19:26 kiffin is there an equivalent Devel::REPL for perl6?
19:26 beggars star: say for 1..2 { say "$_ x *"; };
19:26 p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "say for 1."␤»
19:26 tadzik rebuilding parrot will probably be required
19:26 tadzik kiffin: yep, the REPL :)
19:27 beggars star: for 1..2 { say "$_ x *"; };
19:27 p6eval star 2010.07: OUTPUT«1 x *␤2 x *␤»
19:27 beggars star: for 1..2 { say " { $_ x '*' } ; }
19:28 tylercurtis rakudo: say ('x' xx 3).WHAT
19:28 tylercurtis rakudo: say ('x' x 3).WHAT
19:28 p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
19:28 p6eval rakudo 19931f: OUTPUT«List()␤»
19:28 p6eval rakudo 19931f: OUTPUT«Str()␤»
19:28 tylercurtis rokoteko: ^^ I think you mean 'x' x 3.
19:28 rokoteko tylercurtis: 22:22 < kiffin> would expect 'xxx'
19:28 rokoteko tylercurtis: not really.
19:29 kiffin installed readline5-dev, now what?
19:29 tylercurtis rokoteko: 'x' xx 3 is 'x', 'x', 'x'. 'x' x 3 is 'xxx'
19:29 tadzik kiffin: see if it works. If not, rebuild Parrot. If still not, rebuild Rakudo too
19:30 rokoteko rakudo: say ('x' xx 3).perl
19:30 p6eval rakudo 19931f: OUTPUT«("x", "x", "x")␤»
19:31 kiffin cpan?
19:31 tadzik what cpan?
19:31 kiffin i have to rebuild everything?
19:31 rokoteko tylercurtis: ah brilliant. :) thank you. perl6 isnt as much different from perl5. the usage of bots on the channel surprise me more. ;)
19:31 tadzik no, just Parrot and Rakudo :)
19:31 kiffin rebuild cpan also?
19:31 tadzik (I think)
19:31 tadzik no, cpan has nothing to do here
19:32 kiffin cpan> Terminal does not support GetHistory.
19:32 perimosocordiae tadzik: I have an idea for neutro... use github's search API to let you specify repo names instead of full git urls
19:32 perimosocordiae http://develop.github.com/p/repo.html
19:32 tylercurtis perimosocordiae: but github search(at least from their website) is kinda lackluster sometimes.
19:33 perimosocordiae tylercurtis: yeah, it wouldn't be perfect
19:33 tadzik perimosocordiae: I thought about using some online module DB (like proto.perl6.org, but they use JSON)
19:33 tadzik so I'll probably make my own plaitext db, like miyagawa did with cpanminus :)
19:34 perimosocordiae haha, nice
19:34 tadzik What disturbs me is the ufo case. I tried copypasting the ufo source code into neutro, renaming MAIN to makemakefile, but it didn't seem to work. I mean the generated makefile was ok, but run(')
19:34 tadzik …but run('make') was failing
19:35 tadzik yet when I entered the tmp dir and tried 'make', it worked
19:35 kiffin apt-get install libterm-readline-gnu-perl
19:35 kiffin now it works
19:35 tadzik oh
19:35 rokoteko where are the ops like := and .= documented?
19:36 kiffin perl6 not, will rebuild?
19:36 tadzik so it works or not?
19:36 tylercurtis rokoteko: .= is just the assignment(=) meta-op with the "." op(method call).
19:37 tylercurtis rokoteko: S03 is the part of the spec that deals with ops.
19:38 rokoteko tylercurtis++: ok. thanks! need to read them through, so I don't have to be bothering you people with every single thing I dont get. :)
19:38 perimosocordiae tadzik: the copypasta'd ufo produced the same Makefile, but it wouldn't make?
19:38 kiffin doesn't work
19:39 tadzik perimosocordiae: yep
19:39 tadzik perimosocordiae: strange, isn't it?
19:39 perimosocordiae very
19:39 tylercurtis kiffin: you installed libreadline5-dev? and reconfigured and rebuilt Parrot?
19:39 tadzik perimosocordiae: moreover, it did 'make'. It even did 'run("make")'
19:39 Holy_Cow joined #perl6
19:39 tadzik but not from the script that did 'makemakefile'
19:39 tylercurtis tadzik: are you sure you're in the right directory when you do run('make')?
19:40 tadzik tylercurtis: yep
19:40 kiffin i'll rebuild parrot now, thx
19:40 kiffin left #perl6
19:40 tadzik tylercurtis: I can make a branch with inline ufo so you can try yourself
19:41 tadzik tylercurtis: I thought I checked every single thing, but I may be wrong
19:41 tylercurtis tadzik: I'm working on my GSoC right now. :)
19:41 tadzik oh, ok :)
19:41 beggars star: say "^_^" x 3;
19:41 p6eval star 2010.07: OUTPUT«^_^^_^^_^␤»
19:41 beggars star: say 3 x "^_^" ;
19:41 p6eval star 2010.07: OUTPUT«␤»
19:42 beggars what's the difference, why the latter didn't work?
19:42 tadzik it tries to write "3" ^_^ times I guess
19:42 tadzik star: say 3 x "5"
19:42 p6eval star 2010.07: OUTPUT«33333␤»
19:42 tadzik yep
19:43 perimosocordiae tadzik: if you do make that branch, let me know. I'll take a look after work
19:43 tylercurtis beggars: $some-string infix:<x> $n is "$some-string repeated $n times".
19:43 tadzik perimosocordiae: a'right
19:46 ashleydev joined #perl6
19:50 tadzik perimosocordiae: http://github.com/tadzik/neutro/tree/inline-ufo maybe it will work for you, or something
19:50 tadzik there is a check if Makefile is really a present file
19:52 perimosocordiae tadzik: so it dies at run 'make'; ?
19:53 tadzik perimosocordiae: yep
19:53 tadzik perimosocordiae: see for yourself
19:53 tadzik when you enter the tmpdir after that and run 'make', it works
19:53 tadzik even when you do perl6 -e 'run "make"', it works
19:53 tadzik now what if…
19:55 tadzik no, when I put run 'perl6 -e "run \'make\'"' it doesn't work either
19:55 sorear good * #perl6
19:55 tadzik sorear: o/
19:58 ash_ can you access the repr from within normal perl6?
19:59 [Coke] where is the try source?
19:59 tadzik ash_: the repr?
20:00 ash_ err, i meant repl
20:00 ash_ the eval loop you get into if you start perl6 without a file
20:00 tadzik yep
20:00 tadzik everything works but this damn run 'make'. And from this single damn script
20:01 [Coke] hugme: try?
20:01 [Coke] hugme: list
20:02 tylercurtis hugme: list projects
20:02 hugme tylercurtis: I know about Math-Model, Math-RungeKutta, MiniDBI, book, gge, hugme, ilbot, java2perl6, json, modules.perl6.org, november, nqp-rx, nqpbook, perl6-examples, perl6-wtop, process-cmd-args, proto, pugs, star, svg-matchdumper, svg-plot, tardis, temporal-flux-perl6syn, try.rakudo.org, tufte, ufo, web, yapsi
20:02 tylercurtis hugme: show try.rakudo.org
20:02 hugme tylercurtis: the following people have power over 'try.rakudo.org': T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣oritz_, p⁣michaud. URL: http://github.com/moritz/try.rakudo.org/
20:02 tylercurtis [Coke]: ^^
20:03 tadzik oh, this try
20:03 _macdaddy joined #perl6
20:03 [Coke] IWBNI hugme responded to private requests for help. =-)
20:04 perimosocordiae tadzik: what git url are you testing with?
20:04 tadzik perimosocordiae: git://github.com/tadzik/perl6-Acme-Meow.git
20:04 tadzik does it work for some other?
20:05 [Coke] phenny: tell  moritz_ I wish to make try/shell have a valid doctype and will trade this for a commit bit.
20:05 phenny [Coke]: I'll pass that on when moritz_ is around.
20:05 perimosocordiae tadzik: I was just having a hard time finding something that needed a makefile generated, lol
20:06 tadzik :)
20:06 tadzik oh true, some things don't
20:07 tadzik but ufo can install everything I think
20:07 perimosocordiae it gave me a "no /lib found, nothing to do" and exited
20:07 ash_ [Coke]: try/shell?
20:07 tadzik perimosocordiae: oh
20:07 tadzik perimosocordiae: what when you enter that dir and 'make'?
20:08 perimosocordiae tadzik: of the no /lib one, or the url you gave me?
20:09 tadzik perimosocordiae: the .protominus.tmpdir #`[this name again -_-]. Just cd there, then cd perl6-Acme-Meow and make
20:09 perimosocordiae yeah, that works fine
20:09 tadzik strange, no?
20:10 tadzik But funny that you have the different effect
20:10 perimosocordiae I'm getting "make: *** No targets.  Stop." from the script
20:10 tadzik oh
20:10 tadzik so where did you got "no /lib found, nothing to do"?
20:10 perimosocordiae neutro http://github.com/tadzik/neutro.git :-)
20:10 tadzik oh, right :)
20:11 ash_ [Coke]: do you mean the try.rakudo.org?
20:11 tadzik I think the goal is to find the cross-platform solution after all anyway
20:12 perimosocordiae yeah, but this is just too weird
20:12 tadzik like a bug, but where damnit?
20:12 perimosocordiae I tried: $res = run 'make -f Makefile'; but that didn't work either
20:13 tadzik I even tried run "make -f {cwd}/Makefile"
20:14 Holy_Cow joined #perl6
20:15 perimosocordiae aha! I tried  run "make all"
20:15 tadzik and?
20:15 perimosocordiae and it gave: make: *** No rule to make target `all'.  Stop.
20:15 tadzik I did too
20:15 tadzik yeah, so like a broken makefile, isn't it?
20:15 tadzik I tried run 'strace makefile', and it looked like read() gives make an empty file
20:17 tadzik I guess I'll end up generating a tasklist in Perl 6, like ufo does, and executing them, like make does
20:17 tadzik cleaner and cross-platform
20:18 perimosocordiae sucess
20:18 perimosocordiae success*
20:18 tadzik how?
20:18 perimosocordiae $makefile.close();   :-D
20:18 tadzik oh come on
20:18 tadzik really?
20:19 perimosocordiae happens to the best of us
20:19 tadzik well, ufo is standalone, so it doesn't bother closing
20:19 tadzik perimosocordiae++
20:19 perimosocordiae it'd be nice if the handle got closed when it went out of scope
20:20 tadzik yep
20:21 tylercurtis LEAVE { $makefile.close; } # if this we implemented. :)
20:21 tylercurtis s/we/were/
20:21 tadzik perimosocordiae: there did You put this?
20:21 tadzik 'Makefile'.IO.close doesnt work for m
20:22 perimosocordiae the last line of makemakefile
20:23 perimosocordiae 134
20:23 tadzik an ufo patch
20:23 tadzik a'right, works
20:24 tadzik fixed-faxed
20:24 [Coke] ash_: yes. specifically the /shell page, which is the interesting one.
20:24 perimosocordiae tylercurtis: woo perl6 :-)
20:24 ash_ ya, i wrote that, so... you don't like that i used an html5 doctype?
20:25 pmichaud good evening, #perl6
20:25 [Coke] ash_: there is no doctype.
20:25 tadzik godd evening pmichaud
20:25 [Coke] not that I can see.
20:25 ash_ <!DOCTYPE html> shows up for me...
20:26 [Coke] ash_: ah, then yes, apparently my tools have a problem with html5 doctypes.
20:26 [Coke] nevermind.
20:27 ash_ i can switch to an html4 doctype, i don't mind
20:27 smash joined #perl6
20:27 ash_ i just like using them when i have the option
20:27 [Coke] one wonders how one is supposed to version doctypes going forward.
20:27 [Coke] seems crazy to leave the version # out, but that's a discussion for another channel.
20:27 ash_ ya, i know the feeling
20:27 [Coke] phenny: tell moritz nevermind.
20:27 phenny [Coke]: I'll pass that on when moritz is around.
20:28 ash_ but hey, i dont' set that standard
20:28 javs joined #perl6
20:28 rcfox [Coke]: Who would ever need anything more than HTML 5?
20:28 tadzik we use incomplete language, we can stand incomplete standard, can't we? :)
20:29 ash_ [Coke]: http://github.com/moritz/try.rakudo.or​g/blob/master/frontend/cgi/try.pl#L88 is the template, if your curious, also any suggestions/recommendations or comments in general are helpful, its still a working in progress
20:30 ash_ pmichaud: is it possible to access the code the repl uses from within perl6?
20:31 tylercurtis rcfox: who would ever need anything more than machine language? :)
20:35 [Coke] ash_: if it's in HTML 5, I'll be completely useless. nevermind.
20:35 ash_ html5 is 95% html4, so i don't think thats really true
20:35 [Coke] (and I have many other things on my plate, so don't downgrade it on my account.)
20:36 ash_ if i switch the doctype out for an html4 one, the validator only complains in 2 places where i am using html5 stuff (<meta /> tags that aren't in html4)
20:36 ash_ so, really, i am not using much that is html5 specific right now, and those 2 places could easily be changed
20:37 pmichaud ash_: Perl6::Compiler.interactive()
20:37 pmichaud (I think)
20:37 ash_ ooo, sweet, i'll try it out
20:37 pmichaud yes, that seems to work.
20:39 ash_ i am having trouble setting up both an input and chunk of text for the repl in try.rakudo.org, this should help
20:39 orafu joined #perl6
20:40 [Coke] ash - I use the mozilla HTML validator - fwiw, it's throwing a ton of errors on the shell page. I have no idea if this is because it doesn't understand html 5, or if there are actual validation issues, or...
20:40 [Coke] validator *plugin
20:40 pmichaud ash_: I might be able to refactor the .interactive() mode a bit to make it easier to do a repl via web script
20:40 ash_ [Coke]: is it firebug?
20:40 pmichaud i.e., factor out the part that executes a command and retains the lexical information
20:41 [Coke] ash_: no, "html validator".
20:41 cousteau joined #perl6
20:41 cousteau left #perl6
20:42 [Coke] http://users.skynet.be/mgueury/mozilla/
20:42 ash_ [Coke]: i'll check into it, thanks
20:43 ash_ validator.w3.org says its alright so far, it just says using html5 is considered experimental
20:43 ash_ http://github.com/blog/692-perl-6-on-github wow
20:44 ash_ i am sure i am not the first to see it, but thats cool
20:44 tadzik it's nice they care :)
20:44 tadzik Rubyists > Pythonists
20:44 Guest94224 joined #perl6
20:46 [Coke] ash_: I know moritz_ has issues with using google analytics, btw.
20:47 tadzik oh, pmichaud
20:47 ash_ i can remove it, i put that up when it was on my server as a test page and its just a remanent from then, its not doing anything important
20:47 [Coke] and I think masak complained earlier about "guys", and could we change that to "people". (I'd vote "folks" myself, if we had to change it.)
20:48 ash_ ya, that was put there as filler content so i can figure out styles, i need to update all of that
20:48 tadzik pmichaud: http://pb.rbfh.de/9aOUJokIpzP4 is this a bug?
20:48 ash_ i never know what to write, so i either put the first thing that comes to mind, or random latin
20:48 mkt joined #perl6
20:50 ash_ [Coke]: ya, that validator doesn't seem to like any html5 tags, as far as i can tell
20:50 ash_ http://validator.w3.org/check?uri=http://tr​y.rakudo.org/shell&amp;charset=(detect+auto​matically)&amp;doctype=Inline&amp;group=0 says its alright though, but i'll probably switch to an html5 tag, i know very few people are using html5 currently
20:51 tommyd left #perl6
20:51 pmichaud tadzik: looks like it could be a bug, yes.  I'd have to check the spec.
20:56 jaldhar joined #perl6
20:57 tadzik pmichaud: well, something definitely isn't working
20:58 ash_ [Coke]: it should be fine now, i just switch to an html 4 strict doctype
21:01 masak joined #perl6
21:01 masak ahoy!
21:01 pmichaud ahoy, masak!
21:01 pmichaud How goes the panicism?
21:01 masak I feel oddly serene at the moment.
21:02 masak I think it's because my stomach is full of meat and my head is full of sleepy.
21:02 ash_ pmichaud: is the Perl6::Compiler.interactive() in pir or perl6 or nqp?
21:03 ash_ i am just trying to figure out how it works
21:03 masak sometimes I have the impression that chromatic is trying to troll *for* Perl 6, to counteract those who troll against it: http://use.perl.org/comments​.pl?sid=45016&amp;cid=72244
21:04 masak and shouldn't it be '.interact()' ? :)
21:05 pmichaud ash_: it's in nqp-rx, in HLL::Copmiler
21:05 pmichaud *HLL::Compiler
21:05 ash_ k
21:05 ash_ i'll look in there
21:06 pmichaud http://github.com/perl6/nqp-rx/bl​ob/master/src/HLL/Compiler.pm#L90
21:07 ash_ does it have to use stdin?
21:07 ash_ or could i pass a file handler?
21:08 ash_ rakudo: class Foo::Bar {}; say Foo::Bar.new.perl; # Oh, btw is that ; correct?
21:08 p6eval rakudo 19931f: OUTPUT«Foo;Bar.new()␤»
21:08 masak no :/
21:08 tadzik rakudo: class Foo::Bar {}; say Foo;Bar.new.perl;
21:08 * masak submits rakudobug
21:09 p6eval rakudo 19931f: OUTPUT«Could not find sub &Foo␤  in main program body at line 22:/tmp/lbpALcO1Zw␤»
21:09 tadzik :)
21:09 ash_ rakudo: my $a = class { has $a; }; say $a.new(a => 1).perl; # that looks funny too...
21:09 p6eval rakudo 19931f: OUTPUT«.new(a => 1)␤»
21:10 ash_ but i have no idea what is "right", just looks funny...
21:10 * masak submits rakudobug
21:10 tadzik :)
21:10 masak ash_++
21:11 ash_ i know since its an anonymous class it gets difficult, but just thought i'd show you guys
21:11 masak we like difficult. :)
21:11 pmichaud rakudo:  my $a = class { has $a; };  say $a.perl;
21:11 masak right, jnthn? right, pmichaud?
21:11 p6eval rakudo 19931f: OUTPUT«␤»
21:11 masak guys? :)
21:11 pmichaud I like easy two.  I could go both ways on that.
21:11 pmichaud *too
21:12 ash_ rakudo: say {; }; # it gets a nice name (well, nice as it can get)
21:12 p6eval rakudo 19931f: OUTPUT«_block113␤»
21:12 masak pmichaud: :)
21:15 masak it's great that http://try.rakudo.org/shell works, and is retweeted.
21:16 masak if you ask me, it kinda sucks that http://try.rakudo.org/ shows an 'under construction' notice.
21:16 ash_ i did that on purpose
21:16 masak oh?
21:16 ash_ since there are so many problems with the shell still
21:16 masak ash_: what are those problems?
21:16 ash_ i can fix that, but i didn't think the shell was ready to be 'live'
21:16 masak it's live now
21:16 masak whether you like it or not.
21:17 ash_ well, easily available
21:17 masak and you can't kill the old URL now :)
21:17 tadzik help and chapters e.g.
21:17 masak but I'd make the shorter URL available too if I were you.
21:17 masak (which I'm not, last I checked)
21:17 ash_ well, when it goes live it will just be /
21:18 pmichaud where is .IO specced?
21:18 pmichaud as in  'file'.IO ?
21:18 cognominal joined #perl6
21:19 pmichaud tadzik: yes, what you posted is definitely a bug of some sort.  I'm not sure what the spec is supposed to be here.
21:19 masak ash_: it *is* live. people are retweeting it already.
21:19 pmichaud so it's either a specbug or a rakudobug or both.
21:19 masak ash_: that's why I'm suggesting enabling the short URL.
21:20 masak because it looks strange to say 'under construction' when it's live.
21:20 pmichaud you could mark it as "experimental"
21:20 thebird joined #perl6
21:20 masak or 'beta'
21:20 pmichaud something that indicates "not quite ready yet"
21:20 pragma_ joined #perl6
21:20 masak 'Usable and useful' :P
21:20 pmichaud well, I'm not sure that label applies here.
21:21 leprevost joined #perl6
21:21 ash_ alright, i switched them, /shell redirects to  /
21:21 ash_ i'll add a "This is beta" something on the page too
21:21 pmichaud I think I would've liked to have seen the shell mature just a bit more before showing up on the rakudo.org/ domain
21:22 pmichaud but I guess it's too late now.
21:22 ash_ ya, i would of liked to get more work finished before it got twittered everywhere :-\
21:23 masak ash_: release early/often.
21:23 pmichaud it's not so bad that it exists, or that it's known, but by showing up under the rakudo.org/ domain it makes it look "blessed"
21:23 ash_ it doesn't handle a lot of situations gracefully, like errors
21:23 masak neither does the REPL...
21:23 masak (and we released that)
21:23 pmichaud yes, but the REPL handles quite a bit more than the shell does
21:24 pmichaud (at least the shell as it exists now)
21:24 masak oh, ok; haven't used the shell much.
21:24 ash_ oh well, i'll try to get these changes to be shell done asap
21:25 pmichaud right now, in the shell, if I do  "my $a = 5";  and then later follow that with another "my $a = 5", it gives an error.
21:25 pmichaud the repl doesn't do that (on purpose)
21:25 masak \o/
21:25 masak pmichaud: ever-nesting scopes?
21:25 pmichaud masak: yes.
21:25 masak cool.
21:25 pmichaud well, ever-nesting in concept
21:26 masak ssh, don't ruin the mental image! :P
21:26 pmichaud in actuality it doesn't completely nest.  a snapshot is taken of the lexical environment at the end of a repl command, and then that snapshot is used as the outer pad for the next command
21:26 ash_ see, the shell is saving up all of your commands and sending them each execution, then writing that to a temp file, executing it, and getting the resutls from stdout
21:26 ash_ do, say rand;
21:26 ash_ it messes everything up
21:26 pmichaud or, if I do
21:26 pmichaud my $a = rand;
21:26 masak pmichaud: how is that not 'completely nest'-ing?
21:26 pmichaud say $a;
21:26 pmichaud say $a;
21:27 hercynium joined #perl6
21:27 pmichaud then I get different results.
21:27 ash_ ya, i am trying to fix that right now
21:27 masak pmichaud: o.O
21:27 masak pmichaud: I don't see why.
21:27 pmichaud masak: in the shell
21:27 ash_ the shell is dumb about sessions, thats why :-(
21:27 pmichaud masak: not in the repl
21:27 masak oh phew
21:27 pmichaud that's one of the reasons I'm not enamored of the shell atm.
21:27 ash_ its re-evaling the $a, each time
21:27 pmichaud the repl works, the shell doesn't quite work
21:27 ash_ err, the rand
21:27 masak the shell re-runs everything?
21:27 pmichaud yes
21:27 masak :(
21:27 pmichaud from the top
21:27 masak :( :( :(
21:27 ash_ ya, it was to keep things small, and stateless
21:28 masak that's the way *not* to do it. :(
21:28 ash_ but thats not going to work now, so ya
21:28 pmichaud who tweeted the original message about the shell?
21:28 pmichaud (not assigning blame, just curious about source)
21:28 masak if you do it that way, what's actually the non-trivial part of doing it?
21:28 masak pmichaud: might've been Su-Shee, don't remember.
21:28 pmichaud okay.
21:29 masak Twitter is down right now, so can't check.
21:29 ash_ sri, i was in the mojo channel asking for help with the web backend stuff and i told him it was in mojo and he thought that was cool
21:29 masak oh, it was probably sri then.
21:29 pmichaud perhaps we should put a message on that page that says "sorry, try.rakudo.org isn't ready for public testing yet"
21:29 tadzik and invitations! :P
21:30 pmichaud I think it's either that or we put a lot of disclaimers that say that the web-based shell has lots of issues that aren't in the downloaded versions of rakudo
21:30 hacktor joined #perl6
21:30 ash_ i am fine with either solution
21:30 perimosocordiae left #perl6
21:30 tylercurtis +1 to enormous disclaimer.
21:30 ash_ i feel bad about it now, i was just trying to get the thing working correctly :-\
21:30 masak +1 huge disclaimer
21:31 masak people obviously want to play with it.
21:31 masak since it works partially, let them.
21:31 masak and it'll be a better motivation for doing it Right(TM) sooner. :)
21:31 pmichaud sometimes "partially works" is worse than "not available", but I'll defer to a consensus opinion.
21:32 pmichaud (i.e., I'd prefer it not to appear -- we'll get lots of questions that are just "oh, the shell is broken", and we'll get a fair number of people who say "rakudo is broken -- see the shell")
21:32 pmichaud anyway, I'll defer to majority.  :)
21:33 masak fair points.
21:34 pmichaud rakudo:  my @slides = 42 xx 5;  say 1..@slides;
21:34 p6eval rakudo 19931f: OUTPUT«1234␤»
21:34 * moritz_ back
21:34 phenny moritz_: 20:05Z <[Coke]> tell moritz_ I wish to make try/shell have a valid doctype and will trade this for a commit bit.
21:34 pmichaud ...why is that a bug?
21:34 pmichaud oh, should be 5?
21:34 pmichaud hmmmm
21:34 pmichaud no, wait
21:34 pmichaud ...why is that a bug?
21:35 tylercurtis rakudo: my @slides = 42 xx 5; say +@slides;
21:35 p6eval rakudo 19931f: OUTPUT«5␤»
21:35 moritz_ hugme: add coke to try.rakudo.org
21:35 * hugme hugs coke. Welcome to try.rakudo.org!
21:35 ash_ moritz_: i fixed that btw
21:35 pmichaud rakudo:   say 1..(42, 42, 42);
21:35 p6eval rakudo 19931f: OUTPUT«1234␤»
21:36 tylercurtis rakudo: my @slides = 42 xx 5; say +@slides; say (1..5).perl say (1..+@slides).perl; say (1..@slides).perl;
21:36 p6eval rakudo 19931f: OUTPUT«===SORRY!===␤Confused at line 22, near "say (1..5)"␤»
21:36 pmichaud rakudo:   say 4 before (42, 42, 42)
21:36 p6eval rakudo 19931f: OUTPUT«1␤»
21:36 tylercurtis rakudo: my @slides = 42 xx 5; say +@slides; say (1..5).perl; say (1..+@slides).perl; say (1..@slides).perl;
21:36 p6eval rakudo 19931f: OUTPUT«5␤1..5␤1..5␤1..[42, 42, 42, 42, 42]␤»
21:36 moritz_ ash_++
21:36 moritz_ [Coke] got his commit bit anyway :-)
21:36 pmichaud there is nothing in the current spec to indicate that the end of a Range should be numified.
21:37 pmichaud (unless the spec changed recently)
21:37 * moritz_ -> sleep
21:37 ash_ moritz_: do you have a sec before you go to sleep ?
21:37 tylercurtis rakudo: my @slides = 42 xx 5; say (^@slides).perl;
21:37 p6eval rakudo 19931f: OUTPUT«0..^5␤»
21:37 pmichaud oh, it changed recently, I guess.
21:38 pmichaud okay, we can fix that.
21:38 masak pmichaud: if it helps, I have a lot of code that assumes 1..@array means 1..+@array
21:38 masak frankly, I don't see why it shouldn't.
21:39 pmichaud masak: '0'..@array
21:39 leprevost joined #perl6
21:39 masak (I see how it *couldn't*, but I don't want it to mean anything else) :)
21:39 pmichaud the old range specification didn't assume types had to match
21:39 pmichaud it just used .succ and before/after semantics
21:39 pmichaud I'm almost okay with the new one
21:40 masak I think we should favour Int and Num a lot, since those are the commonest ones.
21:40 pmichaud the new spec says:
21:40 pmichaud S03: " It is specifically illegal to
21:40 pmichaud use anything that does C<Iterable> as implicitly numeric:
21:40 pmichaud 0 ..^ 10  # 0 .. 9 0 .. ^10  # ERROR
21:40 pmichaud (line wrap fail)
21:40 pmichaud anyway, it claims that 0 .. ^10  fails because ^10 is Iterable.
21:40 masak waitwait
21:40 pmichaud but by that reasoning,  0 .. @array should fail also, because arrays and lists are Iterable.
21:41 masak 0 ..^ 10 or 0 .. ^10 ?
21:41 masak those are diff'rent.
21:41 pmichaud 0 ..^ 10   is legal, definitely
21:41 masak oh, line wrap fail.
21:41 masak I see now.
21:41 pmichaud 0 .. ^10   is claimed to be illegal, because ^10 is Iterable
21:41 pmichaud but @array is also Iterable
21:41 masak meh
21:41 pmichaud so it can't be "Iterable" that forces a failure.
21:41 masak I'm going on strike over that one.
21:41 masak it's silly.
21:41 masak I'm numifying arrays all the time.
21:42 masak especially at the rhs of ranges.
21:42 masak it's darn convenient.
21:42 pmichaud the spec does say that "for any other type, it automatically numifies"
21:42 pmichaud ...but I don't see how array gets excluded from Iterable
21:43 masak I don't see why iterables should blow up in the first place.
21:43 pmichaud well, partially because   0 .. ^10  seems to be a very common think-o
21:43 pmichaud but in that case I think we should explicitly exclude Range, not Iterable
21:43 masak it's perfectly clear to me what 0 .. ^10 does :)
21:44 masak it does the same as 0 .. 10
21:44 tylercurtis I guess the 0 .. ^ 10 being illegal is at least partially to catch accidentally having a space between .. and ^? If so, can't that be handled with a parser warning?
21:44 masak I don't think it should be a criminal compiler offense, just a warning.
21:49 ash_ is there a file in perl6 that is loaded every time the program is run? So i could put some custom stuff into it, that i want to execute each time that perl6 starts (for the shell)
21:49 pmichaud ash_: no.
21:49 ash_ i think i have a way figured out to get the repl to function the way i need it, then i just need to have a program manage them in the background of the server
21:49 ash_ what if i modified the settings file?
21:50 ash_ really, the only thing i need to do is set $*ARGFILES and turn on safe mode (to protect the server)
21:50 sjohnson hello friends of perl6
21:50 tadzik o/
21:54 xinming joined #perl6
21:55 jaldhar joined #perl6
21:56 [Coke] moritz_: thanks for the bit.
21:57 [Coke] masak: changed "guys" to "folks", though I am not a huge fan of doing so.
21:57 masak [Coke]: ok; thanks.
21:58 masak [Coke]: I'm not even sure to say it's accurate to say that the same people did the shell who did Rakudo...
21:58 masak 'night, #perl6
22:00 leprevost hello all
22:00 hacktor left #perl6
22:12 * pmichaud decides the "Range code is broken" itch is too big to ignore any longer.
22:26 [Coke] pmichaud: nooooooo--- oh, wait, nevermind, go ahead. =-)
22:27 pmichaud rakudo:  say Int ~~ Rat
22:27 p6eval rakudo 19931f: OUTPUT«0␤»
22:27 pmichaud rakudo:  say Num ~~ Int
22:27 p6eval rakudo 19931f: OUTPUT«0␤»
22:27 pmichaud rakudo:  say Int ~~ Num;
22:27 p6eval rakudo 19931f: OUTPUT«0␤»
22:47 sjohnson rakudo:  say Int ~~ Int
22:47 p6eval rakudo 19931f: OUTPUT«1␤»
22:47 sjohnson ( `ー´)
22:48 tadzik there is mkdir(), chdir(), unlink(). Is there anything like cp?
22:51 pmichaud say Num ~~ Real;
22:51 pmichaud rakudo:  say Num ~~ Real;
22:51 p6eval rakudo 19931f: OUTPUT«1␤»
22:51 pmichaud rakudo:  say Num ~~ Real, Rat ~~ Real, Int ~~ Real;
22:51 p6eval rakudo 19931f: OUTPUT«111␤»
22:54 sjohnson tadzik: good question
22:54 pmichaud afk # sleep
22:54 sjohnson system('cp', $source, $dest); is the usual way i did it.  never found an equiv for perl
22:55 simcop2387 joined #perl6
22:55 sjohnson <insert sad face emot here>
22:55 tadzik this is runing neutro's portability! :(
22:55 Tene mkdir, chdir, unlink, etc. are system calls.  There is no system call for copying.
22:56 tadzik mhm
22:56 tadzik time for File::Copy then?
22:56 Tene you have to just open both files, and then loop on read/write.
22:56 Tene yeah, pretty much
22:56 * tadzik updates TODO
22:56 tadzik but neutro can't have deps anyway :/
23:00 _macdaddy joined #perl6
23:04 ruoso joined #perl6
23:06 xinming joined #perl6
23:10 sjohnson just use my example instead of relying on a 3rd party module...?
23:10 sjohnson maybe you want File::Copy for good portability tho
23:13 tadzik Your example?
23:14 tadzik oh, system? Well, my point is portability
23:15 tadzik ta-dah! -- http://github.com/tadzik/neutro (in case You haven't heard)
23:17 sjohnson yeah forgot about the portability thing.  oopsies
23:19 am0c joined #perl6
23:28 masonkramer joined #perl6
23:29 Alias joined #perl6
23:36 sorear good * #perl6
23:36 sorear niecza:
23:36 p6eval niecza : OUTPUT«Can't locate Niecza/Grammar.pm in @INC (@INC contains: STD_checkout /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux /opt/perl-5.12.1/lib/site_perl/5.12.1 /opt/perl-5.12.1/lib/5.12.1/x86_64-linux /opt/perl-5.12.1/lib/5.12.1 .) at CompilerDriver.pm line 27.␤BEGIN failed--compilati…
23:54 dalek niecza: 7f2dff1 | sorear++ | STD_REVISION:
23:54 dalek niecza: Update STD for settings fix
23:54 dalek niecza: review: http://github.com/sorear/niecza/commit/7​f2dff1eb0fc42759ec8b5a922350a4503fa5862
23:54 dalek niecza: 9d71c44 | sorear++ | Niecza.proj:
23:54 dalek niecza: Add a MSBuild .proj file, due to replace the Makefile
23:54 dalek joined #perl6
23:55 sorear (12 more commits)
23:57 thowe joined #perl6
23:59 Psyche^ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo