Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-10-13

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:09 oddark joined #perl6
00:31 hohoho joined #perl6
00:33 colomon joined #perl6
00:41 blueperson1102 joined #perl6
00:45 [Coke] m: (1..5).combinations(3);
00:45 camelia rakudo-moar fa024f: ( no output )
00:45 [Coke] m: (1..5).combinations(3).say
00:45 camelia rakudo-moar fa024f: OUTPUT«((1 2 3) (1 2 4) (1 2 5) (1 3 4) (1 3 5) (1 4 5) (2 3 4) (2 3 5) (2 4 5) (3 4 5))␤»
00:45 [Coke] nice idiom for summing those individual lists?
00:46 Juerd Where are react and whenever documented?
00:46 leont IME specially react isn't documented much, whenever I've seen pop up in a few places
00:47 Juerd Or, lacking documentation, what does "Cannot find method 'CALL-ME'" mean?
00:47 [Coke] Juerd: react doesn't seem to be in docs.perl6.org; best docs so far are probably jnthn++'s slides.
00:47 leont That's the function calling method
00:48 leont https://gist.github.com/jnthn/a56fd4a22e7c43080078 also helps
00:48 [Coke] Juerd: you tried to invoke something that isn't invokable.
00:48 [Coke] m: say 3.();
00:48 camelia rakudo-moar fa024f: OUTPUT«Cannot find method 'CALL-ME'␤  in block <unit> at /tmp/mzS91stogq:1␤␤»
00:48 [Coke] ^^
00:48 laouji joined #perl6
00:48 Juerd [Coke]: Thanks. That helped me find a p5ism
00:49 Juerd Tried $b .= $str on a Blob $b
00:49 blueperson1102 joined #perl6
00:49 Juerd ~= doesn't work either but at least it tells me why :)
00:50 Juerd leont: Thanks. Will read :)
00:53 Juerd Neither Buf nor Blob will take ~=. How can I have a binary buffer and append to it?
00:59 ShimmerFairy m: say Buf.new(1,2,3).append(Buf.new(4,5))  # maybe?
00:59 camelia rakudo-moar fa024f: OUTPUT«This representation (VMArray) cannot unbox to a native int␤  in block <unit> at /tmp/KqykYgG2RP:1␤␤»
00:59 ShimmerFairy aw
01:00 ShimmerFairy m: say Buf.new(1,2,3) ~ Buf.new(4,5)
01:00 camelia rakudo-moar fa024f: OUTPUT«Buf:0x<01 02 03 04 05>␤»
01:00 ShimmerFairy Juerd: infix:<~> seems to work
01:01 ShimmerFairy m: my $a = Buf.new(1,2,3); $a ~= Buf.new(4,5); say $a
01:01 camelia rakudo-moar fa024f: OUTPUT«Buf:0x<01 02 03 04 05>␤»
01:01 ShimmerFairy as does ~=
01:01 llfourn joined #perl6
01:02 ShimmerFairy Juerd: are you trying to concat a string and a buffer? Because you have to manually convert one of them first. Perl 6 can't generally guess how to encode/decode the other thing correctly :)
01:02 Juerd They work if I try them in isolation, but the Buf from the tap from .bytes-supply won't have itself added to my own empty Buf.
01:03 Juerd http://pastebin.com/2frBBN74  # line 14 breaks
01:03 Juerd (But is reported as line 7...)
01:05 Juerd "Cannot use a Buf as a string, but you called the Stringy method on it"
01:05 ShimmerFairy Juerd: aside from debug says to check the types of $buf and $received, I wouldn't know what to do.
01:06 Juerd It works if I assign an empty buffer
01:06 Juerd So having  my Buf $buf = pack("");  seems to work around the problem. I don't understand why.
01:07 Juerd Assigning a Buf.new works too. Apparently it won't autovivify with ~=
01:07 ShimmerFairy me neither, I don't anything about how pack works (since AFAICT it's just some unspecified version of P5's), much less async stuff :)
01:08 Juerd pack's actually documented on doc.perl6.org
01:09 Juerd m: my Buf $buf; $buf ~= Buf.new;
01:09 camelia rakudo-moar fa024f: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in block <unit> at /tmp/BBSPh2LiF8:1␤␤»
01:09 Juerd That's basically what I appear to be running into
01:09 ShimmerFairy m: my Buf $buf; say $buf.WHAT
01:09 camelia rakudo-moar fa024f: OUTPUT«(Buf)␤»
01:09 Juerd But I don't know if it's a bug
01:09 ShimmerFairy m: say Buf ~ Buf.new
01:09 camelia rakudo-moar fa024f: OUTPUT«Use of uninitialized value of type Buf in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in any  at gen/moar/m-Metamodel.nqp:1674␤Cannot use a Buf as a string, but you called the Stringy method on it␤ …»
01:10 Juerd m: my Str $str; $str ~= Str.new
01:10 camelia rakudo-moar fa024f: ( no output )
01:10 Juerd I'd expect it to work like that one.
01:10 ShimmerFairy yeah, that's definitely odd. I'll go poke at some --target=qast output to see if there's an appreciable difference there :)
01:11 ShimmerFairy well, s/qast/ast/ :P
01:12 ShimmerFairy m: my Buf $b; $b ~ Buf.new
01:12 camelia rakudo-moar fa024f: OUTPUT«WARNINGS:␤Useless use of "~" in expression "$b ~ Buf.new" in sink context (line 1)␤Use of uninitialized value of type Buf in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in any  at gen/moar/m-Metamod…»
01:12 ShimmerFairy m: my Buf $b; say $b ~ Buf.new
01:12 camelia rakudo-moar fa024f: OUTPUT«Use of uninitialized value of type Buf in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in any  at gen/moar/m-Metamodel.nqp:1674␤Cannot use a Buf as a string, but you called the Stringy method on it␤ …»
01:13 ShimmerFairy Juerd: definitely seems like a bug to me, in any case
01:14 aborazmeh joined #perl6
01:14 aborazmeh joined #perl6
01:14 ShimmerFairy Juerd: oh! I think it may be hitting the infix:<~>(\a, \b) candidate, that's probably why it calls Stringy (since there's only a signature for Blob:D args)
01:15 BenGoldberg joined #perl6
01:16 ShimmerFairy m: say Str ~ Str
01:16 camelia rakudo-moar fa024f: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/fVr2rMktMW:1␤Use of uninitialized value of type Str in string context␤Any of .^name, .pe…»
01:16 ShimmerFairy notice how that warns about stringification, because it's likely getting .Stringy called on type objects
01:18 ShimmerFairy m: my Str $a; $a ~= "*"; say $a
01:18 camelia rakudo-moar fa024f: OUTPUT«*␤»
01:18 ShimmerFairy m: my Buf $a; $a ~= Buf.new(42); say $a
01:18 camelia rakudo-moar fa024f: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in block <unit> at /tmp/aHGMYGK8x7:1␤␤»
01:18 Juerd Hmm
01:19 aborazmeh joined #perl6
01:19 aborazmeh joined #perl6
01:19 ShimmerFairy Juerd: looks like something lets    my Str $a; $a ~= "*"    work without throwing a stringification warning, and Blobs don't get that.
01:20 Juerd A lot of things don't work as I expect them to, and at each step I wonder if I'm doing something wrong or if it's a bug. Very frustrating.
01:21 ShimmerFairy m: my $a; $a ~= "*";
01:21 camelia rakudo-moar fa024f: ( no output )
01:21 ShimmerFairy m: my $a; $a ~= Buf.new(42);
01:21 camelia rakudo-moar fa024f: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in block <unit> at /tmp/6v6dZilnGP:1␤␤»
01:21 ShimmerFairy ^ showing that it's not the type constraint that contributes anything
01:22 blueperson1102 joined #perl6
01:22 ShimmerFairy Juerd: that just means the bugs are getting weirder, which means the simple ones have been taken care of :P
01:22 Juerd m: class MyBuf is Buf { }; my MyBuf $buf = pack "a*", "foo";
01:22 camelia rakudo-moar fa024f: OUTPUT«Type check failed in assignment to $buf; expected MyBuf but got Buf␤  in block <unit> at /tmp/Kf8yD__yyv:1␤␤»
01:23 Juerd So I can't assign a Buf to my child class. Fine, I thought, I'll try a role! But no...
01:23 Juerd m: role MyBuf is Buf { }; my Buf $buf does MyBuf = pack "a*", "foo";
01:23 camelia rakudo-moar fa024f: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/Vez_XSsUb0:1␤␤»
01:23 Juerd m: role MyBuf is Buf { }; my Buf $buf does MyBuf .= new;
01:23 camelia rakudo-moar fa024f: OUTPUT«Cannot modify an immutable Scalar+{MyBuf}␤  in block <unit> at /tmp/XA3FoNuobv:1␤␤»
01:24 ShimmerFairy m: sub MY_METAOP_ASSIGN($a is rw, $b) { $a = &infix:<~>.( $a // &infix:<~>.(), $b ) }; my $xyzzy;  MY_METAOP_ASSIGN($xyzzy, "4")
01:24 camelia rakudo-moar fa024f: ( no output )
01:24 ShimmerFairy m: sub MY_METAOP_ASSIGN($a is rw, $b) { $a = &infix:<~>.( $a // &infix:<~>.(), $b ) }; my $xyzzy;  MY_METAOP_ASSIGN($xyzzy, Buf.new(4))
01:24 camelia rakudo-moar fa024f: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in sub MY_METAOP_ASSIGN at /tmp/r3z1VyYHRq:1␤  in block <unit> at /tmp/r3z1VyYHRq:1␤␤»
01:24 ShimmerFairy m: say &infix:<~>().perl
01:24 camelia rakudo-moar fa024f: OUTPUT«""␤»
01:24 ShimmerFairy and that's the problem; the fallback 'no-args' of the infix only accounts for strings, not buffers :)
01:24 pierrot joined #perl6
01:25 Juerd I just wanted a $buf.parse so it could parse itself. But I'm giving up and making a regular sub.
01:25 Juerd A sub that, yuch, will modify its argument.
01:26 pierrot_ joined #perl6
01:26 ShimmerFairy Juerd: I found the problem at least, now I need to think of a solution. (One that accounts for both buffers and strings -- hm)
01:27 Juerd ShimmerFairy: I can barely follow your explanation, so I can't suggest any solution...
01:29 ShimmerFairy Juerd: that MY_METAOP_ASSIGN sub I wrote is what the  ?=  assignment calls (where ? stands for any infix operator). For the left argument $a that it assigns to, it uses either $a, or calls &infix:<?>() if $a is undefined
01:30 ShimmerFairy Juerd: that's why  my $a; $a ~= "42";    doesn't throw a stringification warning; since $a is undefined, it does  $a = &infix:<~>() ~ "42"  instead of   $a = $a ~ "42"
01:31 ShimmerFairy Unfortunately, &infix:<~>() returns a string object, which fails for trying to concat buffers
01:32 Jaglor joined #perl6
01:35 ShimmerFairy I'm half-worried the solution will involve a base role for Blob and Stringy (only half because I've been thinking about something along those lines anyway)
01:36 Juerd I see
01:37 Juerd Personally I really wouldn't mind if Str and Buf could be exchanged.
01:37 ShimmerFairy And to those playing at home: no, 'Stringy' should not be that base role; too many people do and will think it's just about strings, not buffers :)
01:37 Juerd Having to say pack("a*", "string literal") is annoying anyway.
01:37 ShimmerFairy Juerd: the problem is that we don't know how to encode a string, or decode a buffer, since there are so many choices.
01:37 ShimmerFairy Juerd: say "abc".encode("utf16")
01:37 Juerd Do whatever pack a* does...
01:37 ShimmerFairy m: say "abc".encode("utf16")
01:37 camelia rakudo-moar fa024f: OUTPUT«utf16:0x<61 62 63>␤»
01:38 Juerd m: say "€".pack("a*")
01:38 camelia rakudo-moar fa024f: OUTPUT«Method 'pack' not found for invocant of class 'Str'␤  in block <unit> at /tmp/p_c2qJCczY:1␤␤»
01:38 Juerd Er.
01:38 ShimmerFairy Juerd: ^^^ that's the preferred way of conversion btw, using Str.encode and Blob.decode
01:38 Juerd m: say unpack "a*", "€"
01:38 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ey42dELxsL␤Undeclared routine:␤    unpack used at line 1. Did you mean 'pack'?␤␤»
01:38 Juerd Aargh. I keep messing those up.
01:38 ShimmerFairy m: say Buf.new(0x2A, 0x3F).encode("utf8")
01:38 camelia rakudo-moar fa024f: OUTPUT«Method 'encode' not found for invocant of class 'Buf'␤  in block <unit> at /tmp/wonucMwNQc:1␤␤»
01:38 Juerd m: say pack "a*", "€"
01:38 camelia rakudo-moar fa024f: OUTPUT«Buf:0x<e2 82 ac>␤»
01:38 ShimmerFairy m: say Buf.new(0x2A, 0x3F).decode("utf8")
01:38 camelia rakudo-moar fa024f: OUTPUT«*?␤»
01:39 Juerd I don't really care about the encoding if my string is ASCII, tbh.
01:39 Juerd And most of my string literals will be ascii.
01:39 Juerd I have a feeling that regarding binary data, correctness is now endangering pragmatism.
01:40 ShimmerFairy m: say Buf.new(0xC2, 0xA5).decode("utf-8")
01:40 camelia rakudo-moar fa024f: OUTPUT«¥␤»
01:40 ShimmerFairy m: say Buf.new(0xC2, 0xA5).decode("iso-8859-1")
01:40 camelia rakudo-moar fa024f: OUTPUT«Â¥␤»
01:41 Juerd It took a while before I got why "return if $d & 0x80;" would return even if $d was 0 ;)
01:41 ShimmerFairy Juerd: the problem is that Perl 6 generally can't magically discover how you want to decode or encode something, or even which side you mean to convert.
01:42 Juerd ShimmerFairy: Sure it can. I'm giving a Str where a Buf is expected: I want it to encode. I'll accept any(ASCII, latin1, utf8) as a pragmatic default for that.
01:45 ShimmerFairy Juerd: I meant more in cases like   Str ~ Buf   ; do you mean to change the buffer to a string, or the string to a buffer? (And then of course, what encoding do we use?)
01:45 Juerd latin1 (or actually, codepoint-value to byte 1-on-1) would be the most pragmatic choice.
01:45 Juerd ShimmerFairy: For ~ it can't know, but for ~= it can definitely let the LHS win.
01:45 ShimmerFairy Juerd: we might be able to set up some nice defaults if you're using the utf8, utf16, or utf32 buffers, but in the general case it's not possible (or at least not feasible).
01:45 Juerd I don't believe that it would be impossible or not feasible.
01:46 ilbot3 joined #perl6
01:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:46 ShimmerFairy Juerd: one the on hand, I agree that it's less convenient that you have to do the conversions yourself. On the other hand, though, I appreciate that Perl 6 makes you conscious of the fact that you're about to change between a high-level and low-level look at the data :)
01:48 Juerd I think that it would make sense for string literals specifically, not necessarily for things that come from external sources, to just interpret strings as a buf-compatible thing.
01:48 ShimmerFairy m: say "¥€".encode
01:48 camelia rakudo-moar fa024f: OUTPUT«utf8:0x<c2 a5 e2 82 ac>␤»
01:48 Juerd Alternatively, to have a short function that does this.
01:48 ShimmerFairy I forgot about this for a second, but .encode at least defaults to UTF-8 :)
01:48 Juerd I'm grateful that at least pack's a* will just encode for me
01:49 ShimmerFairy Unfortunately, I don't think Perl 6 can make such a distinction between literals and non-literals (except maaaaaybe in the future implementation of macros, and probably if you end up working with a slang)
01:50 ShimmerFairy (and even with literals, you still run into "how should I encode this?" troubles)
01:51 Juerd Couldn't there be a StrLiteral class that just lets itself be molded into whatever is necessary?
01:52 tokuhirom joined #perl6
01:52 Juerd I have a new question. How can I remove the first $x bytes from a Buf?
01:53 Juerd It has .subbuf, but that one doesn't mutate.
01:53 cognominal joined #perl6
01:55 ShimmerFairy In any case, Juerd++ for finding an unusual edge case :)  It's an interesting puzzle. (the src/core/metaops.pm doesn't feature any specialized multis for certain cases, so I know I shouldn't go that route)
01:56 Juerd m: my Buf $buf = "foo".encode; $buf .= subbuf(2); $buf.say
01:56 camelia rakudo-moar fa024f: OUTPUT«Type check failed in assignment to $buf; expected Buf but got utf8␤  in block <unit> at /tmp/xt_YaKPylN:1␤␤»
01:56 Juerd Can't just encode.
01:56 Juerd m: my Buf $buf = pack "a*", "foo"; $buf .= subbuf(2); $buf.say
01:56 camelia rakudo-moar fa024f: OUTPUT«Buf:0x<6f>␤»
01:56 blueperson1102 joined #perl6
01:56 Juerd This'll work, for now, to remove things from the beginning.
01:56 ShimmerFairy Juerd: unfortunately, Blobs have a pretty wimpy feature set (it's something I've noticed, and would like to amend, as well). Unfortunately, the best course right now is to call .list, do list manipulations with that, and then make a new buffer :(
01:56 ShimmerFairy m: say utf8 ~~ Buf
01:56 camelia rakudo-moar fa024f: OUTPUT«False␤»
01:56 ShimmerFairy m: say utf8 ~~ Blob
01:56 camelia rakudo-moar fa024f: OUTPUT«True␤»
01:57 ShimmerFairy Juerd: also, just to let you know, 'Blob' is the base buffer type, not 'Buf'. That's why you couldn't assign that utf8 object to a Buf-constrained object, since utf8 doesn't do Buf.
02:01 dayangkun joined #perl6
02:03 Juerd I thought blobs were immutable bufs
02:03 tokuhirom joined #perl6
02:05 ShimmerFairy Juerd: that's one way of seeing it, but in reality Bufs are Blobs with the addition of mutability.
02:06 ShimmerFairy Blobs don't "remove" immutability instead, since a subclass/role actively removing features is AFAIK a bit more difficult to do.
02:07 Juerd http://pastebin.com/z9KNRzgR  # Some progress. I can connect and receive the connection acknowledgement.
02:07 Juerd I'm off to bed now.
02:07 Juerd Tomorrow I'll try to understand what react/whenever even does
02:08 ShimmerFairy ♞ Juerd o/ :)
02:08 thou m: my $x; $x <== 1..7; dd $x;
02:08 camelia rakudo-moar fa024f: OUTPUT«Array $x = $[(1, 2, 3, 4, 5, 6, 7),]␤»
02:08 Juerd (And read that document that leont linked)
02:08 Juerd ShimmerFairy: Thanks for your support :)
02:09 ShimmerFairy Juerd: no problem. I hope I helped you understand things, even if there are parts of the Blob setup you're still not a fan of :)
02:09 Juerd Oh, $buf.subbuf($offset++, 1).unpack("C") can probably be written as $buf[$offset++]...
02:10 thou I'm wondering if that's expected, and why feed is making an array-with-single-seq out of that.
02:10 Juerd Yea, that still works.
02:10 Juerd Good night :)
02:11 ShimmerFairy thou: not sure, last I remember feed operators were still quite a bit NYI (though that easily could've changed, it's been a while since I've seen much of them myself)
02:11 thou Yeah. I'm trying to fix up perl6-examples test run. I'll just hack it to work.
02:11 thou s/work/pass/
02:19 ShimmerFairy m: role Foo { method bar { "FOO" } }; class Baz does Foo { has $.bar };  say Baz.new(:42bar).bar    # bug or intended?
02:19 camelia rakudo-moar fa024f: OUTPUT«FOO␤»
02:20 noganex joined #perl6
02:22 dalek ecosystem: 54d9678 | (David Farrell)++ | META.list:
02:22 dalek ecosystem: Added Pod-PerlTricks
02:22 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/54d967836e
02:30 hohoho joined #perl6
02:51 dayangkun joined #perl6
02:59 jevin joined #perl6
03:14 ShimmerFairy m: sub foo($bar, *@baz) { }
03:14 camelia rakudo-moar fa024f: ( no output )
03:14 ShimmerFairy m: sub foo(:$a, $bar, *@baz) { }
03:14 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xOKErzuDT6␤Cannot put required parameter $bar after variadic parameters␤at /tmp/xOKErzuDT6:1␤------> 3sub foo(:$a, $bar7⏏5, *@baz) { }␤    expecting any of:␤        constraint␤»
03:15 ShimmerFairy I can potentially accept this being wrong, not so much the error message that claims the required param comes *after* the variadic :)
03:16 ShimmerFairy m: sub foo(:$bar, $baz) { }   # apparently the slurpy doesn't matter, it just claims "variadic" after a named
03:16 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7JX3qbiCvI␤Cannot put required parameter $baz after variadic parameters␤at /tmp/7JX3qbiCvI:1␤------> 3sub foo(:$bar, $baz7⏏5) { }   # apparently the slurpy doesn't ␤    expecting any of:␤       …»
03:23 lolisa joined #perl6
03:29 hohoho joined #perl6
03:56 skids m: sub foo(:$bar!, $baz) { }
03:56 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0MADDyxueJ␤Cannot put required parameter $baz after variadic parameters␤at /tmp/0MADDyxueJ:1␤------> 3sub foo(:$bar!, $baz7⏏5) { }␤    expecting any of:␤        constraint␤»
04:00 FireFly joined #perl6
04:06 opal joined #perl6
04:14 opal left #perl6
04:30 dalek doc/makefile: 95b9fa5 | coke++ | Makefile:
04:30 dalek doc/makefile: Add makefile help for all targets
04:30 dalek doc/makefile: review: https://github.com/perl6/doc/commit/95b9fa5b67
04:30 dalek doc/makefile: 401400b | coke++ | / (3 files):
04:30 dalek doc/makefile: Use same CDN as perl6.org does
04:30 dalek doc/makefile: review: https://github.com/perl6/doc/commit/401400b94f
04:35 laouji joined #perl6
04:37 dustinm` joined #perl6
04:39 Ben_Goldberg joined #perl6
04:39 pochi_ joined #perl6
04:42 obra joined #perl6
04:43 felher joined #perl6
04:52 vendethiel joined #perl6
04:56 lsm-desktop joined #perl6
04:59 colomon joined #perl6
04:59 * TimToady home
05:06 Woodi joined #perl6
05:16 obra joined #perl6
05:17 jkva joined #perl6
05:30 hohoho joined #perl6
05:38 KotH joined #perl6
05:40 hohoho joined #perl6
05:42 gonz_ joined #perl6
05:47 vendethiel joined #perl6
06:01 domidumont joined #perl6
06:02 [Sno] joined #perl6
06:02 MilkmanDan joined #perl6
06:02 thou m: (1...*).elems.say
06:02 camelia rakudo-moar fa024f: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/N7JXAffPso:1␤Cannot  a lazy list␤  in block <unit> at /tmp/N7JXAffPso:1␤␤Actually th…»
06:04 telex joined #perl6
06:06 tokuhirom joined #perl6
06:06 [Tux] test             50000    37.870    37.756
06:06 [Tux] test-t           50000    39.612    39.498
06:06 domidumont joined #perl6
06:06 diana_olhovik_ joined #perl6
06:14 gtodd1 joined #perl6
06:16 llfourn joined #perl6
06:23 jevin_ joined #perl6
06:24 apotheon_ joined #perl6
06:25 felher joined #perl6
06:26 yakudza joined #perl6
06:26 ambs joined #perl6
06:26 darutoko joined #perl6
06:28 firstdayonthejob joined #perl6
06:28 bjz joined #perl6
06:31 colomon joined #perl6
06:32 FROGGS joined #perl6
06:33 dalek perl6-examples: beaaa98 | (Tim Smith)++ | / (5 files):
06:33 dalek perl6-examples: Fix some GLR problems
06:33 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/beaaa98c1b
06:33 dalek perl6-examples: df4b05f | (Tim Smith)++ | / (12 files):
06:33 dalek perl6-examples: Fix some tests to work post-GLR
06:33 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/df4b05f536
06:34 ][Sno][ joined #perl6
06:37 sokoro33 joined #perl6
06:37 sokoro33 I see Perl 6 doesn't support this - returning value from the condition blocks:
06:37 sokoro33 my $var1 = if 12 {
06:37 sokoro33 33
06:37 sokoro33 } else {
06:37 sokoro33 44
06:37 sokoro33 }
06:37 sokoro33 Is that right? Or is possible still to do something similar?
06:37 llfourn sokoro33: try 'do if'
06:38 llfourn m: say do if True { 'true' } else { 'false' }
06:38 camelia rakudo-moar fa024f: OUTPUT«true␤»
06:39 Ven joined #perl6
06:39 sokoro33 @llfourn, could you give the link where it describes what "do if" is?
06:39 sokoro33 I can't find it
06:40 llfourn soloro33: tbh I don't even know where it is!
06:41 llfourn but put do in front of anything control statement and it will return something
06:42 llfourn sokoro33: found it. http://docs.perl6.org/language/control#do
06:44 llfourn m: say do for ^3 { $_ }
06:44 camelia rakudo-moar fa024f: OUTPUT«(0 1 2)␤»
06:44 llfourn cool and do for gathers the final values of each iteration and returns them as a list
06:45 sokoro33 do you mean to wrap the "if { ... } else {.. } " into "do { ... } "?
06:45 llfourn nah just put 'do' before 'if'
06:45 sokoro33 and put "if { ... } " inside it?
06:45 llfourn m: say do if True { 'true' } else { 'false' }
06:45 camelia rakudo-moar fa024f: OUTPUT«true␤»
06:45 llfourn like that :)
06:45 sokoro33 ok, thanks.
06:48 FROGGS m: say (if True { 'true' } else { 'false' })
06:48 camelia rakudo-moar fa024f: OUTPUT«true␤»
06:48 llfourn FROGGS: eh how does that work?
06:48 FROGGS you just need something that moves the thingy to statement level
06:48 llfourn I see...
06:49 llfourn my $var1 = if True { ... }
06:49 llfourn FROGGS: RHS is not the statement level there?
06:49 FROGGS no, because we have statement modifying if/unless/for etc
06:50 FROGGS so you need do either add parens or 'do' to tell the compiler what you meant
06:50 llfourn m: my $a = ( if Tue { "true" } ); say $a;
06:50 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5===␤Function Tue needs parens to avoid gobbling block␤at /tmp/BY6tHMvAlP:1␤------> 3my $a = ( if Tue { "true" }7⏏5 ); say $a;␤Missing block (apparently taken by 'Tue')␤at /tmp/BY6tHMvAlP:1␤------> 3my $a = ( if Tue { "true…»
06:50 hohoho joined #perl6
06:50 llfourn m: my $a = ( if True { "true" } ); say $a;
06:50 camelia rakudo-moar fa024f: OUTPUT«true␤»
06:51 llfourn okie doke
06:53 dalek perl6-examples: 6f05981 | (Tim Smith)++ | categories/shootout/ (3 files):
06:53 dalek perl6-examples: Fix categories/shootout tests
06:53 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/6f059814e9
06:55 bjz joined #perl6
06:58 Ven joined #perl6
06:59 zemmihates joined #perl6
07:01 Ven joined #perl6
07:03 Ven joined #perl6
07:05 Ven_ joined #perl6
07:06 CIAvash joined #perl6
07:07 tokuhirom joined #perl6
07:08 Ven joined #perl6
07:16 xfix joined #perl6
07:16 Ven joined #perl6
07:22 nine .tell [Coke] Can you _please_ fix my RT user (nine@detonation.org). All I get is http://niner.name/rt.perl.org.png and it's so frustrating to work with.
07:22 yoleaux nine: I'll pass your message to [Coke].
07:24 FROGGS .tell [Coke] does it make sense to make somebody else an RT-admin too? I'd volunteer fwiw
07:24 yoleaux FROGGS: I'll pass your message to [Coke].
07:26 arunesh joined #perl6
07:26 Ven o/, #perl6!
07:26 arunesh Hi
07:27 arunesh #perl6
07:28 FROGGS hi Ven, arunesh
07:28 arunesh Hi Froggs
07:29 Ven_ joined #perl6
07:30 DrForr_ Mornin' all.
07:30 arunesh @FROGGS may you give me some ideas about modules to be still written in perl6
07:31 DrForr_ There's a 'most wanted' list on perl6.org.
07:31 Ven joined #perl6
07:31 FROGGS arunesh: that depends on what you are interested in...
07:32 FROGGS arunesh: often it helps to start with a module that you really like (from another language), and that you know well
07:32 arunesh @FROGGS thanks
07:33 El_Che https://github.com/perl6/perl6-most-wanted/blob/master/most-wanted/modules.md ?
07:33 FROGGS El_Che: aye
07:33 Ven joined #perl6
07:35 dalek perl6-most-wanted: 92f9a9b | FROGGS++ | most-wanted/bindings.md:
07:35 dalek perl6-most-wanted: mention my XML::LibXML bindings (as WIP)
07:35 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/92f9a9b18f
07:35 Ven joined #perl6
07:36 lizmat good *, #perl6!
07:36 FROGGS morning lizmat
07:37 lizmat FROGGS p/
07:37 nine Good morning lizmat! Thanks for the p6weekly :)
07:37 El_Che "good whatever" sounds pretty sarcastic :)
07:37 FROGGS aye, lizmat++
07:37 lizmat you're welcome!
07:37 El_Che is there a new one? \o/
07:38 zakharyas joined #perl6
07:39 lizmat El_Che: it *is* called a weekly  :-)
07:39 El_Che yeah, and Christmas is a yearly event :P
07:39 FROGGS *g*
07:40 Ven joined #perl6
07:40 El_Che anyway, /me a p6weekly fan
07:43 * moritz also
07:44 El_Che A good Japanese representation there
07:45 abraxxa joined #perl6
07:47 ely-se joined #perl6
07:53 g4 joined #perl6
07:56 lizmat yes, Matsuno san and Kawakami san have been very busy!
07:56 llfourn joined #perl6
07:59 Ven_ joined #perl6
07:59 dalek perl6-examples: 2603f6f | (Tim Smith)++ | categories/ (4 files):
07:59 dalek perl6-examples: Fix up a few more post-GLR issues
07:59 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/2603f6fa2d
08:00 arunesh joined #perl6
08:02 Ven joined #perl6
08:04 Ven joined #perl6
08:06 bjz_ joined #perl6
08:06 leont joined #perl6
08:09 BooK I was looking at http://perl6maven.com/push-vs-append-on-arrays-in-perl6
08:09 BooK and vaguely remembered something about * doing flattening
08:10 BooK so I tried @b.push: *@a, but that broke. so I looked at Array.^methods, and found .flat
08:10 BooK and trying @b.push( @a.flat ) gave surprising (to me, and old perl5 fart) results
08:11 JimmyZ |@a ?
08:12 BooK m: my @a = <foo bar>; my @b; @b.push: @a; @b.push( @a.flat ); say @b.perl;
08:12 camelia rakudo-moar fa024f: OUTPUT«[["foo", "bar"], ("foo", "bar").Seq]␤»
08:12 BooK and @b has two elements
08:13 JimmyZ m: my @a = <foo bar>; my @b; @b.push: |@a; @b.push( @a.flat ); say @b.perl;
08:13 camelia rakudo-moar fa024f: OUTPUT«["foo", "bar", ("foo", "bar").Seq]␤»
08:13 lizmat BooK: .push / .unshift do *not* flatten *at all* anymore
08:13 BooK yes, that's what gabor's post explained
08:13 lizmat this is to ensure that you can do @a.push(@b.pop) without having to fear what was popped
08:13 JimmyZ m: my @a = <foo bar>; my @b; @b.push: |@a; @b.push( |@a); say @b.perl;
08:13 camelia rakudo-moar fa024f: OUTPUT«["foo", "bar", "foo", "bar"]␤»
08:13 BooK I was exploring other ways to flatten
08:14 BooK so | is doing what I mis-remembered * was doing
08:14 JimmyZ m: my @a = <foo bar>; my @b; @b.push: |@a; @b.push( @a.Slip); say @b.perl;
08:14 camelia rakudo-moar fa024f: OUTPUT«["foo", "bar", "foo", "bar"]␤»
08:14 FROGGS * is for the receiving end
08:14 BooK and .flat and | do different things
08:14 JimmyZ m: my @a = <foo bar>; my @b; @b.push: @a.Slip; @b.push( @a.Slip); say @b.perl;
08:14 camelia rakudo-moar fa024f: OUTPUT«["foo", "bar", "foo", "bar"]␤»
08:14 grondilu m: my @a = <foo bar>; my @b; @b.push: sub { @_}(*@a);
08:14 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XLjtGYvynD␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/XLjtGYvynD:1␤------> 3= <foo bar>; my @b; @b.push: sub { @_}(*7⏏5@a);␤    expecting any of:␤        infix…»
08:15 grondilu m: my @a = <foo bar>; my @b; @b.push: (sub { @_})(*@a);
08:15 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Wm3Za7BsTa␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/Wm3Za7BsTa:1␤------> 3<foo bar>; my @b; @b.push: (sub { @_})(*7⏏5@a);␤    expecting any of:␤        infix…»
08:15 grondilu m: my @a = <foo bar>; my @b; @b.push: (sub { @_})(@a);
08:15 camelia rakudo-moar fa024f: ( no output )
08:15 * Ven thinks the flattening will still bite people, as you have no idea which context if `f()` in... not only for the @b.pop or @a.push case.
08:16 BooK my example produces a @b with two elements, apparently an array and a sequence
08:16 softmoth yay, perl6-examples passes all tests on travis-ci
08:16 RabidGravy joined #perl6
08:16 pmurias joined #perl6
08:17 Ven softmoth++
08:17 pmurias Juerd: re using latin1 as a default please don't do that
08:19 Hor|zon joined #perl6
08:22 dalek ecosystem: 94b0144 | (Marc Chantreux)++ | META.list:
08:22 dalek ecosystem: add Rototo to eco
08:22 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/94b0144240
08:22 dalek ecosystem: fe86f88 | RabidGravy++ | META.list:
08:22 dalek ecosystem: Merge pull request #73 from eiro/master
08:22 dalek ecosystem:
08:22 dalek ecosystem: add Rototo to eco
08:22 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/fe86f88123
08:22 eiro \o/
08:22 bjz joined #perl6
08:23 eiro hello people
08:23 hohoho joined #perl6
08:23 Ven o/
08:23 larion joined #perl6
08:25 gtodd joined #perl6
08:25 tadzik hello eiro!
08:26 lizmat eiro o/
08:27 masak heiro! \o
08:27 masak (the "h" is silent, 'cus French)
08:31 Ven no, that's not true :)
08:31 BooK the "h" is not always silent
08:32 Woodi joined #perl6
08:32 Ven in "hopital", it's silent, in "héro" it's not
08:32 BooK EFRENCHOVERFLOW # how many of us are there here?
08:32 Ven erm, héros.
08:32 Ven BooK: too many *g*
08:32 BooK but haricot
08:32 lizmat sais pas
08:32 Ven lizmat++ # united
08:32 * masak .oO( hapricot )
08:33 BooK https://en.wikipedia.org/wiki/Aspirated_h
08:33 lizmat https://docs.google.com/presentation/d/1zQ3wbL4aH4fs5hsCicl9nKHTy_RGVKXKgig8wnok_aw/edit?pli=1#slide=id.p  # Perl 5 vs Perl 6 at Orange County, California
08:35 lizmat afk for a few hours&
08:35 BooK was the craigslist talk recorded?
08:38 llfourn BooK: I've heard that it was but they are going to take ~2 weeks to put it up
08:39 BooK llfourn: thanks for the info
08:40 masak lizmat: s/supercede/supersede/
08:40 dakkar joined #perl6
08:40 masak also, s/LarryWall/Larry Wall/, unless you implement him in Java
08:41 * masak .oO( does the ILarryWall interface )
08:41 hohoho joined #perl6
08:41 Ven joined #perl6
08:42 ely-se eww type-level hungarian notation
08:43 Ven_ joined #perl6
08:45 hohoho_ joined #perl6
08:45 Ven joined #perl6
08:47 masak ely-se: even Hungarian notation can be OK, when people think first instead of just cargo-culting something that doesn't help in their domain.
08:47 ilmari arguably sigils are a form of hungarian notation
08:48 masak aye.
08:48 masak and arguably the sigils fit the Perl domain pretty well ;)
08:48 ely-se type-level sigils
08:48 pmurias masak: isn't Hungarian notation mostly a symptom of missing type system features?
08:48 espadrine joined #perl6
08:49 masak pmurias: I'm not sure there's an objective answer to that ;) but I'm sure some would argue that, yes. maybe even convincingly.
08:50 hohoho joined #perl6
08:51 pmurias it also seems to be equal parts missing tool support
08:51 hohoho joined #perl6
08:51 BooK user-defined sigils?
08:51 masak even tools hinge on static analyzability in some way, so it's pretty close to things like type systems.
08:54 vytas I am planning to talk about Perl6 for University students. Are there good slides I could make use of ?
08:54 dalek perl6-examples: 0e0a5e2 | (Tim Smith)++ | / (2 files):
08:54 dalek perl6-examples: Fix brittle tests that fail randomly
08:54 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/0e0a5e2d55
08:55 pmurias masak: a superior Hungarian notation replacement would consist of a type system + tool support
08:56 llfourn vytas: check out http://jnthn.net/articles.shtml
08:56 masak I was influenced at an early point by the Spolsky article that claims that Hungarian notation should be used for the things a type system generally *can't* reach
08:57 masak like escaped string vs unescaped string
08:57 ely-se wrong
08:57 ely-se any fine type system can reach that just fine
08:57 masak though I guess type apologists will simply argue that if the type system can't handle that, then... right
08:57 masak I'll let ely-se argue that side ;)
08:57 vytas llfourn, thanks
08:57 ely-se create an EscapedString type that has the invariant that it's always escaped vOv
08:58 llfourn vytas: nw :)
08:58 masak so maybe it's fair to say that in languages like C/C++, such a Hungarian notation would still make sense?
08:58 ely-se you can do that in C and C++ :v
08:58 Ven "strings"_escaped
08:59 pmurias masak: I was referencing the Spolsky article in that the Hungarian notation is a failure of the type system
09:00 jnthn morning, #perl6
09:00 yoleaux 12 Oct 2015 20:26Z <FROGGS> jnthn: There is no spectest fallout whatsoever when removing "BEGIN Attribute.^compose;"
09:00 pmurias jnthn: morning
09:00 jnthn m: Attribute.map({ .say })
09:00 camelia rakudo-moar fa024f: OUTPUT«(Attribute)␤»
09:03 jkva joined #perl6
09:08 FROGGS $ perl6-m -e 'Attribute.map({ .say })'
09:08 FROGGS Method 'map' not found for invocant of class 'Attribute'
09:08 FROGGS okay, there we go
09:09 tokuhirom joined #perl6
09:09 FROGGS jnthn: btw, there does not seem to be a WB missing... I compared the write barriers for jvm and moar, and they cover the same ops
09:10 FROGGS ahh, err, morning jnthn :o)
09:11 jnthn Yes, that error is *exactly* why that BEGIN is there
09:12 eone joined #perl6
09:12 FROGGS yes, I understand that
09:13 jnthn OK, so: let's add that as a spectest, and then wrap the line I added that busts JVM in a #?if moar... :)
09:13 jnthn Unless you've a great desire to hunt it down further
09:13 FROGGS well, dont call it great desire, but the issue will bite us later anyway
09:14 jnthn True
09:21 spider-mario joined #perl6
09:24 rindolf joined #perl6
09:26 ely-se joined #perl6
09:29 eliasr joined #perl6
09:29 Psyche^_ joined #perl6
09:35 dalek ecosystem: eeeee73 | (Yasuhiro Matsumoto)++ | META.list:
09:35 dalek ecosystem: add p6-Path-Canonical
09:35 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/eeeee73ed4
09:35 dalek ecosystem: 96d93ed | labster++ | META.list:
09:35 dalek ecosystem: Merge pull request #74 from mattn/p6-Path-Canonical
09:35 dalek ecosystem:
09:35 dalek ecosystem: add p6-Path-Canonical
09:35 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/96d93ed344
09:35 RabidGravy joined #perl6
09:36 brrt joined #perl6
09:36 brrt good * #perl6
09:41 Ven joined #perl6
09:42 rurban joined #perl6
09:56 dalek ecosystem: ca3ccc1 | (Yasuhiro Matsumoto)++ | META.list:
09:56 dalek ecosystem: Should be META6.json
09:56 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/ca3ccc1f1f
09:56 dalek ecosystem: 6de8c38 | RabidGravy++ | META.list:
09:56 dalek ecosystem: Merge pull request #75 from mattn/fix-mattn
09:56 dalek ecosystem:
09:56 dalek ecosystem: Should be META6.json
09:56 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/6de8c38b1f
10:04 RabidGravy it feels like there has been a significant up-tick in contributions to the ecosystem
10:04 jnthn Indeed. Just after we finished breaking most things...phew. :)
10:06 RabidGravy all good :)
10:09 Ulti all the ones which aren't modules are because of all the things breaking and Travis badges being red :P its a good motivator :3
10:09 Ulti *new modules
10:09 Ulti also should it be META6.json rather than META.info
10:10 RabidGravy last time I looked things would try and use both
10:11 rurban joined #perl6
10:11 Ulti I assumed the 6 on the end is for some move towards CPAN?
10:12 Ulti also has anyone written something that produces the "provides" section?
10:12 Ulti using find and a nasty regex on the command line wasn't very satisfying
10:12 RabidGravy panda has some code that does it
10:12 moritz Ulti: iirc there is or was a panda meta-gen command or something like that
10:12 Ulti had a crossed through S11 badge on my bigger module :P again a good motivator
10:12 Ulti moritz: oh really, ok I'll look into that
10:13 xenu >cpan
10:13 Ulti RabidGravy++ moritz++
10:13 xenu pause has some support for perl6
10:13 xenu and metacpan is in the works
10:13 xenu afaik
10:13 Ulti I should get my emobot to sit on here and actually count karma
10:13 virtualsue joined #perl6
10:13 DrForr_ I need to take some time this evening to properly set up Travis, already got the account.
10:13 Ulti xenu yeah I saw the metacpan via the weekly
10:14 Ulti DrForr_ its perhaps a lot more trivial than you imagine :)
10:14 DrForr_ Oh, very likely.
10:15 moritz you need a .travis.yml which you can mostly copy&paste, and a click to enable travis for that project
10:15 DrForr_ Nod, I think I've got it on a few repos anyway, I'll echo that tonight when I get home.
10:15 Ulti also setup adding on travis website side first, then the push when you add the .travis.yml file to the repo triggers an initial build
10:16 moritz most of my time was spent on improving the test suite and stuff like that :-)
10:18 edehont joined #perl6
10:23 dalek doc/MARTIMM-patch-3: 45f0639 | (Marcel Timmerman)++ | doc/Type/DateTime.pod:
10:23 dalek doc/MARTIMM-patch-3: Default timezone spec typo
10:23 dalek doc/MARTIMM-patch-3:
10:23 dalek doc/MARTIMM-patch-3: Method now() specifies wrong timezone specification *$TZ, should be $*TZ.
10:23 dalek doc/MARTIMM-patch-3: review: https://github.com/perl6/doc/commit/45f063989e
10:25 itz_stmu1 joined #perl6
10:34 tokuhirom joined #perl6
10:36 llfourn joined #perl6
10:38 lsm-desktop joined #perl6
10:39 suman joined #perl6
10:40 suman Is perl 6 officially released?
10:40 pink_mist beta version is out
10:40 suman I mean production ready!!
10:40 pink_mist the real 6.0 won't be released for a while yet
10:40 jkva_ joined #perl6
10:40 pink_mist no
10:40 pink_mist though people do already use it in production
10:40 pink_mist but I think they're a bit too daring
10:41 suman Any time for official release???
10:41 pink_mist christmas is what's expected
10:44 suman Any data analysis package like pandas-python in perl6?
10:44 * pink_mist has no idea so has to leave that question for others
10:46 [ptc] suman: I don't think so (unfortunately).  Would be awesome to have one though!
10:47 * RabidGravy looks to see what it does
10:48 [ptc] at EuroPython someone made the comment that pandas was like Excel for Python but better
10:49 [ptc] the integration that tools like bokeh, pandas etc. have with the ipython (now called jupyter) is really impressive, and would great to have in perl6
10:49 * [ptc] is too dumb to write such things though...
10:50 suman agreed with ptc
10:51 suman bokeh, pandas, ipython tools for perl 6 would be oh oh :)
10:51 DrForr_ Well volunteered? :)
10:52 [ptc] actually, theoretically, perl6 could just target the bokeh backend and we could get that functionality reasonably quickly
10:52 suman ptc me too dumb to write such things though :(
10:53 Ulti suman stuff like a pandas module would be well after "production use"
10:53 lizmat masak: ??  corrections for what ?
10:53 Ulti python wasnt just born into existance with a full suite of scientific libraries :S
10:53 [ptc] unfortunately, it's not obvious how to build such things;  there are Scala and R packages which target bokeh, but it's not obvious from their code how the integration really happens...
10:53 grondilu for graphics stuff I'm hoping the javascript backend will allow interaction with HTML5's canvas.
10:54 [ptc] Ulti: this is true.  Python went through the process of having 3 separate numerical array implementations before thing settled on NumPy
10:54 [ptc] *things
10:54 Ulti suman the closest we have to pandas is Stats which is a couple of averages and basic stats no dataframe etc. though given how many basic types there are in Perl 6 including native arrays I don't think there will be much problem in producing something like a dataframe
10:55 DrForr_ I've got to get that OpenCV binding taken care of some time now that unsigneds are available. (yes, I know it's been there for some time...)
10:55 RabidGravy just needs someone to want to write some actual software that needs to do that
10:55 Ulti suman a lot of people have expressed interest in sorting out Jupyter integration including myself... we just need to actually try and do it
10:55 Ulti [ptc]: yeah hopefully numeric arrays will just be numeric arrays :D
10:55 itz_stmu1 . o O ( surely we need a few ORMs and MVC web frameworks first )
10:56 Ulti rather than someone making their own hacky NativeCall implementation
10:57 suman Ulti Yeah but Stats is limited in functionality.
11:02 softmoth joined #perl6
11:06 RabidGravy so with EXPORTHOW::DECLARE  one can introduce a new class-like declaration, but can you do similar for attributes?
11:08 RabidGravy i.e. replace 'has' with something else
11:08 jnthn RabidGravy: Change the keyword, or change the Attribute meta-object that's used?
11:09 RabidGravy well both really, the former for descriptive purposes
11:09 [ptc] Ulti: yeah, I hope that too :-)
11:09 RabidGravy e.g "table Foo { column $.bar; }"
11:10 jnthn OK; the former no (not without a slang), but I think the latter you can do by setting DECLARE-ing a table-attr
11:10 grondilu Ulti: I'm looking at https://github.com/Util/Perl6-Math-Quaternion/blob/master/lib/Math/Quaternion.pm6 and I'm wondering if ($.r, $.i, $.j, $.k) should not be real instead of Numeric.
11:10 grondilu *Real
11:11 Ven joined #perl6
11:11 dalek perl6-examples: a590856 | (Steve Mynott)++ | util/update-and-sync:
11:11 dalek perl6-examples: nuke moar before radudobrew build in an attempt to fix panda install on hack
11:11 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/a590856673
11:11 RabidGravy let's see
11:12 ely-se joined #perl6
11:13 masak lizmat: corrections for the Google Docs presentation you URL'd. maybe I misunderstood and it's not yours...
11:13 lizmat no, it's not mine  :-)
11:14 masak ah -- sorry 'bout that. :)
11:14 RabidGravy woah, that didn't go quite as expected "QAST::Block with cuid cuid_9_1444734809.88274 has not appeared"
11:16 lizmat afk for half an hour or so
11:19 gtodd joined #perl6
11:20 RabidGravy I think it'll be a trait for the time being ;-)
11:27 gtodd1 joined #perl6
11:31 jdv79 ugexe: huh?
11:31 laouji joined #perl6
11:32 jdv79 oh, nevermind
11:35 Juerd I still don't understand react { ... }. Is there anyone who can explain what it does?
11:36 jdv79 jnthn stated it nicely once in here...
11:37 jdv79 Juerd: http://irclog.perlgeek.de/perl6/2015-08-22#i_11099008
11:37 Juerd Thanks
11:40 ely-se joined #perl6
11:40 Juerd I wonder if it's appropriate to use in a module. From that description, probably not.
11:40 Juerd I'm attempting to port Net::MQTT::Simple; it's proving to be hard.
11:40 jnthn Juerd: Not unless you're writing an application framework, not really
11:41 jnthn Uh, too much not :)
11:41 Juerd So I should just return supplies and have the user add react {}?
11:41 jnthn Juerd: Yes.
11:42 Juerd MQTT (a publish/subscribe protocol) is the perfect opportunity to play with supplies, I think
11:42 jnthn *nod*
11:45 kid51 joined #perl6
11:49 jdv79 its not a public discussion group if i have to login to fb to see it
11:50 jdv79 why can't it actually be public; either on fb or not
11:55 hohoho joined #perl6
12:06 dalek perl6-examples: 5a1bb39 | paultcochrane++ | util/update-and-sync:
12:06 dalek perl6-examples: Purge and rebuild rakudobrew
12:06 dalek perl6-examples:
12:06 dalek perl6-examples: ... to ensure that *everything* is clean and up to date.
12:06 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/5a1bb39199
12:06 lizmat jdv79: it's a public discussion group *inside* Facebook
12:07 lizmat and it's run by people *on* Facebook
12:07 jdv79 ok
12:07 lizmat and to get on Facebook, you need a login
12:07 lizmat that's just the reality of it
12:07 El_Che brrr
12:08 lizmat well, it shouldn't stop anybody to start a group on twitter (is there such a thing?)
12:08 lizmat or somewhere else...
12:08 lizmat :-)
12:08 El_Che don't laugh with google+ :)
12:08 lizmat TIMTOWTDI
12:09 lizmat fwiw, I'm *not* on FB, but woolfy is...  :-)
12:10 lizmat .oO( in July 2014, we left 1 hour before MH17, after having been standing in line with people checking in for MH17 )
12:10 El_Che really. wow
12:11 lizmat yeah, it was really strange to hear about MH17 once we arrived in Portkand, OR
12:11 lizmat *Portland
12:12 El_Che I was in South South-East Asia a few days for the tsunami
12:12 El_Che we met a lot of people going south, to relax at the beach after a long backpacking trip
12:13 El_Che we headed home for christmas (after some 20 months on the road)
12:13 lizmat wow  :-)
12:15 El_Che (/me debugging some Ruby code now. After just some toy programming in Perl 6, I find it a lot nicer than those hipster languages :P)
12:15 lizmat it being Perl 6, I assume  :-)
12:16 El_Che yes, I am impressed. What I've seen is very neat
12:16 itz_stmuk I suppose you like both slow languages ;)
12:16 El_Che ahaha
12:16 itz_stmuk at least perl6 has the excuse of being new
12:17 El_Che I picked up Ruby using Puppet. Without being able to extend Puppet in it's native languages it's maddening limited.
12:17 dalek rakudo/nom: 52bac00 | lizmat++ | src/Perl6/World.nqp:
12:17 dalek rakudo/nom: Change boilerplate to use $*W.current_line
12:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/52bac00ed8
12:19 jdv79 is * really a valid version literal?
12:20 lizmat m: say Version.new(*)
12:20 camelia rakudo-moar fa024f: OUTPUT«vWhatever.140213059435832␤»
12:20 lizmat :-)
12:20 ShimmerFairy m: say v*
12:20 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jhlUANeCQX␤Missing required term after infix␤at /tmp/jhlUANeCQX:1␤------> 3say v*7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
12:20 ShimmerFairy m: say v1.*
12:20 camelia rakudo-moar fa024f: OUTPUT«v1.*␤»
12:20 ShimmerFairy I believe it's a wildcard in version literals, might be wrong
12:21 jdv79 so a version of * in a META6.json file is invalid?
12:21 moritz m: say Version.new('*')
12:21 camelia rakudo-moar fa024f: OUTPUT«v*␤»
12:21 moritz seems to be valid
12:21 moritz just not as a literal
12:22 jdv79 that's an interest case then.  a non-changing version designating different dists
12:22 jdv79 is that spec'd?
12:22 cgfbee joined #perl6
12:23 jdv79 seems like a bad, and possibly useless and possiblyt complicating, idea on the surface of it.
12:24 jdv79 i know pause can't do that now.  can any pkg mgmt system do that?
12:24 ShimmerFairy I'm not sure what the question is.
12:24 itz_stmuk is it intended to return precompilation to panda? or does it belong elsewhere?
12:25 lizmat jdv79: the code says: my @parts = $s.comb(/:r '*' || \d+ || <.alpha>+/);
12:25 ShimmerFairy itz_stmuk: rakudo is supposed to do it. It was removed from panda for both "this is getting annoying to manage" reasons and "let's incentivize putting it in rakudo" reasons :)
12:26 lizmat what ShimmerFairy said
12:29 * lizmat is hoping jnthn will have some time to look at it soon
12:31 rvosa joined #perl6
12:33 jdv79 right now there are META6.json files that contain a version value of *
12:34 jdv79 is that valid and if so how is that to be handled?  i'm hoping no.
12:34 itz_stmuk m: Str $foo = "a";
12:34 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zKcrxEeXOV␤Two terms in a row␤at /tmp/zKcrxEeXOV:1␤------> 3Str7⏏5 $foo = "a";␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤…»
12:34 itz_stmuk m: $foo= "a"
12:34 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1v4YS4iVZC␤Variable '$foo' is not declared␤at /tmp/1v4YS4iVZC:1␤------> 3<BOL>7⏏5$foo= "a"␤»
12:35 lizmat jdv79: it may be a valid Version value, but I don't think we want to allow that in a META6 file
12:37 dalek rakudo/nom: 0e60be5 | lizmat++ | src/core/Version.pm:
12:37 dalek rakudo/nom: Allow creation of a bare Whatever Version
12:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0e60be5838
12:37 jdv79 maybe this is part of the friction/difference between a versioned world and what we use now (tip of gh repo)
12:38 ShimmerFairy as I see it, wildcard versions are more for the 'use'ing side, not so much the module side :)
12:38 jdv79 that's what i thought
12:38 ShimmerFairy jdv79: I think the real problem there is that github is a Terrible Solution™ for distributing releases of something. That's why we need CURLI working, so we can use CPAN :)
12:38 tokuhirom joined #perl6
12:38 jdv79 and installing from github as we do now - how will that work?
12:39 jdv79 if i don't incr the version in my META file then is that invalid of handled somwehere?
12:39 jdv79 ShimmerFairy: basically:)
12:39 ShimmerFairy I think github installation has to be "bleeding edge", in the interest of not making the module installer pull its hair out :)
12:39 lizmat jdv79: it would be just another content storage
12:40 jdv79 ok so i have v1.1 of Foo at HEAD and i add a commit and then install it again what happens?
12:40 tadzik I once thought of making it so panda checks for the "version" value and then checks out what's in there with gith
12:40 jdv79 its still v1.1 but its a different commit
12:40 tadzik git* (when installing from github)
12:40 lizmat the real problem comes when you have multiple versions of modules from github installed, and they share the same api value
12:40 tadzik that allows people to use github for everything and still have proper versioned releasese
12:40 lizmat and you are not specific enough in your selection criteria
12:41 tadzik so: if you have 1.1 in META, then whatever git calls 1.1 gets installed, no matter how many commits are above it
12:41 lizmat by the version selection logic we worked out with e.g. FROGGS, you could argue you should select the most recent one
12:41 Ven mmh, looking at the docs for Str, I can't seem to find it. do we have a method to pad a string?
12:41 jdv79 so panda gets git tag support?
12:42 jdv79 tadzik: is that what you mean?
12:42 ShimmerFairy jdv79: lots of projects have things set to the next release version while developing towards it (LLVM comes to mind for me). The problem is precisely that you can't trust a version in a repo
12:42 lizmat Ven: pad a string how ?
12:42 loren joined #perl6
12:42 Ven lizmat: add spaces at the right
12:42 ShimmerFairy jdv79: I don't think so, not every project will use tags :)
12:42 lizmat printf ?
12:42 Ven s/at/to/
12:42 jdv79 well panda has to rely on something, no?
12:42 jdv79 its ripe territory for thought at least
12:42 ShimmerFairy (hence the "pulling hair out" sentiment; you'd have to comb the git repo for ~something~)
12:42 lizmat panda should not need to know where something gets installed
12:43 lizmat at most, it should select the CUR to do the installation
12:43 lizmat and then let that CUR handle the installation
12:43 ShimmerFairy jdv79: just because github calls tags "releases" doesn't mean we should fall into the same trap :P
12:44 Ven lizmat: hah, it's to the left with sprintf :P
12:44 Ven I'm bad at sprintf
12:44 jdv79 * works
12:44 dalek roast: ef63586 | lizmat++ | S02-literals/version.t:
12:44 dalek roast: Add test for bare Whatever Version
12:44 dalek roast: review: https://github.com/perl6/roast/commit/ef63586cb0
12:44 itz_stmuk Ven: see the C man page ;)
12:44 Ven itz_stmuk: I'm on the man already :P
12:45 itz_stmuk I always found that annoying in perl5 doc
12:45 moritz huh? perldoc -f sprintf
12:45 moritz 340 lines of docs
12:45 lizmat m: my $a = "foo"; say sprintf "xxx %-8s yyy", $a   # Ven
12:45 camelia rakudo-moar fa024f: OUTPUT«xxx foo      yyy␤»
12:45 tadzik jdv79: pretty much
12:46 Ven lizmat: thanks, found it at the same time :-). It's cool
12:46 lizmat m: my $a = "foo"; say sprintf "xxx %8s yyy", $a   # the other way around
12:46 camelia rakudo-moar fa024f: OUTPUT«xxx      foo yyy␤»
12:46 Ven m: (1..Inf).map({sprintf "%-5i",$_}) Z~ lines() ==> join "\n" ==> say()
12:46 camelia rakudo-moar fa024f: OUTPUT«1    Céad slán ag sléibhte maorga Chontae Dhún na nGall␤2    Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤3    Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤4    I mo dhiaidh bhí gl…»
12:46 itz_stmuk moritz: or was it printf .. I forget .. maybe it's fixed .. there was one which always pointed to the C man page anyway
12:46 Ven It's sooooo cool, being able to numerate lines like that XD
12:47 lizmat m: lines.kv -> $line, $text { say "line: $text" }
12:47 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iep3TAELQv␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/iep3TAELQv:1␤------> 3lines.kv7⏏5 -> $line, $text { say "line: $text" }␤    expecting …»
12:47 lizmat m: for lines.kv -> $line, $text { say "line: $text" }
12:47 camelia rakudo-moar fa024f: OUTPUT«line: Céad slán ag sléibhte maorga Chontae Dhún na nGall␤line: Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤line: Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤line: I mo dhiaidh bh…»
12:47 lizmat m: for lines.kv -> $line, $text { say "$line: $text" }  # sigh  :-)
12:47 camelia rakudo-moar fa024f: OUTPUT«0: Céad slán ag sléibhte maorga Chontae Dhún na nGall␤1: Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤2: Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤3: I mo dhiaidh bhí gleanntái…»
12:48 moritz itz_stmuk: the docs for printf say 'See "sprintf" for an explanation of the format'
12:48 lizmat Ven: lines.kv is your friend  :-)
12:48 moritz have since at least 5.8 :-)
12:48 Ven lizmat: hey, that sounds too easy
12:49 loren m: my @str = ("123 345 456", "abc def ghi", "213 4324 434 3"); for @str { if $_ ~~ s/\s(\S+)\s(\S+)/+$0+$1/ { say $_ }; } say @str;
12:49 camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/S9lZSyffrx␤Strange text after block (missing semicolon or comma?)␤at /tmp/S9lZSyffrx:1␤------> 3~ s/\s(\S+)\s(\S+)/+$0+$1/ { say $_ }; }7⏏5 say @str;␤»
12:49 loren m: my @str = ("123 345 456", "abc def ghi", "213 4324 434 3"); for @str { if $_ ~~ s/\s(\S+)\s(\S+)/+$0+$1/ { say $_ }; } ;say @str;
12:49 camelia rakudo-moar fa024f: OUTPUT«Use of Nil in string context  in code  at /tmp/rja9dae7mZ:1␤Use of Nil in string context  in code  at /tmp/rja9dae7mZ:1␤123++␤abc+345+456␤213+def+ghi 3␤[123++ abc+345+456 213+def+ghi 3]␤»
12:50 loren I just want replace the last whitespace with '+'
12:50 softmoth joined #perl6
12:52 loren The output is not correct.
12:53 loren '+345 +456' should be on the first line.
12:55 jkva joined #perl6
12:55 moritz m: $_ = '123 345 456'; s/.* <( \s /+/; .say
12:55 camelia rakudo-moar 0e60be: OUTPUT«123 345+456␤»
12:56 moritz this replaces the last whitespace with +
12:56 pmurias lizmat: what npm (the module manager for node.js) is using is that you either specify a version of the module from the npm repository or a github repo
12:56 ilmari what does <( mean?
12:56 loren Sorry, the last two whitespace
12:57 moritz ilmari: \K
12:57 pmurias lizmat: and for the github repo you can specify a branch/tag/commit id
12:57 ilmari moritz: ew, unbalnced parentheses
12:57 moritz ilmari: delimits the match on the left; )> delimitrs it on the right
12:57 loren moritz, sorry, it should be 'the last two whitespace'
12:59 pmurias lizmat: remember that on github there is a bazillion forks of everything
12:59 dalek perl6-examples: 9050c8b | paultcochrane++ | / (3 files):
12:59 dalek perl6-examples: Move dependencies installation into a make target
12:59 dalek perl6-examples:
12:59 dalek perl6-examples: This centralises the definition of the dependencies into one location and
12:59 dalek perl6-examples: removes their definition from the update scripts and the travis config.
12:59 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/9050c8b385
12:59 ilmari m: $_ = '123 456 789 abc'; s/ .* <( \s+ (\S+) \s+/+$0+/; .say
12:59 camelia rakudo-moar 0e60be: OUTPUT«123 456+789+abc␤»
13:00 moritz ilmari++
13:00 moritz though I still don't understand the Nil warnings in loren's example
13:01 loren m: my @str = ("123 345 456", "abc def ghi", "213 4324 434 3"); for @str { $_ ~~ s/\s(\S+)\s(\S+)/+$0+$1/; } ; .say for @str
13:01 camelia rakudo-moar 0e60be: OUTPUT«Use of Nil in string context  in code  at /tmp/vUj7XlZVNn:1␤Use of Nil in string context  in code  at /tmp/vUj7XlZVNn:1␤123++␤abc+345+456␤213+def+ghi 3␤»
13:01 loren It's wrong, obviously..
13:02 moritz : my @str = ("123 345 456", "abc def ghi", "213 4324 434 3"); for @str { s/\s(\S+)\s(\S+)/+$0+$1/; } ; .say for @str
13:02 moritz m: my @str = ("123 345 456", "abc def ghi", "213 4324 434 3"); for @str { s/\s(\S+)\s(\S+)/+$0+$1/; } ; .say for @str
13:02 camelia rakudo-moar 0e60be: OUTPUT«Use of Nil in string context  in code  at /tmp/XBURqzR227:1␤Use of Nil in string context  in code  at /tmp/XBURqzR227:1␤123++␤abc+345+456␤213+def+ghi 3␤»
13:02 loren 123++ \n abc+345+456 \n 123+def+ghi 3\n
13:02 moritz aye, it doesn't seem to work the frist time
13:02 moritz but why?
13:03 loren m: my @str = ("123 345 456", "abc def ghi", "213 4324 434 3"); for @str { if $_ ~~ /\s(\S+)\s(\S+)/ { say $/ }; } ;
13:03 camelia rakudo-moar 0e60be: OUTPUT«「 345 456」␤ 0 => 「345」␤ 1 => 「456」␤「 def ghi」␤ 0 => 「def」␤ 1 => 「ghi」␤「 4324 434」␤ 0 => 「4324」␤ 1 => 「434」␤»
13:03 loren The regex match was right
13:05 Ven_ joined #perl6
13:05 jnthn lizmat: Digging into some work on pre-comp management design and stuff at the moment.
13:06 lizmat jnthn++
13:06 dalek perl6-examples: b6f1b3e | paultcochrane++ | Makefile:
13:06 dalek perl6-examples: List dependencies more nicely
13:06 dalek perl6-examples:
13:06 dalek perl6-examples: Which should also make extending the list easier
13:06 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/b6f1b3e225
13:06 dalek perl6-examples: 26a20a5 | paultcochrane++ | util/update-and-sync:
13:06 dalek perl6-examples: Only build Rakudo and install Panda if really necessary
13:06 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/26a20a5193
13:10 Hor|zon joined #perl6
13:13 RJ250 joined #perl6
13:15 sufrostico joined #perl6
13:19 AndroUser joined #perl6
13:19 ely-se joined #perl6
13:20 AndroUser Hi. Any human here?
13:20 RabidGravy psch, bio2jack was the thing I was thinking about last night, nice simple interface and no callbacks
13:20 lizmat AndroUser o/
13:21 lizmat I have been told I'm human
13:21 AndroUser Hehehe nice...
13:21 jonadab My college roommate told me I'm half human.
13:21 jonadab "Half human, half Vulcan, and half integrated circuit", were his exact words, IIRC.
13:22 RabidGravy wasn't a maths undergraduate then
13:22 RabidGravy ;-)
13:22 jonadab No, _I_ was a math major.  He was a counseling major.
13:22 itz_stmuk "The tortoise lays on its back, its belly baking in the hot sun, beating its legs trying to turn itself over. But it can't. Not with out your help. But you're not helping"
13:22 AndroUser Man how could I start tinkering with perl6? Any faq ?
13:23 AndroUser Hhehe nice quote from blade runner
13:23 gfldex AndroUser: https://github.com/perl6/faq http://perl6.org/documentation/
13:25 AndroUser Ok, thank you buddy. I'll check the docs first and then I' ll be back here with more concise questions
13:26 AndroUser See you guys, thank you and have a fine day
13:26 timotimo maybe we should have suggested the slide set jnthn brought to olten?
13:26 timotimo http://jnthn.net/papers/2015-spw-perl6-course.pdf
13:27 * jnthn needs to push out an updated version of that slide set with various corrections...
13:27 moritz maybe link that on perl6.org/documentation?
13:27 lizmat fwiw, I will be using that slide set (translated to Dutch) in a 45 min talk at the T-Dose end of November
13:27 moritz instead of outdated wikibook crap
13:27 itz_stmuk that pdf is in rakudo star so he should notice it
13:27 moritz (unless someobody updated the wikibook recently :-) )
13:28 jnthn lizmat: I'd offer to review, but it'd be all Dutch to me :P
13:28 lizmat :-)
13:28 itz_stmuk maybe review would be possible with Dutch Courage
13:28 Jaglor left #perl6
13:29 CurtisOvidPoe joined #perl6
13:29 CurtisOvidPoe question: say 2.sqrt.WHAT prints “(Num)”. Is there any way I could take the square root of a number and get a Rat instead, thus choosing my imprecision instead of letting floating point numbers choose it for me?
13:31 lizmat CurtisOvidPoe: Rat's are a Perl 6 invention.  there's no such thing as a Rat at nqp level.  sqrt is handled by nqp at the moment
13:31 CurtisOvidPoe lizmat: thanks.
13:31 moritz CurtisOvidPoe: or short, "no"
13:31 moritz you'd have to coerce to Rat afterwards
13:32 CurtisOvidPoe Which defeats the point of avoid floating point imprecision :)
13:32 jnthn Well, more deeply than that: for all the various trigometric things we use the usual native implementations of them (which use nums)
13:32 lizmat CurtisOvidPoe: create your own √ op ?
13:32 moritz CurtisOvidPoe: not really
13:32 jnthn So we'd need to actually implement sin/cos/tan/sqrt and so forth in terms of big integers
13:33 dalek doc: e23e67e | (Steve Mynott)++ | bin/p6doc:
13:33 dalek doc: deduplicate p6doc -f output
13:33 dalek doc: review: https://github.com/perl6/doc/commit/e23e67e40e
13:33 moritz CurtisOvidPoe: rats avoid imprecions in numbers that we tend to write exactly, but that floating point numbers can't represent exactly
13:34 moritz CurtisOvidPoe: but roots, cosines, exp etc. all take us out of the realm of rational numbers, and outside the realm of numbers that we tend to write as precise decimals
13:35 * jnthn suspects that many of the times you need trigometric things are when doing science, when floating point is generally a better fit 'cus your data has errors anyway and you often care more about raw speed.
13:35 moritz and when doing trig stuff, rat isn't more precise than floats anyway
13:36 moritz it's just a different tradeoff about the numbers you can represent precisely
13:36 masak followup to CurtisOvidPoe++'s question:
13:36 masak have sqrt(2), want a Rat at a given precision.
13:36 masak what sub or method do I use to round to (let's say) 1/256th precision?
13:37 moritz m: say sqrt(2).Rat(1/256).perl
13:37 camelia rakudo-moar 0e60be: OUTPUT«<17/12>␤»
13:37 * jnthn doesn't see Rat as better than Num per se, just better suited to a bunch of very common tasks and so a better default out of what we want to huffmanize.
13:37 moritz m: say sqrt(2).Rat(1e-6).perl
13:37 camelia rakudo-moar 0e60be: OUTPUT«<1393/985>␤»
13:37 masak moritz: thanks
13:37 jnthn uh, not sure my last sentece grammared, but anyway... :)
13:37 jnthn *sentence :)
13:38 lizmat .oO( sentience )
13:38 moritz maybe it didn't grammar, but it jnthnd
13:42 CurtisOvidPoe Depends on how many bits your floating point numbers support. PI, in 8 bits, is 3.140625, which isn’t great. In 32 bits, it’s 3.141592653468251, where we get 10 decimal places in before we lose precision. With a Rat, I control the precision regardless of word length. That being said, with 64 bit computers, I seriously doubt the error rate would be signficant enough for it to be an issue today.
13:42 CurtisOvidPoe And I’m pretty sure the performance of Rats is abysmal compared to floats :)
13:43 ely-se use base pi to represent the numbers and you only need one pit (pi bit)
13:44 masak two, right?
13:44 masak pi would be encoded as "10"
13:44 CurtisOvidPoe Heh.
13:44 moritz erm, no
13:44 moritz erm, yes
13:44 * moritz confused :-)
13:44 ely-se shush
13:44 moritz no
13:44 moritz 0 = 0, 1 = pi # in base pi
13:45 FROGGS aye
13:45 moritz erm, no
13:45 pink_mist lol
13:46 moritz the last digit is always base**0
13:46 moritz so it's 10 after all
13:46 ely-se Using rationals for literals is a better default than floats even if only for the reason of not throwing away information from a literal
13:46 moritz ely-se: I think nobody here seriously argues the other way
13:47 masak moritz: easy mnemonic: in base P, the number P is always encoded as "10" :)
13:47 pink_mist moritz++ #seems to have gotten it right eventually, and I learned how to think about it from his hesitations too!
13:47 masak moritz: for example, in base -i, -i is encoded as "10"
13:47 moritz masak: as it is in base... 10. d'oh.
13:48 ely-se masak: $b_10 = 10_b$ :P
13:48 ely-se I wrote a ternary VM recently.
13:49 pink_mist is it even possible to use base 1 for anything useful?
13:49 ely-se How do you represent zero in base one?
13:49 moritz ely-se: 0
13:49 ely-se :(
13:49 masak ely-se: ε
13:49 ShimmerFairy 1 - 1
13:50 ely-se I like to go all INTERCAL and use Roman numerals.
13:53 lizmat sometimes I wish there was a way to mark a MMD candidate as "missing"
13:54 lizmat kxxv doesn't make sense on Mixes...
13:54 lizmat now I have to: +    multi method kxxv(Mixy:D:) { fail ".kxxv is not supported on a {self.^name}" }
13:54 lizmat to make sure it won't get called on a Mix
13:54 jnthn lizmat: Um, doesn't it only make sense on Bag/BagHash?
13:54 lizmat that's what I said
13:54 jnthn So it should only be in the Baggy role?
13:55 lizmat but Mix does Baggy
13:55 timotimo i agree, i would find it nice if we had that but only in case an error occurs
13:55 jnthn I...thought mixes did Mixy?
13:55 timotimo so that people don't go introspecting and trying to call methods/subs that are only supposed to die
13:55 lizmat yes, and Mixy does Baggy
13:55 jnthn Yes, I'd rather we find a way to put the method only on objects that need it
13:56 lizmat ok, it was just a thought  :-)
13:56 lizmat carry on  :-)  nothing to see here  :-)
13:56 jnthn ooc, does Baggy imply Setty also?
13:56 ShimmerFairy jnthn: only on objects that need it... now why did 'submethod' pop into my head? :P
13:56 lizmat ope
13:56 lizmat nope
13:56 jnthn Why does Mixy ~~ Baggy ooc?
13:57 jnthn Or I guess I'm asking: should it? :)
13:57 jnthn Are there other methods that don't make sense on mixes?
13:57 lizmat grab and pick
13:58 jnthn What do we do with those today if you call them on a Mix?
13:58 jnthn Also fail?
13:58 lizmat yup
13:58 lizmat fail ".grab is not supported on a {self.^name}";
13:58 lizmat fail ".pick is not supported on a {self.^name}";
13:59 jnthn OK. That is somewhat suggestive to me that we may want to question Mixy ~~ Baggy a little further.
13:59 lizmat well, if we would have object hashes in VM, the structure would be more like the spec   :-)
13:59 lizmat but Mixes got added later, really
14:00 lizmat and apart from some saniity checks, Mixes are just Bags
14:00 jnthn Why do we need those to get the structure "to spec"?
14:00 jnthn Does the spec have Baggy ~~ Mixy?
14:00 lizmat because then I could do Bags/Mixes as object hashes and still be performant ?
14:00 jkva_ joined #perl6
14:01 lizmat Basically, at the moment we have 2 internal ways of simulating VM object hashes
14:01 lizmat one that uses 2 hashes (TypedHash) and one that uses 1 hash with pairs (Bag/Mix)
14:02 lizmat also note that at the time Bags/Mixes were implemented, one could not use typed hashes in the core settings
14:03 lizmat from a performance point of view, I'm still not sure which one is better
14:03 lizmat TypedHashes probably use a lot more memory (because each key.WHICH lives in there twice)
14:03 lizmat assuming our hash implementation does not share keys between hashes?
14:03 lizmat (like p5 does?)
14:04 jnthn Well, strings are immutable
14:04 jnthn And so can be shared
14:04 lizmat yup, which is what p5 does to reduce memory requirements for hashes
14:04 jnthn So provided we only compute the actual WHICH once, it should work out
14:05 lizmat anyways, I think we digress...
14:05 lizmat it was just a thought
14:06 jnthn Sure, though I still worry a bit over Mixy ~~ Baggy
14:06 [Coke] RT: 1027; weird: 11; lta: 87; nom: 8; glr: 4; xmas: 75
14:06 yoleaux 07:22Z <nine> [Coke]: Can you _please_ fix my RT user (nine@detonation.org). All I get is http://niner.name/rt.perl.org.png and it's so frustrating to work with.
14:06 yoleaux 07:24Z <FROGGS> [Coke]: does it make sense to make somebody else an RT-admin too? I'd volunteer fwiw
14:07 [Coke] FROGGS: sure. the problem with nine's account is that it's already an admin; I cannot fix it. I opened a ticket with the rt admins to look at it.
14:09 jnthn Down to 75 xmas \o/
14:09 rindolf joined #perl6
14:11 [Coke] nine - sent an email asking them to investigate your account; FROGGS - sent an email asking them to make you an admin-admin.
14:14 FROGGS [Coke]: \o/
14:15 dalek roast: 4d7b127 | lizmat++ | S02-types/ (4 files):
14:15 dalek roast: Bag/Mix(Hash).values/keys/kv/pairs/antipairs/kxxv
14:15 dalek roast: review: https://github.com/perl6/roast/commit/4d7b127489
14:15 dalek rakudo/nom: 4ddf092 | lizmat++ | src/core/ (2 files):
14:15 dalek rakudo/nom: Disallow Mix(Hash).kxxv
14:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4ddf0923d3
14:20 n0tjack joined #perl6
14:28 lizmat m: multi a(Any) { say Any }; multi a(+@a) { dd @a }; a do for ^5 { $_ }   # jnthn: the reason await(+@awaitables) doesn't work
14:28 camelia rakudo-moar 0e60be: OUTPUT«(Any)␤»
14:29 jnthn ah, hm
14:29 jnthn k
14:30 khw joined #perl6
14:33 ely-se joined #perl6
14:38 ZoffixW joined #perl6
14:39 softmoth joined #perl6
14:39 ZoffixW jnthn, what software did you use to make this, or did you just manually hack index.html? http://jnthn.github.io/css-tiny-presentation/presentation/#/
14:40 tokuhirom joined #perl6
14:40 ZoffixW jnthn, and I'm guessing the note on Most Wanted Modules "(OPEN: CSS::Tiny)" means you're inviting people to follow your tut to create a Perl 6 version? :)
14:43 mantovani interesting result http://paste.scsys.co.uk/500242
14:43 jnthn ZoffixW: Oh, that was some fun
14:43 jnthn https://github.com/jnthn/css-tiny-presentation is the repo
14:43 mantovani This is perl6 version 2015.09-253-gbad9be0 built on MoarVM version 2015.09-55-gf09c782
14:44 jnthn presentation/template.html is hand-written, but note the <!--STORY--> in there
14:44 mantovani do you guys are aware about this ?
14:44 jnthn That is filled out by tools/codestory.p6
14:44 ely-se mixing tabs and spaces -- sin!
14:44 jnthn Which uses the git history of the repo itself.
14:44 ZoffixW jnthn, thanks I will. Need to write my own talk and I loved the format/UI of yours :)
14:45 jnthn ZoffixW: iirc I had a naming convention on the commits to note which ones to not include
14:45 jnthn ZoffixW: And I used interactive rebase to edit the presentation :D
14:45 mantovani perl5 knows I'm doing a static operation and just do it once while perl6 does 10000000 times.
14:46 dalek rakudo/nom: 154f44b | lizmat++ | src/core/asyncops.pm:
14:46 dalek rakudo/nom: Make await on Iterable, rather than List, jnthn++
14:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/154f44be9b
14:46 skids joined #perl6
14:47 softmoth mantovani: I do know that some for loop optimizations are ongoing, but not sure if that is included
14:48 lizmat the for Range:D opt is still awol
14:48 jnthn mantovani: Perl 6 does actually constant fold the thing inside the loop
14:48 ZoffixW mantovani, even worse on my box: http://fpaste.scsys.co.uk/500243
14:48 jnthn mantovani: But, what lizmat++ said; a bunch of semantic list improvements cost an important optimization
14:49 ZoffixW almost 2 minutes
14:49 jnthn We'll put it back, but we're more worried about fixing semantics at the moment.
14:49 * ZoffixW is not too worried about performance ATM
14:50 jnthn mantovani: The loop over range thing is covered by the perl6-bench suite, anyways, so yes, we've got the issue tracked.
14:50 jnthn Thanks for noting it.
14:53 lizmat mantovani: also, the perl 5 result is not exactly correct  :-)
14:53 lizmat $ perl -E 'say -.1 -.2 + .3'
14:53 lizmat -5.55111512312578e-17
14:53 lizmat $ perl6 -e 'say -.1 -.2 + .3'
14:53 lizmat 0
14:55 jnthn btw, for anyone curious how I know it constant-folded the operation, do --target=optimize and look out for
14:55 ZoffixW :D
14:55 jnthn - QAST::Stmt (-0.1 - 0.2 + 0.3)
14:55 jnthn - QAST::WVal(Rat)
14:55 masak lizmat: -5e-17!? that's *fast*! :P
14:56 ZoffixW Oh, that's cool.
14:56 lizmat masak: even goes back in time!   Who needs constant time anyway ?
14:58 lizmat jnthn: wrt to the sink-all in MapIterator, I can only trigger it with something like:
14:59 lizmat m: my %h = ^100000; %h.values
14:59 camelia rakudo-moar 4ddf09: ( no output )
14:59 lizmat m: my %h = ^100000; for %h.values { }   # this triggers the pull-one
14:59 camelia rakudo-moar 4ddf09: ( no output )
14:59 jnthn Right
14:59 lizmat so I *think* we're safe
14:59 jnthn Aye
14:59 ely-se joined #perl6
15:00 jnthn My worry was because of the map/Map confusion
15:00 lizmat well, yeah...  maybe call it MappyIterator ?
15:00 jnthn (That is, I was confused when I reviewed your patch about what we were talking about.)
15:00 jnthn (So your patch itself is fine.)
15:01 jnthn That could be better maybe...
15:01 lizmat will do
15:01 jnthn Or HashIter even though Hash is the subclass
15:02 lizmat yeah, following the Set/SetHash, I wonder whether we shoudn't rename Map to MapHash
15:02 edehont joined #perl6
15:03 lizmat so, what happend to EnumMap anyway ?
15:03 lizmat is that just Enum now?
15:03 jnthn It became Map
15:03 lizmat ah, ok
15:03 jnthn And Enum went away 'cus it confused everyone :)
15:03 lizmat so we don't have an immutable Map at the moment
15:03 jnthn No, Map is immutable
15:04 jnthn Hash is the mutable Map
15:04 jnthn iiuc :)
15:04 lizmat ah, oh?
15:04 ely-se lizmap
15:05 lizmat m: my $m = Map.new((a => 42)); $m<b> = 666   # that's LTA
15:05 camelia rakudo-moar 4ddf09: OUTPUT«Cannot modify an immutable Any␤  in block <unit> at /tmp/EStQTJTBzi:1␤␤»
15:06 * TimToady looks around for his brane...
15:07 masak +1 on renaming Map to something longer
15:07 ilmari m: :42fleem # why?
15:07 camelia rakudo-moar 4ddf09: ( no output )
15:07 TimToady well, that's why we had EnumMap
15:07 ilmari m: say :42fleem # why?
15:07 camelia rakudo-moar 4ddf09: OUTPUT«Unexpected named parameter 'fleem' passed␤  in block <unit> at /tmp/kZu2malD8k:1␤␤»
15:08 ilmari m: say([:42fleem]) # why?
15:08 camelia rakudo-moar 4ddf09: OUTPUT«[fleem => 42]␤»
15:08 ilmari is that just to support s:2nd/foo/bar/ ?
15:08 lizmat fwfw, now I realize Map is immutable, I'm fine with it  :-)
15:08 TimToady ilmari: it's a generalization of that
15:09 lizmat m: dd :10times
15:09 camelia rakudo-moar 4ddf09: OUTPUT«block <unit>␤»
15:09 lizmat m: dd (:10times)
15:09 camelia rakudo-moar 4ddf09: OUTPUT«:times(10)␤»
15:09 masak ilmari: yes.
15:09 ilmari m: say [:10times2]
15:09 camelia rakudo-moar 4ddf09: OUTPUT«[times2 => 10]␤»
15:10 masak ilmari: if you want a language devoid of syntactic features you *can* mis-use but shouldn't, Perl 6 may not be the language for you :P
15:12 ilmari masak: maybe the tests for said language should not be perpetuating such misuse...
15:12 ilmari https://github.com/perl6/roast/commit/4d7b127489#diff-06920cd72ee695ba65c55e0a5daee44aR513
15:12 pmurias masak: I have always assumed that there will be use ultra::strict:and::pendantic that enforces a subset on those who want it
15:13 ely-se m: sub f(Int | Str $x) { }
15:13 camelia rakudo-moar 4ddf09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3ZDiAMrlAf␤Malformed parameter␤at /tmp/3ZDiAMrlAf:1␤------> 3sub f(Int |7⏏5 Str $x) { }␤    expecting any of:␤        constraint␤»
15:13 ely-se why can't you do this?
15:13 * ZoffixW hopes there won't be any "use strict;" for P6.
15:13 pink_mist ely-se: maybe you wanted IntStr?
15:14 ely-se Int and Str are just an example. Imagine this for any pair of classes.
15:14 TimToady ilmari: tests are about semantics, not pragmatics, so those tests are perfectly fine
15:14 pink_mist then I'd suggest: see how IntStr is made and do it like that?
15:14 jnthn ely-se: For now, you'll have to write it as `$x where Int|Str`
15:14 pink_mist oh, that's a much better answer than I had :D
15:14 TimToady for always, I think
15:15 TimToady | is formally ambiguous in a sig if you do that
15:15 jnthn heh :)
15:15 pmurias ZoffixW: enforcing a coding standard using a slang seems useful, most people don't want Perl 6 to enforce for example the exact amount of indentation, but a module could do that
15:15 jnthn Didn't think of that.
15:15 TimToady likewise &
15:16 ely-se jnthn: oh ok :3
15:16 TimToady just as 'likewise &' is formally ambiguous in irc-ese :)
15:16 thou joined #perl6
15:17 jnthn TimToady: Yeah, I was wondering what you were disappearing to do at first :P
15:17 ely-se maybe the error should recognise and mention that
15:18 TimToady if it's ambiguous, you don't know if it's an error
15:18 TimToady we could *guess*...
15:18 ely-se it's not ambiguous, because it gives an error
15:19 ely-se but "Malformed parameter" is kind of uninformative
15:19 ZoffixW pmurias, I'm just reminded of Perl 5's "use strict" that is not enabled by default. What this leads to is beginners finding ancient books and writing "line noise" Perl, simply because the default mode of the interpreter is not to warn about things that should be avoided.
15:19 TimToady well, syntacically we have currently reserved the nominal type slot on | parameters, but I can't guarantee we wouldn't want to put a type onto |c
15:20 TimToady I agree the current message is a bit LTA
15:20 ely-se time to go home, goodbye!
15:20 TimToady at least it says that now rather than complaining about a missing block :)
15:21 pink_mist is there a nice operator to do integer division and get the remainder as well?
15:21 pink_mist or should I get the remainder in a separate step?
15:22 lizmat m: my $m = Map.new((a => 42)); $m<a> := 666; dd $m   # this should blow up, right ?
15:22 camelia rakudo-moar 4ddf09: OUTPUT«Map $m = Map.new(:a(42))␤»
15:22 TimToady .polymod
15:22 n0tjack I recently wrote an operator called "antibase", which is kind of the inverse to :base[digit, digit, digit]
15:23 TimToady m: say 86200.polymod(24,60)
15:23 camelia rakudo-moar 4ddf09: OUTPUT«(16 51 59)␤»
15:23 n0tjack using that, you could write (0,denominator) antibase numerator
15:23 n0tjack that would give you quotient, remainder
15:23 n0tjack in one step
15:23 TimToady m: say 86400.polymod(60,60)
15:23 camelia rakudo-moar 4ddf09: OUTPUT«(0 0 24)␤»
15:23 pink_mist ohh, that looks sweet
15:24 ilmari m: say 86500.polymod(60, 60, 24)
15:24 camelia rakudo-moar 154f44: OUTPUT«(40 1 0 1)␤»
15:25 TimToady n0tjack: polymod will do that if you feed it $base xx *
15:25 n0tjack TimToady: now you tell me ;)
15:26 softmoth left #perl6
15:27 ilmari m: 1234567890.polymod(10 xx *)
15:28 TimToady hmm
15:28 camelia rakudo-moar 154f44: OUTPUT«(timeout)»
15:28 TimToady shouldn't timeout
15:28 ilmari premature eagerness?
15:28 TimToady m: say 1234567890.polymod(10 xx *)
15:28 lizmat method polymod(Int:D: *@mods)
15:28 n0tjack m: 1234567890.polymod(10 xx floor log10(1234567890));
15:28 camelia rakudo-moar 154f44: OUTPUT«(timeout)»
15:28 camelia rakudo-moar 154f44: ( no output )
15:29 TimToady * is flat, not eager
15:29 lizmat guess we need a Seq candidate ?
15:29 lizmat ah...
15:29 ilmari m: sub foo($n, *@mods) { @mods[^$n] } say foo(5, 10 xx *)
15:29 camelia rakudo-moar 154f44: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g9Q_rpcDt4␤Strange text after block (missing semicolon or comma?)␤at /tmp/g9Q_rpcDt4:1␤------> 3sub foo($n, *@mods) { @mods[^$n] }7⏏5 say foo(5, 10 xx *)␤    expecting any of:␤        infix␤  …»
15:30 ilmari m: sub foo($n, *@mods) { @mods[^$n] }; say foo(5, 10 xx *)
15:30 camelia rakudo-moar 154f44: OUTPUT«(10 10 10 10 10)␤»
15:31 Ulti mantovani: this is a lot faster time perl6 -e 'loop (my int $i = 1; $i <= 10000000; $i++) {(-0.1 - 0.2 + 0.3)};'
15:32 ilmari m: sub foo($n, *@mods) { @mods.elems }; foo(10 xx *)
15:32 camelia rakudo-moar 154f44: ( no output )
15:32 ilmari m: sub foo($n, *@mods) { @mods.elems }; say foo(10 xx *)
15:32 camelia rakudo-moar 154f44: OUTPUT«0␤»
15:32 Ulti 6s vs 17s on my machine
15:32 ilmari polymod does "my $inf = @mods.elems == Inf;"
15:32 TimToady polymods is using a pre-GLR-style .elems, I think
15:32 telex joined #perl6
15:32 TimToady *mod
15:32 ilmari m: (1,3,4).elems.say
15:32 camelia rakudo-moar 154f44: OUTPUT«3␤»
15:32 ilmari m: (10 xx 20).elems.say
15:32 camelia rakudo-moar 154f44: OUTPUT«20␤»
15:33 ilmari m: (10 xx *).elems.say
15:33 camelia rakudo-moar 154f44: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/ex8aemACnl:1␤Cannot  a lazy list␤  in block <unit> at /tmp/ex8aemACnl:1␤␤Actually th…»
15:33 TimToady it's testing that against Inf
15:33 ilmari m:  dd (10 xx *).elems
15:33 camelia rakudo-moar 154f44: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in any  at gen/moar/m-Metamodel.nqp:2864␤Cannot  a lazy list␤  in block <unit> at /tmp/YfJMEvll38:1␤␤Actuall…»
15:33 ilmari m:  dd ((10 xx *).elems)
15:33 camelia rakudo-moar 154f44: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in any  at gen/moar/m-Metamodel.nqp:2864␤Cannot  a lazy list␤  in block <unit> at /tmp/ONcKSS2YM2:1␤␤Actuall…»
15:33 TimToady m: say (10 xx *).elems == Inf
15:33 camelia rakudo-moar 154f44: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/RuQaPh4_Bl:1␤Cannot  a lazy list␤  in block <unit> at /tmp/RuQaPh4_Bl:1␤␤Actually th…»
15:33 softmoth joined #perl6
15:34 kdjfnbndsndsdfdk joined #perl6
15:34 ilmari m: sub foo(*@mods) { @mods.elems }; say foo(10 xx *)
15:35 TimToady yeah, that
15:35 camelia rakudo-moar 154f44: OUTPUT«(timeout)»
15:35 * lizmat is testing a fix
15:36 TimToady m: sub foo(+@mods) { @mods.elems }; say foo(10 xx *)
15:36 camelia rakudo-moar 154f44: OUTPUT«Cannot .elems a lazy list␤  in sub foo at /tmp/aZAMoliLii:1␤  in block <unit> at /tmp/aZAMoliLii:1␤␤Actually thrown at:␤  in block <unit> at /tmp/aZAMoliLii:1␤␤»
15:36 TimToady m: sub foo(**@mods) { @mods.elems }; say foo(10 xx *)
15:36 camelia rakudo-moar 154f44: OUTPUT«1␤»
15:36 TimToady right...
15:37 TimToady m: sub foo(*@mods) { @mods.is-lazy }; say foo(10 xx *)
15:37 mr_ron joined #perl6
15:37 TimToady innersting
15:37 camelia rakudo-moar 154f44: OUTPUT«(timeout)»
15:38 lizmat yeah, it doesn't even get into the body
15:38 TimToady obviously in the flattener, pre binding
15:38 softmoth joined #perl6
15:39 pink_mist yay, my innocuous question made people notice a bug =)
15:40 lizmat $ 6 'say 1234567890.polymod(10 xx *)'
15:40 lizmat (0 9 8 7 6 5 4 3 2 1)
15:40 TimToady m: sub foo(**@mods) { @mods.elems }; say foo(|(10 xx *))
15:40 TimToady what bout that one?
15:40 camelia rakudo-moar 154f44: OUTPUT«(timeout)»
15:41 lizmat m: sub foo(+@mods) { @mods.elems }; say foo(|(10 xx *))
15:41 lizmat m: sub foo(+@mods) { say @mods.is-lazy }; say foo(|(10 xx *))
15:41 camelia rakudo-moar 154f44: OUTPUT«(timeout)»
15:41 camelia rakudo-moar 154f44: OUTPUT«(timeout)»
15:42 softmoth joined #perl6
15:42 cibs joined #perl6
15:42 lizmat m: sub foo(+@mods) { say @mods.is-lazy }; say foo(10 xx *))
15:42 camelia rakudo-moar 154f44: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JbOYi8yfo4␤Unexpected closing bracket␤at /tmp/JbOYi8yfo4:1␤------> 3 { say @mods.is-lazy }; say foo(10 xx *)7⏏5)␤»
15:42 lizmat m: sub foo(+@mods) { say @mods.is-lazy }; say foo(10 xx *)
15:42 camelia rakudo-moar 154f44: OUTPUT«True␤True␤»
15:42 TimToady both of those would be fixed by the hypothetical lazy argslip
15:43 ilmari m: sub foo(*@mods) { 42 }; say foo(10 xx *)
15:43 camelia rakudo-moar 154f44: OUTPUT«42␤»
15:43 ilmari m: sub foo(*@mods) { @mods; 42 }; say foo(10 xx *)
15:43 camelia rakudo-moar 154f44: OUTPUT«42␤»
15:43 lizmat TimToady: spectesting 1. +@mods as sig + @mods.is-lazy
15:51 dalek rakudo/nom: 51bbf66 | lizmat++ | src/core/ (2 files):
15:51 dalek rakudo/nom: Late GLRification of polymod
15:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/51bbf66a34
15:52 ilmari lizmat: that makes the variable name misleading
15:52 loren night, perl6 everyone.
15:53 TimToady loren: o/
15:53 lizmat gnight loren
15:53 FROGGS joined #perl6
15:53 masak 晚安, loren
15:54 * TimToady loves that character "sun escape"
15:54 PerlJam "perl6 everyone" sounds interesting.  Kinda like "live long and prosper"
15:54 FROGGS o/
15:54 FROGGS interesting...
15:54 [Coke] PerlJam: peace, and long life.
15:55 TimToady "I perl6 you!"
15:55 FROGGS ohh, err, "fascinating"
15:55 FROGGS (sorry)
15:56 FROGGS jnthn: in case something similar is not known outside of Germany: https://www.getdigital.de/scheiss-encoding.html
15:57 jnthn FROGGS: :D
15:58 FROGGS does that count as an autopun? masak?
15:58 ilmari FROGGS: http://www.zazzle.com/i_unicode_t_shirts-235442613480103840
15:59 * TimToady wishes someone would unicode irssi...
15:59 ilmari TimToady: irssi is fully unicode-capable
15:59 TimToady only in the BMP
15:59 ilmari screen pre 4.2 doesn't handle astral-plane characters, though
15:59 ilmari TimToady: that's screen, not irssi
15:59 TimToady oh, ok
15:59 TimToady anybody have a better screen?
16:00 ilmari TimToady: debian stable has 4.2
16:01 arnsholt I suspect a better screen may entail tmux
16:01 TimToady doesn't look like it's made it to ubuntu/mint yet :(
16:01 MilkmanDan joined #perl6
16:01 ilmari ubuntu vivid has 4.2.1, as does trusty-backports
16:01 ilmari dunno which version the version of mint you're running is based on
16:03 lizmat ack polymod t/spec   # nothing
16:03 TimToady heh: Screen version 4.01.00devel (GNU) 2-May-06
16:03 TimToady only 9 years old...
16:03 arnsholt Not bad. I once had a 12 year old flex on a uni machine
16:03 lichtkind joined #perl6
16:04 ilmari 4.2 only came out april 2014
16:04 ilmari hence it only being in trusty-backports, not trusty
16:04 gfldex some software projects are finished faster then others :-P
16:05 TimToady I've noticed that...
16:05 ilmari screen 4.2 took even longer than perl 5.10!
16:06 ilmari 4.0.3: 2008-08-07; 4.2.0: 2014-04-27
16:07 hohoho joined #perl6
16:08 Ven joined #perl6
16:10 n0tjack joined #perl6
16:13 TimToady hmm, don't see it in trusty-backports, does it have a different name?
16:16 softmoth joined #perl6
16:16 [ptc] m: sub read-from-tokens(@tokens is rw) { say @tokens.shift }
16:16 camelia rakudo-moar 154f44: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cq4DXvzWc6␤Can only use 'is rw' on a scalar ('$' sigil) parameter␤at /tmp/cq4DXvzWc6:1␤»
16:16 dalek roast: bb98a84 | lizmat++ | S32-num/polymod.t:
16:16 dalek roast: Add basic polymod testing
16:16 dalek roast: review: https://github.com/perl6/roast/commit/bb98a843c4
16:17 ponzellus joined #perl6
16:18 dalek rakudo/nom: 2cb9b10 | lizmat++ | t/spectest.data:
16:18 dalek rakudo/nom: Run basic polymod tests
16:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2cb9b10d8a
16:18 [ptc] m: sub read-from-tokens(@tokens) { say @tokens.shift }; read-from-tokens(<a b c>)
16:18 camelia rakudo-moar 154f44: OUTPUT«Cannot call 'shift' on an immutable 'List'␤  in sub read-from-tokens at /tmp/pxyzIebiBf:1␤  in block <unit> at /tmp/pxyzIebiBf:1␤␤»
16:19 [ptc] m: sub read-from-tokens(Seq @tokens) { say @tokens.shift }; read-from-tokens(<a b c>)
16:19 camelia rakudo-moar 154f44: OUTPUT«Type check failed in binding @tokens; expected Positional[Seq] but got List␤  in sub read-from-tokens at /tmp/95vqQPg0ko:1␤  in block <unit> at /tmp/95vqQPg0ko:1␤␤»
16:19 [ptc] m: sub read-from-tokens(Array @tokens) { say @tokens.shift }; read-from-tokens(<a b c>)
16:19 camelia rakudo-moar 154f44: OUTPUT«Type check failed in binding @tokens; expected Positional[Array] but got List␤  in sub read-from-tokens at /tmp/4ah6KueBGv:1␤  in block <unit> at /tmp/4ah6KueBGv:1␤␤»
16:19 jnthn [ptc]: If you want to reliably be able to do that, `@tokens is copy`
16:19 jnthn [ptc]: Which promises you your own mutable copy of the thing that was passed
16:20 [ptc] jnthn: ok, thanks for that!  Yeah, I just read your blog post mentioning the `is rw` cleanup and wasn't sure how much of that had to do with this code
16:20 [ptc] jnthn: I'm trying to get one of the perl6-examples working again after the GLR and it was using `is rw` and I was wondering how to get the required functionality
16:21 Ven joined #perl6
16:22 TimToady I think most of those 'is rw' instances changed to 'is raw'
16:23 n0tjack joined #perl6
16:24 TimToady panda is very noisy compared to cpanm
16:24 ^elyse^ joined #perl6
16:25 nowan joined #perl6
16:25 * JimmyZ uses zef
16:27 garu can I borrow a set of eyes from someone familiar with HTTP::UserAgent? https://gist.github.com/garu/0a1424f13b907b7519b2
16:29 garu I should note that perl6 -MHTTP::UserAgent -e 'say HTTP::UserAgent.new.get(q|http://www.google.com|).content' appears to work as expected, so I'm pretty sure I must be doing something wrong somewhere and my eyes are just too used to that code to spot where I screwed up
16:30 anonMe joined #perl6
16:30 tony-o_ JimmyZ++ any feedback?
16:30 anonMe hello
16:31 garu hello :)
16:31 ilmari garu: IPv4 vs IPv6?
16:32 anonMe I noticed on the STD page ( http://perl6.org/compilers/std-viv ) it says "Note: STD and viv aren't actively developed any more"
16:32 ilmari garu: try s/localhost/127.0.0.1/
16:32 anonMe is that meant to imply that they are basically done?
16:33 anonMe because, to me, it makes it sound like they are no longer used at all.
16:33 colomon anonMe: it means they were a tool used in the development of Perl 6, but are relatively unimportant today.
16:34 JimmyZ tony-o_: it is good, at least it works when panda doesn't :P
16:34 anonMe ah, might be worth some further explanation.
16:34 colomon anonMe: changes that used to go into STD normally go straight into Rakudo these days, I think.
16:34 anonMe that's interesting -- so is it used at all then?
16:36 TimToady not really; STD was always intended as a prototype, unlike some of our other projects :)
16:36 * [Coke] just used this for work: perl6 -e 'say lines().sort({$^a.comb(/d/).join cmp $^b.comb(/d/).join})'
16:36 anonMe btw, congrats on finally coming around to a release!
16:36 n0tjack oh, wait, I don't have to say join("\n")?
16:36 n0tjack neato
16:36 anonMe can't wait for Christmas
16:36 TimToady [Coke]: wouldn't a unary function work there just as well?
16:37 [Coke] er, perl6 -e 'say lines().sort(*.comb(/\d/).join)'
16:37 n0tjack m: say ("hi", "there", "camelia").join;
16:37 camelia rakudo-moar 51bbf6: OUTPUT«hitherecamelia␤»
16:37 n0tjack oh, yes, I do. sadface
16:37 [Coke] TimToady++ # i just realized that after posting. :)
16:37 TimToady nor do you really need the join, I guess
16:38 JimmyZ tony-o_: and it looks like more feature than panda, and support multi-thread install?
16:38 TimToady might save some memory though
16:38 [Coke] eh,only like 100 lines.
16:39 TimToady cmp can work on lists too, is all
16:39 [Coke] TimToady++ # golfing my "what the hell is going on in this svn repo" script.
16:39 garu ilmari: maybe? but 127.0.0.1 yields a different exception: "Internal Error: 'server returned no data'"
16:41 lizmat m: my Int:D $j = 256; MY::<$j> = 111; say $j   # this is always supposed to work, right ?
16:41 camelia rakudo-moar 51bbf6: OUTPUT«111␤»
16:41 tokuhirom joined #perl6
16:41 jnthn lizmat: Yes
16:41 jnthn lizmat: Though at the moment it's hugely costly :)
16:42 lizmat then I think we need to have PseudoStash make a Hash rather than a Map
16:42 garu ilmari: strikes me as odd that Furl (and LWP::UserAgent, and HTTP::Tiny) show me the expected result :(
16:42 jnthn lizmat: Why?
16:42 jnthn If Map is like List then it can hold mutable things (including Scalars)
16:42 lizmat jnthn: if I block assignment in Map by making an ASSIGN-KEY method, then the above fails
16:43 Kogurr joined #perl6
16:43 lizmat ah?  but we just established that Map is immutable ?
16:43 lizmat ah, but in the List way
16:43 jnthn In the same way List is
16:44 * lizmat learned something today  :-)
16:46 kmel joined #perl6
16:47 Ven joined #perl6
16:47 dalek doc/usage_statements: 38ad1cc | (David H. Adler)++ | doc/Type/Numeric.pod:
16:47 dalek doc/usage_statements: Added usage statements to Numeric.pod
16:47 dalek doc/usage_statements: review: https://github.com/perl6/doc/commit/38ad1cc512
16:47 dalek doc/usage_statements: 96a1c00 | (David H. Adler)++ | doc/Type/Proc/ (2 files):
16:47 dalek doc/usage_statements: Added usage statements to Proc/Async.pod and Pod/Status.pod
16:47 dalek doc/usage_statements: review: https://github.com/perl6/doc/commit/96a1c00d8e
16:47 kmel m: say 'hello everyone!'
16:47 camelia rakudo-moar 51bbf6: OUTPUT«hello everyone!␤»
16:48 dha joined #perl6
16:48 lizmat m: note "kmel o/"
16:48 camelia rakudo-moar 51bbf6: OUTPUT«kmel o/␤»
16:50 spider-mario joined #perl6
16:50 Ven joined #perl6
16:51 jkva joined #perl6
16:51 * TimToady wonders if 'react' is just 'sink' spelled funny, and why we don't just gather all the sunk supplies in one spot, even if they come from modules
16:52 aruljohn joined #perl6
16:52 aruljohn left #perl6
16:52 * TimToady probably needs breakfast in his brane
16:53 anonMe left #perl6
16:53 n0tjack if Perl is complaining "Odd number of elements found where hash initializer expected" on the line "say $k.hash.keys[0];", is that just a funny way of saying "index out of bounds"?
16:54 Ven n0tjack: nah, that $k has an odd number of elements
16:54 Ven m: my $a = 1; say $a.hash
16:54 camelia rakudo-moar 2cb9b1: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/CLmjo1AOET:1␤␤»
16:55 n0tjack oh, so it's trying hash($k), and failing, not trying to invoke a pre-defined .hash on $k
16:55 Ven well, .hash is predefined to be hash($k) :P
16:55 n0tjack $k is supposed to be a Match object, I guess it ain't.
16:55 Ven n0tjack: https://github.com/rakudo/rakudo/blob/nom/src/core/Any.pm#L67
16:55 Ven that's probably it, yes :)
16:56 n0tjack what does "nodal" mean?
16:56 n0tjack argh, I want a perldoc!
16:56 n0tjack or for the search function on perl6.org to work better..
16:57 flussence S03:4302
16:57 synbot6 Link: http://design.perl6.org/S03.html#line_4302
16:57 dalek rakudo/nom: 70eea19 | lizmat++ | src/core/ (3 files):
16:57 dalek rakudo/nom: MapIterator -> MappyIterator
16:57 dalek rakudo/nom:
16:57 dalek rakudo/nom: It is an iterator role for Map, not for map {} or .map
16:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/70eea19598
16:58 n0tjack flussence: thank you
16:58 kmel lets build a perldoc!
16:58 Ven_ joined #perl6
16:59 n0tjack there's a p6doc command installed with Rakudo, but all it ever does is yell at me
16:59 kmel n0tjack i'll try it.
17:00 [Coke] kmel: see the perl6/doc repo on github
17:00 n0tjack oh, cute, S99 is a glossary of sorts
17:00 n0tjack hey now, that's useful
17:00 firstdayonthejob joined #perl6
17:03 kmel thanks [Coke]
17:06 * TimToady might very well have ridden on the MH17 plane, having done that very route in the opposite direction
17:09 n0tjack oh! jesus. I dd'd a Match, and I saw something like Match.new(ast => any, list => (), hash => <stuff I want>, ...) and so I called $k.hash - but what I should have said is $k<hash>, yes?
17:10 jnthn Time to go cook dinner. I'm gradually making progress on the module/precomp management stuff, but design work takes time... :)
17:10 TEttinger joined #perl6
17:10 flussence you'd probably want to write $k<stuff I want> directly there and not bother with coercing to hash...
17:11 japhb_ ++jnthn
17:11 Peter_R joined #perl6
17:11 n0tjack no, the stuff I want is the value of a Pair whose key is "hash"
17:11 n0tjack I misinterepreted "hash" as a member of Match
17:11 flussence ah
17:11 n0tjack I want to extract the <stuff I want> from the Match, so I can fiddle it
17:11 japhb_ Lack of precomp (since it was turned off in panda) has made my small Perl 6 tools way less responsive.  :-(
17:14 dha So, the docs for Str.indent say "Indents each line of the string by C<$steps>, if C<$steps> is positive, or dedents it by C<-$steps> if C<$steps> is negative."
17:15 dha shouldn't the second part also read C<$steps> rather than C<-$steps> since "dedent" is used?
17:16 moritz no
17:16 moritz it dedents by a positive amount of space
17:16 moritz and $steps is negative
17:16 moritz so -$steps is positive
17:17 n0xff joined #perl6
17:17 dha That makes no sense to me whatsoever, but, hey, if you say so. *shrug*
17:17 geekosaur makes sense to me
17:17 geekosaur but, well, it is a double negative
17:18 lucs (double negative)----
17:18 dha geekosaur -  that's what I'm thinking. But apparently I'm wrong.
17:18 geekosaur hm?
17:18 geekosaur a dedent by a negative amount would be an indent
17:18 geekosaur so you want to dedent by the negative of the negative number, making oit a positive dedent
17:19 TimToady vectors ftw
17:19 * TimToady now imagines updents and downdents...
17:19 dha Ok, I see how it's supposed to work, but I think it would be confusing to someone reading the docs.
17:19 RabidGravy This is a fabulous paper but it make my head hurt http://www.dafx14.fau.de/papers/dafx14_kurt_james_werner_a_physically_informed,_ci.pdf
17:20 dalek doc: 18a0d51 | (David H. Adler)++ | doc/Type/Str.pod:
17:20 dalek doc: Added examples for .ord and .ords in Str.pod
17:20 dalek doc: review: https://github.com/perl6/doc/commit/18a0d511af
17:20 lizmat .oO( I'm more worried about my ears :-)
17:20 n0tjack is there any way to make dd stick a newline in here and there?
17:21 TimToady we are sorely lacking on prettyprinting currently
17:22 lizmat n0tjack: note
17:22 lizmat m: note
17:22 camelia rakudo-moar 2cb9b1: OUTPUT«Noted␤»
17:22 lizmat hmm....
17:22 lizmat m: say()
17:22 camelia rakudo-moar 2cb9b1: OUTPUT«␤»
17:22 n0tjack lizmat++ !
17:22 n0tjack that's precisely what I wanted!
17:23 TimToady I usually note ''
17:23 TimToady er, say ''
17:23 flussence .oO( after using p6 for a while, seeing a zero-arg func with parens looks *weird*... )
17:24 n0tjack I see, it got rid of all the distracting stuff because their .gists were empty
17:24 n0tjack that's so useful
17:24 xfix joined #perl6
17:28 lizmat dinner&
17:34 JimmyZ m: .say
17:34 camelia rakudo-moar 70eea1: OUTPUT«(Any)␤»
17:34 vendethiel joined #perl6
17:37 itz_stmu1 joined #perl6
17:38 FireFly joined #perl6
17:39 moritz so -$steps is positive  eb-sạiæw-y9~
17:40 moritz <ÙÙÜ´F <1QQ2QWQQA9~#19:22 <+camelia> rakudo-moar 2cb9b1: OUTPUT«Noted␤»
17:40 FROGGS ?
17:41 TimToady someone has travestied moritz!!!
17:41 flussence -ECATONKEYBOARD
17:41 FROGGS moritz: hi moritz jr. :o)
17:41 FireFly joined #perl6
17:41 flussence or that :)
17:42 dha Oddly, I think C<abs($steps)> might actually be clearer. Because "dedent by -$steps" *looks* like a double negative.
17:42 dha There may not be, however, an optimal solution to this one.
17:42 geekosaur it is a double negative. so I suppose it's actually a triple negative :p
17:42 flussence dha: maybe just omit the "by -$steps" entirely?
17:43 TimToady "Ain't never heard no horse sing no song." --Louis Armstrong
17:43 dha flussence -  dunno. maybe. *shrug*
17:44 Effilry joined #perl6
17:44 TimToady I wonder how many people are actually familiar with the 'dedent' neologism
17:44 n0tjack I hear most people say "outdent" or "undent"
17:44 dha Probably not many, but in context with indent, it's probably clear.
17:44 TimToady we'd'a said 'unindent' when I was young
17:45 dha Although, yes, I think outdent is more standard.
17:45 TimToady +1 to outdent
17:45 n0tjack if grammar rule 1 calls grammar rule 2, and the action for rule 2 makes a number, does the action for rule 1 have access to that number?
17:45 cognominal joined #perl6
17:45 TimToady yes, via .made (or .ast)
17:47 lucs Hmm... Now "indent" seems to be in the wrong direction (in opposition to "outdent").
17:47 TimToady that's indentional!
17:47 lucs :)
17:48 dha :-)
17:51 dha I would suggest changing it to "unindent" and changing the language so C<-$steps> can be removed. E. g. Indents each line of the string by C<$steps>. If C<$steps> is negative,
17:51 dha it unindents instead.
17:51 [Coke] dha: sounds good.
17:52 dha But that's just off the top of my head.
17:52 dha [Coke] -  good enough to implement?
17:52 [Coke] though I slightly prefer outdent. :)
17:52 llfourn joined #perl6
17:52 dha I can certainly live with outdent.
17:53 * lucs thinks he prefers "dedent".
17:55 * lucs thinks out not too loud "indent/dentin"
17:55 ^elyse^ joined #perl6
17:56 dha a quick search reveals that outdent and unindent seem to be recognized as words, while dedent is not.
17:58 lucs Is "indent" used in contexts other than what we mean in regards to code?
17:58 * lucs looks it up, eh.
17:58 lucs D'oh, of course it is.
18:01 n0tjack m: say map &index.assuming('0123456789' , *), '275'.split('');
18:01 camelia rakudo-moar 70eea1: OUTPUT«Use of Nil in numeric context  in sub __PRIMED_ANON at EVAL_2:4␤(2 7 0)␤»
18:01 n0tjack why is the last index 0 instead of 5, aqnd what's the error about?
18:02 arnsholt I use dedent as the antonym of indent; probably due to the Python reference grammar using that term
18:04 moritz m: given &index.assuming('0123456789' , *) { say .count, " ", .arity }
18:04 camelia rakudo-moar 70eea1: OUTPUT«2 1␤»
18:04 moritz note that map .count/.arity sensitive
18:04 vendethiel joined #perl6
18:06 n0tjack I'm not sure how to interpret that - seems like it's saying it has 2 args, and has an arity of 1 (i.e. one arg still needs to be supplied), which seems sensible
18:07 n0tjack not sure why it was ok for the first 2 values (2 and 7), but bailed out on 5
18:09 moritz n0tjack: fwiw I'm not saying this is the cause of the problem; just pointing out a potential source of confusion
18:09 moritz m: say '275'.split.perl
18:09 camelia rakudo-moar 70eea1: OUTPUT«Cannot call split(Str: ); none of these signatures match:␤    (Cool $: Regex $pat, $limit = { ... };; :$all, *%_)␤    (Cool $: Cool $pat, $limit = { ... };; :$all, *%_)␤    (Str:D $: Regex $pat, $limit = { ... };; :$all, *%_)␤    (Str:D $: Cool $de…»
18:10 moritz m: say '275'.split('').perl
18:10 camelia rakudo-moar 70eea1: OUTPUT«("", "2", "7", "5", "").Seq␤»
18:10 n0tjack ahha
18:10 n0tjack there's my error
18:10 moritz n0tjack: use .comb if you want to get a list of characters
18:10 n0tjack thanks, that's what I want
18:11 n0tjack can you suggest a better way to find the index of each of those chars in another string?
18:13 lichtkind ever seen http://perl.6.org/ ?
18:15 n0tjack say map {'0123456789'.index($_)}, '275181'.comb;
18:16 n0tjack that works, but it seems ham-handed to have to introduce an entire block context to call a single function passing it the mapped element as its only free parameter
18:16 dha lichtkind -  eep.
18:17 [Coke] indentarthurdent
18:17 dha [Coke]++
18:18 lichtkind dha its just funny
18:18 [Coke] someone should offer 5 bucks for 6.org
18:18 [Coke] I will chip in a dollar. :)
18:19 lichtkind i even 10
18:20 lichtkind 5 and 6 are not for sale
18:20 lichtkind but we could get perl.5.org
18:20 lichtkind and 6 alike
18:20 lichtkind its bith same provider
18:20 lichtkind should we do tht?
18:21 lea joined #perl6
18:22 lichtkind srsly guys im about to do it
18:22 pink_mist sounds like a better idea that you take them than some random spammer =)
18:23 lichtkind thank you for the trust
18:23 FROGGS :P
18:23 lichtkind but i pondering what to to do with it
18:23 lichtkind redirect to perl6.org for now
18:23 pink_mist I hope that's not for the .5.org one :P
18:24 lichtkind both are there
18:24 lichtkind i checked
18:24 pink_mist no I mean don't redirect perl.5.org to perl6.org :P
18:24 lichtkind they call themself project 94 but they seem to have some affiliation with free software culture
18:24 lichtkind nono perl.5.org redirect to perl.org
18:25 lichtkind but project 94 waht reasoning from you too so i guess they function as spamfilter as well
18:28 n0tjack I think I have to resign myself to writing loops sometimes
18:34 moritz you could use recursion.
18:34 dha [Coke] -  So, should that wording for Str.indent go into the docs, you think?
18:34 Sgeo__ joined #perl6
18:35 dha (and are we agreed on outdent?
18:35 dha )
18:37 dha Eh. I'm going to do it in my own fork and put in a pull request, and someone else can actually decide something.
18:37 FROGGS dha++
18:38 FROGGS that's usually a good way
18:39 moritz or just make the decision, period.
18:40 moritz forgiveness > permission
18:40 moritz fwiw I wrote lots of these docs with the "oh my god, still so much left to document" mindest. If you can improve on something, just do it
18:40 mattprelude joined #perl6
18:41 dha Well, last week I found that even doing things with permission doesn't always work out well, so I'm being cautious this week.
18:41 lucs prudent
18:43 tokuhirom joined #perl6
18:44 n0tjack how does one test defined-ness?
18:44 RabidGravy .defined
18:44 dalek perl6-most-wanted: 28bc71a | (Zoffix Znet)++ | most-wanted/modules.md:
18:44 dalek perl6-most-wanted: Mark Data::GUID as work in progress
18:44 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/28bc71a777
18:45 n0tjack that is a good name for it :)
18:45 RabidGravy m: my $a; say $a.defined
18:45 camelia rakudo-moar 70eea1: OUTPUT«False␤»
18:46 n0tjack m: my %hash = (one => 2, three => 4); say %hash<seven>.defined;
18:46 camelia rakudo-moar 70eea1: OUTPUT«False␤»
18:46 n0tjack niiiice
18:46 RabidGravy there you could do,
18:46 RabidGravy m: my %hash = (one => 2, three => 4); say %hash<seven>:exists
18:46 camelia rakudo-moar 70eea1: OUTPUT«False␤»
18:46 n0tjack any reason to prefer that?
18:47 n0tjack oh, does that : mean exists is an adverb of some kind?
18:47 RabidGravy yeah
18:47 zacts joined #perl6
18:47 dha Pull request created.
18:47 n0tjack m: say 4:exists;
18:47 camelia rakudo-moar 70eea1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HhwFm0buk2␤You can't adverb that␤at /tmp/HhwFm0buk2:1␤------> 3say 4:exists7⏏5;␤    expecting any of:␤        pair value␤»
18:47 n0tjack heh
18:48 RabidGravy it depends if the existence of the key or the value is more important
18:48 timotimo so i'm looking at the "a million times the -.1 - .2 + .3 in a loop" spesh output
18:48 zakharyas joined #perl6
18:48 timotimo and by "in a loop" i mean "loop (...)"
18:48 n0tjack RabidGravy: oh, that is a nice distinction. in this particular case, I don't care.
18:48 lizmat there's .indices ?
18:49 lizmat oops, stale backlog
18:49 timotimo i see a few things that are quite dumb, like a getlex $_ into r7, set r7 into r1, bindlex r1 into $_
18:49 timotimo and we're invoking postfix:<++> rather than having it inlined
18:49 timotimo that's also where a million IntLexRef get allocated
18:50 timotimo gc time is about 20% of this
18:50 timotimo and we do 305 GC runs
18:51 timotimo postfix:<++> also takes 11% of the run time portion, i expect that'd be a lot better if it were inlined
18:52 n0tjack m: my %hash = (one => 2, three => 4); say %hash<one seven three>:exists;
18:52 camelia rakudo-moar 70eea1: OUTPUT«(True False True)␤»
18:52 n0tjack m: my %hash = (one => 2, three => 4); say +<<%hash<one seven three>:exists;
18:52 camelia rakudo-moar 70eea1: OUTPUT«Unexpected named parameter 'exists' passed␤  in block <unit> at /tmp/h9AdkJ8EJP:1␤␤»
18:52 timotimo oh!
18:52 timotimo would you look at that
18:53 n0tjack m: say +True;
18:53 camelia rakudo-moar 70eea1: OUTPUT«1␤»
18:53 timotimo time perl6 -e 'loop (my int $i = 1; $i < 10000000; $i = $i + 1) {(-0.1 - 0.2 + 0.3)}'  ->  0.14user 0.02system 0:00.17elapsed 99%CPU (0avgtext+0avgdata 66720maxresident)k
18:53 n0tjack m: say +False;
18:53 camelia rakudo-moar 70eea1: OUTPUT«0␤»
18:53 timotimo time perl6 -e 'loop (my int $i = 1; $i < 10000000; $i++) {(-0.1 - 0.2 + 0.3)}'  ->  4.52user 0.02system 0:04.56elapsed 99%CPU (0avgtext+0avgdata 73748maxresident)k
18:53 lizmat how seriously do we need to take a test of .squish that uses a :with that *always* returns true ?
18:54 moritz lizmat: as serious as any other test, really
18:54 lizmat hmmm... I was afraid you would say that  :-)
18:54 timotimo so yeah. we can reach perl5 performance here
18:55 timotimo on my machine we beat perl5 in this benchmark
19:03 hummeleBop joined #perl6
19:04 n0tjack m: my %hash; +%hash<missing-key>:exists;
19:04 camelia rakudo-moar 70eea1: OUTPUT«WARNINGS:␤Useless use of "+" in expression "+%hash<missing-key>" in sink context (line 1)␤Unexpected named parameter 'exists' passed␤  in block <unit> at /tmp/dWoeNIN0M6:1␤␤»
19:04 n0tjack m: my %hash; say +%hash<missing-key>:exists;
19:04 camelia rakudo-moar 70eea1: OUTPUT«Unexpected named parameter 'exists' passed␤  in block <unit> at /tmp/D3uyOssZXI:1␤␤»
19:04 n0tjack how can I convert the False/True of :exists to a 0/1 ?
19:05 RabidGravy .Int
19:05 RabidGravy m: my %hash = (one => 2, three => 4); say (%hash<seven>:exists).Int
19:05 camelia rakudo-moar 70eea1: OUTPUT«0␤»
19:05 n0tjack thanks
19:07 mantovani jnthn: thank you, if it is inside t he loop is great :)
19:07 mantovani lizmat: I know it hehe -Mbignum solve that problem
19:08 n0tjack m: my %hash; say 5 * +defined %hash<nope>;
19:08 camelia rakudo-moar 70eea1: OUTPUT«0␤»
19:08 n0tjack wee
19:08 lizmat m: my $a = 42; say +?$a
19:08 camelia rakudo-moar 70eea1: OUTPUT«1␤»
19:09 lizmat m: my $a = ''; say +?$a
19:09 camelia rakudo-moar 70eea1: OUTPUT«0␤»
19:09 n0tjack you guys have thought of everything
19:09 RabidGravy too much crack
19:10 timotimo nobody cheers for that benchmark? :(
19:10 lizmat timotimo:  sorry, I wasn't paying attention,
19:10 lizmat timotimo++  :-)
19:11 RabidGravy fabulous!
19:11 * timotimo is sick, so extra in need of encouragement sometimes
19:12 tadzik timotimo: beating perl 5!?
19:12 n0tjack m: say 0.1[1,2,3] #I want 3.21, but Perl won't let me shoot myself. Another way?
19:12 camelia rakudo-moar 70eea1: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in block <unit> at /tmp/EMZJvF3F_b:1␤␤Actually thrown at:␤  in block <unit> at /tmp/EMZJvF3F_b:1␤␤»
19:12 tadzik whoa
19:12 tadzik that's loop and native int, but still!
19:13 timotimo tadzik: well, with (-0.1 - 0.2 + 0.3) already constant-folded, it doesn't do much, really
19:13 n0tjack timotimo++ because I know I'm gonna need it one day
19:13 tadzik timotimo: that's right, it shouldn't :P
19:13 timotimo and that's the kind of loop we would be generating anyway for the code that that person came in with originally
19:14 timotimo hm
19:15 timotimo actually, it seems like the constant folded Rat is not actually referenced in the optimized code at all
19:15 timotimo so the code actually turns into an empty loop
19:15 niceperl joined #perl6
19:16 timotimo and then the jit comes and generates an extremely tight loop for this
19:17 timotimo but even putting the result of -0.1 - 0.2 + 0.3 into a lexical that i defined outside of the loop doesn't double the run time
19:17 timotimo (though the run time is also in big part startup for the faster case; so it's much more than a doubling in fact)
19:21 [ptc] I'm trying to grok some code which (pre GLR) used to zip two lists together and assign them to a hash
19:21 [ptc] e.g. my %x = ($vars.list Z @argv);
19:21 [ptc] is this (or something like it) still possible?
19:21 flussence m: say %('a'..'z' Z=> ^26).perl
19:21 timotimo well, Z now creates (foo, bar) pairs; i *think* = flat ( ... Z ... ); should work
19:21 camelia rakudo-moar 70eea1: OUTPUT«{:a(0), :b(1), :c(2), :d(3), :e(4), :f(5), :g(6), :h(7), :i(8), :j(9), :k(10), :l(11), :m(12), :n(13), :o(14), :p(15), :q(16), :r(17), :s(18), :t(19), :u(20), :v(21), :w(22), :x(23), :y(24), :z(25)}␤»
19:23 [ptc] ah, so Z creates pairs (the docs say it returns a sequence.  Is that now incorrect?
19:24 [ptc] timotimo: = flat (... Z ...) did the job (well, now I'm getting a new error, but at least the other one has gone!)
19:24 timotimo it does return a sequence
19:24 [ptc] timotimo++ thanks :-)
19:24 timotimo it's just not a sequence of single items
19:25 [ptc] "a sequence of pairs" would be more accurate?
19:25 edehont joined #perl6
19:26 n0tjack m: my %hash = (one => 2, three => 4); say %hash<nope>.chars;
19:26 camelia rakudo-moar 70eea1: OUTPUT«Method 'chars' not found for invocant of class 'Any'␤  in block <unit> at /tmp/dsqfURtZ3y:1␤␤»
19:26 n0tjack m: my %hash = (one => 2, three => 4); say %hash<nope>.comb;
19:26 camelia rakudo-moar 70eea1: OUTPUT«Method 'comb' not found for invocant of class 'Any'␤  in block <unit> at /tmp/XJ_HaG6ogN:1␤␤»
19:33 edehont_ joined #perl6
19:34 skids joined #perl6
19:36 [Sno] joined #perl6
19:38 n0tjack m: $_ = 42; given 'hi' { default {$_ = 67;} }; say $_;
19:38 camelia rakudo-moar 70eea1: OUTPUT«Cannot assign to an immutable value␤  in block  at /tmp/KjFtTreHA2:1␤  in block <unit> at /tmp/KjFtTreHA2:1␤␤»
19:39 n0tjack oooh, because later whens are gonna test that value
19:39 n0tjack gotcha
19:39 dylanwh_ I wonder, has anyone written a Perl6 module that takes an Irish word and does Lenition or Eclipsis on it? If not that seems like a simple (ha) and fun thing to do.
19:39 dha Well volunteered!
19:40 dalek perl6-examples: 0657c2a | paultcochrane++ | categories/interpreters/lisp.pl:
19:40 dalek perl6-examples: Replace `is rw` with `is copy`
19:40 dalek perl6-examples:
19:40 dalek perl6-examples: This should allow a mutable copy of the object within the sub so that one
19:40 dalek perl6-examples: can shift off it.  Thanks to jnthn++ for the tip.
19:40 dylanwh_ yay
19:40 dalek joined #perl6
19:43 [ptc] m: say $*OUT.t
19:43 camelia rakudo-moar 70eea1: OUTPUT«Cannot find method 'isatty': no method cache and no .^find_method␤  in block <unit> at /tmp/Zii2LyJtJp:1␤␤»
19:44 lizmat [ptc]: the canonical change of "is rw" was really "is raw" , I think    TimToady / jnthn have deeper into
19:44 lizmat [ptc]: .t is NYI
19:44 lizmat I guess we should make it throw that
19:44 [ptc] lizmat: thanks :-)  Yup, jnthn++ mentioned how to get the code do what I want it to do
19:45 lizmat ah, this was about params, not subs
19:45 [ptc] in the end it wasn't necessary to use `is copy` at all, since what was actually necessary was another routine needed to output an Array
19:45 lizmat ok, carry on  :-)
19:45 [ptc] :-)
19:46 zakharyas joined #perl6
19:47 ZoffixW joined #perl6
19:51 llfourn joined #perl6
20:03 gonz_ joined #perl6
20:04 [ptc] omg!  The perl6-examples test suite passed!
20:05 timotimo sweet! well done :)
20:07 hohoho joined #perl6
20:09 n0tjack is there a directive I can put intra-regex to block backtracking in a capture?
20:10 timotimo you can put :r into a groupy thing
20:10 timotimo and :!r will do the opposite thing
20:10 n0tjack just what I was looking for
20:10 timotimo :)
20:11 n0tjack oh wait, I can also just stick it in a new token
20:12 timotimo sure
20:12 timotimo either way works
20:13 n0tjack are you trying to tell me tmtowtdi?
20:13 timotimo it's timo today
20:14 lizmat .oO( ah, that's the nick of Ada Lovelace :-)
20:15 n0tjack aww, token-ifying it removes the need for my first given/when
20:16 n0tjack I won't have that!
20:16 timotimo use all the features
20:17 jkva joined #perl6
20:20 colomon moritz: will Travis CI run on ABC when Rakudo is updated, or only when ABC is updated?
20:20 timotimo the latter, i believe
20:23 n0tjack ha! all(cake.have, cake.eat)
20:27 dalek rakudo/nom: 3472966 | lizmat++ | src/core/Any-iterable-methods.pm:
20:27 dalek rakudo/nom: Fix List.squish
20:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3472966491
20:28 n0tjack m: say -1 ** 0; # huge gotcha
20:28 camelia rakudo-moar 70eea1: OUTPUT«-1␤»
20:28 n0tjack is there some kind of tighter-binding unary - I can use?
20:28 timotimo m: say 0 R** -1
20:28 camelia rakudo-moar 70eea1: OUTPUT«1␤»
20:29 n0tjack thanks, but in my case that would require putting a very long expression in parens on the left
20:29 n0tjack I suppose I'll just paren the (-1)
20:29 timotimo hehe
20:29 n0tjack man, I can see that one tripping me up for months
20:30 n0tjack I may have to go the APL route and define high-bar to be a super-tight-binding unary minus
20:30 flussence you could define a U+2212 operator with the "right" precedence...
20:30 n0tjack yep
20:30 n0tjack though I'd want to use U+00AF if P6 will let me
20:31 flussence .oO( would be nice to have unambiguous × and ÷ ops by default too... )
20:31 n0tjack also, I know about "is looser" and "is tighter", not sure how to say "is as tight as possible"
20:31 timotimo is tighter &postcircumfix:<( )> ? :P
20:32 timotimo there's hardly anything tighter than invocation, eh?
20:32 n0tjack ok, I'm not going *that* far
20:32 frobisher joined #perl6
20:33 n0tjack woo, my grammar now supports +Inf, -Inf, and NaN
20:33 tony-o_ JimmyZ: yea it supports multiple installs at once, it builds the depends levels and compiles as many as possible simultaneously
20:35 tony-o_ JimmyZ: 'it' being zef
20:36 diana_olhovik joined #perl6
20:39 rurban joined #perl6
20:44 tokuhirom joined #perl6
20:46 diana_olhovik joined #perl6
20:49 leont joined #perl6
20:52 n0tjack in my grammar actions class, I'm using foo($/) as the signature for all my matches
20:53 n0tjack is there a way to use patterns so that I can have complex-number($real, $imaginary) as actual parameters?
20:53 n0tjack rather than having to do $/<real>, $/<imaginary> in the body?
20:53 jkva_ joined #perl6
20:56 jkva joined #perl6
20:58 espadrine joined #perl6
20:59 dalek rakudo/nom: ca25b0f | lizmat++ | src/core/ (4 files):
20:59 dalek rakudo/nom: Add sink protection to iterators that may need it
20:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ca25b0f98d
21:01 leont n0tjack: My guess would be, that's probably a matter of writing a trait that wraps the method, though named arguments would make more sense to me
21:03 FROGGS that's not even a terrible idea...
21:04 leont Yeah, specially when combined with multi-methods, it actually sounds rather nice
21:04 leont (with the trait on the proto)
21:04 FROGGS creating a declarator keyword, wrapping every method like meth(|$/.list, |$/.hash), this would even allow to have multi methods depending on the match
21:04 FROGGS :o)
21:05 n0tjack that's what I want; I find myself having to pull a lot of stuff out of $/<>, test for defined-ness, branch, and cast/convert
21:05 dalek Heuristic branch merge: pushed 30 commits to rakudo/curli by lizmat
21:05 n0tjack adding a lot of code
21:06 dalek problem_solver_tutorial: 3c8bebd | lichtkind++ | / (2 files):
21:06 dalek problem_solver_tutorial: wrote 3/5 of chapter 0 paragraph 5
21:06 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_solver_tutorial/commit/3c8bebdd0e
21:06 FROGGS n0tjack: this could also mean that you need to split up your tokens and/or add protos
21:07 n0tjack I'm not versed enough to follow along with you, yet
21:07 kmel joined #perl6
21:08 FROGGS if you split your tokens into smaller parts, you got more tokens and action methods and you'd do less branching in the actions
21:08 n0tjack yeah, I do have the tokens down to the atoms of my grammar
21:08 n0tjack but I have a lot of optional tokens, so I have to test defined-ness
21:08 n0tjack and then some can take multiple types, like int vs real
21:12 FROGGS gnight #perl6
21:13 dalek doc: e7d92df | (David H. Adler)++ | doc/Type/Str.pod:
21:13 dalek doc: Revised description of Str.indent
21:13 dalek doc: review: https://github.com/perl6/doc/commit/e7d92dfb7e
21:13 dalek doc: adde2fc | (Will Coleda)++ | doc/Type/Str.pod:
21:13 dalek doc: Merge pull request #160 from dha/master
21:13 dalek doc:
21:13 dalek doc: Revised description of Str.indent
21:13 dalek doc: review: https://github.com/perl6/doc/commit/adde2fcffb
21:13 lizmat gnight freeze
21:14 dha thanks.
21:16 dalek problem_solver_tutorial: f72a182 | lichtkind++ | / (3 files):
21:16 dalek problem_solver_tutorial: wrote 3/5 of chapter 0 paragraph 5
21:16 dalek problem_solver_tutorial: review: https://github.com/perl6/problem_solver_tutorial/commit/f72a182318
21:17 zacts joined #perl6
21:22 TimToady joined #perl6
21:25 dalek modules.perl6.org: 51c18ed | (Zoffix Znet)++ | web/ (2 files):
21:25 dalek modules.perl6.org: Add jQuery 2.1.4
21:25 dalek modules.perl6.org:
21:25 dalek modules.perl6.org: Because when the robots rise up, those using jQuery will be spared! (Also, it will let us use sorting plugins and fix searchbox issues)
21:25 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/51c18ed9bd
21:26 [Coke] Zoffix: let's at least use the same jquery CDN everywhere.
21:27 [Coke] I think we're using ajax.googleapis.com elsewhere.
21:27 TimToady m: say "\c[GRINNING CAT FACE WITH SMILING EYES] new screen is new!"
21:27 camelia rakudo-moar ca25b0: OUTPUT«???? new screen is new!␤»
21:27 TimToady ilmari++
21:28 Zoffix [Coke], I did use a CDN. I couldn't find a v2+ on google
21:28 Zoffix Oh. /me missed "the same"
21:28 Zoffix Hm. we use a different jQuery version on perl6.org.
21:28 [Coke] so maybe let's switch other instances of jquery-from-cdn to use the same cdn you used in that commit?
21:29 [Coke] ah, we're on the same page now
21:29 ilmari TimToady: unfortunately the server I run my screen on is stuck on debian oldoldstable and thus screen 4.0 :(
21:29 Zoffix [Coke], sure. I'll open an Issue on perl6.org and will take a look at it soon. Tomorrow, likely.
21:31 [Coke] Zoffix: also see the makefile branch on docs which switches jquery usage there to a cdn.
21:31 * flussence grumbles at urxvt using the ugly X fontspec mechanism instead of fontconfig
21:31 flussence there's a catface there but all it gives me is a box :(
21:34 n0tjack in given/when, is there proceed-like term which can force the next when to execute? a-la case fall-through in C
21:34 leont My harness ran non-parallel «make test» without any issues :-)
21:34 leont (on rakudo)
21:35 lizmat leont++
21:35 flussence m: given 3 { when Int { say 'Int'; next }; when * !%% 2 { say 'Odd' } }
21:35 camelia rakudo-moar ca25b0: OUTPUT«Int␤next without loop construct␤  in block <unit> at /tmp/wc_uDMkmm_:1␤␤»
21:35 flussence huh, thought "next" was it...
21:35 softmoth web site question (doc, modules, and others): There's been discussion of '/' on web pages focusing search box, vs. focusing the search box on page load. I find the focus-on-load annoying for any longer page, because it breaks this common (for me at least) flow: visit page. scroll down. click a link. click back. continue scrolling.  The last step isn't possible, because the browser jumps back up to the Search
21:35 softmoth box when it is focused, making me lose my place.
21:35 softmoth anybody else find this a bad user experience?
21:36 flussence +1
21:36 n0tjack m: given 3 { when Int {say 'Int'; proceed} when * %% 2 {say "even" } default {say "odd"} }
21:36 camelia rakudo-moar ca25b0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/npneDIltoM␤Strange text after block (missing semicolon or comma?)␤at /tmp/npneDIltoM:1␤------> 3given 3 { when Int {say 'Int'; proceed}7⏏5 when * %% 2 {say "even" } default {say ␤»
21:37 n0tjack m: given 3 { when Int {say 'Int'; proceed} when * %% 2 {say "even"; } default {say "odd";} }
21:37 camelia rakudo-moar ca25b0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fF2zQ1rbOD␤Strange text after block (missing semicolon or comma?)␤at /tmp/fF2zQ1rbOD:1␤------> 3given 3 { when Int {say 'Int'; proceed}7⏏5 when * %% 2 {say "even"; } default {say␤»
21:37 n0tjack m: given 3 { when Int {say 'Int'; proceed;} when * %% 2 {say "even"; } default {say "odd";} }
21:37 camelia rakudo-moar ca25b0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7zraUWSZfw␤Strange text after block (missing semicolon or comma?)␤at /tmp/7zraUWSZfw:1␤------> 3given 3 { when Int {say 'Int'; proceed;}7⏏5 when * %% 2 {say "even"; } default {say␤»
21:37 leont Also, I just noticed Proc::Async doesn't support merging stdout and stderr, which is a bit of a bummer :-/
21:37 flussence softmoth: though I think browsers do the right thing for the html5 autofocus attribute there, so that's one option.
21:37 softmoth m: given 3 { when Int {say 'Int'; proceed}; when * %% 2 {say "even" }; default {say "odd"} }
21:37 camelia rakudo-moar ca25b0: OUTPUT«Int␤odd␤»
21:37 AW3i joined #perl6
21:38 lizmat leont: stdout and stderr are Supplies, not ?
21:39 leont In TAP land it's not unusual to have them merged into one stream, and doing that in the Supplies instead of the action filehandles risks weird mixups
21:39 lizmat leont: if so, then my $merged = Supply.merge($stdin,$stdout) should do the trick then
21:41 softmoth S04:Statement-ending_blocks?
21:41 synbot6 Link: http://design.perl6.org/S04.html#Statement
21:41 softmoth S04:Statement\-ending_blocks?
21:41 synbot6 Link: http://design.perl6.org/S04.html#Statement
21:41 softmoth n0tjack: ^ I can't get the URL to show up right, but you get the point. :)
21:42 AW3i hey guys,although not a programming question,i'm trying to run rakudo on my gentoo and everytime i'm trying to run something it says i'm missing perl6:BOOTSTRAP,anyone has an idea of what could be wrong?
21:43 flussence did you `make install`?
21:43 AW3i i installed it from portage actually
21:43 AW3i it pulled in nqp and moarvm
21:44 dalek modules.perl6.org: ae47203 | (Zoffix Znet)++ | web/ (2 files):
21:44 dalek modules.perl6.org: Handle cases where user presses "Back" button (Closes #15)
21:44 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/ae47203d69
21:44 lizmat AW3i: could you gist the exact output ?
21:44 flussence oh that'd be why... rakudo doesn't work right if it's built in one place and moved to another
21:45 AW3i i'll compile from source then, thanks
21:45 flussence afaik you should only need to build rakudo, the others ought to work fine
21:45 softmoth thanks, Zoffix++
21:45 lizmat good night, #perl6!
21:45 Zoffix \o/
21:45 AW3i goodnight
21:45 Zoffix night lizmat
21:45 flussence o/
21:46 Ulti AW3i: checkout rakudobrew before doing everything yourself
21:46 AW3i will do,thanks
21:50 softmoth is anyone trying to herd the proliferation of psgi-based frameworks together? we've got plackdo, crust, web, P6SGI, PSGI, SCGI, HTTP::Easy, etc. I don't see a "Team" on perl6.org for web dev, but I think that might be a good thing to do. And anyone who has a PSGI-related module on ecosystem should be on the team. ??
21:51 Jaglor joined #perl6
21:52 Zoffix I'd like to see Perl 5's Mojolicious in P6, but the lead author is still contemplating porting it.
21:53 hohoho joined #perl6
21:53 Zoffix (things would move quicker with funding FWIW, so if anyone got any leads, I'll gladly pass them onto sri (the lead author))
21:53 n0tjack softmoth: Thanks, but I was trying to get that to print "even", i.e. *force* fall-through to the next when, even if the match fails
21:54 llfourn joined #perl6
21:54 n0tjack What is the syntax for a when using a regex match?
21:54 edehont joined #perl6
21:54 n0tjack "" is stringy match
21:54 n0tjack and // complains that I'm updating a read-only var
21:55 leont What's the point of t/spec/fudge? And why isn't it written in perl6?
21:55 RabidGravy I'm actually quite relaxed about it and more p6-like things will develop organically as people feel a need rather than porting p5 things
21:56 n0tjack m: given "ar" { when "ad" {say "no";} when rx/a./ {say "yes";} default {say "oops";} }
21:56 camelia rakudo-moar ca25b0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3e0H0P6Ird␤Strange text after block (missing semicolon or comma?)␤at /tmp/3e0H0P6Ird:1␤------> 3given "ar" { when "ad" {say "no";}7⏏5 when rx/a./ {say "yes";} default {say "␤»
21:56 n0tjack m: given "ar" { when "ad" {say "no";}; when rx/a./ {say "yes";}; default {say "oops";} }
21:56 camelia rakudo-moar ca25b0: OUTPUT«yes␤»
21:56 n0tjack nm
21:56 TimToady leont: I suggest you read the README
21:57 dalek specs: 3ac3d18 | (Stéphane Payrard)++ | S04-control.pod:
21:57 dalek specs: tyop
21:57 dalek specs: review: https://github.com/perl6/specs/commit/3ac3d18ecf
21:58 leont TimToady: ah, the README in t/spec, yeah that does somewhat explain…
21:58 n0tjack suggestion: add a "when rx//" example to the docs on given/when
21:58 TimToady n0tjack: most people just say 'when //'
21:58 TimToady or 'when m//'
21:58 n0tjack TimToady: I thought I had tried that an got a "can't update immutable variable" error
21:59 TimToady was it a s///?
21:59 n0tjack no
21:59 TimToady then it's a bug
21:59 n0tjack but I could have made some other good
21:59 n0tjack goof
21:59 * TimToady ponders how to fix $x ~~ S/foo/bar/
22:09 mr_ron joined #perl6
22:15 n0tjack m: say join "",('0'..'9'),('A'..'Z'); # more concise way to construct this string?
22:15 camelia rakudo-moar ca25b0: OUTPUT«0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ␤»
22:15 Exodist joined #perl6
22:15 kid51 joined #perl6
22:16 espadrine_ joined #perl6
22:16 garu sigh... just got hit in production with a floating point error where perl5 thinks 96.54 is not 96.54. Can't wait to use Rat!
22:18 firstdayonthejob joined #perl6
22:23 spacebat I'd like to parse perl6 - I know there is STD and HLL::Grammar, but I read that the latter is the more authoritative, and I don't seem to be able to access it in rakudo on moar
22:23 leont Is there a shortcut to not-grep a list?
22:23 TimToady grep none(...)
22:25 spacebat is there a simple incantation on rakudo to parse a string of perl6 source and get back some kind of AST?
22:25 bjz joined #perl6
22:26 TimToady perl6 --target=ast -e '1 + 2'
22:26 TimToady but not much internal support for that yet
22:26 TimToady (without digging into internals)
22:26 TimToady will have more support for that when macros are mature, but probably post-Christmas
22:26 spacebat ah, I can see HLL/Grammar.nqp is there, I just don't seem to be able to load it
22:26 spacebat fair enough
22:27 TimToady we aren't really quite bootstrapped on Perl 6 yet, is the main thing, so there are impedance mismatches
22:27 spacebat I got frustrated with cperl-mode.el, and knowing that there is a grammar, figured it would be nice to have a proper emacs mode
22:27 spacebat we'll get there - I'm excited :)
22:28 TimToady well, sometimes guessing is better for highlighting than a strict grammar
22:28 spacebat I'd love to see Marpa ported to perl6, as it has good facilities for ambiguity
22:30 spacebat thanks for the advice anyway
22:35 bjz joined #perl6
22:39 NoRefill joined #perl6
22:39 apotheon joined #perl6
22:40 dalek modules.perl6.org: 7ce32dd | (Zoffix Znet)++ | / (10 files):
22:40 dalek modules.perl6.org: Make module table sortable
22:40 dalek modules.perl6.org:
22:40 dalek modules.perl6.org: Makes recent.html stuff deprecated. (Related #14)
22:40 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/7ce32dddc7
22:40 n0tjack I have grammar { rule TOP { <numeric-atom>* %% \s+ } ... }; what do I say in method TOP to return the .mades of each of those numeric atoms?
22:41 n0tjack I want to return a array (or list) of numbers, each number produced by one invocation of method numeric-atom($/)
22:42 leont Something like return @<numeric-atom>.map(*.made)
22:44 n0tjack that still appears to be returning a match or AST of some kind
22:46 tokuhirom joined #perl6
22:46 kid51_ joined #perl6
23:04 dalek rakudo/nom: f54ff83 | TimToady++ | src/Perl6/Actions.nqp:
23:04 dalek rakudo/nom: Warn on attempt to smartmatch with S///
23:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f54ff83371
23:04 dalek rakudo/nom: f2cb328 | TimToady++ | src/core/Any-iterable-methods.pm:
23:04 dalek rakudo/nom: just make { // } just work
23:04 dalek rakudo/nom:
23:04 dalek rakudo/nom: We don't need this FAQ.
23:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f2cb328e06
23:06 PerlJam n0tjack: are you doing  my $thing = Grammar.parse($string); and looking at $thing or $thing.made?
23:06 n0tjack I'm looking at $thing
23:07 Timbus joined #perl6
23:07 n0tjack let me try replacing my bare $things with $thing.made
23:08 skids m: sub a (\b) { EVAL "sub b() \{ 42.say }; b().say;" }; a(2); a(Str) # found while tryng to make worries for RT#115608
23:08 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=115608
23:08 camelia rakudo-moar ca25b0: OUTPUT«42␤True␤(Str(Any))␤»
23:09 skids Nothing seems to store whether a !is::concrete was syntactically a constant.
23:12 n0tjack PerlJam: Perfect, that was it.
23:13 n0tjack damn, I'm getting "Cannot assign to a readonly variable or a value" on my when /blah/ again
23:13 Hotkeys joined #perl6
23:14 Timbus joined #perl6
23:18 n0tjack why would I be allowed to say  when any("ad", "ar")   but not   when /a./  ?
23:18 PerlJam n0tjack: in your action method?   if you did   method foo($/) { ... }, then $/ is readonly inside foo()
23:19 n0tjack Ok, that does make sense.
23:19 n0tjack Is there a workaround to permit when rx// inside action methods?
23:19 leont Hmmm, after a control-Z and then an `fg`, I got a «const_iX NYI» error from rakudo-moar…
23:19 n0tjack I guess I could use a different name for the param, but then lots of other stuff gets messy
23:20 PerlJam call the parameter by another nameuyou could use "is copy"
23:20 n0tjack wouldn't that screw up my .makes?
23:21 n0tjack as in, upstack people wouldn't see my .made things?
23:21 n0tjack s/up/down/
23:22 PerlJam you could also do  method foo($blah) { $/ = $blah; ... }
23:23 n0tjack ah, now that's clever
23:23 n0tjack thank you
23:23 * PerlJam is having some serious lag
23:24 * PerlJam -> dinner &
23:24 hohoho joined #perl6
23:25 TimToady n0tjack: just declare the parameter as ($/ is copy)
23:26 Timbus joined #perl6
23:26 TimToady and, of course, bear in mind that the inner match will clobber $/
23:26 TimToady oh, PerlJam mentioned 'is copy'
23:27 n0tjack TimToady: if I $/ is copy and later .make, will my callers see the things I made?
23:28 n0tjack or will those .makes get thrown away with my copy?
23:28 dalek rakudo/nom: f3b5355 | TimToady++ | src/core/Seq.pm:
23:28 dalek rakudo/nom: remove silly double .new
23:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f3b535578d
23:29 TimToady n0tjack: good question, it probably screws up
23:30 n0tjack TimToady: That's what I figured. No worries, I got to use my first junction instead :)
23:30 TimToady m: say "foo" ~~ S/foo/bar/;
23:30 camelia rakudo-moar f2cb32: OUTPUT«Potential difficulties:␤    Smartmatch with S/// can never succeed because the subsequent string match will fail␤    at /tmp/glIDMJagoi:1␤    ------> 3say "foo" ~~ S/foo/bar/7⏏5;␤False␤»
23:30 n0tjack And that completes my first p6 grammar.  This thing is so cool.  And thanks to all of you - you've all been super helpful.
23:31 TimToady n0tjack++
23:31 n0tjack I've never had to say so little to get so much.
23:32 n0tjack even though this is a brand new language for me, I still think it's the fastest I've ever written a parser from scratch.
23:32 TimToady now if only it ran fast too...
23:35 Timbus joined #perl6
23:36 [Coke] one thing at a time.
23:36 [Coke] ... and then two things at a time.
23:36 n0tjack .rotor(2)
23:39 TimToady m: say ('a'..'z').rotor(1..*)
23:39 camelia rakudo-moar f2cb32: OUTPUT«((a) (b c) (d e f) (g h i j) (k l m n o) (p q r s t u))␤»
23:39 Zoffix 0.o
23:39 TimToady m: say ('a'..'z').rotor(1..*,:partial)
23:39 camelia rakudo-moar f2cb32: OUTPUT«((a) (b c) (d e f) (g h i j) (k l m n o) (p q r s t u) (v w x y z))␤»
23:40 n0tjack is there a cute/golfish way to say [(sin $x), (cos $x)] ?
23:41 n0tjack (not cheating using  e  thankyouverymuch)
23:41 pink_mist m: say ('a'..'z', 0..9).flat.rotor(1..*)
23:41 camelia rakudo-moar f2cb32: OUTPUT«((a) (b c) (d e f) (g h i j) (k l m n o) (p q r s t u) (v w x y z 0 1) (2 3 4 5 6 7 8 9))␤»
23:44 TimToady [.sin,.cos with $x] maybe
23:46 n0tjack wow
23:46 n0tjack neat
23:46 skids m: unpolar(1,$_).list.say for 1,2,3;
23:46 camelia rakudo-moar f2cb32: OUTPUT«(0.54030230586814+0.841470984807897i)␤(-0.416146836547142+0.909297426825682i)␤(-0.989992496600445+0.141120008059867i)␤»
23:54 Timbus joined #perl6
23:54 skids m: [unpolar(1,pi * $_/2).reals].say for 1,2,3;
23:54 camelia rakudo-moar f3b535: OUTPUT«[6.12323399573677e-17 1]␤[-1 1.22464679914735e-16]␤[-1.83697019872103e-16 -1]␤»
23:55 BenGoldberg joined #perl6
23:56 llfourn joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo