»ö« 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 c: 99de2fe | Mouq++ | lib/Language/quoting.pod:
Some additions to quoting.pod
00:03
xenoterracide any chance anyone has made rakudo build on travis and then got it to run the test suite of their module? 00:04
with prove
xenoterracide is there a good way to change the dark blue color that the debugger uses? 00:25
flussence I know that problem, one of the first things I do on a new computer is `echo 'URxvt.color4: #4242A6' >> ~/.Xresources` :) 00:27
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...ml?id=4242
flussence
.oO( -EDUMBBOT )
00:28
sergot m: my $i = IO::Socket::INET( :host('filip.sergot.pl'), :port(80), :timeout(1)); 00:32
camelia rakudo-moar 847bd5: OUTPUT«Cannot coerce to IO::Socket::INET with named parameters␤ in block at /tmp/REOhYN6pKQ:1␤␤»
sergot m: my $conn = IO::Socket::INET.new( host => 'filip.sergot/index.html', port => 80, timeout => 1 ); 00:33
camelia rakudo-moar 847bd5: OUTPUT«Failed to resolve host name␤ in method initialize at src/gen/m-CORE.setting:19910␤ in method new at src/gen/m-CORE.setting:19894␤ in block at /tmp/0Fn6mSLbaU:1␤␤»
sergot m: my $conn = IO::Socket::INET.new( host => 'filip.sergot', port => 80, timeout => 1 );
camelia rakudo-moar 847bd5: OUTPUT«Failed to resolve host name␤ in method initialize at src/gen/m-CORE.setting:19910␤ in method new at src/gen/m-CORE.setting:19894␤ in block at /tmp/byez3EZc1s:1␤␤»
sergot m: my $conn = IO::Socket::INET.new( host => 'filip.sergotpl/index.html', port => 80, timeout => 1 );
camelia rakudo-moar 847bd5: OUTPUT«Failed to resolve host name␤ in method initialize at src/gen/m-CORE.setting:19910␤ in method new at src/gen/m-CORE.setting:19894␤ in block at /tmp/f1bOL9dUGW:1␤␤»
sergot agrh
m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl/index.html', port => 80, timeout => 1 );
camelia rakudo-moar 847bd5: OUTPUT«Failed to resolve host name␤ in method initialize at src/gen/m-CORE.setting:19910␤ in method new at src/gen/m-CORE.setting:19894␤ in block at /tmp/h1y3GeivRj:1␤␤»
xenoterracide flussence: that wouldn't work for me, but gave me the idea to look through konsole's settings 00:34
sergot m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl', port => 80, timeout => 1 );
camelia ( no output )
sergot m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl', port => 80, timeout => 1 ); $conn.send("GET / HTTP/1.1\r\nHost: filip.sergot.pl\r\n\r\n"); say $conn.recv().encode('utf8').bytes; 00:35
camelia rakudo-moar 847bd5: OUTPUT«4380␤»
sergot m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl', port => 80, timeout => 1 ); $conn.send("GET / HTTP/1.1\r\nHost: filip.sergot.pl\r\n\r\n"); say $conn.recv().encode('utf8').bytes;
camelia rakudo-moar 847bd5: OUTPUT«4380␤»
sergot m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl', port => 80, timeout => 1 ); $conn.send("GET / HTTP/1.1\r\nHost: filip.sergot.pl\r\n\r\n"); say $conn.lines.join("\n").encode('utf8').bytes; 00:36
camelia rakudo-moar 847bd5: OUTPUT«12292␤»
sergot what's wrong with recv()?
m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl', port => 80, timeout => 1 ); $conn.send("GET / HTTP/1.1\r\nHost: filip.sergot.pl\r\n\r\n"); say $conn.read().encode('utf8').bytes; 00:39
camelia rakudo-moar 847bd5: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method read at src/gen/m-CORE.setting:19793␤ in block at /tmp/W2xHXNPa8h:1␤␤»
sergot m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl', port => 80, timeout => 1 ); $conn.send("GET / HTTP/1.1\r\nHost: filip.sergot.pl\r\n\r\n"); say $conn.read(12292).encode('utf8').bytes; 00:40
camelia rakudo-moar 847bd5: OUTPUT«No such method 'encode' for invocant of type 'Buf[uint8]'␤ in block at /tmp/LtsiQ9Ed1n:1␤␤»
sergot nvm, still something is wrong with recv() :)
BenGoldberg m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl', port => 80, timeout => 1 ); $conn.send("GET / HTTP/1.1\r\nHost: filip.sergot.pl\r\n\r\n"); say $conn.read(99999).length
camelia rakudo-moar 847bd5: OUTPUT«No such method 'length' for invocant of type 'Buf[uint8]'␤Did you mean 'elems', 'chars', 'graphs' or 'codes'?␤ in block at /tmp/YOh0VsgvRI:1␤␤»
BenGoldberg m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl', port => 80, timeout => 1 ); $conn.send("GET / HTTP/1.1\r\nHost: filip.sergot.pl\r\n\r\n"); say $conn.read(99999).chars 00:41
camelia rakudo-moar 847bd5: OUTPUT«Cannot use a Buf as a string, but you called the chars method on it␤ in method chars at src/gen/m-CORE.setting:5312␤ in block at /tmp/lrrvKBlLBH:1␤␤»
BenGoldberg m: my $conn = IO::Socket::INET.new( host => 'filip.sergot.pl', port => 80, timeout => 1 ); $conn.send("GET / HTTP/1.1\r\nHost: filip.sergot.pl\r\n\r\n"); say $conn.read(99999).elems
camelia rakudo-moar 847bd5: OUTPUT«12293␤»
xenoterracide privatepaste.com/9b74ef7f65 what is the difference in parameters here that one of the calls doesn't see enough? 00:42
flussence m: my class Foo { method add_annotation($a, $b) { say 'ok' } }; given Foo.new { .add_annotation('table', True); .add_annotation(table => True); } 00:53
camelia rakudo-moar 847bd5: OUTPUT«ok␤Not enough positional parameters passed; got 1 but expected 3␤ in method add_annotation at /tmp/nf1FV8zAuB:1␤ in block at /tmp/nf1FV8zAuB:1␤␤» 00:53
flussence => isn't the same thing as , — inside a signature it means one named param, not two positional params. 00:54
(I don't quite understand where it got the numbers 2 and 4 from instead of 1 and 3 though)
Mouq With a .^ call, the class is passed as the first parameter; that's why it says 2 and 4 01:21
xenoterracide: => is only a "fat comma" in p5. In p6, it creates an actual pair object
xenoterracide Mouq: that's what I thought 01:22
Mouq xenoterracide: If you want to pass the pair directly, do add_annotation( (table => True) ) or ...( (:table) ) 01:23
xenoterracide: The other way to do it is with a slurpy hash (*%params) in the signature 01:24
xenoterracide Mouq: I wonder if all that works in nqp, run into a few things that don't, really don't know what sig I want yet though
gotta write the tests to find the implementation 01:25
Mouq xenoterracide: I understand :) AFAIK, NQP uses the same sort of thing 01:26
dalek c: e3f77d9 | Kamil++ | lib/Language/classtut.pod:
Added class attributes
01:37
c: 78301f9 | (Alexander Moquin)++ | lib/Language/classtut.pod:
Merge pull request #21 from teodozjan/master

