»ö« 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.
sorear Juerd: still ddosing? 00:13
Juerd sorear: No, it has nothing to do with attacks of any kind, as far as we can tell. 00:19
One cable's link is disappearing at seemingly random intervals; every time it takes a litlte over 30 seconds for the link to reestablish due to STP. 00:20
benabik Is there a good reference for "what is 6model"? 00:21
Juerd It happens 1 to 4 times per hour. Hasn't happened for the past 30 minutes.
sorear STP?
Juerd Spanning Tree Protocol; prevents switch loops in large networks.
sorear whyyyy 00:22
redundancy is the best part of the internet
Juerd It's a feature that every managed switch has.
benabik sorear: It's a side effect of redundancy. You need to make sure two switches don't both see the other as the best route to somewhere.
Redunancy good, loops bad.
Juerd Because without it, you'd get loops. Loops lead to broadcast storms, and those kill switches. 00:23
While port bonding/trunking exists to combine two ports, it's not typically seen as a redundancy thing, and it's not enabled by default, or even discoverable in most cases. 00:24
So if there are two links between switches, it won't see that as a spare link, or to increase bandwidth. Instead, STP will kick in and decide which one to disable. 00:25
lichtkind greetings Juerd
Juerd STP has a learning state of approximately 30 seconds before it enters what's called forwarding state. Forwarding state is the normal state for switch ports.
Cheap switches forward immediately. 00:26
STP can be disabled per port but that's dangerous.
If these issues continue we'll have to do so, though.
Juerd Well, I guess it wasn't the switch port either then :( 00:30
Juerd That was another 30 second outage... 00:30
benabik Bad NIC? 00:31
benabik knocks on wood.
geekosaur ...nic-noc jokes? 00:38
Juerd benabik: No, the flapping connection is definitely between two switches 00:44
One of those is ours. The other one isn't. These are located at an internet exchange.
benabik Oh well that's... better? Harder to fix, but hopefully doesn't require new hardware... :-/ 00:45
Juerd Well, we first have to find out what the hell is going on.
But now I'm going back home. I've enabled STP PortFast so that it will skip the 30 second learning phase. 00:46
Juerd That should bring the outages down to 4 to 5 seconds only and is probably much more bearable. 00:46
benabik Yay bandaids!
Juerd++
Juerd Yea.. :(
I hate leaving this place (extremely noisy datacentre-like room) without a real fix. 00:48
This is a marvellous place. Without leaving the room I could kill of a good part of the Dutch and probably European internet just by cutting cables until the security guys arrive. I just wish fixing things was as easy as breaking them :) 00:50
benabik I get that feeling every time I walk into the machine room at school... Although I can only really screw up one building from there.
Juerd Oh well, at least we've tried a few solutions; theoretically that means we're closer to knowing what the problem is.
Juerd afk 00:51
benabik "On the contrary, I've learned a great many things that won't work."
Or however that quote goes.
"I have not failed. I've just found 10,000 ways that won't work." ~~ Thomas A Edison 00:52
sisar r: say 5 ~~ int ; 02:02
p6eval rakudo 984dc7: OUTPUT«False␤»
sisar r: say 5 ~~ Int ;
p6eval rakudo 984dc7: OUTPUT«True␤»
sisar is 'int' incorrect? Data types _have_ to start with an uppercase letter ? 02:04
benabik int is a native type
Native types are lowercase. (int, num, str)
sisar what's a *native* type ? 02:05
benabik Ints are variable precision, ints are limited to whatever the (virtual) machine does by default.
However ints are likely to be faster.
sisar um, so why did 5 ~~ int fail ? 02:06
i mean, give False
jnthn Something forced it to box. 02:07
(The 5)
At which point it becomes an Int
sorear ~~ int feels wrong to me
sisar jnthn: 'to box' ? 02:08
jnthn sorear: Wrong in the sense of "hard to think of a sane model where it works"? :)
sisar i'm unfaniliar with the term
Teratogen can you do stuff like char broiled; in Perl 6?
jnthn sisar: Turning a native type into an object
sorear jnthn: wrong in the sense of "~~ takes Mu, so it will never ever see an int argument" 02:10
jnthn Hmm, is dalek on the blink? 02:15
oh, just reached appropriate part of backlog... 02:16
lichtkind hai jnthn 03:35
moritz p6: say 1 <=> 2 08:01
p6eval rakudo da576f, niecza v16-17-g648c49b: OUTPUT«Increase␤»
..pugs: OUTPUT«-1␤»
dalek ast: 18ba63b | moritz++ | S32-num/fatrat.t:
test comparison ops on FatRats where fallback to Num would produce wrong results
08:03
moritz r: say ~ Bag.new({a => 5 b => 2}) 08:17
p6eval rakudo da576f: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
moritz r: say ~ Bag.new({a => 5, b => 2})
p6eval rakudo da576f: OUTPUT«a b␤»
moritz r: say ~ Bag.new({a => 5, b => 2}).pairs.map: { .key xx .value
p6eval rakudo da576f: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
moritz r: say ~ Bag.new({a => 5, b => 2}).pairs.map: { .key xx .value }
p6eval rakudo da576f: OUTPUT«a a a a a b b␤»
moritz Bag.Str is implemented as ~ self.pairs.map: { .key xx .value } 08:18
why doesn't it work in the setting?
dalek kudo/nom: d344e96 | moritz++ | src/core/Rat.pm:
fix thinko in Int <=> Rat
08:31
kudo/nom: 68e7f8f | moritz++ | src/Perl6/ (2 files):
rename $=POD to $=pod
tadzik moritz: I'm quite sure that second commit broke all Pod tests 08:34
dalek ast: 25f5583 | moritz++ | S (10 files):
$=POD is now called $=pod
08:37
moritz tadzik: just because I haven't pushed that one yet
got called off, sorry for the delay
tadzik no worries :) 08:38
moritz++ 08:39
tadzik random hack idea: write a Perl 6 example of oylenshpeegul.typepad.com/blog/2012...icity.html 08:43
would probably require some LWP and MuEvent hacking, but I find it quite possible
dalek ast: 5d0290d | moritz++ | S (3 files):
rakudo refudges
08:52
moritz any idea what's wrong with the Bag/KeyBag stringification, which I've mentioned in the backlog? 09:13
moritz and any idea what's wrong with twitter? I keep getting search results that are in no way related to my actual search 09:28
moritz and it's been happening for too long to be an april fool's joke 09:39
moritz r: say ?^1 09:43
p6eval rakudo 68e7f8: OUTPUT«False␤»
moritz r: say ?^0
p6eval rakudo 68e7f8: OUTPUT«True␤»
moritz r: say ?^3 09:44
p6eval rakudo 68e7f8: OUTPUT«False␤»
moritz n: say ?^3 09:44
p6eval niecza v16-17-g648c49b: OUTPUT«False␤» 09:45
dalek ast: 1fa6884 | moritz++ | S03-operators/boolean-bitwise.t:
prefix ?^
zhutingting perl6: my $str = '1a2b3c' and say $str ~~ m:g/\d/ 09:53
p6eval niecza v16-17-g648c49b: OUTPUT«===SORRY!===␤␤Regex modifier g not yet implemented at /tmp/zEUpGQyZGk line 1:␤------> my $str = '1a2b3c' and say $str ~~ m:g⏏/\d/␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1…
..rakudo 68e7f8: OUTPUT«False␤»
..pugs: 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'␤"␤*** '<HANDLE>' tra…
zhutingting perl6: my $str = '1a2b3c' and say $str ~~ /\d/ 09:54
p6eval niecza v16-17-g648c49b: OUTPUT«#<match from(0) to(1) text(1) pos([].list) named({}.hash)>␤»
..rakudo 68e7f8: OUTPUT«=> <1>␤␤»
..pugs: 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'␤"␤*** '<HANDLE>' tra…
zhutingting how to use global?
moritz r: for '1a2b3c'.match(:g, /\d/) { say ~$/ } 09:55
p6eval rakudo 68e7f8: OUTPUT«use of uninitialized value of type Any in string context␤␤use of uninitialized value of type Any in string context␤␤use of uninitialized value of type Any in string context␤␤»
moritz r: for '1a2b3c'.match(:g, /\d/) { say ~$_ }
p6eval rakudo 68e7f8: OUTPUT«1␤2␤3␤»
moritz r: for '1a2b3c'.comb(/d) { say $_ }
p6eval rakudo 68e7f8: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix / instead at line 1, near "d) { say $"␤»
moritz r: for '1a2b3c'.comb(/d/) { say $_ }
p6eval rakudo 68e7f8: ( no output )
moritz r: for '1a2b3c'.comb(/\d/) { say $_ }
p6eval rakudo 68e7f8: OUTPUT«1␤2␤3␤»
moritz it helps to actually type what you want :-) 09:56
Teratogen and *I* generate spam on this channel?
hmph!
moritz Teratogen: spam != noise 09:57
Teratogen: and I generate noise while trying to answer a question, which is signal. I haven't seen much signal from you yet
zhutingting thx ;-) and does have some style more perl5?
like $str =~ /\d/g 09:58
moritz zhutingting: I guess for $str ~~ m:g/\d/ { } should work, but it's not implemented yet
p6: say '1234' ~~ m:g/\d/ 09:59
p6eval rakudo 68e7f8: OUTPUT«False␤»
..pugs: 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'␤"␤*** '<HANDLE>' tra…
..niecza v16-17-g648c49b: OUTPUT«===SORRY!===␤␤Regex modifier g not yet implemented at /tmp/g39T2ImGmV line 1:␤------> say '1234' ~~ m:g⏏/\d/␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1366 (die @ 3) ␤ at /…
moritz there's a design problem with this though
perlgeek.de/blog-en/perl-6/three-fu...match.html 10:00
r: $_ = '123'; say m:g/\d/
p6eval rakudo 68e7f8: OUTPUT«1 2 3␤»
zhutingting thx ;-)
moritz r: $_ = '123'; say (m:g/\d/).WHAT
p6eval rakudo 68e7f8: OUTPUT«List()␤»
moritz r: $_ = 'a1b2d34'; .say for m:g/\d/ 10:01
p6eval rakudo 68e7f8: OUTPUT«=> <1>␤␤=> <2>␤␤=> <3>␤␤=> <4>␤␤»
moritz r: $_ = 'a1b2d34'; say .Str for m:g/\d/
p6eval rakudo 68e7f8: OUTPUT«1␤2␤3␤4␤»
moritz that one does work in rakudo, but only while matching against $_
$_ = '123'; m:g/./; say $/.WHAT
r: $_ = '123'; m:g/./; say $/.WHAT 10:02
p6eval rakudo 68e7f8: OUTPUT«Any()␤»
moritz zhutingting: oh, and welcome to #perl6 :-)
mirc71 p6: say '1234' ~~ m:g/\d/ 10:07
p6eval rakudo 68e7f8: OUTPUT«False␤»
..niecza v16-17-g648c49b: OUTPUT«===SORRY!===␤␤Regex modifier g not yet implemented at /tmp/xGW4G8aAAg line 1:␤------> say '1234' ~~ m:g⏏/\d/␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1366 (die @ 3) ␤ at /…
..pugs: 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'␤"␤*** '<HANDLE>' tra…
mirc71 wow
looks different in mirc
moritz std: say()
p6eval std 5740094: OUTPUT«ok 00:01 107m␤»
moritz std: say;
p6eval std 5740094: 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/6paawcedCx line 1:␤------> say⏏;␤Check failed␤FAILED 00:01 107m␤»
moritz std: say ;
p6eval std 5740094: 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/fe3ee7vCEv line 1:␤------> say⏏ ;␤Check failed␤FAILED 00:01 107m␤»
mirc71 much better
mirc71 I wonder what font I need in xchat to render perl 6 engine output here? 10:14
render it properly, that is 10:15
moritz mirc71: std and niecza emit ANSI color codes 10:16
mirc71: so you'd need some kind of extension that can handle those
JimmyZ_ chatzilla can't handle those 10:25
moritz IMHO compilers shouldn't ouput color codes if they write to pipes 10:27
(which means we wouldn't get colors on IRC, which is fine)
Teratogen www.intertwingled.net/perl6.png 10:29
that's what #perl6 looks like in my xchat 10:30
clearly the wrong character encodings are at work
I don't know how to fix it in xchat 10:31
maybe somebody on #xchat will know
constantined the same in pidgin. p6eval, use pastebin. please 10:36
constantined this is a joke :) 10:42
fsergot hi #perl6 o/ 12:23
bbkr hi 12:24
moritz \o 12:27
tadzik hello fsergot 12:27
gfldex r: package P { our proto n(Int $i) { say $i }; our multi sub n(Str $s){ say $s}; } P::n(10); P::n('welp'); 12:36
p6eval rakudo 68e7f8: OUTPUT«===SORRY!===␤Confused␤at /tmp/HH7febdbRA:1␤»
gfldex r: package P { our proto n(Int $i) { say $i }; our multi sub n(Str $s){ say $s}; }; P::n(10); P::n('welp'); 12:37
p6eval rakudo 68e7f8: OUTPUT«10␤Nominal type check failed for parameter '$i'; expected Int but got Str instead␤ in sub n at /tmp/iGCIhnpwGE:1␤ in block <anon> at /tmp/iGCIhnpwGE:1␤␤»
moritz huh, I thought we disallowed 'our multi sub' 12:38
gfldex that would mean I can't use MMD in a package 12:39
moritz not at all
gfldex not going to kill me to do it in a class
how am I supposed to do it then?
moritz r: package P { our proto n(|$) {*}; multi n(Int $) { 'Int' }; multi n(Str $) { 'Str' } }; say P::n($_) for 42, 'foo' 12:40
p6eval rakudo 68e7f8: OUTPUT«Int␤Str␤»
gfldex tyvm
moritz yavw
fglock I was reading trac.parrot.org/parrot/wiki/Languages, and went to check Blizkost - I wonder if it makes sense to compile perlito5 to parrot (Blitzkost seems to be just a perl wrapper) 12:56
*Blizkost 12:57
moritz you mean as a way to interop between p5 and parrot?
that does make some sense, yes 12:59
fglock no, not as a way to interop, but as an actual implementation of perl5 in parrot 13:08
moritz ah, ponie 2.0
so, what would you emit? PIR? winxed? 13:10
fglock whatever performs better, I think 13:11
performance is high in my list
fglock looking at winxed, it seems to be too high-level 13:14
moritz well, it aims to mostly provide stuff that translates rather directly to parrot stuff 13:15
but still, PIR is closer to the metal
fglock I found this about ponie: news.perlfoundation.org/2006/08/pon..._past.html 13:18
JimmyZ_ emit M0! 13:19
moritz ... except that M0 doesn't run yet, much less JITs
JimmyZ_ if today is April Fools' Day, emit M0 is very easy 13:20
:)
moritz well, it hasn't been April 1st for well over 15 hours here :-) 13:21
fglock "Ponie was an attempt to drag the Perl 5 internals, kicking and screaming, into the Parrot Virtual Machine and have them run there" 13:21
moritz ok, then it's not an attempt to recreate ponie 13:22
just a p5-on-parrot
fglock moritz: do you have a link to ponie? it seems to be a different project 13:24
moritz fglock: no, it's the same. And it's such an old project that all the websites about it seems to have gone down 13:25
fglock: it was an attempt to bring perl 5 to parrot, though I'm not sure how exactly they tried to do it 13:26
[Coke] most of the people around when that happened aren't with parrot anymore. 13:29
moritz or with Perl 6, for that matter 13:30
GlitchMr Well, you can use "use v5" to run Perl 5 code in Perl 6, but...
perl6: use v5; my @array = 1; print $array[0];
moritz though at GPW I talked to Nicholas++, who seems to have vivid memories :-)
p6eval rakudo 68e7f8: OUTPUT«===SORRY!===␤Variable $array is not declared␤at /tmp/bzPtsKSlCx:1␤»
moritz GlitchMr: but only if it's implemented.
fglock there is some discussion here, from 2003 - www.gossamer-threads.com/lists/perl...ers/170165 - they wanted XS-level compatibility
GlitchMr XS-level compatibility is insanity :P. That would mean that Perl 6 could be only written in C... 13:32
p6eval ..pugs: OUTPUT«Error eval perl5: "sub { use ops (':default', 'binmode', 'entereval');; my @array = 1; print $array[0];␤␤}"␤*** 'print' trapped by operation mask at (eval 2) line 1.␤␤Undefined subroutine &main:: called.␤» 13:33
..niecza v16-17-g648c49b: OUTPUT«===SORRY!===␤␤Variable $array is not predeclared (did you mean @array?) at /tmp/spCpeBE12E line 1:␤------> use v5; my @array = 1; print ⏏$array[0];␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/C…
GlitchMr ... seriously... five minutes to tell me this O_o... 13:34
GlitchMr OK, three... but whatever... 13:34
jnthn morning o/ 13:50
Around for just a little bit. :)
moritz \o jnthn 13:51
jnthn hi moritz :)
moritz++ # various Rakudo patches :)
moritz thanks :-) 13:52
though fixing URI and LWP::Simple was actually more work :-)
I wonder if should make a star release, or wait til after the April compiler release
moritz I'm not sold on the idea, but I could imagine doing a star release after the Oslo P6 hackathon 13:53
jnthn A Star release would need a patched NQP release because I failed to get the fix for pre-comp of NativeCall-using modules in. ;S
*:S
moritz ok, then it's probably more economic to wait 13:54
jnthn Yeah.
moritz maybe I'll get around to blogging that tonight 13:55
jnthn fwiw, I'm making the 20 hour journey home tomorrow, so will be digging back in to things later this week. :)
tadzik lol look: gist.github.com/2283587 13:56
I with I could make LWP work if it, instead of cheating horribly :)
moritz expects to find an event loop
woah! \o/ 13:57
tadzik they're mostly in order, for the event loop is slower than my wifi at the moment :) 13:58
but thanks to the ultimate slowness of FSM website you can see that it's async :)
moritz 'KOÅCIÃÅ' -- is that the way it should be?
or mojibake?
tadzik afks for a while 13:59
moritz tadzik++
jnthn Looks like mojibake to me 14:06
tadzik++ though ;)
8:)
gah, keyboard skills have decreased due to lack of hacking :)
jnthn bbl 14:21
gfldex r: say Order::Increase; 14:31
p6eval rakudo 68e7f8: OUTPUT«Increase␤»
gfldex r: say (Order::Increase).Int;
p6eval rakudo 68e7f8: OUTPUT«-1␤»
bbkr rakudo: Order.^methods.say 14:35
p6eval rakudo 68e7f8: OUTPUT«too many named arguments: 2 passed, 0 used␤ in any parents at src/gen/Metamodel.pm:681␤ in any methods at src/gen/Metamodel.pm:398␤ in method dispatch:<.^> at src/gen/CORE.setting:783␤ in block <anon> at /tmp/UvMyerD1sC:1␤␤»
bbkr what happened here?
gfldex r: say Order.WHAT;
p6eval rakudo 68e7f8: OUTPUT«Order()␤»
gfldex r: say Order.^WHAT;
p6eval rakudo 68e7f8: OUTPUT«===SORRY!===␤Cannot use .^ on a non-identifier method call at line 1, near ";"␤»
moritz r: enum A <b c>; say A.^methods 14:36
p6eval rakudo 68e7f8: OUTPUT«too many named arguments: 2 passed, 0 used␤ in any parents at src/gen/Metamodel.pm:681␤ in any methods at src/gen/Metamodel.pm:398␤ in method dispatch:<.^> at src/gen/CORE.setting:783␤ in block <anon> at /tmp/lNDeV59Rnc:1␤␤»
moritz bbkr: looks like a regression
r: enum A <b c>; A.^methods
p6eval rakudo 68e7f8: OUTPUT«too many named arguments: 2 passed, 0 used␤ in any parents at src/gen/Metamodel.pm:681␤ in any methods at src/gen/Metamodel.pm:398␤ in method dispatch:<.^> at src/gen/CORE.setting:783␤ in block <anon> at /tmp/2sIV3gfwH1:1␤␤»
bbkr known or should I report? 14:36
moritz report please
bbkr reports
moritz bbkr++ 14:37
gfldex r: package P { class A { has $.a }; multi infix:<==>(A $a1, A $a2){ return $a1.a == $a2.a; } }; my $a1 = P::A.new; $a1.a = 10; my $a2 = P::A.new; $a2.a = 11; say $a1 == $a2; 14:41
p6eval rakudo 68e7f8: OUTPUT«Cannot assign to a readonly variable or a value␤ in block <anon> at /tmp/9A5LNdSEmN:1␤␤»
gfldex r: package P { class A { has $.a is rw; }; multi infix:<==>(A $a1, A $a2){ return $a1.a == $a2.a; } }; my $a1 = P::A.new; $a1.a = 10; my $a2 = P::A.new; $a2.a = 11; say $a1 == $a2; 14:42
p6eval rakudo 68e7f8: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \$v, Mu %_!)␤␤ in method Numeric at src/gen/CORE.setting:644␤ in sub infix:<==> at src/gen/CORE.setting:2340␤ in block <anon> at /tmp/9cmXVaTvQW:1␤␤»
gfldex is there any way for me to get A == A out of that scope? 14:43
r: package P { class A { has $.a is rw; }; multi infix:<==>(A $a1, A $a2){ return $a1.a == $a2.a; } }; my $a1 = P::A.new; $a1.a = 10; my $a2 = P::A.new; $a2.a = 11; say $a1 P::infix:<==> $a2;
p6eval rakudo 68e7f8: OUTPUT«===SORRY!===␤Confused␤at /tmp/g1ySlOsxhM:1␤»
gfldex r: package P { class A { has $.a is rw; }; multi infix:<==>(A $a1, A $a2) is export { return $a1.a == $a2.a; } }; my $a1 = P::A.new; $a1.a = 10; my $a2 = P::A.new; $a2.a = 11; say $a1 == $a2; 14:45
p6eval rakudo 68e7f8: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \$v, Mu %_!)␤␤ in method Numeric at src/gen/CORE.setting:644␤ in sub infix:<==> at src/gen/CORE.setting:2340␤ in block <anon> at /tmp/1AMqbuJ6tS:1␤␤»
moritz gfldex: I don't think there's a way to do it yet >(
erm, :(
gfldex: in theory it should work with infix:<==>(A, A) is export { } and then 'import'
gfldex: but I'm pretty sure it doesn't work in rakudo right now :/ 14:46
gfldex: the only way to make it work is to put P::A into a separate .pm file, and then 'use P::A;'
gfldex i'm writing a module anyway. Would have been nice to cheat until I really have to turn it into a module. :) 14:47
moritz agreed 14:48
gfldex are >, >=, < etc pp "derived" from cmp? Or do I have to implement all of those? 14:48
moritz you have to implement them all 14:50
though I imagine that one could create a module that derives them for you 14:51
gfldex sounds like (mostly) macro work to me
moritz aye
for example for strings, eq and ne can easily short-cut when the length is different, but cmp needs to do the full comparison work
so in general, it's not a good idea to always derive all the comparators from the most general ones 14:52
gfldex masak++ for providing reason to say: that's for later :->
tadzik what's mojibake? 15:02
oh
"KOÅCIÃÅ" is just "Kościół" badly encoded 15:03
phenny: "kościół latającego potwora spaghetti"?
phenny tadzik: "Church of the flying spaghetti monster" (pl to en, translate.google.com)
tadzik nom: my Num $a = (now - now).Numeric 15:19
p6eval rakudo 68e7f8: OUTPUT«Type check failed in assignment to '$a'; expected 'Num' but got 'Duration'␤ in block <anon> at /tmp/fPIIbFfJff:1␤␤»
tadzik disapproves
moritz nom: say Duration ~~ Numeric 15:20
p6eval rakudo 68e7f8: OUTPUT«True␤»
moritz tadzik: then change your type constraint to Numeric (or real), or call .Num
nom: my Num $a = (now - now).Num\
p6eval rakudo 68e7f8: OUTPUT«===SORRY!===␤Confused␤at /tmp/8qE7wXJapL:1␤»
moritz nom: my Num $a = (now - now).Num
p6eval rakudo 68e7f8: OUTPUT«Type check failed in assignment to '$a'; expected 'Num' but got 'Rat'␤ in block <anon> at /tmp/SA4fbusqbI:1␤␤»
moritz now *that* I disapprove of
tadzik yeah, that's the next thing :)
moritz let me just say "WTF" :-) 15:21
tadzik I'll just pass %s to sprintf :P
moritz ah, I think I know what's wrong
Duration.Bridge returns a Rat
and other parts of the setting assume (for performance reasons) that .Bridge returns a Num 15:22
dalek ast: abc657a | coke++ | S0 (2 files):
pugs fudge
15:37
tadzik wordpress is absolutely horrible 15:40
anyway, blog post! ttjjss.wordpress.com/2012/04/02/asy...in-perl-6/
constantined > AnyEvent lookalike 15:42
[Coke] supposed trying to learn to speak mandarin while eating lunch is asking for trouble. 16:06
(hard to time the speaking with the eating.) 16:07
gfldex You could talk about food and reach new levels of expressiveness. 16:09
sorear good * #perl6 16:11
[Coke] gfldex: I am still at the beginning, learning to say "I can speak a little Mandarin. Do you speak English?" 16:12
lichtkind its allrigth to make a category name signature symbol? 17:04
moritz Cannot parse: two terms in a row 17:05
lichtkind morit runs perl in his head 17:07
tadzik github.com/blog/1081-instantly-bea...ject-pages ooh 17:08
lichtkind in the index i have behind every identifier a category which it belongs to
like special var or regex metachar
now i look for a name of a cat for all the signature thingies like -> ? ! : and alike
moritz ah. yes. 17:09
timotimo githubcities much?
lichtkind so would be "signature symbol" be good 17:11
moritz if it makes sense for grouping the stuff, yes 17:12
there's no syntactic category that contains ->, : and ! because they are parsed at different points in the program 17:13
lichtkind i know thatswhy i ask :) 17:23
these i did yesterday
masak o/, #perl6 17:33
[Coke] masak: ho. 17:34
moritz \o masak, [Coke] 17:36
[Coke] tries a hot tea in honor of his recent trip to england. 17:38
masak last week, I invested in a medium-sized box of Kusmi Prince Vladimir. best purchase, all categories, in quite a while. 17:45
tadzik hi masak 17:46
masak here, today's autopun, though a weak-ish one: '"What do we want?!" "TIME TRAVEL!" "When do we want it?!" "IRRELEVANT!"' 17:49
felher tadzik++ #blog post :) 17:50
masak (I'm more fond of the zombie joke: '"What do we want?!" "Braaaains" "When do we want it?!" "Braaaains"') 17:51
felher: url?
felher masak: ttjjss.wordpress.com/2012/04/02/asy...in-perl-6/
masak danke.
felher masak: gern geschehen :)
masak tadzik: nice. 17:52
felher -> bus
masak tadzik++
tadzik :) thanks
masak tadzik: ss/how it looks like/how it looks/ 17:53
tadzik I'm wondering what's the best way to re-use as much LWP::Simple as possible
masak: thanks, fixed && faxed
masak :D
masak has been teaching Perl 5 today 17:54
it's nice to be a Perl 5 teacher while also unashamedly saying "I'm one of the developers of Perl 6".
tadzik :) 17:55
TimToady it's perhaps more telling that we allow an Agent of Creative Destruction to call himself a developer. :) 17:56
masak carelessly swings his sledgehammer 17:57
moritz "undeveloper"? 18:01
PerlJam redeveloper 18:03
[Coke] cad. 18:05
masak :P
masak my approach to teaching scalar/list context and sigil variance is based on "yes, this is confusing. it's not just you." 18:10
tadzik :P
masak scalar/list context is weird because it flows inwards in expressions. return values flow outwards, and that's the direction we're used to thinking of things flowing in expressions. 18:11
one very bright student asked "how can I create a sub that differentiates context?". I showed them wantarray(). 18:12
(for a brief moment, I seemed to recall it was named "want()". the perils of being a Perl 6 historian.) 18:13
sorear how much flak do you get for being into perl6? 18:14
masak none, so far.
these are people whose relation to Perl is "do you think Python is worth looking into?" or "so, what's Parrot?" 18:15
PerlJam masak: do you get any interest in Perl 6? or confusion about Perl 5/6
?
masak no, no confusion. a mild but distanced interest.
I told them I kept writing 'say' and expected Perl 5 to have it, because I was used to it in Perl 6. 18:16
PerlJam good I guess
masak s/to have it/to have it by default/
gfldex Why would they have interest when they don't know why they would want to have interest? 18:17
moritz that's why I start all my p5 programs with 'use 5.010;'
PerlJam moritz: me too
masak me too, usually.
moritz gfldex: our marketing effort might not have been totally futile :-)
masak gfldex: the name "Perl 6" (when they're still on 5) seems to indicate by default that they should pay a modicum of attention. 18:19
gfldex Until they believe the propaganda on the interweb that Perl 6 is a stillborn.
and i doubt that will change until folk see real programs written with real perl 6 18:20
gfldex might push Gregorian.pm to github tonight
masak I feel mostly a sense of patient expectation from most people. 18:21
gfldex can we increase earth's rotation a little so i can get rid of leapyears?
masak the ones that are highly negative are mostly a small set of Perl 5 enthustiasts. 18:22
and in a way, I understand them.
moritz gfldex: come on, leap years are harmless, if you compare them to leap seconds, daylight saving times, time zones, changing time zones and the likes 18:23
gfldex moritz: thank you for reminding me of the pain that waits ahead of me :)
moritz gfldex: you're welcome
moritz gfldex: there's a reason I only wrote the Date class in rakudo, and not DateTime 18:25
Ulti dealing with past dates is sometimes annoying too, like the days missing in the Gregorian calendar.. and if you transition to Julian leap years before 1582 18:29
moritz aye 18:30
gfldex i still have no idea how i should handle Samoa 18:32
they kindly changed TZ last year
sorear gfldex: the USA changed their timezone a couple years ago 18:32
sorear you have to handle timezones as general functions, not just offsets 18:33
use a zoneinfo file
gfldex i wonder if they got payed less in december in zamoa given they had only 30 days :)
masak_in_exile hugs feather 18:37
gfldex: from what I remember, people were promised the same pay. 18:38
but the TZ jump in itself is a significant sign of the times. Samoa essentially wanted to be closer to Asia than to the west, because they're doing more business with Asia, and it makes sense to be on the same day as they. 18:39
Ulti < masak> I feel mostly a sense of patient expectation from most people. <--- It's more like imminent euphoria 18:47
Ulti at least from me, I watched a fun talk from Jonathan Worthington on all the magic you can do with multi dispatch with constraints 18:48
masak Ulti: yeah, that talk is very nice :) 18:48
masak Ulti: best of all, that stuff *works* already. in Rakudo as well as Niecza. 18:49
Ulti yeah exactly, that plus regex makes perl6 already something worth using by everyone, ignoring the full spec 18:50
Ulti I should write some modules for parsing bioinformatics data formats and push perl6 on my friends in academia 18:52
sorear Ulti: are you Util? 18:54
Ulti nope 18:55
masak no, they are distinct but confusingly similarly named.
Ulti are we similar even under nick colours? 18:56
sorear are you new here?
Ulti new and a lurker
sorear welcome, Ulti.
Ulti: I figured that might be Util's backup nick
Ulti I dont know enough perl6 to really contribute I'm just so taken with what I've seen I thought it was worth keeping an eye on the action
sorear some people here have creative choices for the nick to use when their main nick is unavailable 18:57
Ulti weirdly Ulti was my backup since Ultima was taken on freenode
fsergot What is NativeCall for? :) 18:59
Ulti fsergot for allowing a perl6 signature to bind to an external c library native function 19:01
gfldex fsergot: to call c-functions from perl6 without much hassle
Ulti snap
fsergot Ulti++ 19:02
gfldex++
thanks! :)
gfldex it can even load the .so for you
Ulti fsergot: www.youtube.com/watch?feature=playe...2wI#t=805s 19:04
wow I did something useful today with my procrastination ;)
fsergot Ulti: thanks! :) 19:05
Ulti also that whole talk is cool
being able to unroll a recursive function to multi dispatch makes it really explicit what you are doing, its almost like PROLOG (dare I say) 19:07
sorear Ulti: have you ever used haskell? 19:14
Ulti sorear: no I haven't 19:18
gfldex that's where perl6 MMD was stolen from 19:19
TimToady actually, probably more Erlang
Ulti orly, I should probably check out Haskell then 19:20
spider-mario yes, you should
TimToady or maybe ML
gfldex they have all stolen from each other :)
Ulti its only recently that I've realised a lot of my perl ends up being functional style, I think Lisp made me hate the concept of functional programming even though its what I have a subconscious preference for 19:21
TimToady yes, Lisp, the most ugly beautiful language :)
jnthn back o/
Ulti and even Lisp I wrote off from using a strange NASA variant called CLIPS
masak Lisp has an obsession with trees :) 19:22
jnthn! \o/
sorear Haskell is a language I know that has a lot of this stuff. 19:23
However, there are no(?) original ideas in Haskell - it's a committee synthesis of the best parts of a baker's dozen similar previous languages, like Miranda and SASL
TimToady perl6: say (((1 => 2) => 3) => 4 => 5 => Nil).perl 19:24
p6eval pugs: OUTPUT«*** No such subroutine: "&Nil"␤ at /tmp/lePaVFTQy7 line 1, column 6-38␤»
..rakudo 68e7f8, niecza v16-17-g648c49b: OUTPUT«1 => 2 => 3 => 4 => 5 => Nil␤»
sorear many of those languages owe a lot to ML
Ulti I think I'd rather learn perl6 if I'm to learn yet another language
spider-mario yes, trees might be what repelled me from lisp
writing trees is fun five minutes
TimToady nobody represents cons trees right with .perl yet
spider-mario I’d rather have some flatness sometimes 19:25
TimToady pugs: say (((1 => 2) => 3) => 4 => 5 => 6).perl 19:26
p6eval pugs: OUTPUT«(((1 => 2) => 3) => (4 => (5 => 6)))␤»
TimToady well, pugs does, but doesn't know Nil
the righthand parens are redundant though 19:27
since => is right associative
masak "it doesn't know Nil" sounds like one of those slang double negation thingies. 19:31
pugs: Jack 19:32
p6eval pugs: OUTPUT«*** No such subroutine: "&Jack"␤ at /tmp/BbM0u48kCH line 1, column 1 - line 2, column 1␤»
masak pugs doesn't know jack either :P
Ulti if only languages would take newick as a tree literal :)
masak Ulti: write a library.
and then, when the time is right, we'll write a slang \o/ 19:33
Ulti :)
someone in my research group already has a recursive perl5 regex to parse newick
Ulti we should probably move it to something sane looking in perl6 19:34
sorear newick? 19:35
Ulti he also said he planned to take a week out to learn perl6 so maybe this would be a fun little project 19:36
masak sorear: en.wikipedia.org/wiki/Newick_format
Ulti sorear: its the maths literal notation for a tree, and used a lot in bioinformatics
its not really a "standard" though
and is abused a lot
Ulti just in case anyone cares adam.sardar.me.uk/?p=583 19:37
masak :P 19:38
dalek kudo/nom: 8ead1e8 | jonathan++ | src/Perl6/Metamodel/BaseType.pm:
Enable parents to handle :excl and :all options for things that compose BaseType. Fixes .^methods on enums bustage.
19:41
Ulti also that pimp my regex picture is too great not to link to 19:42
timotimo supposedly, "LoL @data" or "lol @data" is supposed to unflatten a list? 19:52
masak timotimo: LoL is the type, .lol is the unflattening conversion method 19:53
moritz currently .tree does that
masak maybe it's a listop too, I dunno.
timotimo r: my @data = [1, 2], [3, 4], [5, 6]; say @data.lol; 19:55
p6eval rakudo 68e7f8: OUTPUT«Method 'lol' not found for invocant of class 'Array'␤ in block <anon> at /tmp/4R2gGVazOM:1␤␤»
timotimo supposedly that's the case because that assignment flattens already?
i thought that was kind of "lazily" done?
moritz note that @data.lol would be a noop 19:56
moritz ((1, 2), (3, 4)).lol would return a two-element LoL 19:58
(at least I think so)
dalek ast: ba52bb7 | moritz++ | S12-enums/misc.t:
RT #112202, SomeEnum.^parents
20:06
jnthn ooh, that was fast :)
moritz :-) 20:07
I could say the same about the fix :-)
tadzik jnthn! \o/
jnthn hi tadzik :) 20:09
moritz: Well, I'm in my hotel hiding from pre-thunderstorm humidity and it was LHF... :) 20:10
masak quick! submit more LHF!
jnthn :P
tadzik precompilation causes segfaults!
:D
jnthn That ain't LHF :P
tadzik dang, thought you may not notice ;)
masak .oO( I accidentally didn't notice that the bug I fixed was really hard to fix ) 20:11
fsergot good night #perl6 \o 20:21
masak 'branoc, fsergocie. 20:25
gfldex perl6: enum Day <Mon Tue Wed>; for Day -> $d { say $d }; 21:05
p6eval pugs: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/Gualz1b9nN line 1, column 1-23␤»
..rakudo 8ead1e, niecza v16-17-g648c49b: OUTPUT«Day()␤»
masak gfldex: try 'for Day.enums' 21:07
gfldex perl6: enum Day <Mon Tue Wed>; for Day.enmus -> $d { say $d }; 21:07
p6eval niecza v16-17-g648c49b: OUTPUT«Unhandled exception: Unable to resolve method enmus in class Day␤ at /tmp/zz11BBNG8Z line 1 (mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3839 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3840 (module-CORE @ 65) ␤ at /home/…
..pugs: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/K9RzYvOzbU line 1, column 1-23␤»
..rakudo 8ead1e: OUTPUT«Method 'enmus' not found for invocant of class 'Day'␤ in block <anon> at /tmp/z2Rjp1cYGv:1␤␤»
gfldex perl6: enum Day <Mon Tue Wed>; for Day.enums -> $d { say $d }; 21:08
p6eval pugs: OUTPUT«*** No such subroutine: "&enum"␤ at /tmp/hv8S0CXbyU line 1, column 1-23␤»
..rakudo 8ead1e, niecza v16-17-g648c49b: OUTPUT«"Mon" => 0␤"Tue" => 1␤"Wed" => 2␤»
gfldex not overly DWIM
but it will do :)
masak gfldex: fwiw, I don't agree with your intuition that the Day enum type object should listify to all its enums. 21:10
it doesn't feel do-what-I-mean to me.
jnthn Cute today, to magical tomorrow. 21:12
*too 21:13
gfldex my intuition might be fooled by the fact that I give the compiler a list but what the enum gets is a hash
masak no, that in itself is usually fine. 21:14
gfldex if i now go and ask the list back from the enum is is indeed allowed to be confused
masak you can for loop over a hash.
but the enum type object is just that, a type object.
it doesn't expand or explode into its constituent parts. 21:15
PerlJam Is Day.enums guaranteed to give them in a specific order?
masak much like a class type object doesn't exapnd into all its instances :)
PerlJam masak: so ... there's a Class.instances() that'll give me all of them? :)
masak not sure that's such a good idea :) 21:16
r: enum Day <Mon Tue Wed>; say Day.enums.^name
p6eval rakudo 8ead1e: OUTPUT«Hash␤»
masak PerlJam: does that answer your question?
gfldex are enums and their hashes immutable? 21:17
masak yeah. 21:18
they're really a kind of constants.
gfldex can i MONKEY_TYPE them? (that would be crazy :) 21:20
PerlJam masak: Aye. It was curious that no one pointed that out though.
jnthn Well, they're backed by an EnumHOW so you can go monkeying at the meta-level.
But if you do so after CHECK time then on your own head be it :) 21:21
gfldex that could cause some realy cool bug reports :->
masak I'd much rather see switch statements be optimized to jump tables :)
jnthn gfldex: If you submit a bug report saying "I did stupid things in meta-space and X bad thing happened" then it's probably just gonna be rejected. :) 21:22
masak: Yes, optimization happens after CHECK time. Thus my comment on "be careful" :) 21:23
gfldex backs off 21:24
jnthn :)
masak tyatpi: greetings. 21:28
flussence so, how much of this does "use v6;" get you? :) www.perl.com/pub/2012/04/perlunicoo...amble.html 21:34
masak most of it, I think. 21:36
tadzik good nigh #perl6 21:40
masak nigh, o tadziku. 21:41
masak 'night, #perl6 22:05
lichtkind masak: still there? 22:12