Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-01-31

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:04 masak 'night, #perl6
00:04 colomon \o
00:13 jnthn sleep &
00:20 kmwallio joined #perl6
00:24 sorear mail sent
00:24 sorear good * #perl6
00:24 replore joined #perl6
00:34 cj sorear!
00:37 sorear cj!
00:52 sorear cj?
01:16 colomon o/
01:17 alvis joined #perl6
01:26 cj sorear: oh, nothing.  just saying hi :)
01:26 vlixes \o
01:27 sorear helllo then, cj, vlixes
01:31 vlixes left #perl6
02:02 cognominal joined #perl6
02:03 colomon sorear: having release difficulties?
02:06 sorear colomon: ?  Release is finished
02:06 sorear ...Did I forget a step?
02:06 sorear I was having difficulties earlier
02:06 colomon ooo, I missed the announcement
02:06 colomon yes, I saw that earlier.
02:13 colomon Aw, I see the announcement in my slow e-mail.
02:13 colomon *Ah
02:14 Yary joined #perl6
02:15 Yary nom: class A{has $.q}; my @x=A.new(q=>44),A.new(q=>12)
02:15 p6eval nom ce5cca: OUTPUT«Default constructor only takes named arguments␤  in method new at src/gen/CORE.setting:561␤  in block <anon> at /tmp/kuPLvDH4VM:1␤  in <anon> at /tmp/kuPLvDH4VM:1␤»
02:15 Yary nom: class A{has $.q}; my @x=A.new(q=>44)
02:15 p6eval nom ce5cca:  ( no output )
02:15 Yary Am I doing something wrong in that first example, trying to create two "A"s at once?
02:15 Yary or is that a bug?
02:16 Yary niecza: class A{has $.q}; my @x=A.new(q=>44),A.new(q=>12); say @x
02:16 p6eval niecza v13-389-g852f0ff: OUTPUT«A.new(...) A.new(...)␤»
02:17 Yary nom: class A{has $.q}; my @x=A.new(q=>44),A.new(q=>12); say @x
02:17 p6eval nom ce5cca: OUTPUT«Default constructor only takes named arguments␤  in method new at src/gen/CORE.setting:561␤  in block <anon> at /tmp/NLunyXYK4J:1␤  in <anon> at /tmp/NLunyXYK4J:1␤»
02:17 Yary just checking if that was a warning or an error
02:25 kthakore joined #perl6
02:25 sirhc joined #perl6
02:25 arnsholt joined #perl6
02:25 masak joined #perl6
02:25 PerlJam joined #perl6
02:25 sunnavy joined #perl6
02:25 jnthn joined #perl6
02:25 frettled joined #perl6
02:25 sirhc joined #perl6
02:25 Woodi joined #perl6
02:25 flussence joined #perl6
02:25 y3llow joined #perl6
02:25 japhb joined #perl6
02:26 pyrimidine joined #perl6
02:26 imarcusthis joined #perl6
02:27 dukeleto joined #perl6
02:28 daemon joined #perl6
02:30 diakopter joined #perl6
02:30 nn joined #perl6
02:33 bacek_at_work ~~
02:33 bacek_at_work perl6: my $sum = 0; for 1..1_000  { $sum += $_ }; say $sum
02:33 p6eval pugs b927740, rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«500500␤»
02:33 bacek_at_work perl6: my int $sum = 0; for 1..1_000  { $sum += $_ }; say $sum
02:33 p6eval niecza v13-389-g852f0ff: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Malformed my at /tmp/P45EEjh6nX line 1:â�¤------> [32mmy[33mâ��[31m int $sum = 0; for 1..1_000  { $sum += $[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
02:33 p6eval ..pugs b927740: OUTPUT«500500␤»
02:33 p6eval ..rakudo ce5cca: OUTPUT«Cannot assign to a non-container␤  in block <anon> at /tmp/Z_ydaqUM3h:1␤  in method reify at src/gen/CORE.setting:4475␤  in method reify at src/gen/CORE.setting:4380␤  in method reify at src/gen/CORE.setting:4380␤  in method gimme at src/gen/CORE.setting:4744␤  in …
02:34 bacek_at_work questions:
02:34 bacek_at_work why "Cannot assign to non-container"?
02:34 bacek_at_work and why "for" calling eager?
02:43 sorear += isn't supported yet for native types in Rakudo
02:43 sorear if an operation doesn't explicitly take native types, a read-only copy is created
02:43 sorear += gets something unassignable as the LHS, so fails
02:44 sorear 'for' calls 'eager' because Rakudo currently implements for A { B } as A.map({ B }).eager;
02:59 tomaw joined #perl6
03:21 jaldhar joined #perl6
03:23 orafu joined #perl6
03:39 wolfman2000 joined #perl6
03:45 cognominal joined #perl6
04:01 birdwindupbird joined #perl6
04:10 PZt joined #perl6
04:50 birdwind1pbird joined #perl6
04:54 Trashlord joined #perl6
05:11 cognominal joined #perl6
05:32 Devarishi joined #perl6
05:33 Devarishi Hello, world! :)
05:36 Devarishi Hi Chee!
05:37 moritz o/
05:37 TimToady we are not the world, but we are #perl6 :)
05:38 Devarishi Well, I intentionally said so so that I would know that I am on the right page.
05:39 TimToady what brings you to #perl6?
05:39 * chee !
05:40 Timbus well perl 6 has no money or women, so it must be Power
05:40 Devarishi To TimToady -> Something inside me... :)
05:40 Devarishi Actually, I am learning Perl 5 day and night these days.
05:40 TimToady my condolences :)
05:40 Devarishi I thought I would be part of this community.
05:41 TimToady perl6: say "Hi, Devarishi!
05:41 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected end of input␤    expecting block, "\\", variable name or "\""␤    at /tmp/0CXcV9YBMT line 2, column 1␤»
05:41 p6eval ..niecza v13-389-g852f0ff: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/O3lwnpX90R line 1:�------> [32msay[33m�[31m "Hi, Devarishi![0m��Confused at /tmp/O3lwnpX90R line …
05:41 p6eval ..rakudo ce5cca: OUTPUT«===SORRY!===␤Confused␤at /tmp/htsQBlWTPG:1␤»
05:41 TimToady perl6: say "Hi, Devarishi!"
05:41 p6eval pugs b927740, rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«Hi, Devarishi!␤»
05:41 Devarishi So, how can I get involved even though I am an intermediate student of Perl working on Linux as a Software Engineer.
05:42 TimToady there are many ways to get involved
05:42 Devarishi I am afraid. I am not a master yet. Can I still get involved?
05:42 TimToady testing, docs, testing, testing, and just trying things out
05:42 Devarishi Right!
05:42 TimToady and demonstrating which things are easy and which things are hard
05:43 Devarishi Reading docs and writing scripts.
05:43 Devarishi Can you elaborate "testing"?
05:43 TimToady both formal and informal
05:43 Devarishi Do you mean "Writing Perl scripts" or do you mean testing what we see on the official site?
05:43 TimToady formally, Perl 6 is defined by the test suite
05:43 Devarishi Okay.
05:44 TimToady informally, anyone writing Perl 6 is testing it
05:44 Devarishi I got your point!
05:44 TimToady writing examples for rosettacode.org, for example, is an informal way of testing
05:44 Devarishi So, will my understanding of Perl 5 help me?
05:44 TimToady we already have 406 running examples on rosettacode
05:44 TimToady yes
05:44 chee lol i love Devarishi
05:45 am0c joined #perl6
05:45 Devarishi Chee -> What made you do that? :)
05:45 TimToady the details are different, but the overall philosophy is the same
05:45 kaleem joined #perl6
05:45 Devarishi I am checking out the site you pointed to.
05:46 TimToady and by an large, if you try something P5ish, and it's not P6ish, the compiler will tell you
05:46 TimToady you'll also want to follow the doc links from perl6.org
05:46 Devarishi Well, i just read the official site that we can include P5 and P6 at will.
05:46 TimToady well, that's is a long-term goal
05:46 chee Devarishi: you have cheery disposition. it was what made me do that
05:47 TimToady niecza: say $(
05:47 p6eval niecza v13-389-g852f0ff: OUTPUT«[31m===[0mSORRY![31m===[0m��Unable to parse contextualizer at /tmp/YfbFvO5weI line 1 (EOF):�------> [32msay $([33m�[31m<EOL>[0m�Couldn't find final ')'; gave up at /tmp/YfbFvO5weI line 1 (EOF):�------> [32msay $([33m�[31m<EOL>[0m��Parse failed…
05:47 TimToady hmm
05:48 Devarishi In the morning when I got up for office, I thought "D. Rithie and Larry Wall" folks are not born every day.
05:48 TimToady niecza: say $)
05:48 p6eval niecza v13-389-g852f0ff: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Non-declarative sigil is missing its name at /tmp/cw2Yh0yPfT line 1:â�¤------> [32msay [33mâ��[31m$)[0mâ�¤â�¤Use of uninitialized value in string contextâ�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1209 (warn @ 3) â�¤  at…
05:48 TimToady std: say $)
05:48 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $) variable; in Perl 6 please use $*EGID at /tmp/ZjxLZpBjtY line 1:�------> [32msay $)[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 109m�»
05:48 Devarishi So, I want to follow them.
05:49 TimToady and now that D. Ritchie is gone, you're stuck with L. Wall... :)
05:49 Devarishi Though Ritchie is no more. But what these folks/Gurus have contributed to IT world, is beyond words.
05:49 TimToady std: $#
05:49 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $# variable; in Perl 6 please use .fmt at /tmp/CpDippBXIa line 1:�------> [32m$#[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 107m�»
05:50 TimToady std: $?
05:50 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $? variable as child error; in Perl 6 please use $! at /tmp/hFVCfRAZ66 line 1:�------> [32m$?[33m�[31m<EOL>[0m�Parse failed�FAILED 00:01 107m�»
05:50 TimToady std: say 42 ? "foo" : "bar"
05:50 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at /tmp/zjmiK4tewW line 1:�------> [32msay 42 ?[33m�[31m "foo" : "bar"[0m�Parse failed�FAILED 00:01 109m�»
05:50 Devarishi Tim -> At first I found Perl time-consuming as I used to write Web Pages in PHP. Specifically when I wrote some CGI in Perl. When we POST form data it is easier to handle them using PHP, for example, than in Perl.
05:51 TimToady so P6 tries to help you translate from P5 to P6
05:51 Devarishi But then I realized the Power of Perl in text processing.
05:51 TimToady Perl is more of a general language
05:51 Devarishi Will P6 provide easy mechanism for CGI and Form Data hnadling?
05:51 TimToady there's already some work on that from various folks
05:52 moritz perl 6 provides enough features so that module authors can do such things
05:52 TimToady and it's really easy to mutate Perl 6 into whatever language you really want
05:52 Devarishi That's good news.
05:52 TimToady (at least, that's a goal)
05:53 Devarishi Thanks Tim and Chee! I will stay in touch with you people here.
05:53 TimToady the language itself is parsed with Perl 6 grammars, so it's really easy to tweak with more Perl 6
05:53 TimToady have fun!
05:54 Devarishi I am in office and have to take care of some release stuffs assigned to me. Have a nice time!
05:55 Devarishi left #perl6
05:55 Timbus irc at work :< live the dream
05:56 moritz std: class A { submethod b { $.foo } }
05:56 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Virtual call $.foo may not be used on partially constructed object at /tmp/e2vxdb1LPv line 1:�------> [32mclass A { submethod b { [33m�[31m$.foo } }[0m�Check failed�FAILED 00:01 108m�»
05:57 moritz this seems to assume that submethods are *only* used for object construction
05:57 TimToady std: class A { submethod b { self.foo } }
05:57 p6eval std 48335fc: OUTPUT«ok 00:01 108m␤»
05:57 TimToady the assumption is that you can't speak for subclasses
05:57 TimToady which is true of .gist and .perl
06:00 TimToady submethods are for violating Liskov for infrastructural reasons, I guess
06:04 bonsaikitten joined #perl6
06:22 sorear bleh, missed my chance to welcome Devarishi
06:22 sorear chee++
06:23 * sorear wonders if Devarishi knew ey was doing the third-person/second-person mixup thing
07:13 felipe joined #perl6
07:24 moritz std: class A { has $.x = $!y }
07:24 p6eval std 48335fc: OUTPUT«ok 00:01 110m␤»
07:24 moritz std: class A { has $.x = $.y }
07:24 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Virtual call $.y may not be used on partially constructed object at /tmp/XeZQH2AVdk line 1:�------> [32mclass A { has $.x = [33m�[31m$.y }[0m�Check failed�FAILED 00:01 110m�»
07:27 dalek rakudo/has-self: 6b4a6b7 | moritz++ | src/ (3 files):
07:27 dalek rakudo/has-self: first cut at porting $*HAS_SELF stuff from STD
07:27 dalek rakudo/has-self:
07:27 dalek rakudo/has-self: class A { has $.x = $!y } now complains that $!y is used where no self
07:27 dalek rakudo/has-self: available, which is wrong. The rest seems to work fine.
07:27 dalek rakudo/has-self: review: https://github.com/rakudo/rakudo/commit/6b4a6b729d
07:29 dalek roast: a685a14 | moritz++ | / (3 files):
07:29 dalek roast: fix some uses of attributes where they cannot work
07:29 dalek roast: review: https://github.com/perl6/roast/commit/a685a147e6
07:39 xinming joined #perl6
08:17 dalek roast: 1a05c3d | moritz++ | S05- (4 files):
08:17 dalek roast: rakudo unfudges for <a::b> style subrule calls
08:17 dalek roast: review: https://github.com/perl6/roast/commit/1a05c3dfad
08:23 simcop2387 joined #perl6
08:49 mj41 joined #perl6
08:50 masak morning, #perl6onauts.
08:51 moritz \o masakist
08:56 sorear o/ masak
09:01 masak ooh, a Niecza release! :D
09:01 masak sorear++
09:02 masak niecza: END { say "OH BAI BAI" }; die "OH HAI"
09:02 p6eval niecza v13-389-g852f0ff: OUTPUT«Unhandled exception: OH HAI␤  at /home/p6eval/niecza/lib/CORE.setting line 1344 (die @ 3) ␤  at /tmp/jkpC0BvEJw line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3606 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3607 (mod…
09:02 daxim joined #perl6
09:02 masak we have a rakudobug about END phasers not running after &die
09:07 sorear niecza: END { 1 while 1 }; die "OH HAI"
09:07 p6eval niecza v13-389-g852f0ff: OUTPUT«(timeout)Unhandled exception: OH HAI␤  at /home/p6eval/niecza/lib/CORE.setting line 1344 (die @ 3) ␤  at /tmp/5eAoI2PT3C line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3606 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line …
09:07 sorear niecza: END { 1 while 1 }; 1 1
09:07 p6eval niecza v13-389-g852f0ff: OUTPUT«(timeout)[31m===[0mSORRY![31m===[0m��Two terms in a row at /tmp/_HTVLAv3Co line 1:�------> [32mEND { 1 while 1 }; 1 [33m�[31m1[0m��Parse failed��»
09:07 * sorear exploits the motion of (timeout) to the front
09:08 masak favorite features of v14: END blocks, new role stuff, MAIN, attribtue-binding parameters, Set/Bag.
09:08 sorear niecza: END { Niecza::toggle_mono_trace }; 1 1 # curious what this will do
09:08 moritz roles and MAIN for me
09:08 p6eval niecza v13-389-g852f0ff: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row at /tmp/w3VGqkSdKf line 1:�------> [32mEND { Niecza::toggle_mono_trace }; 1 [33m�[31m1 # curious what this will do[0m��Parse failed��User defined signal 2�»
09:09 moritz the MAIN stuff allows niecza to run several p6cc submissions that the contestants hadn't tested on niecza
09:09 masak \o/
09:10 masak we've got a fair number of contestants this year who write in afterwards and say they would've sent in submissions had they only had tuits for it.
09:10 masak more so than last year.
09:11 dakkar joined #perl6
09:14 sorear rakudo: END { say "BYE" }; 1 1
09:14 p6eval rakudo ce5cca: OUTPUT«===SORRY!===␤Confused␤at /tmp/qBTGtPnZr2:1␤»
09:14 * sorear -> sleep
09:16 bkolera joined #perl6
09:23 masak 'night, sorear. dream of a chance to welcome Devarishi.
09:24 grondilu joined #perl6
09:24 grondilu perl6:  my %h = (<foo> => []); push %h<foo>, my $foo = "bar"; say $foo; # I'm a expecting "bar"
09:24 p6eval pugs b927740, niecza v13-389-g852f0ff: OUTPUT«bar␤»
09:24 p6eval ..rakudo ce5cca: OUTPUT«Any()␤»
09:25 grondilu rakudo--, niecza++
09:25 moritz rakudo: my %h = (<foo> => []); push %h<foo>, (my $foo = 'bar'); say $foo
09:25 p6eval rakudo ce5cca: OUTPUT«bar␤»
09:26 grondilu shoudn't '=' come before ',' ?
09:27 moritz there are two '=' with different precedence :/
09:27 grondilu perl6:  my %h = (<foo> => []); my $foo; push %h<foo>, $foo = "bar"; say $foo; # I'm a expecting "bar"
09:27 p6eval pugs b927740, niecza v13-389-g852f0ff: OUTPUT«bar␤»
09:27 p6eval ..rakudo ce5cca: OUTPUT«Any()␤»
09:28 grondilu I'm pretty sure it should gives 'bar'
09:28 masak aye.
09:28 moritz perl6:  my %h = (<foo> => []); my $foo; (push %h<foo>, $foo) = 'bar'; say $foo
09:28 p6eval pugs b927740: OUTPUT«*** Can't modify constant item: VInt 1␤    at /tmp/dzW4kzYqIJ line 1, column 33-61␤»
09:28 p6eval ..rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«Any()␤»
09:28 masak do we have an RT ticket for this?
09:29 grondilu notice that it works better with a plain array:
09:29 masak ISTR we have something about item assignment...
09:29 grondilu rakudo: push my @a, my $foo = "bar";  say $foo
09:29 p6eval rakudo ce5cca: OUTPUT«bar␤»
09:30 masak ah, we have https://rt.perl.org/rt3/Ticket/Display.html?id=67944
09:30 masak but it's resolved.
09:30 * masak submits new rakudobug
09:34 masak grondilu: https://rt.perl.org/rt3/Ticket/Display.html?id=109476
09:38 drbean joined #perl6
09:42 grondilu ok, thanks
09:45 Trashlord joined #perl6
09:47 Psyche^ joined #perl6
09:59 cognominal joined #perl6
10:05 masak nom: sub combinations($k, $n) { sub postfix:<!>($n) { [*] 1..$n }; return $n! / ($k! * ($n - $k)!) }; say combinations(2, 5)
10:05 p6eval nom ce5cca: OUTPUT«10␤»
10:05 masak niecza: sub combinations($k, $n) { sub postfix:<!>($n) { [*] 1..$n }; return $n! / ($k! * ($n - $k)!) }; say combinations(2, 5)
10:05 p6eval niecza v13-389-g852f0ff: OUTPUT«10␤»
10:05 masak \o/
10:06 moritz niecza: sub infix:<choose>($n, $k) { sub postfix:<!>($n) { [*] 1..$n }; return $n! / ($k! * ($n - $k)!) }; say 80 choose 40
10:06 p6eval niecza v13-389-g852f0ff: OUTPUT«1.0750720873333618E+23␤»
10:07 moritz since these numbers are always integers, I'm sure there's a better evaluation scheme
10:07 masak nod
10:09 snearch joined #perl6
10:12 masak is there a nice algorithm to churn out XXOO XOXO XOOX OXOX OXXO OOXX? (all permutations of two elements each)
10:13 moritz well, you can count the indexes
10:14 moritz nom: for 0..2 -> $i1 { for $i1..3 -> $i2 { my @a = 'O' xx 4; @a[$i1, $i2] = 'X' xx 2; say @a.join } }
10:14 p6eval nom ce5cca: OUTPUT«XOOO␤XXOO␤XOXO␤XOOX␤OXOO␤OXXO␤OXOX␤OOXO␤OOXX␤»
10:14 moritz nom: for 0..2 -> $i1 { for $i1+1..3 -> $i2 { my @a = 'O' xx 4; @a[$i1, $i2] = 'X' xx 2; say @a.join } }
10:14 p6eval nom ce5cca: OUTPUT«XXOO␤XOXO␤XOOX␤OXXO␤OXOX␤OOXX␤»
10:15 masak nom: for ^16 { .say if .comb.grep("X") == 2 given .fmt("%04b").trans([0, 1] => <O X>) }
10:15 p6eval nom ce5cca: OUTPUT«OOXX␤OXOX␤OXXO␤XOOX␤XOXO␤XXOO␤»
10:15 masak this works, but feels wasteful.
10:16 grondilu How could I compute a sha256?  I see that there is an implementation in parrot but it's in PIR.  Is it possible to import it into perl6 code?
10:16 masak moritz: your solution works, but doesn't generalize to variable O's and X's.
10:16 moritz masak: it easily generalizes to variable O's :-)
10:16 masak :)
10:17 masak yes, but not both.
10:17 moritz somebody please port Algorithm::Loops to Perl 6 :-)
10:17 masak I'm pretty sure this can be written as a sequence operator somehow.
10:19 moritz I'm pretty sure there's an elegant solution that just counts up to the number of permutations, and calculates the indexes of the Xs with modulo somehow
10:20 moritz grondilu: you can, but it's probably not quite trivial
10:20 moritz grondilu: good news, there's at least one module on modules.perl6.org that does something similar
10:20 moritz (either for md5 or sha1)
10:21 moritz grondilu: oh. https://github.com/soh-cah-toa/p6-digest-sha256/
10:21 grondilu cool
10:21 grondilu but do I need panda for that?  Last time I checked, it didn't fly.
10:22 jnthn Rakudo uses SHA-1 internally, so that's available in a (non-portable) way :)
10:22 jnthn nom: say nqp::p6box_s(nqp::sha1('dugong'))
10:22 p6eval nom ce5cca: OUTPUT«B6120314269E12B126A805324E04763E291615FA␤»
10:22 moritz grondilu: no
10:22 moritz grondilu: ufo should do fine, or even just copying the .pm file yourself
10:22 masak you don't need panda to use modules.
10:22 * grondilu has never installed a perl6 module and doesn't know how to.
10:22 masak ufo isn't for installing modules, just for building a decent Makefile.
10:23 moritz grondilu: fwiw you need the 'nom' branch of that module
10:23 moritz with a newer rakudo
10:23 moritz I'll ask cosimo to merge it into master
10:24 grondilu « fatal: remote error: Could not find Repository soh-cah-toa/digest-sha256 »
10:24 rsimoes joined #perl6
10:25 moritz https://github.com/soh-cah-toa/p6-digest-sha256/
10:25 moritz oh, the readme is wrong
10:26 moritz git://github.com/soh-cah-toa/p6-digest-sha256.git
10:28 grondilu what's 'ufo' ??
10:29 moritz grondilu: see https://github.com/masak/ufo/
10:31 grondilu ok, thanks
10:37 masak ufo was built for module developers who are tired of crafting their own Makefile.
10:47 masak perl6: $_ = "OXOX"; s:st(*-1)/OX/XO/; .say
10:47 p6eval niecza v13-389-g852f0ff: OUTPUT«Unhandled exception: Cannot use value like WhateverCode as a number␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 238 (Any.Numeric @ 5) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at <unknown> line 0 (ExitRunloop …
10:47 p6eval ..rakudo ce5cca: OUTPUT«XOOX␤»
10:47 p6eval ..pugs b927740: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20111008/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HAND…
10:47 masak I don't think this is spec, but can I ask that we make it work? :)
10:47 masak (Rakudo runs it, but gets it wrong. should be "OXXO".
10:47 masak )
10:48 moritz btw it looks better when you write it as :nth()
10:48 masak oh!
10:48 masak yes.
10:48 masak perl6: $_ = "OXOX"; s:nth(*-1)/OX/XO/; .say
10:48 moritz rakudo simply ignores :nth for now; that part hasn't been backportef from b yet
10:48 p6eval niecza v13-389-g852f0ff: OUTPUT«Unhandled exception: Cannot use value like WhateverCode as a number␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 238 (Any.Numeric @ 5) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at <unknown> line 0 (ExitRunloop …
10:48 p6eval ..rakudo ce5cca: OUTPUT«XOOX␤»
10:48 p6eval ..pugs b927740: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20111008/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HAND…
10:48 moritz b: $_ = "OXOX"; s:nth(*-1)/OX/XO/; .say
10:48 p6eval b 1b7dd1: OUTPUT«maximum recursion depth exceeded␤  in 'Cool::Numeric' at line 1921:src/gen/core.pm␤  in 'Cool::Numeric' at line 1922:src/gen/core.pm␤  in 'Cool::Num' at line 1:src/gen/core.pm␤  in 'Cool::Numeric' at line 1921:src/gen/core.pm␤  in 'Cool::Numeric' at line 1923:src/gen/co…
10:48 masak alpha: $_ = "OXOX"; s:nth(*-1)/OX/XO/; .say
10:48 p6eval alpha : OUTPUT«Colons cannot be used as delimiters in quoting constructs at line 10, near ":nth(*-1)/"␤in Main (file <unknown>, line <unknown>)␤»
10:49 * masak tut-tuts
10:55 nsh joined #perl6
10:56 sbp joined #perl6
11:03 masak nom: my $s = "OOXX"; say $s; repeat until $s eq "XXOO" { my $i = rindex($s, "OX"); $s = $s.substr(0, $i) ~ "XO" ~ $s.substr($i + 2).comb.sort.join; say $s }
11:03 p6eval nom ce5cca: OUTPUT«OOXX␤OXOX␤OXXO␤XOOX␤XOXO␤XXOO␤»
11:03 masak there. that solution generalizes.
11:04 moritz now *that* can be written as a series, of course
11:04 masak yes. I leave that as an exercise for the interested reader :P
11:05 moritz nom: sub gen($s) { my $i = rindex($s, "OX");  $s.substr(0, $i) ~ "XO" ~ $s.substr($i + 2).comb.sort.join; }; say 'OOXX', &gen ... 'XXOO'
11:05 p6eval nom ce5cca: OUTPUT«OOXX OXOX OXXO XOOX XOXO XXOO␤»
11:06 masak \o/
11:06 * moritz interested reader
11:06 masak moritz++
11:07 masak moritz: in the "Winning Ways" books, the imagined reader who does all the calculations and experiments is fondly referred to as "Our Most Assiduous Reader", or "Omar" for short.
11:09 moritz I haven't made it far into those books yet :/
11:09 masak they're lovely.
11:10 masak imagine inventing a whole number system just to analyze games!
11:10 moritz seems legit.
11:11 moritz people (well, some kind of people) invent their own algebras just for fun
11:11 * arnsholt fondly remembers discovering octal games
11:15 masak octal games rock.
11:15 masak too bad I could only issue that kind of task once :)
11:23 moritz it's one of the thing where you need to know a particular branch of theory, and otherwise are hard-pressed to invent that stuff yourself
11:26 arnsholt masak: Well, you could always go with one where perfect play isn't possible =)
11:26 arnsholt That'd make for a different kind of task though
11:28 moritz we did consider iterated prisoner's dilemma, and letting all the contestant's solution work against each other
11:28 moritz and it was fun to write the harness for that one
11:28 spine_ joined #perl6
11:29 moritz but it turns out it's very hard to beat simple tit-for-tat by anything more than a small margin
11:30 moritz so we've decided not to go with this one
11:33 moritz maybe I should make that a mini-challenge on my blog
11:36 preflex_ joined #perl6
11:48 moritz sorear: are niecza's line numbers 0-based?
11:49 moritz sorear: I just noticed that line numbers in uninitialized warnings seem to be one off
11:49 * colomon has never noticed that...
11:50 moritz try
11:50 moritz my $a;
11:50 moritz note 'a';
11:50 moritz $a += Any;
11:50 moritz this has     at /home/moritz/niecza-bug.pl line 2 (mainline @ 2)
11:50 moritz in the backtrace
11:51 moritz but the warning comes from the 3rd line
11:51 moritz nom: say 1
11:51 p6eval nom ce5cca: OUTPUT«1␤»
11:51 moritz niecza: my $a = 0;␤note 'a';␤$a += Any
11:51 p6eval niecza v13-389-g852f0ff: OUTPUT«a␤Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1206 (warn @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 239 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/YeE0K8ZlDT line 2 (mai…
11:52 moritz at /tmp/YeE0K8ZlDT line 2
11:52 moritz there you have it
12:02 masak moritz: +1 for mini-challenge for tit-for-tat
12:02 masak I'm slightly disappointed that no-one has picked up the "Little Animal Farm" challenge
12:03 tadzik yet :)
12:03 masak right, yet.
12:03 masak was looking forward to seeing subtle trading tactics and strategies.
12:03 masak maybe I need to get the ball rolling by writing something myself...
12:05 cognominal joined #perl6
12:08 masak latest I did was to create this example AI class: https://gist.github.com/1154298
12:08 masak maybe I should actually create a few that play decently, and pit them against each other?
12:08 masak would make a nice blog post, methinks.
12:09 tadzik nice
12:09 masak perl6: say Bool.roll
12:09 p6eval niecza v13-389-g852f0ff: OUTPUT«False␤»
12:09 p6eval ..pugs b927740: OUTPUT«*** No such method in class Bool: "&roll"␤    at /tmp/e5avx2e2cj line 1, column 5 - line 2, column 1␤»
12:09 p6eval ..rakudo ce5cca: OUTPUT«True␤»
12:10 felher masak, moritz: +1, more mini-challenges, more blog posts :)
12:11 tadzik aw, inconsistent results! Oh, wait
12:12 masak :P
12:15 masak nom: sub all-combs($k, $n) { sub gen($s) { my $i = rindex($s, "OX");  $s.substr(0, $i) ~ "XO" ~ $s.substr($i + 2).comb.sort.join; }; my $os = "O" x ($n - $k); my $xs = "X" x $k; "$os$xs", &gen ... "$xs$os" }; .say for all-combs(2, 5)
12:15 p6eval nom ce5cca: OUTPUT«OOOXX␤OOXOX␤OOXXO␤OXOOX␤OXOXO␤OXXOO␤XOOOX␤XOOXO␤XOXOO␤XXOOO␤»
12:15 masak \o/
12:17 masak I was going to say "combinations are so much more pleasant to implement than permutations".
12:17 masak but then I got to thinking: maybe there's a similar way to implement permutations, with a generating function and the sequence operator?
12:20 masak yes, seems there is. at least as long as the elements are unique and comparable.
12:25 dalek roast: f3ee697 | (Solomon Foster)++ | S06-traits/is-copy.t:
12:25 dalek roast: Change meaningless function name from i to j so it doesn't interact with Complex numbers.
12:25 dalek roast: review: https://github.com/perl6/roast/commit/f3ee69746d
12:36 benabik joined #perl6
12:36 moritz niecza: sub i() {say 'i' }; i
12:36 p6eval niecza v13-389-g852f0ff:  ( no output )
12:37 moritz I guess that's a bug
12:37 moritz nom: sub i() {say 'i' }; i
12:37 p6eval nom ce5cca: OUTPUT«i␤»
12:37 colomon nom: say i
12:37 p6eval nom ce5cca: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&i' called (line 1)␤»
12:37 colomon that's a bug for sure...
12:37 moritz aye ;-)
12:37 dalek roast: 37c0bd5 | (Solomon Foster)++ | S02-types/hash.t:
12:37 dalek roast: Refudge for niecza.
12:37 dalek roast: review: https://github.com/perl6/roast/commit/37c0bd52df
12:38 moritz nom: constant i = 1i; { sub i() { say 'i' }; i }
12:38 p6eval nom ce5cca:  ( no output )
12:38 moritz hm, same behavior
12:38 masak does the spec say we have 'i' in core?
12:38 moritz yes
12:38 masak I thought it was 1i.
12:38 colomon nope, i
12:38 masak hokay :)
12:38 moritz but the justfiction for it is that it can be easily overridden in a lexical scope
12:38 benabik I believe i is a postfix and a constant.
12:38 colomon 1i is the alternative that works in nom
12:38 colomon benabik is correct
12:39 moritz but if that overriding doesn't easily work, we should either make it work, or ban the constant
12:39 jnthn nom: constant i = 1i; { sub i() { say 'i' }; i() }
12:39 p6eval nom ce5cca: OUTPUT«i␤»
12:39 jnthn Note the difference.
12:39 moritz I know that it can be forced with parens
12:39 moritz but I still think that the lexical search outwards should find the &i first
12:39 jnthn Right, but it's only the same as
12:40 jnthn nom: class i { }; { sub i() { say 'i' }; i() }
12:40 p6eval nom ce5cca: OUTPUT«i␤»
12:40 jnthn nom: class i { }; { sub i() { say 'i' }; i }
12:40 p6eval nom ce5cca:  ( no output )
13:13 bacek joined #perl6
13:23 dudulz joined #perl6
13:32 * [Coke] chuckles when people talk to Larry not realizing he's Larry.
13:33 moritz yes, that can be amusing
13:38 timotimo LARRY IS HERE! OHMYGAWD /me faints
13:38 moritz but Elvis has left the building!
13:42 colomon So... I have a KeySet implementation for niecza.  But it's kind of grotesquely inefficient.
13:43 colomon also, I have no idea what-so-ever how to set things up so that you can assign a KeySet to a Set, or vice-versa, in an elegant fashion.
13:44 * colomon wishes niecza had Proxy
13:45 moritz how does niecza implement list assignment?
13:45 moritz or hash assignment, for that matter
13:45 moritz my %h = 1, 2, 3 => 4; # not a hash on the RHS either
13:46 colomon I don't know.  I've been unable to sort out the mysteries of the Hash class.
13:50 PerlJam joined #perl6
13:50 moritz nom: my @a = 1, 2, 3; @a = @a Z+ 10, 10, 10;
13:50 p6eval nom ce5cca:  ( no output )
13:50 moritz nom: my @a = 1, 2, 3; @a = @a Z+ 10, 10, 10; say @a
13:50 p6eval nom ce5cca: OUTPUT«11 12 13␤»
13:52 * jnthn -> stockholm
13:53 benabik .oO( Unsupported use of -> as postfix... )
13:53 moritz why, that was an infix :-)
13:54 benabik Well, yes, but I think both std and nom say postfix.
13:54 moritz std: 'jnthn' -> 'stockholm'
13:54 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/juJmXdFVPJ line 1:â�¤------> [32m'jnthn' [33mâ��[31m-> 'stockholm'[0mâ�¤    expecting infix or meta-infixâ�¤Parse failedâ�¤FAILED 00:01 …
13:54 moritz std: jnthn -> 'stockholm'
13:54 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed block at /tmp/GX3bBkGOpR line 1 (EOF):â�¤------> [32mjnthn -> 'stockholm'[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        blockâ�¤  param_sepâ�¤      parameterâ�¤Parse failedâ�¤FAILED 00:01 111mâ�¤Â»
13:55 benabik Ah, with the whitespace, it tries to parse it as a block.  :-/
13:55 benabik std: 'jnthn'->stockholm
13:55 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of -> as postfix; in Perl 6 please use either . to call a method, or whitespace to delimit a pointy block at /tmp/L4HMqeCOir line 1:�------> [32m'jnthn'->[33m�[31mstockholm[0m�Parse failed�FAILED 00:01 107m�»…
13:55 benabik That's what I was thinking of
14:05 GlitchMr joined #perl6
14:08 moritz nom: my @a = 1, 2, 3; @a  Z+= 10, 10, 10;
14:08 tarch joined #perl6
14:08 p6eval nom ce5cca:  ( no output )
14:08 moritz nom: my @a = 1, 2, 3; @a  Z+= 10, 10, 10;; say @a
14:08 p6eval nom ce5cca: OUTPUT«1 2 3␤»
14:11 tarch perl6: say 3;
14:11 p6eval pugs b927740, rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«3␤»
14:16 dalek roast: 450fb6e | coke++ | S (2 files):
14:16 dalek roast: niecza fudge
14:16 dalek roast: review: https://github.com/perl6/roast/commit/450fb6e2df
14:16 dalek niecza: 9d43bbd | coke++ | t/spectest.data:
14:16 dalek niecza: run 3 more tests
14:16 dalek niecza: review: https://github.com/sorear/niecza/commit/9d43bbdb02
14:19 cognominal joined #perl6
14:29 moritz niecza: https://gist.github.com/1710688
14:29 p6eval niecza v13-389-g852f0ff: OUTPUT«SUMMARY␤728     tit-for-tat␤681 good␤658        random␤580      bad␤542 evil-tit-for-tat␤»
14:30 moritz https://gist.github.com/1710688 is an implementation of the iterated prisoner's dilemma
14:30 moritz it works both in nom and niecza
14:31 moritz mini challenge: write a strategy. Send it to me, I'll let all strategies compete
14:31 moritz max 2 strategies per programmer; it's not allowed to program them so that one intentionally supports the other
14:32 moritz the goal is to score the most points in total
14:34 moritz I'll also write a short blog post about that, when I get to it.
14:35 bluescreen10 joined #perl6
14:38 PacoAir joined #perl6
14:46 am0c joined #perl6
14:57 skids joined #perl6
15:19 kaleem joined #perl6
15:22 icwiener joined #perl6
15:25 Chillance joined #perl6
15:26 TimToady so, why do folks always say [*] 1..$n when [*] 2..$n works just as well?
15:30 sjn ingrained patterns?
15:30 awwaiid Because we avoid non-zero-or-one constants
15:30 sjn [+] 1..$n != [+] 2..$n
15:30 cognominal_ joined #perl6
15:31 TimToady because there's no overhead to multiplying by 1 in pure math?
15:32 TimToady all of the above, probably, and also because they're just used to seeing factorial defined that way
15:32 sjn it's also a case of "value of clarity" > "value of computational gains"
15:33 TimToady and perhaps because pure math doesn't define product of a null range? or does it?
15:33 TimToady that too
15:33 * sjn *shrugs*
15:34 TimToady so maybe someone just throws a small optimization in the compiler for that instead of teaching people that the 1 is a waste
15:34 TimToady or we just let it be inefficient :)
15:34 TimToady not a big deal in the overall scheme of things, of course
15:34 flussence perl6: say [*] 2..1
15:34 p6eval pugs b927740, rakudo ce5cca: OUTPUT«1␤»
15:34 p6eval ..niecza v13-389-g852f0ff: OUTPUT«0␤»
15:35 TimToady ohh, bug
15:35 TimToady *ooh
15:35 flussence :D
15:35 TimToady but known, I think
15:35 TimToady niecza: say [*]()
15:35 p6eval niecza v13-389-g852f0ff: OUTPUT«0␤»
15:36 TimToady there's another reason for not starting with 2 :)
15:37 flussence perl6: say [*] 2...1 # probably the output I was expecting
15:37 p6eval rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«2␤»
15:37 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected "1"␤    expecting operator, ":", "," or term postfix␤    at /tmp/xXrIiUegfJ line 1, column 13␤»
15:37 benabik poor pugs
15:37 sjn oops
15:41 TimToady we still don't have a good term for operators that loosen precedence on the right side, of which list prefixes are only one example
15:41 TimToady declarators are now in that category too
15:41 TimToady (though only for initializers...)
15:44 TimToady statement_prefixes too
15:44 TimToady they're all about allowing endweight without requiring final parens
15:45 PerlJam sounds like ballast
15:45 PerlJam Are there submarines in the waterbed?
15:46 huf they've all been watershed
15:47 * TimToady grimaces
15:49 TimToady note that we actually use the English assymmetrical operator, ':', to introduce some of these
15:49 TimToady Here is a list: A, B, C
15:49 TimToady that's why it works as $foo.meth: 1,2,3
15:59 TimToady maybe we should call them "long tails" :)
16:15 TimToady niecza: my @a = 1, 2, 3; @a Z+= 10, 10, 10; say @a
16:15 p6eval niecza v13-389-g852f0ff: OUTPUT«11 12 13␤»
16:15 TimToady niecza: my @a = 1, 2, 3; @a X+= 10; say @a;   # curious
16:15 p6eval niecza v13-389-g852f0ff: OUTPUT«11 12 13␤»
16:15 TimToady hah
16:16 TimToady niecza: my @a = 1, 2, 3; @a [X+]= 10; say @a;   # curious
16:16 p6eval niecza v13-389-g852f0ff: OUTPUT«11 12 13␤»
16:17 TimToady niecza: my @a = 1, 2, 3; @a X[+=] 10; say @a;   # curious
16:17 p6eval niecza v13-389-g852f0ff: OUTPUT«11 12 13␤»
16:17 TimToady I wonder which of those is more efficient...
16:18 TimToady nom: my @a = 1, 2, 3; @a X[+=] 10; say @a;
16:18 p6eval nom ce5cca: OUTPUT«1 2 3␤»
16:18 TimToady nom: my @a = 1, 2, 3; @a [X+]= 10; say @a;
16:18 p6eval nom ce5cca: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead at line 1, near " 10; say @"␤»
16:19 TimToady well, niecza++
16:19 TimToady b: my @a = 1, 2, 3; @a [X+]= 10; say @a;
16:19 p6eval b 1b7dd1: OUTPUT«===SORRY!===␤Confused at line 22, near "@a [X+]= 1"␤»
16:19 TimToady b: my @a = 1, 2, 3; @a X[+=] 10; say @a;
16:19 p6eval b 1b7dd1: OUTPUT«123␤»
16:23 alester joined #perl6
16:24 kaare_ joined #perl6
16:34 kaleem joined #perl6
16:43 rsimoes @TimToady: Is precedence-loosening sometimes the same thing as setting left/right associativity?
16:44 TimToady no, associativity is a gentle tiebreaker, while precedence loosening is quite violently pretending to be a left paren, or something close to it
16:44 pmichaud good morning, #perl6
16:44 TimToady \o
16:45 pmichaud jnthn++ # star release
16:45 slavik TimToady: that sounded like revolution talk ... dunno why
16:45 baest joined #perl6
16:46 TimToady well, it's certainly something in the category of: if you go there, you can never come back, at least not without doing something even more violently counterrevolutionary
16:48 TimToady hadn't though of 'and' and 'or' as counterrevolutionary responses to the revolutionary list prefixes, but that's what they are
16:51 sjn viva la revoluçion?
16:52 [Coke] pmichaud: o/
16:58 sorear niecza: +Any
16:58 p6eval niecza v13-389-g852f0ff: OUTPUT«Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1206 (warn @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 239 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/kaLAGBCvcQ line 0 (mainl…
16:58 dudulz joined #perl6
17:00 sorear moritz: currently, termy things always take precedence over subs if both are in scope
17:00 TimToady I consider this a bug
17:01 TimToady well, sometimes
17:02 TimToady there's an argument that a predeclared type should be considered a kind of reserved word
17:03 TimToady and terms like constants and 'self' have just fallen into that same pattern
17:03 sorear hah, looks like moritz++ may be right about the line numbers...
17:04 sjn btw
17:04 sorear in the past I thought it was just a whitespace issue
17:04 TimToady but lowercase terms should probably try not to override predeclared sub names
17:04 sjn so Damian is coming to Europe in April, and he'll be dropping by Oslo to give some lectures and courses...
17:04 TimToady std: sub self () {...}; self 42;
17:04 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤'self' used where no object is available at /tmp/PaqGGbcFNJ line 1:â�¤------> [32msub self () {...}; self[33mâ��[31m 42;[0mâ�¤Two terms in a row at /tmp/PaqGGbcFNJ line 1:â�¤------> [32msub self () {...}; self [33mâ��[31m42;[0mâ�¤    expect…
17:05 TimToady std: sub rand ($) {...}; rand 42;
17:05 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick at /tmp/xIca9TRTul line 1:�------> [32msub rand ($) {...}; rand[33m�[31m 42;[0m�Parse failed�FAILED 00:01 110m�»
17:05 sjn and we're a couple guys in Oslo.pm who wonder if it would be cool to organize a Perl 6 hackathon while he's here
17:05 TimToady std: sub i ($) {...}; i 42;
17:05 sjn anyone up for this?
17:05 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a row at /tmp/f3IjEtWgEz line 1:â�¤------> [32msub i ($) {...}; i [33mâ��[31m42;[0mâ�¤    expecting any of:â�¤      bracketed infixâ�¤        infix or meta-infixâ�¤    statement modifier loopâ�¤Parse failedâ�¤FAILED 00:01 111mâ�¤Â»
17:08 * sjn isn't entirely sure about funding people (we'll try) but venue is a done deal
17:08 sjn if anyone's interested, please tell \o/
17:09 TimToady std: sub Int ($) {...}; Int 42;
17:09 p6eval std 48335fc: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a row at /tmp/DnxFs_Ac_R line 1:â�¤------> [32msub Int ($) {...}; Int [33mâ��[31m42;[0mâ�¤    expecting any of:â�¤  bracketed infixâ�¤        infix or meta-infixâ�¤    statement modifier loopâ�¤Parse failedâ�¤FAILED 00:01 111mâ�¤Â»â€¦
17:10 am0c joined #perl6
17:14 TimToady niecza: say "this"; sub say(*@stuff) { .uc.say for @stuff }
17:14 p6eval niecza v13-389-g852f0ff: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Lexical symbol '&say' is already bound to an outer symbol (see ??? line 0);â�¤  the implicit outer binding at line 1 must be rewritten as &sayâ�¤  before you can unambiguously declare a new '&say' in this scope at /tmp/KpUgheeG…
17:16 TimToady niecza: say i; sub i(*@stuff) { .uc.say for @stuff }
17:16 p6eval niecza v13-389-g852f0ff: OUTPUT«Potential difficulties:â�¤  &i is declared but not used at /tmp/q78LwkLJfs line 1:â�¤------> [32msay i; sub i[33mâ��[31m(*@stuff) { .uc.say for @stuff }[0mâ�¤â�¤0+1iâ�¤Â»
17:16 cognominal___ joined #perl6
17:16 TimToady we need the same kind of "already bound" semantics for i that we already have for say
17:16 benabik_ joined #perl6
17:17 sjn pastebin?
17:17 TimToady so all identifier terms really need to come in via the lexical scope somehow
17:17 pothos_ joined #perl6
17:17 sjn hm. is there a pastebin bot connected here?
17:18 TimToady pastie, or gist.github
17:18 TimToady no bots though
17:18 TimToady well, I don't know about pastie, but you have to do gist by hand
17:19 sjn right, thanks
17:19 Exodist_ joined #perl6
17:19 robins joined #perl6
17:20 pochi_ joined #perl6
17:21 PerlPilot joined #perl6
17:22 * colomon could use a pasty right about now...
17:22 TimToady so things like term:sym<i> need to turn into something more like constant i in the setting, or macro self() is parsed(/<?>/) or some such for non-constants
17:24 TimToady perl6: constant x = 42; { say x; sub x($y) { say $y } }
17:24 p6eval niecza v13-389-g852f0ff: OUTPUT«Potential difficulties:â�¤  &x is declared but not used at /tmp/teEEp34Ws7 line 1:â�¤------> [32mconstant x = 42; { say x; sub x[33mâ��[31m($y) { say $y } }[0mâ�¤â�¤42â�¤Â»
17:24 p6eval ..rakudo ce5cca: OUTPUT«42␤»
17:24 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected "="␤    expecting ":" or "("␤    at /tmp/icT7SzoCh6 line 1, column 12␤»
17:24 drbean joined #perl6
17:25 TimToady perl6: constant x = 42; { say x; sub x() { say "here" } }
17:25 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected "="␤    expecting ":" or "("␤    at /tmp/vswZkVXpSk line 1, column 12␤»
17:25 p6eval ..niecza v13-389-g852f0ff: OUTPUT«Potential difficulties:â�¤  &x is declared but not used at /tmp/Dqlev8BtR5 line 1:â�¤------> [32mconstant x = 42; { say x; sub x[33mâ��[31m() { say "here" } }[0mâ�¤â�¤42â�¤Â»
17:25 p6eval ..rakudo ce5cca: OUTPUT«42␤»
17:25 shachaf joined #perl6
17:29 sorear sjn: lisppaste was in here once, but then it started anouncing spam every 30 seconds
17:31 sjn :-\
17:31 sjn https://gist.github.com/1711730
17:31 sjn comments and thoughts appreciated! :)
17:32 mtk joined #perl6
17:32 s1n joined #perl6
17:32 sorear niecza: say "a"; +Any; say "b";
17:32 p6eval niecza v13-389-g852f0ff: OUTPUT«a␤Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1206 (warn @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 239 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/pT7BdA01l7 line 1 (mai…
17:33 tarch joined #perl6
17:33 sorear moritz: nevermind, it's the old "reporting the line number of the previous sub call" LTAness
17:34 takesako joined #perl6
17:40 tadzik sjn: that looks cool :)
17:41 kmwallio joined #perl6
17:42 sjn tadzik: would you come? :)
17:42 * sjn has updated https://gist.github.com/1711730
17:43 sjn krunen: feel free to join in when you can :)
17:43 tadzik sjn: if I lived closer, for sure :)
17:43 sjn tadzik: where do you live?
17:44 tadzik sjn: Warsaw, Poland
17:44 sjn what
17:44 sjn that's pretty close
17:45 * sjn bets there's a lot of cheap flights between Oslo and Warsaw :)
17:45 tadzik oh, stop tempting me :>
17:45 * tadzik checks out the flights
17:46 sjn tadzik: I find a flight for €90
17:47 tadzik that's not cheap by my standards :)
17:47 sjn tadzik: if you buy that ticket right now, I'll promise you a sofa to sleep in :)
17:47 tadzik I'm but a poor student :)
17:48 daxim apply for sponsoring
17:48 tadzik hmm
17:48 tadzik a ferry, maybe
17:48 sjn tadzik: btw, your ircname doesn't say you real name
17:48 tadzik it does
17:48 tadzik Tadzik is a short from Tadeusz, which is my real name :)
17:48 sjn tadzik: ah :)
17:49 sjn tadzik: and may I have your surname? :)
17:49 tadzik :) it's Tadeusz Sośnierz
17:49 * sjn takes notes*
17:49 tadzik is that for some beautiful girl?
17:50 tadzik :P
17:50 sjn tadzik: as it happens, I have a short-list of people we should help sponsoring the trip, and you're on it :)
17:50 sjn if you want to come
17:50 daxim I found a flight for 290 PLN/wizz air
17:50 tadzik why, of course I want :)
17:50 * sjn can't promise a full refund, but we'll do what we can
17:50 sjn and €90 should be no problem
17:51 sjn tadzik: http://www.dohop.no/flights/?a1=WAW&amp;a2=OSL%2CTRF%2CRYG&amp;return=1&amp;d1=200412&amp;d2=220412
17:51 tadzik wow, that's awesome
17:51 tadzik oh, that's 90€ with a return?
17:51 sjn that super cheap price is maybe a bit inconvenient
17:51 sjn yes, it's with return
17:52 tadzik 384 PLN both sides is something I can affort
17:52 sjn but it arrives very late
17:52 tadzik s/t$/d/
17:52 tadzik as long as you don't mind, I'm fine with being a bit late :)
17:53 sjn that's ok :)
17:54 tadzik phenny: "Lavpris"?
17:54 phenny tadzik: "Low" (da to en, translate.google.com)
17:54 sjn tadzik: you can change language on that page
17:55 sjn top-right of page
17:55 tadzik thanks :)
17:56 sjn pmichaud: any chance for you to take a trip to Oslo in April? :)
17:56 tadzik there's also a flight on Thu, that won't make me late for Friday Social Event
17:56 skids Don't I remember reading somewhere that grammars could have class-like attributes/variables in them in addition to rules?  Can't seem to find that in spec (maybe just blind.)
17:57 sjn tadzik: if you prefer that one, it's fine... I'll be quite busy on friday daytime though
17:57 sjn it might give you a day for doing touristy stuff
17:57 tadzik yeah, I'm thinking about that
17:58 tadzik I'm looking at the plan for the next semester, and on friday I'd probably be having only one classes, and possibly reschedulable
18:01 sjn tadzik: don't think for too long :)
18:07 tadzik I'll just wait for an exam session to end, and to make sure how my weekly schedule will look like
18:08 tadzik in the best case, that'd be friday
18:08 tadzik or something friday-ish
18:10 sjn tadzik: ok, just beware that flight prices are likely to rise :-/
18:11 tadzik sjn: awesome thing, thanks for an invitation :)
18:11 tadzik sjn: yeah, I know that
18:13 sorear things which have been sent my way so far today: constant folding SORRY opportunities, line number LTAness, Proxy, overriding termy things
18:18 colomon sorear++
18:20 sjn (oh, and if anyone else is interested in https://gist.github.com/1711730, get in touch with me :)
18:21 [Coke] sjn: looks nifty.
18:21 [Coke] are the damian classes sixian or fivish?
18:21 sjn fivish
18:21 sjn no decisions yet though
18:22 sjn depends on what the local companies want
18:22 colomon sorear: there's no urgent need for Proxy, mind you, I just can't figure out how to implement KeySet (and probably KeyBag) without it, other than by calling an O(N) function an obscene number of times in the code: https://gist.github.com/1712021
18:23 [Coke] colomon: do it, we can pass MOAR SPEC TESTS! MUAHAHAHAHA
18:24 colomon [Coke]: I could already check in what I've got, it already passes a bunch of new KeySet tests I've written.  It's just -- ugly.
18:25 colomon sorear: speaking of which, we're getting a lot of fail in Set/Bag/KeySet/etc tests because of difficulty assigning them to %-sigiled variables.
18:29 sorear assignment to %-variables is not very magical.  The RHS needs to evaluate to a list of pairs in list context, that is all
18:34 spine joined #perl6
18:40 kaleem joined #perl6
18:42 MayDaniel joined #perl6
18:44 supernovus joined #perl6
18:45 colomon sorear: the issue is the other way around... making the %h a Bag, for instance.
18:46 colomon errr... huh.
18:46 colomon niecza: my %h = set <a b o p a p o o>;
18:46 p6eval niecza v13-389-g852f0ff: OUTPUT«Potential difficulties:â�¤  %h is declared but not used at /tmp/eZ4mS22mBO line 1:â�¤------> [32mmy [33mâ��[31m%h = set <a b o p a p o o>;[0mâ�¤â�¤Unhandled exception: Unmatched key in Hash.LISTSTOREâ�¤  at /tmp/eZ4mS22mBO line 1 (mainline @ 2) â�¤  at /home/p6eval…
18:48 TimToady niecza: say set(<a b o p a p o o>) ~~ Associative
18:48 p6eval niecza v13-389-g852f0ff: OUTPUT«True␤»
18:48 colomon niecza: my @h = set <a b o p a p o o>;  say @h
18:48 p6eval niecza v13-389-g852f0ff: OUTPUT«set(a, b, o, p)␤»
18:48 colomon !!!!
18:48 colomon oh
18:48 colomon niecza: my @h = set <a b o p a p o o>;  say @h.elems
18:48 p6eval niecza v13-389-g852f0ff: OUTPUT«1␤»
18:48 TimToady thing is, you're assigning an item, and the assignment isn't noticing that the item is associative
18:48 TimToady yes, that
18:49 colomon niecza: my @h = (set <a b foo>).list; say @h
18:49 p6eval niecza v13-389-g852f0ff: OUTPUT«a b foo␤»
18:49 TimToady niecza: my %h := set <a b o p a p o o>;
18:49 p6eval niecza v13-389-g852f0ff: OUTPUT«Potential difficulties:â�¤  %h is declared but not used at /tmp/LKk15zL6Tx line 1:â�¤------> [32mmy [33mâ��[31m%h := set <a b o p a p o o>;[0mâ�¤â�¤Â»
18:50 TimToady niecza: my %h := set <a b o p a p o o>; say %h.list
18:50 p6eval niecza v13-389-g852f0ff: OUTPUT«a b o p␤»
18:50 colomon niecza: my %h := set <a b o p a p o o>; say %h.WHAT
18:50 p6eval niecza v13-389-g852f0ff: OUTPUT«Unhandled exception: Parameter  in Set.gist requires a defined argument␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Set.gist @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1212 (ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1214 (g…
18:50 [Coke] niecza: my $name="alpha"; say "asdfasdf" ~~ /<::($name)>/;
18:50 p6eval niecza v13-389-g852f0ff: OUTPUT«#<match from(0) to(1) text(a) pos([].list) named({"::(\$name)" => #<match from(0) to(1) text(a) pos([].list) named({}.hash)>}.hash)>␤»
18:51 [Coke] niecza: my $name="alpha"; say ("asdfasdf" ~~ /<::($name)>/).Str;
18:51 p6eval niecza v13-389-g852f0ff: OUTPUT«a␤»
18:51 colomon so, should (set <a b foo>).list be a, b, foo or a => True, b => True, foo => True    ?
18:51 * sjn has posted about the Perl6 hackathon I mentioned: http://code.foo.no/2012/01/31/oslo-perl-mongers-in-2012
18:51 TimToady specced to be just the keys
18:52 colomon so then how do we make %h = set <a b foo> work?  or shouldn't it?
18:52 colomon gotta go, family haircut time.
18:53 colomon niecza: my Set %h = a => True;
18:53 p6eval niecza v13-389-g852f0ff: OUTPUT«Potential difficulties:â�¤  %h is declared but not used at /tmp/LhcrkkgIjY line 1:â�¤------> [32mmy Set [33mâ��[31m%h = a => True;[0mâ�¤â�¤Â»
18:53 colomon niecza: my Set %h = a => True; say %h
18:53 p6eval niecza v13-389-g852f0ff: OUTPUT«{"a" => Bool::True}␤»
18:53 colomon niecza: my Set %h = a => True; say %h.WHAT
18:53 p6eval niecza v13-389-g852f0ff: OUTPUT«Hash()␤»
18:53 colomon right.  :\
18:54 TimToady that's a hash of set
18:54 colomon yeah
18:54 TimToady my %h is Set =   is supposed to work
18:54 colomon but doesn't, AFAIK
18:59 supernovus I opened a ticket for the strange Rakudo behaviour I reported yesterday: https://rt.perl.org/rt3/Ticket/Display.html?id=109500
19:01 GlitchMr joined #perl6
19:44 fsergot joined #perl6
19:46 [Coke] niecza spec question: "StrPos tests broken" -> So don't unfudge them?
19:47 * [Coke] leaves it alone for now.
19:48 skids nom: grammar a { token a { a }; token b { b }; token c { [ <a> <b> ]**1 [ <a> <b> ] { $/<b>.perl.say } }; }; a.parse("abab",:rule<c>)
19:48 p6eval nom ce5cca: OUTPUT«(Match.new(orig => "abab", from => 1, to => 2, ast => Any, list => ().list, hash => EnumMap.new()), Match.new(orig => "abab", from => 3, to => 4, ast => Any, list => ().list, hash => EnumMap.new()))␤»
19:48 skids nom: grammar a { token a { a }; token b { b }; token c { [ <a> <b> ]**1 [ <a> | <b> ] { $/<b>.perl.say } }; }; a.parse("abb",:rule<c>)
19:48 p6eval nom ce5cca: OUTPUT«(Match.new(orig => "abb", from => 2, to => 3, ast => Any, list => ().list, hash => EnumMap.new()),)␤»
19:49 skids ...?  Where'd the first match go?
19:49 sorear [Coke]: niecza doesn't currently have a 'StrPos'.  But a lot of the StrPos tests are veyr dubious.
19:49 [Coke] sorear: we pass a lot of them, considering we don't have StrPos. ;)
19:50 [Coke] (I noticed the message because an auto-unfudge gave us passing TODOs)
19:50 sorear I should think that the first job of a test is to fail when the tested feature doesn't exist at all.
19:50 [Coke] I'll leave it alone for now.
19:50 [Coke] sorear: well, presumably you wouldn't auto-unfudge that one.
19:54 jferrero joined #perl6
19:55 skids nom: grammar a { token a { a }; token b { b }; token c { [ <a> <b> ] [ <a> | <b> ] { $/<b>.say } }; }; a.parse("abb",:rule<c>)
19:56 p6eval nom ce5cca: OUTPUT«=> <b>␤ => <b>␤␤»
19:56 skids (And now it is back again.  Fishy...)
20:15 snearch joined #perl6
20:18 shachaf_ joined #perl6
20:19 cooper joined #perl6
20:25 bluescreen10 joined #perl6
20:29 birdwindupbird joined #perl6
20:37 PZt joined #perl6
20:40 PerlJam joined #perl6
20:41 zby_home_ joined #perl6
21:02 birdwindupbird joined #perl6
21:21 cognominal joined #perl6
21:22 bluescreen100 joined #perl6
21:26 chee joined #perl6
21:26 chee joined #perl6
21:35 dalek niecza: 877dee4 | (Paweł Murias)++ | p5test/p5test.pl:
21:35 dalek niecza: Refactor p5test.
21:35 dalek niecza: review: https://github.com/sorear/niecza/commit/877dee40cc
22:14 kaleem joined #perl6
22:26 lutok joined #perl6
22:28 Guest23280 joined #perl6
22:54 pyrimidine left #perl6
23:14 tarch joined #perl6
23:15 bacek joined #perl6
23:22 whiteknight joined #perl6
23:34 dorlamm joined #perl6
23:37 tokuhirom joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo