»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
jnthn gets some sleep 00:07
araujo extended a bit the 'if' syntax 00:13
ideone.com/YOeOv
dalek rixel: 31dbdf2 | diakopter++ | sprixel/ (15 files):
yet another near-total refactoring of the codegen. cleaner, maybe.
00:56
dalek osystem: be4a098 | novus++ | projects.list:
Re-added ww6 as it sorta works now.
02:20
Plankton is there any web forum software written in Perl6 yet? 03:49
Wow! I see why everyone uses these chat rooms ... wealth of information! 03:51
tylercurtis Plankton: I'm not aware of anything like that. One problem is that the existing Perl 6 implementations are still quite slow. 03:54
Plankton bummer 03:55
tylercurtis On the other hand, it could certainly be done. masak and someone(I don't remember who) did write a wiki in Perl 6, and that was when Rakudo was much much slower than it is now. 03:56
sorear Carl Masak (497), Ilya Belikin (345), Johan Viklund (136) 04:00
are the 3-digit club from git shorlog
+t
Plankton I read something about the perl6 wiki and that it is good from mostly static content 04:12
tylercurtis std: [:foo<bar>] 1, 2, 3 04:13
p6eval std 237d266: OUTPUT«ok 00:01 117m␤»
Plankton I guess I really don't understand that very well
tylercurtis What does that (or, rather, the general case of a colon pair as the operator in an infix meta-op) mean? 04:14
Plankton why is the existing Perl 6 implementation so slow ... and how could anything be so possibly slow ... I mean one could convieably write a wiki in bash or borne shell 04:17
conceivably
you just need to spit out text / html 04:18
sorear I've got a Perl 6 implementation here with a grammar engine about 40 times faster than Rakudo 04:19
but addition isn't quite there yet
:(
Plankton is perl 5 easy to translate into perl 6? 04:23
tylercurtis sorear: what does the <colonpair> alternative in infixish in STD::P6 mean? 04:26
sorear tylercurtis: Adverbs. 04:30
niecza: sub infix:<foo>($a, $b, :$c) { say "a=$a b=$b c=$c" }; 3 foo 4 :c<5>
p6eval niecza 2be14a1: OUTPUT«a=3 b=4 c=5␤» 04:31
sorear the colonpair is in infixish context
tylercurtis Oh, right. I forgot about the calls to infixish in EXPR. 04:32
sorear: thanks.
sorear this is how %foo<bar> :delete works 04:33
TiMBuS rakudo: say 2,4,8 ... 50 05:07
p6eval rakudo 7c74c0: 05:08
..OUTPUT«(timeout)128256512102420484096819216384327686553613107226214452428810485762097152419430483886081677721633554432671088641342177282684354565368709121073741824214748364842949672968589934592171798691843435973836868719476736137438953472274877906944549755813888109951162777621990232555524…
TiMBuS :/
tylercurtis rakudo: say 2, 4, 8, .. * > 50 05:17
p6eval rakudo 7c74c0: OUTPUT«No applicable candidates found to dispatch to for 'infix:<..>'. Available candidates are:␤:(Any $min, Any $max)␤␤ in main program body at line 22:/tmp/BsuvhaT8Va␤»
tylercurtis rakudo: say 2, 4, 8, ... * > 50 05:18
p6eval rakudo 7c74c0: OUTPUT«===SORRY!===␤Comma found before apparent series operator; please remove comma (or put parens␤ around the ... listop, or use 'fail' instead of ...) at line 22, near " ... * > 5"␤»
tylercurtis rakudo: say 2, 4, 8 ... * > 50
p6eval rakudo 7c74c0: OUTPUT«248163264␤»
sorear tylercurtis: How was alpha slower? 05:19
tylercurtis sorear: I don't really know if it was. I assumed that, given how much Rakudo has sped up in the time that I have been paying attention to Perl 6, it is probably faster now than it was then. Was alpha so much faster than ng that Rakudo master now isn't faster than alpha was? 05:24
sorear tylercurtis: alpha was simpler in enough ways that matter that I wouldn't jump to that conclusion 05:26
but I wasn't around then and I don't have any actual data
better to ask one of the old timers
tylercurtis sorear: Very unscientific benchmarking of a simple looping sum of 1 to 10000 program indicates that alpha may indeed be faster than current master for at least some programs. 05:34
sorear subroutine calls in niecza are much, much, much faster than I thought 05:36
benchmarking using a sub a() {}; sub b() { a; a }; sub c() { b; b } ... ladder gives 2^25-1 call/return pairs in 18.737 sec, for 558 ns each 05:37
time to destroy that number.
perl5 12.0 gets 1240 ns on the same hardware 05:39
diakopter++ # for those not in the know, I stole my subroutine call implementation from him 05:40
tylercurtis sorear: ooc, how do niecza and perl 5 compare for subroutine calls with arguments? 05:42
sorear How many and what kinds? 05:48
tylercurtis sorear: Actually, on further thought, you probably shouldn't indulge my curiosity on that. Without considering slurpy parameters or using more than one argument of a given type, there's at least 6 different scenarios I'd be curious about. 06:00
diakopter sorear: how many .net function calls does each p6 function call use 06:13
tylercurtis Good night, #perl6. 06:23
diakopter sorear: perlesque function calls use 6 or 7 function calls (many of which are likely inlined by the x86 JIT in .NET/mono b/c they're so small), so it ends up being about 3 indirect jumps 06:26
I'd guesstimate.
sorear diakopter: &foo()... 07:29
1. Variable::Fetch() on the &foo object 2. IP6::Invoke() on that 3. call IP6::GetMO() and fetch the on_invoke field 4. delegate call to the InvokeHandler 5. Frame::.ctor and return to trampoline 6. trampoline makes delegate call to our sub 07:31
7. sub returns th.caller, trampoline makes delegate call to caller 07:32
sorear up to 675 ns. (I found a less damaging way) 08:25
dalek ecza/master: 4b870fa | sorear++ | / (9 files):
Use a uniform representation for CgOp
08:26
ecza/master: f7e8ef5 | sorear++ | perf/callmark.pl:
Add a function call benchmark
ecza/master: 0abde70 | sorear++ | / (3 files):
Implement excess argument detection
tadzik sorear: impressive 08:49
tadzik niecza: my %a = foo => 'bar'; say %a<foo> 09:08
p6eval niecza 0abde70: OUTPUT«Unhandled exception: assigning to readonly value␤ at line 227␤ at line 1␤ at line 706␤ at line 706␤ at line 706␤ at line 0␤"mono" unexpectedly returned exit value 1 at (eval 773) line 13␤ at niecza_eval line 71␤»
sorear odd failure 09:08
tadzik test.pl made me curious about the hashes 09:10
sorear I don't have Hash.LISTASSIGN 09:11
that should have been an unknown method error
sjohnson hi! 09:24
sorear HI!
tadzik hi! 09:31
sorear has cut sub call time in half, but things are still crashing a bit 10:16
satyavvd my $pi is constant = 3.14159; 10:18
giving error
moritz_ hello satyavvd 10:19
tadzik perl6.org down?
moritz_ fwiw, pi is predefined
sorear correct syntax is constant $pi = 3.14159 anyway
satyavvd oh ok.. 10:20
moritz_ but probably not yet implemented in Rakudo
rakudo: say pi
p6eval rakudo 7c74c0: OUTPUT«3.14159265358979␤»
satyavvd yes .. my constant $p=3.1; 10:21
got ..Constant type declarator not yet implemented at line 1, near "=3.1;\n"
moritz_ now that's a pretty good error message, isn't it?
satyavvd yeah agree..
dalek ecza/master: ee1b582 | sorear++ | / (3 files):
Implement the pad cache

Frames are now kept on a number of auxilliary doubly-linked lists. In each list, frames can be reused after they return, because the lists are kept monotonic by call depth. When the call stack needs to change shape away from a stack, for closures and gather/take, a new list is created and the relevant frames are relinked. +30% speedup on the call benchmark.
10:54
mberends sorear++ 10:59
satyavvd if(1==1) {say "Matched"} is working but not if(1==1){say "Matched"} space matters? 11:24
tadzik there has to be whitespace before { 11:25
moritz_ rakudo: if 1 == 1 { say "Matched" } # no parens needed at all 11:50
p6eval rakudo 7c74c0: OUTPUT«Matched␤»
moritz_ std: if(1==1) {say "Matched"} 11:51
p6eval std 237d266: OUTPUT«===SORRY!===␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens at /tmp/SBi5NhgBSI line 1:␤------> if⏏(1==1) {say "Matched"}␤Unexpected block in infix position (two terms in a row) at /tmp/SBi5NhgBSI line
..1:␤-…
nymacro tadzik, bitbucket.org/nymacro/h/src/tip/bjgolfmin.p6 15:26
I got it down to 402 ;)
tadzik :) 15:28
moritz_ .reduce(*+*) 16:29
that looks like it could be replaced by a prefix [+] 16:30
rakudo: say (1, 2, 3).sum
p6eval rakudo 7c74c0: OUTPUT«Method 'sum' not found for invocant of class 'Parcel'␤ in main program body at line 22:/tmp/ug7ol8nJFa␤» 16:30
moritz_ rakudo: say [+] 1, 2, 3
p6eval rakudo 7c74c0: OUTPUT«6␤»
moritz_ $_.grep can be written as .grep instead
tadzik is crond on feather supposed to mail you the errors? 16:55
moritz_ yes 16:56
but the mail forwarding is probably broken
tadzik bah
1 0 * * * smoker.pl | perl ~/sergenerator.pl > $(echo ~/emmentaler/views/`date +"%d-%m-%y"`.tt)
↑ does this cronjob look right to you?
No mail for tjs -- yet it haven't run even once 16:57
I was hoping it'd run a minute after midnight everyday
moritz_ probably a problem with $PATH 16:58
where is smoker.pl?
better use a full qualified path to it
tadzik /home/tjs/.perl6/bin
hmm, can try
moritz_ that's not in the default $PATH
and cron uses the default system PATH
and ignores any changes you make in your .bashrc 16:59
tadzik ah, I see
well it's in .profile, but I see the point
ash_ try.rakudo.org is back up, btw 17:20
std: class A {has $.a = $^b + 1;has $.b = $^a }; say A.new(1,2).a 17:22
p6eval std 237d266: OUTPUT«===SORRY!===␤Placeholder variable $^b may not be used here because the surrounding package block takes no signature at /tmp/Fx9q_bkcz8 line 1:␤------> class A {has $.a = $^b⏏ + 1;has $.b = $^a }; say A.new(1,2).a␤Placeholder variable $^a may
..not…
ash_ rakudo: orelse 17:38
p6eval rakudo 7c74c0: OUTPUT«Could not find sub &orelse␤ in main program body at line 22:/tmp/AHPeVSAbww␤»
ash_ rakudo: say 1 // 3 17:39
p6eval rakudo 7c74c0: OUTPUT«1␤»
ash_ rakudo: say 1 orelse 3;
p6eval rakudo 7c74c0: OUTPUT«===SORRY!===␤Confused at line 22, near "say 1 orel"␤»
ash_ std: say 1 orelse 2;
p6eval std 237d266: OUTPUT«ok 00:02 116m␤»
tadzik oh
moritz_ orelse and andthen are NYI
ash_ ah, got ya
just curious 17:40
looking at the perl6 bug's list in the bug tracker, some of them are closable, like #50118
tadzik what are they?
moritz_ shouldn't be too hard (implement orelse)
tadzik I just thought about it
ash_ tadzik: perlcabal.org/syn/S03.html#Loose_or_precedence talks about them 17:41
rakudo: my @array = 1, 2, 3; say @array.min:{ $^a <=> $^b } 17:42
p6eval rakudo 7c74c0: OUTPUT«Method 'min:{ $^a <=> $^b }' not found for invocant of class 'Array'␤ in main program body at line 22:/tmp/B_N8pWpz_2␤»
ash_ my @array = 1, 2, 3; say @array.min: { $^a <=> $^b } 17:43
tadzik bah, I would need some guidance
ash_ rakudo: my @array = 1, 2, 3; say @array.min: { $^a <=> $^b }
p6eval rakudo 7c74c0: OUTPUT«1␤»
moritz_ ash_: there's still src/pmc/perl6str.pmc in the rakudo repo
ash_ ah, oops, i mis-read the ticket 17:44
std: (1, 2).min:{ $^a <=> $^b };
moritz_ and src/builtins/Str.pir uses Perl6Str as parent class 17:44
p6eval std 237d266: OUTPUT«ok 00:01 119m␤»
ash_ std: (1, 2).min: { $^a <=> $^b };
p6eval std 237d266: OUTPUT«ok 00:01 119m␤»
ash_ can those both be re-written into nqp/perl6? just wondering 17:45
the pmc only seems to have 2 helper functions for converting strings to int/float values 17:46
tadzik how can I do something like for (1..100) in NQP? 17:51
moritz_ my $x = 1; while $x <= 100 { ....; $x++ } 17:52
ash_ nqp: my $x := 1; while $x < 5 { say($x); $x++ };
p6eval nqp: OUTPUT«1␤2␤3␤4␤»
tadzik right. Thanks 17:53
jnthn evening, folks :-) 18:02
tadzik evening jnthn :)
moritz_ o/ 18:04
masak ahoj, #perl6! 19:26
moritz_ good `now`, masak
masak it is a good 'now', indeed.
jnthn holla', masak
masak: Nice weekend? 19:27
masak very much so.
jnthn :-)
masak cocooned in the comforting embrace of lots of Esperanto friends... 19:28
masak I'm all warm and tingly inside now. 19:28
jnthn \o/
moritz_ 'twas very warm here
masak early tomorrow I'll need to catch a flight to a certain Mr Berends. 19:29
mberends aha!
jnthn masak: Straight to his private airfield? :-)
jnthn looks forward to joining the fun later on in the week. :-) 19:30
masak jnthn: I thought I'd tell the pilot to let me off while we cruise over mberends' house. 19:30
if it's not too much trouble.
jnthn masak: Cool
Remember the parachute.
masak sometimes pilots are picky about such things.
oh! right!
masak makes a little note
jnthn
.oO( oh chute...I forgot it... )
19:31
mberends ok, I'll roll out a large paper X in a nearby open field
masak thanks. 19:32
jnthn++ # groan
hey! seems psyde has a potential second user already! gist.github.com/608845 19:33
and it doesn't even really exist yet... :)
jnthn tries to switch his head back into Russian mode so he can do his homework, after chatting with a Czech girl earlier on in the evening. It's almost like switching between Perl 5 and Perl 6... 19:36
masak seems both my talks and jnthn's are on the Sunday... act.osdc.fr/osdc2010fr/schedule?day=2010-10-10 19:37
jnthn masak: Yeah!
masak one more day to procrastinate... :P 19:37
jnthn masak: :P
masak has already started on both his talks!
jnthn One of mine is a repeat
The other one I have written out the things I want to say, and now just need slides / words / diagrams to go with it. :-) 19:38
masak "just"
jnthn I was gonna do those yesterday, but writing NQP's ClassHOW was more fun.
masak for me, slides are the time-consuming part.
jnthn Yes, "just" :-)
Aye, and I want to try and make a couple of nice-ish diagrams this time. 19:39
masak sir, I wish you lots of inspiration. 19:40
jnthn Thanks. You too! :-)
masak thank you. :)
hudnix I find myself using the construct "gather {take .foo for somefunc}" often enough to want a shorter idiom for it. "take .foo gatherfor somefunc" is ugly though... 19:41
masak hudnix: .foo for somefunc 19:42
moritz_ somefunc».foo
masak moritz_++ # wins
jnthn >>. is NYL
(if it should be)
hudnix is >> implemented yet though?
masak yes.
jnthn yes
hudnix oh
masak but, what jnthn said.
jnthn NYL, not NYI :-)
masak not yet lazy.
jnthn ;-) 19:43
moritz_ it's supposed to be hyper
jnthn Sorry, that was acronymical cruelty. :-)
Oh, of course.
masak ACBTCOD :)
jnthn So it's not meant to ever be lazy.
masak Acronymical Cruelty Beyond The Call Of Duty :)
hudnix silly me, I had decided it didn't work yet because I was typing .>> instead of >>. 19:46
masak std: my @a; @a.>>foo 19:49
p6eval std 237d266: OUTPUT«===SORRY!===␤Confused at /tmp/B7VBSnFjTC line 1:␤------> my @a; @a.>>⏏foo␤ expecting any of:␤ postfix␤ postfix_prefix_meta_operator␤Parse failed␤FAILED 00:01 117m␤»
masak std: my @a; @a.>>.foo
p6eval std 237d266: OUTPUT«ok 00:01 116m␤»
hudnix I am close to having a cool toy in perl6 to show off soon, btw 19:57
jnthn Oooh. :-) 19:59
masak a pre-announcement. nice.
hudnix oops, now I have to make it live up to the hype :) 20:02
masak better sleep a bit before the early flight tomorrow. 20:10
'night, #perl6.
sorear good * #perl6 20:27
diakopter hi sorear 21:07
dalek ok: 202e064 | jnthn++ | src/subs-n-sigs.pod:
Various improvements for readability, coverage and keeping parameter/argument straight in the subs-n-sigs chapter.
21:46
sorear I've extended the ladder benchmark from yesterday 21:55
2310 ns PIR
32100 ns Rakudo
jnthn sorear: Code please. 21:58
sorear jnthn: all sent to #parrot for plobsing
jnthn heh :-) 21:59
You need quite a bunch of optimizations to get from Perl 6 to PIR that looks like that. 22:00
(Like, knowing you can get away with setting up a $! / $/ / $_ 22:01
and that now lexpad is needed, and resolving the lookup to a sub constant, ignoring the wrapper Rakudo pops around Parrot subs) 22:02
s/now/no/
diakopter sorear: repeat the ns for p6/niecza 22:03
(please)
jnthn It is kinda depressing that Parrot takes longer than Perl 5 though. That means even *if* we do all those things in Rakudo to generate such PIR, we're still some way behind. 22:04
diakopter latest I saw was 415ns 22:05
sorear diakopter: that's the latest. 22:15
sorear buubot: 1090518910/14136321143 #plobsing 22:26
buubot sorear: Couldn't match input.
sorear buubot: eval 1090518910 / 14136321143
buubot sorear: 0.0771430486735936