»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:09 oddark joined 00:12 cognominal left 00:31 colomon left, hohoho joined 00:33 colomon joined 00:36 KCL_ left, hohoho left 00:41 blueperson1102 joined
[Coke] m: (1..5).combinations(3); 00:45
camelia ( no output )
[Coke] m: (1..5).combinations(3).say
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))␤»
[Coke] nice idiom for summing those individual lists?
00:45 blueperson1102 left
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
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.
leont That's the function calling method
gist.github.com/jnthn/a56fd4a22e7c43080078 also helps 00:48
[Coke] Juerd: you tried to invoke something that isn't invokable.
m: say 3.();
camelia rakudo-moar fa024f: OUTPUT«Cannot find method 'CALL-ME'␤ in block <unit> at /tmp/mzS91stogq:1␤␤»
[Coke] ^^
00:48 laouji joined
Juerd [Coke]: Thanks. That helped me find a p5ism 00:48
Tried $b .= $str on a Blob $b 00:49
00:49 blueperson1102 joined
Juerd ~= doesn't work either but at least it tells me why :) 00:49
leont: Thanks. Will read :) 00:50
Neither Buf nor Blob will take ~=. How can I have a binary buffer and append to it? 00:53
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␤␤»
ShimmerFairy aw
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>␤»
ShimmerFairy Juerd: infix:<~> seems to work
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>␤»
ShimmerFairy as does ~=
01:01 leont left, llfourn joined
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.
pastebin.com/2frBBN74 # line 14 breaks 01:03
(But is reported as line 7...) 01:04
"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.
Juerd It works if I assign an empty buffer 01:06
So having my Buf $buf = pack(""); seems to work around the problem. I don't understand why.
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 :)
Juerd pack's actually documented on doc.perl6.org 01:08
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␤␤»
Juerd That's basically what I appear to be running into
ShimmerFairy m: my Buf $buf; say $buf.WHAT
camelia rakudo-moar fa024f: OUTPUT«(Buf)␤»
Juerd But I don't know if it's a bug
ShimmerFairy m: say Buf ~ Buf.new
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␤ …»
Juerd m: my Str $str; $str ~= Str.new 01:10
camelia ( no output )
Juerd I'd expect it to work like that one.
ShimmerFairy yeah, that's definitely odd. I'll go poke at some --target=qast output to see if there's an appreciable difference there :)
well, s/qast/ast/ :P 01:11
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…»
ShimmerFairy m: my Buf $b; say $b ~ Buf.new
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␤ …»
ShimmerFairy Juerd: definitely seems like a bug to me, in any case 01:13
01:14 aborazmeh joined, aborazmeh left, aborazmeh joined
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:14
01:15 BenGoldberg joined
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…»
ShimmerFairy notice how that warns about stringification, because it's likely getting .Stringy called on type objects
01:17 aborazmeh left
ShimmerFairy m: my Str $a; $a ~= "*"; say $a 01:18
camelia rakudo-moar fa024f: OUTPUT«*␤»
ShimmerFairy m: my Buf $a; $a ~= Buf.new(42); say $a
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␤␤»
Juerd Hmm
01:18 labster left 01:19 aborazmeh joined, aborazmeh left, aborazmeh joined
ShimmerFairy Juerd: looks like something lets my Str $a; $a ~= "*" work without throwing a stringification warning, and Blobs don't get that. 01:19
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:20
ShimmerFairy m: my $a; $a ~= "*"; 01:21
camelia ( no output )
ShimmerFairy m: my $a; $a ~= Buf.new(42);
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 blueperson1102 left
ShimmerFairy ^ showing that it's not the type constraint that contributes anything 01:21
01:22 blueperson1102 joined
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";
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␤␤»
Juerd So I can't assign a Buf to my child class. Fine, I thought, I'll try a role! But no... 01:23
m: role MyBuf is Buf { }; my Buf $buf does MyBuf = pack "a*", "foo";
camelia rakudo-moar fa024f: OUTPUT«Cannot assign to an immutable value␤ in block <unit> at /tmp/Vez_XSsUb0:1␤␤»
Juerd m: role MyBuf is Buf { }; my Buf $buf does MyBuf .= new;
camelia rakudo-moar fa024f: OUTPUT«Cannot modify an immutable Scalar+{MyBuf}␤ in block <unit> at /tmp/XA3FoNuobv:1␤␤»
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 ( no output )
ShimmerFairy m: sub MY_METAOP_ASSIGN($a is rw, $b) { $a = &infix:<~>.( $a // &infix:<~>.(), $b ) }; my $xyzzy; MY_METAOP_ASSIGN($xyzzy, Buf.new(4))
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␤␤»
ShimmerFairy m: say &infix:<~>().perl
camelia rakudo-moar fa024f: OUTPUT«""␤»
01:24 Jaglor left
ShimmerFairy and that's the problem; the fallback 'no-args' of the infix only accounts for strings, not buffers :) 01:24
01:24 pierrot joined
Juerd I just wanted a $buf.parse so it could parse itself. But I'm giving up and making a regular sub. 01:25
01:25 pierrot is now known as Guest98460
Juerd A sub that, yuch, will modify its argument. 01:25
01:25 Guest98460 left 01:26 pierrot_ joined
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:26
Juerd ShimmerFairy: I can barely follow your explanation, so I can't suggest any solution... 01:27
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:29
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:30
Unfortunately, &infix:<~>() returns a string object, which fails for trying to concat buffers 01:31
01:32 Jaglor joined
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:35
Juerd I see 01:36
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 :)
Juerd Having to say pack("a*", "string literal") is annoying anyway.
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.
Juerd: say "abc".encode("utf16")
Juerd Do whatever pack a* does...
ShimmerFairy m: say "abc".encode("utf16")
camelia rakudo-moar fa024f: OUTPUT«utf16:0x<61 62 63>␤»
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␤␤»
Juerd Er.
ShimmerFairy Juerd: ^^^ that's the preferred way of conversion btw, using Str.encode and Blob.decode
Juerd m: say unpack "a*", "€"
camelia rakudo-moar fa024f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ey42dELxsL␤Undeclared routine:␤ unpack used at line 1. Did you mean 'pack'?␤␤»
Juerd Aargh. I keep messing those up.
ShimmerFairy m: say Buf.new(0x2A, 0x3F).encode("utf8")
camelia rakudo-moar fa024f: OUTPUT«Method 'encode' not found for invocant of class 'Buf'␤ in block <unit> at /tmp/wonucMwNQc:1␤␤»
Juerd m: say pack "a*", "€"
camelia rakudo-moar fa024f: OUTPUT«Buf:0x<e2 82 ac>␤»
ShimmerFairy m: say Buf.new(0x2A, 0x3F).decode("utf8")
camelia rakudo-moar fa024f: OUTPUT«*?␤»
Juerd I don't really care about the encoding if my string is ASCII, tbh. 01:39
And most of my string literals will be ascii.
01:39 llfourn left
Juerd I have a feeling that regarding binary data, correctness is now endangering pragmatism. 01:39
ShimmerFairy m: say Buf.new(0xC2, 0xA5).decode("utf-8") 01:40
camelia rakudo-moar fa024f: OUTPUT«¥␤»
ShimmerFairy m: say Buf.new(0xC2, 0xA5).decode("iso-8859-1")
camelia rakudo-moar fa024f: OUTPUT«Â¥␤»
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.
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:42
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:43
Juerd latin1 (or actually, codepoint-value to byte 1-on-1) would be the most pragmatic choice.
ShimmerFairy: For ~ it can't know, but for ~= it can definitely let the LHS win. 01:44
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).
Juerd I don't believe that it would be impossible or not feasible. 01:45
01:45 ilbot3 left
ShimmerFairy Juerd: the issue with ~= is that it's based on ~ . Trying to add some extra logic to that would either complicate the = metaop for all cases, or require a special case of the metaop, and I'm not sure either would be considered nice choices. 01:45
Juerd The type conversion can be automated just as well 01:46
There's the Foo() signature, so most of the code is probably even already in place
01:46 ilbot3 joined
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:46
01:47 eliasr left
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
camelia rakudo-moar fa024f: OUTPUT«utf8:0x<c2 a5 e2 82 ac>␤»
Juerd Alternatively, to have a short function that does this.
ShimmerFairy I forgot about this for a second, but .encode at least defaults to UTF-8 :)
Juerd I'm grateful that at least pack's a* will just encode for me
01:49 kid51 left
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:49
(and even with literals, you still run into "how should I encode this?" troubles) 01:50
Juerd Couldn't there be a StrLiteral class that just lets itself be molded into whatever is necessary? 01:51
01:52 tokuhirom joined
Juerd I have a new question. How can I remove the first $x bytes from a Buf? 01:52
It has .subbuf, but that one doesn't mutate. 01:53
01:53 cognominal joined
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:55
01:55 blueperson1102 left
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␤␤»
Juerd Can't just encode.
m: my Buf $buf = pack "a*", "foo"; $buf .= subbuf(2); $buf.say
camelia rakudo-moar fa024f: OUTPUT«Buf:0x<6f>␤»
01:56 blueperson1102 joined, blueperson1102 left, tokuhirom left
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 :(
m: say utf8 ~~ Buf
camelia rakudo-moar fa024f: OUTPUT«False␤»
ShimmerFairy m: say utf8 ~~ Blob
camelia rakudo-moar fa024f: OUTPUT«True␤»
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. 01:57
02:01 dayangkun joined
Juerd I thought blobs were immutable bufs 02:03
02:03 tokuhirom joined
ShimmerFairy Juerd: that's one way of seeing it, but in reality Bufs are Blobs with the addition of mutability. 02:05
Blobs don't "remove" immutability instead, since a subclass/role actively removing features is AFAIK a bit more difficult to do. 02:06
Juerd pastebin.com/z9KNRzgR # Some progress. I can connect and receive the connection acknowledgement. 02:07
I'm off to bed now.
Tomorrow I'll try to understand what react/whenever even does
ShimmerFairy Juerd o/ :) 02:08
thou m: my $x; $x <== 1..7; dd $x;
camelia rakudo-moar fa024f: OUTPUT«Array $x = $[(1, 2, 3, 4, 5, 6, 7),]␤»
Juerd (And read that document that leont linked)
ShimmerFairy: Thanks for your support :)
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++]...
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.
Good night :)
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.
s/work/pass/
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
dalek osystem: 54d9678 | (David Farrell)++ | META.list:
Added Pod-PerlTricks
02:22
02:23 noganex_ left 02:30 hohoho joined 02:34 hohoho left 02:35 cognominal left 02:43 sQuEE` is now known as sQuEE 02:50 dayangkun left 02:51 dayangkun joined 02:53 sQuEE is now known as sQuEE` 02:59 jevin joined 03:00 mr_ron left
ShimmerFairy m: sub foo($bar, *@baz) { } 03:14
camelia ( no output )
ShimmerFairy m: sub foo(:$a, $bar, *@baz) { }
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␤»
ShimmerFairy I can potentially accept this being wrong, not so much the error message that claims the required param comes *after* the variadic :) 03:15
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 03:29 hohoho joined
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␤»
03:58 laouji left 03:59 FireFly left 04:00 FireFly joined 04:02 AlexDaniel left 04:06 opal joined 04:14 opal left
dalek c/makefile: 95b9fa5 | coke++ | Makefile:
Add makefile help for all targets
04:30
c/makefile: 401400b | coke++ | / (3 files):
Use same CDN as perl6.org does
04:33 khw left 04:35 laouji joined 04:37 dustinm` joined 04:39 Ben_Goldberg joined, pochi_ joined 04:41 pochi left 04:42 BenGoldberg left, obra joined 04:43 felher joined 04:52 vendethiel joined 04:56 lsm-desktop joined 04:59 colomon left, colomon joined
TimToady home 04:59
05:03 Ben_Goldberg left 05:05 Woodi left 05:06 tokuhirom left, Woodi joined 05:16 obra left, obra joined 05:17 jkva joined 05:22 atweiden left, skids left 05:25 hohoho left 05:30 hohoho joined 05:34 hohoho left 05:37 vendethiel left 05:38 KotH joined 05:40 hohoho joined 05:41 gonz_ left, [Sno] left 05:42 gonz_ joined 05:47 vendethiel joined 05:50 hohoho left 06:01 domidumont joined 06:02 [Sno] joined, MilkmanDan joined
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:03 telex left 06:04 telex joined 06:06 domidumont left, tokuhirom joined
[Tux] test 50000 37.870 37.756 06:06
test-t 50000 39.612 39.498
06:06 domidumont joined 06:07 diana_olhovik_ joined, vendethiel left 06:11 tokuhirom left 06:14 gtodd1 joined 06:15 colomon left 06:16 llfourn joined 06:23 jevin_ joined 06:24 apotheon_ joined 06:25 felher left, yakudza left, ambs left, jevin left, felher joined 06:26 yakudza joined, ambs joined, darutoko joined 06:28 firstdayonthejob joined 06:29 bjz joined 06:31 colomon joined 06:32 FROGGS joined
dalek pan style="color: #395be5">perl6-examples: beaaa98 | (Tim Smith)++ | / (5 files):
Fix some GLR problems
06:33
pan style="color: #395be5">perl6-examples: df4b05f | (Tim Smith)++ | / (12 files):
Fix some tests to work post-GLR
06:34 ][Sno][ joined 06:37 sokoro33 joined
sokoro33 I see Perl 6 doesn't support this - returning value from the condition blocks: 06:37
my $var1 = if 12 {
33
} else {
44
}
Is that right? Or is possible still to do something similar?
06:37 [Sno] left
llfourn sokoro33: try 'do if' 06:37
m: say do if True { 'true' } else { 'false' } 06:38
camelia rakudo-moar fa024f: OUTPUT«true␤»
06:39 Ven joined
sokoro33 @llfourn, could you give the link where it describes what "do if" is? 06:39
I can't find it
06:40 bjz left
llfourn soloro33: tbh I don't even know where it is! 06:40
but put do in front of anything control statement and it will return something 06:41
sokoro33: found it. docs.perl6.org/language/control#do 06:42
m: say do for ^3 { $_ } 06:44
camelia rakudo-moar fa024f: OUTPUT«(0 1 2)␤»
llfourn cool and do for gathers the final values of each iteration and returns them as a list
sokoro33 do you mean to wrap the "if { ... } else {.. } " into "do { ... } "? 06:45
llfourn nah just put 'do' before 'if'
sokoro33 and put "if { ... } " inside it?
llfourn m: say do if True { 'true' } else { 'false' }
camelia rakudo-moar fa024f: OUTPUT«true␤»
llfourn like that :)
sokoro33 ok, thanks.
06:46 sokoro33 left
FROGGS m: say (if True { 'true' } else { 'false' }) 06:48
camelia rakudo-moar fa024f: OUTPUT«true␤»
llfourn FROGGS: eh how does that work?
FROGGS you just need something that moves the thingy to statement level
llfourn I see...
my $var1 = if True { ... } 06:49
FROGGS: RHS is not the statement level there?
FROGGS no, because we have statement modifying if/unless/for etc
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;
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
llfourn m: my $a = ( if True { "true" } ); say $a; 06:50
camelia rakudo-moar fa024f: OUTPUT«true␤»
llfourn okie doke 06:51
dalek pan style="color: #395be5">perl6-examples: 6f05981 | (Tim Smith)++ | categories/shootout/ (3 files):
Fix categories/shootout tests
06:53
06:54 thou is now known as softmoth 06:55 hohoho left, bjz joined 06:58 Ven left, Ven joined 06:59 zemmihates joined 07:01 Ven left, Ven joined 07:02 aborazmeh left 07:03 Ven left, Ven joined 07:05 Ven left, Ven_ joined 07:06 CIAvash joined 07:07 Ven_ left, tokuhirom joined 07:08 Ven joined 07:10 larion left 07:12 tokuhirom left 07:16 Ven left, xfix joined, Ven joined 07:20 Kogurr left
nine .tell [Coke] Can you _please_ fix my RT user (nine@detonation.org). All I get is 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].
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:24 firstdayonthejob left 07:25 TEttinger left 07:26 arunesh joined
Ven o/, #perl6! 07:26
arunesh Hi
#perl6 07:27
FROGGS hi Ven, arunesh 07:28
arunesh Hi Froggs
07:29 Ven_ joined, Ven left
DrForr_ Mornin' all. 07:30
arunesh @FROGGS may you give me some ideas about modules to be still written in perl6
DrForr_ There's a 'most wanted' list on perl6.org. 07:31
07:31 Ven_ left, Ven joined
FROGGS arunesh: that depends on what you are interested in... 07:31
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 Ven left
El_Che github.com/perl6/perl6-most-wanted...modules.md ? 07:33
FROGGS El_Che: aye
07:33 Ven joined 07:35 Ven left
dalek rl6-most-wanted: 92f9a9b | FROGGS++ | most-wanted/bindings.md:
mention my XML::LibXML bindings (as WIP)
07:35
07:35 Ven joined
lizmat good *, #perl6! 07:36
07:36 Ven left
FROGGS morning lizmat 07:36
lizmat FROGGS p/ 07:37
nine Good morning lizmat! Thanks for the p6weekly :)
El_Che "good whatever" sounds pretty sarcastic :)
FROGGS aye, lizmat++
lizmat you're welcome!
El_Che is there a new one? \o/
07:38 zakharyas joined
lizmat El_Che: it *is* called a weekly :-) 07:39
El_Che yeah, and Christmas is a yearly event :P
FROGGS *g*
07:40 Ven joined
El_Che anyway, /me a p6weekly fan 07:40
moritz also 07:43
El_Che A good Japanese representation there 07:44
07:45 abraxxa joined, ][Sno][ is now known as [Sno] 07:47 ely-se joined 07:49 xfix left 07:53 g4 joined, llfourn left
lizmat yes, Matsuno san and Kawakami san have been very busy! 07:56
07:56 llfourn joined 07:58 arunesh left, Ven left 07:59 Ven_ joined
dalek pan style="color: #395be5">perl6-examples: 2603f6f | (Tim Smith)++ | categories/ (4 files):
Fix up a few more post-GLR issues
07:59
08:00 arunesh joined 08:02 Ven_ left, Ven joined 08:04 Ven left, Ven joined 08:06 bjz_ joined, leont joined, bjz left
BooK I was looking at perl6maven.com/push-vs-append-on-arrays-in-perl6 08:09
and vaguely remembered something about * doing flattening
so I tried @b.push: *@a, but that broke. so I looked at Array.^methods, and found .flat 08:10
and trying @b.push( @a.flat ) gave surprising (to me, and old perl5 fart) results
JimmyZ |@a ? 08:11
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]␤»
BooK and @b has two elements
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]␤»
lizmat BooK: .push / .unshift do *not* flatten *at all* anymore
BooK yes, that's what gabor's post explained
lizmat this is to ensure that you can do @a.push(@b.pop) without having to fear what was popped
JimmyZ m: my @a = <foo bar>; my @b; @b.push: |@a; @b.push( |@a); say @b.perl;
camelia rakudo-moar fa024f: OUTPUT«["foo", "bar", "foo", "bar"]␤»
BooK I was exploring other ways to flatten
08:13 leont left
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;
camelia rakudo-moar fa024f: OUTPUT«["foo", "bar", "foo", "bar"]␤»
FROGGS * is for the receiving end
BooK and .flat and | do different things
JimmyZ m: my @a = <foo bar>; my @b; @b.push: @a.Slip; @b.push( @a.Slip); say @b.perl;
camelia rakudo-moar fa024f: OUTPUT«["foo", "bar", "foo", "bar"]␤»
grondilu m: my @a = <foo bar>; my @b; @b.push: sub { @_}(*@a);
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…»
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…»
grondilu m: my @a = <foo bar>; my @b; @b.push: (sub { @_})(@a);
camelia ( no output )
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.
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, pmurias joined
Ven softmoth++ 08:17
pmurias Juerd: re using latin1 as a default please don't do that
08:19 Hor|zon joined, gtodd1 left 08:21 bjz_ left
dalek osystem: 94b0144 | (Marc Chantreux)++ | META.list:
add Rototo to eco
08:22
osystem: fe86f88 | RabidGravy++ | META.list:
Merge pull request #73 from eiro/master

add Rototo to eco
eiro \o/
08:22 bjz joined
eiro hello people 08:23
08:23 hohoho joined
Ven o/ 08:23
08:23 larion joined 08:25 gtodd joined
tadzik hello eiro! 08:25
lizmat eiro o/ 08:26
masak heiro! \o 08:27
(the "h" is silent, 'cus French)
Ven no, that's not true :) 08:31
BooK the "h" is not always silent
08:32 Woodi left, Woodi joined
Ven in "hopital", it's silent, in "héro" it's not 08:32
BooK EFRENCHOVERFLOW # how many of us are there here?
Ven erm, héros.
BooK: too many *g*
BooK but haricot
lizmat sais pas
Ven lizmat++ # united
masak .oO( hapricot )
BooK en.wikipedia.org/wiki/Aspirated_h 08:33
lizmat docs.google.com/presentation/d/1zQ...slide=id.p # Perl 5 vs Perl 6 at Orange County, California
afk for a few hours& 08:35
BooK was the craigslist talk recorded?
llfourn BooK: I've heard that it was but they are going to take ~2 weeks to put it up 08:38
08:38 hohoho left
BooK llfourn: thanks for the info 08:39
masak lizmat: s/supercede/supersede/ 08:40
08:40 dakkar joined
masak also, s/LarryWall/Larry Wall/, unless you implement him in Java 08:40
08:40 Ven left
masak .oO( does the ILarryWall interface ) 08:41
08:41 hohoho joined, Ven joined
ely-se eww type-level hungarian notation 08:42
08:43 Ven left, Ven_ joined 08:45 hohoho_ joined, hohoho left, Ven_ left, Ven joined
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
masak aye. 08:48
and arguably the sigils fit the Perl domain pretty well ;)
ely-se type-level sigils
pmurias masak: isn't Hungarian notation mostly a symptom of missing type system features?
08:48 espadrine joined
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
08:50 hohoho joined, hohoho left, hohoho_ left
pmurias it also seems to be equal parts missing tool support 08:51
08:51 hohoho joined
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.
vytas I am planning to talk about Perl6 for University students. Are there good slides I could make use of ? 08:54
dalek pan style="color: #395be5">perl6-examples: 0e0a5e2 | (Tim Smith)++ | / (2 files):
Fix brittle tests that fail randomly
pmurias masak: a superior Hungarian notation replacement would consist of a type system + tool support 08:55
llfourn vytas: check out 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
like escaped string vs unescaped string 08:57
ely-se wrong
any fine type system can reach that just fine
masak though I guess type apologists will simply argue that if the type system can't handle that, then... right
I'll let ely-se argue that side ;)
vytas llfourn, thanks
ely-se create an EscapedString type that has the invariant that it's always escaped vOv
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?
ely-se you can do that in C and C++ :v
08:58 jkva left
Ven "strings"_escaped 08:58
pmurias masak: I was referencing the Spolsky article in that the Hungarian notation is a failure of the type system 08:59
jnthn morning, #perl6 09:00
yoleaux 12 Oct 2015 20:26Z <FROGGS> jnthn: There is no spectest fallout whatsoever when removing "BEGIN Attribute.^compose;"
pmurias jnthn: morning
jnthn m: Attribute.map({ .say })
camelia rakudo-moar fa024f: OUTPUT«(Attribute)␤»
09:03 jkva joined
FROGGS $ perl6-m -e 'Attribute.map({ .say })' 09:08
Method 'map' not found for invocant of class 'Attribute'
okay, there we go
09:09 tokuhirom joined
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:09
ahh, err, morning jnthn :o) 09:10
jnthn Yes, that error is *exactly* why that BEGIN is there 09:11
09:12 eone joined
FROGGS yes, I understand that 09:12
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
Unless you've a great desire to hunt it down further
09:13 tokuhirom left
FROGGS well, dont call it great desire, but the issue will bite us later anyway 09:13
jnthn True 09:14
09:21 spider-mario joined 09:22 ely-se left 09:24 rindolf joined 09:26 ely-se joined 09:27 RabidGravy left 09:29 eliasr joined, Psyche^_ joined 09:31 eone left 09:32 Ven left 09:34 Psyche^ left
dalek osystem: eeeee73 | (Yasuhiro Matsumoto)++ | META.list:
add p6-Path-Canonical
09:35
osystem: 96d93ed | labster++ | META.list:
Merge pull request #74 from mattn/p6-Path-Canonical

add p6-Path-Canonical
09:35 RabidGravy joined 09:36 brrt joined
brrt good * #perl6 09:36
09:41 Ven joined 09:42 rurban joined 09:50 rurban left 09:54 softmoth left
dalek osystem: ca3ccc1 | (Yasuhiro Matsumoto)++ | META.list:
Should be META6.json
09:56
osystem: 6de8c38 | RabidGravy++ | META.list:
Merge pull request #75 from mattn/fix-mattn

Should be META6.json
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. :)
RabidGravy all good :) 10:06
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
*new modules
also should it be META6.json rather than META.info
RabidGravy last time I looked things would try and use both 10:10
10:11 rurban joined
Ulti I assumed the 6 on the end is for some move towards CPAN? 10:11
also has anyone written something that produces the "provides" section? 10:12
using find and a nasty regex on the command line wasn't very satisfying
RabidGravy panda has some code that does it
moritz Ulti: iirc there is or was a panda meta-gen command or something like that
Ulti had a crossed through S11 badge on my bigger module :P again a good motivator
moritz: oh really, ok I'll look into that 10:13
10:13 Ven left
xenu >cpan 10:13
Ulti RabidGravy++ moritz++
xenu pause has some support for perl6
and metacpan is in the works
afaik
Ulti I should get my emobot to sit on here and actually count karma
10:13 virtualsue joined
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
DrForr_ its perhaps a lot more trivial than you imagine :) 10:14
10:14 oddark left
DrForr_ Oh, very likely. 10:14
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.
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
moritz most of my time was spent on improving the test suite and stuff like that :-) 10:16
10:18 edehont joined
dalek c/MARTIMM-patch-3: 45f0639 | (Marcel Timmerman)++ | doc/Type/DateTime.pod:
Default timezone spec typo

Method now() specifies wrong timezone specification *$TZ, should be $*TZ.
10:23
10:25 itz_stmu1 joined 10:27 itz_stmuk left 10:29 llfourn left 10:30 ely-se left 10:31 brrt left 10:34 tokuhirom joined 10:36 lsm-desktop left, llfourn joined 10:38 lsm-desktop joined 10:39 suman joined
suman Is perl 6 officially released? 10:40
pink_mist beta version is out
suman I mean production ready!!
pink_mist the real 6.0 won't be released for a while yet
10:40 jkva_ joined
pink_mist no 10:40
though people do already use it in production
but I think they're a bit too daring
suman Any time for official release??? 10:41
10:41 jkva left
pink_mist christmas is what's expected 10:41
10:41 tokuhirom left
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
[ptc] suman: I don't think so (unfortunately). Would be awesome to have one though! 10:46
RabidGravy looks to see what it does 10:47
[ptc] at EuroPython someone made the comment that pandas was like Excel for Python but better 10:48
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...
suman agreed with ptc 10:50
bokeh, pandas, ipython tools for perl 6 would be oh oh :) 10:51
DrForr_ Well volunteered? :)
[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 :(
Ulti suman stuff like a pandas module would be well after "production use" 10:53
lizmat masak: ?? corrections for what ?
Ulti python wasnt just born into existance with a full suite of scientific libraries :S
[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...
grondilu for graphics stuff I'm hoping the javascript backend will allow interaction with HTML5's canvas.
[ptc] Ulti: this is true. Python went through the process of having 3 separate numerical array implementations before thing settled on NumPy 10:54
*things
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
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
10:55 hohoho left
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
[ptc]: yeah hopefully numeric arrays will just be numeric arrays :D
itz_stmu1 . o O ( surely we need a few ORMs and MVC web frameworks first )
Ulti rather than someone making their own hacky NativeCall implementation 10:56
10:56 itz_stmu1 is now known as itz_stm, itz_stm is now known as itz_stmuk
suman Ulti Yeah but Stats is limited in functionality. 10:57
11:00 rindolf left 11:02 softmoth joined
RabidGravy so with EXPORTHOW::DECLARE one can introduce a new class-like declaration, but can you do similar for attributes? 11:06
11:07 softmoth left
RabidGravy i.e. replace 'has' with something else 11:08
jnthn RabidGravy: Change the keyword, or change the Attribute meta-object that's used?
RabidGravy well both really, the former for descriptive purposes 11:09
[ptc] Ulti: yeah, I hope that too :-)
RabidGravy e.g "table Foo { column $.bar; }"
11:10 sQuEE` is now known as sQuEE
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 github.com/Util/Perl6-Math-Quatern...ernion.pm6 and I'm wondering if ($.r, $.i, $.j, $.k) should not be real instead of Numeric.
*Real
11:11 Ven joined
dalek pan style="color: #395be5">perl6-examples: a590856 | (Steve Mynott)++ | util/update-and-sync:
nuke moar before radudobrew build in an attempt to fix panda install on hack
11:11
RabidGravy let's see
11:12 ely-se joined
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 :-)
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:14 gtodd left
lizmat afk for half an hour or so 11:16
11:19 gtodd joined
RabidGravy I think it'll be a trait for the time being ;-) 11:20
11:21 laouji left 11:24 suman left 11:27 gtodd left, gtodd1 joined
jdv79 ugexe: huh? 11:31
11:31 laouji joined
jdv79 oh, nevermind 11:32
11:33 ely-se left
Juerd I still don't understand react { ... }. Is there anyone who can explain what it does? 11:35
11:35 sQuEE is now known as sQuEE`
jdv79 jnthn stated it nicely once in here... 11:36
11:37 dayangkun left
jdv79 Juerd: irclog.perlgeek.de/perl6/2015-08-22#i_11099008 11:37
Juerd Thanks
11:40 ely-se joined
Juerd I wonder if it's appropriate to use in a module. From that description, probably not. 11:40
I'm attempting to port Net::MQTT::Simple; it's proving to be hard.
jnthn Juerd: Not unless you're writing an application framework, not really
Uh, too much not :) 11:41
Juerd So I should just return supplies and have the user add react {}?
jnthn Juerd: Yes.
Juerd MQTT (a publish/subscribe protocol) is the perfect opportunity to play with supplies, I think 11:42
jnthn *nod*
11:45 kid51 joined
jdv79 its not a public discussion group if i have to login to fb to see it 11:49
why can't it actually be public; either on fb or not 11:50
11:52 kid51 left 11:55 hohoho joined
dalek pan style="color: #395be5">perl6-examples: 5a1bb39 | paultcochrane++ | util/update-and-sync:
Purge and rebuild rakudobrew

  ... to ensure that *everything* is clean and up to date.
12:06
lizmat jdv79: it's a public discussion group *inside* Facebook
and it's run by people *on* Facebook 12:07
jdv79 ok
lizmat and to get on Facebook, you need a login
that's just the reality of it
El_Che brrr
lizmat well, it shouldn't stop anybody to start a group on twitter (is there such a thing?) 12:08
or somewhere else...
:-)
El_Che don't laugh with google+ :)
lizmat TIMTOWTDI
fwiw, I'm *not* on FB, but woolfy is... :-) 12:09
.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
lizmat yeah, it was really strange to hear about MH17 once we arrived in Portkand, OR 12:11
*Portland
El_Che I was in South South-East Asia a few days for the tsunami 12:12
we met a lot of people going south, to relax at the beach after a long backpacking trip
we headed home for christmas (after some 20 months on the road) 12:13
lizmat wow :-)
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 :-)
El_Che yes, I am impressed. What I've seen is very neat 12:16
12:16 Hor|zon left
itz_stmuk I suppose you like both slow languages ;) 12:16
El_Che ahaha
itz_stmuk at least perl6 has the excuse of being new
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 kudo/nom: 52bac00 | lizmat++ | src/Perl6/World.nqp:
Change boilerplate to use $*W.current_line
jdv79 is * really a valid version literal? 12:19
lizmat m: say Version.new(*) 12:20
camelia rakudo-moar fa024f: OUTPUT«vWhatever.140213059435832␤»
lizmat :-)
ShimmerFairy m: say v*
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␤»
ShimmerFairy m: say v1.*
camelia rakudo-moar fa024f: OUTPUT«v1.*␤»
ShimmerFairy I believe it's a wildcard in version literals, might be wrong
jdv79 so a version of * in a META6.json file is invalid? 12:21
moritz m: say Version.new('*')
camelia rakudo-moar fa024f: OUTPUT«v*␤»
moritz seems to be valid
just not as a literal
jdv79 that's an interest case then. a non-changing version designating different dists 12:22
is that spec'd?
12:22 cgfbee joined
jdv79 seems like a bad, and possibly useless and possiblyt complicating, idea on the surface of it. 12:23
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.
itz_stmuk is it intended to return precompilation to panda? or does it belong elsewhere?
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 :)
lizmat what ShimmerFairy said 12:26
lizmat is hoping jnthn will have some time to look at it soon 12:29
12:31 rvosa joined
jdv79 right now there are META6.json files that contain a version value of * 12:33
is that valid and if so how is that to be handled? i'm hoping no. 12:34
itz_stmuk m: Str $foo = "a";
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␤…»
itz_stmuk m: $foo= "a"
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"␤»
lizmat jdv79: it may be a valid Version value, but I don't think we want to allow that in a META6 file 12:35
dalek kudo/nom: 0e60be5 | lizmat++ | src/core/Version.pm:
Allow creation of a bare Whatever Version
12:37
jdv79 maybe this is part of the friction/difference between a versioned world and what we use now (tip of gh repo)
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
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
jdv79 and installing from github as we do now - how will that work? 12:38
if i don't incr the version in my META file then is that invalid of handled somwehere? 12:39
ShimmerFairy: basically:)
ShimmerFairy I think github installation has to be "bleeding edge", in the interest of not making the module installer pull its hair out :)
lizmat jdv79: it would be just another content storage
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
jdv79 its still v1.1 but its a different commit
tadzik git* (when installing from github)
lizmat the real problem comes when you have multiple versions of modules from github installed, and they share the same api value
tadzik that allows people to use github for everything and still have proper versioned releasese
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
lizmat by the version selection logic we worked out with e.g. FROGGS, you could argue you should select the most recent one
Ven mmh, looking at the docs for Str, I can't seem to find it. do we have a method to pad a string?
jdv79 so panda gets git tag support?
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
lizmat Ven: pad a string how ?
12:42 loren joined
Ven lizmat: add spaces at the right 12:42
ShimmerFairy jdv79: I don't think so, not every project will use tags :)
lizmat printf ?
Ven s/at/to/
jdv79 well panda has to rely on something, no?
its ripe territory for thought at least
12:42 tokuhirom left
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
at most, it should select the CUR to do the installation 12:43
and then let that CUR handle the installation
ShimmerFairy jdv79: just because github calls tags "releases" doesn't mean we should fall into the same trap :P
Ven lizmat: hah, it's to the left with sprintf :P 12:44
I'm bad at sprintf
jdv79 * works
dalek ast: ef63586 | lizmat++ | S02-literals/version.t:
Add test for bare Whatever Version
itz_stmuk Ven: see the C man page ;)
Ven itz_stmuk: I'm on the man already :P
itz_stmuk I always found that annoying in perl5 doc 12:45
moritz huh? perldoc -f sprintf
340 lines of docs
lizmat m: my $a = "foo"; say sprintf "xxx %-8s yyy", $a # Ven
camelia rakudo-moar fa024f: OUTPUT«xxx foo yyy␤»
tadzik jdv79: pretty much
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
camelia rakudo-moar fa024f: OUTPUT«xxx foo yyy␤»
Ven m: (1..Inf).map({sprintf "%-5i",$_}) Z~ lines() ==> join "\n" ==> say()
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…»
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
Ven It's sooooo cool, being able to numerate lines like that XD
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 eliasr left
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…»
lizmat m: for lines.kv -> $line, $text { say "$line: $text" } # sigh :-)
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…»
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 :-)
moritz have since at least 5.8 :-)
Ven lizmat: hey, that sounds too easy
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;␤»
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;
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]␤»
loren I just want replace the last whitespace with '+' 12:50
12:50 softmoth joined
loren The output is not correct. 12:52
'+345 +456' should be on the first line. 12:53
12:53 jkva_ left 12:55 softmoth left, jkva joined
moritz m: $_ = '123 345 456'; s/.* <( \s /+/; .say 12:55
camelia rakudo-moar 0e60be: OUTPUT«123 345+456␤»
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
ilmari what does <( mean?
loren Sorry, the last two whitespace
moritz ilmari: \K 12:57
pmurias lizmat: and for the github repo you can specify a branch/tag/commit id
ilmari moritz: ew, unbalnced parentheses
moritz ilmari: delimits the match on the left; )> delimitrs it on the right
loren moritz, sorry, it should be 'the last two whitespace'
pmurias lizmat: remember that on github there is a bazillion forks of everything 12:59
dalek pan style="color: #395be5">perl6-examples: 9050c8b | paultcochrane++ | / (3 files):
Move dependencies installation into a make target

This centralises the definition of the dependencies into one location and removes their definition from the update scripts and the travis config.
ilmari m: $_ = '123 456 789 abc'; s/ .* <( \s+ (\S+) \s+/+$0+/; .say
camelia rakudo-moar 0e60be: OUTPUT«123 456+789+abc␤»
moritz ilmari++ 13:00
though I still don't understand the Nil warnings in loren's example
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␤»
loren It's wrong, obviously..
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
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
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␤»
loren 123++ \n abc+345+456 \n 123+def+ghi 3\n
moritz aye, it doesn't seem to work the frist time
but why?
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」␤»
loren The regex match was right
13:05 Ven_ joined
jnthn lizmat: Digging into some work on pre-comp management design and stuff at the moment. 13:05
13:06 Ven left
lizmat jnthn++ 13:06
dalek pan style="color: #395be5">perl6-examples: b6f1b3e | paultcochrane++ | Makefile:
List dependencies more nicely

Which should also make extending the list easier
pan style="color: #395be5">perl6-examples: 26a20a5 | paultcochrane++ | util/update-and-sync:
Only build Rakudo and install Panda if really necessary
13:10 Hor|zon joined 13:12 virtualsue left 13:14 RJ250 joined, RJ250 left 13:15 ely-se left, sufrostico joined 13:18 Ven_ left 13:19 AndroUser joined, ely-se joined
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
lizmat AndroUser o/
I have been told I'm human 13:21
AndroUser Hehehe nice...
jonadab My college roommate told me I'm half human.
"Half human, half Vulcan, and half integrated circuit", were his exact words, IIRC.
RabidGravy wasn't a maths undergraduate then 13:22
;-)
jonadab No, _I_ was a math major. He was a counseling major.
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"
AndroUser Man how could I start tinkering with perl6? Any faq ?
Hhehe nice quote from blade runner 13:23
gfldex AndroUser: github.com/perl6/faq perl6.org/documentation/
AndroUser Ok, thank you buddy. I'll check the docs first and then I' ll be back here with more concise questions 13:25
See you guys, thank you and have a fine day 13:26
13:26 AndroUser left
timotimo maybe we should have suggested the slide set jnthn brought to olten? 13:26
jnthn.net/papers/2015-spw-perl6-course.pdf
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?
lizmat fwiw, I will be using that slide set (translated to Dutch) in a 45 min talk at the T-Dose end of November
moritz instead of outdated wikibook crap
itz_stmuk that pdf is in rakudo star so he should notice it
13:27 rvosa left
moritz (unless someobody updated the wikibook recently :-) ) 13:27
jnthn lizmat: I'd offer to review, but it'd be all Dutch to me :P 13:28
lizmat :-)
itz_stmuk maybe review would be possible with Dutch Courage
13:28 Jaglor left 13:29 CurtisOvidPoe joined
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:29
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.
moritz CurtisOvidPoe: or short, "no"
you'd have to coerce to Rat afterwards
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)
lizmat CurtisOvidPoe: create your own √ op ?
moritz CurtisOvidPoe: not really
jnthn So we'd need to actually implement sin/cos/tan/sqrt and so forth in terms of big integers
dalek c: e23e67e | (Steve Mynott)++ | bin/p6doc:
deduplicate p6doc -f output
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 CIAvash left
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:34
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
it's just a different tradeoff about the numbers you can represent precisely 13:36
masak followup to CurtisOvidPoe++'s question:
have sqrt(2), want a Rat at a given precision.
what sub or method do I use to round to (let's say) 1/256th precision?
moritz m: say sqrt(2).Rat(1/256).perl 13:37
camelia rakudo-moar 0e60be: OUTPUT«<17/12>␤»
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.
moritz m: say sqrt(2).Rat(1e-6).perl
camelia rakudo-moar 0e60be: OUTPUT«<1393/985>␤»
masak moritz: thanks
jnthn uh, not sure my last sentece grammared, but anyway... :)
*sentence :)
lizmat
.oO( sentience )
13:38
moritz maybe it didn't grammar, but it jnthnd
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
And I’m pretty sure the performance of Rats is abysmal compared to floats :)
ely-se use base pi to represent the numbers and you only need one pit (pi bit) 13:43
masak two, right? 13:44
pi would be encoded as "10"
CurtisOvidPoe Heh.
moritz erm, no
erm, yes
moritz confused :-)
ely-se shush
moritz no
0 = 0, 1 = pi # in base pi 13:45
FROGGS aye
moritz erm, no
pink_mist lol
moritz the last digit is always base**0 13:46
so it's 10 after all
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
moritz ely-se: I think nobody here seriously argues the other way
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!
masak moritz: for example, in base -i, -i is encoded as "10"
13:47 laouji left
moritz masak: as it is in base... 10. d'oh. 13:48
ely-se masak: $b_10 = 10_b$ :P
I wrote a ternary VM recently.
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?
moritz ely-se: 0
ely-se :(
masak ely-se: ε
ShimmerFairy 1 - 1
ely-se I like to go all INTERCAL and use Roman numerals. 13:50
lizmat sometimes I wish there was a way to mark a MMD candidate as "missing" 13:53
kxxv doesn't make sense on Mixes... 13:54
now I have to: + multi method kxxv(Mixy:D:) { fail ".kxxv is not supported on a {self.^name}" }
to make sure it won't get called on a Mix
jnthn lizmat: Um, doesn't it only make sense on Bag/BagHash?
lizmat that's what I said
jnthn So it should only be in the Baggy role?
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
jnthn I...thought mixes did Mixy?
timotimo so that people don't go introspecting and trying to call methods/subs that are only supposed to die
lizmat yes, and Mixy does Baggy
jnthn Yes, I'd rather we find a way to put the method only on objects that need it
lizmat ok, it was just a thought :-) 13:56
carry on :-) nothing to see here :-)
jnthn ooc, does Baggy imply Setty also?
ShimmerFairy jnthn: only on objects that need it... now why did 'submethod' pop into my head? :P
lizmat ope
nope
jnthn Why does Mixy ~~ Baggy ooc?
Or I guess I'm asking: should it? :) 13:57
Are there other methods that don't make sense on mixes?
lizmat grab and pick
jnthn What do we do with those today if you call them on a Mix? 13:58
Also fail?
lizmat yup
fail ".grab is not supported on a {self.^name}";
fail ".pick is not supported on a {self.^name}";
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 :-)
but Mixes got added later, really
and apart from some saniity checks, Mixes are just Bags 14:00
jnthn Why do we need those to get the structure "to spec"?
Does the spec have Baggy ~~ Mixy?
lizmat because then I could do Bags/Mixes as object hashes and still be performant ?
14:00 jkva_ joined
lizmat Basically, at the moment we have 2 internal ways of simulating VM object hashes 14:01
one that uses 2 hashes (TypedHash) and one that uses 1 hash with pairs (Bag/Mix)
14:01 jkva left
lizmat also note that at the time Bags/Mixes were implemented, one could not use typed hashes in the core settings 14:02
from a performance point of view, I'm still not sure which one is better 14:03
TypedHashes probably use a lot more memory (because each key.WHICH lives in there twice)
assuming our hash implementation does not share keys between hashes?
(like p5 does?)
jnthn Well, strings are immutable 14:04
And so can be shared
lizmat yup, which is what p5 does to reduce memory requirements for hashes
jnthn So provided we only compute the actual WHICH once, it should work out
lizmat anyways, I think we digress... 14:05
it was just a thought
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
yoleaux 07:22Z <nine> [Coke]: Can you _please_ fix my RT user (nine@detonation.org). All I get is niner.name/rt.perl.org.png and it's so frustrating to work with.
07:24Z <FROGGS> [Coke]: does it make sense to make somebody else an RT-admin too? I'd volunteer fwiw
[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:07
jnthn Down to 75 xmas \o/ 14:09
14:09 rindolf joined
[Coke] nine - sent an email asking them to investigate your account; FROGGS - sent an email asking them to make you an admin-admin. 14:11
14:13 lolisa left
FROGGS [Coke]: \o/ 14:14
dalek ast: 4d7b127 | lizmat++ | S02-types/ (4 files):
Bag/Mix(Hash).values/keys/kv/pairs/antipairs/kxxv
14:15
14:15 ely-se left
dalek kudo/nom: 4ddf092 | lizmat++ | src/core/ (2 files):
Disallow Mix(Hash).kxxv
14:15
14:20 n0tjack joined 14:21 edehont left
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:29
camelia rakudo-moar 0e60be: OUTPUT«(Any)␤»
jnthn ah, hm
k
14:30 khw joined 14:33 ely-se joined 14:38 FROGGS left, ZoffixW joined 14:39 softmoth joined
ZoffixW jnthn, what software did you use to make this, or did you just manually hack index.html? jnthn.github.io/css-tiny-presentati...ntation/#/ 14:39
14:40 tokuhirom joined
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:40
mantovani interesting result paste.scsys.co.uk/500242 14:43
jnthn ZoffixW: Oh, that was some fun
github.com/jnthn/css-tiny-presentation is the repo
mantovani This is perl6 version 2015.09-253-gbad9be0 built on MoarVM version 2015.09-55-gf09c782
jnthn presentation/template.html is hand-written, but note the <!--STORY--> in there 14:44
mantovani do you guys are aware about this ?
jnthn That is filled out by tools/codestory.p6
ely-se mixing tabs and spaces -- sin!
jnthn Which uses the git history of the repo itself.
ZoffixW jnthn, thanks I will. Need to write my own talk and I loved the format/UI of yours :)
14:44 tokuhirom left
jnthn ZoffixW: iirc I had a naming convention on the commits to note which ones to not include 14:45
ZoffixW: And I used interactive rebase to edit the presentation :D
mantovani perl5 knows I'm doing a static operation and just do it once while perl6 does 10000000 times.
dalek kudo/nom: 154f44b | lizmat++ | src/core/asyncops.pm:
Make await on Iterable, rather than List, jnthn++
14:46
14:46 skids joined 14:47 arunesh left
softmoth mantovani: I do know that some for loop optimizations are ongoing, but not sure if that is included 14:47
lizmat the for Range:D opt is still awol 14:48
jnthn mantovani: Perl 6 does actually constant fold the thing inside the loop
ZoffixW mantovani, even worse on my box: fpaste.scsys.co.uk/500243
jnthn mantovani: But, what lizmat++ said; a bunch of semantic list improvements cost an important optimization
ZoffixW almost 2 minutes 14:49
jnthn We'll put it back, but we're more worried about fixing semantics at the moment.
ZoffixW is not too worried about performance ATM
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
Thanks for noting it.
lizmat mantovani: also, the perl 5 result is not exactly correct :-) 14:53
$ perl -E 'say -.1 -.2 + .3'
-5.55111512312578e-17
$ perl6 -e 'say -.1 -.2 + .3'
0
14:54 ely-se left
jnthn btw, for anyone curious how I know it constant-folded the operation, do --target=optimize and look out for 14:55
ZoffixW :D
jnthn - QAST::Stmt (-0.1 - 0.2 + 0.3)
- QAST::WVal(Rat)
masak lizmat: -5e-17!? that's *fast*! :P
14:55 domidumont left
ZoffixW Oh, that's cool. 14:56
lizmat masak: even goes back in time! Who needs constant time anyway ?
jnthn: wrt to the sink-all in MapIterator, I can only trigger it with something like: 14:58
m: my %h = ^100000; %h.values 14:59
camelia ( no output )
lizmat m: my %h = ^100000; for %h.values { } # this triggers the pull-one
camelia ( no output )
jnthn Right
lizmat so I *think* we're safe
jnthn Aye
14:59 ely-se joined
jnthn My worry was because of the map/Map confusion 15:00
lizmat well, yeah... maybe call it MappyIterator ?
jnthn (That is, I was confused when I reviewed your patch about what we were talking about.)
(So your patch itself is fine.)
That could be better maybe... 15:01
lizmat will do
jnthn Or HashIter even though Hash is the subclass
lizmat yeah, following the Set/SetHash, I wonder whether we shoudn't rename Map to MapHash 15:02
15:02 edehont joined 15:03 jkva_ left
lizmat so, what happend to EnumMap anyway ? 15:03
is that just Enum now?
jnthn It became Map
lizmat ah, ok
jnthn And Enum went away 'cus it confused everyone :)
lizmat so we don't have an immutable Map at the moment
jnthn No, Map is immutable
Hash is the mutable Map 15:04
iiuc :)
lizmat ah, oh?
ely-se lizmap
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 hohoho left
TimToady looks around for his brane... 15:06
masak +1 on renaming Map to something longer 15:07
ilmari m: :42fleem # why?
camelia ( no output )
TimToady well, that's why we had EnumMap
ilmari m: say :42fleem # why?
camelia rakudo-moar 4ddf09: OUTPUT«Unexpected named parameter 'fleem' passed␤ in block <unit> at /tmp/kZu2malD8k:1␤␤»
ilmari m: say([:42fleem]) # why? 15:08
camelia rakudo-moar 4ddf09: OUTPUT«[fleem => 42]␤»
ilmari is that just to support s:2nd/foo/bar/ ?
lizmat fwfw, now I realize Map is immutable, I'm fine with it :-)
TimToady ilmari: it's a generalization of that
lizmat m: dd :10times 15:09
camelia rakudo-moar 4ddf09: OUTPUT«block <unit>␤»
lizmat m: dd (:10times)
camelia rakudo-moar 4ddf09: OUTPUT«:times(10)␤»
masak ilmari: yes.
ilmari m: say [:10times2]
camelia rakudo-moar 4ddf09: OUTPUT«[times2 => 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:10
ilmari masak: maybe the tests for said language should not be perpetuating such misuse... 15:12
github.com/perl6/roast/commit/4d7b...aee44aR513
pmurias masak: I have always assumed that there will be use ultra::strict:and::pendantic that enforces a subset on those who want it
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␤»
ely-se why can't you do this?
ZoffixW hopes there won't be any "use strict;" for P6.
pink_mist ely-se: maybe you wanted IntStr?
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
pink_mist then I'd suggest: see how IntStr is made and do it like that?
jnthn ely-se: For now, you'll have to write it as `$x where Int|Str`
pink_mist oh, that's a much better answer than I had :D 15:15
TimToady for always, I think
| is formally ambiguous in a sig if you do that
jnthn heh :)
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
jnthn Didn't think of that.
TimToady likewise &
15:16 diana_olhovik_ left, softmoth left
ely-se jnthn: oh ok :3 15:16
TimToady just as 'likewise &' is formally ambiguous in irc-ese :)
15:16 thou joined
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
TimToady if it's ambiguous, you don't know if it's an error 15:18
we could *guess*...
ely-se it's not ambiguous, because it gives an error
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.
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
I agree the current message is a bit LTA 15:20
ely-se time to go home, goodbye!
15:20 ely-se left
TimToady at least it says that now rather than complaining about a missing block :) 15:20
15:21 thou is now known as softmoth
pink_mist is there a nice operator to do integer division and get the remainder as well? 15:21
or should I get the remainder in a separate step?
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))␤»
TimToady .polymod
n0tjack I recently wrote an operator called "antibase", which is kind of the inverse to :base[digit, digit, digit]
TimToady m: say 86200.polymod(24,60) 15:23
camelia rakudo-moar 4ddf09: OUTPUT«(16 51 59)␤»
n0tjack using that, you could write (0,denominator) antibase numerator
that would give you quotient, remainder
in one step
TimToady m: say 86400.polymod(60,60)
camelia rakudo-moar 4ddf09: OUTPUT«(0 0 24)␤»
pink_mist ohh, that looks sweet
ilmari m: say 86500.polymod(60, 60, 24) 15:24
camelia rakudo-moar 154f44: OUTPUT«(40 1 0 1)␤»
TimToady n0tjack: polymod will do that if you feed it $base xx * 15:25
n0tjack TimToady: now you tell me ;)
15:26 softmoth left
ilmari m: 1234567890.polymod(10 xx *) 15:27
TimToady hmm 15:28
camelia rakudo-moar 154f44: OUTPUT«(timeout)»
TimToady shouldn't timeout
ilmari premature eagerness?
TimToady m: say 1234567890.polymod(10 xx *)
lizmat method polymod(Int:D: *@mods)
n0tjack m: 1234567890.polymod(10 xx floor log10(1234567890));
camelia rakudo-moar 154f44: OUTPUT«(timeout)»
( no output )
15:28 larion left
TimToady * is flat, not eager 15:29
lizmat guess we need a Seq candidate ?
ah...
ilmari m: sub foo($n, *@mods) { @mods[^$n] } say foo(5, 10 xx *)
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␤ …»
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:30 telex left
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:31
ilmari m: sub foo($n, *@mods) { @mods.elems }; foo(10 xx *) 15:32
camelia ( no output )
ilmari m: sub foo($n, *@mods) { @mods.elems }; say foo(10 xx *)
camelia rakudo-moar 154f44: OUTPUT«0␤»
Ulti 6s vs 17s on my machine
ilmari polymod does "my $inf = @mods.elems == Inf;"
TimToady polymods is using a pre-GLR-style .elems, I think
15:32 telex joined
TimToady *mod 15:32
ilmari m: (1,3,4).elems.say
camelia rakudo-moar 154f44: OUTPUT«3␤»
ilmari m: (10 xx 20).elems.say
camelia rakudo-moar 154f44: OUTPUT«20␤»
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…»
TimToady it's testing that against Inf
ilmari m: dd (10 xx *).elems
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…»
ilmari m: dd ((10 xx *).elems)
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…»
TimToady m: say (10 xx *).elems == Inf
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 15:34 kdjfnbndsndsdfdk joined
ilmari m: sub foo(*@mods) { @mods.elems }; say foo(10 xx *) 15:34
TimToady yeah, that 15:35
camelia rakudo-moar 154f44: OUTPUT«(timeout)»
lizmat is testing a fix
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␤␤»
TimToady m: sub foo(**@mods) { @mods.elems }; say foo(10 xx *)
camelia rakudo-moar 154f44: OUTPUT«1␤»
TimToady right...
m: sub foo(*@mods) { @mods.is-lazy }; say foo(10 xx *) 15:37
15:37 mr_ron joined
TimToady innersting 15:37
camelia rakudo-moar 154f44: OUTPUT«(timeout)»
15:37 softmoth left 15:38 ZoffixW left
lizmat yeah, it doesn't even get into the body 15:38
TimToady obviously in the flattener, pre binding
15:38 softmoth joined
pink_mist yay, my innocuous question made people notice a bug =) 15:39
lizmat $ 6 'say 1234567890.polymod(10 xx *)' 15:40
(0 9 8 7 6 5 4 3 2 1)
TimToady m: sub foo(**@mods) { @mods.elems }; say foo(|(10 xx *))
what bout that one?
camelia rakudo-moar 154f44: OUTPUT«(timeout)»
lizmat m: sub foo(+@mods) { @mods.elems }; say foo(|(10 xx *)) 15:41
m: sub foo(+@mods) { say @mods.is-lazy }; say foo(|(10 xx *))
15:41 softmoth left
camelia rakudo-moar 154f44: OUTPUT«(timeout)» 15:42
15:42 softmoth joined, cibs joined
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)␤»
lizmat m: sub foo(+@mods) { say @mods.is-lazy }; say foo(10 xx *)
camelia rakudo-moar 154f44: OUTPUT«True␤True␤»
TimToady both of those would be fixed by the hypothetical lazy argslip
ilmari m: sub foo(*@mods) { 42 }; say foo(10 xx *) 15:43
camelia rakudo-moar 154f44: OUTPUT«42␤»
ilmari m: sub foo(*@mods) { @mods; 42 }; say foo(10 xx *)
camelia rakudo-moar 154f44: OUTPUT«42␤»
lizmat TimToady: spectesting 1. +@mods as sig + @mods.is-lazy
15:47 softmoth left
dalek kudo/nom: 51bbf66 | lizmat++ | src/core/ (2 files):
Late GLRification of polymod
15:51
ilmari lizmat: that makes the variable name misleading 15:52
loren night, perl6 everyone.
TimToady loren: o/ 15:53
lizmat gnight loren
15:53 FROGGS joined, loren left
masak 晚安, loren 15:53
TimToady loves that character "sun escape" 15:54
15:54 llfourn left
PerlJam "perl6 everyone" sounds interesting. Kinda like "live long and prosper" 15:54
FROGGS o/
interesting...
[Coke] PerlJam: peace, and long life.
TimToady "I perl6 you!" 15:55
FROGGS ohh, err, "fascinating"
(sorry)
jnthn: in case something similar is not known outside of Germany: www.getdigital.de/scheiss-encoding.html 15:56
jnthn FROGGS: :D 15:57
15:58 MilkmanDan left
FROGGS does that count as an autopun? masak? 15:58
ilmari FROGGS: www.zazzle.com/i_unicode_t_shirts-2...3480103840
TimToady wishes someone would unicode irssi... 15:59
ilmari TimToady: irssi is fully unicode-capable
TimToady only in the BMP
ilmari screen pre 4.2 doesn't handle astral-plane characters, though
TimToady: that's screen, not irssi
TimToady oh, ok
anybody have a better screen? 16:00
ilmari TimToady: debian stable has 4.2
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 pmurias left, MilkmanDan joined
ilmari ubuntu vivid has 4.2.1, as does trusty-backports 16:01
dunno which version the version of mint you're running is based on
16:02 n0tjack left, zakharyas left
lizmat ack polymod t/spec # nothing 16:03
TimToady heh: Screen version 4.01.00devel (GNU) 2-May-06
only 9 years old...
arnsholt Not bad. I once had a 12 year old flex on a uni machine
16:03 lichtkind joined
ilmari 4.2 only came out april 2014 16:04
hence it only being in trusty-backports, not trusty
gfldex some software projects are finished faster then others :-P
TimToady I've noticed that... 16:05
ilmari screen 4.2 took even longer than perl 5.10!
4.0.3: 2008-08-07; 4.2.0: 2014-04-27 16:06
16:07 hohoho joined 16:08 Ven joined 16:10 n0tjack joined 16:11 hohoho left
TimToady hmm, don't see it in trusty-backports, does it have a different name? 16:13
16:14 n0tjack left 16:16 softmoth joined
[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␤»
dalek ast: bb98a84 | lizmat++ | S32-num/polymod.t:
Add basic polymod testing
16:17 ponzellus joined
dalek kudo/nom: 2cb9b10 | lizmat++ | t/spectest.data:
Run basic polymod tests
16:18
[ptc] m: sub read-from-tokens(@tokens) { say @tokens.shift }; read-from-tokens(<a b c>)
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␤␤»
[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␤␤»
[ptc] m: sub read-from-tokens(Array @tokens) { say @tokens.shift }; read-from-tokens(<a b c>)
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␤␤»
jnthn [ptc]: If you want to reliably be able to do that, `@tokens is copy`
[ptc]: Which promises you your own mutable copy of the thing that was passed
[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
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 left, Ven joined
TimToady I think most of those 'is rw' instances changed to 'is raw' 16:22
16:23 n0tjack joined
TimToady panda is very noisy compared to cpanm 16:24
16:24 ^elyse^ joined 16:25 nowan joined, Ven left
JimmyZ uses zef 16:25
garu can I borrow a set of eyes from someone familiar with HTTP::UserAgent? gist.github.com/garu/0a1424f13b907b7519b2 16:27
I should note that perl6 -MHTTP::UserAgent -e 'say HTTP::UserAgent.new.get(q|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:29
16:30 anonMe joined
tony-o_ JimmyZ++ any feedback? 16:30
anonMe hello
garu hello :) 16:31
ilmari garu: IPv4 vs IPv6?
anonMe I noticed on the STD page ( 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/
anonMe is that meant to imply that they are basically done?
16:32 skids left
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.
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.
colomon anonMe: changes that used to go into STD normally go straight into Rakudo these days, I think.
anonMe that's interesting -- so is it used at all then?
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})'
anonMe btw, congrats on finally coming around to a release!
n0tjack oh, wait, I don't have to say join("\n")?
neato
anonMe can't wait for Christmas
TimToady [Coke]: wouldn't a unary function work there just as well?
[Coke] er, perl6 -e 'say lines().sort(*.comb(/\d/).join)' 16:37
n0tjack m: say ("hi", "there", "camelia").join;
camelia rakudo-moar 51bbf6: OUTPUT«hitherecamelia␤»
n0tjack oh, yes, I do. sadface
[Coke] TimToady++ # i just realized that after posting. :)
TimToady nor do you really need the join, I guess
JimmyZ tony-o_: and it looks like more feature than panda, and support multi-thread install? 16:38
TimToady might save some memory though
[Coke] eh,only like 100 lines.
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.
garu ilmari: maybe? but 127.0.0.1 yields a different exception: "Internal Error: 'server returned no data'"
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
jnthn lizmat: Yes 16:41
lizmat: Though at the moment it's hugely costly :)
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 :(
jnthn lizmat: Why?
If Map is like List then it can hold mutable things (including Scalars)
lizmat jnthn: if I block assignment in Map by making an ASSIGN-KEY method, then the above fails
16:43 Kogurr joined
lizmat ah? but we just established that Map is immutable ? 16:43
ah, but in the List way
jnthn In the same way List is
lizmat learned something today :-) 16:44
16:45 spider-mario left 16:46 tokuhirom left, kmel joined 16:47 Ven joined
dalek c/usage_statements: 38ad1cc | (David H. Adler)++ | doc/Type/Numeric.pod:
Added usage statements to Numeric.pod
16:47
c/usage_statements: 96a1c00 | (David H. Adler)++ | doc/Type/Proc/ (2 files):
Added usage statements to Proc/Async.pod and Pod/Status.pod
kmel m: say 'hello everyone!'
camelia rakudo-moar 51bbf6: OUTPUT«hello everyone!␤»
16:48 dha joined
lizmat m: note "kmel o/" 16:48
camelia rakudo-moar 51bbf6: OUTPUT«kmel o/␤»
16:49 Ven left 16:50 spider-mario joined, Ven joined 16:51 jkva joined
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:51
16:52 aruljohn joined, aruljohn left
TimToady probably needs breakfast in his brane 16:52
16:53 anonMe left
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:53
Ven n0tjack: nah, that $k has an odd number of elements 16:54
m: my $a = 1; say $a.hash
camelia rakudo-moar 2cb9b1: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/CLmjo1AOET:1␤␤»
16:54 dakkar left
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
n0tjack $k is supposed to be a Match object, I guess it ain't.
Ven n0tjack: github.com/rakudo/rakudo/blob/nom/...Any.pm#L67
that's probably it, yes :)
n0tjack what does "nodal" mean? 16:56
argh, I want a perldoc!
or for the search function on perl6.org to work better..
flussence S03:4302 16:57
synbot6 Link: design.perl6.org/S03.html#line_4302
16:57 rurban left
dalek kudo/nom: 70eea19 | lizmat++ | src/core/ (3 files):
MapIterator -> MappyIterator

It is an iterator role for Map, not for map {} or .map
16:57
16:57 abraxxa left
n0tjack flussence: thank you 16:58
kmel lets build a perldoc!
16:58 Ven_ joined, Ven left
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.
[Coke] kmel: see the perl6/doc repo on github 17:00
n0tjack oh, cute, S99 is a glossary of sorts
hey now, that's useful
17:00 firstdayonthejob joined
kmel thanks [Coke] 17:03
17:05 Ven_ left
TimToady might very well have ridden on the MH17 plane, having done that very route in the opposite direction 17:06
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:09
jnthn Time to go cook dinner. I'm gradually making progress on the module/precomp management stuff, but design work takes time... :) 17:10
17:10 TEttinger joined
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
n0tjack no, the stuff I want is the value of a Pair whose key is "hash" 17:11
I misinterepreted "hash" as a member of Match
flussence ah
n0tjack I want to extract the <stuff I want> from the Match, so I can fiddle it
japhb_ Lack of precomp (since it was turned off in panda) has made my small Perl 6 tools way less responsive. :-(
17:12 japhb_ is now known as japhb
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:14
shouldn't the second part also read C<$steps> rather than C<-$steps> since "dedent" is used? 17:15
moritz no 17:16
it dedents by a positive amount of space
and $steps is negative
so -$steps is positive
17:17 n0xff joined
dha That makes no sense to me whatsoever, but, hey, if you say so. *shrug* 17:17
geekosaur makes sense to me
but, well, it is a double negative
lucs (double negative)---- 17:18
dha geekosaur - that's what I'm thinking. But apparently I'm wrong.
geekosaur hm?
a dedent by a negative amount would be an indent
so you want to dedent by the negative of the negative number, making oit a positive dedent
TimToady vectors ftw 17:19
TimToady now imagines updents and downdents...
dha Ok, I see how it's supposed to work, but I think it would be confusing to someone reading the docs.
RabidGravy This is a fabulous paper but it make my head hurt www.dafx14.fau.de/papers/dafx14_kur...ed,_ci.pdf
dalek c: 18a0d51 | (David H. Adler)++ | doc/Type/Str.pod:
Added examples for .ord and .ords in Str.pod
17:20
lizmat
.oO( I'm more worried about my ears :-)
n0tjack is there any way to make dd stick a newline in here and there?
TimToady we are sorely lacking on prettyprinting currently 17:21
lizmat n0tjack: note 17:22
m: note
camelia rakudo-moar 2cb9b1: OUTPUT«Noted␤»
lizmat hmm....
17:22 jkva left
lizmat m: say() 17:22
camelia rakudo-moar 2cb9b1: OUTPUT«␤»
n0tjack lizmat++ !
that's precisely what I wanted!
TimToady I usually note '' 17:23
er, say ''
flussence
.oO( after using p6 for a while, seeing a zero-arg func with parens looks *weird*... )
n0tjack I see, it got rid of all the distracting stuff because their .gists were empty 17:24
that's so useful
17:24 xfix joined 17:27 FireFly left
lizmat dinner& 17:28
17:28 kmel left 17:34 espadrine left
JimmyZ m: .say 17:34
camelia rakudo-moar 70eea1: OUTPUT«(Any)␤»
17:34 vendethiel joined 17:35 ^elyse^ left 17:37 itz_stmu1 joined 17:38 FireFly joined, itz_stmuk left
moritz so -$steps is positive eb-sạiæw-y9~ 17:39
<ÙÙÜ´F <1QQ2QWQQA9~#19:22 <+camelia> rakudo-moar 2cb9b1: OUTPUT«Noted␤» 17:40
FROGGS ?
TimToady someone has travestied moritz!!! 17:41
17:41 FireFly left
flussence -ECATONKEYBOARD 17:41
FROGGS moritz: hi moritz jr. :o)
17:41 FireFly joined
flussence or that :) 17:41
dha Oddly, I think C<abs($steps)> might actually be clearer. Because "dedent by -$steps" *looks* like a double negative. 17:42
There may not be, however, an optimal solution to this one.
geekosaur it is a double negative. so I suppose it's actually a triple negative :p
flussence dha: maybe just omit the "by -$steps" entirely?
TimToady "Ain't never heard no horse sing no song." --Louis Armstrong 17:43
dha flussence - dunno. maybe. *shrug*
17:44 Effilry joined
TimToady I wonder how many people are actually familiar with the 'dedent' neologism 17:44
n0tjack I hear most people say "outdent" or "undent"
dha Probably not many, but in context with indent, it's probably clear.
TimToady we'd'a said 'unindent' when I was young
dha Although, yes, I think outdent is more standard. 17:45
TimToady +1 to outdent
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
TimToady yes, via .made (or .ast) 17:45
17:46 FireFly left
lucs Hmm... Now "indent" seems to be in the wrong direction (in opposition to "outdent"). 17:47
TimToady that's indentional!
lucs :)
dha :-) 17:48
17:49 Peter_R left
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
it unindents instead.
[Coke] dha: sounds good.
dha But that's just off the top of my head. 17:52
[Coke] - good enough to implement?
[Coke] though I slightly prefer outdent. :)
17:52 llfourn joined
dha I can certainly live with outdent. 17:52
lucs thinks he prefers "dedent". 17:53
lucs thinks out not too loud "indent/dentin" 17:55
17:55 ^elyse^ joined
dha a quick search reveals that outdent and unindent seem to be recognized as words, while dedent is not. 17:56
17:58 llfourn left
lucs Is "indent" used in contexts other than what we mean in regards to code? 17:58
17:58 vendethiel left
lucs looks it up, eh. 17:58
D'oh, of course it is.
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)␤»
n0tjack why is the last index 0 instead of 5, aqnd what's the error about?
arnsholt I use dedent as the antonym of indent; probably due to the Python reference grammar using that term 18:02
18:04 lea left
moritz m: given &index.assuming('0123456789' , *) { say .count, " ", .arity } 18:04
camelia rakudo-moar 70eea1: OUTPUT«2 1␤»
moritz note that map .count/.arity sensitive
18:04 vendethiel joined
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:06
not sure why it was ok for the first 2 values (2 and 7), but bailed out on 5 18:07
18:09 ponzellus left
moritz n0tjack: fwiw I'm not saying this is the cause of the problem; just pointing out a potential source of confusion 18:09
m: say '275'.split.perl
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…»
moritz m: say '275'.split('').perl 18:10
camelia rakudo-moar 70eea1: OUTPUT«("", "2", "7", "5", "").Seq␤»
n0tjack ahha
there's my error
moritz n0tjack: use .comb if you want to get a list of characters
n0tjack thanks, that's what I want
can you suggest a better way to find the index of each of those chars in another string? 18:11
lichtkind ever seen perl.6.org/ ? 18:13
18:14 Effilry is now known as FireFly
n0tjack say map {'0123456789'.index($_)}, '275181'.comb; 18:15
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.
[Coke] indentarthurdent 18:17
dha [Coke]++
lichtkind dha its just funny 18:18
[Coke] someone should offer 5 bucks for 6.org
I will chip in a dollar. :)
lichtkind i even 10 18:19
5 and 6 are not for sale 18:20
but we could get perl.5.org
and 6 alike
its bith same provider
should we do tht?
18:21 lea joined
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 =)
lichtkind thank you for the trust 18:23
FROGGS :P
lichtkind but i pondering what to to do with it
redirect to perl6.org for now
pink_mist I hope that's not for the .5.org one :P
lichtkind both are there 18:24
i checked
pink_mist no I mean don't redirect perl.5.org to perl6.org :P
lichtkind they call themself project 94 but they seem to have some affiliation with free software culture
nono perl.5.org redirect to perl.org
but project 94 waht reasoning from you too so i guess they function as spamfilter as well 18:25
n0tjack I think I have to resign myself to writing loops sometimes 18:28
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
dha (and are we agreed on outdent? 18:35
)
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++
that's usually a good way 18:38
moritz or just make the decision, period. 18:39
forgiveness > permission 18:40
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
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
n0tjack how does one test defined-ness? 18:44
RabidGravy .defined
dalek rl6-most-wanted: 28bc71a | (Zoffix Znet)++ | most-wanted/modules.md:
Mark Data::GUID as work in progress
n0tjack that is a good name for it :) 18:45
RabidGravy m: my $a; say $a.defined
camelia rakudo-moar 70eea1: OUTPUT«False␤»
n0tjack m: my %hash = (one => 2, three => 4); say %hash<seven>.defined; 18:46
camelia rakudo-moar 70eea1: OUTPUT«False␤»
n0tjack niiiice
RabidGravy there you could do,
m: my %hash = (one => 2, three => 4); say %hash<seven>:exists
camelia rakudo-moar 70eea1: OUTPUT«False␤»
n0tjack any reason to prefer that?
oh, does that : mean exists is an adverb of some kind? 18:47
RabidGravy yeah
18:47 zacts joined
dha Pull request created. 18:47
n0tjack m: say 4:exists;
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␤»
n0tjack heh
18:48 tokuhirom left
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
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.
lizmat there's .indices ?
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 $_
and we're invoking postfix:<++> rather than having it inlined
that's also where a million IntLexRef get allocated
gc time is about 20% of this 18:50
and we do 305 GC runs
postfix:<++> also takes 11% of the run time portion, i expect that'd be a lot better if it were inlined 18:51
n0tjack m: my %hash = (one => 2, three => 4); say %hash<one seven three>:exists; 18:52
camelia rakudo-moar 70eea1: OUTPUT«(True False True)␤»
n0tjack m: my %hash = (one => 2, three => 4); say +<<%hash<one seven three>:exists;
camelia rakudo-moar 70eea1: OUTPUT«Unexpected named parameter 'exists' passed␤ in block <unit> at /tmp/h9AdkJ8EJP:1␤␤»
timotimo oh!
would you look at that
n0tjack m: say +True; 18:53
camelia rakudo-moar 70eea1: OUTPUT«1␤»
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
n0tjack m: say +False;
camelia rakudo-moar 70eea1: OUTPUT«0␤»
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
lizmat how seriously do we need to take a test of .squish that uses a :with that *always* returns true ?
moritz lizmat: as serious as any other test, really 18:54
lizmat hmmm... I was afraid you would say that :-)
timotimo so yeah. we can reach perl5 performance here 18:55
on my machine we beat perl5 in this benchmark
19:03 hummeleBop joined
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␤␤»
n0tjack m: my %hash; say +%hash<missing-key>:exists;
camelia rakudo-moar 70eea1: OUTPUT«Unexpected named parameter 'exists' passed␤ in block <unit> at /tmp/D3uyOssZXI:1␤␤»
n0tjack how can I convert the False/True of :exists to a 0/1 ?
RabidGravy .Int 19:05
m: my %hash = (one => 2, three => 4); say (%hash<seven>:exists).Int
camelia rakudo-moar 70eea1: OUTPUT«0␤»
n0tjack thanks
mantovani jnthn: thank you, if it is inside t he loop is great :) 19:07
lizmat: I know it hehe -Mbignum solve that problem
n0tjack m: my %hash; say 5 * +defined %hash<nope>; 19:08
camelia rakudo-moar 70eea1: OUTPUT«0␤»
n0tjack wee
lizmat m: my $a = 42; say +?$a
camelia rakudo-moar 70eea1: OUTPUT«1␤»
lizmat m: my $a = ''; say +?$a 19:09
camelia rakudo-moar 70eea1: OUTPUT«0␤»
n0tjack you guys have thought of everything
RabidGravy too much crack
timotimo nobody cheers for that benchmark? :( 19:10
lizmat timotimo: sorry, I wasn't paying attention,
timotimo++ :-)
RabidGravy fabulous! 19:11
timotimo is sick, so extra in need of encouragement sometimes
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?
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␤␤»
tadzik whoa
that's loop and native int, but still!
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
tadzik timotimo: that's right, it shouldn't :P
timotimo and that's the kind of loop we would be generating anyway for the code that that person came in with originally
hm 19:14
actually, it seems like the constant folded Rat is not actually referenced in the optimized code at all 19:15
so the code actually turns into an empty loop
19:15 niceperl joined
timotimo and then the jit comes and generates an extremely tight loop for this 19:16
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
(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:18 [Sno] left
[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
19:21 edehont left
[ptc] e.g. my %x = ($vars.list Z @argv); 19:21
is this (or something like it) still possible?
flussence m: say %('a'..'z' Z=> ^26).perl
timotimo well, Z now creates (foo, bar) pairs; i *think* = flat ( ... Z ... ); should work
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)}␤»
[ptc] ah, so Z creates pairs (the docs say it returns a sequence. Is that now incorrect? 19:23
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
[ptc] timotimo++ thanks :-)
timotimo it's just not a sequence of single items
[ptc] "a sequence of pairs" would be more accurate? 19:25
19:25 edehont joined
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␤␤»
n0tjack m: my %hash = (one => 2, three => 4); say %hash<nope>.comb;
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 19:34 skids joined 19:36 [Sno] joined
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␤␤»
n0tjack oooh, because later whens are gonna test that value 19:39
gotcha
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.
dha Well volunteered!
dalek perl6-examples: 0657c2a | paultcochrane++ | categories/interpreters/lisp.pl: 19:40
perl6-examples: Replace `is rw` with `is copy`
perl6-examples:
perl6-examples: This should allow a mutable copy of the object within the sub so that one
perl6-examples: can shift off it. Thanks to jnthn++ for the tip.
dylanwh_ yay
19:40 dalek joined, ChanServ sets mode: +v dalek 19:41 zakharyas left, edehont_ left
[ptc] m: say $*OUT.t 19:44
camelia rakudo-moar 70eea1: OUTPUT«Cannot find method 'isatty': no method cache and no .^find_method␤ in block <unit> at /tmp/Zii2LyJtJp:1␤␤»
lizmat [ptc]: the canonical change of "is rw" was really "is raw" , I think TimToady / jnthn have deeper into
[ptc]: .t is NYI
I guess we should make it throw that
[ptc] lizmat: thanks :-) Yup, jnthn++ mentioned how to get the code do what I want it to do
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
lizmat ok, carry on :-)
[ptc] :-)
19:46 zakharyas joined 19:47 ZoffixW joined 19:51 llfourn joined 19:55 mattprelude left 19:57 llfourn left 20:01 gonz_ left 20:03 gonz_ joined 20:04 edehont left
[ptc] omg! The perl6-examples test suite passed! 20:04
20:04 Hor|zon left
timotimo sweet! well done :) 20:05
20:07 hohoho joined
n0tjack is there a directive I can put intra-regex to block backtracking in a capture? 20:09
timotimo you can put :r into a groupy thing 20:10
and :!r will do the opposite thing
n0tjack just what I was looking for
timotimo :)
n0tjack oh wait, I can also just stick it in a new token 20:11
20:11 kdjfnbndsndsdfdk left
timotimo sure 20:12
either way works
20:12 hohoho left
n0tjack are you trying to tell me tmtowtdi? 20:13
timotimo it's timo today
lizmat
.oO( ah, that's the nick of Ada Lovelace :-)
20:14
n0tjack aww, token-ifying it removes the need for my first given/when 20:15
I won't have that! 20:16
timotimo use all the features
20:17 jkva joined 20:19 zakharyas left
colomon moritz: will Travis CI run on ABC when Rakudo is updated, or only when ABC is updated? 20:20
20:20 Kogurr left
timotimo the latter, i believe 20:20
20:20 rindolf left 20:22 darutoko left
n0tjack ha! all(cake.have, cake.eat) 20:23
dalek kudo/nom: 3472966 | lizmat++ | src/core/Any-iterable-methods.pm:
Fix List.squish
20:27
n0tjack m: say -1 ** 0; # huge gotcha 20:28
camelia rakudo-moar 70eea1: OUTPUT«-1␤»
n0tjack is there some kind of tighter-binding unary - I can use?
timotimo m: say 0 R** -1
camelia rakudo-moar 70eea1: OUTPUT«1␤»
n0tjack thanks, but in my case that would require putting a very long expression in parens on the left 20:29
I suppose I'll just paren the (-1)
timotimo hehe
n0tjack man, I can see that one tripping me up for months
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...
n0tjack yep
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... )
n0tjack also, I know about "is looser" and "is tighter", not sure how to say "is as tight as possible"
timotimo is tighter &postcircumfix:<( )> ? :P
20:32 dha left
timotimo there's hardly anything tighter than invocation, eh? 20:32
n0tjack ok, I'm not going *that* far
20:32 frobisher joined, frobisher is now known as dha
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
JimmyZ: 'it' being zef 20:35
20:36 xfix left, diana_olhovik joined 20:39 rurban joined 20:43 diana_olhovik left 20:44 tokuhirom joined 20:46 diana_olhovik joined 20:49 leont joined, tokuhirom left
n0tjack in my grammar actions class, I'm using foo($/) as the signature for all my matches 20:52
20:53 diana_olhovik left
n0tjack is there a way to use patterns so that I can have complex-number($real, $imaginary) as actual parameters? 20:53
rather than having to do $/<real>, $/<imaginary> in the body?
20:53 jkva_ joined 20:54 jkva left 20:56 jkva joined 20:58 espadrine joined, jkva_ left
dalek kudo/nom: ca25b0f | lizmat++ | src/core/ (4 files):
Add sink protection to iterators that may need it
20:59
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:01
FROGGS that's not even a terrible idea... 21:03
leont Yeah, specially when combined with multi-methods, it actually sounds rather nice 21:04
(with the trait on the proto)
FROGGS creating a declarator keyword, wrapping every method like meth(|$/.list, |$/.hash), this would even allow to have multi methods depending on the match
:o)
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
n0tjack adding a lot of code
dalek oblem_solver_tutorial: 3c8bebd | lichtkind++ | / (2 files):
wrote 3/5 of chapter 0 paragraph 5
21:06
FROGGS n0tjack: this could also mean that you need to split up your tokens and/or add protos
n0tjack I'm not versed enough to follow along with you, yet 21:07
21:08 kmel joined
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
but I have a lot of optional tokens, so I have to test defined-ness
and then some can take multiple types, like int vs real
FROGGS gnight #perl6 21:12
21:12 FROGGS left
dalek c: e7d92df | (David H. Adler)++ | doc/Type/Str.pod:
Revised description of Str.indent
21:13
c: adde2fc | (Will Coleda)++ | doc/Type/Str.pod:
Merge pull request #160 from dha/master

Revised description of Str.indent
lizmat gnight freeze
dha thanks. 21:14
21:16 zacts left
dalek oblem_solver_tutorial: f72a182 | lichtkind++ | / (3 files):
wrote 3/5 of chapter 0 paragraph 5
21:16
21:17 zacts joined 21:19 zacts left, jkva left 21:22 TimToady joined
dalek href="https://modules.perl6.org:">modules.perl6.org: 51c18ed | (Zoffix Znet)++ | web/ (2 files):
Add jQuery 2.1.4

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
[Coke] Zoffix: let's at least use the same jquery CDN everywhere. 21:26
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!"
camelia rakudo-moar ca25b0: OUTPUT«😸 new screen is new!␤»
TimToady ilmari++
Zoffix [Coke], I did use a CDN. I couldn't find a v2+ on google 21:28
Oh. /me missed "the same"
Hm. we use a different jQuery version on perl6.org.
[Coke] so maybe let's switch other instances of jquery-from-cdn to use the same cdn you used in that commit?
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 :(
Zoffix [Coke], sure. I'll open an Issue on perl6.org and will take a look at it soon. Tomorrow, likely.
[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
there's a catface there but all it gives me is a box :(
21:32 rurban left
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 :-)
(on rakudo)
lizmat leont++ 21:35
flussence m: given 3 { when Int { say 'Int'; next }; when * !%% 2 { say 'Odd' } }
camelia rakudo-moar ca25b0: OUTPUT«Int␤next without loop construct␤ in block <unit> at /tmp/wc_uDMkmm_:1␤␤»
flussence huh, thought "next" was it...
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
box when it is focused, making me lose my place.
anybody else find this a bad user experience?
flussence +1 21:36
n0tjack m: given 3 { when Int {say 'Int'; proceed} when * %% 2 {say "even" } default {say "odd"} }
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 ␤»
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␤»
n0tjack m: given 3 { when Int {say 'Int'; proceed;} when * %% 2 {say "even"; } default {say "odd";} }
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␤»
leont Also, I just noticed Proc::Async doesn't support merging stdout and stderr, which is a bit of a bummer :-/
flussence softmoth: though I think browsers do the right thing for the html5 autofocus attribute there, so that's one option.
softmoth m: given 3 { when Int {say 'Int'; proceed}; when * %% 2 {say "even" }; default {say "odd"} }
camelia rakudo-moar ca25b0: OUTPUT«Int␤odd␤»
21:37 AW3i joined
lizmat leont: stdout and stderr are Supplies, not ? 21:38
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
softmoth S04:Statement-ending_blocks? 21:41
synbot6 Link: design.perl6.org/S04.html#Statement
softmoth S04:Statement\-ending_blocks?
synbot6 Link: design.perl6.org/S04.html#Statement
softmoth n0tjack: ^ I can't get the URL to show up right, but you get the point. :)
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:42
flussence did you `make install`? 21:43
AW3i i installed it from portage actually
21:43 kmel left
AW3i it pulled in nqp and moarvm 21:44
dalek href="https://modules.perl6.org:">modules.perl6.org: ae47203 | (Zoffix Znet)++ | web/ (2 files):
Handle cases where user presses "Back" button (Closes #15)
lizmat AW3i: could you gist the exact output ?
flussence oh that'd be why... rakudo doesn't work right if it's built in one place and moved to another
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
softmoth thanks, Zoffix++
lizmat good night, #perl6!
Zoffix \o/
AW3i goodnight
Zoffix night lizmat
flussence o/
Ulti AW3i: checkout rakudobrew before doing everything yourself 21:46
AW3i will do,thanks
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:50
21:51 Jaglor joined
Zoffix I'd like to see Perl 5's Mojolicious in P6, but the lead author is still contemplating porting it. 21:52
21:53 ^elyse^ left, hohoho joined
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
n0tjack What is the syntax for a when using a regex match? 21:54
21:54 edehont joined
n0tjack "" is stringy match 21:54
and // complains that I'm updating a read-only var
leont What's the point of t/spec/fudge? And why isn't it written in perl6? 21:55
21:55 bjz left
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:55
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 "␤»
n0tjack m: given "ar" { when "ad" {say "no";}; when rx/a./ {say "yes";}; default {say "oops";} }
camelia rakudo-moar ca25b0: OUTPUT«yes␤»
n0tjack nm
TimToady leont: I suggest you read the README
21:57 dha left
dalek ecs: 3ac3d18 | (Stéphane Payrard)++ | S04-control.pod:
tyop
21:57
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 hohoho left
TimToady n0tjack: most people just say 'when //' 21:58
or 'when m//'
n0tjack TimToady: I thought I had tried that an got a "can't update immutable variable" error
21:58 llfourn left
TimToady was it a s///? 21:59
n0tjack no
TimToady then it's a bug
n0tjack but I could have made some other good
goof
TimToady ponders how to fix $x ~~ S/foo/bar/
22:02 edehont left 22:09 mr_ron left, mr_ron joined 22:12 firstdayonthejob left 22:15 Exodist left
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, kid51 joined 22:16 espadrine_ joined
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:16
22:17 espadrine left, vendethiel left 22:18 firstdayonthejob joined
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?
TimToady grep none(...)
22:23 lichtkind left
spacebat is there a simple incantation on rakudo to parse a string of perl6 source and get back some kind of AST? 22:25
22:25 bjz joined
TimToady perl6 --target=ast -e '1 + 2' 22:26
but not much internal support for that yet
(without digging into internals)
will have more support for that when macros are mature, but probably post-Christmas
spacebat ah, I can see HLL/Grammar.nqp is there, I just don't seem to be able to load it
fair enough
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
we'll get there - I'm excited :)
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 bjz left
spacebat thanks for the advice anyway 22:30
22:35 bjz joined 22:39 apotheon_ is now known as apotheon, NoRefill joined, apotheon left, apotheon joined
dalek href="https://modules.perl6.org:">modules.perl6.org: 7ce32dd | (Zoffix Znet)++ | / (10 files):
Make module table sortable

Makes recent.html stuff deprecated. (Related #14)
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?
I want to return a array (or list) of numbers, each number produced by one invocation of method numeric-atom($/) 22:41
leont Something like return @<numeric-atom>.map(*.made) 22:42
n0tjack that still appears to be returning a match or AST of some kind 22:44
22:46 tokuhirom joined 22:47 kid51_ joined, bjz left 22:49 kid51 left, kid51_ is now known as kid51 22:50 tokuhirom left 22:58 niceperl left
dalek kudo/nom: f54ff83 | TimToady++ | src/Perl6/Actions.nqp:
Warn on attempt to smartmatch with S///
23:04
kudo/nom: f2cb328 | TimToady++ | src/core/Any-iterable-methods.pm:
just make { // } just work

We don't need this FAQ.
PerlJam n0tjack: are you doing my $thing = Grammar.parse($string); and looking at $thing or $thing.made? 23:06
23:06 Timbus_ left
n0tjack I'm looking at $thing 23:06
23:07 Timbus joined
n0tjack let me try replacing my bare $things with $thing.made 23:07
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: rt.perl.org/rt3/Public/Bug/Display...?id=115608
camelia rakudo-moar ca25b0: OUTPUT«42␤True␤(Str(Any))␤»
skids Nothing seems to store whether a !is::concrete was syntactically a constant. 23:09
23:11 Timbus left
n0tjack PerlJam: Perfect, that was it. 23:12
damn, I'm getting "Cannot assign to a readonly variable or a value" on my when /blah/ again 23:13
23:13 Hotkeys joined 23:14 Timbus joined 23:17 firstdayonthejob left
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()
n0tjack Ok, that does make sense. 23:19
Is there a workaround to permit when rx// inside action methods?
leont Hmmm, after a control-Z and then an `fg`, I got a «const_iX NYI» error from rakudo-moar…
n0tjack I guess I could use a different name for the param, but then lots of other stuff gets messy
PerlJam call the parameter by another nameuyou could use "is copy" 23:20
n0tjack wouldn't that screw up my .makes? 23:21
as in, upstack people wouldn't see my .made things?
s/up/down/
PerlJam you could also do method foo($blah) { $/ = $blah; ... } 23:22
23:22 Timbus left
n0tjack ah, now that's clever 23:23
thank you
PerlJam is having some serious lag
PerlJam -> dinner & 23:24
23:24 hohoho joined
TimToady n0tjack: just declare the parameter as ($/ is copy) 23:25
23:26 Timbus joined
TimToady and, of course, bear in mind that the inner match will clobber $/ 23:26
oh, PerlJam mentioned 'is copy'
n0tjack TimToady: if I $/ is copy and later .make, will my callers see the things I made? 23:27
or will those .makes get thrown away with my copy? 23:28
dalek kudo/nom: f3b5355 | TimToady++ | src/core/Seq.pm:
remove silly double .new
23:28 hohoho left
TimToady n0tjack: good question, it probably screws up 23:29
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/;
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␤»
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
23:31 Timbus left
TimToady n0tjack++ 23:31
n0tjack I've never had to say so little to get so much.
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
[Coke] one thing at a time. 23:36
... and then two things at a time.
n0tjack .rotor(2)
23:36 espadrine_ left
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))␤»
Zoffix 0.o
TimToady m: say ('a'..'z').rotor(1..*,:partial)
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))␤»
n0tjack is there a cute/golfish way to say [(sin $x), (cos $x)] ? 23:40
(not cheating using e thankyouverymuch) 23:41
pink_mist m: say ('a'..'z', 0..9).flat.rotor(1..*)
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:42 sQuEE` is now known as sQuEE
TimToady [.sin,.cos with $x] maybe 23:44
n0tjack wow 23:46
neat
skids m: unpolar(1,$_).list.say for 1,2,3;
camelia rakudo-moar f2cb32: OUTPUT«(0.54030230586814+0.841470984807897i)␤(-0.416146836547142+0.909297426825682i)␤(-0.989992496600445+0.141120008059867i)␤»
23:47 RabidGravy left 23:53 Timbus left 23:54 Timbus joined
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 23:56 llfourn joined