Added class attributes
xenoterracide Mouq: is there nothing like state? also can we please not document evil singleton pattern? people might think it's a good idea 01:44
Mouq xenoterracide: We have state $var 01:48
xenoterracide: Feel free to edit it
xenoterracide: The language could use some editorializing, I'm just working on other stuff ATM
xenoterracide I'm trying to think of a good example for class level variables, but I honestly have the suggestion, don't use them unless you have a very good reason
Mouq :) 01:49
Magic numbers?
Lexically scoped things are often used for, e.g., private subs and classes that methods in the class share 01:51
xenoterracide Mouq: well lexically scoped to the class.. 01:55
magic maybe
xenoterracide Mouq: oh yeah lexically scoped private methods make sense 01:56
Mouq: mostly I see class level variables used for things like strings that don't change
I don't know if Moar is like the JVM and makes strings basically immutable flyweights 01:57
xenoterracide which fundamentally means that making strings static like that is a good way to ensure memory is never freed 01:58
and most of the other kinds of constants could usually be restricted to a single method (hense state making sense) 01:59
Mouq xenoterracide: I don't know much moar than you do about the internals of the VM 02:00
xenoterracide Mouq: yeah I figure, would have to ask jnthn or someone about those kinds of optimizations 02:03
Mouq: what about things like $VERSION? 02:05
Mouq xenoterracide: There is a constants table in Rakudo, as I recall
m: $*PERL.version.say 02:06
camelia rakudo-moar 847bd5: OUTPUT«vunknown␤»
Mouq heh. What about them?
m: $*VM.version.say 02:07
camelia rakudo-moar 847bd5: OUTPUT«v2014.6␤»
Mouq m: $*VM.perl.say
camelia rakudo-moar 847bd5: OUTPUT«VM.new(config => {"ccout" => "-o ", "dclib" => "3rdparty/dyncall/dyncall/libdyncall_s.a", "syslibs[0]" => "m", "moardll" => "libmoar.so", "staticlib" => "", "ldoptiflags" => "-O1 -DNDEBUG", "dcbobjects" => "", "exe" => "", "laoobjects" => "", "ldshared" =>…»
Mouq m: $*PERL.compiler.version.say 02:08
camelia rakudo-moar 847bd5: OUTPUT«v2014.6.7.g.847.bd.58␤»
xenoterracide Mouq: well I was thinking more about module versions like CPAN things have, don't know that they're used in practice, but it's one of the few class level variables I can think of that can be useful 02:09
though it's also usually visible to the outside
brb new kernel 02:10
xenoterracide back 02:20
Mouq xenoterracide: Ahh, ok. In Perl 6, it's supposed to be more built-in, though not quite implemented yet: 02:25
Mouq m: class Xyz:ver<4.2.3> { ... } 02:25
camelia rakudo-moar 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/K0Ei40_A7S␤The following packages were stubbed but not defined:␤ Xyz␤at /tmp/K0Ei40_A7S:1␤------> class Xyz:ver<4.2.3> { ... }⏏<EOL>␤ expecting any of:␤ …»
Mouq m: class Xyz:ver<4.2.3> { 1 };
camelia rakudo-moar 847bd5: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤»
jakesyl Hey, I'd hate to get in the middle of this debug, but me and my team are considering using perl 6 for a large scale, cloud based web application so my questions are: 02:26
1. is it stable, and 2. integration with haskell 02:27
Mouq jakesyl: As far as I am aware, 1. Not quite, 2. Not that I know of 02:28
xenoterracide jakesyl: 1. probably not enough for production, 2. are you planning on writing it? pugs not withstanding
3. how much of your application infrastructure are you willing to write? 02:29
Mouq jakesyl: Perl 5 may be more what your looking for
jakesyl okay thanks guys!
Mouq jakesyl: Considering its substantial stability and libraries for large scale apps 02:30
\o
.oO( One day... 1. Yes )
:)
Christmas, anyone? :P
xenoterracide Mouq: yeah I hope though even though I think core is stablish enough to get started, the "cpan6" libraries (last I checked) were no where near what would be neaded 02:31
I think once I can use perl6 objects in java and someone has documented that I may try writing a perl6 module for netbeans 02:32
Mouq xenoterracide: Well, use foo::bar:from<java>, but I've never been able to figure out how to call methods on the objects after that :/ 02:34
xenoterracide: Oh, I got it backwards
xenoterracide $type.HOW.add_annotation( $type.HOW, 'entity', True ); 02:36
$type.^add_annotation( 'entity', True );
what's the difference between those
Mouq I believe the outstanding NYIs, from TimToady's perspective, are LoL array access, sized native arrays, and NFG
Nothing, I don't think, except that $type.HOW should probably be $type.WHAT 02:37
xenoterracide Cannot invoke this object (REPR: Null, cs = 0) the 2nd' gives me this error
:/
the first does what I want
Mouq Huh
xenoterracide too bad the evalers can't run my topic branch 02:38
interestingly though $type.^annotions works 02:39
Mouq See, I don't see how the first one works, because you're passing the wrong object to .add_annotation
If you want .^add_annotation to work
xenoterracide hmm 02:40
why would it be the wrong object? that'd be a copy of $self right?
perhaps my implementation has ID10T problems
Mouq Well, yeah, but the normal case is that the first thing passed is the .WHAT of the object being called with .HOW 02:41
xenoterracide hmm
Mouq m: say "abcd".HOW.methods("abcd".WHAT)
camelia rakudo-moar 847bd5: OUTPUT«BUILD Int Num chomp chop substr pred succ match ords lines samecase samespace trim-leading trim-trailing trim words encode wordcase trans indent codes path unival univals WHICH Bool Str Stringy DUMP ACCEPTS Numeric gist perl comb subst split␤»
Mouq m: say "abcd".HOW.methods("abcd".HOW)
camelia rakudo-moar 847bd5: OUTPUT«BUILD Int Num chomp chop substr pred succ match ords lines samecase samespace trim-leading trim-trailing trim words encode wordcase trans indent codes path unival univals WHICH Bool Str Stringy DUMP ACCEPTS Numeric gist perl comb subst split␤»
Mouq hmmm indeed...
m: say "abcd".HOW.methods(123) 02:42
camelia rakudo-moar 847bd5: OUTPUT«BUILD Int Num chomp chop substr pred succ match ords lines samecase samespace trim-leading trim-trailing trim words encode wordcase trans indent codes path unival univals WHICH Bool Str Stringy DUMP ACCEPTS Numeric gist perl comb subst split␤»
Mouq Weeeird
xenoterracide in the debugger I just got that same error calling $type 02:43
Mouq Well, I clearly don't have a clue what I'm talking about '< 02:44
xenoterracide heh 02:45
github.com/xenoterracide/p6-annotations
seems to me like $type isn't initialized to what it's supposed to be or somethin
:/ 02:46
think it says $type is null
wtf 02:47
so why is trait_mod giving me a null for the fist argument 02:52
instead of the actual type I hung it fof
off*
m: multi sub trait_mod:<is>( Mu:U $type, :$entity! ) { say $type } class Foo is entity {} 02:55
camelia rakudo-moar 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/Af8FZ87cJr␤Two terms in a row␤at /tmp/Af8FZ87cJr:1␤------> ( Mu:U $type, :$entity! ) { say $type } ⏏class Foo is entity {}␤ expecting any of:␤ postfix␤ …»
xenoterracide m: multi sub trait_mod:<is>( Mu:U $type, :$entity! ) { say $type }; class Foo is entity {}
camelia rakudo-moar 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/Og_yTq3IjV␤Cannot invoke this object (REPR: Null, cs = 0)␤at /tmp/Og_yTq3IjV:1␤------> ␤»
xenoterracide p: multi sub trait_mod:<is>( Mu:U $type, :$entity! ) { say $type }; class Foo is entity {} 02:56
camelia rakudo-parrot 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/XpESU5xSLC␤Method 'gist' not found for invocant of class 'Foo'␤at /tmp/XpESU5xSLC:1␤------> ␤»
xenoterracide p: multi sub trait_mod:<is>( Mu:U $type, :$entity! ) { say $type.WHAT }; class Foo is entity {}
camelia rakudo-parrot 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/PtI7ccjFpd␤Method 'gist' not found for invocant of class 'Foo'␤at /tmp/PtI7ccjFpd:1␤------> ␤» 02:57
xenoterracide p: multi sub trait_mod:<is>( Mu:U $type, :$entity! ) { $type.DUMP}; class Foo is entity {}
camelia rakudo-parrot 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/0aIID3Md5n␤Method 'DUMP' not found for invocant of class 'Foo'␤at /tmp/0aIID3Md5n:1␤------> ␤»
xenoterracide outside of my obviously not knowing how to print type, I think maybe I hit a bug in moar 02:58
m: multi sub trait_mod:<is>( Mu:U $type, :$entity! ) { say $type }; class Foo is entity {}
camelia rakudo-moar 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/_EVubqfeJt␤Cannot invoke this object (REPR: Null, cs = 0)␤at /tmp/_EVubqfeJt:1␤------> ␤»
xenoterracide is a very different error than what parrot outputs
Timbus m: multi trait_mod:<is>(Mu:U $type, :$wot!) { say $type.HOW }; class Teh is wot {}; 03:02
camelia rakudo-moar 847bd5: OUTPUT«Perl6::Metamodel::ClassHOW.new()␤»
Timbus m: multi trait_mod:<is>(Mu:U $type, :$wot!) { say $type.HOW.name($type) }; class Teh is wot {}; 03:08
camelia rakudo-moar 847bd5: OUTPUT«Teh␤»
Timbus yey
dalek c: f4d53d2 | Mouq++ | lib/ (2 files):
Add language/grammars
03:09
c: 8c63949 | Mouq++ | lib/Language/classtut.pod:
Merge branch 'master' of github.com/perl6/doc
Mouq m: multi sub trait_mod:<is>( Mu:U $type, :$entity! ) { say $type.name }; class Foo is entity {} 03:11
camelia rakudo-moar 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/7HBsD_j_Dx␤Cannot invoke this object (REPR: Null, cs = 0)␤at /tmp/7HBsD_j_Dx:1␤------> ␤»
Timbus welcome to the metamodel 03:12
Mouq /o\
xenoterracide Timbus: seems that moritz advent is out of date? or... 03:13
also interestingly I could swear I didn't have any problem with $type 2 months ago (though that may have been on parrot, thus bug) 03:16
Timbus i dont think how it currently works is.. correct? optimal? not sure what words i want. its a bit fragile atm 03:17
Mouq It's not exactly something put under the rigours of roast 03:21
xenoterracide is in your code breaking your shit, maybe someday you'll be in mine returning the favor 03:27
Mouq xenoterracide++ for pushing rakudo 03:29
xenoterracide well I'll go with the more verbose version since it seems to work... maybe I should put a failing test somewhere? 03:30
github.com/xenoterracide/p6-annota...sistence.t works :D 03:34
Mouq \o/ 03:45
lizmat good *, #perl6! 04:08
r: say IO::Spec.rel2abs(".")
camelia rakudo-{parrot,moar} 847bd5: OUTPUT«/home/p6eval␤»
..rakudo-jvm 847bd5: OUTPUT«/home/p6eval_eval␤»
lizmat r: say IO::Spec.rel2abs("..")
camelia rakudo-jvm 847bd5: OUTPUT«/home/p6eval_eval/..␤»
..rakudo-{parrot,moar} 847bd5: OUTPUT«/home/p6eval/..␤»
lizmat feels to me this is a bug...
Mouq lizmat: I remember reading something, somewhere that said that that was the correct behavior, due to symbolic links or something... 04:11
lizmat r: say IO::Spec.rel2abs("../../../../..")
camelia rakudo-jvm 847bd5: OUTPUT«/home/p6eval_eval/../../../../..␤»
..rakudo-{parrot,moar} 847bd5: OUTPUT«/home/p6eval/../../../../..␤»
lizmat well, maybe symlinks shouldn't use rel2abs then 04:12
lizmat maybe I should go to sleep :-) 04:14
lizmat gnight #perl6! 04:14
Mouq r: say IO::Spec.resolve('..')
camelia rakudo-{parrot,jvm,moar} 847bd5: OUTPUT«No such method 'resolve' for invocant of type 'IO::Spec'␤ in block at /tmp/tmpfile:1␤␤»
Mouq 'night lizmat!
r: say '..'.path.resolve 04:15
camelia rakudo-moar 847bd5: OUTPUT«===SORRY!===␤IO::Path.resolve not yet implemented. Sorry. ␤»
..rakudo-jvm 847bd5: OUTPUT«IO::Path.resolve not yet implemented. Sorry. ␤ in method gist at gen/jvm/CORE.setting:12790␤ in sub say at gen/jvm/CORE.setting:13700␤ in block at /tmp/tmpfile:1␤␤»
..rakudo-parrot 847bd5: OUTPUT«IO::Path.resolve not yet implemented. Sorry. ␤ in method gist at gen/parrot/CORE.setting:12786␤ in method gist at gen/parrot/CORE.setting:1038␤ in sub say at gen/parrot/CORE.setting:13716␤ in sub say at gen/parrot/CORE.setting:13703␤ in bl…»
atroxaper p: my %h; my @a = i => 1, ii => 2; %h{'a'} = @a; say %h{'a'}.perl; 04:41
camelia rakudo-parrot 847bd5: OUTPUT«["i" => 1, "ii" => 2]␤»
atroxaper What do I wrong? I want to get two elements instead one. 04:42
Mouq m: my %h; my @a = i => 1, ii => 2; %h{'a'} = %(@a); say %h<a>.perl # is this what you mean? 04:51
camelia rakudo-moar 847bd5: OUTPUT«{"i" => 1, "ii" => 2}␤»
atroxaper Mouq: Hm.... Maybe. I get array with one element, but want to get array with 2 elements. 04:54
Timbus you do have an array with two elements...
atroxaper Timbus: with Mouq verstion? 04:55
Timbus ["i" => 1, "ii" => 2]
atroxaper p: my %h; my @a = i => 1, ii => 2; %h{'a'} = @a; say $_ ~ '<-elem' for %h{'a'};
camelia rakudo-parrot 847bd5: OUTPUT«i 1 ii 2<-elem␤»
Timbus in a loop, use .list to iterate over it 04:56
m: my %h; my @a = i => 1, ii => 2; %h{'a'} = @a; say $_ ~ '<-elem' for %h{'a'}.list
camelia rakudo-moar 847bd5: OUTPUT«i 1<-elem␤ii 2<-elem␤»
Timbus or use @() 04:57
m: my %h; my @a = i => 1, ii => 2; %h{'a'} = @a; say $_ ~ '<-elem' for @(%h{'a'})
camelia rakudo-moar 847bd5: OUTPUT«i 1<-elem␤ii 2<-elem␤»
atroxaper Timbus: that is it!
I dind't know that we can use multi sigils in Perl6 04:58
dalek href="https://modules.perl6.org:">modules.perl6.org: e3219ea | (Tim Smith)++ | / (2 files):
Fix UTF-8 encoding mismatch

