»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
dalek ast: 77b8dc4 | (Elizabeth Mattijsen)++ | S32-list/roll.t:
Add tests for sanity of .roll on Enums
00:04
FROGGS morning 07:30
moritz \o FROGGS, * 07:58
sergot morning #perl6! o/ 08:55
TimToady good afternoon from beijing 08:57
arnsholt o/ 09:14
masak \o 09:21
nwc10 good UFT ambigutity
nwc10 gah 09:22
good UGT ambiguity, #perl6
corecatcher Good Morning from hanover 09:28
jnthn UFT? I...won't guess. :P 09:29
TimToady: Hope the air is more breatheable than when I was last there...
TimToady well, we can see other buildings :) 09:30
TimToady and we have masks for the days we can't :) 09:30
nwc10 jnthn: it was an innocent typo. Off by one keyboard error 09:31
corecatcher get yourself a pure air resp. mask
masak nwc10: I hate it when my Unified Field Theories are ambiguous. so annoying! 09:37
moritz aren't they all, at least by a gauge term? :-) 09:39
masak I'm not savvy enough to gauge that. :) 09:40
moritz isn't gaugy enough to savy that 09:48
masak .oO( the gaugy agenda ) 09:51
Ven r: say sort {$^b leg $^a}, (3, 20, 100).pick(*) 10:48
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«3 20 100␤»
Ven r: say sort ->$a,$b{$b leg $a}, (3, 20, 100).pick(*) 10:49
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«3 20 100␤»
Ven r: say sort {$^a leg $^b}, (3, 20, 100).pick(*)
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«100 20 3␤»
Ven Yeah, that's really surprising ..
jnthn Why? You used a string comparison operator. 10:50
jnthn leg is string (consistent with le, ge, eq, ne...), <=> is numeric (consistent with <=, >=, ==, !=), and cmp is "figure something out somehow" :) 10:52
Ven jnthn: no, I mean $^ lexicographic ordering 10:56
ttjjss.wordpress.com/2010/11/21/per...r-parsing/ < neat idea
jnthn Ven: Oh...yeah, that's the point of them :) 10:58
Ven r: my @x; say ( @x[*-1] :exists).perl 11:42
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«(Bool::False,)␤»
Ven r: my @x; say so ( @x[*-1] :exists)
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«True␤»
Ven is going through #perl6 archives for some reasons 11:43
r: my @a will begin { say $_.WHAT };
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«(Mu)␤»
Ven r: my @x; say any True, ( @x[*-1] :exists).perl 11:53
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«any(True, (Bool::False,))␤»
Ven r: my @x; say any True, ( @x[*-1] :exists)
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«any(True, False)␤»
Ven r: my @x; say so any ( @x[*-1] :exists) == True
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«True␤»
Ven uh?
r: my @x; say so (any ( @x[*-1] :exists) == True)
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«True␤»
Ven oh yeah, I'd need a junction to list 11:55
r: my @x; say so (@x[*-1] :exists).grep True
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> my @x; say so (@x[*-1] :exists).grep ⏏True␤ expecting any of:␤ …»
Ven r: my @x; say so (@x[*-1] :exists).grep(True)
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«True␤»
Ven r: my @x; say (@x[*-1] :exists).grep(True).perl
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«(Bool::False,).list␤»
Ven r: say (False,).grep(True).perl; 11:56
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«(Bool::False,).list␤»
jnthn say so any ( @x[*-1] :exists) == True # pasres as say so any( ( @x[*-1] :exists) == True )
Ven I'm pretty surprised.
why does grepping True in a list of False gives that false ?
r: say (False,).grep(* == True).perl;
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«().list␤»
Ven r: say False ~~ True 11:57
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«Potential difficulties:␤ Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead␤ at /tmp/tmpfile:1␤ ------> say False ~~⏏ …»
jnthn It smartmatches, and...what you just saw. :)
Ven that's pretty surprising, too...
Ven I'll take it that smartmatching on False always gives false 11:58
okay, so
r: my @x; say so (@x[*-1]:exists).grep(* == True)
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«False␤» 11:59
Ven am I missing any obvious shortcut to know if *one* elem exists?
jnthn Yeah, but that's hardly idiomatic.
Ven Well, obviously
jnthn r: my @x; say so any(@x[*-1]:exists)
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«False␤»
Ven oh, yeah, any just does the job
Ven reinvents any, but in a less powerful manner. 12:00
jnthn And if you're in a boolean context then the so is implicit
Ven yeah, that's just to print.
is any optimized for boolean context ?
jnthn *nod*
Ven (stopping after the first True in bool context) 12:01
jnthn yeah; see github.com/rakudo/rakudo/blob/nom/...ion.pm#L10
Ven jnthn++ # yay ! 12:02
FROGGS jnthn: I have problems to patch perl6_ops.c like in irclog.perlgeek.de/perl6/2014-03-27#i_8503522 12:26
jnthn: because MVMP6opaque_real_data is about the MVMP6opaqueBody, but do we have a MVMP6opaqueBody there? 12:27
jnthn FROGGS: No; you can get it with OBJECT_BODY 12:34
FROGGS jnthn: I know, but then I have the replaced body, right?
and what do I do with it? how do I access ->items? 12:35
jnthn ah, I see what you mena. 12:37
FROGGS gist.github.com/FROGGS/84550938a264ffd8b457
jnthn Probably need to get the struct for P6List to be a struct of its body. 12:38
FROGGS explodes too with "this type does not support elems"
jnthn And then write a macro to make this convenient.
FROGGS oha
FROGGS okay, I give it a try 12:38
saywerx++ # "like really fucking sucks" 12:39
nwc10 like the NOTWORK :-/
(for me. I'm on borrowed 4G)
FROGGS nwc10: i have GSM 12:40
>.<
like 9600 baud or so
[Coke] waves blearily from $dayjob 12:41
BooK so I decided I'm going to start learning Perl 6, by writing a module 12:49
where should I start
BinGOs Acme::Perl6::Is::My::Bitch 12:50
[Coke] no. :P
FROGGS BooK: choose a module with already existing deps or with just a few deps you'd have to write
tadzik hahaha
BooK FROGGS: I was thinking about porting my own Git::Repository from Perl 5 12:51
arnsholt Oooh, that sounds neat
jnthn That could be interesting :)
arnsholt What kind of stuff does that module depend on?
FROGGS deps.cpantesters.org/?module=Git%3A...erl=latest
BooK not much I think 12:52
FROGGS all of the deps are built in into Perl 6 I think
BooK as I hoped :-)
arnsholt Yeah, looking at FROGGS' link, mostly file things, looks like
There's File::Find, I guess, but there's a six version of that
nwc10 finally, I have an IP again 12:53
FROGGS BooK: the next step would be to sketch the API I guess, and then to play around how that might be written nicely 12:53
BooK I wasn't aware that I was using File::Find :-)
FROGGS: the point of porting is that there's already an API 12:54
FROGGS BooK: okay, next step: done
:o)
at least, the first half
BooK this is really easy
up until now, Perl 6 is pretty cool ;-) 12:55
arnsholt BooK: Oh, could very well be. I'm just going off that cpantesters link =)
[Coke] something from the mojo suite? ;) 12:56
BooK I suppose my main question was more about where to find docs.
doc.perl6.org/ is the probable answer
arnsholt Yeah, or asking around here. Docs is something of a weak spot, sadly 12:57
BooK We'll see. I might be distracted by some shiny thing at any point, anyway. 12:58
sjn \o 12:59
perl 6 talk in Oslo (at the Uni) in about 2 hours \o/ 13:00
come one, come all :)
nwc10 isn't that a bit late notice to book flights? :-/ 13:01
is it being recorded? 13:02
tadzik it's Damian I think, so I doubt it :/ 13:10
cosimo going there in an hour or so :) 13:10
Ven r: class A { has $.foo; }; my @l = (Any, A.new(:foo<hey>); ); .?foo.say for @l; 13:12
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«Nil␤hey␤»
Ven r: class A { has $.foo; }; my @l = (Any, A.new(:foo<hey>); ); .foo.say for @l;
camelia rakudo-moar 3699aa: OUTPUT«No such method 'foo' for invocant of type 'Any'␤ in method reify at src/gen/m-CORE.setting:7563␤ in method reify at src/gen/m-CORE.setting:7426␤ in method gimme at src/gen/m-CORE.setting:7878␤ in method sink at src/gen/m-CORE.setting:8281␤ i…»
..rakudo-jvm 3699aa: OUTPUT«No such method 'foo' for invocant of type 'Any'␤ in method reify at gen/jvm/CORE.setting:7506␤ in method reify at gen/jvm/CORE.setting:7369␤ in method gimme at gen/jvm/CORE.setting:7821␤ in method sink at gen/jvm/CORE.setting:8224␤ in block …»
..rakudo-parrot 3699aa: OUTPUT«No such method 'foo' for invocant of type 'Any'␤ in block at /tmp/tmpfile:1␤␤»
Ven Perl6++
Although I don't remember reading about it :/. Just found it in Junction.pm
m: for ^1e5 { []; }; say "alive"; 13:19
camelia rakudo-moar 3699aa: OUTPUT«(timeout)»
Ven r: role A[::T]; role B[::T]; role C[::T] does A[T] does B[T]; say "alive"; 13:20
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Too late for semicolon form of role definition␤at /tmp/tmpfile:1␤------> role A[::T]; role B[::T]; ⏏role C[::T] does A[T] does…» 13:21
Ven r: role A[::T] {}; role B[::T] {}; role C[::T] does A[T] does B[T] {}; say "alive";
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«alive␤»
Ven r: raw.githubusercontent.com/Nami-Doc...opedia.pm6 13:21
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> https⏏://raw.githubusercontent.com/Nami-Doc/Ty␤ expecting any of:␤ …»
Ven r: gist.github.com/Nami-Doc/c6161cc3b29a1a417b9f 13:22
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol T␤»
Ven bu-but
r: role A[::T] {}; role B[::T] {}; role C[::T] does A[T] does B[T] {}; role D[::T] does C[T] {}; say "alive";
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«alive␤» 13:23
Ven r: role A[::T] {}; role B[::T] {}; role C[::T] does A[T] does B[T] {}; role D[::T] does C[T] does X[T] {}; role X[::T] {}; say "alive";
camelia rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Cannot find method 'parameterize'␤»
..rakudo-parrot 3699aa, rakudo-jvm 3699aa: OUTPUT«===SORRY!===␤No such method 'parameterize' for invocant of type 'Perl6::Metamodel::PackageHOW'␤»
Ven r: role A[::T] {}; role B[::T] {}; role C[::T] does A[T] does B[T] {}; role D[::T] {}; role E[::T] does C[T] does D[T] {}; say "alive"; 13:24
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«alive␤»
Ven I don't understand why my gist won't do. 13:25
r: role Functor[::T] { }; role Apply[::T] { }; role Semigroup[::T] { }; Comonad[::T] does Functor[T] { }; role Applicative[::T] does Functor[T] does Apply[T] { }; role Monoid[::T] does Semigroup[T] { }; role Category[::T] { }; say "alive";
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol T␤» 13:26
Ven r: role Functor[::T] { }; role Apply[::T] { }; role Semigroup[::T] { }; Comonad[::T] does Functor[T] { }; role Applicative[::T] { }; role Monoid[::T] does Semigroup[T] { }; role Category[::T] { }; say "alive";
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol T␤»
Ven r: role Functor[::T] { }; role Apply[::T] { }; role Semigroup[::T] { }; Comonad[::T] does Functor[T] { }; role Applicative[::T] { }; say "alive"; 13:28
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol T␤»
Ven oh my god, I'm so damn blind.
r: role Functor[::T] { }; role Apply[::T] { }; role Semigroup[::T] { }; role Comonad[::T] does Functor[T] { }; role Applicative[::T] { }; say "alive"; 13:29
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«alive␤»
Ulti o___O 13:29
Ven and so ... 13:30
r: gist.github.com/Nami-Doc/c6161cc3b29a1a417b9f
camelia rakudo-parrot 3699aa: OUTPUT«Could not instantiate role 'ArrowLoop':␤Not enough positional parameters passed; got 1 but expected 2␤current instr.: 'specialize' pc 22132 (src/gen/perl6-metamodel.pir:10426) (gen/parrot/Metamodel.nqp:2102)␤called from Sub '' pc 27863 (src/gen/per…»
..rakudo-jvm 3699aa: OUTPUT«Unhandled exception: Could not instantiate role 'ArrowLoop':␤Not enough positional parameters passed; got 1 but expected 2␤ in specialize (gen/jvm/Metamodel.nqp:2025)␤ in (gen/jvm/Metamodel.nqp:2465)␤ in (gen/jvm/Metamodel.nqp:2461)␤ in comp…»
..rakudo-moar 3699aa: OUTPUT«Unhandled exception: Could not instantiate role 'ArrowLoop':␤Not enough positional parameters passed; got 1 but expected 2␤ at <unknown>:1 (/home/p6eval/rakudo-inst-1/languages/nqp/lib/Perl6/Metamodel.moarvm:specialize:4294967295)␤ from src/gen/m-…»
Ven wait, what ? 13:31
r: role Category[::T] { }; role Arrow[::T] does Category[T] { }; role ArrowLoop[::T] does Arrow[T] { }; say "alive"; 13:32
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«alive␤»
Ulti Ven can you give some commentary on what you're upto? 13:32
for us lesser mortals ;P 13:33
Ven r: I'm trying to get role for that hierarchy www.haskell.org/wikiupload/d/df/Typ...iagram.png
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unable to parse role definition␤at /tmp/tmpfile:1␤------> I'm trying to get role for ⏏that hierarchy www.haskell.org/wi…»
Ven Ulti: ^^
Ulti okedoke :S 13:34
Ven but rakudo gives me an error on the last line and I can't quite understand why. 13:35
PerlJam Ven: looks like a bug to me. 13:40
Ven: are you getting "Could not instantiate role 'ArrowLoop'" ?
Ven PerlJam: that's what camelio seems to tell me 13:41
PerlJam: that's what camelia seems to tell me # whoops 13:42
PerlJam Ven: put any statement after that last role. Just a 1; will do. 13:42
Ven r: gist.github.com/Nami-Doc/c6161cc3b29a1a417b9f
camelia ( no output ) 13:43
Ven Oh, alright...
Ulti try a blank line...
Ven r: role A[::T] {}
camelia rakudo-parrot 3699aa: OUTPUT«Could not instantiate role 'A':␤Not enough positional parameters passed; got 1 but expected 2␤current instr.: 'specialize' pc 22132 (src/gen/perl6-metamodel.pir:10426) (gen/parrot/Metamodel.nqp:2102)␤called from Sub '' pc 27863 (src/gen/perl6-metam…»
..rakudo-moar 3699aa: OUTPUT«Unhandled exception: Could not instantiate role 'A':␤Not enough positional parameters passed; got 1 but expected 2␤ at <unknown>:1 (/home/p6eval/rakudo-inst-1/languages/nqp/lib/Perl6/Metamodel.moarvm:specialize:4294967295)␤ from src/gen/m-Metamode…»
..rakudo-jvm 3699aa: OUTPUT«Unhandled exception: Could not instantiate role 'A':␤Not enough positional parameters passed; got 1 but expected 2␤ in specialize (gen/jvm/Metamodel.nqp:2025)␤ in (gen/jvm/Metamodel.nqp:2465)␤ in (gen/jvm/Metamodel.nqp:2461)␤ in compose (gen…»
Ven r: role A[::T] {}; 13:44
camelia rakudo-parrot 3699aa: OUTPUT«Could not instantiate role 'A':␤Not enough positional parameters passed; got 1 but expected 2␤current instr.: 'specialize' pc 22132 (src/gen/perl6-metamodel.pir:10426) (gen/parrot/Metamodel.nqp:2102)␤called from Sub '' pc 27863 (src/gen/perl6-metam…»
..rakudo-moar 3699aa: OUTPUT«Unhandled exception: Could not instantiate role 'A':␤Not enough positional parameters passed; got 1 but expected 2␤ at <unknown>:1 (/home/p6eval/rakudo-inst-1/languages/nqp/lib/Perl6/Metamodel.moarvm:specialize:4294967295)␤ from src/gen/m-Metamode…»
..rakudo-jvm 3699aa: OUTPUT«Unhandled exception: Could not instantiate role 'A':␤Not enough positional parameters passed; got 1 but expected 2␤ in specialize (gen/jvm/Metamodel.nqp:2025)␤ in (gen/jvm/Metamodel.nqp:2465)␤ in (gen/jvm/Metamodel.nqp:2461)␤ in compose (gen…»
Ven Just trying to "display" it
PerlJam At a guess, it's running afoul of trying to return the value of the last statement executed and for some reason rakudo thinks that means pun the role and instantiate it. 13:45
Ven Definitely
Ven Only thing that's pretty surprising is this 13:51
r: role A[::T] {}; does B[::T] does A[T]; 1;
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol T␤»
Ven I'd expect the "does does" to error or something 13:52
JimmyZ std: role A[::T] {}; does B[::T] does A[T]; 1;
camelia std 09dda5b: OUTPUT«===SORRY!===␤Undeclared names:␤ 'B' used at line 1␤ 'T' used at line 1␤Undeclared routine:␤ 'does' used at line 1␤Check failed␤FAILED 00:01 130m␤»
JimmyZ n: role A[::T] {}; does B[::T] does A[T]; 1;
camelia niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤GLOBAL::T does not name any package at /tmp/3REaJTHwMV line 1:␤------> role A[::T⏏] {}; does B[::T] does A[T]; 1;␤␤A type must be provided at /tmp/3REaJTHwMV line 1:␤------> role A[…»
PerlJam Ven: I dunno. you can say «$some-val does Foo;» and you used to be able to say «class Alpha { does Foo; ... }» maybe it's some sort of left-over syntax 13:58
(I actually don't know if the «also» operator is implemented or not, so maybe you can still do the latter) 13:59
Ven PerlJam: yeah, `blah does Foo` makes sense if `blah` exists 14:00
r: role B {}; class A { also does B }; 14:01
camelia ( no output )
Ven r: class A { if True { method foo() { say "alive"; } } }; A.new.foo 14:02
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«alive␤»
Ven r: class A { if False { method foo() { say "alive"; } } }; A.new.foo 14:03
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«alive␤»
Ven That
's not new under the sun, although I'm not that fond of it, but, going on ...
r: class A { if False { my $a = 5; method foo() { say "alive" ~ $a; } } }; A.new.foo
camelia rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«use of uninitialized value of type Any in string context␤alive␤»
..rakudo-parrot 3699aa: OUTPUT«use of uninitialized value of type Any in string context in method foo at /tmp/tmpfile:1␤␤alive␤»
Ven r: class A { if False { my $a = 5; method foo() { say "alive" ~ $a; } } else { my $a = 6; } }; A.new.foo
camelia rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«use of uninitialized value of type Any in string context␤alive␤»
..rakudo-parrot 3699aa: OUTPUT«use of uninitialized value of type Any in string context in method foo at /tmp/tmpfile:1␤␤alive␤»
PerlJam Those are for future Perl 6 obfuscated code contests :) 14:04
Ven masak already blogged about this, I believe ... 14:04
masak you're referring to the fourth bullet point of strangelyconsistent.org/blog/lexpad...eed-fixups 14:11
Ven Yep. 14:13
Ven I'd really like this `class { sub { method foo {} } }` stuff getting fixed, looks bad from outside. But we already talked about that. 14:15
masak "getting fixed"? is it still your perception that something is broken in that area?
to me, it's a complete DIHWIDT. 14:16
aka "with great hammers comes great thumb-hurt... if you intentionally aim for the thumb".
Ven masak: to me, it just shows the underlying problem. It's one example of the issue
masak "the issue"?
Ven I shouldn't be allowed to shoot myself in the foot
PerlJam Ven: Perl is not about that. 14:17
xfix This is impossible.
masak Ven: we mostly don't roll like that.
Ven: Perl 6 gives you enough rope to shoot yourself in the foot.
Ven masak: not that way.
tadzik I have no idea what you mean :D
[Coke] masak: perhaps "to hang yourself by your ankle"?
tadzik what do you want it to do?
[Coke] (though I know you did that on porpoise.)
xfix Perhaps it would be harder to shoot yourself in the foot, but when you do, it would hurt more. 14:18
masak m: class C { method foo { my $x = 42; method bar { say $x } } }; C.bar
camelia rakudo-moar 3699aa: OUTPUT«(Any)␤»
masak tadzik: we're talking about ^
Ven in some languages, I think about ruby, class bodies are executable, so you can actually use `if` to define methods conditionally
tadzik masak: ah
oh please no
let's not have this kind of stuff
masak "this kind of stuff"?
PerlJam heh
tadzik conditional methods
Ven I'm not judging it. I'm saying, it works in Ruby. It parses in perl6, but doesn't do what you think it does. 14:19
PerlJam we already have conditional methods ... just use EVAL
tadzik I mean, you can do that if you really want to
but, no
masak tadzik: right.
FROGGS we have multis, that is pretty much one would need, no? 14:19
(and roles) 14:20
masak Ven: if it doesn't do what you think it does, it's because you haven't grok'd the underlying model yet.
Ven Something that can "Never Do What You Mean" should error out. Not warning (like certain languages like to do ... Only warn on stuff that can never be right ...)
PerlJam Ven: There's always at least 2 choices. Perl 6 choose to change what you think
masak Ven: we don't arbitrarily disallow corner cases we don't like.
Ven: we tried doing that a few times, and we were always surprised by people's use cases.
Ven: we've *had* this discussion at least once.
Ven We did.
masak good. I refer you to the backlog. :) 14:21
Ven and that conversation ended with a DIHWIDT.
masak right.
Ven: to make it clear, you're not even fighting language design here, you're fighting community design.
Ven I'm fine with having that opinion different, really. 14:22
To me, that's something that can never mean what you think it means, and that's why I think it's bad
PerlJam Ven: as an aside, once Perl 6 is fully formed, you should be able to write a module that can "correct" these things 14:23
Ven Yes, we talked about that too. "use strict"-like. Not really what I like
moritz Ven: maybe you'd be more at home in a statically, strictly checked language? 14:24
tadzik yeah
moritz like ocaml, haskell, the like?
Ven I am mostly doing haskell, so yeah.
jnthn Ven: If you realize that declarations are compile time, and that method is a declaration, things get a lot less surprising.
Ven I really don't like ocaml, but that's a matter of taste :). 14:25
PerlJam
.oO( tastes like chicken? )
moritz hasn't really tried it, just meant it as an example for a strongly checked language
jnthn
.oO( tastes like camel? )
Ven (actually, I mostly do Scala because I'm not start enough :p) 14:26
masak jnthn: yeah, I suspect this is a matter of Ven's mind not having converged fully with Perl 6's parsing/runtime model. 14:27
Ven No, really not. I understand what's runtime and what's compile-time. Not my point. 14:28
masak I'm sure you understand the distinction, yes. 14:29
Ven My point is, if it doesn't mean what it looks like it means, why doesn't it error out ?
masak because we don't believe in punishing programmers for using the language creatively.
Ven "use uncreative" 14:30
masak we believe if we did that, we'd have a poorer language for it.
jnthn Ven: If you know the language you're reading, it doesn't look like it means something else :P
Ven I'd like that claim to be backed by an example of a case where it's useful, obviously
Ven it's like, in scala, you can't pattern match on type members (because the JVM does type erasure). It never does what you think it means. Do you think it'd refuse to compile ? no, it merely prints a warning 14:31
PerlJam Ven: Perl can't predict what's in people's heads.
Ven Can't it ;)
jnthn Ven: Useful if you want to group together various methods that will share some lexical state, without leaking it to other methods.
Ven m: class C { method foo { my $x = 42; method bar { say $x } } }; C.bar 14:32
camelia rakudo-moar 3699aa: OUTPUT«(Any)␤»
Ven jnthn: ^^ that doesn't seem broken to you ?
jnthn Ven: No.
moritz m: class C { method foo { my $x = 42; method bar { say $x } } }; C.foo; C.bar
camelia rakudo-moar 3699aa: OUTPUT«42␤»
jnthn Ven: It's doing exactly what I'd expect if you put a sub in a sub and call the inner one first. 14:33
PerlJam Ven: sounds like a P6lint is what you want (But don't *really* want because it's a tool outside of the normal compile)
FROGGS jnthn: I think I've fixed it O.o
PerlJam er, compiler
jnthn FROGGS: ooh! :)
Ven r: sub a { sub b { say 'alive'; } }; b(); 14:34
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Undeclared routine:␤ b used at line 1␤␤»
Ven Because subs are lexically scoped. Which makes it sane. 14:35
You can't have access to b without running through a first.
moritz you can do the same with subs
m: sub a { our sub b { say 'alive' } }; b()
camelia rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/MmA26fjPr_␤Undeclared routine:␤ b used at line 1␤␤»
jnthn sub a { our sub b { say 'alive'; } }; GLOBAL::b();
r: ub a { our sub b { say 'alive'; } }; GLOBAL::b();
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Undeclared routines:␤ a used at line 1␤ ub used at line 1. Did you mean 'uc'?␤␤»
moritz m: module Blub; sub a { our sub b { say 'alive' } }; Blubb::b
camelia rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Could not find symbol '&b'␤»
moritz m: module Blub; sub a { our sub b { say 'alive' } }; Blub::b 14:36
camelia rakudo-moar 3699aa: OUTPUT«alive␤»
jnthn Right.
moritz it helps to not misspell the package name :-)
jnthn :)
Ven *doesn't like it* 14:37
FROGGS jnthn: one good thing is that I understand the problem, so I'll be able to write a good commit message this time :o)
jnthn m: class C { method logging($on) { method log($msg) { say $msg if $on } } }; C.log('omg'); C.logging(1); C.log('wtf'); 14:38
camelia rakudo-moar 3699aa: OUTPUT«wtf␤»
jnthn FROGGS: yay 14:39
Ven that's a nice example.
PerlJam nice enough that we won't have t his discussion again? ;) 14:40
Ven I guess it'd probably do it with a `has` usually, though, but it's a good examp;e
PerlJam: am I that unpleasant to talk with :p ?
jnthn You can do it with a has too, but that doesn't cover you if you wanted to have a way to disable the logging accross all instances, for example :) 14:41
PerlJam Ven: nah, it's just tiresome to rehash the same topic with neither side budging :)
Ven then a `our`
PerlJam: I'm budging !
FROGGS nwc10++ # lightning talk in german *g* 14:42
Ven I asked for an example, jnthn gave me a cool example, I'm not 100% convinced **with that example** but it means it can be useful. So yeah, I won't rehash that topic
jnthn Ven: Right, you could. My point is just that my way let me restrict state to a much narrower scope, which tends to be a positive thing. 14:43
Ven so, it was nice having that discussion, cause I budged :p.
jnthn FROGGS: Nice! :)
FROGGS: Good job it wasn't me, I learned all my German from food menus and Rammstein... :P 14:44
FROGGS >.<
Ven "we're all living in america" # trust me I speak german
FROGGS menus++, rammstein--
jnthn FROGGS: We're all teenagers once. :) 14:45
FROGGS I was born as an adult :o)
Ven as somebody in class right now, I concur :D 14:46
(or is it "someome" ? I can't english :/)
FROGGS bbl, need a charger...
[Coke] jnthn: what, no Eisbrecher? 14:46
... dammit, now that's stuck in my head.
jnthn [Coke]: 'fraid not...is it worth checking out? :) 14:47
moritz Ven: afaict "someone" and "somebody" are interchangable
jnthn really should get on wiht $dayjob slides, so later on he can get on with parallel GC moarbug... 14:48
Ven moritz++ # ty 14:50
masak someone should write up jnthn++'s example (and the discussion that preceded it) as a blog post. 14:52
Ven Yes, definitely. Even better than backlog ;o) 14:54
masak ok, #perl6. getting on a plane to .cn now -- for the next few weeks, I'll have a time zone of GMT+8. 14:57
I think I'll be pretty present, maybe even active, on #perl6.
moritz masak: visiting TimToady in Beijing? :-) 14:58
masak no, we'll be in different cities :) 14:58
PerlJam masak: have a good trip 14:59
japhb Have a good trip, masak! 15:01
yoleaux 13 Mar 2014 07:54Z <jnthn> japhb: the time related bits, debugging the parallel GC (yay fun :P) and then a whole bunch of safety/hardening.
jnthn Dammit, 2 weeks after I wrote that I'm still working on all of those... 15:02
dalek ast: 8f2dcae | moritz++ | S32-str/uc.t:
fudge case folding test involving ß

