»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
masak 'night, #perl6 00:04
colomon \o
00:07 alester left
jnthn sleep & 00:13
00:20 kmwallio joined
sorear mail sent 00:24
good * #perl6
00:24 replore joined
cj sorear! 00:34
00:35 kmwallio left
sorear cj! 00:37
00:45 pmurias_ left
sorear cj? 00:52
01:09 alvis left
colomon o/ 01:16
01:17 alvis joined
cj sorear: oh, nothing. just saying hi :) 01:26
vlixes \o 01:27
sorear helllo then, cj, vlixes
01:30 alvis left 01:31 vlixes left 01:45 dukeleto left 01:54 Chillance left 02:00 replore left 02:01 cognominal left 02:02 cognominal joined
colomon sorear: having release difficulties? 02:03
sorear colomon: ? Release is finished 02:06
...Did I forget a step?
I was having difficulties earlier
colomon ooo, I missed the announcement
yes, I saw that earlier.
Aw, I see the announcement in my slow e-mail. 02:13
*Ah
02:14 Yary joined
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␤»
Yary nom: class A{has $.q}; my @x=A.new(q=>44)
p6eval nom ce5cca: ( no output )
Yary Am I doing something wrong in that first example, trying to create two "A"s at once?
or is that a bug? 02:16
niecza: class A{has $.q}; my @x=A.new(q=>44),A.new(q=>12); say @x
p6eval niecza v13-389-g852f0ff: OUTPUT«A.new(...) A.new(...)␤»
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␤»
Yary just checking if that was a warning or an error
02:25 imarcusthis left, daemon left, flussence left, y3llow left, sirhc left, pyrimidine left, jnthn left, arnsholt left, Woodi left, literal left, hugme left, sunnavy_ left, japhb left, kthakore left, tomaw left, masak left, PerlJam left, frettled left, kthakore joined, sirhc joined, arnsholt joined, masak joined, PerlJam joined, sunnavy joined, jnthn joined, frettled joined, sirhc left, sirhc joined, Woodi joined, flussence joined, y3llow joined, japhb joined 02:26 pyrimidine joined, imarcusthis joined 02:27 dukeleto joined 02:28 daemon joined 02:30 diakopter joined, nn joined
bacek_at_work ~~ 02:33
perl6: my $sum = 0; for 1..1_000 { $sum += $_ }; say $sum
p6eval pugs b927740, rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«500500␤»
bacek_at_work perl6: my int $sum = 0; for 1..1_000 { $sum += $_ }; say $sum
p6eval niecza v13-389-g852f0ff: OUTPUT«===SORRY!===␤␤Malformed my at /tmp/P45EEjh6nX line 1:␤------> my⏏ int $sum = 0; for 1..1_000 { $sum += $␤␤Parse failed␤␤»
..pugs b927740: OUTPUT«500500␤»
..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 …
bacek_at_work questions: 02:34
why "Cannot assign to non-container"?
and why "for" calling eager?
sorear += isn't supported yet for native types in Rakudo 02:43
if an operation doesn't explicitly take native types, a read-only copy is created
+= gets something unassignable as the LHS, so fails
02:44 cooper left
sorear 'for' calls 'eager' because Rakudo currently implements for A { B } as A.map({ B }).eager; 02:44
02:55 whiteknight left 02:59 tomaw joined 03:06 PZt left 03:09 Yary left 03:12 nn is now known as sjn 03:20 orafu left 03:21 jaldhar joined 03:23 orafu joined 03:39 wolfman2000 joined 03:44 cognominal left 03:45 cognominal joined 04:01 birdwindupbird joined 04:10 PZt joined 04:50 birdwind1pbird joined 04:53 birdwindupbird left 04:54 Trashlord joined 05:09 cognominal left 05:11 cognominal joined 05:32 Devarishi joined
Devarishi Hello, world! :) 05:33
Hi Chee! 05:36
moritz o/ 05:37
TimToady we are not the world, but we are #perl6 :)
Devarishi Well, I intentionally said so so that I would know that I am on the right page. 05:38
TimToady what brings you to #perl6? 05:39
chee !
Timbus well perl 6 has no money or women, so it must be Power 05:40
Devarishi To TimToady -> Something inside me... :)
Actually, I am learning Perl 5 day and night these days.
TimToady my condolences :) 05:41
Devarishi I thought I would be part of this community.
TimToady perl6: say "Hi, Devarishi!
p6eval pugs b927740: OUTPUT«*** ␤ Unexpected end of input␤ expecting block, "\\", variable name or "\""␤ at /tmp/0CXcV9YBMT line 2, column 1␤»
..niecza v13-389-g852f0ff: OUTPUT«===SORRY!===␤␤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:␤------> say⏏ "Hi, Devarishi!␤␤Confused at /tmp/O3lwnpX90R line …
..rakudo ce5cca: OUTPUT«===SORRY!===␤Confused␤at /tmp/htsQBlWTPG:1␤»
TimToady perl6: say "Hi, Devarishi!"
p6eval pugs b927740, rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«Hi, Devarishi!␤»
Devarishi So, how can I get involved even though I am an intermediate student of Perl working on Linux as a Software Engineer.
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?
TimToady testing, docs, testing, testing, and just trying things out
Devarishi Right!
TimToady and demonstrating which things are easy and which things are hard
Devarishi Reading docs and writing scripts. 05:43
Can you elaborate "testing"?
TimToady both formal and informal
Devarishi Do you mean "Writing Perl scripts" or do you mean testing what we see on the official site?
TimToady formally, Perl 6 is defined by the test suite
Devarishi Okay.
TimToady informally, anyone writing Perl 6 is testing it 05:44
Devarishi I got your point!
TimToady writing examples for rosettacode.org, for example, is an informal way of testing
Devarishi So, will my understanding of Perl 5 help me?
TimToady we already have 406 running examples on rosettacode
yes
chee lol i love Devarishi
05:45 am0c joined
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
Devarishi I am checking out the site you pointed to. 05:45
TimToady and by an large, if you try something P5ish, and it's not P6ish, the compiler will tell you 05:46
you'll also want to follow the doc links from perl6.org
Devarishi Well, i just read the official site that we can include P5 and P6 at will.
TimToady well, that's is a long-term goal
chee Devarishi: you have cheery disposition. it was what made me do that
TimToady niecza: say $( 05:47
p6eval niecza v13-389-g852f0ff: OUTPUT«===SORRY!===␤␤Unable to parse contextualizer at /tmp/YfbFvO5weI line 1 (EOF):␤------> say $(⏏<EOL>␤Couldn't find final ')'; gave up at /tmp/YfbFvO5weI line 1 (EOF):␤------> say $(⏏<EOL>␤␤Parse failed…
TimToady hmm
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 $)
p6eval niecza v13-389-g852f0ff: OUTPUT«===SORRY!===␤␤Non-declarative sigil is missing its name at /tmp/cw2Yh0yPfT line 1:␤------> say ⏏$)␤␤Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1209 (warn @ 3) ␤ at…
TimToady std: say $)
p6eval std 48335fc: OUTPUT«===SORRY!===␤Unsupported use of $) variable; in Perl 6 please use $*EGID at /tmp/ZjxLZpBjtY line 1:␤------> say $)⏏<EOL>␤Parse failed␤FAILED 00:01 109m␤»
Devarishi So, I want to follow them.
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.
TimToady std: $#
p6eval std 48335fc: OUTPUT«===SORRY!===␤Unsupported use of $# variable; in Perl 6 please use .fmt at /tmp/CpDippBXIa line 1:␤------> $#⏏<EOL>␤Parse failed␤FAILED 00:01 107m␤»
TimToady std: $? 05:50
p6eval std 48335fc: OUTPUT«===SORRY!===␤Unsupported use of $? variable as child error; in Perl 6 please use $! at /tmp/hFVCfRAZ66 line 1:␤------> $?⏏<EOL>␤Parse failed␤FAILED 00:01 107m␤»
TimToady std: say 42 ? "foo" : "bar"
p6eval std 48335fc: OUTPUT«===SORRY!===␤Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at /tmp/zjmiK4tewW line 1:␤------> say 42 ?⏏ "foo" : "bar"␤Parse failed␤FAILED 00:01 109m␤»
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:50 Trashlord left
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.
TimToady Perl is more of a general language
Devarishi Will P6 provide easy mechanism for CGI and Form Data hnadling?
TimToady there's already some work on that from various folks
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
Devarishi That's good news.
TimToady (at least, that's a goal)
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
have fun!
Devarishi I am in office and have to take care of some release stuffs assigned to me. Have a nice time! 05:54
05:55 Devarishi left
Timbus irc at work :< live the dream 05:55
moritz std: class A { submethod b { $.foo } } 05:56
p6eval std 48335fc: OUTPUT«===SORRY!===␤Virtual call $.foo may not be used on partially constructed object at /tmp/e2vxdb1LPv line 1:␤------> class A { submethod b { ⏏$.foo } }␤Check failed␤FAILED 00:01 108m␤»
moritz this seems to assume that submethods are *only* used for object construction 05:57
TimToady std: class A { submethod b { self.foo } }
p6eval std 48335fc: OUTPUT«ok 00:01 108m␤»
TimToady the assumption is that you can't speak for subclasses
which is true of .gist and .perl
submethods are for violating Liskov for infrastructural reasons, I guess 06:00
06:03 bonsaikitten left 06:04 bonsaikitten joined
sorear bleh, missed my chance to welcome Devarishi 06:22
chee++
sorear wonders if Devarishi knew ey was doing the third-person/second-person mixup thing 06:23
07:13 felipe joined
moritz std: class A { has $.x = $!y } 07:24
p6eval std 48335fc: OUTPUT«ok 00:01 110m␤»
moritz std: class A { has $.x = $.y }
p6eval std 48335fc: OUTPUT«===SORRY!===␤Virtual call $.y may not be used on partially constructed object at /tmp/XeZQH2AVdk line 1:␤------> class A { has $.x = ⏏$.y }␤Check failed␤FAILED 00:01 110m␤»
dalek kudo/has-self: 6b4a6b7 | moritz++ | src/ (3 files):
first cut at porting $*HAS_SELF stuff from STD

class A { has $.x = $!y } now complains that $!y is used where no self available, which is wrong. The rest seems to work fine.
07:27
ast: a685a14 | moritz++ | / (3 files):
fix some uses of attributes where they cannot work
07:29
07:38 xinming left 07:39 xinming joined
dalek ast: 1a05c3d | moritz++ | S05- (4 files):
rakudo unfudges for <a::b> style subrule calls
08:17
08:21 simcop2387 left 08:23 simcop2387 joined 08:49 mj41 joined
masak morning, #perl6onauts. 08:50
moritz \o masakist 08:51
sorear o/ masak 08:56
masak ooh, a Niecza release! :D 09:01
sorear++
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
masak we have a rakudobug about END phasers not running after &die 09:02
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 …
sorear niecza: END { 1 while 1 }; 1 1
p6eval niecza v13-389-g852f0ff: OUTPUT«(timeout)===SORRY!===␤␤Two terms in a row at /tmp/_HTVLAv3Co line 1:␤------> END { 1 while 1 }; 1 ⏏1␤␤Parse failed␤␤»
sorear exploits the motion of (timeout) to the front
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
moritz roles and MAIN for me
p6eval niecza v13-389-g852f0ff: OUTPUT«===SORRY!===␤␤Two terms in a row at /tmp/w3VGqkSdKf line 1:␤------> END { Niecza::toggle_mono_trace }; 1 ⏏1 # curious what this will do␤␤Parse failed␤␤User defined signal 2␤»
moritz the MAIN stuff allows niecza to run several p6cc submissions that the contestants hadn't tested on niecza 09:09
masak \o/
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
more so than last year.
09:11 dakkar joined
sorear rakudo: END { say "BYE" }; 1 1 09:14
p6eval rakudo ce5cca: OUTPUT«===SORRY!===␤Confused␤at /tmp/qBTGtPnZr2:1␤»
sorear -> sleep
09:16 bkolera joined
masak 'night, sorear. dream of a chance to welcome Devarishi. 09:23
09:24 grondilu joined
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␤»
..rakudo ce5cca: OUTPUT«Any()␤»
grondilu rakudo--, niecza++ 09:25
moritz rakudo: my %h = (<foo> => []); push %h<foo>, (my $foo = 'bar'); say $foo
p6eval rakudo ce5cca: OUTPUT«bar␤»
grondilu shoudn't '=' come before ',' ? 09:26
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"
p6eval pugs b927740, niecza v13-389-g852f0ff: OUTPUT«bar␤»
..rakudo ce5cca: OUTPUT«Any()␤»
grondilu I'm pretty sure it should gives 'bar' 09:28
masak aye.
moritz perl6: my %h = (<foo> => []); my $foo; (push %h<foo>, $foo) = 'bar'; say $foo
p6eval pugs b927740: OUTPUT«*** Can't modify constant item: VInt 1␤ at /tmp/dzW4kzYqIJ line 1, column 33-61␤»
..rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«Any()␤»
masak do we have an RT ticket for this?
grondilu notice that it works better with a plain array: 09:29
masak ISTR we have something about item assignment...
grondilu rakudo: push my @a, my $foo = "bar"; say $foo
p6eval rakudo ce5cca: OUTPUT«bar␤»
masak ah, we have rt.perl.org/rt3/Ticket/Display.html?id=67944 09:30
but it's resolved.
masak submits new rakudobug
grondilu: rt.perl.org/rt3/Ticket/Display.html?id=109476 09:34
09:35 drbean left 09:38 drbean joined
grondilu ok, thanks 09:42
09:45 Trashlord joined 09:47 Psyche^ joined 09:51 Patterner left, Psyche^ is now known as Patterner 09:52 rsimoes left 09:59 cognominal left, cognominal joined
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␤»
masak niecza: sub combinations($k, $n) { sub postfix:<!>($n) { [*] 1..$n }; return $n! / ($k! * ($n - $k)!) }; say combinations(2, 5)
p6eval niecza v13-389-g852f0ff: OUTPUT«10␤»
masak \o/
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␤»
moritz since these numbers are always integers, I'm sure there's a better evaluation scheme 10:07
masak nod
10:09 snearch joined
masak is there a nice algorithm to churn out XXOO XOXO XOOX OXOX OXXO OOXX? (all permutations of two elements each) 10:12
moritz well, you can count the indexes 10:13
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␤»
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 } }
p6eval nom ce5cca: OUTPUT«XXOO␤XOXO␤XOOX␤OXXO␤OXOX␤OOXX␤»
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␤»
masak this works, but feels wasteful.
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.
moritz masak: it easily generalizes to variable O's :-)
masak :)
yes, but not both. 10:17
moritz somebody please port Algorithm::Loops to Perl 6 :-)
masak I'm pretty sure this can be written as a sequence operator somehow.
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:19
grondilu: you can, but it's probably not quite trivial 10:20
grondilu: good news, there's at least one module on modules.perl6.org that does something similar
(either for md5 or sha1)
grondilu: oh. github.com/soh-cah-toa/p6-digest-sha256/ 10:21
grondilu cool
but do I need panda for that? Last time I checked, it didn't fly.
jnthn Rakudo uses SHA-1 internally, so that's available in a (non-portable) way :) 10:22
nom: say nqp::p6box_s(nqp::sha1('dugong'))
p6eval nom ce5cca: OUTPUT«B6120314269E12B126A805324E04763E291615FA␤»
moritz grondilu: no
grondilu: ufo should do fine, or even just copying the .pm file yourself
masak you don't need panda to use modules.
grondilu has never installed a perl6 module and doesn't know how to.
masak ufo isn't for installing modules, just for building a decent Makefile.
moritz grondilu: fwiw you need the 'nom' branch of that module 10:23
with a newer rakudo
I'll ask cosimo to merge it into master
grondilu « fatal: remote error: Could not find Repository soh-cah-toa/digest-sha256 » 10:24
10:24 rsimoes joined
moritz github.com/soh-cah-toa/p6-digest-sha256/ 10:25
oh, the readme is wrong
git://github.com/soh-cah-toa/p6-digest-sha256.git 10:26
grondilu what's 'ufo' ?? 10:28
moritz grondilu: see github.com/masak/ufo/ 10:29
grondilu ok, thanks 10:31
masak ufo was built for module developers who are tired of crafting their own Makefile. 10:37
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 …
..rakudo ce5cca: OUTPUT«XOOX␤»
..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…
masak I don't think this is spec, but can I ask that we make it work? :)
(Rakudo runs it, but gets it wrong. should be "OXXO".
)
moritz btw it looks better when you write it as :nth() 10:48
masak oh!
yes.
perl6: $_ = "OXOX"; s:nth(*-1)/OX/XO/; .say
moritz rakudo simply ignores :nth for now; that part hasn't been backportef from b yet
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 …
..rakudo ce5cca: OUTPUT«XOOX␤»
..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…
moritz b: $_ = "OXOX"; s:nth(*-1)/OX/XO/; .say
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…
masak alpha: $_ = "OXOX"; s:nth(*-1)/OX/XO/; .say
p6eval alpha : OUTPUT«Colons cannot be used as delimiters in quoting constructs at line 10, near ":nth(*-1)/"␤in Main (file <unknown>, line <unknown>)␤»
masak tut-tuts 10:49
10:55 nsh joined 10:56 sbp joined
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␤»
masak there. that solution generalizes.
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
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␤»
masak \o/ 11:06
moritz interested reader
masak moritz++
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:07
moritz I haven't made it far into those books yet :/ 11:09
masak they're lovely.
imagine inventing a whole number system just to analyze games! 11:10
moritz seems legit.
people (well, some kind of people) invent their own algebras just for fun 11:11
arnsholt fondly remembers discovering octal games
11:12 grondilu left
masak octal games rock. 11:15
too bad I could only issue that kind of task once :)
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:23
arnsholt masak: Well, you could always go with one where perfect play isn't possible =) 11:26
That'd make for a different kind of task though
moritz we did consider iterated prisoner's dilemma, and letting all the contestant's solution work against each other 11:28
and it was fun to write the harness for that one
11:28 spine_ joined
moritz but it turns out it's very hard to beat simple tit-for-tat by anything more than a small margin 11:29
11:29 snearch left
moritz so we've decided not to go with this one 11:30
maybe I should make that a mini-challenge on my blog 11:33
11:35 preflex left 11:36 preflex_ joined, preflex_ is now known as preflex
moritz sorear: are niecza's line numbers 0-based? 11:48
sorear: I just noticed that line numbers in uninitialized warnings seem to be one off 11:49
11:49 am0c left
colomon has never noticed that... 11:49
moritz try 11:50
my $a;
note 'a';
$a += Any;
this has at /home/moritz/niecza-bug.pl line 2 (mainline @ 2)
in the backtrace
but the warning comes from the 3rd line 11:51
nom: say 1
p6eval nom ce5cca: OUTPUT«1␤»
moritz niecza: my $a = 0;␤note 'a';␤$a += Any
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…
moritz at /tmp/YeE0K8ZlDT line 2 11:52
there you have it
11:56 cognominal left
masak moritz: +1 for mini-challenge for tit-for-tat 12:02
I'm slightly disappointed that no-one has picked up the "Little Animal Farm" challenge
tadzik yet :) 12:03
masak right, yet.
was looking forward to seeing subtle trading tactics and strategies.
maybe I need to get the ball rolling by writing something myself...
12:05 cognominal joined
masak latest I did was to create this example AI class: gist.github.com/1154298 12:08
maybe I should actually create a few that play decently, and pit them against each other?
would make a nice blog post, methinks.
tadzik nice 12:09
masak perl6: say Bool.roll
p6eval niecza v13-389-g852f0ff: OUTPUT«False␤»
..pugs b927740: OUTPUT«*** No such method in class Bool: "&roll"␤ at /tmp/e5avx2e2cj line 1, column 5 - line 2, column 1␤»
..rakudo ce5cca: OUTPUT«True␤»
12:10 benabik left
felher masak, moritz: +1, more mini-challenges, more blog posts :) 12:10
tadzik aw, inconsistent results! Oh, wait 12:11
masak :P 12:12
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␤»
masak \o/
I was going to say "combinations are so much more pleasant to implement than permutations". 12:17
but then I got to thinking: maybe there's a similar way to implement permutations, with a generating function and the sequence operator?
yes, seems there is. at least as long as the elements are unique and comparable. 12:20
dalek ast: f3ee697 | (Solomon Foster)++ | S06-traits/is-copy.t:
Change meaningless function name from i to j so it doesn't interact with Complex numbers.
12:25
12:36 benabik joined
moritz niecza: sub i() {say 'i' }; i 12:36
p6eval niecza v13-389-g852f0ff: ( no output )
moritz I guess that's a bug 12:37
nom: sub i() {say 'i' }; i
p6eval nom ce5cca: OUTPUT«i␤»
colomon nom: say i
p6eval nom ce5cca: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&i' called (line 1)␤»
colomon that's a bug for sure...
moritz aye ;-)
dalek ast: 37c0bd5 | (Solomon Foster)++ | S02-types/hash.t:
Refudge for niecza.
moritz nom: constant i = 1i; { sub i() { say 'i' }; i } 12:38
p6eval nom ce5cca: ( no output )
moritz hm, same behavior
masak does the spec say we have 'i' in core?
moritz yes
masak I thought it was 1i.
colomon nope, i
masak hokay :)
moritz but the justfiction for it is that it can be easily overridden in a lexical scope
benabik I believe i is a postfix and a constant.
colomon 1i is the alternative that works in nom
benabik is correct
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() }
p6eval nom ce5cca: OUTPUT«i␤»
jnthn Note the difference.
moritz I know that it can be forced with parens
but I still think that the lexical search outwards should find the &i first
jnthn Right, but it's only the same as
nom: class i { }; { sub i() { say 'i' }; i() } 12:40
p6eval nom ce5cca: OUTPUT«i␤»
jnthn nom: class i { }; { sub i() { say 'i' }; i }
p6eval nom ce5cca: ( no output )
12:59 kaleem left 13:00 bacek left 13:13 bacek joined 13:23 dudulz joined
[Coke] chuckles when people talk to Larry not realizing he's Larry. 13:32
moritz yes, that can be amusing 13:33
timotimo LARRY IS HERE! OHMYGAWD /me faints 13:38
moritz but Elvis has left the building!
colomon So... I have a KeySet implementation for niecza. But it's kind of grotesquely inefficient. 13:42
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:43
colomon wishes niecza had Proxy 13:44
moritz how does niecza implement list assignment? 13:45
or hash assignment, for that matter
my %h = 1, 2, 3 => 4; # not a hash on the RHS either
colomon I don't know. I've been unable to sort out the mysteries of the Hash class. 13:46
13:50 PerlJam left, PerlJam joined
moritz nom: my @a = 1, 2, 3; @a = @a Z+ 10, 10, 10; 13:50
p6eval nom ce5cca: ( no output )
moritz nom: my @a = 1, 2, 3; @a = @a Z+ 10, 10, 10; say @a
p6eval nom ce5cca: OUTPUT«11 12 13␤»
jnthn -> stockholm 13:52
benabik
.oO( Unsupported use of -> as postfix... )
13:53
moritz why, that was an infix :-)
benabik Well, yes, but I think both std and nom say postfix. 13:54
moritz std: 'jnthn' -> 'stockholm'
p6eval std 48335fc: OUTPUT«===SORRY!===␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/juJmXdFVPJ line 1:␤------> 'jnthn' ⏏-> 'stockholm'␤ expecting infix or meta-infix␤Parse failed␤FAILED 00:01 …
moritz std: jnthn -> 'stockholm'
p6eval std 48335fc: OUTPUT«===SORRY!===␤Malformed block at /tmp/GX3bBkGOpR line 1 (EOF):␤------> jnthn -> 'stockholm'⏏<EOL>␤ expecting any of:␤ block␤ param_sep␤ parameter␤Parse failed␤FAILED 00:01 111m␤»
benabik Ah, with the whitespace, it tries to parse it as a block. :-/ 13:55
std: 'jnthn'->stockholm
p6eval std 48335fc: OUTPUT«===SORRY!===␤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:␤------> 'jnthn'->⏏stockholm␤Parse failed␤FAILED 00:01 107m␤»…
benabik That's what I was thinking of
14:05 GlitchMr joined
moritz nom: my @a = 1, 2, 3; @a Z+= 10, 10, 10; 14:08
14:08 tarch joined
p6eval nom ce5cca: ( no output ) 14:08
moritz nom: my @a = 1, 2, 3; @a Z+= 10, 10, 10;; say @a
p6eval nom ce5cca: OUTPUT«1 2 3␤»
tarch perl6: say 3; 14:11
p6eval pugs b927740, rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«3␤»
dalek ast: 450fb6e | coke++ | S (2 files):
niecza fudge
14:16
ecza: 9d43bbd | coke++ | t/spectest.data:
run 3 more tests
14:18 cognominal left 14:19 cognominal joined
moritz niecza: 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␤»
moritz gist.github.com/1710688 is an implementation of the iterated prisoner's dilemma 14:30
it works both in nom and niecza
mini challenge: write a strategy. Send it to me, I'll let all strategies compete 14:31
max 2 strategies per programmer; it's not allowed to program them so that one intentionally supports the other
the goal is to score the most points in total 14:32
I'll also write a short blog post about that, when I get to it. 14:34
14:35 bluescreen10 joined 14:38 PacoAir joined 14:46 am0c joined 14:54 jferrero left 14:57 skids joined 15:00 am0c left 15:19 kaleem joined 15:22 icwiener joined 15:25 Chillance joined
TimToady so, why do folks always say [*] 1..$n when [*] 2..$n works just as well? 15:26
sjn ingrained patterns? 15:30
awwaiid Because we avoid non-zero-or-one constants
sjn [+] 1..$n != [+] 2..$n
15:30 cognominal_ joined
TimToady because there's no overhead to multiplying by 1 in pure math? 15:31
15:31 cognominal left
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"
TimToady and perhaps because pure math doesn't define product of a null range? or does it? 15:33
that too
sjn *shrugs*
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
or we just let it be inefficient :)
not a big deal in the overall scheme of things, of course
flussence perl6: say [*] 2..1
p6eval pugs b927740, rakudo ce5cca: OUTPUT«1␤»
..niecza v13-389-g852f0ff: OUTPUT«0␤»
TimToady ohh, bug 15:35
*ooh
flussence :D
TimToady but known, I think
niecza: say [*]()
p6eval niecza v13-389-g852f0ff: OUTPUT«0␤»
TimToady there's another reason for not starting with 2 :) 15:36
flussence perl6: say [*] 2...1 # probably the output I was expecting 15:37
p6eval rakudo ce5cca, niecza v13-389-g852f0ff: OUTPUT«2␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "1"␤ expecting operator, ":", "," or term postfix␤ at /tmp/xXrIiUegfJ line 1, column 13␤»
benabik poor pugs
sjn oops
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
declarators are now in that category too
(though only for initializers...)
statement_prefixes too 15:44
they're all about allowing endweight without requiring final parens
PerlJam sounds like ballast 15:45
Are there submarines in the waterbed?
huf they've all been watershed 15:46
TimToady grimaces 15:47
note that we actually use the English assymmetrical operator, ':', to introduce some of these 15:49
Here is a list: A, B, C
that's why it works as $foo.meth: 1,2,3
maybe we should call them "long tails" :) 15:59
niecza: my @a = 1, 2, 3; @a Z+= 10, 10, 10; say @a 16:15
p6eval niecza v13-389-g852f0ff: OUTPUT«11 12 13␤»
TimToady niecza: my @a = 1, 2, 3; @a X+= 10; say @a; # curious
p6eval niecza v13-389-g852f0ff: OUTPUT«11 12 13␤»
TimToady hah
niecza: my @a = 1, 2, 3; @a [X+]= 10; say @a; # curious 16:16
p6eval niecza v13-389-g852f0ff: OUTPUT«11 12 13␤»
TimToady niecza: my @a = 1, 2, 3; @a X[+=] 10; say @a; # curious 16:17
p6eval niecza v13-389-g852f0ff: OUTPUT«11 12 13␤»
TimToady I wonder which of those is more efficient...
nom: my @a = 1, 2, 3; @a X[+=] 10; say @a; 16:18
p6eval nom ce5cca: OUTPUT«1 2 3␤»
TimToady nom: my @a = 1, 2, 3; @a [X+]= 10; say @a;
p6eval nom ce5cca: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix = instead at line 1, near " 10; say @"␤»
TimToady well, niecza++ 16:19
b: my @a = 1, 2, 3; @a [X+]= 10; say @a;
p6eval b 1b7dd1: OUTPUT«===SORRY!===␤Confused at line 22, near "@a [X+]= 1"␤»
TimToady b: my @a = 1, 2, 3; @a X[+=] 10; say @a;
p6eval b 1b7dd1: OUTPUT«123␤»
16:23 alester joined 16:24 Trashlord left, kaare_ joined 16:31 kaleem left 16:34 kaleem joined 16:35 tarch left
rsimoes @TimToady: Is precedence-loosening sometimes the same thing as setting left/right associativity? 16:43
16:43 baest left 16:44 mj41 left
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
TimToady \o
pmichaud jnthn++ # star release 16:45
slavik TimToady: that sounded like revolution talk ... dunno why
16:45 dudulz left, baest joined
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:46
hadn't though of 'and' and 'or' as counterrevolutionary responses to the revolutionary list prefixes, but that's what they are 16:48
sjn viva la revoluçion? 16:51
[Coke] pmichaud: o/ 16:52
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 16:59 wolfman2000 left
sorear moritz: currently, termy things always take precedence over subs if both are in scope 17:00
TimToady I consider this a bug
well, sometimes 17:01
there's an argument that a predeclared type should be considered a kind of reserved word 17:02
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...
sjn btw 17:04
sorear in the past I thought it was just a whitespace issue
TimToady but lowercase terms should probably try not to override predeclared sub names
sjn so Damian is coming to Europe in April, and he'll be dropping by Oslo to give some lectures and courses...
TimToady std: sub self () {...}; self 42;
p6eval std 48335fc: OUTPUT«===SORRY!===␤'self' used where no object is available at /tmp/PaqGGbcFNJ line 1:␤------> sub self () {...}; self⏏ 42;␤Two terms in a row at /tmp/PaqGGbcFNJ line 1:␤------> sub self () {...}; self ⏏42;␤ expect…
TimToady std: sub rand ($) {...}; rand 42; 17:05
p6eval std 48335fc: OUTPUT«===SORRY!===␤Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick at /tmp/xIca9TRTul line 1:␤------> sub rand ($) {...}; rand⏏ 42;␤Parse failed␤FAILED 00:01 110m␤»
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
TimToady std: sub i ($) {...}; i 42;
sjn anyone up for this?
p6eval std 48335fc: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/f3IjEtWgEz line 1:␤------> sub i ($) {...}; i ⏏42;␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 111m␤»
sjn isn't entirely sure about funding people (we'll try) but venue is a done deal 17:08
if anyone's interested, please tell \o/
TimToady std: sub Int ($) {...}; Int 42; 17:09
p6eval std 48335fc: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/DnxFs_Ac_R line 1:␤------> sub Int ($) {...}; Int ⏏42;␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 111m␤»…
17:10 birdwind1pbird left, am0c joined 17:14 shachaf left
TimToady niecza: say "this"; sub say(*@stuff) { .uc.say for @stuff } 17:14
p6eval niecza v13-389-g852f0ff: OUTPUT«===SORRY!===␤␤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…
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:␤------> say i; sub i⏏(*@stuff) { .uc.say for @stuff }␤␤0+1i␤»
17:16 cognominal___ joined
TimToady we need the same kind of "already bound" semantics for i that we already have for say 17:16
17:16 benabik_ joined
sjn pastebin? 17:17
TimToady so all identifier terms really need to come in via the lexical scope somehow
17:17 pothos_ joined
sjn hm. is there a pastebin bot connected here? 17:17
TimToady pastie, or gist.github 17:18
no bots though
well, I don't know about pastie, but you have to do gist by hand
sjn right, thanks 17:19
17:19 Exodist_ joined, robins joined 17:20 dakkar left, pochi_ joined 17:21 PerlPilot joined
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
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:␤------> constant x = 42; { say x; sub x⏏($y) { say $y } }␤␤42␤»
..rakudo ce5cca: OUTPUT«42␤»
..pugs b927740: OUTPUT«*** ␤ Unexpected "="␤ expecting ":" or "("␤ at /tmp/icT7SzoCh6 line 1, column 12␤»
17:24 takesako left, benabik left, pochi left, cognominal_ left, mtk left, drbean left, PerlJam left, pothos left, Exodist left, robinsmidsrod left, drbean joined, benabik_ is now known as benabik
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␤»
..niecza v13-389-g852f0ff: OUTPUT«Potential difficulties:␤ &x is declared but not used at /tmp/Dqlev8BtR5 line 1:␤------> constant x = 42; { say x; sub x⏏() { say "here" } }␤␤42␤»
..rakudo ce5cca: OUTPUT«42␤»
17:25 pothos_ is now known as pothos, bluescreen10 left, shachaf joined
sorear sjn: lisppaste was in here once, but then it started anouncing spam every 30 seconds 17:29
sjn :-\ 17:31
gist.github.com/1711730
comments and thoughts appreciated! :)
17:32 mtk joined, s1n joined
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
sorear moritz: nevermind, it's the old "reporting the line number of the previous sub call" LTAness 17:33
17:34 takesako joined 17:36 GlitchMr left
tadzik sjn: that looks cool :) 17:40
17:41 kmwallio joined
sjn tadzik: would you come? :) 17:42
sjn has updated gist.github.com/1711730
17:43 robins is now known as robinsmidsrod
sjn krunen: feel free to join in when you can :) 17:43
tadzik sjn: if I lived closer, for sure :)
sjn tadzik: where do you live?
tadzik sjn: Warsaw, Poland 17:44
sjn what
that's pretty close
sjn bets there's a lot of cheap flights between Oslo and Warsaw :) 17:45
tadzik oh, stop tempting me :>
tadzik checks out the flights
sjn tadzik: I find a flight for €90 17:46
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 :)
tadzik I'm but a poor student :)
daxim apply for sponsoring 17:48
tadzik hmm
a ferry, maybe
sjn tadzik: btw, your ircname doesn't say you real name
tadzik it does
Tadzik is a short from Tadeusz, which is my real name :)
sjn tadzik: ah :)
tadzik: and may I have your surname? :) 17:49
tadzik :) it's Tadeusz Sośnierz
sjn takes notes*
tadzik is that for some beautiful girl?
: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 :)
if you want to come
daxim I found a flight for 290 PLN/wizz air
tadzik why, of course I want :)
sjn can't promise a full refund, but we'll do what we can
and €90 should be no problem
tadzik: www.dohop.no/flights/?a1=WAW&a2...;d2=220412 17:51
tadzik wow, that's awesome
oh, that's 90€ with a return?
sjn that super cheap price is maybe a bit inconvenient
yes, it's with return
tadzik 384 PLN both sides is something I can affort 17:52
sjn but it arrives very late
tadzik s/t$/d/
17:52 spine_ left
tadzik as long as you don't mind, I'm fine with being a bit late :) 17:52
sjn that's ok :) 17:53
tadzik phenny: "Lavpris"? 17:54
phenny tadzik: "Low" (da to en, translate.google.com)
sjn tadzik: you can change language on that page
top-right of page 17:55
tadzik thanks :)
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
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.)
sjn tadzik: if you prefer that one, it's fine... I'll be quite busy on friday daytime though 17:57
it might give you a day for doing touristy stuff
tadzik yeah, I'm thinking about that
17:58 tarch left
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 17:58
sjn tadzik: don't think for too long :) 18:01
tadzik I'll just wait for an exam session to end, and to make sure how my weekly schedule will look like 18:07
in the best case, that'd be friday 18:08
or something friday-ish
sjn tadzik: ok, just beware that flight prices are likely to rise :-/ 18:10
tadzik sjn: awesome thing, thanks for an invitation :) 18:11
sjn: yeah, I know that
sorear things which have been sent my way so far today: constant folding SORRY opportunities, line number LTAness, Proxy, overriding termy things 18:13
colomon sorear++ 18:18
sjn (oh, and if anyone else is interested in gist.github.com/1711730, get in touch with me :) 18:20
[Coke] sjn: looks nifty. 18:21
are the damian classes sixian or fivish?
sjn fivish
no decisions yet though
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: gist.github.com/1712021
[Coke] colomon: do it, we can pass MOAR SPEC TESTS! MUAHAHAHAHA 18:23
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:24
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:25
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:29
18:34 spine joined 18:40 kaleem left, kaleem joined 18:42 MayDaniel joined 18:43 MayDaniel left 18:44 supernovus joined
colomon sorear: the issue is the other way around... making the %h a Bag, for instance. 18:45
errr... huh. 18:46
niecza: my %h = set <a b o p a p o o>;
p6eval niecza v13-389-g852f0ff: OUTPUT«Potential difficulties:␤ %h is declared but not used at /tmp/eZ4mS22mBO line 1:␤------> my ⏏%h = set <a b o p a p o o>;␤␤Unhandled exception: Unmatched key in Hash.LISTSTORE␤ at /tmp/eZ4mS22mBO line 1 (mainline @ 2) ␤ at /home/p6eval…
TimToady niecza: say set(<a b o p a p o o>) ~~ Associative 18:48
p6eval niecza v13-389-g852f0ff: OUTPUT«True␤»
colomon niecza: my @h = set <a b o p a p o o>; say @h
p6eval niecza v13-389-g852f0ff: OUTPUT«set(a, b, o, p)␤»
colomon !!!!
oh
niecza: my @h = set <a b o p a p o o>; say @h.elems
p6eval niecza v13-389-g852f0ff: OUTPUT«1␤»
TimToady thing is, you're assigning an item, and the assignment isn't noticing that the item is associative
yes, that
colomon niecza: my @h = (set <a b foo>).list; say @h 18:49
p6eval niecza v13-389-g852f0ff: OUTPUT«a b foo␤»
TimToady niecza: my %h := set <a b o p a p o o>;
p6eval niecza v13-389-g852f0ff: OUTPUT«Potential difficulties:␤ %h is declared but not used at /tmp/LKk15zL6Tx line 1:␤------> my ⏏%h := set <a b o p a p o o>;␤␤»
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␤»
colomon niecza: my %h := set <a b o p a p o o>; say %h.WHAT
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…
[Coke] niecza: my $name="alpha"; say "asdfasdf" ~~ /<::($name)>/;
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)>␤»
[Coke] niecza: my $name="alpha"; say ("asdfasdf" ~~ /<::($name)>/).Str; 18:51
p6eval niecza v13-389-g852f0ff: OUTPUT«a␤»
colomon so, should (set <a b foo>).list be a, b, foo or a => True, b => True, foo => True ?
18:51 kmwallio left
sjn has posted about the Perl6 hackathon I mentioned: code.foo.no/2012/01/31/oslo-perl-mongers-in-2012 18:51
TimToady specced to be just the keys
colomon so then how do we make %h = set <a b foo> work? or shouldn't it? 18:52
gotta go, family haircut time.
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:␤------> my Set ⏏%h = a => True;␤␤»
colomon niecza: my Set %h = a => True; say %h
p6eval niecza v13-389-g852f0ff: OUTPUT«{"a" => Bool::True}␤»
colomon niecza: my Set %h = a => True; say %h.WHAT
p6eval niecza v13-389-g852f0ff: OUTPUT«Hash()␤»
colomon right. :\ 18:54
TimToady that's a hash of set
colomon yeah
TimToady my %h is Set = is supposed to work
colomon but doesn't, AFAIK
supernovus I opened a ticket for the strange Rakudo behaviour I reported yesterday: rt.perl.org/rt3/Ticket/Display.html?id=109500 18:59
19:01 GlitchMr joined 19:27 supernovus left 19:35 daxim left 19:44 fsergot joined
[Coke] niecza spec question: "StrPos tests broken" -> So don't unfudge them? 19:46
[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>)
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()))␤»
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>)
p6eval nom ce5cca: OUTPUT«(Match.new(orig => "abb", from => 2, to => 3, ast => Any, list => ().list, hash => EnumMap.new()),)␤»
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.
[Coke] sorear: we pass a lot of them, considering we don't have StrPos. ;)
(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.
[Coke] I'll leave it alone for now.
sorear: well, presumably you wouldn't auto-unfudge that one.
19:54 jferrero joined
skids nom: grammar a { token a { a }; token b { b }; token c { [ <a> <b> ] [ <a> | <b> ] { $/<b>.say } }; }; a.parse("abb",:rule<c>) 19:55
p6eval nom ce5cca: OUTPUT«=> <b>␤ => <b>␤␤» 19:56
skids (And now it is back again. Fishy...)
20:10 PZt left 20:15 snearch joined 20:18 shachaf_ joined, shachaf_ left 20:19 cooper joined 20:25 bluescreen10 joined 20:29 birdwindupbird joined 20:37 PZt joined 20:40 PerlPilot left, PerlJam joined 20:41 zby_home_ joined 20:48 icwiener left 21:01 birdwindupbird left 21:03 birdwindupbird joined, GlitchMr left, fsergot left 21:09 skids left 21:20 cognominal___ left 21:21 cognominal joined 21:22 bluescreen100 joined 21:24 chee left 21:26 chee joined, chee left, chee joined 21:31 birdwindupbird left
dalek ecza: 877dee4 | (Paweł Murias)++ | p5test/p5test.pl:
Refactor p5test.
21:35
21:45 bluescreen10 left, bluescreen100 left 21:54 kaleem left 22:14 kaleem joined 22:16 zby_home_ left 22:26 lutok joined, kaare_ left 22:28 Guest23280 joined 22:40 snearch left 22:44 bkolera left 22:54 pyrimidine left 23:14 bacek left, tarch joined 23:15 bacek joined 23:22 whiteknight joined 23:31 kaleem left 23:34 dorlamm joined 23:37 tokuhirom joined 23:38 dorlamm left, PacoAir left 23:42 tokuhirom left, benabik left 23:57 dudulz left