When the string is read (from Mojo UA), it's not flagged as utf8. To then encode_utf8($str) (convert a Str to a Buf, basically), and then write that buf to a :encoding<UTF-8> handle, causes double-encoding.
Instead, the raw string should be decoded from utf8, which turns on the utf8 flag. Then writing to the :encoding<utf-8> filehandle will do the right thing.
05:01
thou ^ I'm not sure that UTF-8 fix will take effect for all projects, since some bad stuff might be cached in proto.json 05:03
To see the bug I'm fixing, look at, e.g., Math::Tau's description on modules.perl6.org/ 05:04
Mouq softmoth++ 05:09
Or thou++ 05:10
you++
I think that may have to be updated manually
dalek c: 9fc3426 | Mouq++ | lib/Language/grammars.pod:
Add a section about named regexes
05:12
thou :)
Mouq got distracted by Imgur for a few hours >_>
bed&
thou gnight
dalek href="https://modules.perl6.org:">modules.perl6.org: dc65e12 | (Tim Smith)++ | web/index.tmpl:
Fix indentation of projects with logos
05:26
xenoterracide travis-ci.org/xenoterracide/p6-ann...s/28095322 now abusing travis 05:28
thou xenoterracide++ Very, very nice. :-) 05:34
Only took <7m to run. 05:36
moritz Mouq: I'm pretty sure PerlJam++ would let you steal from github.com/perlpilot/perl6-docs/tr...ster/intro for regex/grammar intros 06:52
dalek c: abdd691 | (Kamil Kułaga)++ | lib/Language/classtut.pod:
adde begin and end code
07:50
thou I'm pretty happy I just added load-template-from-file support to Template::Mustache, so it's very usable at this point. 08:15
moritz thou: blog about it! 08:22
thou Good idea. I learned a lot of tricks for grammars. Mostly by reading nom/src/Perl6/Grammar.nqp 08:27
and Actions.nqp 08:28
I think I'm still missing a few large chunks of understanding, though.
dalek href="https://modules.perl6.org:">modules.perl6.org: 66c3dcb | (Tim Smith)++ | web/index.tmpl:
Increase page width to handle long module names
08:38
thou OK, that's my last real display annoyance for modules.perl6.org fixed. Time for bed. Good night, #perl6! 08:39
masak good antenoon, #perl6 08:52
moritz \o masak, * 09:34
vendethiel m: (^5).map{.say if * ^ff *}; 09:45
camelia rakudo-moar 847bd5: OUTPUT«Cannot call 'map'; none of these signatures match:␤:(Any: Whatever, *%_)␤:(Any: Any $block, Any :label($label), *%_)␤ in block at /tmp/sTys7K5dYi:1␤␤»
vendethiel m: (^5).map: {.say if * ^ff *};
camelia rakudo-moar 847bd5: OUTPUT«1␤2␤3␤4␤»
vendethiel ooh :D.
ff++
vendethiel oooh, but ff has terrible precedence :( 09:49
m: (^5).map({$^a == 1 ff * ?? 'yea' !! 'no'}); 09:50
camelia ( no output )
vendethiel m: (^5).map({$^a == 1 ff * ?? 'yea' !! 'no'}).perl.say;
camelia rakudo-moar 847bd5: OUTPUT«(1,).list␤»
vendethiel m: (^5).map({($^a == 1 ff *) ?? 'yea' !! 'no'}).perl.say;
camelia rakudo-moar 847bd5: OUTPUT«("no", "yea", "yea", "yea", "yea").list␤»
dalek c: 1dca24e | Kamil++ | lib/Language/classtut.pod:
reverted =begin code because it casued html generation error
10:20
timotimo can we link to the advent calendar and RC from the main page of doc.p6.org? 10:23
moritz RC is fine
I don't know how up-to-date the advent calendar posts are kept, though
on second thought, maybe linking to perl6.org/documentation/ would be best 10:24
timotimo could be 10:25
dalek c: 3c80575 | Kamil++ | lib/Language/classtut.pod:
Replaced tab with spaces. POD parsing is very sensitive to that
11:35
vendethiel Can I get any feedback on ff's precedence ? 11:52
That seems both conterintuitive and that seems to reduce the usefulness 11:53
(or maybe it's ?? !!'s precedence that's unusual) 11:55
p6: (^5).map({$^a == 1 ff * ?? 'yea' !! 'no'}).perl.say; 11:56
camelia niecza v24-109-g48a8de3: OUTPUT«("", 1, "", "", "").list␤» 11:57
..rakudo-{parrot,jvm,moar} 847bd5: OUTPUT«(1,).list␤»
vendethiel p6: (^5).map({($^a == 1 ff *) ?? 'yea' !! 'no'}).perl.say;
camelia rakudo-{parrot,jvm,moar} 847bd5, niecza v24-109-g48a8de3: OUTPUT«("no", "yea", "yea", "yea", "yea").list␤»
masak what does the `*` resolve to in that evaluation? 12:08
masak oh, it's just a Whatever. 12:09
yes, I see now.
TimToady well, ff and ??!! are the same precedence, but note that they are right associative 12:24
yoleaux 19 Jun 2014 22:55Z <raiph> TimToady: S06:715 says "a loop as the final statement would be evaluated as a map"; this is now a fossil, right?
synopsebot Link: perlcabal.org/syn/S06.html#line_715
vendethiel TimToady: do you think we could change it ? 12:34
vendethiel I really think it's confusing. 12:40
TimToady it used to have its own precedence level, and we decided that was about one precedence level too many
vendethiel I'm willing to bet anybody trying this will get bit :/ 12:41
TimToady only if they combine ff and ??!!
vendethiel that's what I meant by "this".
TimToady ff is not a common thing, much less common than ??!! 12:42
one must consider the cognitive load of a separate precedence level as well
vendethiel that doesn't mean it should be confusing, does it ?
TimToady it is impossible to remove all sources of confusion without introducing others 12:44
ff is just not that important
waterbed theory
vendethiel oh, you can't "eliminate" complexity, that's common sense 12:45
i'm just trying to get it to DWIM 12:46
TimToady well, ??!! is also a world of WAT
vendethiel why ? because of its associativity ?
TimToady because people try to overuse it, to the detriment of readability 12:47
vendethiel feels to me that this adheres to perl's mantra, no ?
TimToady there's a lot of language design that has to do with pragmatics, not semantics :)
vendethiel I mean, not to try to prevent people from using it
TimToady we don't prevent people, but we can't use precedence to eliminate all parentheses 12:48
(^20).foo is another persistent WAT
vendethiel yeah, most definitely.
TimToady or rather, ^20.foo
but I don't see a way to fix it without introducing the opposite problem
vendethiel m: sub postfix:<^>(Int $n) { ^$n }; 20^.length.say;
camelia rakudo-moar 847bd5: OUTPUT«No such method 'length' for invocant of type 'Range'␤Did you mean 'elems', 'chars', 'graphs' or 'codes'?␤ in block at /tmp/hvGlsoZEKi:1␤␤» 12:49
vendethiel m: sub postfix:<^>(Int $n) { ^$n }; 20^.elems.say;
camelia rakudo-moar 847bd5: OUTPUT«20␤»
vendethiel This would work but makes 0 sense.
TimToady likewise, if you want (1 + 2) * 3, there's no way to fix that with precedence without breaking 1 + 2 * 3 12:50
the best we can do is try to keep parentheses clear of other WAT-inducing overloadings 12:51
which is why p6 is much more strict about foo(1+2) vs foo (1+2) than p5 is, or differently strict 12:53
p5 confuses people between postfix () and circumfix ()
vendethiel (I'll take your word on that one, I don't know p5) 12:54
and indeed, ff needs to be at a different level than ==.
TimToady there's also some mnemonic value in lumping together two weird "either/or" operators that each want right associativity 12:59
I think you're the first person who has actually stumbled against the fact that the would rather be left associative with respect to each other 13:00
*they
we could possibly make them X associative, which would rule out using them together, but other X levels typically have left-associative semantics, if they care 13:02
I guess it's mostly the short-circuiting logic operators that care about order but are list associative 13:03
we have to get out of this timeshare in, yow, 52 minutes (and get over to the hackathon, yay) 13:08
afk & 13:09
masak the voice recognition in my new phone is so good that I'm pondering writing blog posts with it. 13:23
clearly some advances have been made since I got my last phone (3 years ago).
masak oh, and about ff and family: I have never used them. I write a lot of Perl 6 code, and I have never stumbled upon a case where I felt even remotely tempted to use them. 13:24
maybe it's just me.
masak but I think part of it is that something like the DWIMmery of Perl 5 is gone from it: there's no automatching against $. aka $*IN.ins 13:25
woolfy Oh boy... TimToady: there is no hackathon today! 13:29
The hackathon rooms are today in use as workshop rooms 13:30
Well, perigrin is keeping watch now outside the workshop rooms, he will tell TimToady
colomon Doesn't that just mean you've got to find a different location for the hackathon? Surely there's a local bar with wifi.... 13:37
;) 13:38
lizmat hehe... even a lounge :-)
we'll see
amirite is perl 6 out yet 13:39
i think this team could benefit from pivotal tracker and scrum 13:40
rindolf Hi all. 13:42
yoleaux 14 Jun 2014 21:04Z <TimToady> rindolf: I just seem to be zigging when you're zagging, but you can always leave a PM, you don't have to ask...
rindolf TimToady: can I PM you?
Ah.
Already did. 13:44
amirite: there are beta versions of Perl 6.
amirite: and Perl 6 proved of a lot of inspiration to the perl 5 core, to CPAN and to other languages and ecosystems. 13:45
amirite: that put aside, I think Perl has become a bit too inbred lately - www.shlomifish.org/humour/fortunes/...-gods-truh . 13:46
I find Perl conferences boring and dull in comparison to Sci-Fi/Fantasy/RPGs/Comics/etc. conferences. 13:47
masak doesn't
FROGGS_ rindolf: I don't feel the same way btw :o)
rindolf FROGGS_: ok.
masak: fair enough.
FROGGS_: did you attend a major sci-fi/fantasy/etc. con? 13:48
FROGGS_ especially the stuff about P6 is very entertaining, some stuff about P5 isn't
rindolf FROGGS_: ah.
moritz perl conferences can kindle new excitment for programming
FROGGS_ rindolf: no, I just wanna say the Perl conferences arn't boring or dull
masak I tend to be excited by Perl 5 talks nearly as much as by Perl 6 talks on conferences. 13:49
moritz also, meeting the people in meatspace that you talk to over the internet all year is kinda exciting, no matter if the context is perl or something else
masak what moritz said.
rindolf FROGGS_: I feel much the same about pure-Buffyism and Classical Randian Objectivism.
well, Perl meetups are fine.
FROGGS_ I... don't understand that sentence about Buffyism 13:50
rindolf FROGGS_: OK, then go to one - some photos I took - www.flickr.com/photos/shlomif/sets...3111982891
FROGGS_: Buffy kinda stagnated too.
FROGGS_ well, okay
masak rindolf: I liked your off-topic stuff much better when you were building your own better-than-Perl-6 language.
rindolf: these days, it's just off topic. 13:51
rindolf FROGGS_: and went out of fashion due to being too inbred.
masak: sorry.
masak no need to apologise.
rindolf masak: OK, on topic.
masak \o/
rindolf Well, Perl 6 is not really my thing. 13:52
FROGGS_ goes back to building the high sleeper (deadline is tomorrowish)
rindolf I like reading the advent calendars - lots of good stuff there.
I was trying to triangulate though.
masak triangulate?
rindolf Based on what Larry said in his quote.
masak: make an analogy.
masak I don't think I know which quote you mean. 13:53
rindolf masak: this one - www.shlomifish.org/humour/fortunes/...-gods-truh
masak: All Truth is God's truth. 13:54
it's pretty shory.
it's pretty short.
masak rindolf: that quote would have been a lot more valuable if it'd had a year.
rindolf: as it contains the substring "this year"... 13:55
xenoterracide privatepaste.com/63764ac3e1 perl6-m is telling me the trait doesn't exist
rindolf masak: cos.polyamory.org/text/T/lwall-keynote.txt
masak oh, but the source has a year.
1997.
right.
rindolf masak: yes.
masak I wonder how that went :)
anyway, Perl 6 is kind of talking to Java these days.
xenoterracide I expect I'd have to do something different to add a trait to an attribute? 13:56
rindolf masak: well, Larry failed eventually I think, but Inline::Java is mostly OK.
masak xenoterracide: I think it shouldn't be Mu:U
rindolf: ok, good to know.
xenoterracide masak: what would be the appropriate? is it Attribute? (note that that trait applies to a class fine) 13:57
masak xenoterracide: I think it's Variable... but check the existing examples in src/core/traits.pm 14:00
no, Attribute:D looks fine.
xenoterracide masak: ty
not sure I fully understand why Mu:U doesn't work there, I'd think a Mu:U could be applied to anything 14:01
masak not sure. 14:04
cognominal is there a built-in operator to compare same length arrays? 14:05
xenoterracide pokes about for how to get the metaclass for that attribute 14:06
moritz cognominal: compare how? there's for example eqv 14:09
colomon cognominal: or <<==>> (for instance) 14:10
errr, >>==<<
moritz [&&] @a »==«
[&&] @a »==« @b
[&&] @a »eq« @b
colomon oh, good point. moritz++
moritz @a eqv @b
cognominal I think I want eqv indeed 14:11
hoelzro how does one count the number of times a regex matches a string? 14:19
in Perl 5, I might do something like my $count = () = /pattern/g 14:20
masak hoelzro: +$str.comb 14:21
well +$str.comb($rx)
xenoterracide $e.^attributes -> { $_.name } obviously not right... 14:22
hoelzro ah ha! thanks masak 14:24
masak m: class C { has ($.foo, $.bar); has $.baz }; say .name for C.^attributes
camelia rakudo-moar 847bd5: OUTPUT«$!foo␤$!bar␤$!baz␤»
rindolf masak: sorry , I went for a walk. 14:25
xenoterracide hmm... why do I think theirs a postfix way of chaining off the collection itself, probably too much java 14:28
masak rindolf: 's ok. I didn't feel we left any particular stone unturned. 14:31
rindolf masak: OK.
masak: well, Perl is also a culture, and we could derive inspiration from cultures/idea systems that are not software techs per-ce. 14:32
masak per se* 14:34
and yes, I agree.
in many senses, the software world is too inward-looking. 14:35
I guess that's because, in many way, what we are doing has never been done before.
but that doesn't meen we don't share structures with other kinds of communities.
vendethiel masak: well, I just wanted to avoid "any(@els[^++state$ ])" because ewW. 14:39
masak vendethiel: yeah, that triggers my "mixing mutable state and parallel construct" warning bells. 14:46
vendethiel masak: and that's better written as `@els[$^a] ff *`
I only just realized I could do that when re-reading advent2011
masak m: for "The limerick packs laughs anatomical\nInto space that is quite economical.\nBut the good ones I've seen\nSo seldom are clean\nAnd the clean ones so seldom are comical.".lines -> { .say if /seen/ ff /clean/ } 16:34
camelia rakudo-moar 847bd5: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in block at /tmp/hHHK0qtpqu:1␤␤»
masak m: for "The limerick packs laughs anatomical\nInto space that is quite economical.\nBut the good ones I've seen\nSo seldom are clean\nAnd the clean ones so seldom are comical.".lines { .say if /seen/ ff /clean/ }
camelia rakudo-moar 847bd5: OUTPUT«But the good ones I've seen␤So seldom are clean␤»
masak m: for "The limerick packs laughs anatomical\nInto space that is quite economical.\nBut the good ones I've seen\nSo seldom are clean\nAnd the clean ones so seldom are comical.".lines { .say if /seen/ ff^ /clean/ }
camelia rakudo-moar 847bd5: OUTPUT«But the good ones I've seen␤»
masak m: for "The limerick packs laughs anatomical\nInto space that is quite economical.\nBut the good ones I've seen\nSo seldom are clean\nAnd the clean ones so seldom are comical.".lines { .say if /seen/ ^ff /clean/ }
camelia rakudo-moar 847bd5: OUTPUT«So seldom are clean␤»
masak m: for "The limerick packs laughs anatomical\nInto space that is quite economical.\nBut the good ones I've seen\nSo seldom are clean\nAnd the clean ones so seldom are comical.".lines { .say if /seen/ ^ff^ /clean/ }
camelia ( no output )
timotimo how come so little is going on here today? and in #moarvm, too? 16:44
masak timotimo: jnthn is having a weekend off. 16:45
A stateful and somewhat weird op
That goes by the name of "flipflop" Dijkstra would hate it But here's how we rate it:
It gets disregarded nonstop
tadzik doesn't know
timotimo hehe.
masak argh, irssi butching my limerick.
tadzik today I'm spending 8 hours on a train to see a friend getting married for one hour
timotimo i like that poem
masak I'm not gonna paste it again, you'll just have to imagine it right.
tadzik worth it :) 16:46
timotimo it's not as dirty as expected
masak troo, flipflops themselves are much dirtier.
timotimo aye
lucas hello developers. is it ok to send pull requests for small comestic changes in the specs? 18:19
*cosmetic word changes 18:21
tadzik sure
welcome to #perl6 :)
lucas ok, thanks!
cognominal this eating the cpu : gist.github.com/cognominal/97929bf9f94d4b67e518 18:26
it observes a file a run perl6 on it if modified.
Am I doing something wrong? 18:27
cognominal should I say, except for eating the cpu, it works fine? 18:37
moritz cognominal: except not using the file notification API? looks fine to me, at first glance 18:38
but I'm no concurrency expect at all
cognominal I did not notice there was a file notification API in Perl 6. 18:40
moritz cognominal: see t/spec/S17-supply/watch_path.t 18:55
cognominal thx 18:59
vendethiel So, I just learned there's a p5 addict teacher that's converted his students in a uni near me. 19:11
cognominal where that? 19:25
vendethiel cognominal: jussieu's uni
lucas so, I was reading the HTML rendered version of S02 and noticed there is two sections named "Twigils" which are identical. can anyone confirm that? 19:34
the pod file differs from the rendered output on the perlcabal site. 19:35
is that correct?
moritz lucas: it's rendered at different heading levels 19:47
not sure what goes wrong there
cognominal lucas, it seems to concatenate two sections with the same name, and each sections is rendered as the concatenation
Probably, the programs uses a hash and assumes no two headers can have the same name 19:49
lucas thanks, i thought i was seeing things
i agree with this "concatenation" theory
cognominal nice catch 19:51
masak lucas++ 20:06
itz anyone know of a popular linux console font which is well supplied with unicode snowmen and all that jazz? 20:45
cognominal are they many of them? 20:46
&#x2603;
FROGGS_ itz: I use Monospace (Ubuntu) 20:47
cognominal .u &#x2603
yoleaux U+0023 NUMBER SIGN [Po] (#)
U+0026 AMPERSAND [Po] (&)
U+0030 DIGIT ZERO [Nd] (0)
FROGGS_ .u U+2603
yoleaux U+2603 SNOWMAN [So] (☃)
FROGGS_ perl6-m -e 'say "\x2603"' 20:48
and yes, it shows the snowman
TimToady you can always throw extra .ttf files into your .fonts dir 20:49
I currently have: Aegean.ttf Aegyptus_B.ttf Aegyptus_R.ttf Akkadian.ttf Analecta.ttf Anatolian.ttf Gardiner.ttf HAN NOM A.ttf HAN NOM B.ttf Maya.ttf Musica.ttf Symbola.ttf Unidings.ttf 20:51
FROGGS_ Font Awesome is missing :o) 20:52
itz say "\c[WANING CRESCENT MOON SYMBOL]"
does anyone see that?
FROGGS_ m: say "\c[WARNING CRESCENT MOON SYMBOL]"
camelia rakudo-moar 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/hHvN8uQR86␤Unrecognized character name WARNING CRESCENT MOON SYMBOL␤at /tmp/hHvN8uQR86:1␤------> say "\c[WARNING CRESCENT MOON SYMBOL⏏]"␤»
FROGGS_ m: say "\c[WANING CRESCENT MOON SYMBOL]"
camelia rakudo-moar 847bd5: OUTPUT«🌘␤»
FROGGS_ can't see it 20:53
itz I suspect few if any fonts have it :(
cognominal xchat-azure shows it on my mac. 20:54
TimToady firefox shows it
moritz not here
irclog.perlgeek.de/perl6/2014-06-21#i_8909970 # for reference
FROGGS_ TimToady: not here
TimToady okay, my firefox shows it 20:55
my console shows it
oh, wait 20:56
WANING, not WARNING
oh, that's what you did
I'm guessing it's in Symbola
cognominal safari shows it but not chrome on my mac. 20:57
TimToady or maybe Unidings
virtualsue WOMM 20:59
i don't think it's news that it works on mac FF however 21:01
itz yes its in both those latter two fonts (in "ttf-ancient-fonts" debian package)
FROGGS_ TimToady: would it do any harm if I add the unspecced subbuf-rw to rakudo? 21:11
TimToady FROGGS_: That seems fine to me. 22:20