»ö« 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. |
|||
00:03
pdcawley left
|
|||
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 | |||
00:09
uniejo joined
00:16
uniejo left
00:21
jnap left,
uniejo joined
00:23
jnap joined
|
|||
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 | |
00:30
telex left
|
|||
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» | ||
00:32
telex joined
|
|||
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 ) | ||
00:35
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
|
|||
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» | ||
00:41
jnap1 joined,
jnap1 left,
jnap left
00:42
BenGoldberg left,
BenGoldberg joined
|
|||
xenoterracide | privatepaste.com/9b74ef7f65 what is the difference in parameters here that one of the calls doesn't see enough? | 00:42 | |
00:53
thou left
|
|||
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 | |
00:53
jack_rabbit_ joined
|
|||
camelia | rakudo-moar 847bd5: OUTPUT«okNot 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) | |||
01:00
hoverboard left
01:08
jack_rabbit_ left
01:15
Su-Shee_ joined
01:18
Su-Shee left
01:20
klapperl joined
|
|||
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 | |
01:23
klapperl_ left
|
|||
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 | |
01:33
FROGGS_ joined
01:37
FROGGS left
|
|||
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 |
|||
01:39
xdoctor left
01:43
kurahaupo joined
|
|||
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 | |||
01:55
flussence left
|
|||
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 | ||
01:57
flussence joined
|
|||
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 | ||
02:10
xenoterracide left
02:20
xenoterracide joined
|
|||
xenoterracide | back | 02:20 | |
02:20
rindolf joined
02:25
jakesyl joined
|
|||
Mouq | xenoterracide: Ahh, ok. In Perl 6, it's supposed to be more built-in, though not quite implemented yet: | 02:25 | |
02:25
jakesyl left,
jakesyl joined
|
|||
Mouq | m: class Xyz:ver<4.2.3> { ... } | 02:25 | |
camelia | rakudo-moar 847bd5: OUTPUT«===SORRY!=== Error while compiling /tmp/K0Ei40_A7SThe following packages were stubbed but not defined: Xyzat /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! | ||
02:30
jakesyl left
|
|||
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 | |||
02:36
noganex_ joined
|
|||
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 | ||
02:38
noganex left
|
|||
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/Af8FZ87cJrTwo terms in a rowat /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_yTq3IjVCannot 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/XpESU5xSLCMethod '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/PtI7ccjFpdMethod '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/0aIID3Md5nMethod '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/_EVubqfeJtCannot 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_DxCannot 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 | |
03:22
atroxaper joined
|
|||
xenoterracide is in your code breaking your shit, maybe someday you'll be in mine returning the favor | 03:27 | ||
03:28
btyler joined
|
|||
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 | ||
03:45
xenoterracide left,
xenoterracide joined
|
|||
Mouq | \o/ | 03:45 | |
03:48
thou joined
04:01
kurahaupo left
04:03
hoverboard joined
04:04
kst joined
04:06
atroxaper left
04:07
atroxaper joined
|
|||
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/../../../../..» | |||
04:11
atroxaper left
|
|||
lizmat | well, maybe symlinks shouldn't use rel2abs then | 04:12 | |
04:14
kaare_ joined
|
|||
lizmat | maybe I should go to sleep :-) | 04:14 | |
04:14
atroxaper joined
|
|||
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…» | |||
04:18
BenGoldberg left
04:21
gfldex left
|
|||
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<-elemii 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<-elemii 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 | |
05:29
atroxaper left
05:33
btyler left
|
|||
thou | xenoterracide++ Very, very nice. :-) | 05:34 | |
Only took <7m to run. | 05:36 | ||
05:41
xenoterracide left
06:29
woolfy1 left,
lizmat left
06:30
uniejo_ joined
06:32
uniejo left
06:39
lizmat joined
06:44
kurahaupo joined
06:45
mr-foobar left
06:46
woolfy joined
|
|||
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 | |
06:56
darutoko joined
06:58
hoverboard left
07:02
kaare_ left
07:03
uniejo_ left
07:04
uniejo_ joined
07:10
atroxaper joined,
Rotwang joined
07:21
uniejo joined
07:22
woolfy left
07:23
uniejo_ left,
lizmat left
|
|||
dalek | c: abdd691 | (Kamil Kułaga)++ | lib/Language/classtut.pod: adde begin and end code |
07:50 | |
08:04
labster left
08:12
gfldex joined
|
|||
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 | |
08:19
Akagi201 joined
|
|||
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. | |||
08:32
kivutar joined
08:34
itz joined
|
|||
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 | |
08:39
atroxaper left
08:40
atroxaper joined,
atroxaper left,
atroxaper joined
08:45
denis_boyun_ joined,
woosley left
08:47
atroxaper left,
woosley joined
08:49
woosley left
08:51
itz left
|
|||
masak | good antenoon, #perl6 | 08:52 | |
08:52
spider-mario joined,
sue_ joined
08:54
woosley joined
09:04
thou left,
kurahaupo left
09:08
sue_ left
|
|||
moritz | \o masak, * | 09:34 | |
09:35
kurahaupo joined
09:37
ivanshmakov left,
ivanshmakov joined
09:42
dmol joined
|
|||
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«1234» | ||
vendethiel | ooh :D. | ||
ff++ | |||
09:47
Psyche^ joined
09:48
Su-Shee_ is now known as Su-Shee
09:49
atroxaper joined
|
|||
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» | ||
09:51
Psyche^_ left
09:59
woosley left
10:04
SevenWolf left
10:11
atroxaper left
10:12
atroxaper joined
10:14
woosley joined
10:17
vendethiel left
10:18
vendethiel joined
|
|||
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 | ||
10:25
dmol left
|
|||
timotimo | could be | 10:25 | |
10:25
vendethiel left
10:27
vendethiel joined
10:32
atroxaper left
10:37
user3 joined
10:47
felher left
10:48
atroxaper joined
11:15
kaare_ joined
11:16
atroxaper left,
atroxaper joined
11:21
atroxaper left
11:26
user3 left
|
|||
dalek | c: 3c80575 | Kamil++ | lib/Language/classtut.pod: Replaced tab with spaces. POD parsing is very sensitive to that |
11:35 | |
11:37
sqirrel joined
11:48
uniejo left,
lizmat joined,
woolfy joined
11:51
avar joined
11:52
kaare_ left
|
|||
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» | ||
12:07
araujo left
|
|||
masak | what does the `*` resolve to in that evaluation? | 12:08 | |
12:09
araujo joined,
araujo left,
araujo joined
|
|||
masak | oh, it's just a Whatever. | 12:09 | |
yes, I see now. | |||
12:15
sqirrel left
12:18
atroxaper joined
12:22
atroxaper left
|
|||
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 | |
12:38
denis_boyun_ left
|
|||
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 ? | ||
12:42
sqirrel joined
|
|||
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 ==. | |||
12:55
avar left,
avar joined
|
|||
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 | ||
13:14
xenoterracide joined
13:18
sqirrel left
13:20
atroxaper joined
|
|||
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). | |||
13:23
kaare_ joined
13:24
uniejo joined
|
|||
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. | |||
13:25
atroxaper left
|
|||
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 | |
13:28
uniejo left
|
|||
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. | ||