»ö« 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!
Set by sorear on 4 February 2011.
dalek rixel: d270e0f | diakopter++ | sprixel/s (10 files):
lots more grammar/regex/parsing infrastructure/work/progress. And slashes.
02:18
diakopter good * sorear 02:20
sorear good * #perl6 02:22
sorear diakopter: :p 02:22
diakopter perlesque: grammar Foo { rule TOP { { say 5666 } } }; Foo.new.parse('nothing') 02:29
p6eval perlesque: OUTPUT«5666␤»
sorear TimToady: Under what circumstances is $match[0] === $match? 03:11
tadzik: Rakudo is not bootstrapped yet! The compiler is still written entirely in NQP.
Tene phenny: ask jnthn when he expects to have time available to talk to me about cardinal metamodel on 6model. 03:23
phenny Tene: I'll pass that on when jnthn is around.
Tene phenny: Thanks; I really appreciate it.
sorear Tene: I know a few things about 6model; can I help? 03:25
tewk So what is best practice for installing Perl6 modules proto, pls, neutro? 03:48
JimmyZ_ tewk: github.com/perl6/modules.perl6.org 03:55
JimmyZ_ std: sub foo($bar:) {}; 04:05
p6eval std 4608239: OUTPUT«Potential difficulties:␤ $bar is declared but not used at /tmp/8rhTkW7FvT line 1:␤------> sub foo(⏏$bar:) {};␤ok 00:01 120m␤»
JimmyZ_ rakudo: sub foo($bar:) {}; 04:06
p6eval rakudo 58e40e: ( no output )
JimmyZ_ std: sub foo($bar:) { say $bar };
p6eval std 4608239: OUTPUT«ok 00:01 122m␤»
Tene rakudo: my sub foo($bar:) { say "lol: $bar" }; "ohai".&foo; 04:43
p6eval rakudo 58e40e: OUTPUT«Lexical 'self' not found␤ in 'foo' at line 1:/tmp/UzZGpsuyqh␤ in main program body at line 22:/tmp/UzZGpsuyqh␤»
TimToady rakudo: say 1[0] === 1 05:53
phenny TimToady: 21 Feb 02:56Z <diakopter> ask TimToady S05 is out-of-sync with STD wrt :ignoremark (S05) vs. :ignoreaccent (STD) ... which is right and which is the fossil...?
TimToady: 23 Feb 20:06Z <diakopter> tell TimToady nm about the mark/accent; we fixed it
p6eval rakudo 58e40e: OUTPUT«Bool::True␤»
TimToady sorear: ^^ just as 1[0] is forced to return 1, I suspect $match[0] should be forced to return $match if the positional interface "isn't operative" 05:54
greetings from Nairobi, btw 05:56
finally got my net connection set up here
phenny: tell masak if there is something in S09 that indicates negative .[] subscripts are allowed, it's a fossil; the intent is that negative subscripting be done with .{} instead 05:58
phenny TimToady: I'll pass that on when masak is around.
perigrin 22 06:21
*sigh*
sorear TimToady: does that extend to $0 meaning $/ if there are no pos captures? 06:27
TimToady well...one can argue it both ways. Certainly $0 is a little prettier than $/, and less likely to be confusing in a s/foo/$0/ than s/foo/$// 06:29
TimToady I'm trying to formulate an argument against it that doesn't seem more like a foolish consistency 06:30
diakopter std: $$/[$0]/$/[$0] 06:32
p6eval std 4608239: OUTPUT«ok 00:01 121m␤»
TimToady but it seems like making a ()-less pattern act as if there were implicit () around the whole thing kinda smooths over the damage of having an object that overloads so many roles
and fits with the 1[0] policy 06:33
sorear mostly wants to avoid massive yak shaving for the ? change
diakopter std: $$$/[0]
p6eval std 4608239: OUTPUT«ok 00:01 119m␤» 06:34
sorear 167+ matches for \[0\] in STD & NieczaActions
niecza v3 may be up to 4-5 days late 06:35
I'm not sure I have time for paranoid build QC this weekend, especially due to the parser changes 06:36
diakopter std: $$$$$$0 06:38
p6eval std 4608239: OUTPUT«ok 00:01 118m␤»
diakopter pugs: say $$$$$$0
p6eval pugs: OUTPUT«␤»
diakopter niecza: say $$$$$$0
p6eval niecza v2-104-g891071d: OUTPUT«Any()␤»
diakopter niecza: say $$$$$$/
p6eval niecza v2-104-g891071d: OUTPUT«Any()␤» 06:39
moritz_ good morning
diakopter BREAKFAST 06:40
TimToady o/ 06:43
tadzik good morning 07:26
dalek rixel: 0c66527 | diakopter++ | / (11 files):
.
07:27
diakopter rakudo: grammar G { rule TOP { ... } }; say G.new.parse("aaa") 07:31
p6eval rakudo 58e40e: OUTPUT«aaa␤»
diakopter perlesque: grammar G { rule TOP { .... } }; say G.new.parse("aaa")
p6eval perlesque: OUTPUT«Regex_dot succeeded␤Regex_dot succeeded␤Regex_dot succeeded␤Regex_dot failed␤␤»
TimToady rakudo: $_ = '[]]['; while s/'[]'// {}; say "alive" 07:49
p6eval rakudo 58e40e: OUTPUT«(timeout)»
TimToady known bug? 07:50
diakopter rakudo: $_ = '[]]['; say $_; if s/'[]'// { say 1 }; say $_; if s/'[]'// { say 2 }; say "alive" 07:52
p6eval rakudo 58e40e: OUTPUT«[]][␤1␤][␤2␤alive␤»
TimToady rakudo: $_ = '[]]['; repeat while $/ { s/'[]'// }; say "alive"
p6eval rakudo 58e40e: OUTPUT«alive␤»
TimToady rakudo: $_ = '[]]['; repeat while $/ { s/'[]'// }; say "alive $_" 07:53
p6eval rakudo 58e40e: OUTPUT«alive ][␤»
TimToady rakudo: $_ = '[]]['; repeat while $/ { s:g/'[]'// }; say "alive $_"
p6eval rakudo 58e40e: OUTPUT«alive ][␤»
TimToady rakudo: $_ = '[[[]]]'; repeat while $/ { s:g/'[]'// }; say "alive $_" 07:54
p6eval rakudo 58e40e: OUTPUT«alive [[]]␤»
diakopter rakudo: $_ = ']['; if s/'[]'// { say 'oops' }
p6eval rakudo 58e40e: OUTPUT«oops␤»
TimToady note my $_ ended up with [[]], not ''
diakopter it must not recurse
and recurse 07:55
TimToady :g always returns false, I think
it should return the number of replacements
diakopter niecza: $_ = '[]]['; while s/'[]'// {}; say "alive" 07:56
p6eval niecza v2-104-g891071d: OUTPUT«alive␤»
diakopter niecza: $_ = '[[[]]]'; repeat while $/ { s:g/'[]'// }; say "alive $_"
p6eval niecza v2-104-g891071d: OUTPUT«alive [[[]]]␤»
diakopter ?
niecza: $_ = '[[[]]]'; repeat while $/ { s/'[]'// }; say "alive $_"
p6eval niecza v2-104-g891071d: OUTPUT«alive [[[]]]␤»
diakopter niecza: $_ = '[[[]]]'; repeat while s/'[]'//; say "alive $_" 07:57
p6eval niecza v2-104-g891071d: OUTPUT«===SORRY!===␤␤Missing block at /tmp/u3nLhOXbLP line 1:␤------> $_ = '[[[]]]'; repeat while s/'[]'//⏏; say "alive $_"␤␤Parse failed␤␤»
diakopter niecza: $_ = '[[[]]]'; repeat while { s/'[]'// }; say "alive $_"
p6eval niecza v2-104-g891071d: OUTPUT«===SORRY!===␤␤Missing block at /tmp/bBKYfwaIEU line 1:␤------> $_ = '[[[]]]'; repeat while { s/'[]'// }⏏; say "alive $_"␤␤Parse failed␤␤»
diakopter oh
TimToady rakudo: $_ = '[[[]]]'; 1 while s:g/'[]'//; say "alive $_"
p6eval rakudo 58e40e: OUTPUT«alive ␤»
TimToady rakudo: $_ = '[[[]]]]['; 1 while s:g/'[]'//; say "alive $_" 07:58
p6eval rakudo 58e40e: OUTPUT«(timeout)»
diakopter :)
TimToady niecza: $_ = '[[[]]]]['; 1 while s:g/'[]'//; say "alive $_" 07:59
p6eval niecza v2-104-g891071d: OUTPUT«alive ][␤»
diakopter niecza: $_ = '[[[[[[[][]]]][[[]]][]]]]'; 1 while s:g/'[]'//; say "alive $_" 08:01
p6eval niecza v2-104-g891071d: OUTPUT«alive ␤»
tadzik sorear: so only the settings library is in Perl 6, and this gets compiled by a compiler written in NQP?
diakopter ooo first try
tadzik: for rakudo, yes. for niecza, no 08:05
niecza's compiler is Perl 5, C#, and "NAM" 08:06
is *in
tadzik diakopter: yeah, I meant Rakudo. But isn't niecza self-hosting for a while now? 08:20
diakopter oh, I suppose so. 08:21
TimToady added a niecza solution to balanced brackets on RC 08:25
pugs: $_ = '[[[[[[[][]]]][[[]]][]]]]'; 1 while s:g/'[]'//; say "alive $_" 08:26
p6eval pugs: OUTPUT«(timeout)»
TimToady pugs: $_ = '[[[[[[[][]]]][[[]]][]]]]'; 1 while s/'[]'//; say "alive $_" 08:27
p6eval pugs: OUTPUT«(timeout)»
TimToady hmm
diakopter Ithought pugs was still broken vis-a-vis p5bridge
TimToady pugs: $_ = '[[[[[[[][]]]][[[]]][]]]]'; 1 while s:P5/\[\]//; say "alive $_" 08:28
p6eval pugs: OUTPUT«(timeout)»
TimToady so it would seem
tadzik pugs: say "hello to my little friends" 08:29
p6eval pugs: OUTPUT«hello to my little friends␤»
TimToady lunch & # and fireside chat at iHub later tonight 08:43
tadzik rakudo: my $a = "2010-01-01"; $a ~~ s/ 0 (\d) $/$0/; say $a # what am I missing? 09:25
p6eval rakudo 58e40e: OUTPUT«2010-01-Any()␤»
moritz_ tadzik: $/ and derivates aren't available in the RHS of s/// yes 09:30
niecza: my $a = "2010-01-01"; $a ~~ s/ 0 (\d) $/$0/; say $a
p6eval niecza v2-104-g891071d: OUTPUT«2010-01-1␤»
moritz_ niecza++
tadzik I'd use it for my script if it had Date :) 09:32
moritz_ well, port it
Date is written in pure Perl 6 09:33
should be easy to get into niecza
and luckily the two projects are licenced as AL2, so no problems here
dalek ast: 68b538f | moritz++ | S03-smartmatch/ (2 files):
remove last remnants of .notdef
10:42
dalek ast: e2c4b95 | moritz++ | S02-builtin_data_types/array.t:
[array.t] simplify a bit, and re-fudge for niecza
10:49
dalek ast: fbafcc2 | jimmy++ | S03-smartmatch/disorganized.t:
changed defined to .defined
10:59
moritz_ niecza: my @a = 1, 2; sub f($x) { say $x.perl }; f @a 11:23
p6eval niecza v2-104-g891071d: OUTPUT«[1, 2]␤»
moritz_ niecza: my %h = a => 1, b => 2, c => 3, d => 4; my @sel = <a c>; my %new = %h{@sel}:pairs 11:25
p6eval niecza v2-104-g891071d: OUTPUT«Unhandled exception: Excess arguments to SAFE postcircumfix:<{ }>, unused named pairs␤ at /home/p6eval/niecza/lib/SAFE.setting line 0 (SAFE postcircumfix:<{ }> @ 0)␤ at /tmp/cJmWgFdeY0 line 1 (MAIN mainline @ 12)␤ at /home/p6eval/niecza/lib/SAFE.setting line 1180
..(SAFE C487_ANON…
AphelionZ Maybe a dumb question but if I have perl5 modules installed, how do I include them and use them within a perl 6 script? I want to use the Device::SerialPort module. 13:51
moritz_ AphelionZ: if you're lucky, it works with github.com/jnthn/blizkost 13:52
but note that you need some special options when compiling your p5
AphelionZ haha hmm maybe i'll just use Perl 5 14:04
moritz_ you could also try to see what the module does, and do the same inPerl 6 14:06
AphelionZ That's not a bad idea 14:11
tadzik AphelionZ: or you can port them to Perl 6 :) 15:23
btw, are you around?
AphelionZ tadzik: I'm here
tadzik Talking via Github issues is hardly productive. So, how is your parrot installed? 15:29
AphelionZ cool 15:30
I installed the rakudo star and everything is from there
tadzik what does `which parrot` give you? 15:32
AphelionZ nothing... 15:34
"parrot not found"
tadzik oh funny
that explains a lot. How about `which perl6`?
I must say I never had Star installed
AphelionZ /usr/bin/perl6
yeah the site "strongly recommended" it so I just installed that 15:35
tadzik understandable
moritz_ ... and it installs to /usr/bin by default? WTF?
AphelionZ moritz_: no it just makes a binary file and i stuck it in there since it was in my path 15:44
so should I install parrot too?
moritz_ AphelionZ: you should install by running 'make install'
moritz_ AphelionZ: the problem is that rakudo and parrot need runtime libraries 15:45
AphelionZ I thought I did...
moritz_ AphelionZ: and if you just copy an executable, it might not be able to find those runtime libraries
moritz_ what should work is symlinking to the installed perl6 binary 15:46
mikey_ quit 15:54
Shozan no
moritz_ "you can check out any time you like, but you can never leave" 16:01
AphelionZ ok, so just so I do this right: 16:08
I just ran rakudo star's configure / make / make install again
and now I have this: pastie.org/1602625
AphelionZ symlink parrot and perl6 to somewhere in my path? 16:09
or maybe just add this dir to my path? iunno
moritz_ both work
AphelionZ tadzik: ok cool let me try neutro again 16:13
tadzik AphelionZ: basically, you need a working prove :) 16:14
maybe it'd be good to write a pureperl prove for Modules::Test
AphelionZ haha yeah i don't know enough to do that... im still getting the Method 'postcircumfix:<{ }>' not found for invocant of class 'Failure' error 16:15
tadzik but first neutro should be rewretten a bit
damn 16:16
AphelionZ: which neutro branch are you on?
AphelionZ master 16:16
tadzik crap, I hoped at least that one's working 16:21
AphelionZ: could you try running it with "use Devel::Trace" added at the top? 16:23
AphelionZ tadzik: sure, which file should I add that to? 16:24
tadzik AphelionZ: bin/neutro I think 16:26
AphelionZ tadzik: where do I get the Devel::Trace module for perl 6? 16:38
moritz_ it comes with rakudo, if your rakudo is new enough
flussence there isn't one, it's actually a magic string
moritz_ rakudo: use Devel::Trace; say 1
p6eval rakudo 58e40e: OUTPUT«use Devel::Trace␤say 1␤1␤»
AphelionZ maybe i need to update rakudo :-/ 16:39
flussence what's your perl6 -v? 16:39
it is a pretty new feature...
AphelionZ "This compiler is built with the Parrot Compiler Toolkit, parrot revision 45822."
moritz_ oh.
that's... OLD
AphelionZ aha!
moritz_ the newer one loook like 16:40
This is Rakudo Perl 6, version 2011.02-14-g10d86d7 built on parrot 3.1.0 RELEASE_3_1_0-245-g9a2b775
AphelionZ ok let me compile up a newer version... this could potentially solve all my problems
tadzik oh my, that was back in svn days? 16:56
AphelionZ tadzik: looks like it's working now :) sorry about the hassle 17:05
oh, wait
AphelionZ tadzik: got a new one for you now with Devel::Trace pastie.org/1602821 17:07
my perl6 -v is "This is Rakudo Perl 6, version 2011.01 built on parrot 3.0.0" 17:08
donri how the heck do i find out the size of something listy? 17:09
pyrimidine +@foo, I think 17:11
donri ok that makes to much sense 17:12
daxim rakudo: say (4,5,6).elems
p6eval rakudo 58e40e: OUTPUT«3␤»
daxim for everything a method.
pyrimidine rakudo: say +(4,5,3); 17:13
p6eval rakudo 58e40e: OUTPUT«3␤»
pyrimidine TIMTOWTOI 17:14
rakudo: say +('foo' => 'bar'); 17:15
p6eval rakudo 58e40e: ( no output )
donri rakudo: say +{'foo' => 'bar'}
p6eval rakudo 58e40e: OUTPUT«1␤»
pyrimidine ah
donri yours is a parcel of pairs i think
well, except not a parcel because no comma 17:16
rakudo: say +(:foo<bar>,)
p6eval rakudo 58e40e: OUTPUT«1␤»
tadzik AphelionZ: the same problem :)
notice line 4
you need a -e aware prove
daxim phenny, tell masak well, how *does* lying make a bug report better? inquiring minds want to know! 17:16
phenny daxim: I'll pass that on when masak is around.
tadzik is your parrot-prove installed this time? 17:16
pyrimidine rakudo: say +[4,5,3];
p6eval rakudo 58e40e: OUTPUT«3␤» 17:17
AphelionZ tadzik: not sure... here's my parrot dir pastie.org/1602872 17:22
tadzik AphelionZ: gotta go for PM meeting, bbl, possibly tomorrow. Basically, you need a prove binary that accepts the '-e' switch. You can try poking colomon-san, I think he had the same problem a while ago 17:23
tadzik out
AphelionZ thanks
colomon er?
moritz_ I think some old prove binaries had a -p switch instead (for "the perl to execute") 17:26
AphelionZ colomon: I'm trying to run neutro's bootstrap.sh script and it keeps barfing on the parrot-prove's -e flag 17:32
colomon oooooo. 17:33
I have indeed run into that.
let me think a minute.
AphelionZ np
colomon AphelionZ: I don't seem to have a working version of that on my machine at the moment, but I believe in the past I have hard-coded that prove call to use a different version of prove. 17:42
colomon Basically, I have a local to my personal directory install of Perl 5.10, and then instead of prove, I have scripts call /Users/colomon/localperl/bin/prove 17:43
AphelionZ huh, ok 17:43
thanks, i'll try that
colomon The line that would need to be changed in this case is line 15 of mt/lib/Module/Test.pm
hope that helps.
masak lol hi zebras 18:01
phenny masak: 05:58Z <TimToady> tell masak if there is something in S09 that indicates negative .[] subscripts are allowed, it's a fossil; the intent is that negative subscripting be done with .{} instead
masak: 17:16Z <daxim> tell masak well, how *does* lying make a bug report better? inquiring minds want to know!
masak daxim: you planning to skip the talk? :P 18:02
daxim I can't do every conf 18:02
masak aww :) 18:03
daxim: there's an existing version of that talk up at github. wait, I'll get you the URL.
daxim: github.com/downloads/masak/osdc-fr-...g/talk.pdf 18:05
daxim :thumb:
masak TimToady: looking at S09 again, I might actually have confused things. will read it more carefully later. 18:06
donri feed ops, seq ops and list processors have weird precedence 18:18
masak donri: they have very low precedence. 18:24
do you have a case where the precedence feels outright wrong?
donri when combining them i constantly find myself needing extra parenthesis
even recall a weird case of *assignment* not catching the whole expression 18:25
my @factors = grep $num %% *, (@primes ... * > sqrt $num);
^ example from just now
i understand what it does without the parens but that seems less common
donri rakudo: my @even = ^10 ==> grep * %% 2; say @even.perl 18:27
p6eval rakudo 58e40e: OUTPUT«[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
donri that can't be intentional? 18:28
colomon donri: if you tried grep $num %% *, (@primes ... * > sqrt $num) without the parens, it's very easy to explain why it didn't work. 18:29
donri I get what that does, just seems less useful for a default 18:30
colomon but the whole idea of ... is that it takes a list on the left and a list on the right. Given that, how could you make a precedence that does what you want? 18:31
donri duno, treat literals and identifiers differently, shrug 18:34
but more importantly see the assignment example
colomon rakudo: ^10 ==> grep * %% 2 ==> my @even; say @even.per
p6eval rakudo 58e40e: OUTPUT«Method 'per' not found for invocant of class 'Array'␤ in main program body at line 22:/tmp/dvXkr8U8gn␤»
colomon rakudo: ^10 ==> grep * %% 2 ==> my @even; say @even.perl 18:35
p6eval rakudo 58e40e: OUTPUT«[0, 2, 4, 6, 8]␤»
colomon Personally I don't ever mess with ==>, so I don't know the justifications there.
masak blog post I'd like to read: "The ways Moose beats the Perl 6 object system" 20:34
masak someone please write it :) 20:34
donri masak: does it? 21:13
Rotwang yeah, I'm interested also 21:16
why? [;
masak ok, there are two aspects to it. 21:19
(1) Moose of today being more full-featured.
(2) Moose actually having better theoretical underpinnings, which do or will get it further. 21:20
I guess (2) is debatable. (1) isn't.
flussence Moose is optional (not that that's always an advantage...) 21:20
masak I'm interested in both. (1) will show us what to focus on that we don't have yet. (2) will point at deeper points of interest. 21:21
flussence: in a sense, Perl 6 OO is optional too... it's just that you don't have to "use" it to use it :P
donri I heard a plan for parrot or rakudo to allow opting out from things like the object system 21:22
donri anyway, I'd like to see a way to hook arbitrary objects, such as subscribing to changes to them 21:23
flussence Does perl6 have an autoload mechanism yet? 21:28
masak donri: I don't see how you could reasonably "opt out" of the Perl 6 object system. whoever said that can't have been looking at how Perl 6 is parsed. ;) 21:31
donri yea, not sure
stuff internally are built around objects too right?
masak oh yes.
if "opt out" means not using the "class" keyword, then it's trivial. just don't use it.
(your loss) 21:32
donri masak: www.modernperlbooks.com/mt/2010/07/...-star.html 21:33
flussence (hm, actually it wouldn't be too hard to have autoloadable methods already...) 21:33
donri "Better yet, new features planned for Parrot offer the opportunity to deploy applications with only those features actually used, so if you avoid the object system or grammar manipulation altogether, you won't pay the memory or startup costs for them."
flussence ((whether it's efficient is another matter...)) 21:33
masak donri: oh right. well, I can't accuse chromatic on being insufficiently versed in the internals :P 21:34
donri: let's just say I'll believe it when I see it.
anyone who considers that a challenge, be my guest. :)
donri ;)
masak literally. I will house you and feed you if you promise to work on this :) 21:35
donri hah 21:35
masak ok, my awake juice has run out. have a good night, everybody. 21:37
o/
Tene phenny: tell masak that if he had made that offer of supporting me to work on Parrot and Perl 6 a year ago, I'd probably be living on his couch today. 21:42
phenny Tene: I'll pass that on when masak is around.
Tene phenny: Thanks.
tadzik hello 22:21
Tene phenny: tell masak that last year around this time I was considering trying to move to texas for a couple of months to stay with pmichaud and work on rakudo 22:41
phenny Tene: I'll pass that on when masak is around.
flussence spectest finished in 7.5 minutes... yay 22:52
donri hm was there a way to write sequences that skip steps, or is *the* way to do that with *+x ... *? 23:01
oh wait 3,5...x 23:02
flussence rakudo: say (1, 3, 6 ... * < 100)
donri tried that with .. which didn't do it heh
p6eval rakudo 58e40e: OUTPUT«1␤»
flussence er.
rakudo: (1, 3, 6 ... * < 100).perl.say
p6eval rakudo 58e40e: OUTPUT«(1)␤»
flussence rakudo: (1, 3, 6 ... * > 100).perl.say
p6eval rakudo 58e40e: OUTPUT«Method 'count' not found for invocant of class 'Failure'␤ in <anon> at line 861:CORE.setting␤ in 'List::Bool' at line 1␤ in <anon> at line 879:CORE.setting␤ in <anon> at line 881:CORE.setting␤ in 'Any::join' at line 1␤ in 'List::perl' at line 2821:CORE.setting␤ in main
..progr…
flussence I forgot how this thing works ... :( 23:03
rakudo: (1, 3, 5 ... * > 100).perl.say
p6eval rakudo 58e40e: OUTPUT«(1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101)␤»
flussence oh, it just doesn't do triangle numbers.
donri it can't figure out the sequence for 1,3,6
flussence rakudo: (1, 3, 6, 10, 15 ... * > 100).perl.say # ?
p6eval rakudo 58e40e: OUTPUT«Method 'count' not found for invocant of class 'Failure'␤ in <anon> at line 861:CORE.setting␤ in 'List::Bool' at line 1␤ in <anon> at line 879:CORE.setting␤ in <anon> at line 881:CORE.setting␤ in 'Any::join' at line 1␤ in 'List::perl' at line 2821:CORE.setting␤ in main
..progr…
flussence rakudo: (1, 3, 6, * + @_ ... * > 100).perl.say # ? 23:04
p6eval rakudo 58e40e: OUTPUT«Null PMC access in type()␤ in <anon> at line 22:/tmp/e7PeKBY_zo␤ in <anon> at line 865:CORE.setting␤ in 'List::Bool' at line 1␤ in <anon> at line 879:CORE.setting␤ in <anon> at line 881:CORE.setting␤ in 'Any::join' at line 1␤ in 'List::perl' at line 2821:CORE.setting␤
..in ma…
flussence there's a way to get at the whole list, but I don't remember it...
donri rakudo say (1, 3, 6, -> *@_ { [+] @_ } ... * > 100).perl 23:05
flussence that's the one
donri rakudo: say (1, 3, 6, -> *@_ { [+] @_ } ... * > 100).perl
picky.
p6eval rakudo 58e40e: OUTPUT«(1, 3, 6, 10, 20, 40, 80, 160)␤»
flussence er.
I was doing it wrong anyway :) 23:06
flussence rakudo: ([\+] 1..15).perl.say # triangle operator, triangle numbers. makes sense... 23:08
p6eval rakudo 58e40e: OUTPUT«(1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120)␤» 23:09
donri it's actually faster to do unecessary tests than to skip them with sequence op
Tene donri: the implied sequences are based only on the last three numbers in the source, and the autodetection supported is described in the specs 23:15
donri yea read about that at some point 23:16
I have rakudo solving euler #3 in 2.5s with imperative c-like code 23:17
Tene donri: use NativeCall and link against primegen: cr.yp.to/primegen.html 23:19
;)
donri :D
Tene donri: c'mon, you know you want to :)
donri blatantly plagiarised treed github.com/dag/euler/blob/master/Perl%206/3.pl 23:20
bonus points for the MAIN subs? 23:21
donaldh seen jnthn 23:22
aloha jnthn was last seen in #perl6 1 days ago joining the channel.
flussence "1 days"? Oh come on, you can do better than that :) 23:23
donaldh :D
Tene There's no Lingua::EN::Inflect for Perl 6 yet.
donri: you should accept an argument for the count in MAIN 23:24
donaldh Is there any way to create a capture with "is rw" aliases?
donri yea maybe 23:24
donaldh Or is there any way to cast a readonly argument into a rw argument ? 23:25