| Time |
S |
Nick |
Message |
| 00:03 |
|
eternaleye |
tann: the ... operator is not implemented yet |
| 00:05 |
|
eternaleye |
In rakudo, at least. Pugs handles it. |
| 00:06 |
|
eternaleye |
pugs: .say for 1, 1 ... &[+]; |
| 00:06 |
|
p6eval |
pugs: OUTPUT«1all(VInt 0,VList [VInt 1,VInt 2,VInt 3,VInt 4,VInt 5,VInt 6,VInt 7,VInt 8,VInt 9,VInt 10,VInt 11,VInt 12,VInt 13,VInt 14,VInt 15,VInt 16,VInt 17,VInt 18,VInt 19,VInt 20,VInt 21,VInt 22,VInt 23,VInt 24,VInt 25,VInt 26,VInt 27,VInt 28,VInt 29,VInt 30,VInt 31,VInt 32,VInt 33,VInt 34… |
| 00:06 |
|
eternaleye |
Hm. It seems not to do it correctly, though |
| 00:25 |
|
|
kst joined #perl6 |
| 00:29 |
|
pugs_svn |
r27156 | kyle++ | [t/spec] Change more Pugs todo flags to fudge commands |
| 00:36 |
|
pugs_svn |
r27157 | kyle++ | [t/spec] Change more Pugs todo flags to fudge commands |
| 00:41 |
|
|
dukeleto joined #perl6 |
| 00:44 |
|
|
justatheory joined #perl6 |
| 00:48 |
|
|
bacek joined #perl6 |
| 00:49 |
|
|
kyle2 joined #perl6 |
| 00:51 |
|
|
twigil joined #perl6 |
| 01:01 |
|
pugs_svn |
r27158 | kyle++ | [t/spec] Change more Pugs todo flags to fudge commands |
| 01:20 |
|
|
amoc joined #perl6 |
| 01:20 |
|
pugs_svn |
r27159 | kyle++ | [t/spec] Change more Pugs todo flags to fudge commands |
| 01:32 |
|
|
Chillance joined #perl6 |
| 01:44 |
|
|
meppl joined #perl6 |
| 01:52 |
|
|
Sunbeam joined #Perl6 |
| 01:56 |
|
|
kst joined #perl6 |
| 01:56 |
|
|
xinming_ joined #perl6 |
| 01:57 |
|
|
molaf_x joined #perl6 |
| 02:03 |
|
|
xinming__ joined #perl6 |
| 02:11 |
|
|
alester joined #perl6 |
| 02:23 |
|
|
alanhaggai joined #perl6 |
| 02:46 |
|
|
xinming joined #perl6 |
| 02:48 |
|
|
hercynium joined #perl6 |
| 03:08 |
|
|
sri_kraih joined #perl6 |
| 03:20 |
|
|
donaldh joined #perl6 |
| 03:21 |
|
|
cotto joined #perl6 |
| 03:22 |
|
|
ihrd joined #perl6 |
| 03:22 |
|
|
ihrd left #perl6 |
| 03:23 |
|
|
kst joined #perl6 |
| 03:33 |
|
|
s1n1 joined #perl6 |
| 03:40 |
|
|
Whiteknight joined #perl6 |
| 03:43 |
|
|
s1n1 joined #perl6 |
| 03:43 |
|
|
meppuru joined #perl6 |
| 03:54 |
|
|
lpsmith joined #perl6 |
| 04:14 |
|
|
iblechbot joined #perl6 |
| 04:36 |
|
|
justatheory joined #perl6 |
| 04:38 |
|
|
cotto joined #perl6 |
| 04:49 |
|
|
kst joined #perl6 |
| 04:52 |
|
|
cotto joined #perl6 |
| 05:16 |
|
|
eMaX joined #perl6 |
| 05:21 |
|
|
russell_ left #perl6 |
| 05:36 |
|
|
alanhaggai_ joined #perl6 |
| 05:57 |
|
|
ZuLuuuuuu joined #perl6 |
| 06:10 |
|
|
xinming_ joined #perl6 |
| 06:18 |
|
|
kst joined #perl6 |
| 06:20 |
|
|
xinming_ joined #perl6 |
| 06:20 |
|
|
actualeyes joined #perl6 |
| 06:21 |
|
actualeyes |
How do I do stdin in Perl6?\ |
| 06:27 |
|
actualeyes |
my $something = $*IN.readline; gives me |
| 06:27 |
|
actualeyes |
Method 'readline' not found for invocant of class 'IO' |
| 06:31 |
|
|
eMaX joined #perl6 |
| 06:39 |
|
|
azawawi joined #perl6 |
| 06:39 |
|
azawawi |
hi |
| 06:39 |
|
azawawi |
actualeyes: hi |
| 06:40 |
|
azawawi |
actualeyes: my $line = $*IN.get; |
| 06:40 |
|
azawawi |
actualeyes: or if you need to ask a question to the user, use my $line = prompt("your question"); |
| 06:44 |
|
actualeyes |
Awesome thanks. |
| 06:46 |
|
azawawi |
actualeyes: np |
| 06:47 |
|
azawawi |
actualeyes: what do u use to edit Perl 6? vim? Padre? |
| 06:50 |
|
twigil |
what is Padre? |
| 06:50 |
|
|
eMaX_ joined #perl6 |
| 06:52 |
|
actualeyes |
vim |
| 06:52 |
|
actualeyes |
I am actually starting to play with it. |
| 06:53 |
|
actualeyes |
Last time I picked up parrot I tried to use <STDIN> |
| 06:53 |
|
actualeyes |
and I got a stack trace |
| 06:53 |
|
actualeyes |
the current build is much more mature |
| 06:54 |
|
actualeyes |
Padre is a new IDE written in Perl for Perl |
| 06:54 |
|
actualeyes |
you can get it in cpan |
| 06:54 |
|
actualeyes |
I tried it once and liked it but, it seemed a bit lightweight. |
| 06:55 |
|
actualeyes |
that may have been 3 months ago. |
| 06:55 |
|
actualeyes |
I'll probably try it in another 6 months |
| 06:56 |
|
|
xinming joined #perl6 |
| 07:06 |
|
|
xinming__ joined #perl6 |
| 07:20 |
|
|
donaldh joined #perl6 |
| 07:41 |
|
|
DemoFreak joined #perl6 |
| 07:48 |
|
|
kst joined #perl6 |
| 08:13 |
|
|
buubot_ joined #perl6 |
| 08:33 |
|
|
viklund joined #perl6 |
| 08:40 |
|
|
bacek joined #perl6 |
| 08:41 |
|
|
xinming joined #perl6 |
| 08:44 |
|
|
finanalyst joined #perl6 |
| 08:46 |
|
finanalyst |
how do i convert a rakudo program to a binary so i can run without re-parsing? |
| 08:57 |
|
viklund |
finanalyst: rakudo --target=pir --output=file.pir file.pm |
| 08:57 |
|
viklund |
You can only do it with modules |
| 08:57 |
|
viklund |
s/rakudo/perl6/ |
| 08:57 |
|
finanalyst |
i thought it was possible for scripts too |
| 08:58 |
|
viklund |
not that I now of |
| 08:59 |
|
viklund |
but just put the entire program in the .pm file |
| 08:59 |
|
viklund |
it will get executed once you 'use' it |
| 09:01 |
|
finanalyst |
suppose i have MyModule.pm and MyModule.pir in the same directory, and then use MyModule, which version gets 'used' |
| 09:01 |
|
viklund |
the pir-version |
| 09:01 |
|
finanalyst |
thanx |
| 09:01 |
|
viklund |
so remember to recompile when you've made a change |
| 09:02 |
|
|
eMaX joined #perl6 |
| 09:03 |
|
|
kst joined #perl6 |
| 09:06 |
|
finanalyst |
i have most functions in modules anyway. |
| 09:06 |
|
finanalyst |
the change in speed is noticeable when the modules are precompiled |
| 09:06 |
|
finanalyst |
rakudo is parsing and running much much faster recently anyway |
| 09:08 |
|
|
phenny joined #perl6 |
| 09:09 |
|
|
nsh_ joined #perl6 |
| 09:09 |
|
|
sbp joined #perl6 |
| 09:10 |
|
|
Jedai joined #perl6 |
| 09:10 |
|
|
ejs joined #perl6 |
| 09:12 |
|
|
Su-Shee joined #perl6 |
| 09:12 |
|
Su-Shee |
good morning. |
| 09:15 |
|
viklund |
good morning |
| 09:16 |
|
araujo |
morning |
| 09:16 |
|
|
azawawi joined #perl6 |
| 09:16 |
|
azawawi |
viklund: hi |
| 09:16 |
|
viklund |
o/ |
| 09:17 |
|
azawawi |
viklund: any update from pmichaud on the profiler? |
| 09:17 |
|
viklund |
not that im aware of |
| 09:17 |
|
azawawi |
viklund: ok |
| 09:36 |
|
|
pmurias joined #perl6 |
| 10:07 |
|
|
ejs joined #perl6 |
| 10:13 |
|
|
IRSeekBot joined #perl6 |
| 10:24 |
|
|
Whiteknight joined #perl6 |
| 10:27 |
|
|
Jedai joined #perl6 |
| 10:34 |
|
|
payload joined #perl6 |
| 10:49 |
|
|
kst joined #perl6 |
| 10:58 |
|
|
Muixirt joined #perl6 |
| 11:03 |
|
|
lpsmith left #perl6 |
| 11:17 |
|
|
cotto joined #perl6 |
| 11:20 |
|
|
donaldh joined #perl6 |
| 11:41 |
|
|
drbean joined #perl6 |
| 11:44 |
|
|
mj41 joined #perl6 |
| 11:45 |
|
|
d4l3k_ joined #perl6 |
| 11:47 |
|
|
sbp joined #perl6 |
| 11:47 |
|
|
nsh joined #perl6 |
| 11:47 |
|
|
phenny joined #perl6 |
| 11:47 |
|
|
molaf_x joined #perl6 |
| 11:47 |
|
|
mj41_ joined #perl6 |
| 11:47 |
|
|
buubot joined #perl6 |
| 11:47 |
|
|
cls_bsd joined #perl6 |
| 11:47 |
|
|
eternaleye joined #perl6 |
| 11:47 |
|
|
hatseflats joined #perl6 |
| 11:47 |
|
|
rgs joined #perl6 |
| 11:47 |
|
|
allbery_b joined #perl6 |
| 11:47 |
|
|
frodwith joined #perl6 |
| 11:47 |
|
|
Molaf joined #perl6 |
| 11:49 |
|
|
eternaleye_ joined #perl6 |
| 12:13 |
|
|
kst joined #perl6 |
| 12:29 |
|
|
bacek joined #perl6 |
| 12:33 |
|
|
cotto joined #perl6 |
| 12:33 |
|
|
last joined #perl6 |
| 12:41 |
|
|
fridim_ joined #perl6 |
| 12:50 |
|
|
masak joined #perl6 |
| 12:51 |
|
masak |
o/ |
| 12:51 |
|
phenny |
masak: 20 Jun 19:16Z <Matt-W> tell masak yes I was referring to your blog entry |
| 12:51 |
|
masak |
:) |
| 12:56 |
|
masak |
phenny: tell WhiteKnight yes, I'm coming to YAPC::EU. will do a talk about Web.pm. |
| 12:56 |
|
phenny |
masak: I'll pass that on when WhiteKnight is around. |
| 13:01 |
|
|
frew|work joined #perl6 |
| 13:05 |
|
payload |
hi. perl 6 has a gradual type system. where is it documentated which optimizations and speed ups should be possible with these type informations? |
| 13:06 |
|
masak |
payload: the answer is either 'nowhere' or 'here and there'. I'm not so sure. |
| 13:07 |
|
masak |
payload: I get the impression that the designers haven't started thinking deeply about the possible optimisations due to typing. |
| 13:07 |
|
masak |
they're mentioned now and then, but (also AFAIK) no implementation does any of those optimisations. |
| 13:07 |
|
Matt-W |
o/ |
| 13:07 |
|
masak |
and that's tantamount to saying that nobody has started thinking about it. :) |
| 13:07 |
|
masak |
Matt-W: \o |
| 13:08 |
|
|
M_o_C joined #perl6 |
| 13:09 |
|
|
jonalv joined #perl6 |
| 13:09 |
|
masak |
Matt-W: if I knew the reaction from my SVG experiments would be "you're living in the future", I would have attempted them much sooner. :) |
| 13:10 |
|
Matt-W |
haha |
| 13:10 |
|
|
Whiteknight joined #perl6 |
| 13:10 |
|
Matt-W |
I just thought that was funny |
| 13:10 |
|
Matt-W |
and it tied in with a Wil Wheaton blog entry from last week too |
| 13:10 |
|
pmichaud |
I'd say that the designers have been keeping optimization in mind in building the language so as not to preclude good optimizations |
| 13:10 |
|
jonalv |
o/ |
| 13:11 |
|
jonalv |
Say that I wanted to print something like ten million |
| 13:11 |
|
jonalv |
that's and awful lot's of zeros |
| 13:11 |
|
masak |
10_000_000 |
| 13:11 |
|
jonalv |
How would you group them for readability? |
| 13:11 |
|
masak |
jonalv: did I guess your question right? :) |
| 13:12 |
|
masak |
Matt-W: URL? |
| 13:12 |
|
pmichaud |
rakudo: say 10_000_000 |
| 13:12 |
|
p6eval |
rakudo 1b06df: OUTPUT«10000000» |
| 13:12 |
|
jonalv |
masak: yes, I am not convinced though. I know that some lagnuages use "," and "." |
| 13:12 |
|
masak |
also, 1e7. |
| 13:12 |
|
|
flexibeast joined #perl6 |
| 13:12 |
|
pmichaud |
Perl 6 uses underscores. |
| 13:12 |
|
masak |
jonalv: wait, are you complaining about the choice of separator? |
| 13:12 |
|
jonalv |
no |
| 13:13 |
|
masak |
it's underscores, I promise! |
| 13:13 |
|
Matt-W |
rakudo: say 10_000_000 |
| 13:13 |
|
p6eval |
rakudo 1b06df: OUTPUT«10000000» |
| 13:13 |
|
Matt-W |
masak: http://wilwheaton.typepad.com/[…]rage-day-one.html |
| 13:13 |
|
masak |
Matt-W: hvala. |
| 13:14 |
|
Matt-W |
jonalv: see, underscores :) |
| 13:14 |
|
jonalv |
I trust you :) |
| 13:15 |
|
jonalv |
It's just that I was asking more genrally. A bit off topic I know. But I was hoping for some sort of pretty print function or something like that |
| 13:15 |
|
Matt-W |
oh |
| 13:15 |
|
Matt-W |
I'm writing that |
| 13:15 |
|
jonalv |
you are? :) |
| 13:15 |
|
Matt-W |
yes |
| 13:15 |
|
Matt-W |
it'll be part of the Form.pm module |
| 13:16 |
|
jonalv |
so I take it I ahve to wait then? :) |
| 13:16 |
|
Matt-W |
the numeric formatting stuff includes adding commas or other separator characters you might like |
| 13:16 |
|
Matt-W |
yes you have to wait |
| 13:16 |
|
masak |
jonalv: or roll your own just for this purpose. |
| 13:16 |
|
masak |
jonalv: or help Matt-W :) |
| 13:16 |
|
Matt-W |
Form has some othe rfeatures to do first... like, any kind of number formatting at all :) |
| 13:16 |
|
masak |
it's very close now. |
| 13:17 |
|
Matt-W |
yes |
| 13:17 |
|
jonalv |
masak: yes I could definitly roll my own. Which brings my bak to original question. How would you group them for readability? |
| 13:17 |
|
masak |
jonalv: I misunderstood your question, sorry. you want to _output_ numbers, not enter them into your source code. |
| 13:17 |
|
Matt-W |
just when I can sit down with my brain and do it |
| 13:17 |
|
masak |
jonalv: by threes. |
| 13:17 |
|
jonalv |
masak: yes, and would you do spaces between? |
| 13:17 |
|
masak |
jonalv: that's up to you, I guess. |
| 13:18 |
|
masak |
whatever suits you best. |
| 13:18 |
|
jonalv |
masak: I think that's the swedish approach and it might not be so international... |
| 13:18 |
|
Matt-W |
commas is what we use in england, in groups of three |
| 13:18 |
|
masak |
jonalv: no, periods ('.') is the Swedish approach. |
| 13:18 |
|
Matt-W |
but some other european languages use . in groups of three |
| 13:18 |
|
jonalv |
masak: oh |
| 13:18 |
|
jonalv |
:) |
| 13:18 |
|
masak |
jonalv: we got that from the French, methinks. |
| 13:19 |
|
Matt-W |
So English would be 1,000,000.00 but Swedish is 1.000.000,00, I believe |
| 13:19 |
|
jonalv |
Hm I wonder if I can get LaTeX to just add a small space between the groups? |
| 13:20 |
|
Matt-W |
probably, but it might be quite complicated |
| 13:20 |
|
jonalv |
(I guess that was the wrong forum) :) |
| 13:20 |
|
Matt-W |
yeah my LaTeX isn't very good |
| 13:20 |
|
Matt-W |
I can write an essay in it |
| 13:20 |
|
masak |
jonalv: something like '\ '. |
| 13:20 |
|
jonalv |
masak: yea |
| 13:20 |
|
jonalv |
so then I just need to get Perl6 to split my numbers correct and add that between... |
| 13:22 |
|
masak |
jonalv: http://www.giss.nasa.gov/tools/latex/ltx-185.html |
| 13:23 |
|
jonalv |
masak: perfect |
| 13:23 |
|
jonalv |
masak: now, the question just is. Do I hard code the numbers or do I write code for doing the pretty printing? |
| 13:23 |
|
jonalv |
How hard could it be? :) |
| 13:23 |
|
masak |
jonalv: the latter. |
| 13:23 |
|
masak |
hold on. |
| 13:25 |
|
masak |
rakudo: sub group($num is copy) { return reverse gather while $num > 0 { take $num % 1000; $num = int($num / 1000) } }; say group(123456789).join(".") |
| 13:25 |
|
p6eval |
rakudo 1b06df: OUTPUT«123.456.789» |
| 13:25 |
|
masak |
et voilà. |
| 13:27 |
|
jonalv |
masak: uhm "$num is copy"? |
| 13:27 |
|
masak |
jonalv: just so I can modify $num inside the sub. |
| 13:27 |
|
jonalv |
oh |
| 13:27 |
|
jonalv |
cool |
| 13:27 |
|
masak |
without harming the original argument. |
| 13:28 |
|
masak |
jonalv: just so you know what you have to look forward to in Matt-W's work, please skim through this document: http://search.cpan.org/dist/Perl6-Form/Form.pm |
| 13:29 |
|
|
kst joined #perl6 |
| 13:30 |
|
payload |
rakudo: say "\x2002" # should be a small space when i remember the unicode syntax in perl 6 correctly |
| 13:30 |
|
p6eval |
rakudo 1b06df: OUTPUT« » |
| 13:31 |
|
masak |
apparently that was the syntax. |
| 13:31 |
|
* jonalv |
heads to try and get his first "sub" to work |
| 13:31 |
|
payload |
rakudo: sub group($num is copy) { return reverse gather while $num > 0 { take $num % 1000; $num = int($num / 1000) } }; say group(1234567890).join("\x2002") |
| 13:31 |
|
p6eval |
rakudo 1b06df: OUTPUT«1 234 567 890» |
| 13:33 |
|
masak |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take $num % $d; $num = int($num / $d) }; say group(1234567890).perl |
| 13:33 |
|
p6eval |
rakudo 1b06df: OUTPUT«Unable to parse block; couldn't find final '}' at line 2, near ""in Main (src/gen_setting.pm:0)» |
| 13:33 |
|
masak |
oops. |
| 13:33 |
|
masak |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take $num % $d; $num = int($num / $d) } }; say group(1234567890).perl |
| 13:33 |
|
p6eval |
rakudo 1b06df: OUTPUT«[1, 234, 567, 890]» |
| 13:35 |
|
jonalv |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take $num % $d; $num = int($num / $d) } }; say group(1234567890).join(\\,) |
| 13:35 |
|
p6eval |
rakudo 1b06df: OUTPUT«Statement not terminated properly at line 2, near "(\\\\,)"in Main (src/gen_setting.pm:0)» |
| 13:35 |
|
masak |
still need to put strings in quotes. |
| 13:36 |
|
jonalv |
oh "duh" :) |
| 13:36 |
|
jonalv |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take $num % $d; $num = int($num / $d) } }; say group(1234567890).join("\\,") |
| 13:36 |
|
p6eval |
rakudo 1b06df: OUTPUT«1\,234\,567\,890» |
| 13:37 |
|
* jonalv |
runs his script and hopes the pdf will look good :) |
| 13:38 |
|
jonalv |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take $num % $d; $num = int($num / $d) } }; say group(1000000).join("\\,") |
| 13:38 |
|
p6eval |
rakudo 1b06df: OUTPUT«1\,0\,0» |
| 13:38 |
|
jonalv |
hm... |
| 13:38 |
|
masak |
oh! |
| 13:38 |
|
masak |
sorry, fixing. |
| 13:39 |
|
jonalv |
:) |
| 13:39 |
|
masak |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take sprintf '%03d', $num % $d; $num = int($num / $d) } }; say group(1000000).perl |
| 13:39 |
|
p6eval |
rakudo 1b06df: OUTPUT«["001", "000", "000"]» |
| 13:39 |
|
masak |
hm. |
| 13:40 |
|
masak |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take (sprintf '%03d', $num % $d).subst(/^ 0+/, ''); $num = int($num / $d) } }; say group(1000000).perl |
| 13:40 |
|
p6eval |
rakudo 1b06df: OUTPUT«["1", "", ""]» |
| 13:40 |
|
masak |
hm... :/ |
| 13:41 |
|
masak |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take (sprintf '%03d', $num % $d).subst(/^ 0+ <!before $>/, ''); $num = int($num / $d) } }; say group(1000000).perl |
| 13:41 |
|
p6eval |
rakudo 1b06df: OUTPUT«["1", "0", "0"]» |
| 13:41 |
|
masak |
wow, wrong again. |
| 13:41 |
|
|
s1n1 joined #perl6 |
| 13:41 |
|
masak |
how do I say 'remove leading zeroes, unless they constitute the whole string?' |
| 13:41 |
|
* jonalv |
thinks it was not so easy after all... |
| 13:42 |
|
|
azawawi joined #perl6 |
| 13:42 |
|
masak |
jonalv: no, it is. I just haven't had my coffee yet. |
| 13:42 |
|
jonalv |
masak: you don't drink coffee... |
| 13:42 |
|
masak |
oh noes! |
| 13:42 |
|
masak |
I _really_ haven't had my coffee yet. |
| 13:43 |
|
payload |
my $a = $b.triml("0") ?? $a !! $b or something like that? |
| 13:43 |
|
payload |
can't test... rakudo is compiling ^^ |
| 13:43 |
|
masak |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take (sprintf '%03d', $num % $d) || (sprintf '%03d', $num % $d).subst(/^ 0+/, ''); $num = int($num / $d) } }; say group(1000000).perl |
| 13:43 |
|
p6eval |
rakudo 1b06df: OUTPUT«["001", "000", "000"]» |
| 13:44 |
|
* jonalv |
stares wide-eyed at that code for a while |
| 13:44 |
|
masak |
rakudo: sub group($num is copy, $size = 3) { my $d = 10 ** $size; return reverse gather while $num { take (sprintf '%03d', $num % $d) && (sprintf '%03d', $num % $d).subst(/^ 0+/, ''); $num = int($num / $d) } }; say group(1000000).perl |
| 13:44 |
|
p6eval |
rakudo 1b06df: OUTPUT«["1", "", ""]» |
| 13:44 |
|
* masak |
grumbles |
| 13:45 |
|
azawawi |
hi |
| 13:47 |
|
masak |
rakudo: sub group($num is copy, Int $size = 3) { my $d = 10 ** $size; return reverse gather while $num { my $s = sprintf("%03d", $num % $d); take $s ~~ /^ 0+ $/ ?? $s !! $s.subst(/^ 0+/, ""); $num = int($num / $d) } }; say group(1e6).perl |
| 13:47 |
|
p6eval |
rakudo 1b06df: OUTPUT«sh: ./perl6: No such file or directory» |
| 13:47 |
|
masak |
jonalv: there you go. that works. |
| 13:48 |
|
masak |
but rakudo is rebuilding right now in the server. |
| 13:48 |
|
masak |
azawawi: hi! |
| 13:48 |
|
jonalv |
masak: I will try that then :) |
| 13:48 |
|
masak |
Matt-W: really looking forward to number formatting in Form.pm :P |
| 13:53 |
|
jonalv |
that worked (And it looks very nice too) thanks masak++ |
| 13:54 |
|
masak |
thanks. I'll be here all week. |
| 13:54 |
|
masak |
no really, I will. |
| 13:54 |
|
masak |
and the next one, too. |
| 13:54 |
|
masak |
rakudo: sub group($num is copy, Int $size = 3) { my $d = 10 ** $size; return reverse gather while $num { my $s = sprintf("%03d", $num % $d); take $s ~~ /^ 0+ $/ ?? $s !! $s.subst(/^ 0+/, ""); $num = int($num / $d) } }; say group(1e6).perl |
| 13:54 |
|
p6eval |
rakudo 1b06df: OUTPUT«["1", "000", "000"]» |
| 14:04 |
|
|
a3r0 joined #perl6 |
| 14:06 |
|
azawawi |
std: module A; module B; |
| 14:06 |
|
p6eval |
std 27159: OUTPUT«##### PARSE FAILED #####Too late for semicolon form of module definition at /tmp/NSDhAAjXCa line 1:------> module A; module B; expecting any of: trait whitespaceFAILED 00:02 35m» |
| 14:06 |
|
azawawi |
std: module A { } module B {} |
| 14:06 |
|
p6eval |
std 27159: OUTPUT«##### PARSE FAILED #####Whitespace is required between alphanumeric tokens at /tmp/pBaJKTUaTE line 1:------> module A { } module B {}FAILED 00:02 36m» |
| 14:06 |
|
azawawi |
std: module A { }; module B { } |
| 14:06 |
|
p6eval |
std 27159: OUTPUT«ok 00:02 35m» |
| 14:07 |
|
azawawi |
std: module A::B { }; module B { } |
| 14:07 |
|
p6eval |
std 27159: OUTPUT«ok 00:02 35m» |
| 14:07 |
|
azawawi |
std: module A::B { }; module B::C { } |
| 14:07 |
|
p6eval |
std 27159: OUTPUT«ok 00:02 35m» |
| 14:07 |
|
azawawi |
std: package A::B { }; package B { } |
| 14:07 |
|
p6eval |
std 27159: OUTPUT«ok 00:02 35m» |
| 14:07 |
|
azawawi |
std: package A::B { }; package B::A { } |
| 14:07 |
|
p6eval |
std 27159: OUTPUT«ok 00:02 35m» |
| 14:07 |
|
masak |
std: module A {}; module B; |
| 14:07 |
|
p6eval |
std 27159: OUTPUT«ok 00:02 35m» |
| 14:08 |
|
masak |
std: module A { module B; } |
| 14:08 |
|
p6eval |
std 27159: OUTPUT«ok 00:02 35m» |
| 14:08 |
|
masak |
we're quite lenient these days. |
| 14:09 |
|
azawawi |
masak: sorry :) |
| 14:09 |
|
masak |
azawawi: for what? |
| 14:09 |
|
azawawi |
for STD flooding :) |
| 14:09 |
|
masak |
I meant that STD.pm has a lenient policy for statement-form package declarations. |
| 14:10 |
|
masak |
azawawi: no, flood on. |
| 14:10 |
|
azawawi |
ah i see |
| 14:10 |
|
masak |
there's plenty of backlog room left. :) |
| 14:10 |
|
masak |
also, accusing you of flooding right now would be a bit hypocritical of me. :P |
| 14:10 |
|
* azawawi |
is making some screenshots from Ecliptic+Perl6 on Padre for masak :) |
| 14:11 |
|
masak |
:) |
| 14:18 |
|
|
skids joined #perl6 |
| 14:21 |
|
azawawi |
masak: see the screenshots for ecliptic+perl6 in action... http://feather.perl6.nl/~azawawi/quick_fix/ |
| 14:21 |
|
azawawi |
masak: it is now released on CPAN :) |
| 14:22 |
|
masak |
azawawi++ |
| 14:23 |
|
azawawi |
masak: perl 6 rename var and extract method is next on my agenda |
| 14:23 |
|
azawawi |
masak: along with world domination ofcourse :) |
| 14:23 |
|
masak |
azawawi: I'm curious... do you use STD.pm or 'perl6 --taget=parse' for this? |
| 14:23 |
|
azawawi |
masak: STD ofcourse; |
| 14:24 |
|
azawawi |
masak: you have the option of switching to STD or PGE |
| 14:24 |
|
masak |
aha. |
| 14:24 |
|
masak |
do you have a link to the source code that does this? |
| 14:24 |
|
masak |
I'm guessing you use YAML at some critical point. |
| 14:26 |
|
masak |
azawawi: found a slight wart: the quick-fix menu option has an unnecessary question mark: "Insert a space after if?" |
| 14:26 |
|
masak |
azawawi: otherwise it looks really good. |
| 14:30 |
|
|
kst joined #perl6 |
| 14:30 |
|
azawawi |
masak: sure... |
| 14:31 |
|
azawawi |
masak: http://svn.perlide.org/padre/t[…]adre-Plugin-Perl6 |
| 14:31 |
|
azawawi |
masak: Perl6::Document |
| 14:31 |
|
masak |
thank you. |
| 14:31 |
|
azawawi |
masak: it is not refactored yet though :) |
| 14:32 |
|
azawawi |
masak: and the fixes are not 100% error proof :) |
| 14:32 |
|
masak |
I'm more interested in porting this to Perl 6 than in refactoring. :) |
| 14:33 |
|
azawawi |
masak: tonight im going to blog heavily about it |
| 14:33 |
|
masak |
hey, look! I'm mentioned in a comment! :) |
| 14:33 |
|
azawawi |
masak: first real blog :) |
| 14:33 |
|
azawawi |
masak: S29-functions? |
| 14:33 |
|
masak |
yep. |
| 14:34 |
|
azawawi |
masak: i think once hinrik gets grok working; we can move to a better solution... |
| 14:34 |
|
masak |
azawawi: anyway, great work! keep it up. |
| 14:34 |
|
masak |
azawawi: yes, great hope lies in grok. |
| 14:34 |
|
masak |
but it's only half the excellent implementation literal++ will write. |
| 14:35 |
|
azawawi |
masak: will it restore the balance to the force? :) |
| 14:35 |
|
masak |
the other half is the excellent documentation itself. |
| 14:35 |
|
masak |
azawawi: it will almost tip the balance over the other way. |
| 14:37 |
|
* masak |
catches himself writing the ternary operator as a?b!c in Java |
| 14:37 |
|
azawawi |
masak: i should write a quick fix for that :) |
| 14:38 |
|
masak |
yes, but the other way around. |
| 14:38 |
|
azawawi |
std: a ? b : c; |
| 14:38 |
|
p6eval |
std 27159: OUTPUT«Undeclared routines: b used at 1  c used at 1 ok 00:02 39m» |
| 14:38 |
|
masak |
writing ?? :: happens sometimes too. |
| 14:38 |
|
azawawi |
i think std used to warn about it |
| 14:38 |
|
masak |
std: "foo" ? "bar" : "baz" |
| 14:38 |
|
p6eval |
std 27159: OUTPUT«##### PARSE FAILED #####Obsolete use of ?: for the conditional operator; in Perl 6 please use ??!! instead at /tmp/X1IFdrPABt line 1:------> "foo" ? "bar" : "baz"FAILED 00:04 36m» |
| 14:38 |
|
masak |
it does. |
| 14:38 |
|
masak |
but somehow it didn't trigger for you. |
| 14:38 |
|
azawawi |
std: a == "foo" ? "bar" : 1 |
| 14:39 |
|
p6eval |
std 27159: OUTPUT«##### PARSE FAILED #####Obsolete use of ?: for the conditional operator; in Perl 6 please use ??!! instead at /tmp/WchfLq8igP line 1:------> a == "foo" ? "bar" : 1Undeclared routine: a used at 1 FAILED 00:04 36m» |
| 14:39 |
|
masak |
azawawi: ah, if a, b, c are listops, what you wrote first actually parses. |
| 14:40 |
|
azawawi |
masak: one thing i didnt perfect; is the regexp for a perl 6 identifier |
| 14:40 |
|
azawawi |
masak: Foo::Bar-In::C |
| 14:42 |
|
|
lichtkind joined #perl6 |
| 14:54 |
|
|
zamolxes joined #perl6 |
| 14:56 |
|
|
sri_kraih joined #perl6 |
| 14:58 |
|
|
alester joined #perl6 |
| 15:03 |
|
masak |
rakudo: my $n = 1; for ^10 { say $n; $n = $n.subst(/(\d) $0*/, { $/.chars ~ $0 }, :g) } |
| 15:03 |
|
p6eval |
rakudo 1b06df: OUTPUT«1112112111112213122111311222111132132113113121113122113211311123113112211» |
| 15:04 |
|
masak |
Conway sequence. |
| 15:13 |
|
|
barney joined #perl6 |
| 15:13 |
|
|
jan___ joined #perl6 |
| 15:20 |
|
|
donaldh joined #perl6 |
| 15:32 |
|
japhb |
Happy Father's Day, papas! |
| 15:34 |
|
masak |
I had to make sure earlier today that it isn't Father's Day here in Sweden. |
| 15:34 |
|
masak |
apparently, ours is in November (the month). |
| 15:36 |
|
Su-Shee |
here it's mostly a very annoying binge drinking. ;) |
| 15:44 |
|
|
leed0 joined #perl6 |
| 15:44 |
|
Muixirt |
Su-Shee, and you are annoyed because the binge drinking is taking place without you? |
| 15:45 |
|
Su-Shee |
No! :) I don't drink anyway but maybe a glass of wine from time to time (where time = month) |
| 15:46 |
|
Su-Shee |
it's more the utterly drunken "dads" you're encountering. ;) |
| 15:51 |
|
|
kst joined #perl6 |
| 15:57 |
|
|
iblechbot joined #perl6 |
| 16:01 |
|
lichtkind |
is classify operator gone? |
| 16:03 |
|
pugs_svn |
r27160 | azawawi++ | [S:H:P6] Added tests for previous STD bugs |
| 16:04 |
|
|
azawawi joined #perl6 |
| 16:07 |
|
pmurias |
lichtkind: not it's not |
| 16:07 |
|
lichtkind |
pmurias: thanks |
| 16:09 |
|
lichtkind |
pmurias++ |
| 16:09 |
|
|
M_o_C joined #perl6 |
| 16:10 |
|
lichtkind |
perl 6 is madness http://www.perlfoundation.org/[…]erl_table_index#c |
| 16:10 |
|
pugs_svn |
r27161 | azawawi++ | [S:H:P6] version 0.63 contains the latest STD.pm with the fixed symbol table bug |
| 16:10 |
|
pugs_svn |
r27161 | azawawi++ | [S:H:P6] 'module Foo::Bar { }; module Bar { };' # redeclared Bar |
| 16:10 |
|
pugs_svn |
r27161 | azawawi++ | [S:H:P6] TimToady++ |
| 16:13 |
|
pmurias |
lichtkind: moritz_ was attempting something vaguely similiar with misc/perlhints |
| 16:13 |
|
masak |
and u4x is also a similar effort. |
| 16:14 |
|
lichtkind |
pmurias: yes he told me 2 years ago on german perl workshop but thats something with different task |
| 16:14 |
|
masak |
...but with a CLI client thrown in. |
| 16:14 |
|
lichtkind |
and in u4x isn much to steal from yet :) |
| 16:14 |
|
lichtkind |
i mean take |
| 16:15 |
|
masak |
true. |
| 16:15 |
|
masak |
it's still in its early stages. |
| 16:15 |
|
masak |
even the high-flying plans for it are in their early stages. :) |
| 16:15 |
|
|
jferrero joined #perl6 |
| 16:15 |
|
lichtkind |
masak: so iont see reason to drop that effort if it brings me so much nice klingon pain |
| 16:16 |
|
masak |
lichtkind: of course not. keep up the good work. |
| 16:16 |
|
|
viklund joined #perl6 |
| 16:17 |
|
pmurias |
lichtkind: was hoping for some kind of synergy rather than encouraging you to drop your effort |
| 16:18 |
|
lichtkind |
pmurias: there isnt that much synergy since my page is just a index of an perl 6 lexicon and moritz tries to explain whole lines of perl 6 with his programm |
| 16:18 |
|
azawawi |
masak: what mistakes do u keep running into when writing p5->p6? like the 1==1 ? "a": "b" => ?? !! |
| 16:19 |
|
masak |
azawawi: not many, I think. I can context-switch quite well these days. |
| 16:19 |
|
Matt-W |
I tend to make more mistakes in Perl 5, thinking I can do Perl 6 things |
| 16:19 |
|
lichtkind |
pmurias: only some resource lists could be shared but moritz didn't much in last months |
| 16:19 |
|
masak |
and I make very few Perl5-inspired mistakes in my Perl 6, since the latter is my main tongue. |
| 16:19 |
|
masak |
ah, what Matt-W said. |
| 16:20 |
|
|
Psyche^ joined #perl6 |
| 16:20 |
|
Matt-W |
My default 'Perl' thoughts are Perl 6 ones |
| 16:20 |
|
azawawi |
hmmm nice |
| 16:20 |
|
pmurias |
and ? ... : ... is unintuitive enough that it doesn't get used accidently |
| 16:20 |
|
viklund |
y0 6-ers |
| 16:20 |
|
masak |
viklund: whoz op? |
| 16:20 |
|
viklund |
BUILD in november |
| 16:20 |
|
masak |
ya, I saw. |
| 16:20 |
|
masak |
viklund++ |
| 16:21 |
|
viklund |
I only need to run some more tests and then I'll push |
| 16:21 |
|
masak |
YaY |
| 16:21 |
|
Matt-W |
a lot of people seem to think it's ?? :: in Perl 6, they get caught by the !! |
| 16:21 |
|
|
ZuLuuuuuu joined #perl6 |
| 16:22 |
|
viklund |
oh, and I found a BUILD related bug as well |
| 16:22 |
|
viklund |
#66792 |
| 16:22 |
|
masak |
yes, that's the one I saw. |
| 16:23 |
|
azawawi |
pmurias: i postponed re-mildew runtime support in Padre Perl 6 until i get it running :) |
| 16:23 |
|
pmurias |
np |
| 16:23 |
|
viklund |
it clobbers defaults in roles as well |
| 16:23 |
|
pmurias |
azawawi: i'll likely add it myself if i switch to padre |
| 16:24 |
|
masak |
pmurias: do you and ruoso have weekly meetings in #perl6-soc? |
| 16:24 |
|
azawawi |
pmurias: cool :) |
| 16:24 |
|
pmurias |
masak: no |
| 16:24 |
|
masak |
pmurias: literal and I were talking about it today. we decided on Wednesdays at 19:00. you're welcome to join, if you feel it would be of value. |
| 16:25 |
|
viklund |
what's the "soc" postfix? |
| 16:25 |
|
viklund |
Summer of Code? |
| 16:25 |
|
masak |
aye. |
| 16:25 |
|
masak |
I'm a mentor this summer. |
| 16:26 |
|
viklund |
masak: mmm, I have your druid svg in a tab, I don't want to close it ;) |
| 16:26 |
|
masak |
哈哈 |
| 16:27 |
|
masak |
bet it's one of the latter two, with real perspective. |
| 16:27 |
|
viklund |
yep |
| 16:27 |
|
masak |
now, imagine that same image, but containing an ongoing game, with clickable surfaces, a set of rotation buttons, and js all the way to make things respond. |
| 16:28 |
|
viklund |
shiver me timbers |
| 16:30 |
|
masak |
I hope I have something like that working by the end of the summer. but it sort of depends on Web.pm too. |
| 16:40 |
|
|
kst joined #perl6 |
| 16:40 |
|
|
s1n1 joined #perl6 |
| 16:43 |
|
lichtkind |
Appendix has now 361 entry |
| 16:43 |
|
lichtkind |
i think i make just 2 more today |
| 16:49 |
|
|
s1n1 joined #perl6 |
| 16:55 |
|
masak |
'Disruptive innovation tends to appear “off the radar” of the established players. It is often inferior to the established product in many ways. It tends to start in some small niche where it happens to work better than the established technology. The majors ignore it, as it clearly can’t handle the “real” problems they are focused on. Over time, the new technology grows more competent and eats its way upward, consuming the previous |
| 16:55 |
|
masak |
market leader’s lunch.' |
| 16:55 |
|
masak |
From "The Language Designer's Dilemma" -- http://gbracha.blogspot.com/20[…]-was-at-lang.html |
| 16:57 |
|
|
latch joined #perl6 |
| 16:57 |
|
|
codeguy joined #perl6 |
| 16:58 |
|
|
latch left #perl6 |
| 16:59 |
|
|
codeguy left #perl6 |
| 17:05 |
|
|
rfordinal joined #perl6 |
| 17:06 |
|
|
PacoLinux joined #perl6 |
| 17:13 |
|
moritz_ |
re |
| 17:14 |
|
japhb |
How would you import namespace aliases in a lexical scope? In other words, let's say I have a bunch of modules under OpenGL::Math::, such as OpenGL::Math::Mat4x4 and OpenGL::Math::Vec4. When I 'use OpenGL::Math;' can I arrange for the caller to be able to say 'my Vec4 pos .= new;' without polluting the top-level namespace globally, but only in the scope that used OpenGL::Math? |
| 17:15 |
|
Tene |
japhb: that's specced as the default |
| 17:15 |
|
Tene |
but it's NYI in Rakudo |
| 17:15 |
|
Tene |
oh, I kinda misread. |
| 17:15 |
|
japhb |
What, what? |
| 17:15 |
|
japhb |
oh, heh |
| 17:17 |
|
Tene |
oh, no, I was right the first time, as long as OpenGL::Math exports Vec4. |
| 17:17 |
|
Tene |
That's what I rmemeber from the spec, at least, that all imports are lexical. |
| 17:17 |
|
japhb |
Still, it sounds like you're saying this is not one problem, but two (one of which is solved in the spec): 1) Alias namespaces on import, 2) affect only lexical space in "user". |
| 17:17 |
|
japhb |
So you're saying, |
| 17:17 |
|
japhb |
class OpenGL::Math::Vec4 is export('Vec4') |
| 17:17 |
|
japhb |
or somesuch? |
| 17:18 |
|
Tene |
Yeah. Lemme check if that works now. |
| 17:20 |
|
Tene |
ah, no, not so much. |
| 17:21 |
|
japhb |
:-) |
| 17:22 |
|
|
payload joined #perl6 |
| 17:23 |
|
moritz_ |
masak++ # 3D SVG for druid |
| 17:23 |
|
japhb |
moritz_: link? |
| 17:24 |
|
Tene |
http://use.perl.org/~masak/journal/39152 |
| 17:25 |
|
japhb |
masak++ # RAWK. |
| 17:30 |
|
|
justatheory joined #perl6 |
| 17:33 |
|
lichtkind |
can anybody confitm the string method flip ? |
| 17:34 |
|
lichtkind |
confirm |
| 17:35 |
|
moritz_ |
rakudo can ;-) |
| 17:35 |
|
moritz_ |
rakudo: say "foo".flip |
| 17:35 |
|
p6eval |
rakudo 1b06df: OUTPUT«oof» |
| 17:35 |
|
moritz_ |
S32 can, too |
| 17:35 |
|
moritz_ |
and the test suite |
| 17:36 |
|
skids |
lichtkind: history on that -- .reverse was for all 3 hash, list, string. It was changed to .flip for string and .invert for hash (with altered behavior) |
| 17:37 |
|
skids |
because it was mondo confusing |
| 17:37 |
|
lichtkind |
skids++ moritz++ thanks |
| 17:40 |
|
|
jdv79_ joined #perl6 |
| 17:43 |
|
lichtkind |
forces flip string context? |
| 17:44 |
|
moritz_ |
aye |
| 17:44 |
|
moritz_ |
rakudo: say 24.flip |
| 17:44 |
|
p6eval |
rakudo 1b06df: OUTPUT«42» |
| 17:44 |
|
moritz_ |
wow, this feels like the good old times half a year ago: I come back from a weekend being offline, and have two new rakudobugs sitting in my mail queue |
| 17:45 |
|
moritz_ |
http://www.perlmonks.org/?node_id=773394 # my current thoughts about the pugs repo and the test suite |
| 17:47 |
|
lichtkind |
moritz_: why its rarely these days? |
| 17:47 |
|
moritz_ |
lichtkind: because I don't tend to find so many new rakudobugs |
| 17:49 |
|
moritz_ |
(and I don't spend so many weekends hacking Perl 6 either :/ ) |
| 17:49 |
|
lichtkind |
moritz_: so jnthn improved his buf shiding skillz? |
| 17:50 |
|
lichtkind |
bug hiding |
| 17:51 |
|
moritz_ |
lichtkind: hey, they aren't all hidden, some even get fixed ;-) |
| 17:52 |
|
lichtkind |
... rumors |
| 17:52 |
|
lichtkind |
invert revertes the key => value relation? |
| 17:52 |
|
|
s1n1 joined #perl6 |
| 17:52 |
|
moritz_ |
rakudo: my %a = (a => 3, 'foo' => [<bar baz>]); say %a.invert.perl |
| 17:53 |
|
p6eval |
rakudo 1b06df: OUTPUT«[3 => "a", "bar" => "foo", "baz" => "foo"]» |
| 17:53 |
|
|
kst joined #perl6 |
| 17:54 |
|
lichtkind |
wie ich mir dachte, thanks |
| 17:55 |
|
pugs_svn |
r27162 | moritz++ | [t] rename TASKS to spec/TODO |
| 17:55 |
|
pugs_svn |
r27163 | moritz++ | [t/spec] s/MONKEY_PATCHING/MONKEY_TYPING/ as per r26973 |
| 17:55 |
|
pugs_svn |
r27164 | moritz++ | [t/spec/TODO] update with recent spec changes |
| 17:55 |
|
|
s1n1 joined #perl6 |
| 17:56 |
|
|
justatheory joined #perl6 |
| 17:58 |
|
pmurias |
moritz_: re moving to git - using git-svn is always the option |
| 17:59 |
|
moritz_ |
pmurias: I do that now... but if we move the test suite out of the pugs repo one day, then we can just as well use a different version control system |
| 17:59 |
|
pmurias |
what are the benefits of moving it out? |
| 18:00 |
|
moritz_ |
basically getting rid of the association with pugs |
| 18:00 |
|
moritz_ |
which, in the mind of most people, is a dead animal |
| 18:00 |
|
moritz_ |
and it doesn't help to view the spec test as being implementation independent, either |
| 18:01 |
|
moritz_ |
anyway, I'm not sure if it's worth the trouble |
| 18:02 |
|
|
Molaf joined #perl6 |
| 18:02 |
|
pmurias |
throwing pugs out of the pugs repo would be a better solution ;) |
| 18:02 |
|
moritz_ |
yes, but it kinda feels... rude |
| 18:03 |
|
|
aindilis joined #perl6 |
| 18:06 |
|
s1n1 |
how do i import subs into (or export from) a module so that i can invoke them without the class/namespace? |
| 18:07 |
|
skids |
s1n1: add an "is export" trait. |
| 18:07 |
|
s1n_yapc |
skids: s10? |
| 18:09 |
|
moritz_ |
module A { sub foo is export { ... } }; |
| 18:09 |
|
moritz_ |
then in another file |
| 18:09 |
|
moritz_ |
use A; |
| 18:09 |
|
moritz_ |
foo(); |
| 18:10 |
|
Su-Shee |
ha, I had the same question on my mind, thanks for the anwser. :) |
| 18:10 |
|
s1n_yapc |
moritz_: how can i say all subs are exported? |
| 18:11 |
|
skids |
(also works with methods, but exports a sub with invocant as the first parameter) |
| 18:11 |
|
moritz_ |
s1n_yapc: by marking them all with 'is export'. I don't think there's a magic for that. |
| 18:12 |
|
skids |
(that part is in S12) |
| 18:12 |
|
s1n_yapc |
moritz_: nothing like 'module A is export { sub foo {...}; sub bar { ... } }'? |
| 18:13 |
|
moritz_ |
s1n_yapc: don't know.. something similar exists for classes and 'is rw', so the idea can't be off very far ;-) |
| 18:13 |
|
* s1n_yapc |
suggests spec change |
| 18:14 |
|
* moritz_ |
suggests thinking more about it first ;-) |
| 18:18 |
|
skids |
once you had a module that exported everything by default, how would you indicate a non-exported sub when you wanted one? |
| 18:19 |
|
moritz_ |
very good point |
| 18:22 |
|
* moritz_ |
found a (hypothetical) way to access previous elements from gather/take |
| 18:23 |
|
moritz_ |
my @a := gather { for @list { take $_; # access @a here } } |
| 18:23 |
|
skids |
moritz: or @a <== gather {...} |
| 18:24 |
|
moritz_ |
skids: that's even nicer ;-) |
| 18:24 |
|
skids |
(hope you don't expect it to work already, then :-) |
| 18:24 |
|
moritz_ |
I had the faint hope that my idea might work |
| 18:25 |
|
moritz_ |
that would allow an implementation of infix:<...> that would magically become lazy onces lists/arrays are lazy |
| 18:25 |
|
skids |
It's specced in S07 |
| 18:26 |
|
skids |
But I doubt it will be available before laziness. |
| 18:29 |
|
|
tann joined #perl6 |
| 18:30 |
|
moritz_ |
rakudo: say 2 % 1 |
| 18:30 |
|
p6eval |
rakudo 1b06df: OUTPUT«0» |
| 18:34 |
|
s1n_yapc |
rakudo: sub foo($opt?, $other) { say "opt {$opt} other {$other}" }; foo(1, 2); |
| 18:34 |
|
p6eval |
rakudo 1b06df: OUTPUT«opt 2 other 1» |
| 18:34 |
|
s1n_yapc |
is that right? |
| 18:35 |
|
moritz_ |
s1n_yapc: no, should be compile-time error |
| 18:35 |
|
* s1n_yapc |
submits |
| 18:36 |
|
moritz_ |
s1n_yapc: all optional positionals must go after mandatory ones, iirc |
| 18:36 |
|
s1n_yapc |
moritz_: but it was supposed to fail to compile? |
| 18:37 |
|
moritz_ |
s1n_yapc: yes |
| 18:38 |
|
skids |
S06: "Arguments destined for required positional parameters must come before those bound to optional positional parameters." and "Required parameters are specified at the start of a subroutine's parameter list" |
| 18:41 |
|
s1n_yapc |
rt# 49812 could probably be closed now |
| 18:43 |
|
moritz_ |
not sure... I'll ask pmichaud and jnthn for an update |
| 18:43 |
|
s1n_yapc |
moritz_: he was standing in front of me and he said it should probably closed |
| 18:44 |
|
s1n_yapc |
i mentioned it so someone could check it and do something :) |
| 18:44 |
|
moritz_ |
s1n_yapc: thanks, I'll close it |
| 18:44 |
|
s1n_yapc |
moritz_: here to help |
| 18:51 |
|
Muixirt |
hi moritz_ did building with clang work? |
| 18:52 |
|
moritz_ |
Muixirt: no |
| 18:53 |
|
Muixirt |
what was the problem? |
| 18:53 |
|
moritz_ |
Muixirt: it send some of the scripts that process PMCs into an infinite loop, and i have no idea why |
| 18:53 |
|
moritz_ |
*sent |
| 18:54 |
|
moritz_ |
progress report: |
| 18:54 |
|
moritz_ |
$ perl6 -e '1...3' |
| 18:54 |
|
moritz_ |
Could not find non-existent sub infix:... |
| 18:55 |
|
Tene |
nice progress |
| 18:55 |
|
moritz_ |
before it tried to parse the ... as . .. and failed to construct a range |
| 18:56 |
|
Tene |
Ah. |
| 18:58 |
|
moritz_ |
now it just seems a SMOP |
| 18:59 |
|
moritz_ |
rakudo: my $x = 1; repeat { say $x++ } until 1; |
| 18:59 |
|
p6eval |
rakudo 1b06df: OUTPUT«1» |
| 19:01 |
|
moritz_ |
rakudo: my @a = 1, 2, 4; sub f($a, $b) { say "$a|$b" }; f(@a[1..2]) |
| 19:01 |
|
p6eval |
rakudo 1b06df: OUTPUT«too few arguments passed (1) - 2 params expectedin sub f (/tmp/8bpYRTI3hZ:1)called from Main (/tmp/8bpYRTI3hZ:2)» |
| 19:01 |
|
moritz_ |
rakudo: my @a = 1, 2, 4; sub f($a, $b) { say "$a|$b" }; f(|@a[1..2]) |
| 19:01 |
|
p6eval |
rakudo 1b06df: OUTPUT«2|4» |
| 19:01 |
|
moritz_ |
rakudo: my @a = 1, 2, 4; sub f($a, $b) { say "$a|$b" }; f(|@a[*-2..2]) |
| 19:01 |
|
p6eval |
rakudo 1b06df: OUTPUT«2|4» |
| 19:01 |
|
moritz_ |
rakudo: my @a = 1, 2, 4; sub f($a, $b) { say "$a|$b" }; f(|@a[*-2..*-1]) |
| 19:01 |
|
p6eval |
rakudo 1b06df: OUTPUT«2|4» |
| 19:02 |
|
* moritz_ |
doesn't understand why his code doesn't work, then |
| 19:03 |
|
moritz_ |
rakudo: my @a = 1, 2, 4; sub f($a) { say $a }; f(|@a[*-1..*-1]) |
| 19:03 |
|
p6eval |
rakudo 1b06df: OUTPUT«argument doesn't arrayin sub f (/tmp/2x4tmnOO68:1)called from Main (/tmp/2x4tmnOO68:2)» |
| 19:04 |
|
amoc |
rakudo: my @a=1; sub f($a) { say $a }; f(|@a); |
| 19:04 |
|
|
PacoLinux joined #perl6 |
| 19:04 |
|
p6eval |
rakudo 1b06df: OUTPUT«1» |
| 19:06 |
|
moritz_ |
rakudo: my @a = 1, 2, 4; sub f($a) { say $a }; f(|@a[1..1]) |
| 19:06 |
|
p6eval |
rakudo 1b06df: OUTPUT«argument doesn't arrayin sub f (/tmp/a56cpyUqNl:1)called from Main (/tmp/a56cpyUqNl:2)» |
| 19:07 |
|
moritz_ |
rakudo: my @a = 1, 2, 4; sub f($a) { say $a }; f(|@(@a[1..1])) |
| 19:07 |
|
p6eval |
rakudo 1b06df: OUTPUT«2» |
| 19:09 |
|
amoc |
rakudo: my @a=1,2,4; @a[1..1].WHAT.say; |
| 19:09 |
|
p6eval |
rakudo 1b06df: OUTPUT«Int()» |
| 19:09 |
|
moritz_ |
right |
| 19:09 |
|
moritz_ |
rakudo: sub f($x) { $x }; f(|1) |
| 19:09 |
|
p6eval |
rakudo 1b06df: OUTPUT«argument doesn't arrayin sub f (/tmp/YVDArezQYc:1)called from Main (/tmp/YVDArezQYc:2)» |
| 19:09 |
|
moritz_ |
not very dwimmy, but I'm not sure it's a bug |
| 19:10 |
|
moritz_ |
rakudo: sub f($x) { $x }; say f(|@(1)) |
| 19:10 |
|
p6eval |
rakudo 1b06df: OUTPUT«1» |
| 19:13 |
|
|
kst joined #perl6 |
| 19:15 |
|
|
wormphlegm joined #perl6 |
| 19:20 |
|
|
donaldh joined #perl6 |
| 19:23 |
|
s1n_yapc |
if i overload a parent's method, can i call the original parent version from the overloaded one? |
| 19:23 |
|
moritz_ |
yes |
| 19:23 |
|
moritz_ |
(don't ask how, though ;) |
| 19:23 |
|
s1n_yapc |
moritz_: syntax? |
| 19:23 |
|
s1n_yapc |
lol |
| 19:24 |
|
moritz_ |
S03 mentions $obj.Class::method |
| 19:25 |
|
moritz_ |
though the usage in S12:1526 seems to contradict that (?) |
| 19:25 |
|
moritz_ |
TimToady: any thoughts on the last few lines? |
| 19:42 |
|
moritz_ |
any idea if t/oo/positional_parameters_in_BUILD.t makes any sense? |
| 19:46 |
|
moritz_ |
seems not. |
| 19:47 |
|
pugs_svn |
r27165 | moritz++ | [t/spec] fudge "use Test" directive for Rakudo |
| 19:47 |
|
pugs_svn |
r27166 | moritz++ | [t/spec] tests for non-lazy infix<...> |
| 19:47 |
|
pugs_svn |
r27166 | moritz++ | |
| 19:47 |
|
pugs_svn |
r27166 | moritz++ | Also fudged rest of the file for rakudo (hopefully) |
| 19:47 |
|
pugs_svn |
r27167 | moritz++ | [t] remove outdated/unspecced test |
| 19:51 |
|
moritz_ |
http://rt.perl.org/rt3/Ticket/[…]lay.html?id=66826 # that's what happened when I tried to implement infix:<...>. Pity. |
| 19:56 |
|
pugs_svn |
r27168 | kyle++ | [t/spec/TODO] Add a link to a discussion about moving old Pugs tests. |
| 20:00 |
|
|
azawawi joined #perl6 |
| 20:01 |
|
azawawi |
hello |
| 20:02 |
|
azawawi |
moritz_: http://ahmadzawawi.blogspot.co[…]and-ecliptic.html |
| 20:02 |
|
moritz_ |
http://consttype.blogspot.com/[…]re-of-perl-5.html # another, altogether different very good read |
| 20:03 |
|
moritz_ |
azawawi: very nice |
| 20:03 |
|
azawawi |
thx |
| 20:04 |
|
azawawi |
starwars movie & :) |
| 20:22 |
|
Khisanth |
moritz_: hopefully it isn't $obj.Class::method, it looks horrible :) |
| 20:23 |
|
moritz_ |
Khisanth: what kind of syntax would you prefer? |
| 20:24 |
|
Khisanth |
something that wouldn't require me to specify the class! |
| 20:25 |
|
moritz_ |
like $obj.SUPER::method? |
| 20:26 |
|
moritz_ |
that's the Perl 5 way |
| 20:26 |
|
moritz_ |
but it's a bit imprecise when multiple inheritance comes into play |
| 20:28 |
|
Khisanth |
I am fine with Class::C3's next::method() |
| 20:28 |
|
Khisanth |
having to memorize family trees is no my idea of fun |
| 20:29 |
|
moritz_ |
well, maybe reading S12 will tell you how it's done |
| 20:34 |
|
|
kst joined #perl6 |
| 20:36 |
|
* Khisanth |
waits for FF to stop thrashing |
| 20:50 |
|
|
mikehh_ joined #perl6 |
| 20:51 |
|
|
hercynium joined #perl6 |
| 20:54 |
|
|
ejs joined #perl6 |
| 20:57 |
|
|
digitalise joined #perl6 |
| 21:02 |
|
|
justatheory joined #perl6 |
| 21:03 |
|
|
Su-Shee left #perl6 |
| 21:03 |
|
|
cotto joined #perl6 |
| 21:05 |
|
japhb |
Who is the working tell bot right now? |
| 21:06 |
|
moritz_ |
phenny is, I think |
| 21:07 |
|
japhb |
phenny: tell azawawi In http://ahmadzawawi.blogspot.co[…]and-ecliptic.html, the last bullet point is incorrect: "Use of C++ constructor syntax (in Perl 6 new Foo should be written Foo->new)." |
| 21:07 |
|
phenny |
japhb: I'll pass that on when azawawi is around. |
| 21:07 |
|
japhb |
moritz_: thank you! |
| 21:08 |
|
moritz_ |
japhb: you're welcome |
| 21:08 |
|
moritz_ |
http://perlgeek.de/blog-en/per[…]-failed.writeback summary of my activity tonight |
| 21:30 |
|
|
ejs joined #perl6 |
| 21:40 |
|
|
frew joined #perl6 |
| 21:43 |
|
|
kidd_ joined #perl6 |
| 22:00 |
|
|
kst joined #perl6 |
| 22:02 |
|
|
yahooooo joined #perl6 |
| 22:09 |
|
|
cotto joined #perl6 |
| 22:33 |
|
|
nihiliad joined #perl6 |
| 23:05 |
|
|
ihrd joined #perl6 |
| 23:20 |
|
lichtkind |
night |
| 23:20 |
|
|
donaldh joined #perl6 |
| 23:24 |
|
|
sri_kraih joined #perl6 |
| 23:31 |
|
|
Eevee joined #perl6 |
| 23:31 |
|
|
bacek joined #perl6 |
| 23:32 |
|
|
mjk joined #perl6 |
| 23:34 |
|
|
kst joined #perl6 |
| 23:36 |
|
|
payload joined #perl6 |
| 23:59 |
|
|
lichtkind joined #perl6 |
| 23:59 |
|
lichtkind |
moritz_: did you see i included your blog on http://www.perlfoundation.org/[…]cgi?documentation |