|
»ö« 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:18
colomon joined
|
|||
| colomon | afk but back from vacation! | 00:19 | |
|
00:26
CaptTofu joined
00:46
ashleydev joined
|
|||
| cognominal | is Nil supposed to be defined? I have been bitten by something lile | 00:59 | |
| rakudo: class A {}; say A.?a // "printed if Nil notdefined" | 01:00 | ||
| p6eval | rakudo 4bd478: OUTPUT«» | ||
| cognominal | I can used anyway but that surprised me | 01:01 | |
| I meant, " I can use ||" | 01:02 | ||
|
01:05
dduncan joined,
drbean joined
01:09
lkk- joined
|
|||
| lkk- | does perl6 have Array.scan method ? | 01:09 | |
| tylercurtis | lkk-: what do you want Array.scan to do? | 01:10 | |
| rakudo: say ([\\*] 1, 2, 3, 4, 5).join(', ') | 01:11 | ||
| p6eval | rakudo 4bd478: OUTPUT«1, 2, 6, 24, 120» | ||
| lkk- | tylercurtis: like ruby's , [1,2,3,4,5,6].scan(/../) => got [1,2],[3,4],[5,6] | 01:12 | |
| Tene | lkk-: Not all of us are familiar with Ruby. | ||
| lkk-: What do you want to do that for, exactly? | |||
| tylercurtis looks up ruby's scan. | |||
|
01:12
dduncan left
|
|||
| lkk- | Tene: ok | 01:12 | |
| Tene: just ask | 01:13 | ||
| Tene | rakudo: say (1..6).map({[$^a,$^b]}).perl | ||
| p6eval | rakudo 4bd478: OUTPUT«([1, 2], [3, 4], [5, 6])» | ||
| Tene | you can do it like that. | ||
| lkk-: I ask, because some things in Perl 6 will do that for you. | |||
| rakudo: for 1..6 -> $a, $b { say "$a -- $b" } | |||
| p6eval | rakudo 4bd478: OUTPUT«1 -- 23 -- 45 -- 6» | 01:14 | |
| lkk- | Tene: thank you , I see | ||
| Tene | map, for, etc. will accept as many parameters as their arity. | ||
| tylercurtis | lkk-: is there an Array.scan method in ruby? I get a NoMethod error running your example code with ruby 1.8.6 | 01:16 | |
| lkk- | tylercurtis: sorry , that have String.scan | ||
|
01:17
_macdaddy joined,
cotto_work joined,
tuxuday joined
|
|||
| tylercurtis | lkk-: so, "123456".scan(/../) should be ["12", "34", "56"]? | 01:19 | |
| lkk- | tylercurtis: yes , ruby just has String.scan , 'abcd'.scan(/../) => ["ab", "cd"] | ||
| tylercurtis | star: say "123456".comb(/../).perl | ||
| p6eval | star 2010.07: OUTPUT«("12", "34", "56")» | ||
| lkk- | tylercurtis: comb , yes thank you | ||
| rcfox | What's the purpose of Str.indent? | 01:24 | |
| perlcabal.org/syn/S32/Str.html#indent | |||
|
01:25
plobsing joined
|
|||
| rcfox | Oh, I guess it might be useful for printing tree, or something. | 01:25 | |
| I just had this image of people trying to pretty print code with it. | 01:26 | ||
|
01:31
flatwhatson joined
|
|||
| melte | is module importing NYI? as in: perl6 -e 'use Benchmark <timethis>' | 01:44 | |
| star: use Benchmark <timethis>; # modules packaged with the bot? | 01:45 | ||
| p6eval | star 2010.07: OUTPUT«===SORRY!===Unable to find module 'Benchmark' in the @*INC directories.(@*INC contains: /home/p6eval/.perl6/lib /home/p6eval/rakudo-star-2010.07/install/lib/parrot/2.6.0/languages/perl6/lib .)» | ||
| melte | :( | ||
| tylercurtis | rakudo: use Test; plan 5; ok 1, 'testing'; is 4, 5; lives_ok { &*foo(); }; dies_ok { die 1; }; nok False; | 01:48 | |
| p6eval | rakudo 4bd478: OUTPUT«1..5ok 1 - testingnot ok 2 - # got: '4'# expected: '5'not ok 3 - ok 4 - ok 5 - # Looks like you failed 2 tests of 5» | ||
| sorear | module importing? NYI? Absolutely not | 01:50 | |
| melte | I mean...importing subs/variables, which does not work for me in the above case | 01:51 | |
| sorear | rcfox: It was designed by me for printing code, yes | ||
| rcfox: extracted from viv | 01:52 | ||
| rcfox | viv? | ||
| sorear | melte: explicit import lists don't work | ||
| rcfox: the 6->5 converter | |||
| colomon | star: use Benchmark; | ||
| p6eval | star 2010.07: OUTPUT«===SORRY!===Unable to find module 'Benchmark' in the @*INC directories.(@*INC contains: /home/p6eval/.perl6/lib /home/p6eval/rakudo-star-2010.07/install/lib/parrot/2.6.0/languages/perl6/lib .)» | ||
| colomon | star: use benchmark; | 01:53 | |
| p6eval | star 2010.07: OUTPUT«===SORRY!===Unable to find module 'benchmark' in the @*INC directories.(@*INC contains: /home/p6eval/.perl6/lib /home/p6eval/rakudo-star-2010.07/install/lib/parrot/2.6.0/languages/perl6/lib .)» | ||
| melte | hm. what is the package syntax for direct access, like perl5 Benchmark::timethis ? | ||
| tylercurtis | Benchmark::timethis? | ||
| rcfox | sorear: Only using spaces seems rather narrow-minded. That's probably going to sound offensive, but I couldn't think of a nicer way of saying it. | ||
| colomon | Rakudo doesn't have a p6 Benchmark module. Is it in R*? | ||
| rcfox | colomon: I don't seem to have it. | 01:54 | |
| sorear | rcfox: indent is designed to do everything I need and nothing I don't | ||
| melte | colomon: from modules.perl6.org, I'm playing/fixing my benchmarking | ||
| rcfox | sorear: So then why is it in the spec? | ||
| sorear | rcfox: I didn't need to indent code with asterisks then. If you do, submit a RFC on p6l | ||
| rcfox: Ask TimToady | 01:55 | ||
| He's the one who pushed to move it into the spec | |||
| rcfox | :\\ | ||
|
01:55
CaptTofu joined
|
|||
| mantovani | guys hi | 01:56 | |
| I download rakudo, and when I try do "perl6 --help" I get, | 01:57 | ||
| nopaste ? | |||
| paste? | |||
| don't have bot :( | |||
| nopaste.snit.ch/22656 | |||
| the error ^ | 01:58 | ||
| or perl6 help, perl6 h | |||
| melte | tylercurtis: is that's an answer (and not a question), it also doesn't work atm | 02:00 | |
| tylercurtis | melte: if there's a timethis sub in Benchmark, it should. | ||
| rcfox | melte: Does 'use Benchmark' work? | 02:01 | |
| melte | rcfox: yes, silly :p | 02:02 | |
| rcfox | Just making sure... | ||
| melte | $ perl6 -e 'use Benchmark; timethis(1, sub {}); Benchmark::timethis(1, sub {})' | ||
| $ perl6 -e 'use Benchmark; timethis(1, sub {}); Benchmark::timethis(1, sub {})'Can not find sub Benchmark::timethis | |||
| hm, weird paste | 02:03 | ||
| rcfox | Is timethis declared with 'is export' ? | ||
| melte | github.com/perlpilot/benchmark/blob...chmark.pm6 for reference | ||
| yes | |||
| rcfox | Hm. | 02:04 | |
| sorear | Is timethis declared with 'our'? | ||
| melte | no | ||
| sorear | then Benchmark::timethis won't work. | ||
| melte | okay, thanks | ||
| rcfox | Why is that? | 02:05 | |
| melte | and in theory if explicit imports worked, I could make that happen? | ||
| sorear | melte: Why can't you just use "timethis"? | ||
| melte | with something like: use Benchmark :OUR<timethis> | ||
| sorear: I can. was just trying to figure out if I could call a different non-exported sub | 02:06 | ||
| sorear | melte: non-exported subs are completely private unless declared our | ||
| you can't even request them with import lists | 02:07 | ||
| melte | okay | ||
|
02:13
anarchomaniac joined
|
|||
| [particle] | melte: read synopsis 11 for more details | 02:20 | |
|
02:23
araujo joined
|
|||
| melte | [particle]: thanks, I was browsing it | 02:26 | |
| it'd be hard to find another resource anywhere, at the moment, that would explain the syntax for importation | 02:28 | ||
|
02:30
agentzh joined
02:35
bwinkler joined
02:39
LaVolta joined
03:23
anarchomaniac joined
03:34
alc joined
04:01
TiMBuS joined
|
|||
| rcfox | rakudo: my @arr = ([1,0],[0,1]); say @arr.perl; my @temp = @arr[1]; @arr[1] = @arr[0]; @arr[0] = @temp; @arr.perl; say @arr.perl; | 04:28 | |
| p6eval | rakudo 4bd478: OUTPUT«[[1, 0], [0, 1]][[[0, 1]], [1, 0]]» | ||
| rcfox | Why's it doing this? | 04:29 | |
| And how do I fix it? | |||
| sorear | Why's it doing what? | ||
| Oh | |||
| rcfox | It's got another level of indirection on @arr[0] | ||
| sorear | You need to change @temp to $temp | 04:30 | |
| @arr[1] is being treated as a single list item, so assigning it to @temp promoted it to a one-element list | |||
| rcfox | Oh, I see. | ||
| Thanks. | 04:31 | ||
|
04:43
dudulz joined
04:45
mantovani joined,
alc joined
|
|||
| rcfox | rakudo: my @arr = 1..5; @arr »+=» 1; say @arr | 04:45 | |
| p6eval | rakudo 4bd478: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in <anon> at line 204:CORE.setting in 'hyper' at line 1 in 'hyper' at line 211:CORE.setting in main program body at line 1» | ||
|
05:12
anarchomaniac left
|
|||
| dalek | ecza: c11c833 | sorear++ | (4 files): Rebuild regex engine using gather/take and coroutines |
05:15 | |
|
05:26
Mowah joined
05:41
kaare joined
05:45
drbean joined
05:49
cjk101010 joined
|
|||
| alester | Thanks, moritz++ perlbuzz.com/2010/08/im-glad-to-hea...-slow.html | 05:54 | |
|
06:00
wtw joined
|
|||
| dalek | ecza: 6773107 | sorear++ | Kernel.cs: Fix recursive gather/take |
06:06 | |
| ecza: 8ea4ced | sorear++ | (4 files): Implement <foo> and <.foo> in regexes |
|||
| melte | I wonder how much overall speed improvement will come from isolated changes. like it seems generating and/or assigning lists/ranges is really slow (my @a = ^10000) | 06:09 | |
|
06:11
alc joined
|
|||
| melte | most of the slowness in my code is using for loops like that, 10x slower than while or loop | 06:11 | |
| sorear | that's not much of a suprise | 06:13 | |
| there's a lot of overhead in the lazy list system | |||
| melte nods | |||
| moritz_ | good morning | 06:20 | |
|
06:21
uniejo joined
|
|||
| sorear | hello moritz | 06:24 | |
| (hmm. given that I have source position annotations and $?ORIG already, I wonder how hard it would be to add Code.Str) | 06:25 | ||
|
06:27
simcop2387 joined
06:40
wamba joined
06:43
Axius joined
06:45
masak joined
|
|||
| masak | good morning, #perl6. | 06:45 | |
| sorear | hello masak | 06:46 | |
| I finally got subrules working in niecza | |||
| masak | great. | ||
| sorear: can you backtrack into a subrule? | |||
| [backlog] cognominal is surprised over A.?a // "fallback" not working as Least Surprise expects. we need to do something about this. | 06:47 | ||
| sorear | masak: not only can you, but you must! ratcheting is NYI | 06:49 | |
| masak | mantovani: thanks for making us aware of this. I will submit a ticket about it, and it'll hopefully get fixed for the next release. | ||
| masak submits rakudobug about 'perl6 --help' not working | |||
| what mechanism re-awakens a subrule that has already returned a Match? | 06:52 | ||
|
06:52
d4rt joined
|
|||
| masak | sorear: ^ | 06:55 | |
|
07:20
Axius joined
|
|||
| sorear | masak: a subrule looks like sub subrule($c) { gather ... lots and lots of loops ... { take $newc } } | 07:29 | |
| masak: re-awakening is just shifting off another cursor | |||
| masak | ooh, nice. | 07:30 | |
| cognominal | rakudo: my @a; say @a?[0].perl | 07:32 | |
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Confused at line 22, near "say @a?[0]"» | ||
| masak | cognominal: only methods. | 07:33 | |
| cognominal | too bad. | ||
| masak | cognominal: why? .[] already DTRT. | ||
|
07:33
Su-Shee joined
|
|||
| masak | as does .{} | 07:33 | |
| cognominal | Can I chain it? | 07:34 | |
| masak | yes. | ||
| cognominal | rakudo: my @a; say @a?[0].?a | ||
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Confused at line 22, near "say @a?[0]"» | ||
| cognominal | oops | ||
| rakudo: my @a; say @a[0].?a | |||
| p6eval | rakudo 4bd478: OUTPUT«» | ||
| cognominal | ok, cool | ||
| rakudo: my @a; say @a[0].perl | 07:35 | ||
| p6eval | rakudo 4bd478: OUTPUT«Any» | ||
|
07:42
d4rt joined
|
|||
| rcfox | Use of uninitialized value in numeric context | 07:55 | |
| I wish it would tell me where or what. :\\ | |||
|
07:55
Casan joined
|
|||
| masak | rcfox: do you have a golfed example? | 07:55 | |
|
07:55
lauanana joined
|
|||
| sorear | niecza: my $x; say $x + 2 | 07:55 | |
| p6eval | niecza 8ea4ced: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object at Niecza.Kernel.UnboxDO (Niecza.DynObject o) [0x00000] in <filename unknown>:0  at Niecza.Kernel.UnboxAny (IP6 o) [0x00000] in <filename unknown>:0  at | ||
| ..SAFE.Infix_46C (Ni… | |||
| rcfox | masak: Not really... | 07:56 | |
| rakudo: my $x; say $x + 2 | 07:57 | ||
| p6eval | rakudo 4bd478: OUTPUT«Use of uninitialized value in numeric context2» | ||
| sorear | rakudo++ | ||
| rcfox | Hm, it still tries to evaluate it... That's... annoying... | ||
| sorear | on the other hand, maybe you would have preferred the crash with full backtrace niecza gives :p | 07:58 | |
| rcfox | Indeed. | ||
| How does this --trace flag work? | 07:59 | ||
|
07:59
cono joined
|
|||
| sorear | try perl6 --trace=4 -e '2+2' | 08:01 | |
| rcfox | Oh boy... | ||
|
08:01
sjohnson joined
|
|||
| sorear | Then you'll love --trace=1 | 08:03 | |
| rcfox | :P | ||
| sorear | rakudo: class Foo { method a:baz {}; method b:!cow {}; method c:sym<baz> {}; method d:foo<a b> {}; }; say Foo.^methods(:local).Str | 08:07 | |
| p6eval | rakudo 4bd478: OUTPUT«c:sym<baz> b:!cow d:foo<a b> a:baz» | ||
| sorear | rakudo: class Foo { method a:baz['x','y'] {}; method b:foo< a > {}; }; say Foo.^methods(:local).Str | 08:08 | |
| p6eval | rakudo 4bd478: OUTPUT«a:baz['x','y'] b:foo< a >» | ||
| sorear | :/ | ||
| moritz_ | sorear: btw it seems that niecza automatic rebuild now works | ||
| sorear | moritz_++ ! | ||
| moritz_ | the order of PATH entries was different on interactive shell and cron, so the cron script would pick up a perl with some missing modules | 08:09 | |
| sorear | yow. | 08:10 | |
| moritz_ | star: my @array = ( 1 , 2 , 3 , 4 ); | 08:18 | |
| p6eval | star 2010.07: ( no output ) | ||
| moritz_ | star: my @array = ( 1 , 2 , 3 , 4 ); say "a: @array[]" | ||
| p6eval | star 2010.07: OUTPUT«a: 1 2 3 4» | ||
| moritz_ | star: my @array = ( 1 , 2 , 3 , 4 ); say "a: @array.sort()" | 08:20 | |
| p6eval | star 2010.07: OUTPUT«a: 1 2 3 4» | ||
| sorear | What does method ::foo {} mean? | 08:22 | |
| Or is it a semantic error I should sorry on? | |||
| cono | std: say "a: @(3, 2, 1).sort()" | ||
| p6eval | std 31912: OUTPUT«ok 00:01 116m» | ||
| cono | rakudo: say "a: @(3, 2, 1).sort()" | 08:23 | |
| p6eval | rakudo 4bd478: OUTPUT«a: 1 2 3» | ||
| moritz_ | sorear: I have no idea :( | ||
| sorear adds a not understood #XXX | 08:24 | ||
|
08:25
LaVolta joined
|
|||
| squeeky | good morning, channel. | 08:25 | |
| moritz_ | good morning squeeky | ||
| cono | squeeky: morning | 08:26 | |
| moritz_ | iirc you were happy in the backlog... did you managed to fix R* packaging? | ||
| squeeky | yes. I'm now waiting for it to be included in. | ||
| github.com/mxcl/homebrew/issues/issue/2122 btw. | |||
| moritz_ | what did you need to change to make it run? | 08:28 | |
| squeeky | stop using rakudo's bootstrap of parrot and just use parrot as a separate dep. | ||
| moritz_ | sounds sane for packaging | ||
| btw www.perlmonks.org/?node_id=853975 more Perl 6 questions on perlmonks :-) | 08:29 | ||
| sorear might need to rephrase a few of these error messages for the 1.0 release | 08:33 | ||
| $M->sorry('Defining a non-our sub with a package-qualified name makes no sense'); | |||
| mathw | moritz_: nice, a sensible question too | ||
| moritz_: and your answer is a masterpiece of clarity and elegance | |||
| moritz_ | thanks | 08:34 | |
| sorear: I plan to work on unifying (and objectifying) error messages anyway | |||
| ie a catalog of error messages, and have them wrapped in objects to make them introspectable | 08:35 | ||
| and with i18n hooks etc. | |||
| rcfox | Blah. | 08:36 | |
| moritz_ | blah? | ||
| rcfox | I seem to have a choice between infinite recursion and undefined values. | ||
| sorear | moritz_: unifying across all compilers? | 08:37 | |
| moritz_ | not good | ||
| sorear: yes | 08:39 | ||
| sorear: and in the test suite | |||
| sorear: I want something that can easily be smart-matched against | |||
| something like when X::CompileTime & X::Fatal { ... } maybe | 08:40 | ||
| sorear | moritz_: one spec change I'd really like to see is for eval to stop catching exceptions | 08:41 | |
| moritz_ | sorear: me too | ||
|
08:44
arnsholt joined,
dakkar joined
|
|||
| cono | rakudo: say "a: @(3 2 1).sort()" | 08:46 | |
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Unable to parse circumfix:sym<sigil>, couldn't find final ')' at line 22» | ||
| rcfox | Woo, I got it to work! | 08:49 | |
| It's kinda dumb that you need to use temporary variables... | |||
|
08:50
cognominal joined
|
|||
| rcfox | rakudo: role n { method Num { self.(); }}; my $a = {2} does n; my $b = {3} does n; my $c = {$a*$b} does n; $a = {1+$c}; say $a(); | 08:51 | |
| p6eval | rakudo 4bd478: OUTPUT«Method 'Num' not found for invocant of class 'Block' in 'Cool::Numeric' at line 1757:CORE.setting in 'Cool::Numeric' at line 1758:CORE.setting in 'infix:<*>' at line 6581:CORE.setting in <anon> at line 22:/tmp/7LebBuEuxI in 'Num' at line 22:/tmp/7LebBuEuxI in | ||
| ..'Cool::Num… | |||
| moritz_ | rakudo: my %h = a => 1, b => 2; say "%h{}" | ||
| p6eval | rakudo 4bd478: OUTPUT«1 2» | ||
| rcfox | rakudo: role n { method Num { self.(); }}; my $a = {2} does n; my $b = {3} does n; my $c = {$a*$b} does n; $a = {1+$c} does n; say $a(); | ||
| p6eval | rakudo 4bd478: OUTPUT«maximum recursion depth exceeded in 'Num' at line 22:/tmp/R4XlUYMgzl in 'Num' at line 22:/tmp/R4XlUYMgzl in 'Cool::Numeric' at line 1757:CORE.setting in 'Cool::Numeric' at line 1758:CORE.setting in 'infix:<+>' at line 6581:CORE.setting in <anon> at line | ||
| ..22:/tmp/R4XlUYMg… | |||
| rcfox | On one hand, it makes sense. Obviously, there's a recursive circle there. | 08:52 | |
| On the other hand, why can't I tell it that I mean to use a different reference? | |||
| rakudo: my $a = {2}; say $a; $a = {$a+1}; say $a; | 08:53 | ||
| p6eval | rakudo 4bd478: OUTPUT«_block112_block134» | ||
| rcfox | See, they're different blocks. | 08:54 | |
|
08:54
masak joined
|
|||
| sorear | {2} does n is an error | 08:55 | |
| rcfox | Why? | ||
| sorear | because {2} is not a modifiable lvalue | 08:56 | |
| the operator you seem to want is "but" | |||
| rcfox | does works though. | ||
| rakudo: role n { method Num { self.(); }}; my $a = {2} does n; say $a+1; | 08:57 | ||
| p6eval | rakudo 4bd478: OUTPUT«3» | ||
| sorear | rakudo doesn't implement rw-checking completely | ||
| rcfox | rakudo: role n { method Num { self.(); }}; my $a = {2} but n; say $a+1; | ||
| p6eval | rakudo 4bd478: OUTPUT«3» | ||
|
08:58
drbean joined
|
|||
| cono | rcfox: {2} <- block here? | 08:59 | |
| sorear | {2} does n, iiuc, applies n to all Block instances | ||
| rcfox | rakudo: role n { method Num { self.(); }}; my $a = {2} does n; my $b = {3}; say $b+1; | 09:00 | |
| cono: Yes. | |||
| p6eval | rakudo 4bd478: OUTPUT«Method 'Num' not found for invocant of class 'Block' in 'Cool::Numeric' at line 1757:CORE.setting in 'Cool::Numeric' at line 1758:CORE.setting in 'infix:<+>' at line 6581:CORE.setting in main program body at line 22:/tmp/gndvOWs7d5» | ||
|
09:00
Axius joined
|
|||
| cono | not for all blocks | 09:00 | |
| rcfox | rakudo: role n { method Num { self.(); }}; my $a = {2}; my $b = {3} does n; say $a+1; | 09:01 | |
| p6eval | rakudo 4bd478: OUTPUT«Method 'Num' not found for invocant of class 'Block' in 'Cool::Numeric' at line 1757:CORE.setting in 'Cool::Numeric' at line 1758:CORE.setting in 'infix:<+>' at line 6581:CORE.setting in main program body at line 22:/tmp/DzI1ogPBLJ» | 09:02 | |
|
09:03
briang joined
|
|||
| sorear | rakudo: role n { method Num { self.(); }}; my $a = {2}; my $b = $a does n; say $a + 1; | 09:03 | |
| p6eval | rakudo 4bd478: OUTPUT«3» | ||
| sorear | rakudo: role n { method Num { self.(); }}; my $a = {2}; my $b = $a but n; say $a + 1; | ||
| p6eval | rakudo 4bd478: OUTPUT«Method 'Num' not found for invocant of class 'Block' in 'Cool::Numeric' at line 1757:CORE.setting in 'Cool::Numeric' at line 1758:CORE.setting in 'infix:<+>' at line 6581:CORE.setting in main program body at line 22:/tmp/qFdxqFTI6s» | ||
| cono | rakudo: role n { method Num { self.(); }}; my $a = {2}; my $b = $a but n; say $b + 1; | 09:04 | |
| p6eval | rakudo 4bd478: OUTPUT«3» | ||
| cono | Ah, I got the "but" keyword :) | 09:05 | |
| rcfox | rakudo: my $a = 1 but n; say $a +1 | ||
| p6eval | rakudo 4bd478: OUTPUT«Could not find sub &n in main program body at line 22:/tmp/7BOQ5duBWZ» | ||
| rcfox | Whoops. | ||
| rakudo: role n { method Num { self.(); }}; my $a = 1 but n; say $a +1 | 09:06 | ||
| p6eval | rakudo 4bd478: OUTPUT«2» | ||
| rcfox | Hm. | ||
| If nothing else, but is more convenient. | |||
| rakudo: role n { method Num { self.(); }}; my $a = 1 does n; say $a +1 | |||
| p6eval | rakudo 4bd478: OUTPUT«2» | ||
| rcfox | ... | ||
| rakudo: role n { method Num { self.(); }}; my $a = 1; $a does n; say $a +1 | |||
| p6eval | rakudo 4bd478: OUTPUT«2» | ||
| rcfox | What. | ||
| This is been complaining to me in my code... | 09:07 | ||
| moritz_ | note that + used the Numeric method, not Num | ||
| rcfox | Oh. | ||
| dalek | ok: 7875129 | moritz++ | src/basics.pod: [basics] be more verbose about interpolation of arrays and hashes; more examples |
||
| rcfox | rakudo: role n { method Numeric { self.(); }}; my $a = 1; $a does n; say $a +1 | ||
| p6eval | rakudo 4bd478: OUTPUT«2» | ||
| rcfox | :\\ | ||
| rakudo: role n { method Numeric { self.(); } method Num { self.(); }}; my $a = 1; $a does n; say $a +1 | 09:08 | ||
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
| rcfox | Bah! | ||
| moritz_ | though it might not work for numbers at all | ||
| why would you coerce a number to Numeric after all? | |||
| rcfox | Well, it would complain to me if I tried to give an Integer a Num() method. | ||
| sorear | you're also assuming that numbers are Perl 6 objects | ||
| which is not 100% true yet | |||
| there's still a bit of backdoor dealing with parrot-level operators | 09:09 | ||
| rcfox | rakudo: role n { method Num { self.(); }}; my Int $a = 1; $a does n; | ||
| sorear | someone else probably knows the rules in more detail | ||
| p6eval | rakudo 4bd478: ( no output ) | ||
| rcfox | rakudo: role n { method Num { self.(); }}; my Int $a = 1; $a does n; say $a+1; | ||
| p6eval | rakudo 4bd478: OUTPUT«2» | ||
| rcfox | star: role n { method Num { self.(); }}; my Int $a = 1; $a does n; say $a+1; | ||
| p6eval | star 2010.07: OUTPUT«2» | ||
| rcfox | star: role n { method Num { self.(); }}; my Num $a = 1; $a does n; say $a+1; | 09:10 | |
| p6eval | star 2010.07: OUTPUT«Type check failed for assignment in '&infix:<=>' at line 1 in main program body at line 22:/tmp/BxF98_6Ux6» | ||
| sorear | std: $::::Foo | ||
| p6eval | std 31912: OUTPUT«ok 00:01 112m» | ||
| sorear | I don't think that should be legal | ||
| cono | rakudo: role n { method Num { self.() - 1; }}; my Num $a = 5; $a does n; say $a+1; | ||
| p6eval | rakudo 4bd478: OUTPUT«Type check failed for assignment in '&infix:<=>' at line 1 in main program body at line 22:/tmp/8gKScd1DI3» | ||
| cono | rakudo: role n { method Num { self.() - 1; }}; my $a = 5; $a does n; say $a+1; | 09:11 | |
| p6eval | rakudo 4bd478: OUTPUT«6» | ||
| cono | rakudo: role n { method Numeric { self.() - 1; }}; my $a = 5; $a does n; say $a+1; | ||
| p6eval | rakudo 4bd478: OUTPUT«6» | ||
| rcfox | That's odd... | ||
| Oh. | |||
| Er. | 09:12 | ||
| Blah, formatting output from Octave for comparison in my tests is a pain. | 09:15 | ||
| moritz_ | are you doing matrixy stuff? | ||
| rcfox | Yep. | 09:16 | |
| moritz_ | did you see colomon's Vector module? | ||
| rcfox | I looked at it, but mine thing is special. ;) | 09:17 | |
| moritz_ | ok | ||
| rcfox | Also, he does weird stuff with fixed sizes. :x | 09:18 | |
|
09:19
cognominal joined
|
|||
| masak | today's autopun from jonasbn. twitter.com/jonasbn/status/20780159951 | 09:19 | |
| rcfox | Heh. | ||
| moritz_ | :-) | ||
| arnsholt | XD | 09:20 | |
| masak | cono++ # encouraging me to think about pack/unpack with github.com/cono/p6-pack-unpack | 09:22 | |
|
09:24
Sanitoeter joined
|
|||
| moritz_ | phenny: tell jnthn could you maybe take a look at www.perlmonks.org/?node_id=853113 ? seems to be an MSI installier issue | 09:32 | |
| phenny | moritz_: I'll pass that on when jnthn is around. | ||
| masak | gm | ||
| moritz_: how do you manage to keep track of perlmonks all the time? is there a feed? | |||
| moritz_ | masak: I'm currently going through "Seekers of Perl Wisdom". Usually I update the "Newest Nodes" a few times a day | 09:33 | |
| masak | ok. wow. | ||
| szbalint | yeah, dedication :) | 09:36 | |
|
09:37
M_o_C joined
09:41
cognominal joined
|
|||
| cono | masak: I guess sub pack must have prototype: Str, List? | 09:42 | |
| masak | um. possible confusion of terms detected. | ||
| do you mean a subroutine signature? | |||
| cono | masak: yeah :) | 09:43 | |
| masak | cono: it's all in S32/Str. you really should look there. | ||
| cono | masak: okie | ||
| masak | our buf8 multi pack( *@items where { @items »~~» Pair }) | ||
| our buf8 multi pack( Str $template, *@items ) | |||
| moritz_ | where { [&&] @items »~~» Pair } # no? | 09:44 | |
| otherwise it just evalutes a list of bools for truthness | 09:45 | ||
| rcfox | moritz_: Here's what my matrix class can do, with an example of forward kinematics from my robotics course. gist.github.com/516995 | 09:46 | |
| cono | Every item of array is a Pair? | ||
| moritz_ | rcfox: cool | ||
| masak | moritz_: oh, you're right. fixing. | ||
| rcfox | It's probably going to be really slow in the long run though. :P | 09:47 | |
|
09:47
dolmen joined
|
|||
| pugssvn | r31937 | masak++ | [S32/Str] fixed thinko in &pack signature | 09:47 | |
| r31937 | | |||
| r31937 | Spotted by moritz++ | |||
| dolmen | \\o/ | 09:48 | |
| moritz_ | o/ | 09:49 | |
|
10:00
Italian_Plumber joined
|
|||
| cono | masak: don't see > and < specifiers | 10:03 | |
|
10:04
tadzik joined
|
|||
| tadzik | o/ | 10:04 | |
| masak | cono: good point. what are those? | ||
| tadzik! \\o/ | |||
| cono | masak: force big or little endians | ||
| masak | huh. | 10:05 | |
| the more I learn about &pack, the more I realize we have to take this one piece at a time :) | |||
| sorear | I love the way perl 5 will Str-ify array refs without warning. Not. | ||
| moritz_ | you can bless them, and emit a warning in the overloaded stringification method :-) | 10:06 | |
| cono | masak: iiuc grammar not apply to this kind "(ccc)@23" | ||
| masak | cono: looks to me it does. | 10:07 | |
| cono | masak: it means to null-fill group (ccc) to 23 bytes | ||
| masak | cono: it'd divide it into one <group> and one <specifier> <count> | ||
| cono: so it sees two <template>s. | 10:08 | ||
| cono | ah, yeah, sorry | ||
| masak: (c)[s] is parse like (c) <- group [s <- specifier ] ? | 10:10 | ||
| masak | no, the [s] would parse as <count> | 10:11 | |
| which would contain a <specifier>. | |||
| cono | masak: perl -e 'print pack("(cc)[@]", 10, 10, 10)' | 10:12 | |
| oha | are the spec to port the pack as it was in perl5? or are the pack going to get only something from p5? | 10:15 | |
|
10:16
clintongormley joined
|
|||
| moritz_ | a 1:1 port doesn't make sense, if you ask me | 10:17 | |
| because the languages are too different | |||
|
10:17
thebird joined
|
|||
| moritz_ | speaking of output formatting... I kinda yearn for a printf with named parameters | 10:18 | |
| which would make much sense in the context of error messages, for example | |||
| masak | sushi & | ||
| moritz_ | different languages might need to access the information to be included in error messages in different order | ||
| sorear | that's been part of ISO sprintf for a couple years | 10:19 | |
| moritz_ | do you know the syntax for it? | ||
| sorear | perl6: printf "%2$d %1$d\\n", 5, 10 | 10:20 | |
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Symbol '$d' not predeclared in <anonymous> (/tmp/J0fc7L8ZCF:22)» | ||
| ..pugs: OUTPUT«*** Undeclared variable: ("$d",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0x2b09f2a6f4e9>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0x2b09f2a6f3b1>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0x2b09f… | |||
| moritz_ | sorear: that's positional, not named | ||
| sorear | perl6: printf "%2\\$d %1\\$d\\n", 5, 10 | ||
| p6eval | rakudo 4bd478: ( no output ) | ||
| ..pugs: OUTPUT«pugs: Printf.printf: bad formatting char $» | |||
| sorear | moritz_: the "in different order" part through me off, sorry | ||
| moritz_ | though we might generalize the syntax to %varname$format | 10:21 | |
| sorear | in any case I wonder if there is a more quintessentially Perl way to do formats | 10:22 | |
|
10:22
envi^home joined
|
|||
| oha | moritz_, as i were speaking with masak, i see that pack is a single total operation, but it could be nice to use the Buf item as a fifo, where you can push and shift things | 10:23 | |
| sorear | besides eval "\\"$format\\"" | ||
| dalek | ecza: 4ecd8ab | sorear++ | (5 files): Overhaul handling of names; make &infix:<+> and leading double colons work |
||
| oha | rakudo: sub foo (&code(Str)) { code("foo"); }; foo( -> Str $s { say $s; }); | 10:33 | |
| p6eval | rakudo 4bd478: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub-signature of parameter &code in 'foo' at line 22:/tmp/driIJrsAM5 in main program body at line 22:/tmp/driIJrsAM5» | ||
| oha | rakudo: sub foo (&code(Str)) { code("foo"); }; foo(sub (Str $s) { say $s; }); | 10:34 | |
| p6eval | rakudo 4bd478: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub-signature of parameter &code in 'foo' at line 22:/tmp/rmYK3mLftX in main program body at line 22:/tmp/rmYK3mLftX» | ||
| oha | why? | ||
|
10:36
ak_ joined
|
|||
| kaare_ | moritz_: Your blog post has a bad <a> tag | 10:50 | |
|
10:52
azert0x joined
10:54
lafille joined
|
|||
| tadzik | masak: hmm, shouldn't ufo/pls/whatever install pod files too, not only pm/pm6? | 10:57 | |
| oha | rakudo: my %h; %h{'oo'} = 3; my $m = "foo bar" ~~ /o./; say %h{$m}; | ||
| p6eval | rakudo 4bd478: OUTPUT«maximum recursion depth exceeded in 'Block::count' at line 5621:CORE.setting in 'Block::count' at line 5625:CORE.setting in 'Any::postcircumfix:<{ }>' at line 1 in <anon> at line 1 in 'Any::postcircumfix:<{ }>' at line 1 in <anon> at line 1 in | ||
| ..'Any::postcircumfix:<{ }… | |||
|
10:58
M_o_C joined
|
|||
| oha | rakudo: my %h; %h{'oo'} = 3; my $m = "foo bar" ~~ /o./; say %h{"$m"}; | 10:58 | |
| p6eval | rakudo 4bd478: OUTPUT«3» | ||
| oha | isn't it a bug? | ||
|
10:59
meppl joined
|
|||
| sorear | >250 tests! \\o/ | 10:59 | |
|
11:00
Italian_Plumber joined
|
|||
| colomon | oha: it's a known issue | 11:00 | |
| dalek | ecza: 108e2bb | sorear++ | (4 files): Implement optional parameters and default values |
||
| oha | i will not fill a bug, ty colomon | ||
|
11:04
cognominal joined,
Woody2143 joined
11:08
cspencer joined
11:11
BooK joined,
jferrero joined
|
|||
| moritz_ | kaare_: fixed, thanks | 11:12 | |
|
11:15
sECuRE left
|
|||
| sorear can now compile around 20% of STD.pm6... pity most of that is comments | 11:17 | ||
| cspencer | hello, all! | 11:18 | |
| arnsholt | sorear: What, you want to compile actual code? You're weird ;p | 11:19 | |
| dalek | ecza: a7c5198 | sorear++ | Niecza/Actions.pm: Fix $foo.<bar> syntax |
||
| cspencer | i've got a quick question re: the <...> circumfix op for constructing parcels - is it possible to including characters like \\n or \\t in there and have them appear as the intended characters? | ||
| ie) <\\n \\t \\r> | |||
| moritz_ | cspencer: no, only witgh <<...>> | 11:20 | |
| cspencer | ah, thanks :) | ||
| moritz_ | rakudo: say <<a\\nb c\\td>>.perl | ||
| p6eval | rakudo 4bd478: OUTPUT«("a\\\\nb", "c\\\\td")» | ||
| moritz_ | hum | ||
| that did not interpolate | |||
| cspencer | (what're the name of those ops anyways? i'm trying to find them in the docs) | ||
| no, it doesn't appear it did :) | |||
| moritz_ | cspencer: "angle quotes", "circumfixes" | 11:21 | |
| S02/Literals/ | |||
| cspencer | thanks, mortiz! | ||
| it seems like there's been a lot of change since i last paid attention about a year ago :) | 11:22 | ||
| moritz_ | a lot also stayed the same (at least in spec land) | ||
| cspencer | yes, i'm just starting to re-read through things again to get refamiliarized | 11:23 | |
|
11:29
abrasive left
|
|||
| masak is back | 11:33 | ||
| cono | masak: perl -e 'print pack("(cc)[@]", 10, 10, 10)' | 11:36 | |
| masak: and Grammar already works in rakudo ? | |||
| masak | cono: don't know what you want to say with the one-liner. | ||
| cono: yes, grammars work well in Rakudo. | |||
| cono | masak: matched by gramar, but wrong | 11:37 | |
| masak | wrong how? | ||
| remember that I'm not an expert in Perl 5's pack. | 11:38 | ||
| cono | masak: Within []-length '@' not allowed in pack at -e line 1. | ||
| masak | that's more of a runtime issue than a parsing issue. | ||
| of course, we could disallow it at parse time, too. | |||
| but I'm not sure we need to bog down the spec with that. | |||
| cono | masak: ok, I will learn about Grammar, and will try to implement :) | 11:39 | |
| masak | cono++ | ||
| cono | masak: thanks | ||
|
11:44
briang left
|
|||
| pugssvn | r31938 | masak++ | [S32/Str] nicer where clause for &pack | 11:50 | |
| r31938 | | |||
| r31938 | Reads better and is more amenable to compiler optimization. Suggested by | |||
| r31938 | TheDamian++. | |||
| takadonet | morning all | 11:51 | |
|
11:53
rgrau joined
11:56
alc joined
11:58
clintongormley joined
|
|||
| szabgab | masak: jnthn either of you planning to attend fscons.org/ ? | 12:04 | |
| masak | not until you mentioned it, no :) | 12:05 | |
| jnthn is afk until tomorrow. | |||
| szabgab | its in Gotenburg | 12:06 | |
| and I am not sure where do you live ? | |||
|
12:06
leprevost joined
|
|||
| szabgab | besides on #perl6 I mean | 12:06 | |
| masak | other side of the country, but east-west is not so long a distance. :) | ||
| moritz_ | :-) | 12:07 | |
| rakudo: say ?( all( "a" => 1, "b" => 2) ~~ Pair) | |||
| p6eval | rakudo 4bd478: OUTPUT«0» | ||
| masak | moritz_: what happened there? | 12:08 | |
| moritz_ | masak: rakudo uses smart-matching for type checks. So it checks if the LHS is a Pair - it's not. It's a Junction. | ||
| oha | moritz_, so junction don't go over smart match boundaries? | 12:09 | |
| masak | put differently, infix:<~~> is too posh for autothreading? | ||
| moritz_ | which is wrong, afaict. It should be using .does or .isa for typec checking | ||
|
12:09
Axius joined
|
|||
| masak | oh, good. | 12:09 | |
| is this in RT? | |||
| moritz_ | and properly autothread over ~~ | ||
| not sure | |||
| masak submits rakudobug | 12:10 | ||
| szabgab | masak: so tell me if you submit a talk proposal and if they accept it | ||
| it is afeter the dead line already | |||
| but I think they still sort of accept | |||
| masak | szabgab: huh. bit busy this week with GSoC and things. | ||
| but I'll see what I can do. | |||
| szabgab++ # using the 'kameler' Swedish maining list as a communication medium | 12:12 | ||
| dolmen | masak: pack template is a language itself | ||
| masak | dolmen: yes, it is indeed. | ||
| szabgab | masak: apparently I am the only one using it :) | ||
| masak | dolmen: was that within some context in particular? :) | ||
| szabgab: more or less, yes. it's not very active. | |||
| dolmen | masak: you didn't mention it in "The Prince of Parsea"? Or is my memory failng? | 12:14 | |
| moritz_ | speaking of which... are the slides online somewhere? | ||
| masak | dolmen: I didn't, correct. | ||
| yes. the usual place. | |||
| feather.perl6.nl/~masak | |||
| dolmen is maybe mixing masak's talk with jnthn's one about Signatures | 12:15 | ||
| moritz_ | indeed | ||
| (re slides) | |||
| masak | dolmen: thing is, they're really just string literals, so in my diagram I don't count them as a sublanguage. | ||
| dolmen: they would count as a "poor man's sublanguage", though. | |||
| dolmen | I wonder if Perl6's pack templates should not be implemented as Signature instead of Str | 12:16 | |
| masak | a bit the same way a set of clever subroutine names are a "poor man's DSL" :) | ||
| dolmen: that's an intriguing idea. sounds like a good idea for a module. | |||
| moritz_ | masak++ "Embrace your inner lollipop" | 12:17 | |
| masak | :) | ||
| TimToady laughed at that one :) | |||
| dolmen | :) | ||
| what is the original culture reference of "Embrace your inner..."? | 12:19 | ||
| Su-Shee | psychology of the late 70ies/early 80ies. "embrace your inner child" stuff. | ||
|
12:22
envi^home joined
12:27
rgrau_ joined
|
|||
| moritz_ | sub mkdir-p(@a) { | 12:27 | |
| for [\\~] @a.map({"$_/"}) { | |||
| mkdir($_) unless .IO.d | |||
| } | |||
| moritz_ loves Perl 6 | 12:28 | ||
| frettled | ooh | ||
| masak | moritz_++ | 12:29 | |
| dolmen | Su-Shee++ | ||
| frettled | (++)++ | ||
| masak | meta++ | ||
| cono | moritz_: *~~:d does the same as .IO.d ? | ||
| frettled | ‡++ | ||
| Su-Shee | morse--.--. ;) | ||
| frettled | Su-Shee: you win :D | ||
| moritz_ | cono: you actually need .IO on the RHS of ~~ :d too | ||
| masak bows to Su-Shee's skillz | |||
| moritz_ | rakudo: say '/etc/'.IO ~~ :d | 12:30 | |
| p6eval | rakudo 4bd478: OUTPUT«1» | ||
| masak | moritz_: LHS. | ||
| moritz_ | erm, yes | ||
| rakudo: say '/etc/'.IO.d | |||
| p6eval | rakudo 4bd478: OUTPUT«1» | ||
| moritz_ dysrexic :-) | |||
| cono | RHS, LHS? (shame) | ||
| moritz_ | rakudo: say '/etc/' ~~ :d | ||
| p6eval | rakudo 4bd478: OUTPUT«Method 'd' not found for invocant of class 'Str' in 'Enum::ACCEPTS' at line 4931:CORE.setting in main program body at line 22:/tmp/s3RFbFpMO8» | ||
| masak | cono: "left hand side", etc. | ||
| cono | masak: thanks :) | ||
| masak | rakudo: enum Direction <Left Right>; say Left == False | 12:31 | |
| p6eval | rakudo 4bd478: OUTPUT«1» | ||
| masak | rakudo: enum Direction <Left Right>; say Right == True | ||
| p6eval | rakudo 4bd478: OUTPUT«1» | ||
| dolmen | rakudo: qp{/etc}.WHAT.say | 12:32 | |
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 22» | ||
| moritz_ wonders if qp(/etc} should return the same things as '/etc'.IO | 12:33 | ||
| dolmen | rakudo: pp:q{/etc}.WHAT.say | ||
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
| moritz_ | qp NYI | ||
| masak never liked qp | 12:34 | ||
| frettled | It gives me associations to quoted-printable. | 12:35 | |
| masak | It gives me associations to heavy bikeshedding. | 12:40 | |
| moritz_ | aye | 12:41 | |
| I wonder if we can get away with simply not implementing it | |||
| github.com/moritz/perl6-Module-Starter | 12:42 | ||
|
12:42
c0nspiracy joined
|
|||
| masak | moritz_: nice! pls add to pls. | 12:43 | |
| dolmen loves qp{} | |||
| moritz_ loves nqp | 12:44 | ||
| at least a bit | |||
| dolmen | :) | ||
| szbalint | what is qp btw? | ||
| moritz_ | quote path | 12:45 | |
| masak | szbalint: path constructor. | ||
| Su-Shee | p? nqp? folks, it's n-np these days! ;) | ||
| dolmen | qp{} is literal for Path | ||
| masak | Su-Shee: :) | ||
| dolmen | like "" or q{} for Str | ||
| moritz_ | that's n(1-p) | ||
| szbalint | I'm like frettled on this one. | ||
| masak | someone on Slashdot pointed out that P == NP iff N == 1 or P == 0. | ||
| szbalint | that was easy :) | 12:46 | |
| frettled | masak: that someone is obviously a joker or a nitwit :) | ||
| masak | frettled: hard to tell on Slashdot. :) | ||
| frettled | not xor | ||
| szbalint | haha, I was about to say the same thing frettled :) | ||
| baest | weird, the mkdir call creates directories with permissions 000 on my machine | 12:47 | |
| shouldn't it default to umask | |||
| masak | yes. | ||
| there's an RT ticket about that. | |||
| moritz_ | baest: fixed in latest rakudo | ||
| masak | for now, one has to give the mask explicitly. | ||
| baest | moritz_++, masak++ :) | 12:48 | |
|
12:48
tadzik joined
|
|||
| dolmen | umask--, masak++ | 12:48 | |
| masak | :P | ||
| moritz_ | umasak? | ||
| tadzik | hello again | ||
| masak | tadzik: we meet again. | 12:49 | |
| baest | once more | ||
| frettled | for the first time for the last time? | ||
| masak | frettled: I am your father's brother's nephew's cousin's former roommate. | 12:50 | |
| tadzik | oh moritz_, I see you also have sub mkdirp on top of Your code (module-starter) | 12:51 | |
| looks like a nice module to make | |||
| Something like shell-utils, mkdir -p, rm -r, cp -r etc | 12:52 | ||
| moritz_ | btw extensions to the module-starter thing are very welcome | ||
| it's just an initial thing | |||
| frettled | masak: first, second, or third cousin? | ||
| masak | frettled: zeroth. | 12:53 | |
| dolmen | is Perl grammar runtime extension supported in Star? | ||
| masak | no. | ||
| colomon | masak, moritz_: Just before I left for vacation, I was looking at the Numifying an array yields a Num, not an Int bug. I found I have not the faintest clue how Rakudo actually numifies an array. Any ideas? | 12:54 | |
| masak | except for the special case of user-defined operators. | ||
| colomon: Parrot-level? | |||
| moritz_ | colomon: probably through the get_number vtable | ||
| colomon | masak: I'm guessing Parrot-level stuff is involved, but I don't see how it works. | ||
| prefix:<+> is supposed to call .Numeric now. | 12:55 | ||
| pugssvn | r31939 | moritz++ | [S32::IO] update to new type names, remove some thinkos | ||
| oha | i can't follow how exactly a socket is implemented in parrot. i got up to PIO_* but i can't find the code which does are hiding | 12:59 | |
| any help? | |||
| tadzik | isn't that a Parrot question? | ||
| oha | tadzik, it is :) | ||
| tadzik | :) | ||
| moritz_ | oha: did you find src/pmc/socket.pmc already? | ||
| oha | moritz_, yep :( nothing in | ||
| i've found it refers socket_api.c in parrot | 13:00 | ||
| moritz_ | #include "../src/io/io_private.h" | ||
| oha | but there it will use something like PIO_SEND and PIO_RECV which seems undefined to my grep | ||
| moritz_ | I guess you found that too | ||
| include/parrot/io_unix.h | 13:01 | ||
| Su-Shee | mathw: haven't you been the guy with GIR and p6 bindings? | ||
| moritz_ | #define PIO_SEND(interp, pmc, buf) \\ Parrot_io_send_unix((interp), (pmc), (buf)) | ||
| mathw | Su-Shee: I've talked about them, I haven't done anything about them | ||
| moritz_ | which is defined in src/io/socket_unix.c | 13:02 | |
| Su-Shee | mathw: I was just surfing the seed stuff. _very_ impressive. | ||
| oha | moritz_++ | ||
| moritz_ | oha: I can very much recommend 'ack' (grep on steroids) | ||
| which I used to find that out :-) | |||
| oha | moritz_, more probably, i've just searched on parrot/src and not includes | ||
| mathw | Su-Shee: yes it'd be nice if P6 can end up with something that smooth :) | 13:03 | |
| Su-Shee: I believe it's possible | |||
| Su-Shee | mathw: they're essentially done with gnome, it's amazing. wow. | 13:04 | |
|
13:04
alester joined
13:06
dalek joined
|
|||
| mathw | it's just gobject introspection and runtime binding | 13:07 | |
| Su-Shee | "just" - it's actually down until the socket level, included webkit and all.. :) | 13:09 | |
| mathw | yes | ||
| well gtk webkit has GIR data :) | |||
| Su-Shee | they've also bound a couple of non-gobject libs.. very impressive. | 13:12 | |
|
13:14
Synn joined
|
|||
| mathw | that is a tad harder :) | 13:14 | |
| Synn | what's up | ||
| mathw | Hi Synn | 13:16 | |
| masak | y0 Synn | 13:17 | |
| mathw | o/ masak | ||
| masak | mathw \\o | ||
|
13:18
bluescreen joined
13:21
clintongormley joined,
c0nspiracy_ joined,
LaVolta joined
|
|||
| masak | #phasers tonight? | 13:22 | |
|
13:22
clintongormley left
|
|||
| moritz_ thinks so | 13:22 | ||
| Axius | hello | 13:23 | |
| takadonet | Axius: hey | ||
| masak | hello, Axius | ||
| moritz_ wonders if s/// should desugar to .subst(..., :inplace) | 13:24 | ||
| that would solve the problem of returning something other than the result of the substitution | 13:25 | ||
| cognominal | rakudo: grammar A { token TOP { <a> }; token a { a } }; class A::A { method TOP($/) { say $<a>.keys }} A.parse( 'a', :actions(A::A)) | 13:26 | |
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Confused at line 22, near "class A::A"» | ||
| moritz_ | need ; after } | 13:27 | |
| masak | moritz_: if that works from a spec-consistency perspective, I'm all for it. | ||
| we should have a bot that says "need ; after }". | |||
| moritz_ | if methods are allowed to bind their invocant rw, that looks like the best solution to me | ||
| masak | we could call it semicolonbot. | ||
| moritz_ | masak: it's called p6eval, and neds to be run with std: | 13:28 | |
| cognominal | I know that a match is both an array ans a hash and tht both containers have a keys method but I would expect it to here the keys list the named reductions | ||
|
13:28
clintongormley1 joined
|
|||
| cognominal | rakudo: grammar A { token TOP { <a> }; token a { a } }; class A::A { method TOP($/) { say $<a>.keys }} ; A.parse( 'a', :actions(A::A)) | 13:28 | |
| p6eval | rakudo 4bd478: OUTPUT«» | ||
| moritz_ | the spec isn't clear on that point | 13:29 | |
| cognominal | I think it can be useful on actions for a rule that is a mere alternation list. method alternation($/) { make $/."{($/.keys)[0]}".ast } # if I got that right | 13:31 | |
| masak | fwiw, I'd also expect the subrule names from .keys | ||
| moritz_ | cognominal: are you sure you don't want .caps for that? | 13:32 | |
| masak .oO( .shower-caps ) | 13:33 | ||
| cognominal heads to S05 | |||
| moritz_ | that said, I could very well live with Match.keys returning (Match.list.keys, Match.hash.keys) | ||
| and likewise .values and .kv | |||
| cognominal | Another thing that bother me with actions is there is no way to type and type check .ast | 13:35 | |
| I have just bitten by that. | |||
| moritz_ | how would you want to type .ast? | 13:36 | |
| I kinda don't like the idea of a type constraint on it (more) | 13:37 | ||
| the reason is that a Match object is really produces as the result of a regex match | |||
| while the .ast is populated by an action method | |||
| and there can be multiple sets of action methods for the same regex and thus match object | |||
| so at the place where the match object is create, you can't know the type of the AST | 13:38 | ||
| *created | 13:39 | ||
| moritz_ 's words trail off in the echo chamber ... | |||
| masak | :) | 13:40 | |
| cognominal | method a does ASTType(Str) { } # It is kind like a return type except it is the return type of the .ast method. | 13:41 | |
| ... as called in the a action. | |||
| moritz_ | hm | 13:42 | |
| make() is really just syntactic sugar for setting $/.ast | |||
| not something that's propagated by return exceptions or so | |||
| cognominal | it sets $/.ast so it could check if the type is correct. | 13:43 | |
| if there is a type set... (no pun intended) | |||
| moritz_ | it could. And it feels oh-so-wrong | 13:44 | |
| the thing that makes it so wrong is that make() is a side effect | 13:45 | ||
| if the action method simply returned the AST, and the regex engine assigned it to $/.ast under the hood, all of this would be so much simpler | |||
| rakudo: say 'abc' ~~ .say | 13:49 | ||
| p6eval | rakudo 4bd478: OUTPUT«abc1» | ||
| moritz_ | rakudo: say 'abc' !~~ .say | ||
| p6eval | rakudo 4bd478: OUTPUT«Any()0» | ||
| oha | how to do integer math in p6? | 13:50 | |
| moritz_ | +, *, -, div, % and ** | ||
| masak | moritz_++ # perlgeek.de/blog-en/perl-6/perlmonk...tions.html | ||
| oha | moritz_++ i were missing div | 13:51 | |
| takadonet | www.reddit.com/r/perl/comments/czg3...perlmonks/ | ||
|
13:53
plobsing joined,
dalek joined,
ak joined
13:55
Guest34088 joined
|
|||
| moritz_ | rakudo: given 3 { when True { say "aye" } } | 14:00 | |
| p6eval | rakudo 4bd478: OUTPUT«aye» | ||
| moritz_ | std: given 3 { when True { say "aye" } } | ||
| p6eval | std 31912: OUTPUT«Can't call method "Str" on unblessed reference at STD.pm line 27074.FAILED 00:01 113m» | 14:01 | |
| moritz_ | std: 1 ~~ True | ||
| p6eval | std 31912: OUTPUT«Potential difficulties: Smartmatch against True always matches; if you mean to test the topic for truthiness, please use :so or *.so or ?* instead at /tmp/KRzCMvzGPf line 1:------> [32m1 ~~ True[33m⏏[31m<EOL>[0mok 00:01 113m» | 14:02 | |
| moritz_ wonders why the former doesn't warn | |||
| masak | looks like an stdbug. | ||
|
14:03
xomas_ joined
14:07
ruoso joined
|
|||
| moritz_ | std: 1 !~~ True | 14:17 | |
| p6eval | std 31912: OUTPUT«Potential difficulties: Smartmatch against True always matches; if you mean to test the topic for truthiness, please use :so or *.so or ?* instead at /tmp/BtjzJq3TDa line 1:------> [32m1 !~~ True[33m⏏[31m<EOL>[0mok 00:01 113m» | 14:18 | |
| frettled | Hmm, what was the Unicode character for \\o/ that someone found? | ||
|
14:19
alc joined
|
|||
| masak | .u taurus | 14:20 | |
| phenny | U+2649 TAURUS (♉) | ||
| masak | hm, maybe not :) | ||
| tadzik | star: my @ar = %foo, %bar; my %foo = one => 1; my %bar = two => 2; say @ar.perl; # bug? | ||
| squeeky | .u victory hand | ||
| phenny | U+270C VICTORY HAND (✌) | ||
| p6eval | star 2010.07: OUTPUT«[]» | ||
| tadzik | when I declare @ar at the end, it's ok | 14:21 | |
| masak | tadzik: the bug is that it doesn't parsefail. | ||
| std: my @ar = %foo, %bar; my %foo = one => 1; my %bar = two => 2; | |||
| p6eval | std 31912: OUTPUT«[31m===[0mSORRY![31m===[0mVariable %foo is not predeclared at /tmp/bF0UhYT2mN line 1:------> [32mmy @ar = %foo[33m⏏[31m, %bar; my %foo = one => 1; my %bar = tw[0mVariable %bar is not predeclared at /tmp/bF0UhYT2mN line 1:------> [32mmy @ar = %foo, %bar[33m⏏[31m; my | ||
| ..%… | |||
| tadzik | oh | ||
| by the way, how to make this @ar not flatten the hashes? | 14:22 | ||
| masak | put it in {}s | ||
| or prefix with a \\ | |||
| same as in Perl 5. | |||
| cono | {} will copy hash | 14:23 | |
| $(%foo) | |||
| masak | the former clones, the latter takes a reference. yes, what cono said. | ||
| cono | masak: \\ <- capture in p6 | 14:24 | |
| masak | right. think of it as a reference on steroids :) | ||
| moritz_ | $(%foo) or %foo.item | ||
| cono | rakudo: my %h = 1,2; say (\\%h).WHAT | ||
| p6eval | rakudo 4bd478: OUTPUT«Capture()» | ||
| cono | rakudo: my %h = 1,2; say ($(%h)).WHAT | ||
| p6eval | rakudo 4bd478: OUTPUT«Hash()» | ||
| cognominal | tadzik: better declaring @ar than declaing war. | 14:25 | |
| tadzik | will $%h work? | ||
| cono | rakudo: my %h = 1,2; my @n .= push(%h.item); @n.perl.say | ||
| tadzik | rakudo: my %h = 1,2; say ($%h).WHAT | ||
| p6eval | rakudo 4bd478: OUTPUT«[{"1" => 2}]» | ||
| rakudo 4bd478: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at line 22, near "$%h).WHAT"» | |||
| tadzik | :( | ||
| cono | I like .item :) moritz_++ | ||
|
14:26
molaf joined,
Axius joined
|
|||
| tadzik | no utf8 in hash keys? | 14:26 | |
| star: my %h = 'łódka' => 3; | 14:27 | ||
| p6eval | star 2010.07: OUTPUT«(timeout)» | ||
| tadzik | oh you | ||
| star: my %h = 'łódka' => 3; say %h.perl | |||
| p6eval | star 2010.07: OUTPUT«{"łódka" => 3}» | ||
| tadzik | hrm | ||
| moritz_ | rakudo: my %h = 'łódka' => 3; say %h.perl | ||
| p6eval | rakudo 4bd478: OUTPUT«{"łódka" => 3}» | ||
| tadzik | star: my %h = łódka => 3; say %h.perl | 14:28 | |
| p6eval | star 2010.07: OUTPUT«{"łódka" => 3}» | ||
| tadzik | hrm | ||
| cono | perl6 -e 'my %h = "првиет" => 1; %h.perl.say' works good | ||
| moritz_ | ... but fails on the REPL? | ||
| cono | as always :) | ||
| tadzik | nah, just some silly bug in my script | ||
| there's like 90 lines of hashes, must be some typo | 14:29 | ||
| bbkr | star: my %h = lodka => 1, łódka => 2; %h.perl.say | 14:35 | |
| p6eval | star 2010.07: OUTPUT«{"lodka" => 1, "łódka" => 2}» | ||
| tadzik | FYI, it means 'boat' :) | ||
| TiMBuS | > my %h = 'łódka' => 3; %h.perl | 14:36 | |
| {"łódka" => 3} | |||
| repl works4me. might be a terminal issue (heh) | |||
|
14:37
pmurias joined
|
|||
| pmurias | ruoso: hi | 14:37 | |
| ruoso | hi pmurias | ||
| pmurias | ruoso: would i be ok if i used 'use V6' instead of 'use v6-mildew'? | 14:38 | |
| as that wouldn't require fglock to accept the patch | 14:39 | ||
| i have 'use v6-mildew' working runing in scripts and i'm working on making it work for modules and cleaning it up enough to commit it | 14:41 | ||
|
14:42
astrojp joined
|
|||
| pmurias | ruoso: we might also have a v6 hook so that once fglock releases a new version of v6.pm 'use v6-mildew' will also work | 14:43 | |
| bbkr | rakudo: multi sub foo (@x where {say "match"; 1}) {}; multi sub foo (@x where {say "no match"; 0}) {}; foo([1,2,3]) # why it checks first signature twice? a bug? | 14:44 | |
| p6eval | rakudo 4bd478: OUTPUT«matchno matchmatch» | ||
| ruoso | pmurias, hmm... do you have a working version of the "use v6-mildew" support? | 14:45 | |
| moritz_ | bbkr: once for the multi dispatch, once for binding | ||
| bbkr | moritz_: thanks | ||
| moritz_ | bbkr: there's nothing in the spec that forbids it, although it could be optimized | ||
| bbkr | moritz_++ | 14:46 | |
| moritz_ | side effects in type constraints are sufficiently evil to deserve the shotgun | ||
| (except for satisfying the curiosity, of course) | |||
| pmurias | ruoso: yes | 14:47 | |
| ruoso | pmurias, have you sent him an email with the patch>\\ | ||
| ? | |||
| pmurias | yes | ||
| he mailed me back that he is looking into it | 14:48 | ||
| moritz_ | colomon: what do you think of rt.perl.org/rt3/Ticket/Display.html?id=77126 ? I'm inclined to reject it, on the base that our numeric types are not subset types | ||
| ruoso | pmurias, ah... ok... so that's fine, I think that's acceptable as a deliverable, just make the patched version avialble somewhere for people to try it out | ||
| pmurias, did you split the v6-alpha from plain v6? | 14:49 | ||
| colomon | moritz_: hmmm. | ||
| ruoso | pmurias, so that you don't need to install Pugs::Compiler::Rule to have v6-mildew... | ||
| colomon | star: my Complex $x; $x = 1; say $x.perl | ||
| p6eval | star 2010.07: OUTPUT«Type check failed for assignment in '&infix:<=>' at line 1 in main program body at line 22:/tmp/RL_ylNR9mg» | ||
| colomon | moritz_: that one seems like it should be easy to do. | 14:50 | |
| but I'm not sure "my Complex $x = 1" is reasonably doable. | |||
| moritz_ | colomon: we also have (-1).sqrt and (-1 + 0i).sqrt behave differently, so we do distinguish Complex from non-complex | ||
| colomon | actually, overloading infix:<=> may be pretty tricky? | ||
| moritz_: oh, certainly. | |||
| moritz_ | it's certainly not worth doing for this case | 14:51 | |
| ruoso | moritz_, I'm not sure overload is the right thing to do | ||
| moritz_ | because then he'll complain that sub f(Complex $x) { } f(1) will still fail | ||
| ruoso: I'm sure it's the wrong thing to do :-) | |||
| ruoso | good... | ||
| colomon | moritz_: good point, f(1) should never work like that. | 14:52 | |
| moritz_ | unless Complex is a coercive type, (TimToady speculated about them at YAPC) | ||
| but I guess for now we can reject the ticket | |||
| ruoso | star: my Num $a = 1 + 2i; | ||
| p6eval | star 2010.07: OUTPUT«Type check failed for assignment in '&infix:<=>' at line 1 in main program body at line 22:/tmp/cn6klu0nV7» | ||
| pmurias | ruoso: i didn't split out v6 from v6-alpha | ||
| ruoso | do we have a superset for all numbers? | 14:53 | |
| moritz_ | star: my Numeric $a = 1 + 2i; | ||
| p6eval | star 2010.07: ( no output ) | ||
| ruoso | pmurias, hmm... is it too hard? | ||
| alright.. | |||
| bbkr | star: multi sub foo (@x where {@x.pop; 1}) {}; my @f = 1,2,3; foo(@f); @f.perl.say # should this be disallowed? where check cannot modify param value because user doesn't control how many times it is called (as moritz said) | ||
| colomon | star: my Numeric $a = 1 + 2i; say $a.WHAT | ||
| p6eval | star 2010.07: OUTPUT«[1]» | ||
| star 2010.07: OUTPUT«Complex()» | |||
| pmurias | ruoso: it's a matter of packaging stuff into 2 tarballs | ||
| ruoso | moritz_, I might be loosing something, but "subset" is what I'd think for "coercitive type" | ||
| pmurias | ruoso: there are in sepereate .pm files | ||
| moritz_ | ruoso: they are not the same | 14:54 | |
| bbkr: you can't generally forbid it. You should forbid it by convention. | |||
| because our methods aren't marked as pure or non-pure | |||
| ruoso | pmurias, I think it's worth having v6.pm in a different package then v6-alpha | ||
| and v6-mildew | |||
| pmurias | yes | ||
| bbkr | moritz_: I was just curious if some spec part forbids it. but perl gives enough rope... just like in this case :) | 14:55 | |
| ruoso | pmurias, so... just make them three dists, email the patches to fglock and make the three .tar.gz available somewhere for people to test | 14:56 | |
|
14:56
mikehh joined
|
|||
| colomon | star: subset ComplexNumeric of Numeric where { $^n ~~ Real || $^n ~~ Complex }; my ComplexNumeric $x = 1; say $x.perl; $x = 1i; say $x.perl | 14:57 | |
| p6eval | star 2010.07: OUTPUT«Null PMC access in invoke() in 'ACCEPTS' at line 1 in '&infix:<=>' at line 1 in main program body at line 22:/tmp/AqD5quN4oJ» | ||
|
14:57
Axius joined
|
|||
| colomon | star: subset ComplexNumeric of Numeric where { ($_ ~~ Real) || ($_ ~~ Complex) }; my ComplexNumeric $x = 1; say $x.perl; $x = 1i; say $x.perl | 14:57 | |
| p6eval | star 2010.07: OUTPUT«Null PMC access in invoke() in 'ACCEPTS' at line 1 in '&infix:<=>' at line 1 in main program body at line 22:/tmp/datuKCLFdC» | ||
| moritz_ | colomon: please submit | 14:58 | |
| colomon | nyi? or am I doing something wrong there. | ||
| moritz_ | looks about right | ||
| pmurias | ruoso: would use V6-mildew be a worse name then use v6-mildew? | 14:59 | |
| colomon | star: subset ComplexNumeric of Numeric where { ($_ ~~ Real) }; my ComplexNumeric $x = 1; say $x.perl; | 15:00 | |
| p6eval | star 2010.07: OUTPUT«Null PMC access in invoke() in 'ACCEPTS' at line 1 in '&infix:<=>' at line 1 in main program body at line 22:/tmp/fzM3BfOkY6» | ||
| ruoso | pmurias, yes... and it's ugly to have both V6 and v6 | ||
| pmurias, I mean, it's worse because v6 is there already | |||
| pmurias | ok | 15:01 | |
| colomon | moritz_: submitted | ||
| pmurias | i'll split v6 into 2 packages, put it into the pugs repo and email fglock again | 15:02 | |
|
15:02
milki joined
|
|||
| moritz_ | colomon++ | 15:02 | |
|
15:02
wamba joined
15:05
justatheory joined,
Trashlord joined
|
|||
| pmurias | ruoso: is there anything else besides v6-mildew that needs to be done as part of GSoC? | 15:11 | |
| besides releasing a version of SMOP and Mildew from the repo which supports perl5 interop? | 15:12 | ||
|
15:13
risou joined
|
|||
| moritz_ | speaking of p5 interop... Tim Bunce demonstrated usage of the p5 DBD::SQLite through blizkost in rakudo, live at his YAPC talk | 15:13 | |
| pmurias was at that talk | 15:15 | ||
| moritz_ liked it | 15:17 | ||
| masak finds blog.foxxtrot.net/2010/08/perl6-fir...sions.html | 15:18 | ||
|
15:18
perlygatekeeper joined
15:19
cognominal joined
|
|||
| moritz_ comments | 15:21 | ||
| masak | moritz_++ | ||
| tadzik | oh wow, that webdesign | ||
|
15:22
jferrero joined
15:25
_macdaddy joined
15:27
janosik joined
|
|||
| colomon | ack, my comment won't go through. | 15:29 | |
| moritz_ | mine didn't go through when I went throught the preview | ||
| but a direct submission worked | |||
| moritz_ -> afk | |||
| colomon | loliblogged: justrakudoit.wordpress.com/2010/08/...memoizing/ | 15:33 | |
| [Coke] wonders how hard it would be to add memozation to rakudo subs. can store the cache as a property on the sub object... | 15:35 | ||
| and you would just add a little boilerplate before and after to check and populate the cache. | 15:36 | ||
|
15:37
pyrimidine joined
|
|||
| [Coke] also wonders if "is cacheable" is a better spelling. | 15:37 | ||
|
15:37
Axius joined
|
|||
| [Coke] | rakudo: sub foo is cached ($arg) {say $arg}; foo(3); | 15:38 | |
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Confused at line 22, near "sub foo is"» | ||
| [Coke] | rakudo: sub foo ($arg) is cached {say $arg}; foo(3); | ||
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are::(Mu $child, Role $r):(Routine $r, Any :default($default)!):(Code $block, Any $arg?, Any :export($export)!):(Mu $child, Mu $parent):(Mu $type where ({ ... }), Any | ||
| ..:rw($rw)… | |||
| [Coke] | given that the spec says you're allowed to do no caching, IWBNI if rakudo at least accepted that silently. (if that's easy to write.) | 15:41 | |
| masak | [Coke]: I've been thinking the same thing. I'll probably do some experiments with cached subs in Yapsi, when we have subs. :) | 15:43 | |
|
15:44
Holy_Cow joined
|
|||
| pmurias | [Coke]: wouldn't implementing caching by not doing so mislead people? | 15:44 | |
| colomon | [Coke]: it's kind of tricky to handle all possible argument types for a cache. (else I would have done this last month!) | 15:47 | |
| but if you can silently fail (or fail with a warn), it would be pretty easy to add single argument caching for Str and Numeric, at least... | 15:48 | ||
| afk # exercising | 15:49 | ||
|
15:51
Mowah joined
15:52
Axius joined
|
|||
| bbkr | rakudo: say pi=4 # tricky question. why it failed _after_ say? when say param "pi=4" is evaluated it should IMO die right there and say should never happened. bug? | 15:53 | |
| p6eval | rakudo 4bd478: OUTPUT«3.14159265358979Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/rdBTOmdtDM» | ||
| [Coke] | pmurias: blame the spec. | 15:54 | |
| colomon: why not just cache what you can rather than failing? | |||
| (the spec basically says it's a hint to the compiler, not a guarantee of anything.) | 15:55 | ||
| bbkr: is it just a warning and not an error? | |||
| rakudo: pi=4; say "alive" | 15:56 | ||
| p6eval | rakudo 4bd478: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/8AkAtWsuU3» | ||
| bbkr | Coke: error | ||
|
15:58
fod joined
|
|||
| pmichaud | good morning, #perl6 | 15:58 | |
| (say pi=4) looks to me like it's doing exactly the right thing. | 15:59 | ||
| takadonet | pmichaud: morning | 16:01 | |
| bbkr | pmichaud: why? it should die on assignment, so say param was never evaluated, and so say should not work. compare it to behavior of 'say "foo {die} bar"' | 16:03 | |
| pmichaud | it is dying on the assignment. | ||
| moritz_ | oh hai | ||
| oha | pmichaud, isn't dying as in say(pi)=4; ? | ||
| rakudo: say(pi=4); | 16:04 | ||
| pmichaud | say pi=4 parses as (say pi) = 4 | ||
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22» | ||
| pmichaud | (I think.... checking) | ||
| oha | rakudo: say pi=4; | ||
| p6eval | rakudo 4bd478: OUTPUT«3.14159265358979Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/AFm2BNjYGL» | ||
| oha | rakudo: (say pi)=4; | 16:05 | |
| p6eval | rakudo 4bd478: OUTPUT«3.14159265358979Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/2qR_Aih9CS» | ||
| bbkr | rakudo: say (pi=4) | ||
| p6eval | rakudo 4bd478: OUTPUT«Cannot modify readonly value in '&infix:<=>' at line 1 in main program body at line 22:/tmp/Ne0PDCgv2r» | ||
| rokoteko | rakudo: my @arr = <foo bar baz>; 0..2 ==> @arr[@(*)] ==> my @t; push my @x, @t[$_] for 0..2; @x.perl.say | ||
| p6eval | rakudo 4bd478: OUTPUT«too many positional arguments: 3 passed, 3 expected in main program body at line 1» | ||
| bbkr | oh, indeed! | ||
| pmichaud | oh, hmmmm. | ||
| rokoteko | rakudo: my @arr = <foo bar baz>; my @t; 0..2 ==> @arr[@(*)] ==> @t; # what's wrong here? | ||
| p6eval | rakudo 4bd478: OUTPUT«too many positional arguments: 3 passed, 3 expected in main program body at line 1» | ||
| pmichaud | that looks really wrong to me. | 16:06 | |
| bbkr | isn't it a parsebug? | ||
| with precedence | |||
| oha | it may be correct, to let a function be used as a RHS? mh... | ||
| rokoteko | std: my @arr = <foo bar baz>; 0..2 ==> @arr[@(*)] ==> my @t; | ||
| p6eval | std 31912: OUTPUT«ok 00:01 116m» | ||
| pmichaud | looks to me like STD.pm recently changed its idea of list_assignment precedence | 16:07 | |
| moritz_ has m// as a call working, in branch match_call | |||
| spectesting the merged-into-master version now | 16:08 | ||
| bbkr | should i report this pi example somehow or is it expected behavior? | ||
| bbkr is confused | |||
| pmichaud | bbkr: you can report it | 16:09 | |
| rokoteko | anyhow. any idea why 'too many positional arguments: 3 passed, 3 expected' ? where are those expected, and why 3 more than 3? | ||
| masak | bbkr++ | ||
| pmichaud | rokoteko: no idea | 16:11 | |
| rokoteko | ok. me neither. thought it might be something I just didnt get again while stumbling through the synopsis. :) | 16:12 | |
|
16:14
risou_ joined
|
|||
| oha | i'm going to surrender | 16:14 | |
| how can i write a signature which match a &code with a specific signature? | 16:15 | ||
| sub foo(&code(Int)) { ... } seems not working to me, what do i keep doing wrong? | |||
| gfldex | you are missing a collon | 16:16 | |
| sub foo(&code:(Int)) { ... } | |||
| masak | food & | ||
| oha | gfldex, tried, but rakudo complains | ||
| traits specified as colon pairs not yet understood at line ... | 16:17 | ||
| gfldex | NIY | ||
| oha | ohhh ok | ||
| moritz_ | rakudo: sub f(&code:(Int)) { code(3) }; f -> Int $x { say $x + 3 } | ||
| gfldex | :) | ||
| oha | gfldex++ ty | ||
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===traits specified as colon pairs not yet understood at line 22, near ") { code(3"» | ||
| moritz_ | rakudo: sub f(&code(Int)) { code(3) }; f -> Int $x { say $x + 3 } | ||
| p6eval | rakudo 4bd478: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub-signature of parameter &code in 'f' at line 22:/tmp/0rN_y2CHhQ in main program body at line 22:/tmp/0rN_y2CHhQ» | ||
| moritz_ is sure that was implemented at some point | |||
| probably in alpha | |||
| oha | no problem, i got that was impl in rakudo, and i kept trying almost everything without success | 16:18 | |
|
16:22
justatheory joined
|
|||
| pugssvn | r31940 | pmurias++ | rename files in the STD distribution, update version numbers | 16:22 | |
| r31941 | pmurias++ | remove the unused old SMOP module | 16:23 | ||
| r31942 | pmurias++ | added v6::mildew and a v6 (which allows using it) | |||
| r31942 | added required support for that to SMOP and Mildew: | |||
| r31942 | * Mildew::Backend::C::V6 | |||
| r31942 | * SMOP::Embed | |||
|
16:27
snearch joined
16:35
patrickas joined
16:36
ashleydev joined
|
|||
| colomon | [Coke]: I didn't mean "fail" in the technical sense, I meant "fail to cache", ie just ran the function. | 16:39 | |
|
16:41
jferrero joined
16:43
Intensity joined
|
|||
| [Coke] | colomon: ah. perfecto. | 16:44 | |
| szabgab | Anyone interested and available for a Perl 6 hackathon during or around www.t-dose.org/ ? | ||
| 6-7 November, Eindhoven, TheNetherlands | |||
| [Coke] | yes but no. | 16:45 | |
| pmichaud | interested, yes. available -- don't know. :) | ||
| szabgab | pls check it ASAP and let me know, along with a "price tag" so I can put together a budget and see if I can get someone to finance it | 16:46 | |
| pmichaud | will do. | 16:47 | |
| is it better to fly into amsterdam or brussels to get to eindhoven? | |||
| szabgab | no idea | 16:48 | |
| pmichaud looks for direct flights to eindhoven :) | |||
| szabgab | they look the same distance to me | ||
| pmichaud | yes, same here. | 16:49 | |
| anyway, I'll look into it. | |||
| oha | is there a way (both perl6 and rakudo) to make a function return a lazy scalar? | ||
| pmichaud | I'm also trying to see if I can make it to osdc.fr -- I know a bunch of the perl 6 folks are planning to be there | ||
| looks like amsterdam might be easiest | 16:50 | ||
| flights currently $800-$900 from where I'm at, it seems. | 16:54 | ||
| szabgab | thanks | ||
| TiMBuS | oha, my $a := gather { take [+](^10000) }; | 16:55 | |
| something like that | |||
| ? | |||
| oha | TiMBuS, i'm unsure if that could work | ||
| my $out = foo($in); | 16:56 | ||
|
16:56
cotto_work joined
|
|||
| oha | say $out; # here a code is executed to evaluate the value of $out | 16:56 | |
| like in Contextual::Return on p5 | |||
| TiMBuS | is $out eval'd when you return a gather/take binding? | 16:57 | |
| I just tried: sub thing { gather { take [+](^10000) }; }; my $a := thing(); say 'ok'; #doesn't pause at all | 16:59 | ||
| oha | you are right! | ||
| pmichaud | I'm fairly certain that [+](^10000) isn't going to be lazy | ||
| oha | TiMBuS++ | ||
| pmichaud, gather { take ... } will | 17:00 | ||
| TiMBuS | woot i got karma'd | ||
| pmichaud | (I'm not sure what is being attempted here, though) | ||
| TiMBuS | pmichaud, just the result itself needs to be lazy | ||
|
17:00
Lorn joined
|
|||
| oha | TiMBuS worked :) | 17:01 | |
|
17:05
rgrau joined
17:07
Trashlord joined
17:09
Axius_ joined
17:10
Trashlord joined
17:16
risou joined
|
|||
| oha | nopaste.snit.ch/22673 | 17:19 | |
| the first case work as i wanted. the function is called but the say is lazy | 17:20 | ||
| but i was not able to make it work inside a map | |||
| what i wanted is to have all the PRE, then MID, then all the CALC | 17:21 | ||
| i've probably found a way | 17:24 | ||
| rakudo: sub lazy($v) { say "P$v"; gather { say "C$v"; take $v; }}; my @x = map { my $z := lazy($_); }, 1..3; say "MID"; say @x.join(','); | 17:27 | ||
| p6eval | rakudo 4bd478: OUTPUT«P1P2P3MIDC1C2C31,2,3» | ||
| oha | that is just wonderfull! i just don't like the useless my $z inside the map | 17:28 | |
|
17:30
takadonet joined
17:33
isBEKaml joined
|
|||
| colomon | TiMBuS, oha: you're messing around with implementation details there, I think. "gather" might well run the first few iterations and queue them up to be doled out as needed... | 17:49 | |
| oha | oh i see what you mean | 17:50 | |
| but well, here lazy() is a function, in reality there will be different things in place of this call | |||
| method req($request) { $.conn.send($request); gather { take $conn.recv(); } }; # that's more interesting :) | 17:52 | ||
| or better: | 17:54 | ||
| method req($req) { my $c = self.findConn(); $c.send($req); gather { my $res = $c.recv(); $c.free(); take $res; } } | 17:55 | ||
|
17:57
justatheory joined
|
|||
| colomon | oha: but the point here is that gather might work by returning its "output" in chunks, in which case it might try to return an iterator with four or five iterations already done in it. In Rakudo, this would likely be much more efficient than just returning one at a time. | 17:57 | |
| You're essentially relying on an implementation detail to make this code be lazy the way you want it to be lazy, if I understand your code correctly. | 17:58 | ||
| oha | the actual implementation use a middle object | 17:59 | |
| my $job = submit(...); my $res = $job.result(); | |||
| submit will send something, and result will wait for a result | |||
| i was just wandering if i can make some syntactic sugar here | |||
| but i agree with you, it would be better something else | 18:00 | ||
| dalek | kudo: 22a11d0 | moritz++ | (22 files): Merge branch 'master' into match-call src/core/Match.pm |
||
| kudo: 77d4761 | moritz++ | src/core/Match.pm: fix wrongly resolved merge conflict |
|||
| kudo: 9412433 | moritz++ | src/ (3 files): !~~ now topicalizes too |
|||
| kudo: 87c82c2 | moritz++ | src/ (4 files): Merge branch 'match-call' sets the topic for negated smartmatch (!~~) |
|||
| colomon | moritz_++ !!!! | 18:01 | |
|
18:03
tedv joined
18:06
tadzik joined
18:08
hanekomu joined
|
|||
| colomon | star: say 10000000000000000000 | 18:10 | |
| p6eval | star 2010.07: OUTPUT«-8446744073709551616» | ||
| colomon | star: say 10000000000000000000.0 | ||
| p6eval | star 2010.07: OUTPUT«1e+19» | ||
| colomon | star: say 10000000000000000001 | 18:11 | |
| p6eval | star 2010.07: OUTPUT«-8446744073709551615» | ||
| masak | moritz_++ | ||
| tadzik | o/ | ||
| colomon | star: say 1000000000000000000 | 18:12 | |
| p6eval | star 2010.07: OUTPUT«1000000000000000000» | ||
| colomon | star: say 1000000000000000000.WHAT | ||
| p6eval | star 2010.07: OUTPUT«Int()» | ||
| colomon | star: say 100000000000000000 | 18:15 | |
| p6eval | star 2010.07: OUTPUT«100000000000000000» | ||
| colomon | star: say 100000000000000000 + 1 | ||
| p6eval | star 2010.07: OUTPUT«1e+17» | ||
| colomon | star: say 100000000000000001 | ||
| p6eval | star 2010.07: OUTPUT«100000000000000001» | ||
|
18:16
Axius_ joined
|
|||
| colomon | star: say 100000000000000001.WHAT | 18:17 | |
| p6eval | star 2010.07: OUTPUT«Int()» | ||
|
18:25
astrojp left
|
|||
| mantovani | masak: np :P | 18:27 | |
| [Coke] wonders when bigthink.com/larrywall was filmed. | 18:28 | ||
| moritz_ | #phasers in 26? | 18:34 | |
| dalek | kudo: fcf4f36 | moritz++ | (3 files): adverbs for m// |
18:35 | |
| colomon | aiiiii, #phasers! | ||
| tadzik | [Coke]: wathing it too :) | ||
| avuserow | phasers! pew pew! | 18:37 | |
| moritz_ | it seems that m:overlap// doesn't work properly | ||
| or m:g// for that matter | 18:38 | ||
| pmichaud | [Coke]: (bigthink) I think it was done around OSCON | 18:40 | |
| moritz_ | pmichaud: when I call &infix:<=> from PIR, is that the list or the item assignment operator? | 18:41 | |
| I guess item, but I ain't sure | |||
| pmichaud | moritz_: it's both | 18:45 | |
| the difference between item assignment and list assignment is in the parsing, not the operator. | |||
| moritz_ | ok | ||
| pmichaud | at least, that's how rakudo has it now. :) | ||
| moritz_ | then I don't understand why it doesn't work | ||
| m:g// that is | |||
| it rewrites it to | |||
| $/ = $_.match(//, :g) | 18:46 | ||
| (a --target=PAST confirms that) | |||
| pmichaud | it's probably because .match is currently not handling $/ properly | ||
| iirc, .match is currently rebinding $/, not assigning it | |||
| so what you're left with ends up being "not assignable" | |||
| try rewriting it to $/ := $.match(//, :g) for now | 18:47 | ||
| moritz_ | the same works for m:i// right now | ||
| pmichaud | I suspect that would be because m:i// returns $/ | ||
| and so it ends up acting like a self-assignment | |||
| moritz_ | oh | 18:48 | |
| pmichaud | whereas $.match(//, :g) doesn't return $/ | ||
| moritz_ | should I use :pasttype('bind')? | ||
| or rather &infix:<:=>? | |||
| pmichaud | no, should call &infix:<:=> | ||
| moritz_ | ok | ||
| rakudo: say 'abc' ~~ m:i/ABC/ | 18:49 | ||
| p6eval | rakudo 4bd478: OUTPUT«===SORRY!===Confused at line 22, near "say 'abc' "» | ||
| moritz_ | huh | ||
| rakudo: say 'abc' ~~ m:i/ABC/ | 18:50 | ||
| p6eval | rakudo 4bd478: OUTPUT«abc» | ||
| moritz_ | o/ | ||
| rakudo: $_="abcdefg"; say m:i/ABC/ | |||
| p6eval | rakudo 4bd478: OUTPUT«abc» | ||
|
18:51
perimosocordiae joined
|
|||
| moritz_ | \\o | 18:51 | |
| perimosocordiae | moritz_: who, me? | ||
| moritz_ | perimosocordiae: what? | 18:52 | |
| moritz_ lacks context | |||
| perimosocordiae | moritz_: the \\o | ||
| moritz_ | perimosocordiae: that was because m:i// now works in rakudo, not related to you :-) | ||
| perimosocordiae: but feel free to feel greeted nontheless :-) | |||
| perimosocordiae | moritz_: awww. haha, ok | 18:53 | |
| moritz_ | rakudo: say 'a b' ~~ m:s/a b/ | ||
| p6eval | rakudo 4bd478: OUTPUT«a b» | ||
| moritz_ | and :s works too :-) | ||
| perimosocordiae | what do :i and :s do? | 18:54 | |
| moritz_ | pmichaud: using := doesn't seem to break anything, but m:g/a/ still doesn't work :( | ||
| :i is ignorecase | |||
| and :s makes whitespace signficant | |||
| see S05/Modifiers/ | |||
| perimosocordiae | ah, thanks | ||
| [Coke] | I really would like this interview better if they /read/ the questions they were asking him. -0( | ||
| er, =-) | |||
| pmichaud | moritz_: okay. I suspect we're going to need to get a much clearer handle on $/ altogether. | 18:55 | |
| moritz_ | pmichaud: I fear it, yes | 18:56 | |
| pmichaud: btw I want to introduce Cool.subst(..., :inplace), which returns what it matched | 18:58 | ||
| and have s/// dispatch to it | |||
| otherwise we run into problems with s/// returning the modified string, not the match(es) | 18:59 | ||
| pmichaud | that feels wrongish | ||
| masak | #phasers now? | ||
| moritz_ | how would you propagate the match out of .subst instead? | 19:00 | |
| masak: yes | |||
| pmichaud | moritz_: not sure. It may be that ':inplace' feels like the wrong option. | ||
| it may be that s/// should use something other than .subst | |||
| I don't have a clean answer -- I just know that :inplace feels .... odd | |||
|
19:00
pyrimidine joined
|
|||
| moritz_ | if it does not use subst, we'll end up re-implementing .subst for s/// | 19:01 | |
| pmichaud | well, it could be that .subst itself is implemented in terms of the other thing | 19:02 | |
| and simply has a different return value | |||
| if you want to go with :inplace for now, I'm fine with that -- just registering that my initial reaction is "that's not quite right" | |||
| PerlJam | how would $str.subst(... :inplace) differ from $str.=substr(... :inplace) or even $str.=subst(...) ? | ||
| moritz_ | PerlJam: in return value | 19:03 | |
| pmichaud | PerlJam: that's why ";inplace" feels like the wrong advertb | ||
| *adverb | |||
| it's not really making it an inplace modification | |||
| it's changing the return value | |||
|
19:04
M_o_C joined
19:05
cono joined
|
|||
| moritz_ | alternative might be to return both the result string and the match as a list | 19:11 | |
| but that feels awkward, if you ask me | 19:12 | ||
|
19:12
dduncan joined
19:14
dduncan joined
19:15
dduncan left
19:26
M_o_C joined
|
|||
| pugssvn | r31943 | moritz++ | [t/spec] a Rakudo unfudge | 19:28 | |
|
19:28
smash joined
|
|||
| smash | hello everyone | 19:28 | |
| tadzik | o/ | 19:29 | |
|
19:34
nimiezko joined
19:36
justatheory joined
|
|||
| masak | hi smash | 19:36 | |
|
19:40
tylercurtis joined
|
|||
| Hulk smash! | 19:48 | ||
| frettled | Sorry, I just had to :) Hi, smash! | ||
| frettled is the resident joker, but without the poisonous ingredients. | 19:49 | ||
| pugssvn | r31944 | moritz++ | [t/spec] rakudo unfudges | 19:51 | |
|
19:53
kensanata joined
|
|||
| masak | someone on Twitter says that PHP gets it wrong and Perl 6 gets it right wrt gradual typing: twitter.com/kaja47/status/20818719900 | 19:54 | |
| moritz_ | btw would anybody here will be to be grant manager for my error objects grant proposal? | 19:56 | |
| moritz_ looks at pmichaud, colomon, masak, [particle], [Coke] and a few others | |||
| masak | is "grant manager" anything like "mentor"? | 19:57 | |
| PerlJam | masak: I think it's more like "cat herder" | ||
| pmichaud | it's less "mentor" and more like "make sure progress is being made and verify that the terms of the grant are being met" | ||
| moritz_: I'll be glad to do it. | 19:58 | ||
| moritz_ | afaict the main purpose is to keep comunication to TPF, and answer questions wrt progress | ||
| pmichaud: great | |||
| masak | pmichaud++ | ||
| colomon | pmichaud++ | ||
| moritz_ | any other volunteers? | ||
| wouldn't hurt to present more, justin case | |||
| masak | moritz_: I'd happily grant-manage you. | 19:59 | |
| moritz_ | masak++ | ||
| oha | masak++ # pmichaud got 2 karma, i can't see why you should get only 1 in this case ;-P | 20:00 | |
| masak | karma doesn't grow on trees, you know. :P | 20:01 | |
| oha | tree-- | ||
| tadzik | "karma" means food in my language. Thereof, karma does grow on trees | 20:02 | |
| [Coke] | I can do it, if you'd like it to be less incestuous. =-) | 20:06 | |
| pmichaud | [Coke]: actually, I need a manager for my grant. Would you be willing? | 20:08 | |
| [Coke] | Sure. | ||
| pmichaud | okay, I'll let Karen know -- thanks. | 20:09 | |
| [Coke] | de nada. | ||
| moritz_ | [Coke]++ | ||
|
20:12
Italian_Plumber joined
|
|||
| Tene | karma-- | 20:13 | |
| trees++ | |||
|
20:13
Italian_Plumber1 joined
|
|||
| masak | loliblogged! use.perl.org/~masak/journal/40490 | 20:23 | |
| frettled | hazmat! | 20:24 | |
| pmichaud | masak++ # short and very sweet | ||
|
20:25
__rnddim__ joined
|
|||
| moritz_ | lol. | 20:25 | |
| frettled | masak: psst, you wrote «three years ago (…) that was two years ago» | ||
| Tene | How short is masak? | ||
|
20:25
justatheory joined
|
|||
| frettled | Tene: about ye tall | 20:25 | |
| masak | frettled: fixing. | ||
| frettled | masak++ for another great motivational blog entry | 20:26 | |
| cognominal | masak++, I prefer to be rmentionned as cognominal. Apart a few english dictionnaries with rare words, I am alone to use that nick on the net. | ||
| masak | cognominal: fixing. | ||
| cognominal | I don't ask as much :) | ||
| smash | masak: is RT#76978 still a problem ? | 20:27 | |
|
20:27
patrickas joined
|
|||
| masak | cognominal: fixed :) | 20:27 | |
| patrickas | hello #perl6 | 20:28 | |
| masak | hi patrickas! | ||
| patrickas | hello masak, I have a question about RT #72914 | ||
| masak looks | 20:29 | ||
| RT seems slow right now. | |||
| frettled | masak: You should add an edit note to your blog post, that within a couple of minutes of telling #perl6 that you posted, you had three bugreps to your post (including this one) :D | ||
| masak | frettled: which, as we all know, represent love. I'm flattered. | 20:30 | |
| nope, can't reach RT. sorry, smash, patrickas. | 20:31 | ||
| frettled | masak: exactly! | ||
| patrickas | masak same here :-) went throught google cache | ||
| masak browses them through his email instead | |||
| patrickas | webcache.googleusercontent.com/sear...mp;ct=clnk | 20:32 | |
| masak | rakudo: my @a = (4...^5); say @a.perl # should be 4 3 2 1 0 1 2 3 4 | 20:33 | |
| p6eval | rakudo fcf4f3: OUTPUT«[4, 3, 2, 1, 0, 1, 2, 3, 4]» | ||
| patrickas | yes | ||
| masak | and it is. | ||
| patrickas | my understanding was that ...^ was the same as ... except it does not return the limit when it matches | ||
| masak | smash: moritz_++ said it'd been fixed. I haven't tested yet. | 20:34 | |
| patrickas | so 4 ...^ 5 would be 4 and 4 ... ^5 would be 4 3 2 1 0 1 2 3 4 | ||
| masak | patrickas: that's probably right. | ||
| cognominal | masak, where do you see Nil as defined in the spec? | ||
| smash | masak: by my tests is fixed, think you can look into itan maybe close the ticket ? | ||
| patrickas | masak: it was fixed but when I implemented ...^ (locally) it broke | ||
| masak | cognominal: let me find the place for you. it's in S02. | ||
| hm, or S04 :) | 20:35 | ||
| cognominal | S02:2156 apparently | ||
| masak | aye. | ||
| cognominal | I don't know how I missed it the first time around | 20:36 | |
| masak | there's some subtly deep wonkiness going on with Nil being defined. | ||
| I've been wanting to talk to TimToady about it. | |||
|
20:36
kensanata joined
|
|||
| [Coke] . o O (is that smash?) | 20:36 | ||
| masak | for example, I'm slightly saddened that $obj.?foo // "default" no longer works. | 20:37 | |
| smash: sure. | |||
| smash: as soon as RT comes back up. | |||
| smash | masak: sure, thks | ||
| can't open RT either now :\\ | 20:38 | ||
|
20:38
Mowah joined
|
|||
| pmichaud | lots of perl servers seem to be having difficulties atm | 20:38 | |
| I couldn't reach perlfoundation.org earlier. | |||
| cognominal | very often, with Perl 6, things that I innitially find wrong makes more sense once I understand the larger scheme of things. I don't know yet for that one. | ||
| pmichaud | currently Nil is the same as (), so the real question is whether ().defined is true | 20:39 | |
| masak | spectest run: t/spec/S03-smartmatch/any-bool.t aborts abnormally. t/spec/S05-match/capturing-contexts.rakudo t/spec/S05-metasyntax/regex.rakudo t/spec/S29-context/die.rakudo t/spec/S29-context/exit.rakudo all have failing tests. | ||
| cognominal | yes I have seen that in src/builtins/Parcel.pir:22 | 20:40 | |
| pmichaud | the any-bool.t tests need to be updated to match the spec. | ||
|
20:46
pyrimidine left
|
|||
| [particle] is happy to act as anyone's grant manager for hague grants | 20:46 | ||
| gfldex | rakudo: my $s = 'abcd'; while $s ~~ /(.)/ { print $0 }; | 20:48 | |
| p6eval | rakudo fcf4f3: | ||
| ..OUTPUT«(timeout)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa… | |||
| gfldex | rakudo: my $s = 'abcd'; while $s ~~ m:g/(.)/ { print $0 }; | ||
| p6eval | rakudo fcf4f3: ( no output ) | ||
| gfldex | am i asking for something unreasonable? | ||
| [particle] | are you expecting that regex to remove a character each time it's run? | 20:49 | |
| tylercurtis | rakudo: my $s = 'abcd'; for $s ~~ m:g/(.)/ { print $0 }; | ||
| p6eval | rakudo fcf4f3: OUTPUT«a» | ||
| tylercurtis | rakudo: my $s = 'abcd'; for $s.match(/(.)/, :g) { print $0 }; | 20:50 | |
| p6eval | rakudo fcf4f3: OUTPUT«Any()Any()Any()Any()» | ||
| oha | isn't print $/[0]; ? | ||
| tylercurtis | rakudo: my $s = 'abcd'; for $s ~~ m:g/(.)/ -> $/ { print $0 }; | ||
| p6eval | rakudo fcf4f3: OUTPUT«0» | ||
| gfldex | $/[0] == $0 | ||
| tylercurtis | rakudo: my $s = 'abcd'; for $s.match(/(.)/, :g) -> $/ { print $0 }; | 20:51 | |
| p6eval | rakudo fcf4f3: OUTPUT«abcd» | ||
| gfldex | rakudo: my $s = 'abcd'; while $s ~~ m:g/(.)/ { print $/[0] }; | 20:53 | |
| p6eval | rakudo fcf4f3: ( no output ) | ||
| gfldex | rakudo: my $s = 'abcd'; while $s ~~ m:g/(.)/ { print $_ }; | ||
| p6eval | rakudo fcf4f3: ( no output ) | ||
| tylercurtis | gfldex: why would while work? | 20:54 | |
| gfldex | it's basic perl5 thinking :) | ||
| std: my $s = 'abcd'; while $s ~~ m:g/(.)/ { print $_ }; | 20:55 | ||
| p6eval | std 31912: OUTPUT«ok 00:01 117m» | ||
| gfldex | i'm quite sure i wont be the last one to try this | ||
| masak | indeed. | 20:56 | |
| we should add a warning for when 'while' is used in conjunction with ':g'. | |||
| gfldex | would that be a rakudobug? | 20:58 | |
| masak | sure. feel free to submit one. | 20:59 | |
|
20:59
iDanny joined
|
|||
| tylercurtis | rakudo: my $s = 'abcd'; while $s ~~ m:c/(.)/ { print $0 } | 20:59 | |
| p6eval | rakudo fcf4f3: | ||
| ..OUTPUT«(timeout)bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb… | |||
| tylercurtis | rakudo: my $s = 'abcd'; while $s ~~ m:pc/(.)/ { print $0 } | 21:00 | |
| masak | t/spec/S32-str/unpack.t is all wrong. it shouldn't operate on a Str, but on a Buf. | ||
| p6eval | rakudo fcf4f3: OUTPUT«===SORRY!===Adverb 'pc' not allowed on m at line 22, near " { print $"» | ||
|
21:00
Mowah joined
|
|||
| masak | I can't believe I once wrote those tests :P | 21:00 | |
| tylercurtis | rakudo: my $s = 'abcd'; while $s ~~ m:p/(.)/ { print $0 } | ||
| p6eval | rakudo fcf4f3: | 21:01 | |
| ..OUTPUT«(timeout)bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb… | |||
| masak | (whoever added the '(timeout)' thingie)++ | ||
| oha | this is a thing which happen to me alot, i wonder if there is a way to simplify on p6. i have a field which is a Int, and some constants which are values for that field. I want to allow any Int but i want to both compile the constant name to ints, and be able to obtain the name from the Int at runtime. ideas? | ||
| masak | oha: sounds a bit like enums to me. | 21:02 | |
| oha | masak, for the first part, yes | ||
| but at runtime am i able to know if there is a name for that int? | |||
| masak | that's possible with enums as well. | ||
| tylercurtis | oha: ~$foo; $foo.Str; $foo.perl; $foo.key; etc. | 21:03 | |
| oha | i'm checking S09, still can't see it | ||
| masak | S12. | ||
| tylercurtis | oha: perlcabal.org/syn/S12.html#Enumerations | ||
| masak | constant %dayname := Day.enums.invert; %dayname{3} # Wed | ||
|
21:03
whiteknight joined
|
|||
| masak | TimToady++ # for that | 21:03 | |
| oha | ok checking there, ty | 21:04 | |
| masak | by the way, the other day, I realized we should probably have gone and named '.so' '.totally' instead. it has about the right Huffman coding, too :) | ||
| rcfox | rakudo: my $a = 1; say $a.WHAT; my $b = 1 but 2; say $b.WHAT; | 21:05 | |
| p6eval | rakudo fcf4f3: OUTPUT«Int()()» | ||
| moritz_ | so totally cute... | ||
| moritz_ -> bed | |||
| tylercurtis | rakudo: my $a = 1; say $a.WHAT.perl; my $b = 1 but 2; say $b.WHAT.perl; | ||
| p6eval | rakudo fcf4f3: OUTPUT«Int» | ||
| masak | they're recasted into anon subclasses of themselves. | 21:06 | |
| should probably still say they're Ints, though. | |||
| rcfox | rakudo: my $a = 1 but 2; say $a X[~~] 1,2; | ||
| p6eval | rakudo fcf4f3: OUTPUT«10» | 21:07 | |
| patrickas | masak should I go ahead and change the test for (4...^5) to expect 4 as result or should we wait for TimToady's confirmation ? | 21:08 | |
| rcfox | rakudo: my $a = any(1,2,3,4); say $a ~~ 1; say $a ~~ 2; | ||
| p6eval | rakudo fcf4f3: OUTPUT«any(Bool::True, Bool::False)any(Bool::False, Bool::True)» | 21:09 | |
| masak | patrickas: viv should be able to solve that one for us. | ||
| tylercurtis | rcfox: is 1 but 2 actually valid? | 21:10 | |
| rcfox | tylercurtis: I don't know. I'm just fooling around, mostly. | ||
| patrickas | 6->5 ? how ? | ||
| rcfox | rakudo: my $a = 1 but Bool::False; say $a ~~ 1; say $a ~~ Bool; say $a ~~ Bool::False; | 21:12 | |
| p6eval | rakudo fcf4f3: OUTPUT«===SORRY!===Smartmatch against False always fails; if you mean to test the topic for truthiness, use :!so or *.not or !* instead at line 22, near " Bool::Fal"» | ||
| masak | patrickas: viv outputs a parse tree. it would know how 4...^5 is parsed. | ||
| rcfox | :\\ | ||
| masak | patrickas: and it is very probably right. | ||
| rcfox | rakudo: my $a = 1 but Bool::False; say $a ~~ 1; say $a ~~ Bool; | ||
| masak | rcfox: what did you expect? | ||
| p6eval | rakudo fcf4f3: OUTPUT«10» | ||
| rcfox | masak: I expected something declared to be false to be false. | 21:13 | |
| patrickas | ok .. how do I summon viv ? :-o | ||
| tylercurtis | rcfox: matching about Bools is a bad idea. | 21:14 | |
| rcfox | Bool was the only predefined enum I could think of. | ||
| tylercurtis | rcfox: STD warns, but iiuc, Rakudo doesn't know how to do parser warnings, so it just panics. | ||
| rcfox: matching against Bool::False will always fail, though. | 21:16 | ||
| masak | rcfox: what tylercurtis said. there was a discussion (again) on p6l about this recently. | ||
| rcfox | Okay, I don't know about all of the operator quirks. | ||
|
21:16
Synnn joined
|
|||
| masak | rcfox: basically, when the right-hand side of infix:<~~> is a Bool, the result of the match is that Bool. | 21:16 | |
| that is, if it's either True or False. | |||
| if it's *actually* Bool, the type match works. | |||
|
21:17
Synn joined
|
|||
| rcfox | rakudo: my enum Day <Sun Mon Tue Wed Thu Fri Sat>; my Int $a = 10 but Mon; say $a ~~ Day; say $a ~~ Int; | 21:17 | |
| p6eval | rakudo fcf4f3: OUTPUT«===SORRY!===Do not yet support my scoped enums at line 22, near "; my Int $"» | ||
| rcfox | Bah. | ||
| What does it mean by scoped enums? | 21:18 | ||
|
21:18
rindolf joined
|
|||
| rindolf | Hi all. | 21:18 | |
| masak | rcfox: 'my' makes it scoped. | ||
| hello, rindolf. | |||
| rindolf | masak: hi, what's up? | ||
| rcfox | Oh, I didn't realize I copied the my. | ||
| rakudo: enum Day <Sun Mon Tue Wed Thu Fri Sat>; my Int $a = 10 but Mon; say $a ~~ Day; say $a ~~ Int; | 21:19 | ||
| p6eval | rakudo fcf4f3: OUTPUT«01» | ||
| masak | rindolf: finishing up my GSoC grant. | ||
| rindolf: what about you? | |||
| rindolf | masak: I've prepared an .rpm for libenet. | ||
| I need it for building the game 0AD. | |||
| rcfox | rakudo: enum Day <Sun Mon Tue Wed Thu Fri Sat>; my Int $a = 10 but Mon; say $a ~~ Day::Mon; | ||
| p6eval | rakudo fcf4f3: OUTPUT«0» | ||
| rcfox | rakudo: enum Day <Sun Mon Tue Wed Thu Fri Sat>; my Int $a = 10 but Mon; say $a ~~ Mon; | 21:20 | |
| p6eval | rakudo fcf4f3: OUTPUT«0» | ||
| rcfox | Buh | ||
| Okay, I'm done flooding for now. :P | |||
| masak | rindolf: every time I see your user name, my thoughts return to the Perl 5 cleanup you once initiated. use.perl.org/article.pl?sid=02/02/13/1959233 | ||
| rindolf: how have your thoughts on Perl 6 and Rindolf changed since then? | 21:21 | ||
| rindolf | masak: well.... | 21:22 | |
| masak: I've experimented a little with Perl 6 - it has many cool ideas. | |||
| masak: and I'd like to see Perl 5 maintain backwards compatibility mostly. | |||
| masak: I appreciate the fact that the perl 5 and CPAN hackers were able to borrow many good ideas from Perl 6. | 21:23 | ||
| One thing I don't like is that Perl 6 is called "Perl 6". I think it should have used a different name. | |||
| masak | I sense a "but" in there somewhere. | ||
| ah. | |||
| quite a few people seem to be uncomfortable with the "Perl 6" name. | 21:24 | ||
| (I'm not.) | |||
| tadzik | What's the big deal, it's not replacing Perl 5, hence it's not named just "Perl" | ||
| it's not Perl 5.2 | 21:25 | ||
| pugssvn | r31945 | patrickas++ | Added spaces around ... operator | ||
| masak | rindolf: what's the state of rindolf-the-implementation these days? | ||
| rindolf | masak: I never started working on it. | ||
| masak | oh. | ||
| rindolf | masak: not sure if any of my ideas back then are any longer relevant. | ||
| masak: I discovered several of them were already doable with Perl 5. | 21:26 | ||
| Tene | rindolf: "maintain backwards compatibility" isn't a strictly binary property. What's your stance on, for example, adding new language keywords, that could potentially conflict with code that someone could have written sometime in the past? | ||
| [Coke] | Tene: it's really not worth arguing about the name. =-) | 21:27 | |
| rindolf | Tene: well, maybe using the feature pragma. | ||
| Tene | [Coke]: itym tadzik | ||
| tadzik | [Coke]: that's why I'm not :) | ||
| frettled | I'm unhappy that I have to explicitly turn on 5.10 features in Perl 5. :( | 21:28 | |
| masak | rindolf: the reason I'm asking about rindolf is that as an alternative/criticism of the Perl 6 process, it's historically interesting to me. | ||
| Tene | rindolf: for example, chromatic' patch to add a 'class' keyword, similar to mentioned in that UPO post, was rejected ont he grounds of backwards compatibility, iirc. | ||
| masak | it was. | ||
| but if I were a p5p-er in that situation, I'd probably freak out too. | 21:29 | ||
| tadzik | I'm unhappy that the fact that we have 5.12 is worth nothing, for everyone tries to be compatibile with 5.8 | ||
| pugssvn | r31946 | patrickas++ | Added test for 4...^5 with no spaces | ||
| tylercurtis | tadzik: Frequently Foo n+1 is intended to replace Foo n. | ||
| e.g, versions of ECMAscript where N != 4. | 21:30 | ||
| PerlJam | tadzik: 5.12 is not "worth nothing". Progress happens in increments of release numbers, not necessarily in increments of time. | ||
| tadzik | tylercurtis: but I'm afraid people will not easily migrate to n+1 in this case | ||
| PerlJam | tadzik: at some point, 5.8 will be "too old", not because of its age, but because 5.18 is out. | ||
| masak sleeps | 21:31 | ||
| frettled | PerlJam: In some respects you're right, but if you still have to "use v5.10" or similar to get features more recent than 5.8, then 5.8 will remain the standard in the P5 world. | 21:33 | |
| PerlJam | frettled: yeah, that particular "feature" actually bothers me a bit. | ||
| frettled | I'm sure there were quite a bit of broken feathers on the ground after that decision was made. :) | ||
| [Coke] | as an anecdote, I know someone in albany.pm who is still using 5.5 or 5.6 | 21:34 | |
| frettled | colleagues of mine are writing Perl 5 code as if it was Perl 4… | ||
| PerlJam | [Coke]: as long as it's not Perl 4.036 :-) | ||
| rindolf | [Coke]: I think Intel Israel are still using 5.6.x. | 21:35 | |
| frettled | My feelings have «always» been mixed about Perl 6 having the name Perl 6, but these days, I'm feeling increasingly comfortable with that. | 21:36 | |
| tylercurtis | tadzik: true. People expect to be able to take their Foo n code and upgrade immediately to Foo n+1 with no effort beyond installing the new version, though. Even (relatively) minor backwards-incompatibilities (e.g. that in Python 2 to 3) bother people. | ||
| rindolf | [Coke]: and szabgab told us of a company which has thousands of perl-5.6.x scripts and they are planning the upgrade to 5.8.x | ||
| frettled | rindolf: I'd love to claim that I found that incredible, but that would just be dishonest of me. | 21:37 | |
| PerlJam | frettled: and that's the thing ... the more people see Perl 6 out there, the more they'll get used to it. | ||
| frettled | Yup. | ||
| Tene | I'm dealing with 5.8.4 right now and it's a horrible pain. | ||
| rindolf | Tene: heh. | 21:38 | |
| Tene: someone posted to SF.pm (IIRC) for help with 5.8.7 on his Linux from scratch system. | |||
| He refused to upgrade to something more recent. | |||
| I said he was beyond help. | |||
| Tene | I should look into SF.pm eventually. Moved to the bay area a couple of months ago. | 21:44 | |
|
21:44
molaf joined
21:45
perimosocordiae left
21:46
xinming_ joined
|
|||
| rindolf | Tene: ah, interesting. | 21:46 | |
| [Coke] | (I look at it this way: I survived oracle, solaris, and java's numbering scheme.) | ||
| rindolf | Tene: weren't you previously located in Utah? | ||
| Tene | rindolf: Yes, that's right. | ||
| rindolf | Tene: BTW, someone commented that after reading the Spark specification , he thought it was a second system effect language, and I think he was right. :-( | 21:47 | |
| Tene: maybe I should aim a bit lower. | |||
|
21:51
simcop2387-lap joined
|
|||
| simcop2387-lap | what document should i look at for learning about namespaces in perl6? | 21:52 | |
| nevermind i'm blind | |||
| simcop2387-lap does this too much | 21:53 | ||
|
21:55
rgrau joined
22:09
Packetknife joined
22:11
awwaiid joined
|
|||
| tylercurtis | Does anyone else have problems with STD's makefile on OS X? It appears to use cp -a, but OS X's cp doesn't support -a. | 22:33 | |
| tell pmurias The existence of both v6/v6-mildew/lib/V6/ and v6/v6-mildew/lib/v6/ in pugs svn doesn't play nicely with non-case-sensitive filesystems (for example, HFS+). Would you mind renaming/moving one of them so that I can checkout the repo again? | 22:51 | ||
| phenny: tell pmurias The existence of both v6/v6-mildew/lib/V6/ and v6/v6-mildew/lib/v6/ in pugs svn doesn't play nicely with non-case-sensitive filesystems (for example, HFS+). Would you mind renaming/moving one of them so that I can checkout the repo again? | |||
| phenny | tylercurtis: I'll pass that on when pmurias is around. | ||
|
23:02
ghyspran joined
23:05
CaptTofu joined
|
|||
| ingy | win 46 | 23:17 | |
|
23:24
dju_ joined
|
|||
| tadzik | gnight | 23:25 | |
|
23:26
hercynium joined
|
|||
| tylercurtis | sorear: do you know if any problems would be caused if the usages of "cp -a" in STD/viv's Makefile were replaced with "cp -R"? | 23:50 | |
|
23:52
Intensity joined
|
|||
| sorear | What OS are you on? | 23:53 | |
| tylercurtis | OS X 10.5 | ||
| sorear | according to cp(1) -a is short for -dpR | ||
| POSIX.1-2004 talks about -p and -R but not -d | |||
| sorear checks if -d is essential | |||
| -d: Copy symbolic links as symbolic links | 23:54 | ||
| no symlinks in STD | |||
| using -pR will work fine | |||
| tylercurtis: do you have a pugs commit bit yet? | 23:56 | ||
| tylercurtis | sorear: yes. | 23:57 | |
|
23:59
Psyche^ joined
|
|||