there is already a ticket open for that (RT #121377)
15:21
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121377
moritz where can I find some information about Unicode case folding of ß for rt.perl.org/Ticket/Display.html?id=121377 ? 15:24
dalek ast: 32c006f | moritz++ | S32-str/tclc.t:
moar-fudge another Unicode bug
15:26
Ulti regarding letting programmers do what they want I still think there should probably be some sort of explosion when I keep attempting to do something dumb like my $k = 3; say 1,$k...10; or even where $k is a literal 3 and its super obvious it will always be a bad plan 15:34
Ulti is super dumb when it comes to Perl6
jnthn m: my $k = 3; say 1,$k...10;
camelia rakudo-moar 3699aa: OUTPUT«(timeout)» 15:35
moritz Ulti: the problem with this one is that series are much more complex than they look a the surface 15:35
Ven how old is moarvm ?
jnthn Young. :)
Ulti moritz: yeah I agree it could be something there is no ability to statically look at 15:36
jnthn Ulti: The other thing is that if we put safety checks in all over, they slow down all the correct code. :)
Ven "when did Charmelogne die ?" "Between 150 before J.C and 2011". I didn't get any point at that question, sadly.
Ulti but its problematic that its very easy to accidentally do something that just eats all memory before exiting
jnthn Ven: It's less than a year since the project became public knowledge. 15:36
Ulti what I would prefer is if I could say the last number is an upper bound with an adverb or something 15:37
Ven jnthn++: really impressive work then :)
jnthn Ulti: Just write an inequality at the end. With * closure notation it's less code than an adverb would be.
Ulti k
Ven m: my $k = 3; say 1,$k... * > 10;
camelia rakudo-moar 3699aa: OUTPUT«1 3 5 7 9 11␤»
jnthn Ven: It was developed privately for a bit before that. :)
Ven m: my $k = 3; say 1,$k...^ * > 10; # probably
camelia rakudo-moar 3699aa: OUTPUT«1 3 5 7 9␤» 15:38
Ven jnthn: yeah, I got that part -- doesn't make it less good
I'd love to get niecza back up if I had any knowledge of the CLR
jnthn Yeah, it's come quite a long way in a short time. But the best is yet to come. :)
Ven It's all about time 15:40
Ulti maybe I can make a module for Icon syntax for sequences, which is what I really want anyway ;P
@list = 1 to 10 by 3;
moritz Ulti: the ... is implemented in the setting, all in bog-standard Perl 6 :-) 15:41
Ulti I'll take a look and play then 15:41
timotimo the only special thing about it is that the grammar emits a call to SEQUENCE when it finds a ...
you *should* be able to lexically override SEQUENCE, though 15:42
Ulti I made a gross Perl5 sub for doing it previously
Ven r: class MyRange { has $.from; has $.to; has $.step = 1; method list { loop (my int $i = $.from; $i < $.to; $i += $.step;) $i; } }; say MyRange(:from(1), :to(5)).list.perl; 15:43
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Missing block␤at /tmp/tmpfile:1␤------> int $i = $.from; $i < $.to; $i += $.step⏏;) $i; } }; say MyRange(:from(1), :to(5)…»
Ven r: class MyRange { has $.from; has $.to; has $.step = 1; method list { loop (my $i = $.from; $i < $.to; $i += $.step) $i; } }; say MyRange(:from(1), :to(5)).list.perl;
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Missing block␤at /tmp/tmpfile:1␤------> y $i = $.from; $i < $.to; $i += $.step) ⏏$i; } }; say MyRange(:from(1), :to(5)).l…»
jnthn m: sub infix:<to>($a, $b) { $a..$b }; sub infix:<by>(Range $a, $b) { $a.min, $a.min + $b ...^ * > $a.max }; say 1 to 10 by 3
camelia rakudo-moar 3699aa: OUTPUT«1 4 7 10␤»
jnthn Ulti: Have a happy :)
Ven iss trying to do complicated stuff for no reason 15:44
jnthn It's always easy to do something complicated... :)
moritz Ven: you need curlies after the loop head
Ven yeah I understood that
not the least bit as elegant tho.
Ulti \o/ 15:45
moritz jnthn++
Ulti now it just needs to be core..... >:3
Ven jnthn++
Ulti jnthn++
Ulti someone needs to implement karma, my P6 emobot is maybe a good candidate 15:46
that really is cool
moritz Ulti: I can give you a dump of the IRC logs if you want to retroactively parse the karma
Ven No please :(
jnthn
.oO( Emobot? When'll he cut a release... )
Ven Any form of "karma" or "points" often leads to people just fishing for them :( 15:47
moritz Ulti: also, #git uses not just ++ for karma, but also "thanks you", "thanks", "thx" etc.
Ulti ? emobot lives inside Text::Emotion which is already released ;P
jnthn Ven-- # complaining :P
Ven *sob*
moritz which I find a really nice idea
Ven Ulti: I think it was a joke with "emo"
Ulti moritz: yeah that's a good plan
jnthn aye :)
Ulti also <<nick>> awesome!
jnthn Ulti: I should take a look at it...
Ulti only if you like looking at bad Perl6 code 15:48
jnthn Ulti: I did an Rx example in my .Net course recently where I was doing sentiment analysis on the Twitter live stream.
Ulti the score is also trivial, needs parts of speech to be better though which is hard
Ven Perl.rx
Ulti jnthn: cool, the data I use is based on Tweets
jnthn Ulti: And thought it'd be cool to do a Perl 6 port of that uses supplies :)
Ulti so the vocab has LULZ and stuff
moritz please include irony detection 15:49
that would be so great!
jnthn moritz: That'll be easy!
Ulti jnthn I'd like to see it, both because I'm interested in that topic and I want to see more examples of using supplies
jnthn Ulti: Yeah. The funniest thing that has happened so far is one guy hacked my demo by tweeting something on the topic I was currently watching/analysing :)
Ulti :D
jnthn And since it was the live stream it showed up on the projector within seconds. :D
Ulti lol 15:50
trolling finds a way like life
maybe I should do all my lecturing from a shared google doc
jnthn I pointed out after the talk that there's 3 levels of "bad idea": doing a live demo, doing a live demo involving a network, and doing a live demo involving a network and data you've no control over. :) 15:51
Ulti jnth that's a lesson most politicians haven't learnt when they launch websites with live twitter feeds
jnthn On supplies and taps, though, I have submitted a talk on reactive programming in Perl 6 to 3 workshops. So, I shoudl build some nice thingsby then :) 15:52
Ulti my first ever tweet did JS injection into a tory website replacing the whole site with a giant picture of a cat
jnthn :D
Ven Ulti++ # "Mom, let's get a cat for christmas" 15:53
Ulti jnthn are your slides available? or do I have to pay $dayjob to see them?
dalek ast: 8b6a051 | moritz++ | S32-str/ (2 files):
fudge some moar tests which already have tickets
jnthn Ulti: For the reactive .Net talk? Hmm.
Ulti also the picture of a cat might have been goatse... I dont recall :3
jnthn github.com/edumentab/rx-examples is the code 15:54
Ulti thats really all I wanted to grok :D 15:54
moritz all you really wanted to grok was the cat picture on goatse?
Ulti then I can finally make a magical parallel script with Utils regex conversion doodad
Util++
moritz: jnthn's code :P 15:55
raiph moritz: search for SpecialCasing.txt in www.unicode.org/versions/Unicode6.2.0/ch04.pdf
Ulti thanks jnthn I'll try and do something myself
does the bleeding edge version of moar rakudo have these sorts of things?
moritz raiph: thanks 15:56
jnthn Ulti: No; work ongoing in moar-conc branches.
Ulti: I'm working on getting things in shape; last night I discovered we've a problem somewhere with inter-generational roots interacting badly with threads. 15:57
Ulti: Which is likely to blame for much of the trouble, but I won't know until I nail it. 15:58
Ulti jnthn cool I will keep an eye out, looks like I will be updating the JVM on this computer then :) 16:01
Ulti so in general all of the Perl6 parallel stuff is going to be shared memory threading? rather than forking with IPC? 16:03
jnthn Ulti: At a low level, yes, but just because it's a shared memory model doesn't imply that writing code in terms of threads and locks is the way to go. 16:04
Ulti so is memory handled magically for you so long as you stick to Perl6 constructs? or are you going to run into problems with writing?
jnthn Ulti: The expectation is the typical programmer will work in terms of promises, channels, supplies, etc.
Ulti is typical 16:05
the last time I did anything with explict threads was in Java and it took me a good week to debug it
jnthn is also typical when it comes to building reliable systems that are multi-threaded :)
jnthn Working directly with locks and threads is like programming assembly language: good to know you can if you must, but hardly ideal. 16:05
Anyway, at a Perl 6 level, we will make sure you can't explode the VM. 16:06
However, you can - like in all kinds of programming - get wrong answers.
And the way to write answers is doing communication using the provided mechanisms.
uh 16:07
The way to write correct things
oh, or to right answers
brain fail :)
Ulti I haven't actually ever done threading with higher level constructs 16:08
jnthn Ah. :)
It's nicer ;)
Generally it's better to look at the problem and say, "which bits can happen concurrently". Then factor out those pieces. Then you have something suitable to parallelize. 16:09
Ulti yeah like everything I'll just have to do it to get my mind around the new idea
jnthn should find time to write decent docs on this stuff at some point.
Ulti well your presentations are available unless the syntax has changed loads since the summer
jnthn The one I did at Nordic Perl Workshop in Nov is the most up to date. 16:10
And I don't think loads changed since that.
Ulti quite excited that the day has basically come for what I was waiting on Perl6 for :) it's feature complete for my use case! yay 16:11
not that I ever used threads in perl5, I use GNU parallel to do everything at the process level
moritz jnthn: I recently wrote a concurrent, recursive directory reader. My main problem was stopping the program in the end, ie figuring out when to close the channels
jnthn: gist.github.com/moritz/9293475 has the result 16:12
jnthn: any ideas on how to improve that?
that's lines 27 to 40 16:13
jnthn $counter++ # well, there's a race conditon...
moritz: Yeah, I probably can improve on it. 16:15
moritz there is? it's called as callback($_) for $files.list;
that loooks like a serial iteration to me
timotimo right, the reader is a separate thread that sucks the individual files out of a channel 16:16
jnthn moritz: oh, you're right :)
moritz: yeah, it's fine.
I understood it when I got to the bottom :)
Ven browsing #perl6 history from 2007, quite different names around 16:17
Ven .oO(Perl6 on LLVM) 16:19
Ven .oO(au has red bold messages on archives ?) 16:21
Ven .oO(method calls used to use ` ?) 16:24
timotimo wouldn't know about that
moritz Ven: I'm pretty sure they didn't 16:25
Ven moritz: irclog.perlgeek.de/perl6/2005-12-24#i_-387340 that's why I'm surprised 16:26
timotimo wow 2005
i'm not sure pil is actually the same thing as perl6?
Ven couldn't tell 16:27
Ven is pretty deep in the rabbit's hole ...
timotimo that could be some parrot thing actually 16:28
jnthn PIL was Pugs IL, iirc
But it's before my time really
timotimo i wonder what'll be the state in another 10 years
Ven and who'll be there 16:29
timotimo wow, by that time i'll be *old* 16:30
and perhaps wise
Ven I'd almost be 30 :( 16:30
timotimo at least experienced - hopefully
Ven I *will*, actually
timotimo hopefully you will be :)
Ven ugh.
moritz Ven: looks like some intermediate language, not Perl 6 itself
oh, jnthn++ was faster
Ven yeah, this explains that :). jnthn++ # moritz++, too 16:31
raiph Ven: do you know about the #perl6 "summary" (irclog.perlgeek.de/perl6/2014-03-28/summary) ? 16:48
Ven raiph: oh, I was just wandering around ... Class topic is boring and I don't have anything installed on that computer 16:50
raiph Ven: if you're wandering around the last year+ of #perl6 there's a "summary" that's typically about 10-20% of the lines in the full log 16:52
Ven Once you've finished reading the p6advents and synopsis, there's not that much stuff on perl6 :p
moritz well, there's 5-to-6, masak's blog 16:53
jnthn's blog
Ven read, read, read.
moritz the book draft/WIP 16:54
doc.perl6.org
Ven read, read :p
moritz faq.perl6.org (ok, that's short)
Ven read. That list of links could probably be put up somewhere, though
moritz like, on perl6.org? 16:55
I'm pretty sure it's all linked there
Ven You tell me :).
moritz (maybe not the blogs themselves, but the aggregators) 16:56
Ven there is a "blogs" link, right
raiph Ven: imo the best overall source is planeteria.org/perl6/; and the best of the best is jnthn.net, perlgeek.de/blog-en/perl-6/, strangelyconsistent.org/blog/list-of-posts, and doc.perl6.org 16:57
Ven what is mildew ? 16:57
commute & 16:58
moritz Ven: iirc it was a project by pmurias to take the STD.pm6 parse tree and generate code that would run on SMOP
moritz (and SMOP is a C runtime for the Perl 6 object system, and iirc it inspired 6model and parts of the current MOP) 16:59
both mildew and smop seem to be inactive
jnthn Yeah, SMOP was one of the 6model inspirations. 17:01
jnthn In some senses, MoarVM could be seen as partly a SMOP descendent, though not in terms of code. 17:02
japhb descendent-in-spirit 17:09
jnthn *nod* 17:12
raiph jnthn: have you gotten the info you needed about linux equivs of YieldProcessor? 17:13
dalek ast: 611c2d5 | moritz++ | S32-num/power.t:
moar-fudge tests with big exponentials
17:22
[Coke] jnthn: eisbrecher is pretty good to my non-german speaking ear. it's more ... club? techno? 17:23
moritz m: say 241025348275725.3352 17:24
camelia rakudo-moar 3699aa: OUTPUT«241025348275725.3352␤»
moritz m: say 241025348275725.3352 eq '241025348275725.3352' 17:25
camelia rakudo-moar 3699aa: OUTPUT«True␤»
moritz m: say 241025348275725.3352.Rat eq '241025348275725.3352' 17:25
camelia rakudo-moar 3699aa: OUTPUT«True␤» 17:25
moritz r: say 241025348275725.3352.Rat.norm.nude
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«301281685344656669 1250␤»
PerlJam read Rat.norm.dude 17:26
jnthn raiph: The answer, as I feared, seems to be "probe to see what's there" :) 17:29
moritz r: use Test; plan 1; is 241025348275725.3352.Rat.norm.nude, (301281685344656669, 1250), "Rat.Rat yields correct Rat"; 17:30
jnthn raiph: But yeah, but some stuff to try.
camelia rakudo-moar 3699aa: OUTPUT«1..1␤not ok 1 - Rat.Rat yields correct Rat␤# got: '301281685344656669 1250'␤# expected: '301281685344656640 1250'␤# Looks like you failed 1 tests of 1␤»
..rakudo-parrot 3699aa, rakudo-jvm 3699aa: OUTPUT«1..1␤ok 1 - Rat.Rat yields correct Rat␤»
moritz why the bloody hell does 241025348275725.3352.Rat.norm.nude produce the same output on all backends, but in a test it fails? 17:31
... on just one backend
jnthn That's a wtf... 17:34
moritz r: say (301281685344656669, 1250).Str 17:41
camelia rakudo-moar 3699aa: OUTPUT«301281685344656640 1250␤»
..rakudo-parrot 3699aa, rakudo-jvm 3699aa: OUTPUT«301281685344656669 1250␤»
moritz r: say 301281685344656669.Str
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa: OUTPUT«301281685344656669␤»
..rakudo-moar 3699aa: OUTPUT«301281685344656640␤»
moritz r: say 301281685344656669
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa: OUTPUT«301281685344656669␤»
..rakudo-moar 3699aa: OUTPUT«301281685344656640␤»
moritz golf'ed 17:42
japhb r: say 301281685344656669.WHAT
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«(Int)␤»
japhb At least that's agreed upon ...
PerlJam Works on my local version of perl6-m 17:43
moritz This is perl6 version 2014.03.01-8-g3699aaf built on MoarVM version 2014.03-6-g572c043 17:44
PerlJam This is perl6 version 2014.03.01-7-g68e0948 built on MoarVM version 2014.02-130-g20931e6
moritz (on my local machine, where it also fails) 17:44
segomos is there an equiv in p6 to p5's sub meth (&$) ? 17:45
moritz segomos: no, Perl 6 doesn't have prototypes
PerlJam segomos: and you don't need them for warping the language.
(and signatures are way more useful)
moritz m: sub twice(&callback, $value) { callback 2 * $value }; twice {say $^x }, 21 17:46
camelia rakudo-moar 3699aa: OUTPUT«42␤»
segomos PerlJam: i'm more trying to produce a 'map' like functionality in a scraper 17:47
PerlJam segomos: see moritz :)
moritz segomos: no need for a prototype in Perl 6, as demonstrated above
segomos that's exactly what i just did in my other screen too after you told me no protos :-) 17:47
thanks guys
dalek ast: 2d56f60 | moritz++ | S32-num/rat.t:
moar-fudge a test
17:48
moritz r: say $*EXECUTABLE_NAME 17:50
camelia rakudo-jvm 3699aa: OUTPUT«perl6-j␤»
..rakudo-parrot 3699aa: OUTPUT«./rakudo-inst/bin/perl6-p␤»
..rakudo-moar 3699aa: OUTPUT«perl6-m␤»
moritz is there a bug open for that already? 17:50
r: say $*EXECUTABLE_NAME.^name 17:51
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«Str␤»
moritz ideally we'd have @*PERL_INVOKE which is a list of arguments that can be used to invoke the current Perl 6 compiler/interpreter 17:53
that's what we need in tests
dalek ast: 905aa8e | moritz++ | S32-list/roll.t:
JVM- and Moar-fudge tests that rely on $*EXECUTABLE_NAME
18:02
moritz somehow all of my perl6s barf on t/spec/S15-unicode-information/unimatch-general.t 18:03
parrot says Invalid character for UTF-8 encoding
JVM says Unrecognized character name AEGEAN NUMBER NINETY THOUSAND
moar says Invalid code-point U+00FDD0
git log says lue last touched it 18:04
lue: what did you do? :-)
moritz seems TimToady actually introduced U+FDD0 18:05
jnthn moritz: I think it's HEAD Moar that is unhappy with it, but maybe not MOAR_REVISION one...
jnthn moritz: There are tests elsewhere that fail due to this, I think in S05. 18:06
moritz: And there are also tests on ord_and_chr.t that *want* such things to explode.
jnthn So, we can't win :) 18:06
I don't think both sets of tests can be right :)
moritz we just need to parameterize behavior by input file name :-) 18:11
dalek kudo-star-daily: 30a819b | coke++ | log/ (5 files):
today (automated commit)
18:27
rl6-roast-data: 8e33eb0 | coke++ | / (6 files):
today (automated commit)
18:28
[Coke] we need to declare what version of unicode we're testing. 18:33
moritz++ 3 less failing rakudo.moar tests.
hoelzro I was thinking of sticking syntax-highlighting related stuff in a repo; should I create a syntax repo, or should we have a general "tooling" repo? 19:06
or does such a repo already exist?
moritz hoelzro: misc stuff goes into the mu repo right now, but that's a bit big
hoelzro: if you want, I can create a perl6/tooling repo 19:07
hoelzro ok 19:08
I just might do that
timotimo rob!
hoelzro o/ timo!
what's up? 19:09
timotimo greetings
hoelzro greetings are indeed up =) 19:10
jnthn m: say uc 'greetings' # they are now! 19:11
camelia rakudo-moar 3699aa: OUTPUT«GREETINGS␤»
xybre How is Moar coming along? 19:14
PerlJam xybre: spledidly? 19:19
xybre PerlJam: Thats good enough for me I suppose :) 19:20
PerlJam modulo the spelling error :) 19:21
xybre: I tend to use the moar-backed rakudo as my primary perl6 implementation.
lue www.unicode.org/versions/corrigendum9.html things that expect noncharacters to blow everything up are wrong. (unless I severely misunderstand that corrigendum) 19:22
PerlJam occasionally, I'll use rakudo-jvm when I'm playing with supplies and channels and such
xybre PerlJam: ah, I thought it wasn't recommended due to some things being incomplete. 19:25
raiph xybre: i'm curious about your interests, experience, hopes, knowledge of p6, other langs etc.
xybre raiph: I used perl over 10 years ago, didn't rememeber a lick of it. I found my usual languages to be annoying to write parsers in, so I started playing with Perl6. My main language is Ruby, and I've been getting involved in Rebol, writing my own language, and I've done some Ocaml, Self, Smalltalk, Clojure, and Haskell research lately. 19:27
PerlJam nice 19:28
(you sound like one of the regulars already ;)
ssutch one of us :)
lue moritz, jnthn: the main point of noncharacters is that you have no clue what they'll do if passed to another library or program. You can still use them, but with a healthy dose of caution :) . 19:30
xybre Haha, wow. Most people just look at me like I'm crazy. "was all that real what you just said"
raiph xybre: i'd say that, compared to the langs you named, the main diffs are that p6 (lang, ecosystem, docs, etc.) is immature (especially that it's slooooow) and that it's been that way for 10 years longer than most folk can stomach 19:31
xybre raiph: Slowness isn't really a concern so long as it makes the job easier of building proof-of-concept parsers quickly and easily. I need to rapidly iterate on parsing and I'm not going to write a bunch of formal definitions to do it. I've already written a couple of parsers in Ruby, but Perl6 (and Rebol) have most of the stuff I had to hand-build (poorly) built in. 19:33
ssutch a parser (for the protocol buffer description language) is the first thing i wrote in p6 19:35
ssutch github.com/samuraisam/p6-pb 19:35
raiph xybre: fwiw, in my time i've lightly explored dozens of interesting langs (lisps incl. clos, smalltalks, vulcan, forths, mls, icon, snobol, linda, beta, etc., etc.) but only professionally coded in assembler, bcpl, perl, javascript 19:36
vendethiel Haskell is cool too with parsec combinators
raiph xybre: have you seen marpa?
xybre raiph: I research pretty much anything that looks interesting, but I didn't lsit everything because I don't always write real code in everything I encounter. Dylan, NewtonScript, Icon/Unicon, Ada, Beta, etc. 19:37
xybre raiph: I don't believe I've heard of 19:38
marpa, no.
vendethiel Dylan++ #cool macros in Dylan.
vendethiel wants to see more macro stuff in Perl6 19:40
raiph xybre: jeffreykegler.github.io/Marpa-web-site/
vendethiel .oO(Macro-generating macros, can we do that yet ?)
PerlJam vendethiel: easy! Just learn enough to help implement them! :) 19:42
vendethiel good solution :p.
I need to dwelve into Perl6 internals...
Right after I've finished HoTT, MiniKanren, Mercury's book and my actual macro paper list : gist.github.com/Nami-Doc/7133634#m...rogramming 19:43
xybre raiph: relevent. Another issue I ran into with most purpose-built parsers is that they suck at being debugged. I'm begining to belive that a generic framework is actually broken by design. 19:44
xybre raiph: Although, it also needs to be able to output something that I can use in the language for the compiler too. 19:44
raiph xybre: have you tried the grammar tracing module or the rakudo debugger? 19:48
moritz r: (1,2,3,2,2,2,2).BagHash.kv.sort({ .[0] }).perl 19:49
camelia ( no output )
moritz r: say (1,2,3,2,2,2,2).BagHash.kv.sort({ .[0] }).perl 19:49
raiph xybre: output -> lang for the compiler; plz elaborate
camelia rakudo-jvm 3699aa: OUTPUT«((3, 1), (2, 5), (1, 1))␤»
..rakudo-parrot 3699aa, rakudo-moar 3699aa: OUTPUT«((1, 1), (2, 5), (3, 1))␤»
xybre raiph: Yes, Perl6's grammar stuff it's better than most alternatives. 19:49
moritz r: say (1,2,3,2,2,2,2).BagHash.kv.perl 19:50
camelia rakudo-parrot 3699aa, rakudo-moar 3699aa: OUTPUT«((1, 1), (2, 5), (3, 1)).list␤»
..rakudo-jvm 3699aa: OUTPUT«((2, 5), (1, 1), (3, 1)).list␤»
moritz r: say (1,2,3,2,2,2,2).BagHash.kv.tree.sort({ .[0] }).perl 19:50
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«([1, 1], [2, 5], [3, 1])␤»
xybre raiph: Output will be opcode. Probably starting with a higher level VM (Parrot?) for the initial version and then moving to a lower level VM or native (LLVM/x86). 19:51
vendethiel (parrot ?)
raiph xybre: what have you used that's better than p6's grammar stuff? (ignoring p6's immaturity) 19:54
dalek ast: b48a9fb | moritz++ | S02-types/baghash.t:
baghash.t fixes

  * .kv returns a list of unitemized parcels, so .tree it before sorting
  * do not use # in fudge messages, TAP does not like that
  * fudge for moar
xybre raiph: For expressivity? Not much. Rebol's PARSE dialect is pretty great, not quite as powerful from a parsing standpoint, but it feels more flexible to use. My hand-rolled parsers are much better at giving feedback, but are a pain to develop. 19:55
PerlJam xybre: You've used Parsec?
dwarring lue: I'm responsible for the two nonchar tests github.com/perl6/roast/blob/master...chr.t#L157 19:57
maybe they should be widthdrawn?
xybre PerlJam: No, I've generally been avoiding parsing with Haskell, maybe its a superstitious thing. 19:58
dwarring saw your link earlier www.unicode.org/versions/corrigendum9.html
vendethiel xybre: really, parsec is great, I'd encourage you to try it out ! Pretty expressive
(scala combinator.parsers is pretty neat too) 19:59
lue dwarring: rather, they should be changed so they see if noncharacters work, because some impls. might think noncharacters should blow up :)
moritz it seems that now, all of them do
xybre vendethiel: Haskell's syntax seems a bit over the top. Tutorials all go on about lambda operations and talk a lot of theory without much practical application. Thats a big turn off. 20:00
vendethiel xybre: they talk a lot about abstractions - - not quite the same as theory ;). I know where you're coming from, though 20:01
dalek ast: 48e001a | moritz++ | S04-phasers/enter-leave.t:
moar-fudge a test, add ticket number
vendethiel you need some time to get used to Haskell
xybre vendethiel: Its not as bad as a lot of languages though, which jsut give you the bnf grammar and are like thats all you need to know. 20:02
vendethiel (although I've got github.com/Nami-Doc/Typeclassopedia.pl6 heehe)
xybre the grammar specification is probably the least useful thing to know about a language.
dwarring lue: ok
dalek ast: dc8ff6c | moritz++ | S04-phasers/pre-post.t:
moar-fudge some phaser tests
20:08
moritz ok, who fixes the tests?
(about unassigned or private use characters)
jnthn dwarring: Having read the Unicode spec thingy, I'm inclined to agree with lue also. 20:10
dwarring .u thumbs up sign 20:12
yoleaux U+1F44D THUMBS UP SIGN [So] (👍)
lue moritz: I was under the impression that dwarring is handling it.
moritz lue: I'm not under any kind of impression, until I read a commitment, or even better, commits 20:13
vendethiel
.oO(commits are commitments without ments)
20:14
raiph xybre: are you familiar with the term "language oriented programming" (LOP) and systems that claim to deliver benefits for LOP?
dalek ast: 5394f05 | (David Warring [email@hidden.address] | S29-conversions/ord_and_chr.t:
reverse nonchar tests (fudged on rakudo for now)
20:15
ast: b55f1ae | (David Warring [email@hidden.address] | S0 (3 files):
Merge branch 'master' of github.com/perl6/roast
dwarring ^^ hope that looks right (dudged until backends fixed) 20:16
dwarring dudged? 20:16
vendethiel r: sub a(Int) {}; sub foo { a(Bool) }; say "alive"; 20:17
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Calling 'a' will never work with argument types (Bool)␤ Expected: :(Int)␤at /tmp/tmpfile:1␤------> sub a(Int) {}; sub foo { ⏏…» 20:17
dwarring afk
vendethiel Oh perl6 <3333
r: sub a(Int) {}; sub foo { my Bool $var; a($var); }; say "alive";
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Calling 'a' will never work with argument types (Bool)␤ Expected: :(Int)␤at /tmp/tmpfile:1␤------> sub a(Int) {}; sub foo { my Bool $…»
vendethiel I DIDNT EVEN KNOW THAT. 20:18
I'm as happy as unwrapping a gift now.
xybre raiph: nope
vendethiel r: sub a(Int) {}; sub foo { my Bool|List $var; a($var); }; say "alive"; 20:19
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Type 'Bool' is not declared. Did you mean 'Cool'?␤at /tmp/tmpfile:1␤------> sub a(Int) {}; sub foo { my Bool⏏|List $var; a($var); }; say "alive";␤Malformed…»
moritz jnthn, dwarring: so should I revert moarvm commit c5f3b5378, "check for invalid code points (jvm port)"?
vendethiel r: sub a(Int) {}; sub foo { my Bool|String $var; a($var); }; say "alive"; 20:20
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Type 'Bool' is not declared. Did you mean 'Cool'?␤at /tmp/tmpfile:1␤------> sub a(Int) {}; sub foo { my Bool⏏|String $var; a($var); }; say "alive";␤Malform…»
vendethiel uuh.
moritz vendethiel: there are no union types; likely it causes a mis-parse
raiph xybre: the term LOP was coined in the 90s; googles for it can help dig up stuff relevant to what it sounds like you're into; en.wikipedia.org/wiki/Language_orie...rogramming
vendethiel oh, I thought it existed. NYI then! 20:21
moritz vendethiel: no NYI. Specced to not work
vendethiel Union types ? really ? I'm really surprised.
vendethiel r: subset Foo where Bool|String; sub a(Foo $) { say "alive"; } 20:21
moritz you can't just bolt on union types on an existing type sytem and have it work magically
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Undeclared name:␤ String used at line 1. Did you mean 'Stringy'?␤␤»
vendethiel moritz: what does that mean? 20:22
moritz vendethiel: what does what mean?
vendethiel "bolt on union types on an existing type system and have it work magically"
moritz it means exactly what I wrote
vendethiel which I don't understand ...
moritz let me rephrase 20:23
vendethiel I don't expect it to be "type junctions". I thought reading about untagged type unions in the synopsis
jnthn moritz: That would indeed fix it, I think.
moritz if you want a language to have union types, it must be really baked in 20:23
moritz you can write subset Foo of Any where Bool|Str; 20:23
vendethiel Yeah; I agree with that much - - That's why I said I remember them being in the spec.
moritz but that's not a real union type
moritz so it doesn't participate in multi dispatch as a nominal type, for example 20:24
vendethiel r: sub a(Int|Str) {}; say "alive";
camelia rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Capture parameter must have a type accepting a Capture␤at /tmp/tmpfile:1␤------> sub a(Int|Str) {}⏏; say "alive";␤ expecting any of:␤ statement list…»
..rakudo-parrot 3699aa, rakudo-jvm 3699aa: OUTPUT«alive␤»
moritz std: sub a(Int|Str) {}; say "alive"; 20:25
camelia std 09dda5b: OUTPUT«ok 00:01 127m␤»
vendethiel but yeah; it seems obvious it's not a nominal type
moritz std: my Int|Str $x
camelia std 09dda5b: OUTPUT«===SORRY!===␤Multiple prefix constraints not yet supported at /tmp/RQVvRUbyOc line 1:␤------> my Int⏏|Str $x␤Malformed my at /tmp/RQVvRUbyOc line 1:␤------> my Int⏏|Str $x␤ expecting any of:…»
vendethiel so isn't it NYI, in the end ?
lue vendethiel: polymorphic types don't exist. I removed them from S02 myself :) . 20:26
moritz vendethiel: not in the sense that other stuff is NYI
vendethiel lue: "polymorphic types"?
moritz vendethiel: more like defered to perl 6.5, if at all
lue that's what S02 called Int|Str .
[Coke] NYI implies it's spec'd but not in an existing compiler.
vendethiel [Coke]: yeah, I know that. moritz: alright, fair enough. It's really good enough with subsets. 20:27
lue: oh,okay
raiph vendethiel: have you seen the lang ceylon?
vendethiel raiph: yes
moritz gaaah, who cut the moarvm release? 20:27
vendethiel I hate most of the things about it 20:28
r: subset Foo where Bool|Str; sub a(Int) {}; sub foo { my Foo $var; a($var); }; say "alive";
camelia rakudo-parrot 3699aa: OUTPUT«===SORRY!===␤Could not find sub &infix:<|>␤»
..rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
..rakudo-jvm 3699aa: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
moritz jnthn: please remember to use annotated tags for MoarVM releases
xybre raiph: thanks I'll check it out
moritz jnthn: otherwise 'git describe' will ignore it, and it will produce different output form 'git describe --tags'
vendethiel r: subset Foo of Any where Bool|Str; sub a(Int) {}; sub foo { my Foo $var; a($var); }; say "alive"; 20:29
camelia rakudo-parrot 3699aa: OUTPUT«===SORRY!===␤Could not find sub &infix:<|>␤»
..rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
..rakudo-jvm 3699aa: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
jnthn moritz: ugh...
vendethiel I'm cool with it anyway.
jnthn moritz: Yeah, that's an annoying behavior.
vendethiel Tagged unions > untagged unions
dalek p: 3adc3d7 | moritz++ | tools/build/MOAR_REVISION:
bump MoarVM version

to get various bug fixes and improvements
20:30
moritz tagged unicorns > untagged unicorns
lue afk
vendethiel r: class Either { has Left $.left; has Right $.right; has Bool $is-left; multi method new(Left $left) { Either.bless(:$left, :is-left(true)) }; def fmap(&callable) {} }; class Left[::T] { has $.value; multi method new($value) { Left.bless(:$value); } }; class Right[::T] { has $.value; multi method new($value) { Left.bless(:$value); } }; 20:32
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Type 'Left' is not declared␤at /tmp/tmpfile:1␤------> class Either { has Left⏏ $.left; has Right $.right; has Bool $is␤Malformed has␤at /tmp/tmpfile:1␤…»
vendethiel well, it's becoming a bit too long for an IRC message anyway ...
moritz vendethiel: you can feed gist URLs to camelia 20:33
vendethiel moritz: yeah, I know # [14:42] <Ven> r: gist.github.com/Nami-Doc/c6161cc3b29a1a417b9f 20:33
raiph vendethiel: do you know about /msg camelia m: say 1 # or whatever? 20:34
vendethiel raiph: no - I'll take note :p
I'm pretty spammy
japhb moritz: 'tagged unicorns' indicates someone found more than one, and tagged them all. Which is definitely better than not having found any to tag.
raiph vendethiel: a common practice is to do a /msg camelia m: whatever to golf some issue then sharing the final golf'd version on channel 20:35
moritz japhb: Unicorn tagged as 'found' :-)
japhb Reminds me of some children's book or cartoon or such that has one of the characters coat their home in sticky notes, each one labeling objects with their type: "spoon", "spoon", "fork", "cabinet", "sink" .... 20:37
vendethiel r: class A[::T] {}; 20:40
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Unable to parse class definition␤at /tmp/tmpfile:1␤------> class A⏏[::T] {};␤ expecting any of:␤ statement l…»
vendethiel oh :(. 20:41
japhb vendethiel: Roles can pun into classes. So just do a parametric role, if that's what you want/ 20:42
vendethiel japhb: how do I pass the type parameter ? 20:45
r: role A[::T] {}; class B does A[::UhWhatHere] {}; 20:46
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol UhWhatHere␤»
japhb r: role A[::T] {}; class B does A[Int] {}; 20:48
camelia ( no output )
japhb r: role A[::T] {}; class B is A[Int] {}; # Curious if the punning works with this syntax 20:49
camelia rakudo-parrot 3699aa, rakudo-jvm 3699aa, rakudo-moar 3699aa: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Mu:U $child, Mu:U $parent)␤:(Mu:U $child, Any :DEPRECATED($DEPRECATED)!)␤:(Mu…»
[Coke] where do the specs define what ::T does?
I'm looking in S14-roles-and-parametric-types.pod, but it's not clear that ::T there is anything but a placeholder for a "real" value.
vendethiel parametric type ? 20:50
japhb [Coke]: For a role declaration, it's a parameter. For a signature, it's a type capture, generally used to say things like "This works one two objects of the same type"
*works on 20:51
vendethiel so, classes can't be type parametric themselves
[Coke] japhb: can you point to the spec that says what you just said?
japhb r: sub foo(::T $a, T $b) { say 'woot' }; foo(1, 3); foo('a', 'b'); foo(1, 'b');
camelia rakudo-moar 3699aa: OUTPUT«woot␤woot␤cannot stringify this␤ in sub foo at /tmp/tmpfile:1␤ in block at /tmp/tmpfile:1␤␤» 20:52
..rakudo-parrot 3699aa: OUTPUT«woot␤woot␤Nominal type check failed for parameter '$b'; expected Int but got Str instead␤ in sub foo at /tmp/tmpfile:1␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-jvm 3699aa: OUTPUT«woot␤woot␤Nominal type check failed for parameter '$b'␤ in sub foo at /tmp/tmpfile:1␤ in block at /tmp/tmpfile:1␤␤»
japhb [Coke]: hold on, have to get to the box I have a spec checkout
[Coke] Danke.
vendethiel [Coke]: try S12 ? 20:53
[Coke] m: sub foo(::BARF $a, BARF $b) { say 'woot' }; foo(1, 3); foo('a','b'); foo(1, 'b');
camelia rakudo-moar 3699aa: OUTPUT«woot␤woot␤cannot stringify this␤ in sub foo at /tmp/wNrEu7apCt:1␤ in block at /tmp/wNrEu7apCt:1␤␤»
[Coke] p: sub foo(::BARF $a, BARF $b) { say 'woot' }; foo(1, 3); foo('a','b'); foo(1, 'b');
camelia rakudo-parrot 3699aa: OUTPUT«woot␤woot␤Nominal type check failed for parameter '$b'; expected Int but got Str instead␤ in sub foo at /tmp/r58HY9DY8J:1␤ in block at /tmp/r58HY9DY8J:1␤␤»
japhb $ git grep -i 'type capture'
S06-routines.pod:=head2 En passant type capture
contents.pod: En passant type capture
vendethiel perlcabal.org/syn/S12.html#Custom_Meta-objects at the end
japhb The first one, of course. :-) 20:54
[Coke] S02:1921
synopsebot Link: perlcabal.org/syn/S02.html#line_1921
[Coke] Danke. 20:55
dalek p: a4eda0b | moritz++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Remove now-deprecated validity checks for nqp::chr on the JVM
21:00
jnthn ::T is a type capture; in roles, role Foo[...signature here...] { } 21:01
And so ::T works just like in a signature.
japhb jnthn: Yeah, that occurred to me right after I sent it.
jnthn You can even write multiple roles with the same short name and it just multi-dispatches to pick the best one :) 21:02
japhb Especially since I've actually passed normal concrete valued arguments to role instantiations, so I clearly already knew that at some point. :-)
vendethiel how do you call `grammar :: { rule foo<here that kind of stuff> { 'foo' } }` 21:07
vendethiel It's often quite hard to search for definitions, etc. How do you lookup what "will" does? 21:08
japhb vendethiel: ETOOMETA. 'call' as in 'name', or 'call' as in 'invoke'? And if the latter, do you mean the grammar, or the rule?
vendethiel a rule with a subscript
sorry I'm not clear.
jnthn adverb 21:09
vendethiel a rule adverb?
raiph jnthn: a search for YieldProcessor yields zero results on reddit and hypernews. do any of the 12 matching posts on stackexchange help? stackoverflow.com/search?q=YieldProcessor 21:10
jnthn vendethiel: Well, it's part of the name. 21:13
vendethiel jnthn: Alright, noted :). Not sure what difference does it make in the end, but it's cool 21:14
jnthn vendethiel: I guess you're referring to things like rule package_decl:sym<class> { ... } or so
vendethiel yes
am I that unclear ? damn :s
jnthn vendethiel: No, it's me, I'm debugging something tricky at the moment and you only have a bit of my attention. Sorry. 21:16
vendethiel I'd much rather let you focus on what you're doing, though :).
jnthn raiph: They're on topic, just don't tell me anything new. :) 21:17
jnthn raiph: Thanks for looking btw. 21:19
raiph: I think the answer is "there's no common abstraction for this to be found away from Windows, so just probe to see if you can inline-assembly it"
BenGoldberg r: my $a = role A[::T] {}; my $b = $a[Int]; 21:26
camelia rakudo-parrot 3699aa: OUTPUT«Invocant requires an instance, but a type object was passed␤ in method Bridge at gen/parrot/CORE.setting:4376␤ in sub infix:<<> at gen/parrot/CORE.setting:4293␤ in sub infix:<<> at gen/parrot/CORE.setting:4137␤ in sub postcircumfix:<[ ]> at g…»
..rakudo-moar 3699aa: OUTPUT«Invocant requires an instance, but a type object was passed␤ in method Bridge at src/gen/m-CORE.setting:4372␤ in sub infix:<<> at src/gen/m-CORE.setting:4289␤ in sub infix:<<> at src/gen/m-CORE.setting:4133␤ in sub postcircumfix:<[ ]> at src/ge…»
..rakudo-jvm 3699aa: OUTPUT«Cannot look up attributes in a type object␤ in method Bridge at gen/jvm/CORE.setting:4373␤ in sub infix:<<> at gen/jvm/CORE.setting:4289␤ in sub infix:<<> at gen/jvm/CORE.setting:4133␤ in sub postcircumfix:<[ ]> at gen/jvm/CORE.setting:2385␤ …»
BenGoldberg Very peculiar that jvm produces a different error message. 21:27
dalek ecs: 756c4ce | (Elizabeth Mattijsen)++ | S02-bits.pod:
Fix left behind "async" (we only do "start" now)
21:50
dalek ast: 71706d4 | moritz++ | S32-num/power.t:
fix a moar fudge
22:07
dalek ast: aac2968 | moritz++ | S06-macros/quasi-blocks.t:
another moar fudge
22:09
moritz still lots of rakudo-m spectest failures 22:10
moritz this is frustrating. 22:10
jnthn moritz: Was there ~40 before you started?
moritz jnthn: dunno 22:14
dalek kudo/nom: 348a16b | moritz++ | tools/build/NQP_REVISION:
bump NQP revision to get some chr() fixes
22:15
timotimo thank you forbdoing it, moritz 22:37
vendethiel what's "use MONKEY_TYPING"? enabling `augment`|? 22:42
timotimo yes 22:44
cognominal and probably a reference to a metaphor créated by Emile Borel en.wikipedia.org/wiki/Infinite_monkey_theorem 22:59
elsewhere it is called duck typing. Am I wrong? 23:03
jnthn no, duck typing is something else 23:05
here we're monkeying with tyes 23:06
*types
cognominal thx, jnthn++ 23:08
TimToady it's called "monkey patching" in rubyland
cognominal there is even a wp entry : en.wikipedia.org/wiki/Monkey_patch 23:09
the supposed "etymology" is interesting 23:10
jnthn o/ TimToady 23:21
TimToady \o 23:22
jnthn TimToady: I'm currently merging moar-conc. It doesn't give 100% of the concurrency functionality you've got on JVM, but promises and channels are there. It's the time-based stuff that's still missing.
Promise.in(...), Supply.interval(...), etc.
TimToady cool
vendethiel jnthn++ 23:23
jnthn No promises on how stable it is, though I've been hunting and killing parallel GC bugs in the last evenings...
TimToady tomorrow's talk is mostly about Open Source, and the Perl meetups are later, so don't need it immediately
vendethiel is it recorded?
jnthn Sure. Well, then you've time to tell me how you break it :P
So I can try and fix it in time for the Perl things. :) 23:24
TimToady probably in a live demo :)
jnthn :P
Murphy's law suggests so.
dalek Heuristic branch merge: pushed 16 commits to nqp by jnthn 23:25
Heuristic branch merge: pushed 30 commits to rakudo/nom by jnthn 23:26
jnthn There we go.
TimToady \o/
jnthn++
cognominal jnthn++ 23:30
Mouq o/ 23:49
yoleaux 24 Mar 2014 23:22Z <TimToady> Mouq: yeah, should probably allow :q to \ an opener, and if double angles allow #, it's more because that's how shells work than how Perl works :)
Mouq \o/ jnthn++ 23:50
jnthn o/ moritz 23:52
uh
o/ Mouq