»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by moderator on 4 August 2010.
00:02 ruoso joined
ash_ aya1: is rw and is readonly is only for public accessors you know, right? 00:02
aya1 oh, it only for public
ash_ has $!a; is no accessors 00:03
has $.a; is a public accessor (but not a public writer)
aya1 yup i'm know about private
:) got it
ash_ has $.a is rw; is public blah blah
aya1 now need just got how make new without bless :)
:)
ash_ bless is what makes a new instance of an object 00:04
you don't have to use .new
snarkyboojum you have to call bless in a custom constructor
aya1 i'm mean other define method not trought bless
like:
class A { 00:05
has $!a is rw;
has $!b = 'test';
method new($c) {
$!a = 'test';
}
method test() {
say $.b;
}
};
ash_ ah
aya1 like it be in BUILD before :)
ash_ see, new needs to return the results of self.bless 00:06
aya1 i'm know :)
as in v5 :)
snarkyboojum aya1: nopaste is your friend
sorear aya1: please use a pastebin for anything longer than 3 lines
aya1 okay sorry :)
snarkyboojum aya1: perlcabal.org/syn/S12.html#Construc...ialization has some good info on how this works 00:09
aya1 one sec i'm look
thanks for link :)
sjohnson rakudo: say 'yo dudes' 00:11
p6eval rakudo ecb4b0: OUTPUT«yo dudes␤»
aya1 snarkyboojum: it that i'm already know :) but anyway thanks :) i'm just no like bless :-D 00:12
and attributes defenition throught it
:)
ash_ rakudo: say [*] 1, 1, *+* ... 20
p6eval rakudo ecb4b0: OUTPUT«3120␤»
00:13 buu joined 00:23 tjyang joined
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 00:41 benji-man joined, LaVolta joined 00:45 kid51 joined
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
if it's less than 10,000 times slower than p5, it's doing well
00:47 masonkramer joined
aya1 hmm so 10,000 is ok result from v5 to v6? 00:48
sorear now, yes
benji-man is there a guide to setting up emacs for Unicode support, a good way to enter the french quotes, etc. ? 00:49
aya1 sorear: oh than it ok, if on eye than diff around 4-5 seconds in execution 00:50
v5 execute in 3 second, 00:51
v6 execute in 7 second around it
benji-man aya1: not bad!
aya1 :) it cos it request info from direct host :) in other case for me it very slow 00:52
just v6 like freezes for few second than request and output, v5 looks like without this freez
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:54
rcfox benji-man: You could use the compose key? 00:57
Compose > > = »
In Ubuntu, System -> Preferences -> Keyboard -> Layouts -> Options -> Compose Key Position 00:59
ash_ in OS X if you want to do « or » you just do Option + | 01:01
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
those would be like Option + 2525 = ┥ for instance 01:03
.u die face 3 01:04
phenny U+2682 DIE FACE-3 (⚂)
ash_ .u die face 1
phenny U+2680 DIE FACE-1 (⚀)
ash_ .u die face 6
phenny U+2685 DIE FACE-6 (⚅)
cognominal rakudo: ([ [ 5], [3] ]).sort: *.[0]).perl 01:05
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near ").perl"␤»
cognominal rakudo: ([ [ 5], [3] ]).sort: { $_[0] }).perl 01:06
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near ").perl"␤»
cognominal rakudo: ([ [ 5], [3] ].sort: { $_[0] }).perl 01:07
p6eval rakudo ecb4b0: ( no output )
cognominal rakudo: ([ [ 5], [3] ].sort: *[0] ).perl
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
ash_ rakudo: my @die = "⚀" .. "⚅"; say @die.pick; 01:09
p6eval rakudo ecb4b0: OUTPUT«⚂␤»
ash_ i rolled a 3
01:11 JimmyZ_ joined
JimmyZ_ Hello, LaVolta 01:12
01:12 tylercurtis joined
LaVolta JimmyZ_: 说中文吧? 01:12
JimmyZ_: 或者小窗?
JimmyZ_ 你是哪里人? 01:13
rcfox rakudo: say ~("⚀" ... "⚅"); 01:20
p6eval rakudo ecb4b0: OUTPUT«⚀ ⚁ ⚂ ⚃ ⚄ ⚅␤»
rcfox Hah, neat.
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␤»
avuserow rkaudo: my $x = "⚀"; for (1 .. 5) { $x.say; $x++} 01:23
rakudo: my $x = "⚀"; for (1 .. 5) { $x.say; $x++}
p6eval rakudo ecb4b0: OUTPUT«⚀␤⚁␤⚂␤⚃␤⚄␤»
tylercurtis std: :$<foo> 01:24
p6eval std 31906: OUTPUT«ok 00:01 114m␤»
01:24 aya1 left
tylercurtis cognominal: I think the :$<foo> form was only recently added to STD. Rakudo probably just hasn't yet caught up. 01:25
avuserow what is :$<foo>? 01:26
tylercurtis avuserow: the same as :foo($<foo>).
avuserow and is $<foo> different from $foo? 01:27
rcfox rakudo: say "⚀" + "⚂";
p6eval rakudo ecb4b0: OUTPUT«0␤»
tylercurtis avuserow: $<foo> is $/<foo>
rcfox Aw.
avuserow oh!
regex matches
useful! 01:28
mostly because it's exactly what I imagined it would be
[Coke] rakudo: say ("⚀" ... "⚅").pick(3, :replace);
p6eval rakudo ecb4b0: OUTPUT«⚀⚃⚄␤»
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:"␤»
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:"␤»
avuserow sorry rakudo, I'm confused too now.
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
Whoops.
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
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;"␤»
rcfox :\\
01:36 ghyspran joined
avuserow rcfox: my method is causing some confusion somehow 01:36
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«⚃⚁⚁⚂⚃␤»
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;"␤»
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
avuserow (best I have so far) 01:39
p6eval rakudo ecb4b0: OUTPUT«⚄⚀⚃⚃⚃␤»
rcfox Oh.
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;
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;
avuserow (to any dice game geeks, I'm sorry about probably using XdY incorrectly)
p6eval rakudo ecb4b0: OUTPUT«⚀⚀⚀⚀⚀␤»
tylercurtis avuserow: you just have it backwards.
avuserow: and it probably won't work for anything bigger than a d6. 01:41
avuserow yeah, probably not
it'd more useful for it to give out the total
but that doesn't let us use cute unicode characters
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«⚀⚀⚂⚅⚅⚀⚅⚃␤»
avuserow rakudo: sub infix:<d> {my @dice; my $die = "⚀"; push(@dice, $die++) for 1 .. $^l; return @dice.pick($^r, :replace);}; say 12 d 12;
p6eval rakudo ecb4b0: OUTPUT«⚀⚅⚂⚀⚅⚄⚀⚂⚀⚄⚁⚀⚂⚀⚄⚀⚅␤»
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␤»
tylercurtis rakudo: say "⚅".succ;
p6eval rakudo ecb4b0: OUTPUT«⚀⚀␤»
rcfox Uh.
avuserow cute!
tylercurtis rakudo: say "z".succ
p6eval rakudo ecb4b0: OUTPUT«aa␤»
rcfox rakudo: say "⚅".succ.succ;
p6eval rakudo ecb4b0: OUTPUT«⚀⚁␤» 01:45
avuserow it's a base 6 numbering system :o
rcfox Yeah.
With dice!
Interesting...
avuserow too bad "⚅".succ is not "⚀⚅"
then it'd add up :D 01:46
rcfox rakudo: my $a = "⚀"; say $a++ for 0..20;
p6eval rakudo ecb4b0: OUTPUT«⚀␤⚁␤⚂␤⚃␤⚄␤⚅␤⚀⚀␤⚀⚁␤⚀⚂␤⚀⚃␤⚀⚄␤⚀⚅␤⚁⚀␤⚁⚁␤⚁⚂␤⚁⚃␤⚁⚄␤⚁⚅␤⚂⚀␤⚂⚁␤⚂⚂␤»
rcfox rakudo: say "⚀".Num; 01:47
p6eval rakudo ecb4b0: OUTPUT«0␤»
avuserow rakudo: say "11".Num; say "asd".Num; 01:49
p6eval rakudo ecb4b0: OUTPUT«11␤0␤»
01:53 plol joined 02:47 jakk joined
rcfox rakudo: my $a = */*; say $a(2,3); 02:49
p6eval rakudo ecb4b0: OUTPUT«0.666666666666667␤»
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
..22:/tmp/tG544xapjY␤»
rcfox rakudo: my $a = */*; say $a($a(1,2),$a(9,11));
p6eval rakudo ecb4b0: OUTPUT«0.611111111111111␤» 02:52
02:55 jakk_ joined
[Coke] rakudo: my $a = */*; say $a($a(1,2),$a(9,11)).perl; 02:57
p6eval rakudo ecb4b0: OUTPUT«11/18␤»
rcfox Heh!
rakudo: my $a = */*; say $a($a(27,2),$a(9,11)).perl;
p6eval rakudo ecb4b0: OUTPUT«33/2␤»
rcfox rakudo: my $a = */*; say $a($a(1,1),$a(1,1)).perl; 02:58
p6eval rakudo ecb4b0: OUTPUT«1/1␤»
LaVolta what? Perl 6 got such a feature? 03:08
03:24 sekimura1 joined 03:26 drbean joined
[Coke] which feature now? 03:28
sorear whatever currying, I would guess
03:29 Mowah joined
[Coke] that or the Rats. 03:30
03:43 ash__ joined
ash__ rakudo: say ~ (1, 3) x (2, 4) 03:48
p6eval rakudo ecb4b0: OUTPUT«1 31 3␤»
03:56 bit_ joined
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
is this normal ?
melte yes.
well, if it is only a little slow, then that might be an exception 03:58
because for the rest of us it is *really* slow currently
xD
bit_ hehe, yea, I was trying to be a political
it is very slow indeed
do you know why it is that slow ? 03:59
melte well
it is more important to implement the language and make feature improvements
than to focus on optimization atm
bit_ sure... I thought it would be something like that 04:00
the language is nice, I like it
04:01 ash__ joined
melte cool 04:01
bit_ thank you melte, see ya =)
melte an unofficial poll of #perl6 finds the language very popular
04:04 ash___ joined
[Coke] not that we're self selecting or anything. 04:05
melte 0 selection bias 04:06
04:43 LaVolta joined
sorear snarkyboojum: moritz_: Would you take a look at the 'msbuild' branch of niecza and see if it compiles for anyone but me? 04:45
04:56 jrtayloriv joined
sorear oh dear. chandon almost has threads working in parrot, I need to hurry 04:57
04:58 jrtayloriv joined 05:06 jrtayloriv left 05:15 REPLeffect joined 05:16 omajgat joined, omajgat left
sorear anybody else who has a history of building niecza is also invited to comment. 05:33
05:37 kaare joined 05:46 NiiHiiL joined 05:48 NiiHiiL joined 05:57 wamba joined 06:08 Su-Shee joined
sorear awful quiet. 06:15
moritz_ sorear: how would i compile that branch? 06:19
sorear "xbuild" 06:22
moritz_ tries 06:23
06:23 NiiHiiL joined
sorear wanted: git-ack 06:28
06:29 wtw joined
dalek kudo: 0128ccd | pmichaud++ | docs/ROADMAP:
Initial ROADMAP updates from Pisa hackathon.
06:45
plobsing n 06:46
sorear interesting, I can *almost* get a working .WHICH from mono primitives
unfortunately... it aliases objects which are exactly 8GB apart
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…
moritz_ I guess I'll switch back to master :-)
sorear wants to get rid of master, though! 06:48
moritz_: did the build go through at all?
that error message is incompatible with a successful build 06:49
which means you have error messages for me
moritz_ sorear: it fell out of the window and my broken ssh conneciton :( 06:52
moritz_ -> breakfast
07:09 kiffin joined 07:11 timbunce joined
squeeky morning. 07:12
pmichaud squeeky: good morning 07:13
sorear I want to know where all my enthusiasm for hacking niecza went 07:21
it vanished, and now all that's left is a bunch of irritated negativity
all I do now seems to be harassing evalbot maintainers
mulander morning all 07:22
sorear hello
mulander sorear: I find Your niecza project really interesting
07:23 masak joined
masak oh hai, #perl6! 07:23
mulander sorear: maybe focus on promoting it for a while? Write some rationale and theorycrafting articles for people.
masak wow, try.rakudo.org/shell is looking great! (those responsible)++
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.
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 kraih.com/usingperl6-sri.jpg # a book cover (for those who missed it yesterday)
07:24 am0c joined
sorear google is scary fast 07:25
sorear was thinking "wait, it's on google already?"
mulander first result for niecza
masak _sri: nice.
mulander is your github page :)
sorear so I check - 3rd hit - today's IRC log
mulander at least while I'm logged in.
sorear specifically, something I said two hours ago
was a phrase search hit. 07:26
masak odd difference: "my $x = 5" in the Rakudo REPL outputs "5". in try.rakudo.org/shell it outputs nothing.
sorear I remember when indexing took months
LaVolta I got a single arrow ...
masak LaVolta: right. I got the arrow too. 07:27
LaVolta: it's not actually part of the output.
LaVolta masak: JimmyZ_ contacted me, and it's just begun... 07:28
gotta keep the terms consistently...so I have to grab a copy of Chinese version of the Camel Book :-P 07:29
masak :) 07:30
LaVolta++ JimmyZ++
sorear ye're starting the zh_CN Using Perl 6?
dalek psi: 715b5ea | masak++ | lib/Yapsi.pm:
[Yapsi] bumped SIC version

upcoming release.
07:31
psi: d5ed674 | masak++ | lib/Yapsi.pm:
[Yapsi.pm] renamed 'lexvar' into 'var'

are really lexical variables underneath; having all of these be called
  'lexvar' just seemed wrong. So 'var' now introduces a lexical variable, and
future flags (something like :dynamic and :state, perhaps) will modify those lexvars to be have like contextual variables and state variables, respectively.
masak dalek's output could easily be a lot smaller.
LaVolta sorear: no...it's Syn in chinese
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.
LaVolta PDF? how could it be that large 07:32
sorear CPAN is at our fingertips. IO::Compress::GZip, MIME::Base64
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.
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
in it
masak the images themselves are ~300kB jpeg images.
sorear masak: burn a CD and mail it? 07:34
squeeky masak: ve have vays to compress it
sorear punch a firewall hole and use bittorrent?
LaVolta or rapidshare :-P
sorear put it on feather2 while Juerd isn't looking? 07:35
masak squeeky: without losing resolution in the images?
I guess I could .tar.gz it...
masak tries that
07:35 foodoo joined, Ross joined 07:37 uniejo joined
pmichaud (try.rakudo.org) --- why does it add semicolons to my input? 07:38
moritz_ good morning 07:48
www.perlmonks.org/?node_id=852795
sorear good morning moritz_
pmichaud: how copiable of a state is rakudo's autovivification in? 07:49
07:49 jedai joined
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:50
sorear: and it's the same error, so at least it's consistent :) i.e. can't open unicode maps from $HOME/lib 07:51
sorear Weird. 07:55
Hmm
snarkyboojum when running ./std CORE.setting
sorear Do you have $HOME/lib in env anywhere *other* than... OH
snarkyboojum at stage0
sorear That's basically my gen-parrot
The niecza build system is $PERL6LIB-tight 07:56
the STD one... notsomuch
cono rakudo: class A { has $.x is rw }; my A $a .= new; $a.x = 5; $a.x.say
p6eval rakudo ecb4b0: OUTPUT«5␤»
cono any other way to use setter of a rw field $.x ?
$a.x(5) ? 07:57
moritz_ no
07:57 uniejo joined
cono ok, thanks 07:57
pmichaud sorear: shouldn't be too bad to copy (and improve upon). The magic is in Any-list.pm 07:58
afk, moving to conference venu
*venue 07:59
moritz_ hurry up
first talk starts in 1
:-)
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++
p6eval rakudo ecb4b0: OUTPUT«A()<0x74ef590>␤»
sorear snarkyboojum: could you change STD_REVISION to 31907 and tell me if it works
cono which method I need to override to print 5 ?
sorear Stringy
cono sorear: thanks 08:03
sorear possibly Str
moritz_ rakudo: class A { has $.x is rw; method Str { ~$.x} }; my A $a .= new(:x(5)); say $xa
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "say $x\\x{7f}a"␤»
moritz_ rakudo: class A { has $.x is rw; method Str { ~$.x} }; my A $a .= new(:x(5)); say $x
p6eval rakudo ecb4b0: OUTPUT«===SORRY!===␤Confused at line 22, near "say $x\\x{7f}"␤»
moritz_ rakudo: class A { has $.x is rw; method Str { ~$.x} }; my A $a .= new(:x(5)); say a
p6eval rakudo ecb4b0: OUTPUT«Could not find sub &a␤ in main program body at line 22:/tmp/c4L_2oJ0Pv␤»
moritz_ rakudo: class A { has $.x is rw; method Str { ~$.x} }; my A $a .= new(:x(5)); say $a
snarkyboojum sorear: will have a play - cheers
p6eval rakudo ecb4b0: OUTPUT«5␤»
moritz_ distracted
cono ah, moritz_++ :) 08:04
08:05 azawawi joined
azawawi hi 08:05
masak azawawi! \\o/
azawawi: we're at YAPC::EU! where are you?
azawawi has anyone tried compiling blizkost on perl 5.12.1 (linux)?
masak: im working :)
sorear azawawi: that's my development environment. it works great. 08:06
azawawi masak: next year I plan to go there :)
pmichaud (stringy) Rakudo needs some rework on stringy.
I've started it several times, but it's not clear to me what the get_string vtable should correspond to. :-|
azawawi sorear: could you git pull and try it again... im getting this weird compilation error
TiMBuS rakudo: my @a = (1,2); my %b = @a; @a.perl.say; #Is this a bug? 08:07
p6eval rakudo ecb4b0: OUTPUT«[]␤»
pmichaud looks like a big bug 08:08
moritz_ yes
please submit
TiMBuS yeah i did it yesterday in here but no one noticed i guess
azawawi blizkost compilation error on a $HOME-installed perl 5.12.1 perl.pastebin.com/dJ1777a0
masak TiMBuS++ # how did we miss that one? o.O
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;
pmichaud looks like .hash is *really* broken
I'll fix it.
p6eval rakudo ecb4b0: OUTPUT«[1, 2]␤»
pmichaud rakudo: my @a = (1,2); @a.hash; @a.perl.say;
p6eval rakudo ecb4b0: OUTPUT«[]␤»
sorear azawawi: The Configure error wasn't enough of a clue? maybe it should unlink("Makefile")
moritz_ pmichaud: which might explain why %() tend to segfault way too often
TiMBuS i submitted the patch for .hash
pmichaud TiMBuS: is the patch in the ticket? 08:10
TiMBuS but its probably wrong!
yes
sorear azawawi: your $HOME perl is not correctly configured for embedding (yes, embedding needs special configuration as of 5.12)
azawawi: there should be a really big warning banner from Configure.pm
pl
TiMBuS it just calls &hash which just.. does %h = @_
pmichaud I don't see a patch in the ticket.
azawawi sorear: i didnt see it at first...thanks 08:11
pmichaud ah, that's backwards.
sorear is a bit annoyed with #p5p for this
pmichaud &hash should probably be calling .hash, not vice-versa.
sorear perhaps wrongly
TiMBuS .hash *was* calling sub 'hash' shich doesnt exist
dalek kudo: b627e33 | pmichaud++ | src/core/Cool-num.pm:
Add constant 'i' (RT #76994).
moritz_ 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.
sorear: that's why i tried it on linux.
moritz_ that nopaste contains the first set of notes from the Rakudo hackaton at YAPC::EU
pmichaud "Speeeeeeed" :-)
I did a ROADMAP update this morning, also. Patches welcomed. 08:13
moritz_ adds a few more e's to the heading
TiMBuS rt.perl.org/rt3/Public/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
..probably 08:14
pmichaud TiMBuS: yeah, the patch is backwards there.
sorear seen jnthn
pmichaud (you corrected the code, but the original was wrong)
TiMBuS yep 08:15
pmichaud anyway, I should be able to clean it up.
08:15 thebird joined
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:15
sorear snarkyboojum: line in Niecza.proj needs to be changed to PERL6LIB=./lib:. $(Perl) tryfile STD.pmc 08:16
pm6
snarkyboojum sorear: thanks.. will have a play a bit later - bbl 08:17
TiMBuS heres the bug in hash's !STORE: my $items = $to_store.flat; 08:18
i guess it isn't making a copy?
cono which analog of: $self->SUPER::something($val) in rakudo?
moritz_ cono: which of the N super classes do you mean? 08:19
pmichaud TiMBuS: yes, it's not making a copy (more) 08:20
I'm not sure what it should do there. Let me look at Array!STORE
cono moritz_: class A is B { method something($val) { B.something($val) ... something like that, but without typing name of a base class
moritz_ cono: method something($val) { nextsame } 08:21
cono nextsame?
moritz_ nextsame
cono trying
And $val will be going to base method ? 08:22
automaticaly?
moritz_ yes
cono cool
moritz_ that's the 'same' part
TiMBuS Array!STORE is verry different and also a confusing mind maze :/
moritz_ you can also do nextwith($other_value)
pmichaud TiMBuS: right
cono moritz_++: got it! thanks! :) 08:23
pmichaud TiMBuS: try changing
TiMBuS so many calls to !flat...
pmichaud my $items = $to_store.flat; 08:24
to
TiMBuS and eager
pmichaud my $items = $to_store.Seq;
TiMBuS not .Seq.eager()? 08:25
pmichaud we don't need eagerness here.
the while loop will end up making it "eager"
TiMBuS of course
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
pmichaud self{.key} = .value;
make this *really* much slower than it ought to be.
moritz_ what would be the faster alternative? 08:27
sorear pmichaud: why:?
dalek kudo: e65cb72 | masak++ | docs/ROADMAP:
[docs/ROADMAP] whitespace therapy
08:29
masak moritz_: indeed. but I'm not sure the analogy carries over to Pod, which is after all a different (sub-)language.
TiMBuS > my @a = (1,2); my @ = @a; @a.perl.say;
[1, 2]
yey
\\: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).
TiMBuS my %b = @a * (whoops)
moritz_ masak: fair point. Will ponder more
pmichaud self{.key} ends up doing postcircumfix:{ } on self 08:32
which ends up calling .at_key
which ends up doing a .WHENCE-based based proxy
which then gets filled in on assignment
!STORE really ought to be allowed to do a lot more low-level access than that.
faster would be to put the values directly into $!storage 08:33
08:35 smash joined
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?
p6eval rakudo ecb4b0: OUTPUT«Inf␤»
pmichaud TiMBuS: right
but the values shouldn't be bound directly -- need to create Perl6Scalar containers for each
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:37
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)
p6eval rakudo ecb4b0: OUTPUT«5␤»
cono where is B.x method ?
08:40 schacon joined
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
and it wont box it
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)
p6eval rakudo ecb4b0: OUTPUT«5␤B.x method␤»
pmichaud if you use := it will box 08:41
(eventually, if not now)
cono moritz_: thanks again and again :)
moritz_ cono: nextsame() is a tail call, ie replaces the current method
cono got it
thanks
TiMBuS i assume a normal = will also box?
pmichaud but boxing is okay -- it could be unboxed again when doing the setattribute later 08:42
(pir::descalarref will unbox)
so I'd suggest the := for now
pugssvn r31908 | sorear++ | [STD] Fix lexical package snafu - much easier than it looked? 08:43
08:43 pnate joined
cono moritz_: 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
sorear ooh .ua I think that's a new one for here
\\o/ It's a TimToady 08:46
How is YAPC::EU?
TimToady my ancestors came via .ua, though it wasn't .ua at the time... 08:47
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
cono: a test suite :-)
cono ok :) 08:49
TimToady so .warp could be implemented using =, maybe
*ra
frettled What? Someone is considering breaking the P5 syntax to … *bogglies*
08:50 pnate joined
TimToady to basically implement a poorer version of leave 08:50
frettled .warp would be a nice method for multi-dimensional arrays
tut tut tut
TimToady and the syntax hackery doesn't really understand the concept of grammatical categories when adding keywords 08:51
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
I think this was something else 08:53
heh, the network is slow enough here that it thought I was trying to paste a line that I typed...
sorear hmm, I seem to have broken import Num <e pi i> 08:54
TimToady good thing you put a ? at the end :) 08:55
sorear ?
TimToady when you said it seemed easy 08:56
sorear ah
I'm actually testing another fix now
in package Foo { #`( $*IN_DECL is still true! ) $bar++ #`( no error ) }
masak heh, maybe .warp is what we should rename .subst to :P 08:57
hm, maybe not... :)
pnu rakudo: say (0.5).WHAT; my Num $a = 0.5;
p6eval rakudo e65cb7: OUTPUT«Rat()␤Type check failed for assignment␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/12tfOTVYD9␤»
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
pnu S02: .. "Rat", which is generally usable anywhere a "Num" is usable ..
frettled masak: I think it's only our sense of humor that's been through .warp ;)
pnu: in Rakudo, you have to use scientific notation for direct assignment to Num, AFAICT. 08:59
masak frettled: :) 09:00
TimToady sorear: sure there are implicit coercions in Perl 6, for some definition 09:01
pmichaud rakudo: my Num $a = 0.5.Num;
masak is #`{comment with braces} allowed?
p6eval rakudo e65cb7: ( no output )
pmichaud rakudo: my Num $a = 0.5.Num; say $a.WHAT;
sorear masak: yes
p6eval rakudo e65cb7: OUTPUT«Num()␤»
TimToady that's what Cool is all about,for instance
masak do you have to put a ; after the closing brace if you want to write something after it on the same line?
TimToady and it seems silly not to autocoerce a Rat to a Num
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
pnu: yes
pmichaud masak: you don't need the ;, no.
moritz_ pnu: or Real, if you want to exclude Complex
masak timbunce++ # generally hoopy frood
pnu rakudo: say 1/0; # isn't this wrong, mathematically speaking?
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.
sorear What's the default scope of a 'constant'? 'my'?
masak {} *always* means a block... except when not.
pmichaud masak: in this case, it's a bracketing character
rakudo: say qq{hello, masak++}; # not a block.
p6eval rakudo e65cb7: OUTPUT«hello, masak++␤»
TimToady pnu: we try to return in-band failures in preference to throwing exceptions in P6, and Inf is a mild failure
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
moritz_ right :-)
masak today's autopun.
moritz_ but I haven't found many of those
masak no, it's a small exception.
ususally, the exceptions are bigger. 09:05
so it's a sort of exception, I guess.
TimToady pnu: this is because exceptions are not friendly to vector ops
coffee, biab & 09:06
whoops, misread schedule, coffee in 13 mintues 09:07
pmichaud 23 minutes, I think. 09:08
(they asked yesterday that we not show up early :-)
sorear oh, I didn't break it
09:08 am0c joined
sorear I fixed a bug that CORE.setting was relying on 09:08
TimToady yes, 23, 21 now 09:09
moritz_ TimToady: should we complain about non-sensical regex adverbs?
TimToady: like s:overlap/.../../ or so
TimToady std: m:huh/bar/
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␤»
moritz_ TimToady: non-sensical != not recognized
TimToady why shouldn't we complain?
moritz_ std: rx:overlap/a/
p6eval std 31908: OUTPUT«ok 00:01 116m␤»
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..
TimToady std doesn't check stemantics
*sem
pnu rakudo: say 1/0 == 2/0;
p6eval rakudo e65cb7: OUTPUT«1␤»
09:10 briang joined
pnu still.. that's not right. 09:10
TimToady it's righter than blowing up the rocket 09:11
pnu true
sorear note that the current rules for failures are almost certainly going to change
right now they're probably worse than C++ 09:12
TimToady in what sense are you thinking that?
sorear sub nasty { for fail, fail -> { .say }; } # throws two exceptions 09:13
pmichaud ...it does?
moritz_ no
sorear sub looks-safe { try { nasty; CATCH { say $!; return } } } # as specced this catches one exception and lets the other propagate
masak rakudo: say (1/0) 09:14
pmichaud seems to me that &nasty would throw one exception.
p6eval rakudo e65cb7: OUTPUT«Inf␤»
frettled ooh.. hmm.
sorear pmichaud: using a failure outside boolean context pushes the failure onto CALLER::<$!>
pmichaud: at the end of &nasty, $! contains two failures
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␤»
pmichaud sorear: fail() exits the routine immediately.
sorear how about
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 }; }
pmichaud sorear: I'd expect that to return a list containing two failures
sorear in any event, the misbehavior I'm pointing out is in looks-safe 09:17
it's quite easy to write code which looks like it traps all exceptions, but doesn't
you actually need to loop over $! and handle each exception in a catch
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
TimToady the sample code in S04 is probably not quite right in that respect 09:22
frettled rakudo: say (1/0).Rat
p6eval rakudo e65cb7: OUTPUT«Inf␤»
frettled hm
rakudo: say (1/0)/0
p6eval rakudo e65cb7: OUTPUT«Inf␤»
pugssvn r31910 | sorear++ | [CORE.setting] constants inside class Num need to be declared our for visibility outside the class to work
frettled rakudo: say (1/0)/(1/0)
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␤»
TimToady the code at S04:1012 should have LEAVE semantics 09:23
frettled rakudo: say Inf/Inf
p6eval rakudo e65cb7: OUTPUT«NaN␤»
TimToady such that it cannot be bypassed by return
frettled rakudo: say Inf/0
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␤»
frettled rakudo: say 0/Inf 09:24
p6eval rakudo e65cb7: OUTPUT«0␤»
TimToady rakudo: say Inf/0E0
frettled rakudo: say 0/0
p6eval rakudo e65cb7: OUTPUT«Divide by zero␤ in 'infix:</>' at line 3791:CORE.setting␤ in main program body at line 22:/tmp/rCsQzqB_zO␤»
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␤»
frettled I think this handling of division by zero is LTA :)
pmichaud there are undoubtedly several places in rakudo where things die instead of fail 09:25
09:26 simcop2387 joined 09:27 twalsh joined 09:28 uniejo joined
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:28
pmichaud pnu: right. I suspect that one of the &infix:</> multis isn't checking for a zero denominator 09:29
our multi sub infix:</>($a, $b) { +$a / +$b; 09:30
}
looks like the culprit.
oh, wait, that can't be it
multi sub infix:</>(Num $a, Num $b) { pir::div__NNN($a, $b)
}
that one 09:31
src/core/Num.pm:238
pugssvn r31911 | sorear++ | [STDeco] Reboot, so that the stage0 compiler can properly handle CORE.setting
pmichaud needs to have fail "Division by zero" if $b == 0;
09:32 tadzik joined
frettled \\o/ 09:32
pmichaud afk, break 09:34
bbkr rakudo: 1/"0.0"; 09:36
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:37
sorear au|zzz horrendously broke STD a week ago 09:42
moritz_ :samecase implies :i - does that mean that m:samecase// is allowed? 09:43
09:43 bpalmer left
moritz_ I vote for 'no' 09:43
09:46 envi^home joined
pugssvn r31912 | sorear++ | [STDeco] Revert r31762 by audreyt; the "inplace guard" causes massive nondeterministic failures in automated STD builds. 09:52
au|irc sorear: wow. the optimization backfired? sorry about that... 09:55
oh, it's the "use lib", not the optimization 09:57
sorear the STD bootstrap procedure relies critically on setting PERL5LIB
the @INC modification breaks that
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
au|irc got it
sorries again :)
x3nU how do i convert string to bytes (Buf) in perl6?
sorear .encode IIRC
09:59 jferrero joined
pnu specs could mention IEEE 754(-2008) if it aims to implement the NaN and Inf rules as specified there..? 10:01
sorear better to do that /quietly/ 10:02
754 has a very vocal hatedom these days
bbkr rakudo: sub prefix:<sub>($a) {1234}; say sub {}; # torturing Rakudo...
p6eval rakudo e65cb7: OUTPUT«1234␤»
bbkr \\o/
moritz_ rakudo++ 10:03
10:04 szabgab joined 10:11 mberends joined
x3nU sorear: but how do i use it? i can't find anything about it 10:11
sorear masak++ is busy implementing it 10:12
moritz_ std: sub d($x where ( 1 <= $x <= 100 ) ) { } 10:13
p6eval std 31912: OUTPUT«ok 00:01 117m␤»
moritz_ rakudo: sub d($x where ( 1 <= $x <= 100 ) ) { } 10:14
p6eval rakudo e65cb7: ( no output )
moritz_ thought that it required { }
cono moritz_: If method returns gather list, how to test it? is $x.iterate, <a b>, "bla-bla-bla" ?
moritz_ cono: I prefer $x.iterate.join('|'), 'a|b', ...; 10:15
cono ah, thanks
moritz_ is() does string comparison
tadzik cono: I usually do is $list.sort, <ba ba ba> 10:16
moritz_ tadzik: that is not very robust
tadzik moritz_: what do You mean? 10:17
sorear ok, niecza is now running on current std with much better package handling
moritz_ tadzik:it can't distinguish 'a b' from 'a', 'b'
10:17 NiiHiiL joined
moritz_ which is fine if you know there are no whitespace in it 10:17
tadzik oh, you're right
moritz_ but I like to be explicit, and use '|' as a separator
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
moritz_ the map is superfluous
.join also coerces to strings
sorear after that, I'll have moritz++ try again
cono moritz_: w/o map I had: got: 'Any()|Any()' 10:19
moritz_ huh.
sounds like a bug
tadzik hmm
github.com/rakudo/rakudo/commit/012...fbae#L0R28
moritz_ cono: see if you can reporduce it
tadzik what VM's are planned?
moritz_ tadzik: .NET, maybe V8
cono moritz_: I'll try to minimize code for "rakuo:"
sorear out.
tadzik V8 is this JS stuff, right?
moritz_ I'll blog about it in the next few days 10:20
tadzik: yes
bbkr are there any HTTP::Request/Response modules for Rakudo? 10:22
moritz_ not sure, need to ask mberends++ 10:23
jnthn++ # nice examples in his slides 10:24
10:25 tomaw joined
tadzik are the slides on the web? 10:26
moritz_ tadzik: you have to ask them when he's done
tadzik a'right
10:26 Mowah joined 10:35 am0c joined 10:37 Italian_Plumber joined
cono moritz_: paste.org.ru/?qh4zgz 10:41
moritz_: with map: a,b 10:42
10:42 mberends joined
mberends bbkr: I'm not sure if github.com/mberends/http-server-simple or www.gitorious.org/http-daemon contain the sort of code you're looking for. 10:46
smash (newbie question alert) anyway i can manipulate @*INC ? 10:49
tadzik yep
moritz_ smash: yes, but you need to do it in a BEGIN block to take effect early enough
dalek kudo: 7083478 | moritz++ | src/Perl6/ (2 files):
Implement :i and :s on rx//; refactor adverb validation a bit
moritz_ BEGIN { @*INC.push('lib') }
smash fair enough 10:50
moritz_: thank you
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:51
pmichaud pmichaud@plum:~/rakudo$ ./perl6 10:52
> say 3 ~~ True;
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"
> say 3 ~~ False; 10:53
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"
moritz_ pmichaud++
pmichaud we now need to fix t/spec/S03-smartmatch/any-bool.t
bbkr moritz_: I already reported that in your JSON::Tiny - rt.cpan.org/Public/Bug/Display.html?id=55720 - safer to use unshift to modify @*INC :)
10:55 jettero joined
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 .␤»
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:56
10:57 whiteknight joined
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? 10:59
tadzik jettero: github.com/jnthn/zavolaj 11:00
jettero: it's a native call interface
jettero right, nci
I wish I could memorize that. Seems as you approach 40, you forget things you don't use. pfft
sorear I'm doing that already at 19
jettero heh 11:01
my brain didn't used to be quit as mushy. Sucks. :)
11:02 meppl joined
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 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
you can actually read it
tadzik that's right
jettero wow, how exciting 11:03
I have to read the rest of this now. Did he pick up the libs in bytecode? or did parrot add support for that?
tadzik no idea
snarkyboojum jettero: what are you reading? 11:04
jettero snarkyboojum: I was reading the sqlite3.p6 example in the NCI git
snarkyboojum jettero: link?
jettero now I'm reading the nativecall.pm6 .. in particular: is.gd/e40EJ <--- does Q:PIR drop bytecode into the output? 11:05
I have to learn perl6 now I guess. I'm all geeked out
snarkyboojum Q:PIR is effectively inline PIR as I understand it
jettero that's certainly what it looks like
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
yeah, I think of PIR as bytecode, clearly wrong, but I don't know the words yet
snarkyboojum just PIR :)
jettero well, I know that *now* 11:07
tadzik: do you happen to know if that's the only NCI? or are there others also? 11:08
I recall that there was no concensus on how things should be done
tadzik jettero: I don't think there are any others
snarkyboojum other NCI?
jettero in that case, I find zavolaj a rather unusual name. 11:09
probably US centric on my part
sorear snarkyboojum: q:p{Niecza.proj} ~~ s:g/cswrite/writecs/
(why am I making so many typos.)
snarkyboojum jettero: jnthn loves his slovak languages, so there's a few interesting Perl 6 modules names like that :) 11:10
sorear++ # for never sleeping
jettero svieks! 11:11
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:12
sorear pir::loadlib is just dlopen 11:14
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
I'm yet to play with it, but I have a project in mind :)
11:18 xinming joined
snarkyboojum sorear: I'm getting further! latest error - 'AOT compilation is not supported on this platform', gist.github.com/509584 11:19
sorear: perhaps that's the fault of my mono install :| 11:20
jettero sorear: makes sense. presumably loadlib would choose LoadLibrary in windows? or is this a *nix specific thing? 11:22
11:24 rgrau joined
smash moritz_: 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);
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␤»
pnu how can I coerse to type T.. which is Int in this case?
tadzik smash: you can mention PERL6LIB there
pushing to @*INC does not look familiar 11:26
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 --> gist.github.com/509600
sorear snarkyboojum: the --aot usage is just a speed hack
snarkyboojum sorear: thought as much - see above :) 11:31
sorear geeze what's wrong with your mono
snarkyboojum sorear: hehe - I'm happy with that response :P
sorear: at least build works ;)
sorear might try removing --debug=casts from CompilerDriver.pm
snarkyboojum sorear: I'd say "what's wrong" with my mono is that I installed it from an OS X disk image ;_ 11:32
sorear snarkyboojum: ppc? 11:33
snarkyboojum intel
i7
sorear odd
11:33 meppl joined
sorear anyways --debug=casts is in no way necessary 11:35
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 - gist.github.com/509604 11:37
sorear: thanks for your help - hope my pestering has ironed a few things out :) 11:38
sorear How slow is it? 11:40
11:40 envi^home joined
sorear With --aot the REPL usually takes about a second per line 11:40
snarkyboojum sluggish
about a second per line here 11:41
without it
sorear: also, here's a diff showing what I ended up changing gist.github.com/509612 11:43
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:44
11:47 adde joined
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 11:57 uniejo joined 11:59 plol joined
moritz_ kraih.com/usingperl6-sri.jpg 12:00
squeeky _sri++ 12:01
bbkr Is there any way to restrict class attribute with regexp? something like class Address { has $.zip where /^\\d\\d-\\d\\d\\d$/ } ? 12:04
moritz_ yes 12:07
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"␤»
takadonet morning all
moritz_ rakudo: subset Zip of Str where /^\\d\\d-\\d\\d\\d/; class Address { has Zip $.zip; }; say Adrress.new(zip => '20-123').perl
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
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
../tm…
moritz_ rakudo: subset Zip of Str where /^\\d\\d\\-\\d\\d\\d/; class Address { has Zip $.zip; }; say Adrress.new(zip => '20-123').perl
p6eval rakudo e65cb7: OUTPUT«Could not find sub &Adrress␤ in main program body at line 22:/tmp/xbjsGdXuu5␤»
moritz_ rakudo: subset Zip of Str where /^\\d\\d\\-\\d\\d\\d/; class Address { has Zip $.zip; }; say Address.new(zip => '20-123').perl
p6eval rakudo e65cb7: OUTPUT«Address.new(zip => "20-123")␤»
moritz_ rakudo: subset Zip of Str where /^\\d\\d\\-\\d\\d\\d/; class Address { has Zip $.zip; }; say Address.new(zip => '20-foo').perl
p6eval rakudo e65cb7: OUTPUT«Address.new(zip => "20-foo")␤»
moritz_ hum 12:10
seems to be not yet enforced :(
bbkr moritz++ 12:12
moritz_ www.perlmonks.org/?node_id=852900
12:13 smash joined 12:15 bluescreen joined
pugssvn r31914 | sorear++ | [STDeco] FindBin returns, this time aware of the bootstrapping procedure and less likely to screw it up. 12:15
moritz_ sorear: still interested in build errors from the msbuild branch? 12:17
tadzik smash: how about mentioning PERL6LIB in blogs.perl.org/users/smash/2010/08/...rt-1.html? Pushing to @*INC may seem a little cryptic
timbunce sorear/jnthn : if I have a perl5 array ref returned from blitzkost, how can I access the elements?
smash tadzik: sure, or feel free to comment and add the info
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␤»
tadzik shabble: I'd have to register to comment, I hate that :/
sorear moritz_: yes, but i'd like to finish fixing snarkyboojum's build errors first 12:19
tadzik bah, smash 12:20
damn you, tab-completion
shabble: pardon
moritz_ sorear: nopaste.snit.ch/22575
tadzik: I commented 12:21
tadzik moritz_++
smash moritz_++
moritz_ it might have eated it :( 12:22
smash rakudo: %*ENV.perl
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 :(
smash oh, right
moritz_: fixable limitation ?
moritz_ smash: I hope so :-)
smash err, i mean 'quick fixable' ? 12:24
moritz_ I have no idea
sorear moritz_: yeah that's something snarkyboojum found 12:25
fixing it
12:25 uniejo joined 12:26 whiteknight joined
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
12:27 Guest94224 joined
sorear you'll likely need to do something like my $fetch = eval 'sub { $_[0][$_[1]] }', :lang<perl5> 12:29
moritz_: fix pushed
timbunce sorear: eek! ok, thanks
TimToady this stupid network won't let me check in with svn...
frettled no room for SSH tunnel goodness? 12:30
sorear the parrot aggregate API is quite ill defined
moritz_ tadzik: neither me
meant TimToady, sorry
TimToady perhaps if I switch to https it might work
sorear see also: %*ENV refusing to enumerate
moritz_ didn't work reliably for me
sorear goes and attempts to sleep for longer than the average compile run time 12:31
szbalint NQP++
12:38 ruoso joined 12:42 takadonet left, Mowah joined 12:44 takadonet joined
[Coke] (can't iterate over env is bug in parrot) - is there a trac ticket for this? 12:55
moritz_ not sure... there's a source code comment for it 12:58
12:58 Ross joined
moritz_ src/pmc/env.pmc 12:58
C<Env> is a singleton class which provides access to the system environment.
XXX Think about returning Pair back. Currently there is no way to iterate over
environment I<keys>.
[Coke] moritz_: nopaste.snit.ch/22578 13:02
so, it it least mostly works.
... why Env is not subclassing Hash, I unno. 13:03
moritz_ [Coke]++ 13:04
snarkyboojum that is one sexy book cover
13:04 tomaw joined
moritz_ star: use LWP::Simple; say "alive" 13:05
p6eval star 2010.07: OUTPUT«alive␤»
13:06 LaVolta joined
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
timbunce thinks I'll have to start contributing to blitzkost...
13:15 __rnddim__ joined, Guest23195 joined
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:15
13:17 io joined
TimToady rakudo: $_ = "foo"; s/o/{uc $/.Str}/; .say 13:18
p6eval rakudo 708347: OUTPUT«fANY()<0X357EFC0>o␤»
[particle] urk
TimToady hmm
bbkr rakudo: $_ = "foo"; s/(o)/{uc $/.Str}/; .say
p6eval rakudo 708347: OUTPUT«fANY()<0X357EFC0>o␤» 13:19
TimToady rakudo: $_ = "foo"; s[0] = $/.uc; .say
p6eval rakudo 708347: OUTPUT«foo␤»
TimToady rakudo: $_ = "foo"; s[0] = $/.Str.uc; .say
p6eval rakudo 708347: OUTPUT«foo␤»
TimToady rakudo: $_ = "foo"; say $_.subst(/o/, { uc $/.Str }) 13:20
p6eval rakudo 708347: OUTPUT«fANY()<0X357EFC0>o␤»
TimToady rakudo: $_ = "foo"; say $_.subst(/(o)/, { uc $0.Str })
p6eval rakudo 708347: OUTPUT«fANY()<0X7DAA300>o␤»
bbkr rakudo: $_ = "foo"; s/(o)/{uc $0.Str}/; .say
p6eval rakudo 708347: OUTPUT«fANY()<0X74D6680>o␤»
TimToady most of those should work 13:21
bbkr rakudo: $_ = "foo"; s/(o)/{.uc}/; .say 13:22
p6eval rakudo 708347: OUTPUT«fFOOo␤»
bbkr blah :)
rakudo: $_ = "foo"; s:g/(o)/{.uc}/; .say
p6eval rakudo 708347: OUTPUT«fFOOFOO␤» 13:23
TimToady .uc takes the original $_
[Coke] rakudo: $_ = "foo"; s:g/(o)/{.uc $0}/; .say
p6eval rakudo 708347: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
TimToady two terms in a row 13:24
std: $_ = "foo"; s:g/(o)/{.uc $0}/; .say
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
..modifier loop…
[Coke] rakudo: $_ = "foo"; s:g/(o)/{$0.uc}/; .say
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␤»
[Coke] closerrr.
TimToady star: $_ = "foo"; s/o/{uc $/.Str}/; .say 13:25
p6eval star 2010.07: OUTPUT«fANY()<0X38DB120>o␤»
bbkr spec is so poor in explaining this :( 13:29
TimToady in explaining bugs? :)
bbkr no, in explaining how to use capture in substitution 13:30
TimToady star: $_ = "foo"; s/(o)/$0.uc()/; .say 13:31
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
p6eval star 2010.07: OUTPUT«f(~Any()).uc()o␤»
TimToady star: $_ = "foo"; $_ ~~ s/(o)/(~$0).uc()/; .say
p6eval star 2010.07: OUTPUT«f(~Any()).uc()o␤»
13:33 masonkramer joined
TimToady oops :) 13:33
[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
p6eval star 2010.07: OUTPUT«fANY()<0X7301830>o␤»
TimToady not matching the o for some reason
or the typical rakudo confusion over making $/ avaailable to the rhs 13:35
13:35 vcrini joined 13:36 javs joined, thrn joined
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]/{"␤»
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, meppl joined 13:41 tomaw joined, meppl joined
[particle] star: $_ = 'foo'; .subst(:g, /o/, 'O'); .say 13:42
p6eval star 2010.07: OUTPUT«foo␤»
TimToady .=
[Coke] star: $_ = 'foo'; .subst(:g, /o/, 'O').say
p6eval star 2010.07: OUTPUT«fOO␤»
[particle] oops 13:43
[Coke] Looks like subst is returning-but-not-modifying.
bbkr yep. that works. but I need access to capture result :(
TimToady .subst isn't supposed to modify
.=subst is modify 13:44
[particle] star: $_ = 'foo'; .=subst(:g, /o/, 'O'); .say
p6eval star 2010.07: OUTPUT«fOO␤»
[particle] and it works :), but not for bbkr's use case :(
TimToady it's the $/ scoping problem 13:45
bbkr rakudo: $_ = "foo"; s:g[o] = "O"; .say # checking if this one will modify...
p6eval rakudo 708347: OUTPUT«fOO␤»
bbkr hmm
TimToady star: $_ = 'foo'; my $x; s/(o){$x = $0}/{$x.uc}/; .say 13:48
p6eval star 2010.07: OUTPUT«fOo␤»
TimToady there you go
moritz_ star: $_ = 'foo'; .=subst(:g, /o/, { .uc }); .say 13:51
p6eval star 2010.07: OUTPUT«fOO␤»
moritz_ out-golfed TimToady :-)
star: $_ = 'foo'; .=subst(:g, /o/, *.uc); .say
tadzik different effect :)
TimToady only due to a rakudo bug :P 13:52
p6eval star 2010.07: OUTPUT«fOO␤»
moritz_ now come the excuses
timbunce yeah! I have a working perl5 DBI driver for perl6 DBDI (for some value of working) thanks to blitzkost
moritz_ \\o/
tadzik star: $_ = 'foo'; .=subst(:g, /o/, 'O'); .say
p6eval star 2010.07: OUTPUT«fOO␤»
tadzik ha ha :)
moritz_ timbunce: something to show off for your talk :-)
[particle] timbunce++
moritz_ tadzik: you're cheating - we had that before
tadzik oh
moritz_ you're now on the YAPC screen - say hi :-) 13:53
tadzik hi!
cono \\o/ 13:54
[particle] hello europe!
tadzik yay, I'm on YAPC!
bbkr thanks everyone for help
cono rakudo: "hello".say
p6eval rakudo 708347: OUTPUT«hello␤»
TimToady hello YAPC people !!!
snarkyboojum hello YAPC!
pmichaud moritz_++ lied; no screen now :-P
tadzik oh you! 13:55
TimToady aww
snarkyboojum knew it :P
[particle] damn... just when i'm ready for my close-up
13:55 jaldhar joined 13:56 ambs joined
takadonet hey everyone! 13:56
damn it... 13:57
13:58 plobsing joined
LaVolta www.reddit.com/r/programming/commen..._6/c0vygmo # interesting, strong discussion 14:00
tadzik wow, my propaganda image got to the very top :) 14:02
14:02 ambs joined
tadzik but is it a strong discussion? I see Perl people pacifying Python trolls, but maybe I'm biased :) 14:02
14:02 Axius joined
LaVolta tadzik: I mean the choice of words.... 14:03
tadzik oh, yeah
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
* I'm not really suprised
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
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
tadzik hello Axius
Axius tadzik: hi 14:07
LaVolta yes agreed, I have nothing against them, but some people seem to developed a habit... 14:08
pardon my broken english, you can understand that. 14:09
tadzik yep
they seem to do nothing but bashing Perl all the time
LaVolta that's my point :)
[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
LaVolta tadzik, btw, is that font called DejaVu? 14:11
14:12 pmurias joined
tadzik LaVolta: which one, the code? 14:13
LaVolta yes
tadzik gvim says it's monospace 14:15
PerlJam blah. 14:16
LaVolta okay, thanks :)
14:17 jdv79 joined 14:18 kiffin left 14:25 molaf joined
takadonet .. 14:27
14:36 M_o_C joined
squeeky that's a bit 14:39
14:53 timbunce joined 14:56 uniejo joined
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:56
p6eval rakudo 708347: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 22, near "::t> / # w"␤» 14:57
moritz_ bbkr: currently you can't :( 14:58
bbkr: you can call A.parse(:rule<t>)
+ a string argument
bbkr moritz_: thanks
hmm, where do I pass string to match? A.parse("abc", rule => "t") ? 15:01
pmichaud bbkr: yes.
bbkr awesome, that will do. thanks
15:04 alester joined, wamba left 15:05 wamba joined
bbkr rakudo: grammar A {token t { ^\\d\\d$ }; }; say "OK" if A.parse("22", :rule<t>); 15:05
p6eval rakudo 708347: OUTPUT«OK␤»
bbkr rakudo: grammar A {token t { ^\\d\\d$ }; }; say "OK" if A.parse("22", rule => 't');
p6eval rakudo 708347: OUTPUT«===SORRY!===␤Malformed regex at line 22, near "=> 't');"␤»
bbkr hmm, why the second case do not work? bug?
moritz_ parsing bug, probably 15:06
it commits to parse it as a rule declarator
TimToady std: grammar A {token t { ^\\d\\d$ }; }; say "OK" if A.parse("22", rule => 't');
15:06 ashleydev joined
p6eval std 31912: OUTPUT«ok 00:01 117m␤» 15:06
bbkr reports
dalek kudo: 1270a9c | pmichaud++ | docs/ROADMAP:
Add 'constant' into ROADMAP.
kudo: aa7de66 | pmichaud++ | docs/ROADMAP:
Merge branch 'master' of github.com:rakudo/rakudo
kudo: c716715 | pmichaud++ | src/Perl6/Grammar.pm:
Give an error for smartmatching against 'True' or 'False'.
kudo: 590f3ba | pmichaud++ | src/Perl6/Grammar.pm:
Also warn for use of Bool::True and Bool::False in smartmatch (based on local
kudo: 7e356cc | pmichaud++ | src/Perl6/ (2 files):
Merge branch 'master' of github.com:rakudo/rakudo
kudo: 19931fe | pmichaud++ | README:
Update README with pointer to Rakudo Star distributions.
15:07
moritz_ blogs.perl.org/users/mirod/2010/08/...ssion.html
TiMBuS $P0 = new ['Perl6Scalar'], item\\n setprop $P1, "rw", true #ooh god how did i manage that
15:08 mkt joined 15:10 Juerd left
smash pmichaud: do you have a link for your NQP presentation ? 15:11
moritz_ smash: they are usually on www.pmichaud.com/2010/pres/ somwhere 15:12
15:12 adde joined
mkt someone know about mencoder? 15:12
moritz_ I know something about it; but I don't know the connection to Perl 6 15:13
smash moritz_: found it, thank you 15:15
LaVolta 's sleepy, good nite #perl6 15:17
moritz_ o/
15:18 jam_repl joined, io left 15:19 justatheory joined
alester TimToady: is perlmonks.com/?displaytype=displayc..._id=848629 anywhere stored? 15:19
Want a canonical version to point to.
[Coke] alester: I think it's in pugs.
pmichaud it's in the pugs repo 15:20
actually, it's on perl6.org
[Coke] svn.pugscode.org/pugs/docs/Perl6/Cheatsheet
pmichaud canonical is the perl6.org location
15:20 ash_ joined
pmichaud svn.pugscode.org/pugs/docs/Perl6/Ch...tsheet.txt 15:21
oops
okay, I guess it's the pugs location :-)
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?
the REPL is using the readline library under the covers. 15:23
moritz_ [Coke]: yes, ?foo? is gone (yay) 15:24
[Coke] ah, found my ?regex? in the spec. danke.
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␤»
moritz_ bbkr: new != Build
I'm kinda surprised the call to .new() doesn'T fails 15:27
jam_repl Or - How do I repeat last command in REPL? 15:29
rcfox Press up.
alester I have to say I'm getting more and more interested in the stuff I see going on.
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:30
rakudo: class A { method BUILD (Pair $a) {}; }; A.new(a => ("foo"=>"bar")) # checking... 15:31
p6eval rakudo 708347: ( no output )
bbkr yep, that was it
alester Just to be able to do $sum = [+] @list makes me wet my pants. 15:32
and the .perl method.
jam_repl arrow up? gives me ^[[A 15:33
alester Must not have readline.
[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
jam_repl os X rakudo star install 15:35
pmichaud alester: btw, I came up with a simpler version of is_prime_by_factors
alester ok
pmichaud sub is_prime($n) { !(2..($n.sqrt)).grep( $n %% * ); }
alester yeah, I have that. 15:36
pmichaud okay, good.
I thought about tweeting it :-)
alester wait, no, I don't have the * one
what's $n %% *
pmichaud is $n evenly divided by the candidate factor
15:36 ash_ joined
TimToady same as $n % * == 0 15:36
tadzik pmichaud: www.pmichaud.com/2010/pres/yapceu-r...i.html#end typo in TIMTOWTDI?
pmichaud same as { $n % $_ }
jam_repl so I need to rebuid with libreadline-dev to get correct functionality?
alester It's the * I don't get
pmichaud er, same as { $n %% $_ } 15:37
* in an expression autocurries
alester meaning what
pmichaud so * + $x is the same as { $^a + $x }
i.e., it gets treated as a closure with a parameter
alester ok.
I don't know $^a, but ok
rcfox pmichaud: Couldn't you do something like 2,3,5,7.. ?
pmichaud multiple *'s translate into multiple params
rcfox There's no sense in checking the even numbers. 15:38
pmichaud rcfox: yes, to avoid the evens
alester rcfox: Yes, that's trivial, that's not the point.
rcfox Okay.
pmichaud sub is_prime($n) { !(2, 3, 5 ...($n.sqrt)).grep( $n %% * ); }
rcfox shrugs.
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␤»
tadzik do parametrized modules work?
rcfox rakudo: say ~(2,3,5,7 ... 15);
p6eval rakudo 708347: OUTPUT«2 3 5 7 9 11 13 15␤»
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.
tadzik rcfox: and figures out whether it's an arithmetical or geometrical series
alester but VERY dog slow
rcfox tadzik: Well, 2,3,5 is a different pattern than 3,5,7. 15:41
tadzik rcfox: but it's not a series
jam_repl If I get ^[[A for up arrow... do I need to reinstall with libreadline-dev?
pmichaud jam_repl: likely.
moritz_ jam_repl: yes, and then rebuild rakudo and parrot
tadzik recompile parrot, no?
oh
alester So the way to remove odd canddiates would be 15:42
@candidates = @candidates.grep( * % 2 );
right?
15:42 ambs left
pmichaud or even 15:42
alester or is that shortenable?
pmichaud @candidates .= grep( * % 2 )
moritz_ @candidates.=grep(...)
jam_repl cool thank you
pmichaud but you want * %% 2
if you want to keep the even candidates
jam_repl I'll do that then
alester .= means "gets concatenated"! :-)
moritz_ rakudo: my @can = 1, 2, 3, 4, 5; @can.=grep(* %% 2); say @can.perl
p6eval rakudo 708347: OUTPUT«[2, 4]␤» 15:43
pmichaud in perl 6, .= means "in place"
moritz_ alester: in your universe, maybe :-)
alester I do NOT want the evens.
pmichaud concatenation is ~=
alester pmichaud: I know, I was kidding.
pmichaud alester: you said "remove odd candidates" :-)
alester It's weird to see .= mean something entirely different.
oh, no, I meant remove even, keep odd
tadzik Sorry, we do not support marshaling most things to Perl 5 yet. 15:44
:(
15:46 phenicsl joined
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␤»
timbunce can someone give me commit bits to the zavolaj and blitzkost repros?
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 + *; ..
alester Yes, I understand, rokoteko .
rokoteko alester: okie. just helps me to understand also. been reading through moritz_'s article :)
alester which one? 15:48
rokoteko perl 5 to 6.
alester link? 15:49
rokoteko alester: perlgeek.de/blog-en/perl-5-to-6/
moritz_ or perlgeek.de/en/article/5-to-6 if you want to read them in-order
alester posted to Perlbuzz 15:50
I'm going to be a one-man Perl 6 flamethrower.
moritz_ alester++
pmichaud I think we tend to throw hugs, not flames. :-)
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
hugme: list projects
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
moritz_ sorry, neither are on hugme. You need to ask jnthn++ 15:52
alester regexes can be anonymous, right?
moritz_ yes
pmichaud alester: yes.
timbunce thanks moritz_. jnthn can you add them to hugme (no great rush)?
alester Is this a valid construction then?
my %hash = (
'this' => 'that',
'year' => 2112,
'matcher' => regex { ^ M(r|rs|s) \\s+ (\\w+) \\s+ Wall $ },
);
pmichaud should be okay. 15:53
moritz_ runs fine
say %hash<matcher>.WHAT
Regex()
15:54 mkt joined
alester ok, but it doesn't actually show the regex in .perl 15:54
that's what threw me off.
moritz_ that's because we don't decompile regexes yet
pmichaud we don't have a way to go from code objects to source yet
alester oh, ok 15:55
pmichaud very likely to show up rsn, though.
15:56 mkt_ joined
rcfox Well, once macros are implemented, you could capture the code into a Str when you're creating the regex. 15:56
15:56 ash_ joined
alester I don't approve of this "matches start at $0 now" crap. Gosh darn it. 15:56
rcfox (Also for Blocks.)
alester Twice now I've been bitten but it.
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.
alester OK, I need another example of something that decompiles nicely in .perl
to put in my example.
ash_ moritz_: hi, have you seen try.rakudo.org/shell yet?
tadzik how about an object?
pmichaud currently .perl is a little ugly (more)
alester tadzik: Suggestions of one I don't have to build on my own?
moritz_ ash_: no - looking now
pmichaud and beyond that, I have some real issues with .perl's definition in the spec
rcfox rakudo: say (0.5).perl; 15:58
pmichaud alester: maybe .perl on a Rat?
p6eval rakudo 708347: OUTPUT«1/2␤»
tadzik alester: well, how about a yourself-defined class?
ash_ moritz_: the default page when you go to try.rakudo.org is still the temp page that was up before
but i put the shell there so i can get it working and have comments from the larger public, for now
alester tadzik: I don't want to create a class for this example.
tadzik star: class A { has $.b;}; my $a = A.new; $a.b = 7; say $a.perl
p6eval star 2010.07: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/dvjjLW3_12␤»
tadzik alester: but this is nice :)
alester ok, how do I build a Rat.
rcfox rakudo: say (0.5).perl; # alester, look at me!
tadzik oops
ash_ its very basic, but it works, i think its an alright starting point for now
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
p6eval star 2010.07: OUTPUT«A.new(b => 7)␤»
moritz_ ash_: it's great.
I just wonder why it doesn't autoprint
ash_ there are some bad spots, like any kind of error, i don't handle well yet
moritz_: i am putting all the text you write into a temp file and executing it
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.
ash_ only stuff that comes out of the stdout gets printed
tadzik ash_: wouldn't piping to and from REPL be funnier?
moritz_ why doesn't it use the REPL?
that was the original plan :-)
alester What do I do if I just want 0.5 to be 0.5, not rational?
pmichaud alester: .Num 16:01
ash_ i was having trouble doing that and being able to give it some input from stdin
TimToady 0.5 is a rationanal number
pmichaud or 0.5e0
16:01 risou joined
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:
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␤»
rcfox s/thing/this/
TimToady that should probably be made to dwym
pmichaud rakudo: sub foo(Numeric $a) { }; foo(0.5)
p6eval rakudo 708347: ( no output )
rcfox I realize Rats are different from Nums, but shouldn't it at least try calling .Num()? 16:03
ash_ moritz_: github.com/moritz/try.rakudo.org/bl...try.pl#L58 is how i am running the program, using IPC::Run (from cpan) with a timer,
TimToady rakudo: sub foo($a as Num) {}; foo(0.5)
p6eval rakudo 708347: ( no output )
pmichaud rcfox: type constraints don't coerce
rcfox Hm.
16:03 sundar joined
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
..Herzen …
moritz_ ash_: it's a start :-)
TimToady rakudo: sub foo(Real $a) { say $a}; foo(0.5)
ash_ thats the same text i am using on try.rakudo.org
p6eval rakudo 708347: OUTPUT«0.5␤»
ash_ any suggestions for improvement will be greatly apperciated
gfldex :->
moritz_ we had some cdode that talked to the REPL 16:05
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 :-)
ash_ i save up all the text that you write into the terminal and send the whole thing every time i make a request
making it completely stateless
the browser stores the command history not the server
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_ moritz.faui2k3.org/tmp/caveat.jpg once the slow upload finishes
TiMBuS not sure if its sane or safe though!
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
moritz_ 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
lol
16:08 macroron joined
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, ''; ?
alester twitter.com/perlbuzz/status/20398645820
16:09 mkt joined
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␤»
moritz_ ouch
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.
moritz_ rokoteko: I thought it worked. Weird. 16:11
rokoteko .. so, let's for a while imagine substr() had a fourth parameter. my &f := &substr.assuming('Hello, World'); 16:12
.. 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
moritz_ ash_: there's no way we get around keeping the sessions, if we want it to be good 16:14
ash_: and not worry too mouch about resources for now
16:15 phenicsl joined
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!
rokoteko s/for/anymore/
moritz_ rokoteko: just write a patch for it :-) 16:17
ash_ phenicsl: it has to do with lexical scope, if i am not mistaken
moritz_ phenicsl: 'my' installs the token into the lexical scope
ash_ normal regex's don
t
err 16:18
moritz_ and <&foo> looks into the lexical scope, instead of doing a method lookup, like <foo>
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
rokoteko moritz_: ahh. you have to call .assuming() each time you want to curry one parameter more?
tadzik pb.rbfh.de/16Y8EK4WZRQrw -- is it common?
moritz_ tadzik: I've experienced the same 16:20
rokoteko: sorry, I'm currently to unconcentrated.. ask me again on Sunday, after YAPC and $friends_wedding :(
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
rokoteko star: my &f := &substr.assuming('Hello, World'); &x := &f(0); &z := &f.assuming(0); say &f(1) ~ " " ~ &f(2) ~ "/" ~ &z(1) ~ " " ~ &z(2)
p6eval star 2010.07: OUTPUT«Could not find sub &x␤ in main program body at line 22:/tmp/pxfpLGu_CR␤»
ash_ inside a grammar, yes, for instance: grammar Foo { token ab { ab }; token bar { <ab> } }; would be fine
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! :)
p6eval star 2010.07: OUTPUT«ello, World llo, World/H He␤»
ash_ you were missing some my's
rokoteko ah. not used to strict in irc. thanks. so it definitely seems to work differently. puzzling. 16:23
16:27 bened joined
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_␤»
TiMBuS aa
rakudo: sub z {"foo"~$^a}; my &x := &z(1); &x.WHAT.say 16:28
16:28 jferrero joined
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()␤»
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␤»
ash_ rakudo: sub z {"foo"~$_}; my &x := &z.assuming(1); &x.WHAT.say 16:29
TiMBuS rokoteko, you arent binding &x to &f(0)
p6eval rakudo 708347: OUTPUT«Code()␤»
ash_ TiMBuS: i think you meant .assuming
TiMBuS nope :p
ash_ oh, okay
TiMBuS rokoteko tried it
ash_ i thought you were trying to curry
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)
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␤»
rokoteko TiMBuS: where's my mistake?
ahh... 16:30
TiMBuS my &x := &f(0);
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)
p6eval star 2010.07: OUTPUT«6/6␤»
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 :)
rokoteko star: my &s = * + * + *; my &t := &s(1, 2); my &x1 := &s.assuming(1); my &x2 := &x1(2); say t(3) ~ "/" ~ x2(3)
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␤»
moritz_ bened: BEGIN { @*INC.push('.') }; use localmodule;
tadzik looking at github.com/masak/proto/blob/pls/lib...ls.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
ash_ rakudo: say @*INC;
bened Ah, thanks :)
TimToady or set PERL6LIB, I think
p6eval rakudo 708347: OUTPUT«lib/home/p6eval/.perl6/lib/home/p6eval//p1/lib/parrot/2.6.0-devel/languages/perl6/lib.␤»
ash_ rakudo: say ~@*INC;
p6eval rakudo 708347: OUTPUT«lib /home/p6eval/.perl6/lib /home/p6eval//p1/lib/parrot/2.6.0-devel/languages/perl6/lib .␤»
ash_ i thought it added . to the list already...
rakudo: say ~@*INC[*-1;
p6eval rakudo 708347: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 22␤»
ash_ rakudo: say ~@*INC[*-1];
rokoteko star: my &s = * + * + *; my &t := &s(1, 2); my &x1 := &s.assuming(1); my &x2 := &x1(*); say t(3) ~ "/" ~ x2(3)
p6eval rakudo 708347: OUTPUT«.␤» 16:32
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␤»
TimToady there it be
tadzik couldn't -1 on array just be *-1?
TimToady not and also be a mistake
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
TimToady because sometimes @a[$index] goes negative by mistake
16:34 jaldhar joined
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
ops. s/=/:=/
bened Oh, true, its in @*INC. Ok, different problem: How do I load grammars, I thought I could just use "use".
TimToady a grammar should load just like any other class 16:36
TiMBuS rokoteko, i think that is the case
rokoteko TiMBuS: ok. thank you for explaining. :)
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
bened I get "Unable to find module". 16:38
TimToady what extension are you using? 16:39
bened .pg
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. :)
TimToady try .pm
bened That works, thanks :) 16:40
rokoteko it's just bit broad syntax, I assumed() more compact.
TimToady .pg is a rakudoism for its builtin grammar
bened Ah, ok.
TimToady so probably really NQP
bened It might be nice to separate grammers from other modules in big projects. 16:41
But maybe that must be done by name anyway.
rokoteko star: my &f = "* + * + *"; &f .= assuming($_) for 1..2; say f(3)
p6eval star 2010.07: OUTPUT«Method 'assuming' not found for invocant of class 'Str'␤ in main program body at line 22:/tmp/6edMKyQqQg␤»
TimToady they're just classes, so you can already separate them
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...
rokoteko star: my &f = "* + * + *"; &f := &f.assuming(1); &f := &f.assuming(2); say f(3) 16:42
bened Yeah, I ment by filename.
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
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
TimToady that latter just makes a 0-ary sub
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
TiMBuS it kinda breaks the rules of perl6 ^yeah that
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?
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)␤»
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␤»
rokoteko no luck. :/... ok .assuming() it is then. ;)
pmichaud ...do we still have .pg files in Rakudo?
TimToady unlike in Haskell, you must be explicit about partial binding
pmichaud I thought we'd eliminated all of them.
TimToady bened: see ^^ 16:47
bened pmicaud: I only used the extension because I read it in some old tutorial. So probably not. 16:48
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
TimToady s/. ** {$len}// 16:50
pmichaud bened: that's obviously a bug then --I'll fix it. many thanks for reporting on it!
bened: # file lib/JSON/Tiny/Grammar.pm 16:51
bened: that one?
bened Yeah. My pleasure by the way.
pmichaud bened: now fixed... bened++
it'll be correct in the next edition of the book :)
dalek ok: b47f718 | pmichaud++ | src/grammars.pod:
We no longer use ".pg" for grammar extensions -- change it to ".pm".
16:52
rokoteko TimToady: really? there's no performance difference between using a regex instead of substr() with replacement?
bened Ok :)
TimToady rokoteko: I didn't say that :) 16:53
but I don't think rakudo implements 4-arg substr
pmichaud does the spec define/allow 4-arg substr?
ingy TimToady! o/
rokoteko I learnt today it does not. :) 16:54
16:54 xinming_ joined
ingy is headed off to YAPC::Vancouver 16:54
BooK ingy: there is a YAPC::Vancouver ?
16:54 desertm4x joined
pmichaud yeah, S32 doesn't hint at the existence of 4-arg substr. 16:54
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
BooK ingy: vanpw.org/ is not helpful
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
p6eval rakudo 19931f: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/xAtWvbQFNk␤»
TiMBuS rokoteko, I had the exact same problem. heres what I used: $head = $line.substr(0, $index); $line := $line.substr($index+1);
TimToady well, I note that substr *is* specced as 'is rw'
pmichaud oh 16:57
maybe I didn't notice that part. :)
you're correct, it "is rw"
okay, we can fix that now.
just a useful application of .WHENCE :-)
*another
ash_ pmichaud: i know you have been interested in this: 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
rokoteko TiMBuS: hmm. interesting! 16:58
pmichaud ash_: I tried a version earlier today -- it looked like a good start.
I've tried again various times today and for some reason the wifi here doesn't let me connect
TiMBuS i obviously didnt use := since it didnt work when i first wrote it
TimToady pmichaud: note that it must also support substr() += and suc
h
pmichaud TimToady: that should be okay
should fall out naturally, I think. 16:59
TimToady which is the main reason for preferring that over 4-arg
pmichaud I might even try implementing it tonight after dinner.
17:01 Holy_Cow joined, mkt joined 17:02 risou joined
pmichaud mmmmm, screencast recording of NQP talk worked out well. :) 17:04
[particle] \\o/
pmichaud: did you do it the way we discussed at yapc::na?
pmichaud [particle]: close -- didn't have a webcam image of me speaking 17:05
but it does record the slides and audio
tadzik pmichaud: is it available somewhere?
pmichaud tadzik: I'll have to transcode it into something more compact -- right now it's a raw recording
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)
p6eval star 2010.07: OUTPUT«0␤»
rokoteko is this due lazy evaluation? can you make it eager?
[particle] yeehah, the blue angels have arrived! 17:07
pmichaud oh, actually audio for R* talk might be okay
rokoteko ie. make the first assignment of my &f := * + *; just last..
TimToady [particle]: as long as you're getting doppler shifts downward, they're going to miss you
bened rakudo: say "-" ~~ /<[-._]>/
17:07 pyrimidine joined
p6eval rakudo 19931f: OUTPUT«===SORRY!===␤Unsupported use of - as character range;in Perl 6 please use .. at line 22, near "._]>/"␤» 17:07
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 "._]>/"␤»
bened star: say "-" ~~ /<[\\-._]>/
p6eval star 2010.07: OUTPUT«-␤»
TimToady std: say "-" ~~ /<[-._]>/
p6eval std 31912: OUTPUT«ok 00:01 116m␤»
TimToady std doesn't care when - is first
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␤»
TimToady std: say "-" ~~ /<[._-]>/
p6eval std 31912: OUTPUT«ok 00:01 116m␤»
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:10
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 :)
tadzik "I know you have to think for a while about what I just said"
TimToady I'm glad you asked that; let me say this about that; let me make one thing perfectly clear...
17:12 Trashlord joined
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:12
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
*recorded
the star talk is 721MB, the nqp talk is 657MB
TimToady ==> get-clan-for-dinner()
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?
pmichaud I guess in terms of precedence, it does. :)
ash_: if I can find somewhere to host them, yes.
ash_ neat
takadonet pmichaud: what format are they in?
pmichaud yapc::eu has also been videotaping the speakers, so they may appear that way as well. 17:16
my talks are just laptop screen + audio
(er, my talk videos are just ...)
takadonet: x264 primarily, with pcm audio
17:17 azert0x joined
pmichaud I did full-res captures with lossless/fast compression, knowing that I'd transcode them down a bit later. 17:17
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
can i gist/paste the function somewhere for you? i dont know if its patch-worthy
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:20
TiMBuS gist.github.com/510046 well it seems to pass the standard tests, but it looks pretty scary 17:22
17:22 masak joined
masak oh hai! 17:22
I'm almost over my panic now.
PerlJam greetings 17:23
masak: what panic?
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)
[particle] why a parrot Hash?
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.
pmichaud otherwise you're really binding them instead of creating new ones
TiMBuS but .list makes a copy
pmichaud it isn't require to (more)
TiMBuS or.. hrm. enums still arent copied 17:25
pmichaud and I don't see where .list is being used here.
TiMBuS if its an EnumMap: item = item.'list'()
pmichaud that's not required to make copies or scalars, iiuc 17:26
itz kudos to all perl6 speakers at YAPC! inspiring stuff
pmichaud at any rate, it might end up with values that aren't Perl6Scalar or 'is rw', which is of course important.
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)
pmichaud other than those minor nits, I think this version is very usable (and yes, should be significantly faster for hash creation)
okay, gotta run. bbl 17:28
TiMBuS ok, thanks :)
masak rakudo: sub postfix:<!>($n) { [*] 1..$n }; say (1, 2, 3)>>!
p6eval rakudo 19931f: OUTPUT«===SORRY!===␤Could not find sub &postfix:<!>␤»
masak submits rakudobug
I think I see why that would occur. 17:29
[Coke] OH NOES, alester called it the /official/ cheat sheet. Doom to follow.
masak [Coke]: I realized today, that not only is Yapsi unofficially official, it's also officially unofficially official. 17:30
s/\\,//
alester It's not? 17:32
It's not official?
It's in a repo. That sounds official!
masak rakudo: sub infix:<+++>($a, $b) { ($a + $b) div 2 }; say 10 >>+++<< 14
alester Just like if something is printed in a book, it's accurate!
p6eval rakudo 19931f: OUTPUT«===SORRY!===␤Could not find sub &infix:<+++>␤»
masak alester: officially, it's in a repo.
cotto_work github.com/blog/692-perl-6-on-github
TiMBuS rakudo: our sub infix:<+++>($a, $b) { ($a + $b) div 2 }; say 10 >>+++<< 14 17:33
p6eval rakudo 19931f: OUTPUT«12␤»
masak oh :/
should that be necessary?
I mean, I'm only using the +++ in the current scope.
alester OH NOES EvanCarroll called it the official status
TiMBuS nope. the bug has something to do with the dispatcher not looking in the scope
masak adds TiMBuS' discovery to the ticket. 17:34
17:34 bened left 17:35 jaldhar joined 17:38 pmurias joined
pmurias ruoso: hi 17:38
ruoso: did use v6-alpha support {use v6-alpha;say "perl 6 code here"};print "perl 5 code here\\n"?
17:43 Axius joined
masak perlito should be better known. 17:44
avuserow oh, wow, MiniPerl6 is still kicking around? Awesome. 17:45
17:45 jfried joined
tadzik cotto_work: did You write it? 17:46
cotto_work tadzik: no. I just thought it'd be nice to see some Rakudo love on github's official blog 17:47
17:47 Eevee joined 17:48 rwt joined
masak should .^isa($type) and .^does($type) accept Str values? the spec doesn't say. 17:49
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:51
17:54 Rati joined
Rati Hi there 17:58
Can any one help me get started ..I am totally new here.
PerlJam Rati: sure ... Have you downloaded Rakudo Star? 17:59
masak Rati: welcome!
PerlJam Rati: rakudo.org/how-to-get-rakudo 18:00
(just in case you haven't :)
Rati Thanks PerlJam & masak
I haven't :)
18:00 tylercurtis joined
masak Rati: if you're eager to use Perl 6, you can do it here on the channel :) 18:00
rakudo: say "OH HAI Rati!" 18:01
p6eval rakudo 19931f: OUTPUT«OH HAI Rati!␤»
masak Rati: and there's also try.rakudo.org/shell
18:01 Trashlord joined
PerlJam Rati: and if you have any questions, feel free to ask. 18:02
Rati That's cool :)
tadzik hello Rati :) 18:03
Rati Yes I will, Thanks.
hi tadzik
masak .oO( and if we're being helpful to the point of annoying you, let us know :P ) 18:05
tadzik :D
that's possible, the hapiness around might be overwhelming sometimes :)
Rati I currently have a windows box, is it any easier on a UNIX ? 18:06
PerlJam hugme: hug Rati and tadzik and masak
hugme hugs Rati
Rati :)) That's funny
PerlJam hugme: you need to get a tad smarter
tadzik Rati: it's equally easy I think
Rati :D
masak PerlJam: you need to use non-breaking spaces for that to work :) 18:08
nom &
tadzik horray! 18:09
I present you protominus, a module installed that "just works", except when it doesn't: gist.github.com/510123
more fun and a GH repo on the way
18:14 mkt joined
tadzik star: say "foo >> bar" 18:16
p6eval star 2010.07: OUTPUT«foo >> bar␤»
rokoteko hugs hugme 18:17
tadzik oh you
18:19 Axius joined
Su-Shee shouldn't a simple version of proto better be called neutro? ;) 18:20
tadzik well, it might be :) 18:21
Su-Shee++ # nice idea
[Coke] I find that idea... electric.
PerlJam [Coke]: don't be so negative. 18:22
18:25 perimosocordiae joined 18:26 Italian_Plumber joined
Su-Shee well the idea is free of charge. 18:29
tadzik so is the effect: github.com/tadzik/neutro 18:30
as always, patches/ideas/criticism welcome
Su-Shee you put a new spin on installing perl6 modules!
tadzik you mean a working installer? :)
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:31
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␤»
perimosocordiae tadzik: you use two names: is it neutro or protominus? 18:33
tylercurtis rakudo: my &f = * + * + *; say f(1, 2, 3);
tadzik perimosocordiae: oh, the codename was protominus. Thanks for pointing this out
p6eval rakudo 19931f: OUTPUT«6␤»
tadzik perimosocordiae++
rokoteko tylercurtis: well, that's different. :) but yes.
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␤»
tylercurtis rakudo: my &f = * + * + *; my &g = &f.assuming(1); say g(2, 3);
p6eval rakudo 19931f: OUTPUT«6␤»
tylercurtis rakudo: my &f = * + * + *; my &g = &f.assuming(1); &f = &g; say g(2, 3);
p6eval rakudo 19931f: OUTPUT«maximum recursion depth exceeded␤ in main program body at line 1␤»
tylercurtis Interesting. 18:35
rokoteko rakudo: my &f := * + *; my &g := &f.assuming(3); &f := * - *; say g(3)
p6eval rakudo 19931f: OUTPUT«0␤»
rokoteko .. this makes me wonder if it's even doable.
rakudo: my &f := * + *; my &g := &f.eager.assuming(3); &f := * - *; say g(3) 18:36
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?
rokoteko PerlJam: I dunno. why do I want perl6?
18:37 mkt joined
rokoteko same reason. :) 18:37
Im mainly curious if it's "supposed to" work or not. 18:38
PerlJam makes sense to me :)
tylercurtis rakudo: grammar Foo { token TOP { 'b' } }; say Foo.parse('abc').Bool; # this is right
p6eval rakudo 19931f: OUTPUT«0␤»
tylercurtis rakudo: grammar Foo { token TOP { 'b' } }; say Foo.parse('bc').Bool; # I don't think this is.
p6eval rakudo 19931f: OUTPUT«1␤»
tylercurtis rakudo: grammar Foo { token TOP { 'b' } }; say Foo.parse('ab').Bool; # Also right.
p6eval rakudo 19931f: OUTPUT«0␤»
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
& 16th u can take off
Oh I am sorry !! Wrong windo 18:40
PerlJam heh
Rati PerlJam: I have rakudo/parrot installed 18:41
18:41 tommyd joined
PerlJam Rati: excellent! Now you're ready to play 18:44
Rati yup
PerlJam Rati: See perl6.org for some resources. 18:45
18:47 imarcusthis joined 18:57 kiffin joined 19:01 jfried joined 19:06 cono joined, [particle] joined
tadzik pb.rbfh.de/33F4qYmX1WjSy a bug, isn't it? 19:08
(maybe even a bug I can fix)
19:09 beggars joined 19:10 jaldhar joined
beggars rakudo: say 'x' * 3; 19:15
p6eval rakudo 19931f: OUTPUT«0␤»
[particle] something's not right in this channel... 19:20
19:21 Axius_ joined, [particle] left
kiffin > say 'x' * 3; 19:21
0
>
that doesn't seem right 19:22
would expect 'xxx'
tadzik star: say "x" * 3
p6eval star 2010.07: OUTPUT«0␤»
kiffin how do i get perl6 to backtrack history with up-key? 19:23
instead of ^[[A
tadzik do you have readline installed?
rokoteko star: say 'x' xx 3
p6eval star 2010.07: OUTPUT«xxx␤»
kiffin how can i tell?
tadzik what OS do You use?
kiffin linux/ubuntu 10.04 19:24
same probs with cpan
tadzik you probably nead something like readline5-dev 19:25
libreadline5-dev
iirc
kiffin cpan Term::ReadLine ?
tadzik not from CPAN
kiffin sudo get-apt install?
and then it just works 19:26
tadzik should be
kiffin is there an equivalent Devel::REPL for perl6?
beggars star: say for 1..2 { say "$_ x *"; };
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "say for 1."␤»
tadzik rebuilding parrot will probably be required
kiffin: yep, the REPL :)
beggars star: for 1..2 { say "$_ x *"; }; 19:27
p6eval star 2010.07: OUTPUT«1 x *␤2 x *␤»
beggars star: for 1..2 { say " { $_ x '*' } ; }
tylercurtis rakudo: say ('x' xx 3).WHAT 19:28
rakudo: say ('x' x 3).WHAT
p6eval star 2010.07: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
rakudo 19931f: OUTPUT«List()␤»
rakudo 19931f: OUTPUT«Str()␤»
tylercurtis rokoteko: ^^ I think you mean 'x' x 3.
rokoteko tylercurtis: 22:22 < kiffin> would expect 'xxx'
tylercurtis: not really.
kiffin installed readline5-dev, now what? 19:29
tylercurtis rokoteko: 'x' xx 3 is 'x', 'x', 'x'. 'x' x 3 is 'xxx'
tadzik kiffin: see if it works. If not, rebuild Parrot. If still not, rebuild Rakudo too
rokoteko rakudo: say ('x' xx 3).perl 19:30
p6eval rakudo 19931f: OUTPUT«("x", "x", "x")␤»
kiffin cpan? 19:31
tadzik what cpan?
kiffin i have to rebuild everything?
rokoteko tylercurtis: ah brilliant. :) thank you. perl6 isnt as much different from perl5. the usage of bots on the channel surprise me more. ;)
tadzik no, just Parrot and Rakudo :)
kiffin rebuild cpan also?
tadzik (I think)
no, cpan has nothing to do here
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
develop.github.com/p/repo.html
tylercurtis perimosocordiae: but github search(at least from their website) is kinda lackluster sometimes.
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)
so I'll probably make my own plaitext db, like miyagawa did with cpanminus :)
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(')
…but run('make') was failing
yet when I entered the tmp dir and tried 'make', it worked 19:35
kiffin apt-get install libterm-readline-gnu-perl
now it works
tadzik oh
rokoteko where are the ops like := and .= documented?
kiffin perl6 not, will rebuild? 19:36
tadzik so it works or not?
tylercurtis rokoteko: .= is just the assignment(=) meta-op with the "." op(method call).
rokoteko: S03 is the part of the spec that deals with ops. 19:37
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?
kiffin doesn't work
tadzik perimosocordiae: yep 19:39
perimosocordiae: strange, isn't it?
perimosocordiae very
tylercurtis kiffin: you installed libreadline5-dev? and reconfigured and rebuilt Parrot?
tadzik perimosocordiae: moreover, it did 'make'. It even did 'run("make")'
19:39 Holy_Cow joined
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')?
tadzik tylercurtis: yep 19:40
kiffin i'll rebuild parrot now, thx
19:40 kiffin left
tadzik tylercurtis: I can make a branch with inline ufo so you can try yourself 19:40
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. :)
tadzik oh, ok :)
beggars star: say "^_^" x 3;
p6eval star 2010.07: OUTPUT«^_^^_^^_^␤»
beggars star: say 3 x "^_^" ;
p6eval star 2010.07: OUTPUT«␤»
beggars what's the difference, why the latter didn't work? 19:42
tadzik it tries to write "3" ^_^ times I guess
star: say 3 x "5"
p6eval star 2010.07: OUTPUT«33333␤»
tadzik yep
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".
tadzik perimosocordiae: a'right
19:46 ashleydev joined
tadzik perimosocordiae: github.com/tadzik/neutro/tree/inline-ufo maybe it will work for you, or something 19:50
there is a check if Makefile is really a present file
perimosocordiae tadzik: so it dies at run 'make'; ? 19:52
tadzik perimosocordiae: yep 19:53
perimosocordiae: see for yourself
when you enter the tmpdir after that and run 'make', it works
even when you do perl6 -e 'run "make"', it works
now what if…
no, when I put run 'perl6 -e "run \\'make\\'"' it doesn't work either 19:55
sorear good * #perl6
tadzik sorear: o/
ash_ can you access the repr from within normal perl6? 19:58
[Coke] where is the try source? 19:59
tadzik ash_: the repr?
ash_ err, i meant repl 20:00
the eval loop you get into if you start perl6 without a file
tadzik yep
everything works but this damn run 'make'. And from this single damn script
[Coke] hugme: try? 20:01
hugme: list
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
tylercurtis hugme: show try.rakudo.org
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: github.com/moritz/try.rakudo.org/
tylercurtis [Coke]: ^^
tadzik oh, this try 20:03
20:03 _macdaddy joined
[Coke] IWBNI hugme responded to private requests for help. =-) 20:03
perimosocordiae tadzik: what git url are you testing with? 20:04
tadzik perimosocordiae: git://github.com/tadzik/perl6-Acme-Meow.git
does it work for some other?
[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.
perimosocordiae tadzik: I was just having a hard time finding something that needed a makefile generated, lol
tadzik :) 20:06
oh true, some things don't
but ufo can install everything I think 20:07
perimosocordiae it gave me a "no /lib found, nothing to do" and exited
ash_ [Coke]: try/shell?
tadzik perimosocordiae: oh
perimosocordiae: what when you enter that dir and 'make'?
perimosocordiae tadzik: of the no /lib one, or the url you gave me? 20:08
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
tadzik strange, no?
But funny that you have the different effect 20:10
perimosocordiae I'm getting "make: *** No targets. Stop." from the script
tadzik oh
so where did you got "no /lib found, nothing to do"?
perimosocordiae neutro github.com/tadzik/neutro.git :-)
tadzik oh, right :)
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
perimosocordiae yeah, but this is just too weird 20:12
tadzik like a bug, but where damnit?
perimosocordiae I tried: $res = run 'make -f Makefile'; but that didn't work either
tadzik I even tried run "make -f {cwd}/Makefile" 20:13
20:14 Holy_Cow joined
perimosocordiae aha! I tried run "make all" 20:15
tadzik and?
perimosocordiae and it gave: make: *** No rule to make target `all'. Stop.
tadzik I did too
yeah, so like a broken makefile, isn't it?
I tried run 'strace makefile', and it looked like read() gives make an empty file
I guess I'll end up generating a tasklist in Perl 6, like ufo does, and executing them, like make does 20:17
cleaner and cross-platform
perimosocordiae sucess 20:18
success*
tadzik how?
perimosocordiae $makefile.close(); :-D
tadzik oh come on
really?
perimosocordiae happens to the best of us 20:19
tadzik well, ufo is standalone, so it doesn't bother closing
perimosocordiae++
perimosocordiae it'd be nice if the handle got closed when it went out of scope
tadzik yep 20:20
tylercurtis LEAVE { $makefile.close; } # if this we implemented. :) 20:21
s/we/were/
tadzik perimosocordiae: there did You put this?
'Makefile'.IO.close doesnt work for m
perimosocordiae the last line of makemakefile 20:22
134 20:23
tadzik an ufo patch
a'right, works
fixed-faxed 20:24
[Coke] ash_: yes. specifically the /shell page, which is the interesting one.
perimosocordiae tylercurtis: woo perl6 :-)
ash_ ya, i wrote that, so... you don't like that i used an html5 doctype?
pmichaud good evening, #perl6 20:25
[Coke] ash_: there is no doctype.
tadzik godd evening pmichaud
[Coke] not that I can see.
ash_ <!DOCTYPE html> shows up for me...
[Coke] ash_: ah, then yes, apparently my tools have a problem with html5 doctypes. 20:26
nevermind.
ash_ i can switch to an html4 doctype, i don't mind 20:27
20:27 smash joined
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.
seems crazy to leave the version # out, but that's a discussion for another channel.
ash_ ya, i know the feeling
[Coke] phenny: tell moritz nevermind.
phenny [Coke]: I'll pass that on when moritz is around.
ash_ but hey, i dont' set that standard 20:28
20:28 javs joined
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? :)
ash_ [Coke]: github.com/moritz/try.rakudo.org/bl...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:29
pmichaud: is it possible to access the code the repl uses from within perl6? 20:30
tylercurtis rcfox: who would ever need anything more than machine language? :) 20:31
[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
[Coke] (and I have many other things on my plate, so don't downgrade it on my account.)
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
so, really, i am not using much that is html5 specific right now, and those 2 places could easily be changed
pmichaud ash_: Perl6::Compiler.interactive() 20:37
(I think)
ash_ ooo, sweet, i'll try it out
pmichaud yes, that seems to work.
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
20:39 orafu joined
[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
validator *plugin
pmichaud ash_: I might be able to refactor the .interactive() mode a bit to make it easier to do a repl via web script
ash_ [Coke]: is it firebug?
pmichaud i.e., factor out the part that executes a command and retains the lexical information
[Coke] ash_: no, "html validator". 20:41
20:41 cousteau joined, cousteau left
[Coke] users.skynet.be/mgueury/mozilla/ 20:42
ash_ [Coke]: i'll check into it, thanks
validator.w3.org says its alright so far, it just says using html5 is considered experimental 20:43
github.com/blog/692-perl-6-on-github wow
i am sure i am not the first to see it, but thats cool 20:44
tadzik it's nice they care :)
Rubyists > Pythonists
20:44 Guest94224 joined
[Coke] ash_: I know moritz_ has issues with using google analytics, btw. 20:46
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
[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.)
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: pb.rbfh.de/9aOUJokIpzP4 is this a bug?
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
ash_ [Coke]: ya, that validator doesn't seem to like any html5 tags, as far as i can tell 20:50
validator.w3.org/check?uri=http://t...mp;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
pmichaud tadzik: looks like it could be a bug, yes. I'd have to check the spec. 20:51
20:56 jaldhar joined
tadzik pmichaud: well, something definitely isn't working 20:57
ash_ [Coke]: it should be fine now, i just switch to an html 4 strict doctype 20:58
21:01 masak joined
masak ahoy! 21:01
pmichaud ahoy, masak!
How goes the panicism?
masak I feel oddly serene at the moment.
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?
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: use.perl.org/comments.pl?sid=45016&cid=72244
and shouldn't it be '.interact()' ? :) 21:04
pmichaud ash_: it's in nqp-rx, in HLL::Copmiler 21:05
*HLL::Compiler
ash_ k
i'll look in there
pmichaud github.com/perl6/nqp-rx/blob/master...ler.pm#L90 21:06
ash_ does it have to use stdin? 21:07
or could i pass a file handler?
rakudo: class Foo::Bar {}; say Foo::Bar.new.perl; # Oh, btw is that ; correct? 21:08
p6eval rakudo 19931f: OUTPUT«Foo;Bar.new()␤»
masak no :/
tadzik rakudo: class Foo::Bar {}; say Foo;Bar.new.perl;
masak submits rakudobug
p6eval rakudo 19931f: OUTPUT«Could not find sub &Foo␤ in main program body at line 22:/tmp/lbpALcO1Zw␤» 21:09
tadzik :)
ash_ rakudo: my $a = class { has $a; }; say $a.new(a => 1).perl; # that looks funny too...
p6eval rakudo 19931f: OUTPUT«.new(a => 1)␤»
ash_ but i have no idea what is "right", just looks funny... 21:10
masak submits rakudobug
tadzik :)
masak ash_++
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. :)
pmichaud rakudo: my $a = class { has $a; }; say $a.perl;
masak right, jnthn? right, pmichaud?
p6eval rakudo 19931f: OUTPUT«␤»
masak guys? :)
pmichaud I like easy two. I could go both ways on that.
*too
ash_ rakudo: say {; }; # it gets a nice name (well, nice as it can get) 21:12
p6eval rakudo 19931f: OUTPUT«_block113␤»
masak pmichaud: :)
it's great that try.rakudo.org/shell works, and is retweeted. 21:15
if you ask me, it kinda sucks that try.rakudo.org/ shows an 'under construction' notice. 21:16
ash_ i did that on purpose
masak oh?
ash_ since there are so many problems with the shell still
masak ash_: what are those problems?
ash_ i can fix that, but i didn't think the shell was ready to be 'live'
masak it's live now
whether you like it or not.
ash_ well, easily available 21:17
masak and you can't kill the old URL now :)
tadzik help and chapters e.g.
masak but I'd make the shorter URL available too if I were you.
(which I'm not, last I checked)
ash_ well, when it goes live it will just be /
pmichaud where is .IO specced? 21:18
as in 'file'.IO ?
21:18 cognominal joined
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.
pmichaud so it's either a specbug or a rakudobug or both.
masak ash_: that's why I'm suggesting enabling the short URL.
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
masak or 'beta' 21:20
pmichaud something that indicates "not quite ready yet"
21:20 pragma_ joined
masak 'Usable and useful' :P 21:20
pmichaud well, I'm not sure that label applies here.
21:21 leprevost joined
ash_ alright, i switched them, /shell redirects to / 21:21
i'll add a "This is beta" something on the page too
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
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 :-\\
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"
ash_ it doesn't handle a lot of situations gracefully, like errors
masak neither does the REPL...
(and we released that)
pmichaud yes, but the REPL handles quite a bit more than the shell does
(at least the shell as it exists now) 21:24
masak oh, ok; haven't used the shell much.
ash_ oh well, i'll try to get these changes to be shell done asap
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
the repl doesn't do that (on purpose)
masak \\o/
pmichaud: ever-nesting scopes?
pmichaud masak: yes.
masak cool.
pmichaud well, ever-nesting in concept
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
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
do, say rand;
it messes everything up
pmichaud or, if I do
my $a = rand;
masak pmichaud: how is that not 'completely nest'-ing?
pmichaud say $a;
21:27 hercynium joined
pmichaud then I get different results. 21:27
ash_ ya, i am trying to fix that right now
masak pmichaud: o.O
pmichaud: I don't see why.
pmichaud masak: in the shell
ash_ the shell is dumb about sessions, thats why :-(
pmichaud masak: not in the repl
masak oh phew
pmichaud that's one of the reasons I'm not enamored of the shell atm.
ash_ its re-evaling the $a, each time
pmichaud the repl works, the shell doesn't quite work
ash_ err, the rand
masak the shell re-runs everything?
pmichaud yes
masak :(
pmichaud from the top
masak :( :( :(
ash_ ya, it was to keep things small, and stateless
masak that's the way *not* to do it. :( 21:28
ash_ but thats not going to work now, so ya
pmichaud who tweeted the original message about the shell?
(not assigning blame, just curious about source)
masak if you do it that way, what's actually the non-trivial part of doing it?
pmichaud: might've been Su-Shee, don't remember.
pmichaud okay.
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
masak oh, it was probably sri then.
pmichaud perhaps we should put a message on that page that says "sorry, try.rakudo.org isn't ready for public testing yet"
tadzik and invitations! :P
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
21:30 hacktor joined
ash_ i am fine with either solution 21:30
21:30 perimosocordiae left
tylercurtis +1 to enormous disclaimer. 21:30
ash_ i feel bad about it now, i was just trying to get the thing working correctly :-\\
masak +1 huge disclaimer
people obviously want to play with it. 21:31
since it works partially, let them.
and it'll be a better motivation for doing it Right(TM) sooner. :)
pmichaud sometimes "partially works" is worse than "not available", but I'll defer to a consensus opinion.
(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
anyway, I'll defer to majority. :)
masak fair points. 21:33
pmichaud rakudo: my @slides = 42 xx 5; say 1..@slides; 21:34
p6eval rakudo 19931f: OUTPUT«1234␤»
moritz_ back
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.
pmichaud ...why is that a bug?
oh, should be 5?
hmmmm
no, wait
...why is that a bug?
tylercurtis rakudo: my @slides = 42 xx 5; say +@slides; 21:35
p6eval rakudo 19931f: OUTPUT«5␤»
moritz_ hugme: add coke to try.rakudo.org
hugme hugs coke. Welcome to try.rakudo.org!
ash_ moritz_: i fixed that btw
pmichaud rakudo: say 1..(42, 42, 42);
p6eval rakudo 19931f: OUTPUT«1234␤»
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)"␤»
pmichaud rakudo: say 4 before (42, 42, 42)
p6eval rakudo 19931f: OUTPUT«1␤»
tylercurtis rakudo: my @slides = 42 xx 5; say +@slides; say (1..5).perl; say (1..+@slides).perl; say (1..@slides).perl;
p6eval rakudo 19931f: OUTPUT«5␤1..5␤1..5␤1..[42, 42, 42, 42, 42]␤»
moritz_ ash_++
[Coke] got his commit bit anyway :-)
pmichaud there is nothing in the current spec to indicate that the end of a Range should be numified.
(unless the spec changed recently) 21:37
moritz_ -> sleep
ash_ moritz_: do you have a sec before you go to sleep ?
tylercurtis rakudo: my @slides = 42 xx 5; say (^@slides).perl;
p6eval rakudo 19931f: OUTPUT«0..^5␤»
pmichaud oh, it changed recently, I guess.
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
frankly, I don't see why it shouldn't.
pmichaud masak: '0'..@array 21:39
21:39 leprevost joined
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
it just used .succ and before/after semantics
I'm almost okay with the new one
masak I think we should favour Int and Num a lot, since those are the commonest ones. 21:40
pmichaud the new spec says:
S03: " It is specifically illegal to
use anything that does C<Iterable> as implicitly numeric:
0 ..^ 10 # 0 .. 9 0 .. ^10 # ERROR
(line wrap fail)
anyway, it claims that 0 .. ^10 fails because ^10 is Iterable.
masak waitwait
pmichaud but by that reasoning, 0 .. @array should fail also, because arrays and lists are Iterable.
masak 0 ..^ 10 or 0 .. ^10 ? 21:41
those are diff'rent.
pmichaud 0 ..^ 10 is legal, definitely
masak oh, line wrap fail.
I see now.
pmichaud 0 .. ^10 is claimed to be illegal, because ^10 is Iterable
but @array is also Iterable
masak meh
pmichaud so it can't be "Iterable" that forces a failure.
masak I'm going on strike over that one.
it's silly.
I'm numifying arrays all the time.
especially at the rhs of ranges. 21:42
it's darn convenient.
pmichaud the spec does say that "for any other type, it automatically numifies"
...but I don't see how array gets excluded from Iterable
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
but in that case I think we should explicitly exclude Range, not Iterable
masak it's perfectly clear to me what 0 .. ^10 does :)
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?
masak I don't think it should be a criminal compiler offense, just a warning.
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.
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
what if i modified the settings file?
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
tadzik o/
21:54 xinming joined 21:55 jaldhar joined
[Coke] moritz_: thanks for the bit. 21:56
masak: changed "guys" to "folks", though I am not a huge fan of doing so. 21:57
masak [Coke]: ok; thanks.
[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
'night, #perl6
leprevost hello all 22:00
22:00 hacktor left
pmichaud decides the "Range code is broken" itch is too big to ignore any longer. 22:12
[Coke] pmichaud: nooooooo--- oh, wait, nevermind, go ahead. =-) 22:26
pmichaud rakudo: say Int ~~ Rat 22:27
p6eval rakudo 19931f: OUTPUT«0␤»
pmichaud rakudo: say Num ~~ Int
p6eval rakudo 19931f: OUTPUT«0␤»
pmichaud rakudo: say Int ~~ Num;
p6eval rakudo 19931f: OUTPUT«0␤»
sjohnson rakudo: say Int ~~ Int 22:47
p6eval rakudo 19931f: OUTPUT«1␤»
sjohnson ( `ー´)
tadzik there is mkdir(), chdir(), unlink(). Is there anything like cp? 22:48
pmichaud say Num ~~ Real; 22:51
rakudo: say Num ~~ Real;
p6eval rakudo 19931f: OUTPUT«1␤»
pmichaud rakudo: say Num ~~ Real, Rat ~~ Real, Int ~~ Real;
p6eval rakudo 19931f: OUTPUT«111␤»
sjohnson tadzik: good question 22:54
pmichaud afk # sleep
sjohnson system('cp', $source, $dest); is the usual way i did it. never found an equiv for perl
22:55 simcop2387 joined
sjohnson <insert sad face emot here> 22:55
tadzik this is runing neutro's portability! :(
Tene mkdir, chdir, unlink, etc. are system calls. There is no system call for copying.
tadzik mhm 22:56
time for File::Copy then?
Tene you have to just open both files, and then loop on read/write.
yeah, pretty much
tadzik updates TODO
but neutro can't have deps anyway :/
23:00 _macdaddy joined 23:04 ruoso joined 23:06 xinming joined
sjohnson just use my example instead of relying on a 3rd party module...? 23:10
maybe you want File::Copy for good portability tho
tadzik Your example? 23:13
oh, system? Well, my point is portability 23:14
ta-dah! -- github.com/tadzik/neutro (in case You haven't heard) 23:15
sjohnson yeah forgot about the portability thing. oopsies 23:17
23:19 am0c joined 23:28 masonkramer joined 23:29 Alias joined
sorear good * #perl6 23:36
niecza:
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…
dalek ecza: 7f2dff1 | sorear++ | STD_REVISION:
Update STD for settings fix
23:54
niecza: 9d71c44 | sorear++ | Niecza.proj:
niecza: Add a MSBuild .proj file, due to replace the Makefile
23:54 dalek joined
sorear (12 more commits) 23:55
23:57 thowe joined 23:59 Psyche^ joined