»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
geraud | m: say ૪ + ৪; | 00:02 | |
camelia | rakudo-moar f0c546: OUTPUT«8» | ||
[Coke] | lizmat: I thought you just said that was problematic? | 00:04 | |
m: say 8/૪ | |||
camelia | rakudo-moar f0c546: OUTPUT«2» | ||
lizmat | m: say (^3.5 .. ^7.5).minmax | 00:05 | |
camelia | rakudo-moar f0c546: OUTPUT«Range objects are not valid endpoints for Ranges in block <unit> at /tmp/MwrbQZx10K:1» | ||
lizmat | m: say (^3.5..^7.5).minmax | ||
camelia | rakudo-moar f0c546: OUTPUT«Range objects are not valid endpoints for Ranges in block <unit> at /tmp/rWEJpqjRNe:1» | ||
mscha | p6: for -Inf^..^Inf { .say } | 00:06 | |
lizmat | m: say (3.5^..^7.5).minmax | ||
camelia | rakudo-moar f0c546: OUTPUT«(timeout)-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-Inf-I…» | ||
rakudo-moar f0c546: OUTPUT«4.5..6.5» | |||
lizmat | [Coke]: ^^^ not incorrect result | ||
*note | |||
$ 6 'say (3.5^..^7.5).minmax' | 00:07 | ||
Cannot return minmax on Range with excluded ends | |||
$ 6 'say (-Inf..Inf).minmax' | |||
(-Inf Inf) | |||
pochi | m: class Foo { has $!secret = 42; method magic(Foo $other) { return $!secret + $other!secret } }; say Foo.new().magic( Foo.new() ) | ||
camelia | rakudo-moar f0c546: OUTPUT«5===SORRY!5=== Error while compiling /tmp/85EG25zOmPNo such private method 'secret' for invocant of type 'Foo'at /tmp/85EG25zOmP:1------> 3(Foo $other) { return $!secret + $other!7⏏5secret } }; say Foo.new().magic( Foo.new» | ||
_nadim | timotimo: I was serious, hapilly broken AKA, I can do something with it. Compared to unhapilly broken and I don't understand what's going on :) | ||
mscha | What's the diff between -Inf^..^Inf and -Inf..Inf? ;) | ||
pochi | how do I access the private variable secret for an object other than the invocant? | 00:08 | |
lizmat | mscha: the ^ indicates that the endpoint is to be excluded | ||
timotimo | _nadim: ok, that's good! | ||
mscha | I know, but how do you exclude -Inf? | ||
lizmat | mscha: in the case of Inf, in practice it doesn't make any difference | ||
dalek | kudo/nom: 0b80308 | lizmat++ | src/core/Range.pm: Implement basic Range.minmax, so ^Inf won't hang Also fail if any of the endpoints are excluded *and* we don't have an integer range. |
00:09 | |
lizmat | [Coke]: ^^^ | ||
and on that note, I wish #perl6 a good night! | 00:10 | ||
00:10
smls left
|
|||
[Coke] | lizmat++ | 00:10 | |
mscha | p6: my $r1 = -Inf^..^Inf; my $r2 = -Inf..Inf; say -Inf ~~ $r1; say -Inf ~~ $r2; for |$r1 { .say; last; } | 00:12 | |
camelia | rakudo-moar b69aa5: OUTPUT«FalseTrue-Inf» | ||
mscha | I hate math with infinites... | 00:13 | |
00:16
MadcapJake left
|
|||
labster | m: say Inf + 1; | 00:17 | |
camelia | rakudo-moar b69aa5: OUTPUT«Inf» | ||
00:22
yqt left
|
|||
mscha | m: say 2×Inf - Inf; | 00:23 | |
camelia | rakudo-moar b69aa5: OUTPUT«NaN» | ||
00:24
MadcapJake joined
|
|||
mscha | m: say ∞; | 00:25 | |
camelia | rakudo-moar b69aa5: OUTPUT«Inf» | ||
[Coke] | m: say ∞**∞ | 00:26 | |
camelia | rakudo-moar b69aa5: OUTPUT«Inf» | ||
[Coke] | anyone know how to update rakudobrew on hack? | 00:27 | |
mscha | m: say 2.9999999 ≈ 3; | ||
camelia | rakudo-moar b69aa5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BEd32TN4rvConfusedat /tmp/BEd32TN4rv:1------> 3say 2.99999997⏏5 ≈ 3; expecting any of: infix infix stopper postfix statement end statemen…» | ||
mscha | m: say 2.999999 ≈≈ 3; | ||
camelia | rakudo-moar b69aa5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1LihM8ZQVTConfusedat /tmp/1LihM8ZQVT:1------> 3say 2.9999997⏏5 ≈≈ 3; expecting any of: infix infix stopper postfix statement end statem…» | ||
mscha | say π ≠ e; | 00:28 | |
m: say π ≠ e; | |||
camelia | rakudo-moar b69aa5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eiVAUWkbapConfusedat /tmp/eiVAUWkbap:1------> 3say π7⏏5 ≠ e; expecting any of: infix infix stopper postfix statement end statement modif…» | ||
mscha | m: sub infix<≠> { $^a != $^b }; say π ≠ e; | 00:29 | |
camelia | rakudo-moar b69aa5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oUNB9M29XKMissing blockat /tmp/oUNB9M29XK:1------> 3sub infix7⏏5<≠> { $^a != $^b }; say π ≠ e; expecting any of: new name to be defined» | ||
mscha | m: sub infix<≠>($a, $b) { $a != $b }; say π ≠ e; | ||
camelia | rakudo-moar b69aa5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s107E8hJhyMissing blockat /tmp/s107E8hJhy:1------> 3sub infix7⏏5<≠>($a, $b) { $a != $b }; say π ≠ e; expecting any of: new name to be defined» | ||
mscha | m: sub infix:<≠>($a, $b) { $a != $b }; say π ≠ e; | ||
camelia | rakudo-moar b69aa5: OUTPUT«True» | ||
mscha | m: sub infix:<≠> { $^a != $^b }; say π ≠ e; | 00:30 | |
camelia | rakudo-moar b69aa5: OUTPUT«True» | ||
00:30
mohae_ joined
00:31
mohae left
|
|||
AlexDaniel | mscha: actually, I've always wondered if these should be built in | 00:36 | |
m: say 2.999999 ≅ 3 | 00:37 | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
AlexDaniel | m: say 2.999999e0 ≅ 3 | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
AlexDaniel | m: say 2.99999999999999e0 ≅ 3 | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
AlexDaniel | m: say 2.9999999999999999999e0 ≅ 3 | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
AlexDaniel | m: say 2.9999999999999999999 ≅ 3 | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
timotimo | [Coke]: it seems like every user has their own .rakudobrew | ||
AlexDaniel | m: say 2.999999999999999 ≅ 3 | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
AlexDaniel | m: say 2.999999999999 ≅ 3 | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
AlexDaniel | mscha: approx is there though | 00:38 | |
mscha | Cool | ||
AlexDaniel | ≤ ≥ ≠ hmm | ||
00:39
skids joined
|
|||
mscha | m: say 3 ≤ π; | 00:39 | |
camelia | rakudo-moar 0b8030: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mD0rz8isCFConfusedat /tmp/mD0rz8isCF:1------> 3say 37⏏5 ≤ π; expecting any of: infix infix stopper postfix statement end statement modif…» | ||
[Coke] | timotimo: there is a /home/rakudobrew though | ||
AlexDaniel | .u ≛ | ||
yoleaux | U+225B STAR EQUALS [Sm] (≛) | ||
AlexDaniel | what a neat symbol :D | ||
00:39
_nadim left,
kanishka left
|
|||
AlexDaniel | .u ⩲ | 00:40 | |
yoleaux | U+2A72 PLUS SIGN ABOVE EQUALS SIGN [Sm] (⩲) | ||
mscha | .u 🕴 | ||
yoleaux | No characters found | ||
timotimo | oh? | ||
AlexDaniel | too bad there's no MINUS SIGN ABOVE EQUALS SIGN | ||
mscha: yoleax is a bit old in that sense | 00:41 | ||
timotimo | huh. i can't seem to sudo on hack | ||
AlexDaniel | mscha: there are also ⩵ and ⩶ but nobody knows how these are supposed to look like with fixed-width fonts :) | 00:42 | |
timotimo | must have changed my password and forgotten to update it in the password database? | ||
mscha | .u 💩 | 00:43 | |
yoleaux | U+1F4A9 PILE OF POO [So] (💩) | ||
[Coke] | timotimo: I can. | ||
timotimo | i wouldn't just go into /home/rakudobrew and rakudobrew self-upgrade or something | 00:44 | |
since i don't know if it's part of any kind of setup | 00:45 | ||
like a cron job or something | |||
[Coke] | m: say $*PERL; | 00:50 | |
camelia | rakudo-moar 0b8030: OUTPUT«Perl 6 (6.b)» | ||
[Coke] | . ask TimToady - you want to change our version to be 6.c ? I'd like to have it running for a day at least before release. | ||
00:52
mohae_ left
|
|||
[Coke] | .ask TimToady - you want to change our version to be 6.c ? I'd like to have it running for a day at least before release. | 00:53 | |
yoleaux | [Coke]: I'll pass your message to TimToady. | ||
00:53
mohae joined
00:54
mohae left
|
|||
TimToady | sure, we can do that | 00:54 | |
yoleaux | 00:53Z <[Coke]> TimToady: - you want to change our version to be 6.c ? I'd like to have it running for a day at least before release. | ||
00:54
mohae joined
|
|||
TimToady | maybe call it 6.c.RC1 first? | 00:54 | |
00:55
BenGoldberg joined
|
|||
mscha | sub infix:<≤> { $^a <= $^b }; 3 ≤ 7 ≤ 5; # oops | 00:55 | |
p6: sub infix:<≤> { $^a <= $^b }; 3 ≤ 7 ≤ 5; # oops | |||
camelia | ( no output ) | ||
mscha | p6: sub infix:<≤> { $^a <= $^b }; 3 ≤ 7 ≤ 5; | ||
camelia | ( no output ) | 00:56 | |
TimToady | say? | ||
geekosaur | need a say in there | ||
mscha | p6: sub infix:<≤> { $^a <= $^b }; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
TEttinger | p6: sub infix:<≤> { $^a <= $^b }; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
TimToady | and you probably want 'is equiv(&[<=]) or so | ||
TEttinger | neat | ||
TimToady | otherwise it has no hope of chaining | ||
BenGoldberg | p6: sub infix:<≤> is assoc('List') { $^a <= $^b }; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
TimToady | it's not doing what you think | ||
nor is that | |||
all you're testing is that True <= 5 | 00:57 | ||
BenGoldberg | p6: say True <= 5 | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
mscha | p6: sub infix:<≤> is equiv(&[<=]) { $^a <= $^b }; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileRoutine given to equiv does not appear to be an operatorat /tmp/tmpfile:1» | ||
TimToady | or some such | ||
BenGoldberg | p6: say True <= -3 | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
BenGoldberg | p6: sub infix:<≤> { $^a <= $^b }; say -3 ≤ -2 ≤ -1; | 00:58 | |
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
BenGoldberg | p6: say -3 <= -2 <= -1; | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
BenGoldberg | p6: say [<=] -3, -2, -1; | 00:59 | |
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
BenGoldberg | p6: sub infix:<≤> { $^a <= $^b }; say [≤] -3, -2, -1; | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
00:59
adu left
|
|||
TimToady | m: sub infix:<≤> is equiv(&infix:«<=») { $^a <= $^b }; say 3 ≤ 7 ≤ 5; | 00:59 | |
camelia | rakudo-moar 0b8030: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RcXZiuBhDPRoutine given to equiv does not appear to be an operatorat /tmp/RcXZiuBhDP:1» | ||
TimToady | hmm, bug | ||
m: say &[<=>].prec | 01:00 | ||
camelia | rakudo-moar 0b8030: OUTPUT«Method 'prec' not found for invocant of class 'Sub+{<anon|63995968>}' in block <unit> at /tmp/nMzURGtrjB:1» | ||
TimToady | m: say &[<=].prec | ||
camelia | rakudo-moar 0b8030: OUTPUT«Method 'prec' not found for invocant of class 'Sub+{<anon|63995968>}' in block <unit> at /tmp/PNAJEGHx6u:1» | ||
TimToady | that's also buggy | 01:01 | |
lichtkind | perlhist is down, you know wo runs it? | ||
TimToady | m: sub infix:<≤> is prec('m=') is assoc('chaining') { $^a <= $^b }; say 3 ≤ 7 ≤ 5; | 01:02 | |
camelia | rakudo-moar 0b8030: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vt7gOhwIZ1Can't use unknown trait 'is prec' in a sub+{precedence} declaration.at /tmp/vt7gOhwIZ1:1 expecting any of: rw raw hidden-from-backtrace hidden-from-USAGE pure default D…» | ||
mscha | p6: sub infix:<≤> is assoc:<chain> { $^a <= $^b }; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileCan't use unknown trait 'is assoc:<chain>' in a sub+{precedence} declaration.at /tmp/tmpfile:1 expecting any of: rw raw hidden-from-backtrace hidden-from-USAGE pure defaul…» | ||
TimToady | m: sub infix:<≤>($a,$b) is prec('m=') is assoc('chaining') { $a <= $b }; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«5===SORRY!5=== Error while compiling /tmp/19OrkmcxvmCan't use unknown trait 'is prec' in a sub+{precedence} declaration.at /tmp/19Orkmcxvm:1 expecting any of: rw raw hidden-from-backtrace hidden-from-USAGE pure default D…» | ||
ShimmerFairy | TimToady: any particular reason we don't have ≤ and ≥ in core? We've got lots of other nifty Unicode things stuffed in there already :P | 01:03 | |
mscha | p6: proto sub infix:<≤>($, $) returns Bool:D is assoc:<chain>; sub infix:<≤> { $^a <= $^b }; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileA unit-scoped sub definition is not allowed except on a MAIN sub;Please use the block form.at /tmp/tmpfile:1------> 3>($, $) returns Bool:D is assoc:<chain>;7⏏5 sub infix:<≤> { $^a <= …» | ||
TimToady | looks like whoever implemented it did so with a :pasttype<chain> to hardwire it, hmmm... | 01:04 | |
mscha | p6: proto sub infix:<≤>($, $) returns Bool:D is assoc:<chain>; sub infix:<≤>($a, $b) { $a <= $b }; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfileA unit-scoped sub definition is not allowed except on a MAIN sub;Please use the block form.at /tmp/tmpfile:1------> 3>($, $) returns Bool:D is assoc:<chain>;7⏏5 sub infix:<≤>($a, $b) {…» | ||
TimToady | ShimmerFairy: well, especially since it seems impossible to add them at the moment after the fact... | ||
which is a bug, but I don't know if we'll get to it before 6.c | 01:05 | ||
ShimmerFairy | true, it's proving a nice test of what's possible with custom ops at the moment :) | ||
TimToady: Other operator things that bug me is how unary precedence stuff is faked by NQP (last I checked), and how, at least in rakudo core, it's hard to set up "aliases" like constant &infix:<texas> := &infix:<☃> or however | 01:06 | ||
TimToady | m: constant &infix:<≤> = &infix:«<=»; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
TimToady | well, at least that works | 01:07 | |
TimToady fondly remembers the days when the saying was: "It's good that there's more than one way to do it, because most of them don't work." | |||
01:07
yeahnoob joined
|
|||
mscha | TimToady: it works ... incorrectly. | 01:07 | |
timotimo | that's true, hah | 01:08 | |
01:08
raiph joined
|
|||
BenGoldberg | m: constant &infix:<≤> = &infix:«<=»; say -3, -2, -1; | 01:08 | |
camelia | rakudo-moar 0b8030: OUTPUT«-3-2-1» | ||
mscha | m: constant &infix:<≤> = &infix:«<=»; say 3 ≤ 7 ≤ 5; say 3 <= 7 <= 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«TrueFalse» | ||
timotimo | it probably ends up giving 3 <= 7 -> True, then True <= 5 | ||
BenGoldberg | m: constant &infix:<≤> = &infix:«<=»; say -3 ≤ -2 ≤ -1; | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
TimToady | yeah, it's applying it as a binary, i guess | ||
ShimmerFairy | something like that, even if it needs a special construct, would be the best way to handle texas/unicode variant stuff, I feel. | 01:10 | |
BenGoldberg | m: sub infix:<≤> is assoc<list> { [<=] @_ }; say -3 ≤ -2 ≤ -1; | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
timotimo | i'd almost say get a different prefix (like "operator") in there so the assignment knows to also move stuff like precedence and such over into the grammar | 01:11 | |
BenGoldberg | m: sub infix:<≤> is assoc<list> { $^a <=> $^b }; say -3 ≤ -2 ≤ -1; | ||
camelia | rakudo-moar 0b8030: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RiYkPYdzLQCalling infix:<≤>(Int, Int, Int) will never work with declared signature ($a, $b)at /tmp/RiYkPYdzLQ:1------> 3ssoc<list> { $^a <=> $^b }; say -3 ≤ -2 7⏏5≤ -1;» | ||
TimToady | we already know it's an operator | ||
that's not the problem | |||
timotimo | ah, ok | ||
BenGoldberg | m: sub infix:<≤> is assoc<list> { [<=] @_ }; say [≤] -3, -2, -1; | 01:12 | |
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
BenGoldberg | I think that works | ||
TimToady | it only works for cascaded <=, but won't interact well with chaining ops at the right precedence | ||
mscha | m: sub infix:<≤> is assoc<list> { [<=] @_ }; say 3 ≤ 7 ≤ 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
timotimo | m: say 1 < 10 > 5 | ||
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
timotimo | ^- that, for example | ||
mscha | m: sub infix:<≤> is assoc<list> { [<=] @_ }; say 3 ≤ 7 < 5; | 01:13 | |
camelia | rakudo-moar 0b8030: OUTPUT«True» | ||
BenGoldberg | m: sub infix:<≤> is assoc<list> { [<=] @_ }; say 1 ≤ 10 > 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«False» | ||
mscha | m: sub infix:<≤> is assoc<list> { [<=] @_ }; say 3 ≤ 7 < 5; say 3 <= 7 < 5; | ||
camelia | rakudo-moar 0b8030: OUTPUT«TrueFalse» | ||
01:14
mohae left
|
|||
TimToady | it has to be at chain precedence with chain associativity for it to work right, and there's just no way to get there from here at the moment | 01:15 | |
BenGoldberg | m: say 1 R, 2 R, 3 | ||
camelia | rakudo-moar 0b8030: OUTPUT«(2 1)» | ||
TimToady | that looks like a buglet of some sort | 01:16 | |
m: say [R,] 1,2,3 | |||
camelia | rakudo-moar 0b8030: OUTPUT«(3 2 1)» | ||
stmuk | whats happening with git post Xmas? will there be two branches? | ||
TimToady | presumably | ||
or at least, once we want to start making language changes for 6.d.alpha | 01:17 | ||
01:18
mohae joined
|
|||
TimToady | also, rakudo doesn't have to branch the same as roast | 01:18 | |
there might well be buglets we could patch in a 6.c roast without compromising backward compat | |||
01:19
yqt joined
|
|||
TimToady | and if we're forced to issue a maintenance release based on 6.c due to a security flaw, then we'd certainly need to branch | 01:20 | |
so we might as well plan for it at some point | |||
but we can probably decide that rather more post-xmas than we are now | 01:21 | ||
we can branch lazily when we need to | |||
stmuk | is it Xmas UTC or PST? :) | ||
timotimo | timotired | ||
TimToady | that will depend on who does the release when, I imagine | ||
01:22
adu joined
|
|||
timotimo | good night perl6 people! | 01:22 | |
01:23
cognominal left,
mscha left
|
|||
timotimo | i'd really be interested to see a good example where the line between "this is a buglet. we'll fix it in roast and in rakudo" and "this is a feature. it'll go into the next language version." is | 01:24 | |
skids | Well one criterion would probably be "is it reasonable for someone to have relied on behavior we are about to change?" | 01:26 | |
BenGoldberg | R, losing arguments is surely a buglet. | 01:27 | |
AlexDaniel | skids: what if it is a new feature that nobody could have possibly relied on in the past | 01:28 | |
TimToady | indeed, nobody in their right mind, with the possible exception of BenGoldberg++, would even try to do that :) | ||
BenGoldberg | On the other hand, the specific order of the results of 1 R, 2 R, 3 is probably something which shouldn't be relied on. I recall an earlier version of rakudo producing truly scrambled results ;) | ||
skids | AlexDaniel: then we'd have too rely on other criteria. | ||
timotimo | oh, and: how legit is it to push a few tests just before 6.c into roast for bugs we've discovered in the last day? | 01:29 | |
TimToady | in new features, it tends to come down to whether we're going to pollute a namespace that someone has already put something else into | ||
timotimo | like my $foo = Failure.new; $foo += 1; being supposed to throw the failure | ||
TimToady | fortunately, our lexical setting allows us to add things that will automatically be shadowed in user code | ||
yeah, that's more something we have t ofix | 01:30 | ||
*to fix, even | |||
timotimo | er. if i keep being awake, i'm not going to be sleeping any time soon. | ||
ShimmerFairy | btw, how do feel about pack/unpack ? Should we hide it behind that same "experimental" thing that stuff like macros are under, or move it to a separate module entirely? I really don't want to find ourselves maintaining backward-compat with a weird subset of P5-era functionality. | ||
TimToady | good night, timotimo, we promise not to talk about anything interesting now :) | ||
flussence | IMO, pack/unpack = ewww. | ||
timotimo | no. talk about interesting things! it's far too close to christmas to look out for little me's backlog size | 01:31 | |
flussence | but there isn't really a good substitute right now, so I'm not sure about hiding it | ||
01:31
thomax left
|
|||
TimToady | we'll just have to play the bits of pack/unpack by ear | 01:31 | |
skids | Well, how easy is it to use P5 pack/unpack via Inline::Perl5 from perl6, maybe we don't need a P6 version of it quite yet? | ||
ShimmerFairy | flussence: my concern is having to do backward-compat for something that's not designed for P6's strengths and needs :) | ||
there was talk before of moving it out to a module, but I guess it hasn't happened yet. | 01:32 | ||
01:32
thomax joined
|
|||
TimToady | we can always name them something else | 01:32 | |
I mean, the new shiny ones | |||
flussence tried writing binary-network-IO stuff a week or two ago, and it ended up being an absolute trainwreck | |||
TimToady | I don't think we can fix that trainwreck before xmas | 01:33 | |
flussence | thing is, I'm not sure *what* I want for that type of code. :( | ||
ShimmerFairy | TimToady: yeah, I had a binary grammar idea where I referred to them as "formats" (cf. file formats), so they could theoretically be .format/.deformat, or something like that. | ||
BenGoldberg | Maybe instead of pack/unpack we should have something resembling javascript's DataView... (just an idea). | ||
01:33
Skarsnik left
|
|||
stmuk | pack/unpack sounds like ecosystem to me and I would prefer a nicer API to it | 01:33 | |
skids | flussence: you mean packet dissection/construction? | ||
TimToady | we can talk about it...after xmas... | ||
ShimmerFairy | Of course, then the question is if (un)pack really deserve to be in core, if they're just going to forever be a P5-ish thing :) | ||
TimToady is gonna go fix bugs... | 01:34 | ||
AlexDaniel | skids: hah, though hiding qqx in Inline::Perl5 sounds like a great idea :D | ||
flussence | skids: yeah, along with some variable-width integer parsing to get blob lengths. | 01:35 | |
ShimmerFairy | Like I said, I'm only concerned about the "having to support a subset of a P5-era design in core as backwards compatibility" aspect. If that's not much of an issue, then I'm OK :) | ||
stmuk | "use JUNKIE-EVIL" for qqx injections! | ||
skids | flussence: I've run into that as well, and there's a gist out there with some vague ideas. | 01:36 | |
Juerd | In my opinion, current Perl 6 eval is barely useful, and it will be impossible to maintain backwards compatibility with it. | ||
s/eval/pack and unpack/ | |||
ShimmerFairy | flussence: in case you're interested, here's my incomplete idea on binary grammars I pasted a while back: gist.github.com/ShimmerFairy/72a25...9aab077158 | ||
(could be done as a slang, perhaps) | |||
flussence | .oO( pack is just a roundabout way of eval'ing machine code into boxed datatypes... ) |
01:37 | |
dalek | kudo/nom: 9a01b4b | TimToady++ | src/Perl6/Actions.nqp: make sure >>[=]>> and X= want their base ops |
||
01:37
mohae left
|
|||
Juerd | I actively used pack and unpack, wrote a wrapper to deal with *some* of the missing functionality, got a great feel for how hard it is to parse those templates. github.com/Juerd/p6-mqtt/blob/mast.../MyPack.pm | 01:37 | |
It would be good if this were explicitly marked as experimental | 01:38 | ||
01:38
mohae joined
|
|||
Juerd | Note that currently, they simply *ignore* unsupported things in templates | 01:38 | |
If they're not marked as experimental, it should at least croak on unsupported stuff so there's some unicode left for future implementations. | 01:39 | ||
ShimmerFairy | Juerd: yeah, which is why I'd like to at least hide it behind "experimental", so you know that it's fragile to be using it. | ||
Juerd | Could not agree more strongly. | ||
TimToady | please rakudobug the chaining issue; I think I should work on making 'while' work better instead when a return value is wanted | 01:40 | |
that is, I should work on #126005 now | 01:41 | ||
and if anyone here feels like trying to narrow down #123272, or install some instrumentation by which we might narrow it down, by all means feel free | 01:43 | ||
otherwise we're likely to have to distribute with that unfixed | |||
another approach would be to figure out how to detect when it goes wrong, and compensate somehow, but that's if we can't find the actual bug soon | 01:44 | ||
skids | Uhm isn't that one fixed? | ||
TimToady | not resolved in RT | 01:45 | |
skids | Well, I added tests, and if run_alt has decided to shift to other places, they might be passing now. | ||
TimToady | but anyway, please be aware that last-minute bikeshedding is a little counterproductive to getting the release out | 01:46 | |
skids | I'll run a spectest and see. | ||
01:46
uruwi left
|
|||
TimToady | the RT seems to indicate the test for it is fudged? | 01:46 | |
01:46
administ1ator joined
|
|||
TimToady | anyway, Not My Bug Right Now | 01:47 | |
Juerd | Camelia will be your bug right now :) | ||
grondilu | J-2 huh? is everything going well for the Xmas release? | ||
cxreg | seems sometimes a panda install fails with "Cannot unbox a type object" and then works on retry. known behavior? | ||
01:47
administ1ator left
01:48
raiph left
01:50
uruwi joined,
muraiki joined
01:52
mohae left
01:54
mohae joined
|
|||
flussence | ShimmerFairy: that text sounds interesting. It doesn't seem to have any way of handling variable things besides simple null-terminated strings (e.g. UTF-8, p5's «pack 'w*'»), but I'm not going to suggest any syntax for that cause I'm no designer :) | 01:54 | |
ShimmerFairy | flussence: yeah, it ends right where I was going to write about dealing with specific byte positions (checking them and such), but back when I posted the thing as-is. So it's certainly not a complete, much less final, design :) | 01:55 | |
skids | RT #123272 tests are currently not fudged and passing, adding note to that effect to RT. | 01:56 | |
flussence | (now that I've looked at what w* does, it sounds like I really wanted exactly that for writing that net code the other day...) | ||
01:58
mohae left
02:00
raiph joined,
pnu left
02:04
pnu joined
|
|||
flussence is reading masak++'s advent post and sees WP mutilated the HTML *again*... (infix:{missing-thing}) | 02:06 | ||
02:06
goblinJRT joined,
goblinJRT left
|
|||
skids is happy to see the loop/while return value thing being worked on pre-xmas, btw | 02:07 | ||
It was perhaps my biggest remaining concern. | |||
ShimmerFairy | flussence: and just so you know, my idea was pretty regex-like, so e.g. <u8>+ would theoretically capture variable amounts of unsigned bytes. Problem is, in binary grammars a lot of things are pretty much different kinds of /./, at least how I've thought of it so far :) | 02:10 | |
flussence | well you've put more thought into it than I have, so I'll let you be the expert :) | ||
Juerd | ShimmerFairy: I'm thinking along the lines of signatures, much like NCI | 02:13 | |
ShimmerFairy: They can be nested, and I can imagine that with some creativity a syntax could be invented for repetition | 02:14 | ||
ShimmerFairy | sure, that's why I went along the regex route when I wrote that, since those do well with repetition and nesting :) | 02:15 | |
Juerd | Yes, but regexes don't do well with value types, and that's where signatures shine | ||
Regexes already have repetition, signatures already have types. Argh :) | |||
02:15
vendethiel left
|
|||
Juerd | Note that (un)pack also needs typed repetition. It's not enough to know that something has a length of *, it also matters that the * itself is encoded as e.g. a uint32 | 02:16 | |
02:17
raiph left
|
|||
ShimmerFairy | Juerd: yeah, that's how I handled the idea of strings with a length beforehand; specify the type of the length prefix, and then the type of the string's characters. | 02:18 | |
Juerd | Well, strings are relatively easy | ||
But you may need to encode the length of a group of things, e.g. n(n/a* n n x z*) | 02:19 | ||
er, with a / after the first n | |||
ShimmerFairy | there's also the <,u8 a b c> syntax I dreamt up to handle a field of three bytes (for example), though it didn't come designed to handle different types in one construct. | 02:21 | |
02:24
psy_ left
|
|||
Juerd | I have a feeling that much of the repetition syntax isn't needed, by the way | 02:25 | |
02:25
lichtkind left
|
|||
Juerd | There are length prefixes and there's repetition. But would it be bad to lose the n4 syntax as a shortcut for nnnn? | 02:25 | |
02:26
FROGGS_ joined
|
|||
Juerd | Length suffixes are usually *, and used for strings | 02:26 | |
ShimmerFairy | Juerd: yeah, <,u8 ...> for example is a case of me going "hey, I get annoyed with writing info1 = stuff[0x06]; info2 = stuff[0x07]; in C++, so how's about shortening that?" | ||
Juerd: I'm not sure what you're referring to with n4 and stuff, though | |||
Juerd | C4 in Perl 5 pack is C C C C | 02:27 | |
In most cases that I've been using pack or unpack, I've never needed those at all | |||
And I have the feeling that string encoding like hex and binary aren't in the right place in pack anyway | |||
You tend not to use those when you're dealing with actual binary data | 02:28 | ||
ShimmerFairy | yeah, I don't see the worth in that, if needed it should be something like C**4 (that is, like in regexes) | ||
Juerd | When dealing with binary data, you usually have a template that describes a protocol or file format | ||
And that's typically struct-like, except it has length prefixes | |||
02:29
Sqirrel left
|
|||
ShimmerFairy | A lot of my rough ideas were designed precisely for the fact that binary, unlike textual, data is more position- and size-oriented than it is "syntax"-oriented :) | 02:29 | |
02:29
FROGGS left
|
|||
Juerd | Signature literals could really do this, e.g. :(uint32 = :(int16, uint32 = Blob, uint32 = Str)) | 02:30 | |
Where I'm stealing default assignments to indicate length prefix types | |||
So uint32 = Blob is like n/a* | 02:31 | ||
Er, n/a | |||
Missing from signatures (and types) are things like endianness, but I have the feeling that most of what's needed is already there | |||
02:33
cognominal joined
|
|||
ShimmerFairy | Yeah, the endianness is interesting. My thoughts are to go with written order (i.e. big endian, if you wrote it down that way), and require special constructs to "mangle" written order as needed. | 02:33 | |
Juerd | Maybe it can even do Str is encoded("latin1") and uint32 is long-endian | 02:34 | |
I wouldn't mind a verbose template language, because I keep ending up using perldoc -f pack now anyway | |||
ShimmerFairy | yes, I definitely don't want the cryptic mess that is pack's syntax :) | 02:35 | |
Juerd | Building on the type system may make it easier to introduce your own (number) encodings | ||
For MQTT I needed to support a variable width length prefix type | 02:36 | ||
It's just a number, though, and if I had my own type I could write my own blobification routine | |||
m: my uint32 $foo = 42; say $foo.Blob | |||
camelia | rakudo-moar 9a01b4: OUTPUT«Method 'Blob' not found for invocant of class 'Int' in block <unit> at /tmp/mUL10SCY5U:1» | ||
ShimmerFairy | true, though for certain number (and otherwise) encodings they could possibly want to handle the data in a more regex-y than data-type-y way. | ||
Certainly something to work out in an external module, for sure :) | 02:37 | ||
Juerd | I can imagine that .Blob should just do a single-item pack. | ||
Or maybe it's .encode instead of .Blob | 02:39 | ||
After all, "32 bit signed long endian" is just an encoding. Not for strings, but for numbers. | 02:40 | ||
02:40
labster left,
raiph joined
|
|||
Juerd | Maybe even, .unpack should instead be part of Blob.decode | 02:40 | |
Or maybe I shouldn't write braindumps on IRC so close to Christmas. Not productive towards a release. | 02:41 | ||
In any case It's almost 4am here and I'm going to bed. Good night! | |||
02:42
vendethiel joined
02:44
ilbot3 left
02:47
ilbot3 joined
|
|||
Juerd | And then suddenly I realise I said "long-endian". Hah. Should have been "big-endian" of course :) | 02:53 | |
BenGoldberg | . o O (my $u = Unpacker.new($some-blob, $starting-offset, $auto-advance, $endianess); my $i = $u.uint32; my $l = $u.sint64; ... ) | 02:55 | |
02:59
kaare_ joined
03:05
vendethiel left,
rickbike joined
03:06
labster joined
03:09
Ben_Goldberg joined
03:11
kanishka joined
03:12
BenGoldberg left
03:14
mohae__ joined
03:15
Ben_Goldberg left
03:16
Ben_Goldberg joined
03:17
mohae__ is now known as mohae
03:19
mohae left
03:20
noganex joined
03:21
mohae joined
|
|||
AlexDaniel | “When selecting a text with your mouse, double-click on the first word, hold down the mouse on the second click and then select your text. It will now select text by words, not characters.” | 03:23 | |
03:24
noganex_ left
|
|||
TimToady | what mouse? | 03:24 | |
03:24
BenGoldberg_ joined
|
|||
AlexDaniel | oh wow… how come I did not know this. Not that it is extremely useful since most of the stuff I do is keyboard-only, but hey! | 03:24 | |
TimToady just has to figure out now how to transform 'while ++$ < 3 { dostuff }' into 'for Nil xx * -> $ { last unless ++$ < 3; dostuff }' using nothing but QAST trees... | 03:27 | ||
03:27
Ben_Goldberg left
|
|||
TimToady | just a Small Matter Of Cargoculting | 03:27 | |
diakopter | TimToady: why do you need the for Nil | 03:30 | |
TimToady | either that, or figure out exactly where 'while' discards its return values... | ||
which I've tried to do before | |||
skids | Are while/loop results going to be eager? | ||
TimToady | depends on context, but statementlist-level loops are always in sink context | 03:31 | |
diakopter | is the for Nil edition a lot faster? | ||
TimToady | probably not | ||
getting while to keep its return values long enough to test UNDO, or even longer, to work in an I-want-the-list context, is tricksy | 03:32 | ||
but if you have a good idea how to do that, feel free | 03:33 | ||
grondilu | while ++$ < 3 {...} is a weird idiom. Isn't it simpler to do for ^3 {...}? | ||
TimToady was looking to transform it to a for loop just to get the semantics right | |||
Juerd | Okay, I couldn't sleep. Here's my proposal for an unpack template language: gist.github.com/Juerd/ae574b87d40a66649692 | ||
TimToady | the point is that while is misbehaving wrt for | ||
Juerd | ShimmerFairy, BenGoldberg_: ^^ | ||
TimToady | so just telling people to write 'for' instead doesn't fix 'while' | 03:34 | |
grondilu | ok, I must have missed the context | ||
Juerd | Is perl6-language still active or does everything go on IRC now? | ||
TimToady | this is about fixing rt.perl.org/Ticket/Display.html?id=126005 | ||
but if we fix that right then probably while loops will return values in a context where the values are wanted too, without much extra effort | 03:35 | ||
grondilu did not even know UNDO was a thing | 03:36 | ||
diakopter did not even | |||
ShimmerFairy | Juerd: looks good at first glance; I'll give it a closer read later :) | ||
TimToady | and I'm leary of futzing with the implementation of while, which is probably pretty well tuned for working in contexts where you merely want the side effects | ||
Juerd | ShimmerFairy: Thanks. Please let me know whatever feedback you may have :) | 03:37 | |
TimToady | hence, the remap to 'for' approach | ||
grondilu guess he'll have to read S04 again someday | |||
Juerd | For now, good night//* #perl6 | ||
grondilu | *guesses | ||
TimToady | o/ | ||
the for Nil xx * {} is just a proxy for loop {}, but that's just a while in disguise, which doesn't help | 03:39 | ||
m: while ++$ < 3 { UNDO say "undo"; say "done" } | 03:40 | ||
camelia | rakudo-moar 9a01b4: OUTPUT«doneundodoneundo» | ||
03:40
cpage_ left
|
|||
TimToady | m: for Nil xx * -> $ { last unless ++$ < 3; { UNDO say "undo"; say "done" } } | 03:41 | |
camelia | rakudo-moar 9a01b4: OUTPUT«donedone» | ||
TimToady | you see that map (well, really the p6for variant) is giving the desired semantics, but it also allows us to return stuff from the loop if that is desired | ||
03:42
secwang joined
|
|||
TimToady | and I already know exactly where we decide whether the loops values are wanted, so it's just a matter of doing the substitution | 03:42 | |
easy, peasy, except cargo culting QAST is never quite that... | |||
if it were just the return values that were wanted, a gather/take would work, but that wouldn't help with KEEP/UNDO, since take bypasses the return | 03:44 | ||
diakopter | TimToady: well, you can create a QAST dump of the structure template you want | ||
TimToady | so it has to be some sort of map variant, methinketh | ||
sure, already have that, but there are...indirections... | |||
you have to generate new blocks and hide them from the mainline | 03:45 | ||
so it needs to perform the same sequence of closure-making calls that the 'for' loop does | |||
it's not all just QAST::Mumble.new | 03:46 | ||
that's really the only hard part... | |||
(I hope) | |||
diakopter | if only you had macros | 03:47 | |
TimToady | I had hoped to be able to just write a macro, but that didn't pan out | ||
heh | |||
great minds... | |||
the parser got very confused for some reason | 03:48 | ||
well, i was trying it with a map, maybe it wouldn't get so confused for a 'for', but I think I'm not going to try to depend on macros | |||
after all, they're experimental :) | 03:49 | ||
and I'm pretty sure that if I just mutter the right incantations, I can do the tranformation | |||
03:49
BenGoldberg_ left
03:50
BenGoldberg joined,
yqt left
|
|||
TimToady | m: my $x; say (while ++$x < 3 { UNDO say "undo"; say "done"; $x }) | 03:50 | |
camelia | rakudo-moar 9a01b4: OUTPUT«doneundodoneundo3» | ||
TimToady | just to be clear, trying to make this work too | ||
m: my $x; say (for Nil xx * -> $ { last unless ++$x < 3; { UNDO say "undo"; say "done"; $x } }) | 03:51 | ||
camelia | rakudo-moar 9a01b4: OUTPUT«donedone(3 3)» | ||
TimToady | so you see it fixes this too | ||
well, I suppose I could also fake a macro by calling the grammar incestuously | 03:54 | ||
that would be...wicked...but might be the easiest way to get the semantics right before xmas | |||
03:55
BenGoldberg left
03:56
BenGoldberg joined
03:57
Calibellus joined
|
|||
TimToady | testing...I see at least that nothing in the setting calls a while in non-sink context, which is relieving | 03:58 | |
skids | A quick look around some ecosystem showed fewer while/loop than I expected. I only found one as last statement of a sub. | 04:02 | |
04:03
molaf joined
|
|||
skids | But there could be authors with styles that are exceptionally affected. | 04:03 | |
04:06
CQ2 joined
04:08
CQ left,
CQ2 is now known as CQ
|
|||
TimToady | nobody will be using something that doesn't work yet, I suspect | 04:08 | |
skids wonders how "gather { while { ... } }" pans out | 04:09 | ||
04:11
MadcapJake left
|
|||
TimToady | doesn't work for UNDO | 04:13 | |
skids | Oh I meant whether the while would be sunk, not as a solution. | ||
TimToady | gather always sinks | 04:14 | |
m: gather 43 | |||
camelia | rakudo-moar 9a01b4: OUTPUT«WARNINGS for /tmp/awrJQ2sr45:Useless use of constant integer 43 in sink context (line 1)» | ||
skids | Just used to seeing "gather while" | ||
TimToady | which is fine | 04:15 | |
04:15
davercc` left
04:17
kid51 joined
04:25
cpage_ joined
04:27
secwang left
04:29
muraiki left
04:32
stmuk_ joined
04:38
molaf left
|
|||
[Coke] | So, what's the plan for making a roast release? Last I saw jnthn had a thing that was plan-shaped. | 04:39 | |
Is this something that we can hope to accomplish in a day? | 04:40 | ||
skids | mostly the possibly-affected loop/while I am seeing in the ecosystem are runloops in ".start" methods or such. Which should probably be fixed but are likely to be called in sink context. | 04:45 | |
adu | TimToady: hey | 04:50 | |
04:51
Quantum joined
04:52
Quantum left
04:54
BenGoldberg left
04:57
BenGoldberg joined
05:00
Ben_Goldberg joined,
kid51 left
05:01
Calibellus left
05:02
BenGoldberg left
05:07
rickbike left
05:09
raiph left
05:10
Actualeyes left
|
|||
ugexe | m: class X::Y { }; my $foo = ::("X::Y"); say $foo.gist; # why not (X::Y)? | 05:14 | |
camelia | rakudo-moar 9a01b4: OUTPUT«(Y)» | ||
TimToady | well, I'll be jiggerd, it worked | 05:17 | |
because "gist" means just enought suggest something? | 05:18 | ||
m: class X::Y { }; my $foo = ::("X::Y"); say $foo.perl; | |||
camelia | rakudo-moar 9a01b4: OUTPUT«X::Y» | ||
PerlJam | For those people that like Perl 5's Test::Class, have a look at github.com/perlpilot/p6-Test-Class | ||
05:18
Ben_Goldberg left
|
|||
PerlJam .zZ | 05:19 | ||
AlexDaniel | I am getting errors about EVAL during build-panda, any solution? | ||
[Coke] | (perlhist website) whois will give you an email address and a familiar looking name. | 05:20 | |
TimToady | > p6 'my $x; say (while ++$x < 3 { UNDO say "undo"; say "done"; +$x })' | 05:21 | |
done | |||
(1 2) | |||
now I just need to make sure UNDO puts the loop into non-sink context | |||
skids | TimToday++ | 05:22 | |
ugexe | i know .perl gives (X::Y), but im wondering why (Y) is considered more human readable | ||
TimToady | in context, you usually know what Y is | 05:23 | |
m: say True | 05:24 | ||
camelia | rakudo-moar 9a01b4: OUTPUT«True» | ||
TimToady | m: say True.perl | ||
camelia | rakudo-moar 9a01b4: OUTPUT«Bool::True» | ||
TimToady | do you really want it to print Bool::True everywhere? | ||
AlexDaniel | the problem is in this file: github.com/rakudo/rakudo/blob/nom/...t.pm6#L197 | 05:25 | |
hmm | 05:26 | ||
TimToady | you have an old precompile of something, and probably need to blow away install/share/perl6 | 05:28 | |
skids | gist.github.com/skids/c4113575bb89625f4bf3 | 05:29 | |
AlexDaniel | skids: hmm why not grep the whole ecosystem? | 05:30 | |
05:31
Actualeyes joined
05:32
secwang joined
|
|||
skids | AlexDaniel: it wasn't as simple as "grep", I had to go look at surrounding code. | 05:35 | |
AlexDaniel | skids: ah | ||
05:37
sammers left
05:39
ellybelly_ left,
ellybelly left,
regreg joined
05:44
secwang left
05:46
labster left
05:50
sammers joined
05:54
adu left
05:57
gauss joined
06:02
labster joined
|
|||
AlexDaniel | hm. So let's say I do this: .say for run(‘curl’, ‘raw.githubusercontent.com/perl6/ec...ETA.list’, :out).out.lines.race | 06:04 | |
I get a segfault about half of the times I run it | 06:05 | ||
is it a known issue? Or can anybody confirm it? | |||
06:07
adhoc left
|
|||
awwaiid | llfourn: I fixed/pushed a fix for Pod::To::HTML | 06:09 | |
(re-enabled the test) | |||
llfourn | awwaiid: sweet thanks. Sorry about that :( | ||
awwaiid: it seems that my pod bug fix perl6 was being tested rather than master which *was* passing the tests. Though I thought they both passed. | 06:13 | ||
awwaiid | no problem. Nothing like a failing test to force a fix :) . I kinda think this is working around an upstream issue though -- the meta on the link switches from [] to [""] -- but that data is provided in the $=pod | ||
llfourn | awwaiid: yep and my yet to be applied patch fixes that empty string being there :) | 06:15 | |
awwaiid | ah! where is that at (for educational purposes)? | 06:16 | |
what does "post-curli" mean (looking at recent doc commit)? | |||
llfourn | awwaiid: yes give me 10mins and I'll make my PR | 06:17 | |
post-curli means post precompilation | |||
llfourn can't remember what it stands for | |||
awwaiid | there was a recent rakudo change reguarding that? | ||
oh, caching compiled bits? | 06:18 | ||
llfourn | I have no idea. It seems it might have been broken for ages (the cli doc cmd). | 06:19 | |
awwaiid | in textual bits of the docs, "Perl 6" is used a lot more than "Perl6" -- on purpose, ya? | 06:21 | |
llfourn | yes Perl 6 is the name of Perl 6 :) | ||
m: say "$*PERL" | |||
camelia | rakudo-moar 9a01b4: OUTPUT«Perl 6» | ||
llfourn | see even Perl 6 says so! | 06:22 | |
awwaiid | good, I'll use s/Perl6/Perl 6/ as my commit to force a build that will hopefully pull in the fixed Pod::To::HTML :) | ||
llfourn | sounds good :) | ||
dalek | c: 8a134ae | (Brock Wilcox)++ | doc/Language/ (3 files): Mass change Perl6 -> Perl 6 |
06:24 | |
awwaiid | hmm. one of those is wrong. oh well | ||
labster | Sometimes it's good to use the non-breaking space in Perl 6, too. | 06:25 | |
llfourn | mmm good point | ||
labster | m: "\xa0".uniname | 06:27 | |
camelia | ( no output ) | ||
labster | m: "\xa0".uniname.say | ||
camelia | rakudo-moar 9a01b4: OUTPUT«NO-BREAK SPACE» | ||
dalek | c: 07a3825 | (Brock Wilcox)++ | doc/Language/5to6-nutshell.pod: No space in reference to an actual module name |
||
06:27
skids left
|
|||
awwaiid | There a POD6 for that? | 06:27 | |
llfourn | awwaiid: I think you can do E<..> for unicode | ||
E<x0a> (maybe?) | 06:28 | ||
s/0a/a0/ | |||
awwaiid | Looks like doc.perl6.org might still not build until someone tries to install Pod::To::HTML again | 06:29 | |
06:29
kanishka left
|
|||
llfourn | it looks like it has also broken: design.perl6.org/S26.html # pod design docs | 06:30 | |
llfourn thinks it is somewhat ironic | 06:31 | ||
awwaiid | llfourn: maybe there is something less unslightly, like a S<Perl 6> | 06:35 | |
yeah, I was just tring to reads S26.html also :) | |||
llfourn wonders if S<> is implemented | 06:36 | ||
I don't think it is :\ | 06:37 | ||
awwaiid | My panda is mad at trying to install the new Pod::To::HTML because it already has version "*" installed :( | 06:38 | |
alright. well, I give up for tonight -- will bang the fix-doc.perl6.org-drum a bit more tomorrow :) | 06:39 | ||
gnight! | |||
llfourn | hmm it should probably be versioned | ||
awwaiid: gnight :) | |||
awwaiid++ thanks for fixing my goofs | |||
06:39
yeahnoob left
|
|||
awwaiid | yes... should probably be a version other than "*" :) | 06:39 | |
06:40
geraud left
06:41
dayangkun joined,
dayangkun left
06:42
dayangkun joined
06:43
lustlife left
06:44
yeahnoob joined
|
|||
llfourn | .tell moritz I merged a PR with a failing test in Pod::To::HTML -- the fallout seems to be that design.perl6.org/S26.html is gone and docs aint recompiling -- Yikes! Sorry :( | 06:46 | |
yoleaux | llfourn: I'll pass your message to moritz. | ||
06:47
lustlife joined
06:57
tmw1 joined
07:00
regreg left
|
|||
thomax | will p6.c released tomorrow or the day after?? | 07:02 | |
AlexDaniel | thomax: hmm it also depends on the timezone I think | 07:03 | |
thomax: but I'm curious, what would be the difference? :) | |||
thomax | the difference is a big exclamation mark behind p6. | 07:06 | |
i hope there will be a wave of reviews | 07:07 | ||
07:10
dayangkun left
07:11
llfourn left
|
|||
AlexDaniel | “use MONKEY-SEE-NO-EVAL to override, but only if you're VERY sure your data contains no injection attacks” – ehh… What a nice warning. Well, indeed, another solution to qqx problem is to introduce MONKEY-SEE-NO-QQX or something like that. Shell injection is about equal to eval injections, with the only difference that we usually say “everyone forgets to escape their stuff when passing it to shell but it's all their fault, they shou | 07:11 | |
have known better” and thus no protection… | |||
07:14
hankache joined
|
|||
AlexDaniel | By the way, the startup time of my program that is using a bunch of modules has been reduced by half in the last few days. (Some angel)++ | 07:14 | |
which is about ⅓ of what it was a month ago | |||
[Tux] | test 50000 24.682 24.565 | 07:15 | |
test-t 50000 14.302 14.185 | |||
csv-parser 50000 52.309 52.192 | |||
hankache | morning #perl6 | ||
yoleaux | 22 Dec 2015 17:52Z <TimToady> hankache: see irclog.perlgeek.de/perl6/2015-12-22#i_11759252 for how to put spaces around the replacement | ||
hankache | masak++ #advent post | 07:17 | |
.tell TimToady thanks boss | 07:18 | ||
yoleaux | hankache: I'll pass your message to TimToady. | ||
hankache | Tis the season to be jolly, Fa la la la la, la la la la | 07:24 | |
07:24
jczeus joined,
gauss left,
CIAvash joined
07:25
[Sno] left
|
|||
moritz | \o | 07:28 | |
yoleaux | 06:46Z <llfourn> moritz: I merged a PR with a failing test in Pod::To::HTML -- the fallout seems to be that design.perl6.org/S26.html is gone and docs aint recompiling -- Yikes! Sorry :( | ||
07:29
nwc10 joined
|
|||
nwc10 | good *, #perl6 | 07:30 | |
dalek | : 5657282 | moritz++ | util/update-design.perl6.org.sh: design.perl6.org rebuild: avoid clobbering .html files on failure |
07:31 | |
moritz | .tell llfourn I've installed a new Pod::To::HTML, and made the build process more robust as to avoid emtpy S26.html in future (github.com/perl6/mu/commit/5657282404) | 07:32 | |
yoleaux | moritz: I'll pass your message to llfourn. | ||
hankache | hello moritz nwc10 | ||
moritz | good morning hankache, nwc10, * | ||
nine | Good morning! | 07:33 | |
nwc10 | days are getting longer (in some parts of the world) | ||
all-nighter hacking sessions are getting shorter :-) | |||
hankache | morning nine | 07:34 | |
07:35
vv3 joined
07:36
_nadim joined
|
|||
[Tux] | m: my @x = ^10; for ^@x.elems -> $idx { say $idx } | 07:36 | |
camelia | rakudo-moar 9a01b4: OUTPUT«0123456789» | ||
dalek | c: 2cc8c2f | moritz++ | doc/Language/ (4 files): SSLify some links |
||
TimToady | moritz++ SSL++ | 07:38 | |
yoleaux | 07:18Z <hankache> TimToady: thanks boss | ||
07:44
RabidGravy joined
07:46
pierre-vigier joined
07:47
pierre-vigier left
|
|||
[Tux] | All tests successful. | 07:49 | |
Files=27, Tests=21962, 35 wallclock secs ( 3.06 usr 0.17 sys + 89.73 cusr 1.83 csys = 94.79 CPU) | |||
but I still want a :don't-be-smart option for \r\n (or have that implicit on :!chomp) | 07:50 | ||
_nadim | God morning all | 07:52 | |
hahainternet | do we have anything equivalent to f#'s forward pipe operator? | ||
i can't imagine it'd be common, but a friend is asking | |||
07:53
pierre-vigier joined
07:54
sjn_ is now known as sjn
07:55
llfourn joined
07:57
[Sno] joined
08:01
adhoc joined
|
|||
nine | hahainternet: what does that operator do? | 08:05 | |
hahainternet | nine: it passes the parameter on the left, to the function on the right | ||
i don't really quite get why they have it tbqh | |||
a random example: [1..10] |> List.map add1 | |||
(and yes i know about », but i couldn't find any equivalent to that specific operator) | 08:06 | ||
hankache | www.kevinberridge.com/2012/12/neat-...rward.html | 08:09 | |
hahainternet | they're neat operators, but i have to say i don't quite 'get it' | ||
i guess it's for the super functional nerds to describe a program on a single line and then get annoyed when you ask them to explain it ;) | |||
hankache | i think chaining in Perl6 does the same thing no? | 08:10 | |
TimToady | m: 1..10 => say | ||
camelia | rakudo-moar 9a01b4: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/cE__j9wVCk:1------> 031..10 => say7⏏5<EOL>Other potential difficulties: Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit in…» | ||
TimToady | m: 1..10 ==> say | ||
camelia | rakudo-moar 9a01b4: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat /tmp/4g8RfTSZ6S:1------> 031..10 ==> say7⏏5<EOL>Other potential difficulties: Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit i…» | ||
TimToady | m: 1..10 ==> say() | ||
camelia | rakudo-moar 9a01b4: OUTPUT«1..10» | ||
TimToady | something like that? | ||
hahainternet | nice, so that's the operator i was missing | ||
hahainternet goes back to operators doc page | |||
i did read through it first! i swear! | 08:11 | ||
CIAvash | perl6advent.wordpress.com/2010/12/...operators/ | ||
hahainternet | ok no need to show me up further ;) | ||
interestingly, it only appears once on the operators page, as a 'Sequencer' | |||
but is not documented fully | |||
CIAvash | design.perl6.org/S03.html#Feed_operators | 08:13 | |
hahainternet | thanks for your help TimToady; nine; CIAvash | ||
CIAvash | design.perl6.org/S06.html#Feed_operators | ||
08:14
darutoko joined,
eone joined
|
|||
TimToady | m: given 1,2,3 { say |$_ } | 08:17 | |
camelia | rakudo-moar 9a01b4: OUTPUT«123» | ||
TimToady | another way | ||
hahainternet | interesting, i guess i'll have to look that up | 08:18 | |
didn't realise you could flatten like that | |||
RabidGravy | early morning dumb question: is it safe to assume that the "size" of a Str passed to a char * in a native sub is Str.encode.bytes? libgdbm wants to know | 08:22 | |
08:23
timotimo left
|
|||
hahainternet | RabidGravy: to my ignorant eyes, that seems logical | 08:24 | |
RabidGravy | I think it's try and delete the coredumps afterwards ;-) | ||
08:26
timotimo joined,
vv3 left,
vv3 joined
08:27
vv3 left
08:28
vv3 joined,
vv3 left,
vv3 joined,
vv3 left
08:29
xinming left,
vv3 joined
08:30
shmibs left
08:32
rafl joined
08:33
pierre-vigier left
08:34
vv3 left
08:35
vv3 joined,
vv3 left
08:36
vv3 joined,
vv3 left,
vv3 joined,
vv3 left
08:37
shmibs joined,
vv3 joined
|
|||
dalek | kudo/nom: 3dec5c8 | TimToady++ | src/core/Any-iterable-methods.pm: useless use of 1 |
08:42 | |
kudo/nom: 0258819 | TimToady++ | src/Perl6/ (3 files): while/until loops can now return values A loop that has KEEP or UNDO, or that is used in a spot indicating that a return value is expected (such as in parens), will now be translated to a map (well, a for loop) that knows how to deal with blocks returning values correctly. In the case that a loop has a KEEP/UNDO but is not in a context wanting the return value, it still does the transformation to all KEEP/UNDO to have a value to test, but then sinks the results of the loop as a whole. Fixes #126005 |
|||
ast: 2f126a3 | TimToady++ | S04-statements/while.t: tests for returns from while/until, RT #126005 |
|||
08:42
vv3 left,
shmibs left
08:43
vv3 joined,
vv3 left
|
|||
dalek | kudo/nom: 0734842 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm: Include dist-id in names of installed files The hash used for generating unique file names now contains: * the relative path of the source file including file name * the dist's id (name, version, auth, api) * the repo chain at time of installation Including the dist's id should fix name collissions when two distros contain a lib/Foo/Bar.pm6. As a side effect, the precompiled file will now have the same name as the source file which could make debugging easier. |
08:44 | |
08:44
vv3 joined,
vv3 left
08:45
vv3 joined,
vv3 left,
abraxxa joined,
vv3 joined
|
|||
abraxxa | hi! | 08:46 | |
TimToady | hullo | ||
abraxxa | everything going well for the Christmas release? | 08:47 | |
hankache | hALO | 08:48 | |
TimToady | we're down to one ticket | ||
CIAvash | TimToady: /(\w)<{$0.Str.succ}><{$0.Str.succ.succ}>/ is eating a lot of memory in: | ||
abraxxa | i'm trying to get DBDish::Oracle pod finished and merged into DBIish | ||
hankache | ho ho ho ho ho | ||
CIAvash | $_ = "abcdefgh"; say ++$_ until /(\w)<next_char={$0.Str.succ}><{$<next_char>.Str.succ}>/ and !/i|o|l/ and /(\w)$0.*(\w)$1/; | ||
abraxxa | awesome! | ||
RabidGravy | is that being saved for midnight tomorrow? | ||
CIAvash | Am I doing something wrong? | ||
TimToady | RabidGravy: I have to write an advent posting tomorrow, so if someone else doesn't fix it, it probably won't get fixed | 08:49 | |
RabidGravy | what's the ticket? | ||
08:49
baest_ joined
|
|||
abraxxa | where can I find docs for Perl 6 pod? | 08:50 | |
stmuk | rt.perl.org/Ticket/Display.html?id=123766 | ||
08:50
vv3 left,
firstdayonthejob joined
|
|||
abraxxa | i'm having a hard time with S26 synopses | 08:51 | |
TimToady | CIAvash: alas, I cannot really help you tonight, it's already almost 1am here... | ||
08:51
baest left
|
|||
abraxxa | i there a module with known good perl 6 pod which I can use as example? | 08:51 | |
nwc10 | TimToady++ # fixing the last blocker bug | 08:52 | |
08:52
vv3 joined,
vv3 left
|
|||
stmuk | rt.perl.org/Ticket/Display.html?id=123272 has been closed | 08:52 | |
08:52
dakkar joined
|
|||
TimToady ⟶ 💤 | 08:52 | ||
CIAvash | TimToady: OK | 08:53 | |
08:53
vv3 joined,
vv3 left
|
|||
TimToady | oh, it's fixed? \o/ | 08:53 | |
nwc10 | er, OK, closing it in RT :-) | ||
stmuk | :D | 08:54 | |
08:54
vv3 joined
|
|||
nwc10 | technically it does seem that it should be "tests needed" | 08:54 | |
TimToady | well, whatever, we're sittin' pretty now | ||
abraxxa | Advent day 10 is pod, will take a look at that | ||
nwc10 | or atcually, "There are no tests there for with or whenever, but those did not appear to misbehave when I tried them on the command line. Feel free to add more tests for those." seems to be "more tests please" | ||
TimToady | now if only we still didn't have tests that hang when run in parallel... | 08:55 | |
nwc10 | there's still one day before Christmas :-) | ||
TimToady | I'm not sure those ever misbehaved, so didn't think it really mattered for this bug | ||
but it wouldn't hurt to have tests for 'em, is all | |||
RabidGravy | I never like these things that "just go away" | ||
08:57
znpy left
|
|||
TimToady | if anyone is at loose ends for something to think about, we can figure out how to freeze a set of tests for 6.c without fudges | 08:57 | |
Poor Man's Version: we save a fudged version, and 6.c has to keep passing that | 08:58 | ||
thomax | wait, will this be the christmas eve release or the christmas day release? | ||
08:58
rindolf joined,
vv3 left
|
|||
TimToady | I suspect we'll generate a release on the 24th and someone will officially announce it on the 25th | 08:59 | |
but of course this depends on availability of voluntolds | |||
abraxxa | design.perl6.org/S26.html returns forbidden | ||
RabidGravy | that's what I was going to suggest, doesn't there need to be at least two fudged versions though - one for rakudo and one for jvm? (and also aren't there other fudges for architecture and OS and so forth?) | ||
thomax | cool. thats a big thing! | ||
09:00
znpy joined
|
|||
RabidGravy goes back to making coredumps | 09:00 | ||
TimToady | 6.c is whatever the moarvm fudges produce, so that also has to be taken into account. jvm doesn't get to use a different standard for 6.c, it'll just take a while to catch up, as we anticipated all year | 09:01 | |
RabidGravy | right | ||
thomax | do you expect that the js implementation (of not only nqp) will be fast enough to get things done? | 09:02 | |
TimToady | it will be fast enough to get some things done | ||
it will not be fast enough to get other things done, likely, without further optimization | 09:03 | ||
but same is true for all the other backends | |||
just to differing degrees on differing work | |||
thomax | TimToady: yeah, my question is very unspecific.. | ||
hankache | m: @array ==> sort() ==> map { $_ ** 2} ==> my @final-array; say @final-array; | 09:04 | |
camelia | rakudo-moar 073484: OUTPUT«5===SORRY!5=== Error while compiling /tmp/p1H6_dybOfVariable '@array' is not declared. Did you mean any of these? Array arrayat /tmp/p1H6_dybOf:1------> 3<BOL>7⏏5@array ==> sort() ==> map { $_ ** 2} ==>» | ||
09:04
vv3 joined
|
|||
hankache | m: my @array = <7 8 9 0 1 2 4 3 5 6>; @array ==> sort() ==> map { $_ ** 2} ==> my @final-array; say @final-array; | 09:04 | |
camelia | rakudo-moar 073484: OUTPUT«[0 1 4 9 16 25 36 49 64 81]» | ||
thomax | i just think, it would be cool to use p6 in the browser environment to get a nice UI framework done | 09:05 | |
hankache | hein?? why is this ^^ not working on my local rakudo :( | ||
rindolf | TimToady: what are "voluntolds"? en.wiktionary.org/wiki/Special:Sea...voluntolds | ||
yoleaux | 22 Dec 2015 22:34Z <nine> rindolf: your share/perl6 really doesn't contain anything but panda's modules and the CORE dist. And lots of pre-curli files. I really wonder where panda installed Shell::Command to | ||
TimToady | it's a recent neologism, "I was voluntold to do this." | 09:06 | |
nwc10 | rindolf: I'm assuming that they're the plural of en.wiktionary.org/wiki/voluntold | ||
09:06
Deepak_ joined
|
|||
rindolf | nwc10: ah, I see. | 09:06 | |
nwc10 | (um, which is only given as a verb. but I think works as a noun) | 09:07 | |
09:07
cpage_ left,
vv3 left
|
|||
nwc10 | I had not met it before. It amuses me. | 09:07 | |
09:07
cpage left
|
|||
rindolf | TimToady: thanks! | 09:07 | |
RabidGravy | "one who is volunteered" | ||
TimToady | m: say (+$_ when *.is-prime while ++$_ < 100) | 09:08 | |
camelia | rakudo-moar 073484: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97)» | ||
TimToady | m: say ($_ when *.is-prime while ++$_ < 100) | ||
camelia | rakudo-moar 073484: OUTPUT«(100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100)» | ||
TimToady | maybe wants an automatic decont in there somewhere | ||
timotimo | o/ | 09:09 | |
TimToady | but it now really is past 1am | ||
TimToady ⟶ 💤 # This time fershure! | |||
timotimo | hah | ||
thomax | TimToady: hands of the keyboaard | ||
timotimo | the same dance i did last night | ||
RabidGravy | 9:09 am | ||
timotimo | anyway, BBL :) | ||
09:10
vv3 joined
|
|||
abraxxa | moritz: are you around? | 09:10 | |
hankache | ca someone try putting this on multiple lines: my @array = <7 8 9 0 1 2 4 3 5 6>; @array ==> sort() ==> map { $_ ** 2} ==> my @final-array; say @final-array; | ||
and see if it works | |||
not working if each ==> is on a new line | 09:11 | ||
09:12
ChoHag left
09:15
vv3 left,
Deepak_ left
09:18
pierre-vigier joined,
vv3 joined
|
|||
abraxxa | i've just compiled moar using rakudobrew which defaults to the nom branch and now get an error with DBDish::Oracle: Cannot import symbol size_t from DBDish::Oracle::Native, because it already exists in this lexical scope | 09:18 | |
jczeus | it fails for when i add the map | ||
for me | 09:19 | ||
RabidGravy | abraxxa, probably yes, the size_t was just added to NativeCall in the last few days IIRC | ||
abraxxa | RabidGravy: I define it in DBDish::Oracle::Native; | 09:20 | |
constant size_t is export = long; | |||
09:20
Begi joined
|
|||
hankache | jczeus indeed unless you write the map like this: map({ $_ ** 2}) | 09:21 | |
abraxxa | does this mean I have to remove my definition? | ||
nine | abraxxa: seems like you can just remove it. Exporting such a generic name doesn't sound like the best idea anyway. | ||
hankache | no idea why though | ||
abraxxa | nine: i've taken over the names from the OCI header files | ||
RabidGravy | abraxxa, yeah it went in with 61f085ca92ba9221fa38ac753509e5285f88cacb | ||
abraxxa | RabidGravy: thanks | 09:22 | |
jczeus | hankache: it also works when the closing brace is on the same line as the pipe operator | ||
nine | abraxxa: but size_t is a very standard C type. It's bound to be used by others, too. | ||
abraxxa | nine: got it | ||
hankache | my @array = <7 8 9 0 1 2 4 3 5 6>; | ||
@array ==> sort() | |||
==> map({ $_ ** 2}) | |||
==> reverse() | |||
==> my @final-array; | |||
say @final-array; | |||
hankache likes the feed operator | 09:23 | ||
09:23
vv3 left
|
|||
nine | I wonder why exactly we don't precompile scripts. With all the automatic precompilation logic already in place, it should actually be quite manageable. | 09:23 | |
09:24
vv3 joined,
vv3 left
09:25
vv3 joined,
vv3 left
|
|||
jczeus | hankache: that also works: ==> map { $_ ** 2 } \ | 09:25 | |
09:25
eone left,
vv3 joined,
vv3 left
|
|||
hankache | what happening with vv3? joining and quitting | 09:25 | |
TEttinger | that's not uncommon with a bad connection on IRC | 09:26 | |
hankache | bot? | ||
ah ok | |||
09:26
vv3 joined
|
|||
TEttinger | might be a snowstorm or windstorm or whatever messing with power lins | 09:26 | |
abraxxa | and NativeCall doesn't find the lib any more | 09:27 | |
hankache | jczeus yes | 09:28 | |
09:28
pierre-vigier left
|
|||
nine | abraxxa: we had a change there last night. Removing the "lib" in the libname should fix it. | 09:31 | |
RabidGravy | abraxxa, it may be omit the 'lib' from the front | ||
abraxxa | nine: I've guessed that from the debug output | ||
09:31
vv3 left
|
|||
abraxxa | also added the version like Skarsnik did here github.com/Skarsnik/DBIish/commit/...4fca73e964 | 09:31 | |
09:31
yeahnoob left
|
|||
abraxxa | nine: is that wise? it will break all modules using nativecall | 09:32 | |
09:32
vv3 joined,
vv3 left
|
|||
abraxxa | the version causes this error: Connect failed with error Type check failed in binding $version; expected Version but got Int | 09:32 | |
09:32
nwc10 left
|
|||
nine | abraxxa: better break them before christmas than afterwards. The goal is to abstract away platform conventions. What's liboracle.so.5.3 on Linux may be oracle.dll on Windows or liboracle.5.3.dylib on OS X | 09:32 | |
abraxxa | i see | 09:33 | |
09:33
vv3 joined,
vv3 left
|
|||
RabidGravy | the version thing is just use v1.5 or whatever | 09:33 | |
abraxxa | it's libclntshcore.so.12.1 ;) | ||
jczeus | is this intended behavior? i'm looking at s04 to see if that's the case | ||
09:33
pierre-vigier joined
|
|||
abraxxa | RabidGravy: then Skarsnik's commit is wrong too, maybe that's why it hasn't been merged so far | 09:33 | |
RabidGravy | so "is native('clntshcore', v12.1)" | ||
09:34
vv3 joined,
vv3 left
|
|||
hankache | same question as RabidGravy ? | 09:34 | |
RabidGravy | dunno, I'm going to have to fix eight modules today | ||
abraxxa | i'd prefer to not specify the exact version or a minimum version, is that possible? | ||
09:34
vv3 joined
|
|||
hankache | how do you specify the ver now? | 09:35 | |
rindolf | nine: here? I see Shell__Command in /home/shlomif/Download/unpack/perl/p6/rakudobrew/moar-nom/panda/ext . | ||
abraxxa | i now get # Connect failed with error Unknown type 'size_t' used for native call | ||
hankache: v12.1 | 09:36 | ||
09:36
pierre-vigier left
|
|||
nine | abraxxa: does Oracle install a libclntshcore.so.12 symlink? | 09:36 | |
abraxxa: just specifying the major version could be enough | |||
abraxxa | sorry, wrong name before libclntsh.so.12.1 and yes libclntsh.so | ||
nine | rindolf: that's the source where it should be installed from. | ||
abraxxa | nine: version 11 should work fine too | 09:37 | |
nine | rindolf: do you find any trace of it in your ~/.perl6? | ||
abraxxa | so if I specify v11 does it search only for .11 or will the symlink be used if it can't be found? | ||
rindolf | nine: grep -ri Shell ~/.perl6/ does not return anything. | 09:38 | |
09:38
pierre-vigier joined
|
|||
nine | abraxxa: usually there is a libfreetype.so.6.11.2 file and a libfreetype.so.6 symlink pointing to the file and maybe a libfreetype.so symlink. | 09:38 | |
09:39
virtualsue joined
|
|||
nine | abraxxa: AFAIK we do not have any automatic fallback in NativeCall | 09:39 | |
09:39
vv3 left
|
|||
abraxxa | nine: the Oracle InstantClient doesn't have any symlink, DBD::Oracle (the Perl 5 one) did create one as far as I remember | 09:39 | |
nine | rindolf: that's...really odd. It should at least be found in some precomp files | ||
AlexDaniel | “As a side effect, the precompiled file will now have the same name as the rakudo/nom: source file which could make debugging easier.” – YESSSSS | 09:40 | |
if I read it correctly | |||
09:41
xfix joined
09:42
vv3 joined
|
|||
nine | AlexDaniel: you probably didn't | 09:43 | |
timotimo | hankache: a } at the end of a line gets a ; for free. that's what gives you trouble with the feed operator | ||
nine | AlexDaniel: it's still a SHA1 hash. It's just that both the source file and the precomp file will be called 6F2671BB083EFD2E16FD682C7A9D8498E3816ED0 | 09:44 | |
timotimo | i imagine we can special-case a check for that in the grammar that gives you a helpful hint if you're starting a line with a ==>, that perhaps the previous line ended in a } and needs an unspace | ||
AlexDaniel | nine: f… | ||
nine | AlexDaniel: otherwise my commit message would have been a lot more enthusiastic than "could make it easier" :) | ||
dalek | ast: 9d3e3c3 | labster++ | S17-promise/allof.t: add test for RT #122802: non-invokable object is non-invokable |
09:45 | |
hankache | timotimo: ah! | ||
nine | AlexDaniel: I do believe that we can make those backtraces more useful. It's just nothing we can squeeze in this side of christmas. | ||
AlexDaniel | nine: by the way, although you've probably thought about that, is it possible to use SHA1 hash for directories while still keeping the same filename inside? | 09:46 | |
hankache | timotimo i wrapped them in parens. what is the unspace? | ||
abraxxa | nine: any idea where that size_t error comes from? | ||
--ll-exception didn't help | |||
nine | AlexDaniel: the trouble with file names is that not all file systems support Unicode which is the reason why Perl 5 for example doesn't allow Unicode module names. | ||
AlexDaniel: we do give you much more freedom in Perl 6 but have to make sure we can actually store those files. | 09:47 | ||
abraxxa: not without knowing anything about the code. | |||
09:47
vv3 left
|
|||
timotimo | hankache: ending your line in "\" gives you an unspace | 09:47 | |
AlexDaniel | nine: I'm not sure that I want to be affected by this if my filesystem does handle it correctly | 09:48 | |
nine: perhaps make it opt-in? :) | |||
timotimo | unspace lets you put something that looks a lot like spaces in places where spaces are otherwise not allowed | ||
hankache | thanks timotimo | ||
timotimo | so you can line up some stuff with that, like the parens of a function call | ||
09:48
vv3 joined,
vv3 left
|
|||
timotimo | m: say("hi", "how", "are", "you"); say ("hi", "how", "are", "you"); say\ ("hi", "how", "are", "you") | 09:49 | |
camelia | rakudo-moar 073484: OUTPUT«hihowareyou(hi how are you)hihowareyou» | ||
timotimo | you see how the first and second are the same, but not the one in the middle? | ||
abraxxa | nine: I've commented out the CATCH in the test file so I see the error: Method 'prepare' not found for invocant of class 'Any' | ||
nine | AlexDaniel: if any people had joined the effort, I may have found some time to find a nicer solution. As it is, I will still work on the necessary on the evening before the release. | ||
09:49
vv3 joined,
vv3 left
|
|||
hankache | oki | 09:50 | |
09:50
vv3 joined,
vv3 left
|
|||
nine | AlexDaniel: in other words: what you want or not really doesn't matter. What matters is what you do to make it happen. | 09:50 | |
abraxxa | nine: ok, that happens because connect doesn't return | ||
AlexDaniel | nine: sure | ||
09:50
espadrine joined
09:51
Actualeyes left,
vv3 joined
|
|||
Ulti | m: say 8 ?? | 09:51 | |
camelia | rakudo-moar 073484: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xByXbim1ieConfusedat /tmp/xByXbim1ie:1------> 3say 8 ??7⏏5<EOL>» | ||
dalek | ast: 03e62e2 | lizmat++ | S02-types/range.t: Add tests for Range.minmax |
||
09:52
pierre-vigier left,
cpage_ joined
|
|||
abraxxa | nine: why can size_t be unknown? | 09:52 | |
AlexDaniel | nine: by the way I've submitted a rakudobug about this hoping to see any movement | ||
nine: though I didn't feel like diving in because I didn't know why it was implemented in first place | 09:53 | ||
and not that I know now… | |||
nine | abraxxa: does the module that uses this type import NativeCall? | 09:54 | |
abraxxa | nine: yes | ||
jczeus | hankache: haven't found anything conclusive in s04, but a line ending with a closing brace apparently terminates the expression. that's why your solution with the parens also worked | 09:55 | |
09:56
vv3 left
|
|||
nine | AlexDaniel: all the reasoning is there: gist.github.com/jnthn/47a42b2e86e7e552b2e2 | 09:56 | |
09:56
mohae left,
vv3 joined,
vv3 left
09:57
virtualsue left,
vv3 joined,
vv3 left
|
|||
hankache | jczeus as timotimo said a closing brace will give you a ";" for free. so we should either use an unspace "\" like you proposed or wrapping them in parens | 09:57 | |
09:58
pierre-vigier joined,
vv3 joined,
vv3 left
|
|||
timotimo | jczeus, hankache design.perl6.org/S04.html#Statement...ing_blocks | 09:58 | |
hankache: alternatively put the ==> on the end of the previous line | |||
09:59
vv3 joined
|
|||
abraxxa | nine: i have only two occurrences of size_t, both in Oracle::Native.pm6 | 09:59 | |
10:00
cognominal left
|
|||
abraxxa | for the failing one I pass 0 to the parameter | 10:00 | |
10:00
pierre-vigier left
|
|||
abraxxa | nine: github.com/abraxxa/DBIish/blob/mas...ve.pm6#L89 | 10:01 | |
10:01
cpage joined
|
|||
AlexDaniel | nine: oh nice! Thanks for the link | 10:02 | |
10:02
mohae joined
10:03
woolfy joined
|
|||
jczeus | timotimo: i read that bit, but it says only "if an end of statement can occur there" - not sure about that | 10:03 | |
10:04
vv3 left
|
|||
timotimo | combine that sentence with the global want for "single-pass parsing" and you'll see why it's the way it is | 10:04 | |
we're not going to re-parse the end-of-line as "not supposed to be a ;" when we discover the next line has a feed operator, for example | |||
10:05
vv3 joined,
vv3 left,
pierre-vigier joined
|
|||
stmuk | dd seems to have lost the variable name | 10:05 | |
10:05
vv3 joined,
vv3 left
|
|||
dalek | kudo/nom: 8266a1f | timotimo++ | src/ (2 files): METAOP_ASSIGN shall use .DEFINITE instead of .defined this will correctly let Failure objects in a variable blow up when the variable is +='d or so, rather than defusing and replacing the Failure object. The optimization for METAOP_ASSIGN in the optimizer has sadly become a casualty, as it unexplicably leads to a "Cannot modify immutable *" error in many places. That's also why the implementation uses if/else rather than a ?? !!. That leads to the same error. |
10:05 | |
timotimo | m: dd my $x = <hi what's up> | 10:06 | |
camelia | rakudo-moar 073484: OUTPUT«List $var = $("hi", "what's", "up")» | ||
timotimo | huh, interesting | ||
10:06
vv3 joined,
vv3 left
|
|||
lizmat | m: dd :a(42) # stmuk: can use nameds to indicate the name | 10:06 | |
camelia | rakudo-moar 073484: OUTPUT«Int a = 42» | ||
10:07
kanishka joined,
vv3 joined
|
|||
stmuk | ah | 10:08 | |
10:09
pierre-vigier left
|
|||
lizmat | I wanted to be able to use nameds for dd | 10:10 | |
but that broke the positional introspection :-( | |||
10:12
pierre-vigier joined,
vv3 left
10:13
hankache left,
vv3 joined,
vv3 left
10:14
mohae left,
vv3 joined,
vv3 left
|
|||
abraxxa | nine: interesting that this syntax error didn't cause the module to fail until now: github.com/abraxxa/DBIish/blob/mas...le.pm6#L88 | 10:14 | |
10:14
mohae joined
|
|||
abraxxa | but this doesn't fix the size_t error ;( | 10:15 | |
10:15
vv3 joined,
vv3 left
10:16
vv3 joined
|
|||
abraxxa | nine: it's the OCIEnvNlsCreate call that causes the error | 10:16 | |
10:18
kjs_ joined
|
|||
lizmat | stmuk: naming the positionals depended on being able to do nqp::p6argvmarray(); | 10:19 | |
stmuk: and that apparently only works with a (|) signature | |||
stmuk: and *that* doesn't allow named params | |||
abraxxa | nine: it shouldn't come down there because %type_map contains size_t: github.com/rakudo/rakudo/blob/ddb8...l.pm6#L135 | 10:20 | |
10:21
vv3 left,
vv3 joined,
vv3 left
10:22
Begi2 joined,
vv3 joined,
vv3 left
10:23
vv3 joined,
vv3 left
10:24
Begi left,
vv3 joined
10:26
AlexDaniel left
|
|||
lizmat | ok, I'm going to revert supporting nameds with dd | 10:27 | |
10:29
vv3 left
10:30
vv3 joined,
vv3 left,
iH2O joined
|
|||
abraxxa | m: use NativeCall; my size_t $foo; say $foo.^shortname; | 10:30 | |
10:30
vv3 joined,
vv3 left
|
|||
camelia | rakudo-moar 8266a1: OUTPUT«Int» | 10:30 | |
abraxxa | haha! | ||
10:31
iH2O left
|
|||
abraxxa | nine: the ^shortname is used for the type_map lookup and Int maps to longlong | 10:31 | |
10:31
vv3 joined,
vv3 left
10:32
rurban joined,
vv3 joined
|
|||
lizmat | nine: confirm that all Inline::Perl5 tests now pass on OS X | 10:34 | |
nine: alas, install still fails with: Failed to copy '/Users/liz/Github/panda/.panda-work/1450866723_2/resources/p5helper.so' to '/Users/liz/Github/rakudo.moar/install/share/perl6/site/resources/6A67E44F00229F4678C75C6496AC23F4B5FA022A.so': Failed to copy file: no such file or directory | 10:35 | ||
nine: feels like some of the new lib name guessing has not been applied yet ? | |||
10:37
vv3 left
10:38
vv3 joined,
vv3 left
10:39
vv3 joined,
vv3 left
|
|||
dalek | kudo/nom: 9308de3 | lizmat++ | src/core/Any.pm: No longer look at nameds in dd It was a nice idea, but it broke the introspection on positionals. And since nqp::p6argvmarray only knows about positionals, and that is needed to introspect (afaics), dropping the nameds support was needed to reinstate positional introspection |
10:39 | |
10:39
vv3 joined,
vv3 left
|
|||
abraxxa | am I allowed to push a commit adding a test to nom? | 10:40 | |
shows that size_t isn't working | |||
10:40
vv3 joined
|
|||
lizmat | as in the t/ directory? | 10:40 | |
sure | |||
if you have a commit bit ? | 10:41 | ||
abraxxa | lizmat: not sure | ||
lizmat | otherwise a PR will do fine | ||
abraxxa | i don't | ||
forking | |||
RabidGravy | right, all the methods added to GDBM::File off out to pub -> farm shop etc, don't go breaking anything ;-) | 10:44 | |
Juerd | Looking for feedback on my unpack idea: gist.github.com/Juerd/ae574b87d40a66649692 | ||
timotimo | lizmat: it doesn't work with (|c) signature? p6vmargarray, that is | 10:46 | |
argvmarray* | |||
10:47
hankache joined
|
|||
lizmat | nope, any other sig than (|) eats it | 10:48 | |
10:48
mohae left
|
|||
lizmat | by the looks of it | 10:48 | |
10:48
vv3 left
|
|||
timotimo | hm, OK | 10:48 | |
10:49
mohae joined,
RabidGravy left,
kjs_ left
|
|||
timotimo | really all p6argvmarray does is grab a slurpy positional argument and hllize each entry | 10:49 | |
10:49
kjs_ joined
|
|||
labster | m: my $promise = start { fail 42 }; await $promise; say $promise.status #RT #123204 | 10:50 | |
camelia | rakudo-moar 8266a1: OUTPUT«42 in block <unit> at /tmp/LB3q0tp6Dx:1» | ||
lizmat | I guess that's what any sig other than (|) also does, hence I can't get at them anymore after that | ||
labster | j: my $promise = start { fail 42 }; await $promise; say $promise.status irc://chat.freenode.net:6665/#RT irc://chat.freenode.net:6665/#123204 | 10:51 | |
10:51
vv3 joined
|
|||
camelia | rakudo-jvm 6c0f93: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0blLkRtO2bTwo terms in a rowat /tmp/0blLkRtO2b:1------> 032 }; await $promise; say $promise.status7⏏5 irc://chat.freenode.net:6665/#RT irc:// expecting any of: infix inf…» | 10:51 | |
timotimo | yeah | ||
i expect p6argvmarray is an optimization so that no Capture object has to be created? | |||
labster | j: my $promise = start { fail 42 }; await $promise; say $promise.status | ||
timotimo | if you only need nameds | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«Attempt to return outside of any Routine in block <unit> at /tmp/QrAskKZvVG:1» | ||
timotimo | labster: yeah, fail doesn't work if you don't have a sub to fail from | 10:52 | |
hankache | what is the status of rakudo on jvm ? | ||
timotimo | j: my $promise = start(anon sub($_) { fail 42 }); await $promise; say $promise.status | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«5===SORRY!5===Type 'sub' is not declared. Did you mean 'Sub'?at /tmp/WEISKACa6Z:1------> 3my $promise = start(anon sub7⏏5($_) { fail 42 }); await $promise; say $Malformed anonat /tmp/WEISKACa6Z:1------> 3my $promise = start(anon…» | ||
10:52
vv3 left
|
|||
timotimo | j: my $promise = start(anon sub ::($_) { fail 42 }); await $promise; say $promise.status | 10:53 | |
camelia | rakudo-jvm 6c0f93: OUTPUT«===SORRY!===Name ::($_) is not compile-time known, and can not serve as a sub declaration» | ||
timotimo | j: my $promise = start(anon sub ($_) { fail 42 }); await $promise; say $promise.status | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tdK_bFCcz8Undeclared routine: start used at line 1. Did you mean 'spurt', 'sqrt', 'sort'?» | ||
labster | Wait, which is correct though, moar or jvm? | ||
timotimo | j: my $promise = start anon sub ($_) { fail 42 }; await $promise; say $promise.status | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«Kept» | ||
timotimo | j: my $promise = start anon sub ($_) { fail 42 }; say await $promise; say $promise.status; | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«sub ($_) { #`(Sub|93720058) ... }Kept» | ||
timotimo | oh damn | ||
i forgot about that | |||
does Promise.new schedule the promise, too? | 10:54 | ||
no, it's not about creating code-backed promises | |||
lizmat | Promise.new just creates a Promise | ||
nothing special about that | |||
m: Promise.new.result # wait for the heat death | |||
timotimo | yeah | 10:55 | |
camelia | rakudo-moar 9308de: OUTPUT«(timeout)» | ||
timotimo | how do i "start" a sub? | ||
nine | lizmat: yes, that part is still NYI. On my list for tonight | ||
hankache | chaining methods was available in Perl 5? | ||
lizmat | ++nine | ||
hankache | @array.sort.reverse | ||
or is this new to 6 ? | 10:56 | ||
lizmat | m: sub a { "foo" }; Promise.start( &a ).result.say | ||
camelia | rakudo-moar 9308de: OUTPUT«foo» | ||
llfourn | m: my str $str = ''; $str.WHAT.say # how do I tell if the value contained is native? | ||
yoleaux | 07:32Z <moritz> llfourn: I've installed a new Pod::To::HTML, and made the build process more robust as to avoid emtpy S26.html in future (github.com/perl6/mu/commit/5657282404) | ||
camelia | rakudo-moar 9308de: OUTPUT«(Str)» | ||
lizmat | timotimo: ^^^ | ||
llfourn | moritz++ thanks! | ||
lizmat | llfourn: you can't | ||
timotimo | ah, that's how! | ||
great | |||
labster | Ah, makes sense. | ||
timotimo | j: my $promise = Promise.start(anon sub ($_) { fail 42 }); say await $promise; say $promise.status | 10:57 | |
lizmat | llfourn: natives are not objects, so they have to be upgraded first before you can call anything on them | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«Too few positionals passed; expected 1 arguments but got 0 in block <unit> at /tmp/np31QXWJ6x:1» | ||
lizmat | llfourn: hence you see Str instead of str | ||
timotimo | j: my $promise = Promise.start(anon sub { fail 42 }); say await $promise; say $promise.status | ||
camelia | rakudo-jvm 6c0f93: OUTPUT«===SORRY!===42» | ||
llfourn | lizmat: even in nqp? | ||
timotimo | m: my $promise = Promise.start(anon sub { fail 42 }); say await $promise; say $promise.status | ||
camelia | rakudo-moar 9308de: OUTPUT«===SORRY!===42» | ||
lizmat | ah, in nqp... hmmmm | ||
timotimo | labster: there we go | ||
lizmat | llfourn: timotimo might know | 10:58 | |
labster | Thanks timotimo — but I'm not trying to do it correctly, I'm trying to figure out how RT #123204 should fail. | ||
timotimo | oh, about what exactly? | ||
labster: it should say "can't fail outside of any routine" | |||
llfourn | timotimo: how to tell if value $contained is native or not :)? | ||
in nqp context | |||
timotimo | a value cannot "be native"; only arguments and lexicals can | 10:59 | |
er, wait | |||
that's BS :) | |||
in nqp, you'll use nqp::objprimspec | |||
the return value is 0 for object, 1, 2 or 3 for some order of int, num and str | |||
nqp-m: my int $a := 1; say(nqp::objprimspec($a)) | |||
camelia | nqp-moarvm: OUTPUT«1» | ||
timotimo | nqp-m: my $a := 1; say(nqp::objprimspec($a)) | 11:00 | |
camelia | nqp-moarvm: OUTPUT«1» | ||
timotimo | nqp-m: my $a := "hello"; say(nqp::objprimspec($a)) | ||
camelia | nqp-moarvm: OUTPUT«3» | ||
timotimo | nqp-m: my $a := 10.0e0; say(nqp::objprimspec($a)) | ||
camelia | nqp-moarvm: OUTPUT«2» | ||
timotimo | there we go | ||
llfourn | thanks I'll give that a shot. The reason I wanted to know was that I see nqp::unbox_s used sometimes and sometimes not and just wanted to see what the difference is. | ||
11:02
CQ left
11:05
xtreak joined
|
|||
xtreak | p6: my %a = <a b c d>; say %a.^methods; say %a.keyof() | 11:06 | |
camelia | rakudo-moar 9308de: OUTPUT«(BIND-KEY STORE_AT_KEY name keyof of default dynamic push append classify-list categorize-list Method+{<anon|65740608>}.new Method+{<anon|65740608>}.new Method+{<anon|65740608>}.new perl gist DUMP Method+{<anon|65740608>}.new elems iterator STORE STORE_AT_…» | ||
xtreak | the keyof method doesn't seem to be implemented yet. Does it supposed to return the key for the value? | 11:07 | |
lizmat | xtreak: where did you find "keyof" ??? | ||
it doesn't seem to be in the speculation (anymore) | 11:08 | ||
11:09
pierre-vigier left
|
|||
abraxxa | lizmat: PR sent | 11:10 | |
xtreak | src/core/Hash.pm method keyof . commits : fe792fdf37e8091c8b6892c826fa0ba6441664cc , cd927656d7a1a379c50cd4cf10edfc4bb66a6857 | ||
abraxxa | nine: github.com/rakudo/rakudo/pull/648 shows the failure | ||
11:11
pierre-vigier joined
|
|||
xtreak | Am on rakudobrew built at Nov 17. May be its removed at update? | 11:11 | |
timotimo | oh | 11:17 | |
dalek | kudo/nom: f5912bc | lizmat++ | src/core/Range.pm: Doesn't make sense to fail, we want to throw! |
||
timotimo | .keyof gives you the type of the keys | ||
dalek | kudo/nom: 16a5f25 | (Alexander Hartmaier)++ | t/04-nativecall/02-simple-args. (2 files): add test for size_t |
11:18 | |
kudo/nom: 9f81d1d | (Alexander Hartmaier)++ | t/04-nativecall/15-rw-args. (2 files): add tests for passing and returning data to C functions |
|||
kudo/nom: 47e04b6 | lizmat++ | t/04-nativecall/ (4 files): Merge pull request #648 from abraxxa/nom add tests for size_t and passing and returning data to C functions |
|||
abraxxa | lizmat: thanks! | ||
lizmat | yw ! | ||
xtreak | It always returns Any | ||
11:18
Su-Shee joined
|
|||
xtreak | The method is `method keyof () { Any }` | 11:19 | |
timotimo | xtreak: yeah, but it's overrided by the typed hash role, no? | ||
lizmat | yes it is | ||
timotimo | m: my %foo{Range}; say %foo.keyof | ||
camelia | rakudo-moar 9308de: OUTPUT«(Range)» | ||
timotimo | xtreak: here you can see that | ||
bbiab | 11:20 | ||
labster | Well, managed to close 3 tickets before bedtime. 2 resolved, 1 rejected. I'll be back tomorrow to see if there are any more LHFs to pick before Christmas. | ||
xtreak | yes. I thought by keyof to return the key of a value. Thanks :) | 11:21 | |
nine | lizmat: .oO(throw, throw, throw your $got, gently out of range...) | 11:22 | |
lizmat | xtreak: you probably want to use .pairs on a hash, then you can do .key for the key and .value for the value | 11:23 | |
m: my %h = a => 42, b => 666; for %h.pairs { say .key; say .value } | 11:24 | ||
camelia | rakudo-moar 9308de: OUTPUT«a42b666» | ||
lizmat | m: my %h = a => 42, b => 666; for %h.kv => $key, $value { say $key; say $value } # alternate way for xtreak | ||
camelia | rakudo-moar 9308de: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xd4B475o0BVariable '$key' is not declaredat /tmp/xd4B475o0B:1------> 3my %h = a => 42, b => 666; for %h.kv => 7⏏5$key, $value { say $key; say $value } » | ||
lizmat | m: my %h = a => 42, b => 666; for %h.kv -> $key, $value { say $key; say $value } # alternate way for xtreak | ||
camelia | rakudo-moar 9308de: OUTPUT«a42b666» | ||
abraxxa | do i have to use =begin pod and =end pod before/after each =METHOD when I want my perl 6 pod to be inline with the code? | ||
lizmat | =METHOD implies =begin pod, I would think | 11:25 | |
don't know about the =end | |||
xtreak | No. I thought to get a key of the given value like `my %caps = <UK London France Paris>` and `say %caps<London>.keyof()` to return UK | ||
abraxxa | lizmat: it seems everybody is writing perl 5 pod in the perl6 modules, at least the ones i've checked | 11:26 | |
is there a perldoc equivalent to render perl 6 pod? | |||
lizmat | abraxxa: tbh, I haven't followed the p6pod developments closely | ||
xtreak: nope | 11:27 | ||
llfourn | abraxxa: you should be able to do perl6 --doc | 11:28 | |
abraxxa | llfourn: thanks! I wasn't able to find that info anywhere | ||
nine | xtreak: it returns the type of the keys. Typing usually involves an .of method, that's where the name comes from. | ||
11:29
rurban left
|
|||
llfourn | abraxxa: ironically I think pod is the least documented of anything on p6docs | 11:29 | |
abraxxa | llfourn: yes, it seems to | ||
llfourn: design.perl6.org/S26.html returns forbidden | 11:30 | ||
11:30
labster left
|
|||
nine | abraxxa: make tests passes here? | 11:30 | |
llfourn | moritz: ^^ see above if you are around :) | ||
_nadim | rindolf: hi, it seems that I was using an API that is 600 commits old. could you please try the latest? | ||
abraxxa | nine: hm? | ||
nine | abraxxa: the tests you committed pass. Are they supposed to pass or to fail? | 11:31 | |
rindolf | _nadim: yes, let me see. | ||
abraxxa | nine: the size_t one fails | ||
nine: perl6 -Ilib t/04-nativecall/02-simple-args.t | |||
nine | abraxxa: All tests successful | ||
_nadim | flussence: Could you please pull the latest and re-run the tests? | ||
abraxxa | nine: Unknown type 'size_t' used for native call | 11:32 | |
in method setup at /home/ahartmai/perl6/git/rakudo/lib/NativeCall.pm6:223 | |||
in method CALL-ME at /home/ahartmai/perl6/git/rakudo/lib/NativeCall.pm6:234 | |||
in block <unit> at t/04-nativecall/02-simple-args.t:66 | |||
nine: perl6::version=2015.11-740-g0734842 | |||
rakudobrew build moar nom | |||
a few hours ago | |||
nine | abraxxa: indeed. It breaks with perl6 -Ilib t/04-nativecall/02-simple-args.t but passes with make test | ||
abraxxa | nine: weird | 11:33 | |
are they run? | |||
nine | yes | ||
abraxxa | nine: did you see my pointer to where the problem lies before? | ||
rindolf | _nadim: panda still won't run, much less install Text::Table::Simple though. | 11:34 | |
11:34
Skarsnik joined
|
|||
_nadim | rindolf: hmm, I thought I fixed that, let me check | 11:34 | |
rindolf | _nadim: I didn't try. | 11:35 | |
nine | It also passes when run by /usr/bin/perl t/harness --moar t/04-nativecall/02-simple-args.t | ||
11:35
rurban joined
|
|||
rindolf | _nadim: OK, now I'm getting much fewer failures. | 11:36 | |
abraxxa | Could not execute (./perl6-m t/04-nativecall/02-simple-args.t): open3: exec of ./perl6-m t/04-nativecall/02-simple-args.t failed at /usr/share/perl/5.20/TAP/Parser/Iterator/Process.pm line 165. | ||
_nadim | rindolf: well I missed one place, at t/01_all.t line 65, there is a use Text::.... that is not a in a try, so that may fail, although the test is a todo | ||
rindolf | _nadim: www.shlomifish.org/Files/files/text...a-Dump.txt | 11:37 | |
rindolf forgot what he wanted to do now. | |||
11:37
kjs_ left
|
|||
_nadim | rindolf: thanks mate, I'll remove the dependency and fix the last error. almost there. | 11:40 | |
xtreak | Does %caps{Int} means that only only integer keys can be used? | ||
11:41
pierre-vigier left
|
|||
xtreak | Yes got it. I was again using 'my' for the assignment again and it got shadowed. | 11:41 | |
llfourn | m: my %caps{Int} = (1 => 'str') | 11:42 | |
camelia | ( no output ) | ||
llfourn | m: my %caps{Int} = ('str' => 1) | ||
camelia | rakudo-moar 47e04b: OUTPUT«Type check failed in binding key; expected Int but got Str in block <unit> at /tmp/ue26FsEVfy:1» | ||
11:42
pierre-vigier joined
|
|||
abraxxa | nine: anything I can do to fix it? | 11:47 | |
dalek | kudo/nom: 82fe5fb | lizmat++ | / (6 files): Split Temporal into Dateish/DateTime/Date Was starting to make errors not seeing in which class I was making changes. Plus it was causing confusion among would-be core developers looking for the code that makes Date/DateTime tick :-) |
||
11:50
shmibs joined,
shmibs left
11:52
kjs_ joined
|
|||
abraxxa | seen moritz? | 11:56 | |
moritz | abraxxa: I'm around-ish | ||
11:56
moritz sets mode: -o mohae,
moritz sets mode: -o moritz
|
|||
abraxxa | moritz: DBDish::Oracle is almost ready to merge | 11:56 | |
not sure how I should handle the still failing tests | 11:57 | ||
moritz | abraxxa: you mean besides fixing them? | ||
abraxxa | moritz: things like different sort order by database | 11:58 | |
Oracle sorts NULLs last by default and it can only be changes through a different sql query | |||
ORDER BY name NULLS FIRST | |||
moritz | abraxxa: if the other backends support that too, change the SQL | ||
abraxxa | moritz: guess what, they don't | ||
moritz | they don't? | 11:59 | |
abraxxa | so another sql query that depends on the DBD | ||
nine | What about ORDER BY coalesce(name, '')? | ||
moritz | well, you can also ORDER BY COAELESE(thecolumn, 0) or so | ||
nine | ha :) | ||
Great minds think alike! | |||
moritz | nine: except that you spelled it correctly, afaict :-) | 12:00 | |
abraxxa | nine: not that Oracle handles NULL and '' differently ;) | 12:01 | |
|Tux| | yes it does, in char fields | 12:03 | |
moritz | there's also ORDER BY column IS NULL DESC, column DESC or so | 12:04 | |
that should work in all four, I hope | |||
|Tux| | tux.nl/Talks/DBDc/null.html | ||
abraxxa | ORDER BY COALESCE(name,'A') does the trick, do you recommend some other function? | 12:06 | |
ORDER BY name IS NULL DESC results in ORA-00933: SQL command not properly ended on Oracle 12c | 12:07 | ||
moritz | then use COALESCE | ||
abraxxa | ok, thanks! | ||
moritz | I know mysql supports it | ||
abraxxa | SQLite does too | ||
don't have MySQL or Postgres installed locally to test though | |||
moritz | and postgres too | 12:08 | |
abraxxa | great! | ||
12:08
regreg joined
|
|||
abraxxa | then in only need a solution for 'FROM DUAL' for Oracle | 12:09 | |
12:10
administrator joined
|
|||
abraxxa | is there a done_testing instead of again having to plan the number of tests? | 12:10 | |
lizmat | I wonder whether 'use v6.c' should set a dynamic variable that modules could inspect to see under what version they're supposed to be running | ||
12:10
administrator is now known as Guest54696
|
|||
abraxxa | lizmat: pre v6.c compat isn't important, isn't it? | 12:11 | |
lizmat: but going forward it will be | |||
lizmat | yes, indeed | ||
12:11
hankache left
12:12
lichtkind joined
|
|||
lizmat | probably want to engrain this at an early stage | 12:12 | |
m: say $*PERL # perhaps that's the one ? | 12:13 | ||
camelia | rakudo-moar 82fe5f: OUTPUT«Perl 6 (6.b)» | ||
12:13
kjs_ left,
loren joined
|
|||
abraxxa | what does @a ~~ @b do? | 12:13 | |
Skarsnik | m: say $*PERL.version; | ||
camelia | rakudo-moar 82fe5f: OUTPUT«v6.b» | ||
abraxxa | Skarsnik: hi! | ||
Skarsnik | Hello | 12:14 | |
12:14
cognominal joined
|
|||
moritz | design.perl6.org/S03#Smart_matching Positional List lists are comparable $_ »~~« X (but dwims ** wildcards!) | 12:14 | |
timotimo | now to write tests for += and friends triggerint failures | ||
loren | m: say (1, 23) ~~ (1, 23); say (1, 23) ~~ (1, 32); | 12:15 | |
camelia | rakudo-moar 82fe5f: OUTPUT«TrueFalse» | ||
Skarsnik | abraxxa, did you figure why is-deeply fail? x) | ||
abraxxa | Skarsnik: no, sadly not. but nom breaks DBDish and I'm waiting on nine to look into it, already commited a test for it | ||
Skarsnik: i'm working on getting the tests in 99-common.t work together nicely with DBDish::Oracle, when I got this I'll send the pull request and continue its development in the main repo | 12:16 | ||
12:17
pierre-vigier left
|
|||
Skarsnik | the break is because of lib not requiered in the libname anymore? | 12:17 | |
abraxxa | moritz: thanks. So using it for comparing two arrays which should be the same length and contain the same typed values or Type objects should be good for a test? | 12:18 | |
12:18
vv3 joined,
vv3 left
|
|||
abraxxa | Skarsnik: for the other DBDs yes, Oracle also breaks because of size_t | 12:18 | |
12:19
vv3 joined,
vv3 left,
vv3 joined,
vv3 left
|
|||
lichtkind | if i get it .hyper makes any list list generating function into an supply? | 12:20 | |
loren | Hi, I wonder whether Array has an method can swap two element | ||
12:20
vv3 joined
|
|||
loren | I look for document about Array, but not found/ | 12:20 | |
timotimo | loren: you can @arr[1, 10] .= reverse | 12:21 | |
Skarsnik | abraxxa, you should add a test in xt/ for oracle (copy past one of the other) x) | 12:22 | |
loren | m: say (1, 2, 3)[1,2] .= reverse; | ||
camelia | rakudo-moar 82fe5f: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/QiIgOL4ZeQ:1» | ||
abraxxa | Skarsnik: ah, haven't seen those | ||
loren | m: my @x = (1, 2, 3); @x[1,2] .= reverse; say @x; | ||
camelia | rakudo-moar 82fe5f: OUTPUT«[1 3 2]» | ||
12:22
Actualeyes joined
|
|||
loren | timotimo, thanks | 12:22 | |
timotimo | yw | ||
@x[1,2] = @x[2,1] also works | 12:23 | ||
12:23
vv3 left,
vv3 joined
|
|||
loren | em, got it . ^_^ | 12:23 | |
12:23
kid51 joined
|
|||
abraxxa | Skarsnik: the 04_pgnative.t has sqlite headers in int | 12:24 | |
12:24
vv3 left
|
|||
dalek | kudo/nom: cc46351 | lizmat++ | src/core/Date (3 files): Make .daycount a lazy Dateish attribute Before, it was always calculated for Date's, but DateTime internally also used it in some cases by first creating a Date object for it. Seemed daycount wasn't always needed anyway, for many cases, so that making it lazy and cleaning up the interface seemed like a good idea. |
12:24 | |
12:25
vv3 joined,
vv3 left
12:26
vv3 joined,
vv3 left
|
|||
abraxxa | Skarsnik: Could not find NativeCall::TypeDiag in any of: | 12:26 | |
is it newer than 2015.11? | |||
hm, same for nom | |||
Skarsnik | It's a module | ||
12:26
vv3 joined
|
|||
abraxxa | a non-core one? | 12:27 | |
Skarsnik | Yes | ||
abraxxa | i see | ||
Skarsnik | hm, I did not run the pg test? x) | ||
abraxxa | the two vars aren't used because the first test is commented out | 12:28 | |
Skarsnik | Oh yes, Pg does not define any CStruct | ||
too much copy paste x) | |||
moritz | Pg works with OpaquePointer only | 12:29 | |
I love that C API | |||
abraxxa | moritz: OCI too | ||
only pass and return by pointer | |||
doesn't panda do dependency resolution for modules? | 12:30 | ||
Skarsnik | how do you get information about a field? | ||
I did not put NC::Typediag in the dep, since it's only an author test | 12:31 | ||
abraxxa | Skarsnik: github.com/abraxxa/DBIish/blob/mas...e.pm6#L483 | ||
TypeDiag doesn't list File::Temp, I had to install it manually | |||
Skarsnik | ho, my bad | ||
12:31
vv3 left
|
|||
abraxxa | NativeCall::TypeDiag:ver<*>:auth<Sylvain Colinet>:api<> already installed | 12:31 | |
and I can't install it even after installing File::Temp | 12:32 | ||
moritz | panda install -force maybe? | ||
12:32
vv3 joined,
vv3 left
|
|||
abraxxa | it seems it's panda --force install | 12:33 | |
nine | lizmat: indeed, I've heard lots about language backwards compatibility. But what about the runtime? How will e.g. List's method know how to behave? | ||
abraxxa | Could not find NativeCall::TypeDiag in: | ||
;( | |||
12:33
rurban left,
vv3 joined,
vv3 left
|
|||
abraxxa | Skarsnik: does it work on nom for you? | 12:34 | |
timotimo | how do i best test for a failure to blow up? | ||
lizmat | nine: well, that would be my point: by checking on $*PERL ? if that's being set by use v6.n | ||
abraxxa | panda fails to install on 2015.11, so I can't test on that either | ||
moritz | timotimo: dies-ok { ~things-that-fail() } or so | ||
timotimo | i tried class X::ThisFailure { }; my $foo = Failure.new(X::ThisFailure.new()), but i get an X::AdHoc from throws-like | ||
abraxxa | timotimo: catch the exception? | ||
timotimo | moritz: dies-ok seems like a terrible idea :) | 12:35 | |
like, in general | |||
Skarsnik | erf | ||
all my vmbox save are dead >< | |||
moritz | m: class X::F { has $.message = 'boo' }; sub f () { fail X::F.new }; say f().^name | 12:36 | |
camelia | rakudo-moar cc4635: OUTPUT«Failure» | ||
Skarsnik | great it again lost inter vx tek, I can't boot my 64 bits vm with nom >< | ||
moritz | m: class X::F { has $.message = 'boo' }; sub f () { fail X::F.new }; say f().exception.^name | ||
camelia | rakudo-moar cc4635: OUTPUT«X::AdHoc» | ||
12:36
vv3 joined
|
|||
moritz | that looks...wrong | 12:36 | |
El_Che | hi my favorite perl6 people! | ||
moritz | m: class X::F is Exception { has $.message = 'boo' }; sub f () { fail X::F.new }; say f().exception.^name | 12:37 | |
camelia | rakudo-moar cc4635: OUTPUT«X::F» | ||
moritz | oh, it works like that | ||
loren | El_Che, Hi... | ||
lizmat | wrt to dies-ok, jnthn changed a lot of checks for X::AdHoc to dies-ok :-( | ||
llfourn | moritz: thanks for fixing docs build and imporving robustness. fyi design.perl6.org/S26.html is note completely blank but is 403 :) | ||
/note/not/ | |||
moritz | lizmat: well, X::AdHoc is wrong when we start to introduce typed exceptions | ||
lizmat: better to test for Exception than to test X::AdHoc | 12:38 | ||
lizmat | well, that's the same as dies-ok | ||
so we get false positives | |||
:-( | |||
Skarsnik | how to test the fail message btw? | 12:39 | |
12:39
vv3 left
|
|||
moritz | Skarsnik: once it's handled, you can stringify it | 12:40 | |
12:40
vv3 joined,
vv3 left
12:41
vv3 joined,
vv3 left
|
|||
nine | abraxxa: you do have NativeCall::TypeDiag installed but cannot load it? | 12:42 | |
12:42
vv3 joined,
vv3 left
|
|||
Skarsnik | I think having a missing dep screw it? | 12:43 | |
12:43
vv3 joined
|
|||
abraxxa | nine: panda --force install NativeCall::TypeDiag said install successful on my nom build | 12:43 | |
nine | abraxxa: but perl6 -e 'use NativeCall::TypeDiag' fails? | 12:44 | |
abraxxa | nine: yes | ||
Could not find NativeCall::TypeDiag in: | |||
nine | Oh, I can even reproduce this! | 12:45 | |
Skarsnik | I just fixed the missing dep xD | ||
12:45
kjs_ joined
|
|||
nine | And that's the reason: "Gumbo" : "lib/NativeCall/TypeDiag.pm6" in META.info | 12:45 | |
perl6 -e 'use Gumbo' # obvious fix | 12:46 | ||
Skarsnik | lol | ||
I should use/write something to generate the base code for my modules x) | 12:47 | ||
12:47
Begi2 is now known as begi,
begi is now known as Begi
|
|||
moritz | Skarsnik: please take over Module::Starter | 12:47 | |
Skarsnik | abraxxa, ok try remove and install again? | ||
12:48
vv3 left
|
|||
abraxxa | Skarsnik: does panda have an uninstall/remove option? | 12:48 | |
12:48
pierre-vigier joined
|
|||
Skarsnik | I wanted to use mi6 but using it to run test rebuild the META, it screw me the dbiish meta file by changing the author x) | 12:48 | |
12:49
vv3 joined,
vv3 left,
kjs_ left
|
|||
Skarsnik | No idea. it should ? | 12:49 | |
nine | abraxxa: not yet | ||
12:49
vv3 joined,
vv3 left
|
|||
abraxxa | panda --force install NativeCall::TypeDiag again said ==> Successfully installed NativeCall::TypeDiag but it still can't be found | 12:49 | |
Skarsnik | update? | ||
12:50
vv3 joined,
vv3 left
|
|||
nine | abraxxa: panda update before installing again | 12:50 | |
abraxxa | nine: oh, thanks | 12:51 | |
12:51
vv3 joined
|
|||
abraxxa | still had to force it but now it seems to work | 12:51 | |
12:52
kid51 left
|
|||
nine | We all should start versioning our modules. Otherwise people will have to use --force all the time | 12:52 | |
Skarsnik | panda has a gen-meta option, fun | ||
abraxxa | Skarsnik: OCI has multiple header files but InstantClient doesn't install into the regular lib dirs, can I specify the dir somehow? | 12:53 | |
Skarsnik | you could always set @nctd-extracompileroptions | 12:54 | |
abraxxa | Skarsnik: where is that documented? | 12:55 | |
nine: anything I can do to fix size_t? | |||
Skarsnik | but the diag-function compile nothing, it just look at the routine signature | ||
12:56
vv3 left
|
|||
nine | abraxxa: find out why the hell the test fails when run with perl6 directly and why it passes when run in the harness | 12:56 | |
Skarsnik | constant size_t is export = long; remove that | ||
size_t exist | |||
now | |||
abraxxa | nine: I can't run the harness | ||
nine | abraxxa: why? | 12:57 | |
12:57
vv3 joined,
vv3 left,
vv3 joined,
vv3 left
|
|||
abraxxa | nine: Could not execute (./perl6-m t/04-nativecall/02-simple-args.t): open3: exec of ./perl6-m t/04-nativecall/02-simple-args.t failed at /home/ahartmai/perl5/perlbrew/perls/22.1/lib/5.22.1/TAP/Parser/Iterator/Process.pm line 165. | 12:58 | |
when I run perl t/harness --moar t/04-nativecall/02-simple-args.t | |||
12:58
vv3 joined,
vv3 left
|
|||
Skarsnik | just run perl6 -I lib t/04-nc/02 ? | 12:59 | |
12:59
vv3 joined
|
|||
nine | Skarsnik: doesn't help. The test fails (as it should) when run that way but passen when run with the harness (make test) | 12:59 | |
13:00
rurban joined
|
|||
Skarsnik | duh | 13:00 | |
abraxxa | how can i build a List from one column of an Array of Arrays? | 13:01 | |
lizmat | abraxxa: the nice syntax for that using * is still NYI, afaik | 13:02 | |
abraxxa | @array.map({ .[3] })? | 13:04 | |
13:04
vv3 left
|
|||
Skarsnik | btw if you have the same issue with is-deeply that I have, it's probably a rakudo bug on eqv | 13:05 | |
13:05
vv3 joined,
vv3 left
|
|||
abraxxa | works but returns a Seq | 13:05 | |
13:07
xinming joined,
vv3 joined
13:08
pierre-vigier left
|
|||
abraxxa | nine: make test passes here too | 13:09 | |
13:10
AndyDee left,
RabidGravy joined
|
|||
abraxxa | and ./perl6-m -Ilib t/04-nativecall/02-simple-args.t fails | 13:10 | |
nine: but as I said before, size_t.^shortname is Int which maps to longlong instead of size_t in %type_map | 13:11 | ||
13:12
vv3 left,
xinming_ joined
13:13
vv3 joined,
vv3 left
13:14
vv3 joined,
vv3 left
13:15
vv3 joined,
vv3 left,
xinming left
|
|||
abraxxa | what is the difference between :amount($(Rat, Rat, 2.4, 4.95, Rat, 4.85)) and :amount($[Rat, Rat, 2.4, 4.95, Rat, 4.85]) ? | 13:15 | |
the first is generated by the map().list | |||
13:15
vv3 joined,
kjs_ joined
13:18
kjs_ left
13:19
kjs_ joined
13:20
vv3 left,
shmibs joined
13:21
vv3 joined,
vv3 left
|
|||
moritz | abraxxa: () vs [] | 13:22 | |
abraxxa: () is a list, [] is an Array | |||
abraxxa | yes, but I can't figure out what is what | ||
13:22
vv3 joined,
vv3 left
|
|||
moritz | m: say $[].^name | 13:22 | |
camelia | rakudo-moar cc4635: OUTPUT«Array» | ||
moritz | m: say $().^name | ||
camelia | rakudo-moar cc4635: OUTPUT«Use of Nil in string context in block <unit> at /tmp/MVusf41i2J:1Str» | ||
moritz | m: say $(1, 2).^name | ||
camelia | rakudo-moar cc4635: OUTPUT«List» | ||
Skarsnik | m: use NativeCall; say size_t.^shortname; | ||
camelia | rakudo-moar cc4635: OUTPUT«size_t» | ||
abraxxa | i still hate that there are two types! | ||
as the code pushes it only can return an Array, correct? | |||
moritz | right | 13:23 | |
13:23
vv3 joined,
vv3 left
|
|||
abraxxa | i tried initializing it with () instead of [] but that didn't work | 13:23 | |
so how do i get an Array out of the Seq returned by map? | |||
Skarsnik | I don't get your issue with size_t x) | ||
RabidGravy | flat | ||
abraxxa | RabidGravy: flat returns a List too | ||
13:24
vv3 joined
|
|||
abraxxa | hm, doc bug | 13:24 | |
Interprets the invocant as a list, flattens it, and returns that list. | |||
but: method flat() return Iterable | |||
the first is from Class Any, the later from role Iterable | |||
13:25
andreoss joined
|
|||
abraxxa | Skarsnik: does the test fail for you too? | 13:25 | |
moritz | List ~~ Iterable | ||
so not a bug | |||
abraxxa | moritz: more of an annoyance with the docs that reload the page when you click a method and this new page shows all possible sources and not only the one used by the Class or Type you clicked the link in | 13:27 | |
so is there a way to get an Array from a Seq? | |||
lizmat | [$seq.list] ? | ||
moritz | [$seq] ? | ||
$seq.Array? | 13:28 | ||
m: say (gather { take 1; take 2}).Array.perl | |||
camelia | rakudo-moar cc4635: OUTPUT«[1, 2]» | ||
13:28
kjs_ left
|
|||
moritz | m: say [gather { take 1; take 2}].perl | 13:28 | |
camelia | rakudo-moar cc4635: OUTPUT«[1, 2]» | ||
13:28
darutoko left
|
|||
abraxxa | [ $seq.list ] works, thanks | 13:28 | |
13:28
vv3 left
|
|||
Skarsnik | moritz, can you look at dbiish to have row usable in for? (without being greedy) | 13:29 | |
abraxxa | this needs BIG red letters in the docs: [] is an Array, () is a List | ||
lizmat | abraxxa: from what moritz said, $seq.Array should also work | ||
abraxxa | which is weird for p5 people where you write my @rray = (); | ||
13:29
vv3 joined,
vv3 left
|
|||
abraxxa | not listed here: doc.perl6.org/type/Seq | 13:30 | |
nine | or even simpler: my @column = @array.map({ .[3] }); | ||
13:30
vv3 joined,
vv3 left
|
|||
lizmat | m: dd my @a = (1,2,3) # abraxxa: that still works in P6 | 13:30 | |
camelia | rakudo-moar cc4635: OUTPUT«Array @a = [1, 2, 3]» | ||
abraxxa | nine: i have that in a hash | ||
lizmat | m: dd my @a = 1,2,3 # abraxxa: but the parens are superstitious | 13:31 | |
camelia | rakudo-moar cc4635: OUTPUT«Array @a = [1, 2, 3]» | ||
nine | m: my @array = [1, 2, 3], [2, 3, 4], [3, 4, 5]; my @column = @array.map(*.[2]); say @column; | ||
camelia | rakudo-moar cc4635: OUTPUT«[3 4 5]» | ||
abraxxa | lizmat: yes, which makes it even more confusing! does this build a List which is then assigned to the Array? | ||
13:31
vv3 joined,
vv3 left
|
|||
lizmat | abraxxa: yup | 13:31 | |
, is the list creator | |||
m: dd (42); dd (42,) | |||
camelia | rakudo-moar cc4635: OUTPUT«42(42,)» | ||
abraxxa | lizmat: so my @array = []; performs better because no List object is generated and thrown away immediatly? | 13:32 | |
13:32
vv3 joined
|
|||
abraxxa | .Array works, can we please add it to the docs? | 13:32 | |
not that is_deeply is satified by it, put at least the printout is the same | 13:33 | ||
lizmat | abraxxa: could be, would need to benchmark that | ||
m: dd my @a = []; dd my @b = [],[] # abraxxa: single arg rule at play! | 13:34 | ||
camelia | rakudo-moar cc4635: OUTPUT«Array @a = []Array @b = [[], []]» | ||
abraxxa | because if yes all example code should only assign [] to @rray | ||
so what is a hash then, i guess {}? | 13:35 | ||
Skarsnik: if yes this makes no sense: github.com/perl6/DBIish/blob/maste...n.pl6#L179 | |||
nine | No, no, no. Even if benchmarks say that it's faster (which they won't), let's not optimize example code for the _current_ performance characteristics that may change as soon as someone plays half an hour with the optimizer. | ||
abraxxa | as it's an Array of key-value pairs | ||
nine: agreed, but assigning an Array to an Array makes more sense for newcomers then assigning a List to it | 13:36 | ||
just to not have some sort of type conversion going on in the simplest examples | |||
nine | Arrays _are_ Lists | ||
13:36
leont joined
|
|||
abraxxa | no, they are two different types with some identical apis | 13:36 | |
nine | my @a = 1, 2, 3; is a perfect idiom to learn | ||
lizmat | m: say Array.^mro | ||
camelia | rakudo-moar cc4635: OUTPUT«((Array) (List) (Cool) (Any) (Mu))» | ||
Skarsnik | m: say (1,2,3) eqv [1, 2, 3] | ||
camelia | rakudo-moar cc4635: OUTPUT«False» | ||
abraxxa | if they would be the same one would be useless | 13:37 | |
13:37
vv3 left
|
|||
nine | Arrays _are_ Lists. We are object oriented now and we do have inheritance (aka is-a relationships) | 13:37 | |
abraxxa | Skarsnik: exaclty | ||
^^ | |||
colomon | m: say Array ~~ List | ||
camelia | rakudo-moar cc4635: OUTPUT«True» | ||
colomon | m: say List ~~ Array | ||
camelia | rakudo-moar cc4635: OUTPUT«False» | ||
abraxxa | nine: how do you define _are_ | ||
colomon | what nine++ said | ||
13:37
vv3 joined,
vv3 left
|
|||
Skarsnik | hm, maybe the second test should work with @ref = [stuff ] instead of () | 13:37 | |
abraxxa | Lists are immuatble, Arrays aren't | 13:38 | |
lizmat | Array isa List # p5 think | ||
nine | m: say Array.isa(List | ||
camelia | rakudo-moar cc4635: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lHKG2l_Jp5Unable to parse expression in argument list; couldn't find final ')' at /tmp/lHKG2l_Jp5:1------> 3say Array.isa(List7⏏5<EOL>» | ||
nine | m: say Array.isa(List) | ||
camelia | rakudo-moar cc4635: OUTPUT«True» | ||
nine | abraxxa: that way ^^^ | ||
Skarsnik | err that mean eqv is buggy? | ||
nine just learned, that we still have .isa in Perl 6 | |||
abraxxa | Arrays are a subclass of List is correct | ||
13:38
vv3 joined,
vv3 left
|
|||
Skarsnik | m: say (1,2,3) eqv [1, 2, 3]; say [1, 2, 3] eqv (1,2,3); | 13:38 | |
camelia | rakudo-moar cc4635: OUTPUT«FalseFalse» | ||
Skarsnik | or not | ||
abraxxa | so is {} a Hash? | ||
nine | m: say {}.^name | 13:39 | |
camelia | rakudo-moar cc4635: OUTPUT«Hash» | ||
13:39
vv3 joined,
vv3 left
|
|||
leont | Hey *, how's christmas coming? :-) | 13:39 | |
13:39
lucasb joined
|
|||
Skarsnik | m: my %ref = (a => 2); say %ref.WHAT; | 13:40 | |
camelia | rakudo-moar cc4635: OUTPUT«(Hash)» | ||
13:40
vv3 joined
|
|||
nine | leont: fine I dare say :) jnthn++ cut down the Xmas RT list to 0 with help of a few others. I want to land just one more patch | 13:40 | |
leont | Awesome :-) | 13:41 | |
Skarsnik | nine, the issue, this dumb test fail (is-deeply) github.com/perl6/DBIish/blob/maste...n.pl6#L175 even if Test print the same string on expected/got | 13:42 | |
nine | abraxxa: note that I never said that Arrays are the _same_ as Lists. They are a special kind of List, but wherever code wants a List, you can give it an Array and it will work just fine | ||
lucasb | m: say (loop (my $i = 0; $i < 3; $i++) { 42 }) | 13:44 | |
camelia | rakudo-moar cc4635: OUTPUT«(timeout)» | ||
RabidGravy | :-\ | 13:45 | |
13:45
vv3 left
|
|||
lucasb | I'm happy that 'while' now return values, so I thought I would try that with 'loop' | 13:45 | |
Skarsnik | abraxxa, t/04-nativecall/02-simple-args.t ..... ok | ||
thomax | nsty bug it is | ||
13:46
vv3 joined,
vv3 left,
vv3 joined,
vv3 left
|
|||
lucasb | star: say (while $++ < 3 { 1+2 }) | 13:47 | |
camelia | star-m 2015.09: OUTPUT«sub infix:<<> (Mu $?, Mu $?) { #`(Sub+{<anon>}|42774000) ... }» | ||
lucasb | star: say (loop (my $i = 0; $i < 3; $i++) { 42 }) | ||
camelia | star-m 2015.09: OUTPUT«sub infix:<<> (Mu $?, Mu $?) { #`(Sub+{<anon>}|41680576) ... }» | ||
abraxxa | nine: in this test I want to be explicit as possible as it tests the API | ||
lucasb | ^^ just as a data point, before while and loop returned the same thing... the last operation executed maybe | ||
13:47
vv3 joined,
vv3 left
|
|||
abraxxa | Skarsnik: make test or running it directly? | 13:48 | |
Skarsnik | make test | ||
13:48
vv3 joined
|
|||
abraxxa | Skarsnik: same here, run it direclty please | 13:48 | |
Skarsnik | why it's so slow ~~ | 13:50 | |
nine | Skarsnik: it compiles a lot of native libs | 13:51 | |
thomax | m: say (loop (my $i = 0; $i < 3; $i++) { print $i; }) | ||
Skarsnik | Oh yeah, that's true | ||
camelia | rakudo-moar cc4635: OUTPUT«(timeout)0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…» | 13:52 | |
Begi | O_o | ||
13:53
vv3 left
|
|||
Skarsnik | Oh I see abraxxa | 13:53 | |
that's weird | |||
nine | Skarsnik: t/35-pg-common.t passes here? | ||
13:54
vv3 joined,
vv3 left,
hankache joined
13:55
vv3 joined,
vv3 left
|
|||
Skarsnik | hm, I don't have pg setup for test ~~ | 13:55 | |
13:55
vv3 joined,
vv3 left
13:56
vv3 joined
|
|||
nine | Skarsnik: I guess it doesn't mean much that they pass: Cannot locate native library 'liblibpq.so' | 13:56 | |
Skarsnik | I did not update DBIis for api version/new native trait because it will fail to work with 2 week old rakudo x) | 13:57 | |
loren | m: my @source = 1, 2, 3; my @display; @display.push: @source.clone(); my @temp = @source.clone(); @display.push: @temp; @source[1,2]=@source[2,1]; say @display; | 13:59 | |
camelia | rakudo-moar cc4635: OUTPUT«[[1 3 2] [1 2 3]]» | ||
14:00
skids joined
|
|||
loren | Hi, i have a question about above code result.. | 14:00 | |
Has anyone can have a look about it ? | 14:01 | ||
14:01
vv3 left
14:02
vv3 joined,
vv3 left
|
|||
Skarsnik | github.com/MoarVM/MoarVM/blob/mast...call.c#L48 this code is dumb lol but yes, it missing bool and size_t | 14:02 | |
geekosaur | looks right to me? | ||
loren | I want to use clone copy a Array, but when i use like this [email@hidden.address] @source.clone()', it's not working .. | 14:03 | |
14:03
vv3 joined,
vv3 left
|
|||
geekosaur | oh, missed that it's cloned twice | 14:03 | |
14:03
vv3 joined,
vv3 left
|
|||
loren | geekosaur, em the result a little strange .. | 14:04 | |
14:04
vv3 joined
14:05
xinming joined
|
|||
RabidGravy | append | 14:05 | |
14:05
llfourn left
|
|||
loren | I don't want to append | 14:05 | |
'@display' shound be an Array of Array | |||
RabidGravy | then maybe say what you expect? | ||
loren | m: my @source = 1, 2, 3; my @display; my @temp = @source.clone(); @display.push: @temp; @source[1,2]=@source[2,1]; say @display; | 14:06 | |
camelia | rakudo-moar cc4635: OUTPUT«[[1 2 3]]» | ||
loren | These code work fine | ||
but [email@hidden.address] @source.clone()' not | |||
abraxxa | Skarsnik: please look at my latest commits: github.com/abraxxa/DBIish/commits/master | 14:07 | |
Skarsnik | .tell FROGGS You forget to update the plan on t/04-nc/02.t to 13 and make the test succes on make test, when it fail for the 13th because size_t (and bool) are not listed on moar/src/core/nc.c | 14:08 | |
yoleaux | Skarsnik: I'll pass your message to FROGGS. | ||
14:08
xinming_ left,
skids left
|
|||
Skarsnik | abraxxa, ~~ will compare the type only probably | 14:09 | |
hankache | m: my @source = 1, 2, 3; my @display; @display.push: @source.clone(); say @display; | ||
camelia | rakudo-moar cc4635: OUTPUT«[[1 2 3]]» | ||
14:09
vv3 left
|
|||
hankache | loren ^^ | 14:09 | |
how is it not working? | |||
loren | ..I'm now mean that | 14:10 | |
m: my @source = 1, 2, 3; my @display; @display.push: @source.clone(); @source[1,2]=@source[2,1]; say @display; | |||
camelia | rakudo-moar cc4635: OUTPUT«[[1 3 2]]» | ||
14:10
vv3 joined,
vv3 left
|
|||
Skarsnik | abraxxa, for size_t, well... keep your constant but with another name (like FIXMELATER?) x) | 14:10 | |
loren | hankache, '@display' also change when i change '@source' | 14:11 | |
14:11
vv3 joined,
vv3 left
14:12
vv3 joined,
vv3 left,
vv3 joined
|
|||
hankache | loren ah! it seems like clone binds instead of assigning | 14:13 | |
loren | yeah, hankache | 14:14 | |
hankache | m: my $a = 1; my $b = $a.clone; $a = 3; say $b; | 14:15 | |
camelia | rakudo-moar cc4635: OUTPUT«1» | ||
hankache | weird | 14:16 | |
m: my @a = [1,2]; my @b = @a.clone; @a = [9,9]; say @b; | 14:17 | ||
camelia | rakudo-moar cc4635: OUTPUT«[1 2]» | ||
14:17
vv3 left
|
|||
loren | m: my @a = [1,2]; my @b = @a.clone; @a[1,2] = @[2,1]; say @b; | 14:17 | |
camelia | rakudo-moar cc4635: OUTPUT«[1 2]» | ||
abraxxa | Skarsnik: good idea | 14:18 | |
loren | m: my @a = [1,2]; my @b = @a.clone; @a[1,2] = @a[2,1]; say @b; | ||
camelia | rakudo-moar cc4635: OUTPUT«[1 2]» | ||
hankache | loren it doesn't seem like it is binding | ||
let's see your initial example | |||
loren | hankache, has problem when push it to an Array | 14:19 | |
m: my @a = [1,2]; my @b; @b.push: @a.clone; @a[0,1] = @a[1,0]; say @b; | 14:20 | ||
camelia | rakudo-moar cc4635: OUTPUT«[[2 1]]» | ||
Skarsnik | nine, can you change NC.pm:183 to return $*VM.platform-library-name($libname.IO, :version($apiversion ?? Version.new($apiversion) !! Version)).Str; It allow to write native('foo', 1) instead of forcing to v1 | ||
loren | m: my @a = [1,2]; my @b = @a.clone; @a[0,1] = @a[1,0]; say @b; | ||
camelia | rakudo-moar cc4635: OUTPUT«[1 2]» | ||
14:21
vv3 joined
|
|||
nine | Skarsnik: I'm not sure I want that. I figured, we should start out being very strict about the types we require. We can always relax the requirements later but we may never tighten them up. | 14:21 | |
Skarsnik | ok | 14:22 | |
m: say v1.WHAT | |||
camelia | rakudo-moar cc4635: OUTPUT«v1.WHAT» | ||
Skarsnik | m: say v1.0.WHAT | 14:23 | |
camelia | rakudo-moar cc4635: OUTPUT«v1.0.WHAT» | ||
Skarsnik | m: say (v1).WHAT | ||
camelia | rakudo-moar cc4635: OUTPUT«(Version)» | ||
Begi | m: say (v1).WHAT; | ||
camelia | rakudo-moar cc4635: OUTPUT«(Version)» | ||
hankache | m: my @a = [1,2]; my @b; @b.push: |@a; @a[0,1] = @a[1,0]; say @b; | ||
Skarsnik | say (v0).WHAT; | ||
camelia | rakudo-moar cc4635: OUTPUT«[1 2]» | ||
dalek | kudo/nom: 214debb | (Stefan Seifert)++ | t/04-nativecall/02-simple-args.t: Fix wrong test plan hiding a failing test 15:08 < Skarsnik> .tell FROGGS You forget to update the plan on t/04-nc/02.t to 13 and make the test succes on make test, when it fail for the 13th because size_t (and bool) are not listed on moar/src/core/nc.c |
14:24 | |
hankache | loren : my @a = [1,2]; my @b; @b.push: |@a; @a[0,1] = @a[1,0]; say @b; | ||
Skarsnik | say (v0).WHAT; | ||
err | |||
m: say (v0).WHAT; | |||
camelia | rakudo-moar cc4635: OUTPUT«(Version)» | ||
Skarsnik | it look weird x) | ||
Begi | m: say (v6).WHAT; | 14:25 | |
camelia | rakudo-moar cc4635: OUTPUT«(Version)» | ||
hankache | loren you are pushing @a into @b. @a is an array in other words: a container or a reference | ||
14:25
vv3 left
14:26
darutoko joined
|
|||
loren | hankache, I want an Array of Array | 14:26 | |
14:26
vv3 joined,
vv3 left
|
|||
nine | loren: try .append instead of .push | 14:27 | |
hankache | loren forget what i just said... i am lost :( | ||
14:27
vv3 joined,
vv3 left
|
|||
loren | hankache, it doesn't matter | 14:27 | |
hankache | Ladies and gents can someone help us please | 14:28 | |
m: my @a = [1,2]; my @b; @b.push: @a; @a[0,1] = @a[1,0]; say @b; | |||
camelia | rakudo-moar cc4635: OUTPUT«[[2 1]]» | ||
14:28
vv3 joined,
vv3 left
|
|||
leont | Just tried building a new rakudo, but it failed with a «Could not find symbol '&bool'» during tools/build/install-core-dist.pl | 14:28 | |
loren | nine, I don't want use append cause i need an Array of Array | ||
nine | leont: remove install/share/perl6 please | ||
hankache | why when we modify @a then @b also gets affected? | ||
RabidGravy | "unsigned long long int" - that's special | 14:29 | |
14:29
vv3 joined
|
|||
nine | hankache: [[2 1]] it's an array containing @a | 14:29 | |
Skarsnik | I have the same can't find Shell::Command on panda hm | ||
grondilu | hankache: see @a as a reference. | ||
nine | Skarsnik: is there any trace (try ack Shell::Command) of Shell::Command in your ~/.perl6 or install/share/perl6? | 14:30 | |
hankache | m: my $a = 1; my $b = $a; $a = 3; say $b; | 14:31 | |
camelia | rakudo-moar cc4635: OUTPUT«1» | ||
grondilu | m: my @a = [1,2]; my @b; @b.push: @a[]; @a[0,1] = @a[1,0]; say @b; | ||
camelia | rakudo-moar cc4635: OUTPUT«[[2 1]]» | ||
grondilu | hum | ||
that's unexpected | |||
loren | hankache, the code is not correct | ||
grondilu | m: my @a = [1,2]; my @b; @b.push: @@a; @a[0,1] = @a[1,0]; say @b; | ||
camelia | rakudo-moar 214deb: OUTPUT«[[2 1]]» | ||
loren | m: my @source = 1, 2, 3; my @display; @display.push: @source.clone(); @source[1,2]=@source[2,1]; say @display; | ||
camelia | rakudo-moar 214deb: OUTPUT«[[1 3 2]]» | ||
grondilu | m: my @a = [1,2]; my @b; @b.push: @a.clone; @a[0,1] = @a[1,0]; say @b; | ||
camelia | rakudo-moar 214deb: OUTPUT«[[2 1]]» | ||
loren | I mean like that | ||
grondilu | wth | ||
nine | m: my @a = [1,2]; my @b; @b.push: [|@a]; @a[0,1] = @a[1,0]; say @b; | 14:32 | |
camelia | rakudo-moar 214deb: OUTPUT«[[1 2]]» | ||
Skarsnik | not here | ||
loren | grondilu, yep , use clone | ||
lucasb | ok, can we all agree that array cloning is not cloning? :) | ||
grondilu | but clone did not work. | ||
14:32
xtreak left
|
|||
nine | My version does work :) | 14:32 | |
Skarsnik | Oh could it because I did not update rakudobrew? | ||
grondilu | m: my @a = [1,2]; my @b; @b.push: @a.List; @a[0,1] = @a[1,0]; say @b; | ||
camelia | rakudo-moar 214deb: OUTPUT«[(1 2)]» | ||
Skarsnik | I just rakudobrew nuke | ||
geekosaur | nine, I think the point here is that .clone works with a temp var but not directly in .push | 14:33 | |
loren | m: my @source = 1, 2, 3; my @display; my @t = @source.clone(); @display.push: @t; @source[1,2]=@source[2,1]; say @display; | ||
camelia | rakudo-moar 214deb: OUTPUT«[[1 2 3]]» | ||
grondilu | m: my @a = [1,2]; my @b; @b.push: @a[*]; @a[0,1] = @a[1,0]; say @b; | ||
camelia | rakudo-moar 214deb: OUTPUT«[(2 1)]» | ||
nine | I wish rakudobrew would not exist... | ||
loren | use temp variable is working fine | ||
hankache | so is &clone the culprit? | 14:34 | |
14:34
vv3 left
|
|||
loren | I don't know about detail.. | 14:34 | |
nine | loren: because clone is a very low level too that you just shouldn't use unless you know it's the right tool. | ||
14:35
vv3 joined,
vv3 left
|
|||
grondilu | m: my @a = 1; my @b = @a.clone; @a[0] = pi; say @b | 14:35 | |
camelia | rakudo-moar 214deb: OUTPUT«[1]» | ||
lucasb | m: my @a = 1,2; my @b := @a.clone; say @b; @a.push(42); say @b | ||
camelia | rakudo-moar 214deb: OUTPUT«[1 2][1 2 42]» | ||
14:35
vv3 joined,
vv3 left
|
|||
hankache | m: my @a = 1,2; my @b = @a.clone; say @b; @a.push(42); say @b | 14:36 | |
camelia | rakudo-moar 214deb: OUTPUT«[1 2][1 2]» | ||
loren | nine, so when i don't want a reference. what should i do ? | ||
dalek | blets: 11b52a7 | (Herbert Breunung)++ | docs/appendix- (3 files): + nav anchor |
||
blets: 6f40514 | (Herbert Breunung)++ | docs/appendix-b-grouped.txt: Merge branch 'master' of github.com:perl6/tablets |
|||
blets: 0d83447 | (Herbert Breunung)++ | docs/ (4 files): fixed added navigation in A and B |
|||
grondilu | m: my @a = [1,2]; my @b; @b.push: [@a]; @a[0,1] = @a[1,0]; say @b; | ||
camelia | rakudo-moar 214deb: OUTPUT«[[1 2]]» | ||
hankache | loren [|@arrayname] | ||
nine | loren: like I showed, the easiest way to copy an array seems to be [|@a] | ||
grondilu | | is not necessay here | ||
14:37
Ven joined
|
|||
nine | true, it's the single arg rule | 14:37 | |
grondilu | it is | ||
Ven | irclog.perlgeek.de/perl6/2015-12-23#i_11761990 TimToady , I'm not sure why the UNDO phasers are triggered there? | ||
nine | m: my @a = 1, 2, 3; say [@a]; | ||
camelia | rakudo-moar 214deb: OUTPUT«[1 2 3]» | ||
14:37
Begi left
|
|||
loren | If i want do like that, why i use append instead | 14:38 | |
grondilu | m: say grep 'append', Array.^methods | ||
camelia | rakudo-moar 214deb: OUTPUT«Method object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/tc2dBx9Lhq:1Method object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/tc2dBx9Lhq:1Method object coerced to string (p…» | ||
loren | why not .. | ||
14:39
vv3 joined
|
|||
Skarsnik | damn even with self-update shell:::cmd is not found | 14:39 | |
Ven | m: say grep 'append', Array.^methods.map(*.name) | ||
camelia | rakudo-moar 214deb: OUTPUT«(append append)» | ||
Ven | grondilu: ^^ | 14:40 | |
grondilu | what's this append method? I can't find it in S32. | 14:41 | |
RabidGravy | append is a "flattening" push | ||
Ven | append is like .push: Slip.new(...) | 14:42 | |
loren | m: my @a = 1, 2, 3; my @x; @x.push: @a; my @y ; @y.append: @a; say @x; say @y; | ||
camelia | rakudo-moar 214deb: OUTPUT«[[1 2 3]][1 2 3]» | ||
14:42
vv3 left
|
|||
grondilu | ok | 14:42 | |
loren | m: my @a = 1, 2, 3; my @x; @x.push: |@a; my @y ; @y.append: @a; say @x; say @y; | ||
camelia | rakudo-moar 214deb: OUTPUT«[1 2 3][1 2 3]» | ||
nine | Skarsnik: are there traces of Shell::Command anywhere in your .rakudobrew? | ||
Skarsnik | it just does not get installed | 14:43 | |
hankache | append @a is like push |@a | ||
Skarsnik | even running bootstrap.pl on panda did not work | ||
loren | Do i need report a bug about clone ? | ||
nine | If panda tells you that it successfully installed, then I believe it. The question is: where? | ||
14:43
vv3 joined,
vv3 left
|
|||
Skarsnik | with ack | 14:44 | |
1:unit module Shell::Command; | |||
/root/.rakudobrew/moar-nom/panda/ext/Shell__Command/lib/Shell/Command.pm | |||
only in this file | |||
nine | That's where it's installed from | ||
14:44
vv3 joined,
vv3 left
|
|||
Skarsnik | not in the install path | 14:44 | |
nine | Skarsnik: you do this as root? | ||
lucasb | this dude keeps entering and leaving the channel... he must be waiting for some release announcement | 14:45 | |
14:45
vv3 joined
|
|||
Skarsnik | Yes, I work on root on this dumb vm x) | 14:45 | |
dalek | kudo/nom: a860e8f | lizmat++ | src/core/Date (3 files): Streamline Date handling - new()/gist moved to Dateish - main new logic now in .new($y,$m,$d) which allows for coercion - .new($str) no longer parses, but just splits and catches any fallout - no special format for small/large years - ACCEPTS now checks day/mon/year instead of year/mon/day since day is most likely to differ - DAYS-IN-MONTH is now a private method - no longer use check-date, but directly use Range,in-range |
||
Skarsnik | anyways, I am off for a while x) | 14:46 | |
nine | loren: no, clone is fine as it is. It's just not the tool you need. | ||
lucasb | nine: sorry, but the clone behavior surprised me... idk if it's how it's supposed to work | 14:47 | |
loren | nine, but it has problem obviously | ||
hankache | well from the docs it seems clone is defined in mu | ||
nine | loren: no, it doesn't! Just because you think or wish it would do something different, doesn't make it so. clone gives you a shallow copy of the object with the possibility of overriding some attributes. If you don't override, you get exactly the same attributes. Like Array's $!storage. | 14:48 | |
loren: So you get a new Array object that shares it's storage with the old one. That's why you see this behavior which is totally fine. | 14:49 | ||
14:49
molaf joined
|
|||
loren | m: my @source = 1, 2, 3; my @display; @display.push: @source.clone(); @source[1,2]=@source[2,1]; say @display; | 14:49 | |
camelia | rakudo-moar 214deb: OUTPUT«[[1 3 2]]» | ||
loren | nine, how you can explain this ? | 14:50 | |
14:50
vv3 left,
raiph joined
|
|||
nine | loren: I just did. You're using a screwdriver for hammering in a nail and you're blaming the screwdriver for being a bad hammer. | 14:50 | |
14:51
vv3 joined,
vv3 left
|
|||
loren | I know what am i doing , nine | 14:52 | |
FROGGS_ | Skarsnik: I did not even add a test to github.com/rakudo/rakudo/commits/n...ple-args.t :o) | ||
14:52
vv3 joined,
vv3 left,
FROGGS_ is now known as FROGGS,
vv3 joined,
vv3 left
|
|||
nine | lucasb: design.perl6.org/S12.html#Construct...ialization | 14:53 | |
loren: design.perl6.org/S12.html#Construct...ialization | |||
14:53
vv3 joined
|
|||
hankache | nine: it is just that the word "clone" insinuates that you're (creating a copy) | 14:54 | |
14:55
cdg joined
|
|||
nine | hankache: and that's what it does. It creates a very shallow copy. So shallow, that even an Array's $!storage attribute is copied | 14:55 | |
hankache | nine: indeed | 14:57 | |
lucasb | nine: thanks for the link, I'll take a read at it later. | ||
RabidGravy | m: my @a = <1 2 3>; say @a.WHICH; @a.list>>.WHICH.say; my @b = @a.clone; say @b.WHICH; @b.list>>.WHICH.say | 14:58 | |
camelia | rakudo-moar a860e8: OUTPUT«Array|56649600[IntStr|1 IntStr|2 IntStr|3]Array|56649728[IntStr|1 IntStr|2 IntStr|3]» | ||
14:58
tipdbmp left,
vv3 left
|
|||
RabidGravy | different arrays same containers as elements | 14:58 | |
simple | |||
14:59
vv3 joined,
vv3 left
15:00
vv3 joined,
vv3 left,
llfourn joined
15:01
vv3 joined,
vv3 left
|
|||
loren | m: my @source = 1, 2, 3; my @display; @display.push: @source.clone(); .WHICH.say for @display; @source[1,2]=@source[2,1]; say @display;say @source.WHICH; say @display.WHICH; .WHICH.say for @display; | 15:01 | |
camelia | rakudo-moar a860e8: OUTPUT«Array|50465856[[1 3 2]]Array|50465984Array|50465920Array|50465856» | ||
15:01
vv3 joined
|
|||
hankache | see ya later #perl6 | 15:02 | |
15:04
hankache left
15:05
llfourn left
|
|||
loren | I agree with your opinion about *clone*'s mean, and i read Array document carefully before i use it. but you see above result, i change '@source' but '@display' also changed! | 15:06 | |
15:06
vv3 left
|
|||
geekosaur | please rename "clone" since apparently people are going to trust the name over what it actually does | 15:07 | |
and inisit | |||
*insist | |||
15:07
ZoffixW joined
|
|||
nine | m: my @a = 1, 2, 3; my @b := @a.clone; push @a: 4; say @b; | 15:07 | |
camelia | rakudo-moar a860e8: OUTPUT«[1 2 3 4]» | ||
15:07
vv3 joined,
vv3 left
|
|||
nine | RabidGravy: ^^^ I still think it's actually the sharing of the $!reified attribute that causes this | 15:08 | |
15:08
hankache joined
|
|||
hankache | back for a quick question | 15:08 | |
15:08
vv3 joined,
vv3 left
|
|||
ZoffixW | loren, right, but display contains one element: the shallow clone of @source | 15:09 | |
RabidGravy | nine, I think you're right | ||
ZoffixW | loren, and thus, by changing @source, you're changing it in @display too | ||
hankache | if i use module::xyz and this module has use MONKEY-SEE-NO-EVAL will i inherit it? | ||
RabidGravy | is it the repr that actually implements the clone | ||
15:09
davercc left
|
|||
nine | hankache: no, MONKEY-SEE-NO-EVAL is lexical | 15:09 | |
loren | ZoffixW, but Array address is not same. | ||
ZoffixW | loren, yes it is | ||
hankache | nine thank you :) | 15:10 | |
RabidGravy | hankache, also a very polite author would put "no MONKEY-SEE-NO-EVAL" when they're done with it ;-) | 15:11 | |
nine | m: use nqp; my @a = 1, 2, 3; say @a.WHICH; say nqp::getattr(@a, List, <$!reified>).WHICH; my @b := @a.clone; say @b.WHICH; say nqp::getattr(@b, List, <$!reified>).WHICH; | ||
camelia | rakudo-moar a860e8: OUTPUT«Array|49371680IterationBuffer|54820320Array|49371744IterationBuffer|54820320» | ||
nine | loren: ^^^ | ||
ZoffixW | loren, err, I mean the addresses of stuff contained in the array | ||
m: my @source = 1, 2, 3; my @display; @display.push: @source.clone(); @source[1,2]=@source[2,1]; .WHICH.say for @source; .WHICH.say for |@display[0]; | 15:12 | ||
camelia | rakudo-moar a860e8: OUTPUT«Int|1Int|3Int|2Int|1Int|3Int|2» | ||
loren | m: my @source = 1, 2, 3; my @display; my @t = @source.clone(); @display.push: @t; @source[1,2]=@source[2,1]; say @display; | ||
camelia | rakudo-moar a860e8: OUTPUT«[[1 2 3]]» | ||
15:12
jczeus left,
vv3 joined
|
|||
loren | ZoffixW, how about these ? | 15:12 | |
RabidGravy | I'm all for slapping a big "THIS IS NOT WHAT YOU ARE LOOKING FOR" in Array.clone | 15:13 | |
nine | Array doesn't even have its own .clone. It's Mu's which should already give you a hint that it's kinda low level. | ||
hankache | clone is defined in Mu | ||
nine++ | 15:14 | ||
RabidGravy | so it's never going to work properly for Array really | ||
hankache | loren you can define a multi clone for arrays | ||
RabidGravy | or rather "as people think it should work" | ||
15:14
vv3 left
15:15
vv3 joined,
vv3 left
|
|||
loren | nine, i got what your point .. | 15:15 | |
nine | loren: what's the problem with just using [@a]? | 15:16 | |
loren | nine, i got your point .. | ||
nine | m: my @a = 1,2,3; my @b; @b.push: [@a]; @a[0,1] = @a[1,0]; say @b; | ||
camelia | rakudo-moar a860e8: OUTPUT«[[1 2 3]]» | ||
nine | [@a] is even shorter than @a.clone | ||
hankache | RabidGravy except for politeness forgetting no MONKEY-SEE-NO-EVAL is harmless, yes? | ||
loren | Em, nine, it's a good way | 15:17 | |
15:17
vv3 joined,
vv3 left
|
|||
ZoffixW | I don't | 15:18 | |
15:18
vv3 joined
|
|||
ZoffixW | Nm | 15:18 | |
loren | Last i want say 'using Perl 6' not go well ... | 15:22 | |
-_- | |||
RabidGravy | hankache, yes | 15:23 | |
15:23
vv3 left,
khw joined
|
|||
ZoffixW | Well, no, I don't get it. I can repro that [@a] is not same as @a.clone | 15:23 | |
loren | Many trap for me .. | ||
ZoffixW | And here's what I don't get: | ||
m: my @one = 1, 2, 3; my @clone = @one.clone; my @two.push: @clone; say @one.WHICH; say @clone.WHICH; say @two[0].WHICH; @one[1,2] = @one[2,1]; say [ @one, @clone, @two[0] ] | |||
camelia | rakudo-moar a860e8: OUTPUT«Array|58993248Array|58993312Array|58993312[[1 3 2] [1 2 3] [1 2 3]]» | ||
ZoffixW | Here, changing the @one does not affect neither the clone nor the array with a clone | ||
15:23
vv3 joined,
vv3 left
|
|||
ZoffixW | m: my @one = 1, 2, 3; my @two.push: @one; @one[1,2] = @one[2,1]; @one.WHICH.say; @two[0].WHICH.say; [ @one, @two ].say | 15:24 | |
camelia | rakudo-moar a860e8: OUTPUT«Array|60278704Array|60278704[[1 3 2] [[1 3 2]]]» | ||
ZoffixW | err | ||
This one: | |||
m: my @one = 1, 2, 3; my @two.push: @one.clone; @one[1,2] = @one[2,1]; @one.WHICH.say; @two[0].WHICH.say; [ @one, @two ].say | |||
camelia | rakudo-moar a860e8: OUTPUT«Array|59631600Array|59631664[[1 3 2] [[1 3 2]]]» | ||
15:24
vv3 joined,
vv3 left
|
|||
ZoffixW | Here, changing @one does affect the cloned one and if I rewrite @one.clone as [@one] the effect dissappears. | 15:24 | |
Or is this what you were talking about the $!reified stuff? | 15:25 | ||
15:25
vv3 joined,
vv3 left
|
|||
loren | ZoffixW, that's what i confused | 15:26 | |
15:28
vv3 joined
|
|||
ZoffixW | I think I get it: :push uses the address, thus modifications can be be made, but the first example creates a new array, thus modifications don't propagate | 15:28 | |
m: my @one = 1, 2, 3; my @two.push: @(@one.clone); @one[1,2] = @one[2,1]; @one.WHICH.say; @two[0].WHICH.say; [ @one, @two ].say | |||
camelia | rakudo-moar a860e8: OUTPUT«Array|76265504Array|76265568[[1 3 2] [[1 3 2]]]» | ||
ZoffixW | m: my @one = 1, 2, 3; my @z = @one.clone; my @two.push: @z; @one[1,2] = @one[2,1]; @one.WHICH.say; @two[0].WHICH.say; [ @one, @two ].say | 15:29 | |
camelia | rakudo-moar a860e8: OUTPUT«Array|56014976Array|56015040[[1 3 2] [[1 2 3]]]» | ||
stmuk | lizmat++ # fixing dd | ||
ZoffixW | m: my @one = 1, 2, 3; my @two.append: @one.clone; @one[1,2] = @one[2,1]; @one.WHICH.say; @two[0].WHICH.say; [ @one, @two ].say | ||
camelia | rakudo-moar a860e8: OUTPUT«Array|63703072Int|1[[1 3 2] [1 2 3]]» | ||
ZoffixW | loren, so it's really the behaviour of .push at play, rather than that of .clone | 15:30 | |
15:30
vv3 left
|
|||
lucasb | after today's advent post, I'm considering taking a serious look at 007. masak++ :) | 15:35 | |
loren | ZoffixW, so .clone is correct, .push cause that problem | ||
ZoffixW | loren, I think the real cause of the problem is our lack of understanding of what .clone does and returns :P | 15:41 | |
m: my @one = 1, 2, 3; my $clone = @one.clone; my @two.push: $clone; @one[1,2] = @one[2,1]; @one.WHICH.say; @two[0].WHICH.say; [ @one, @two ].say | 15:42 | ||
camelia | rakudo-moar a860e8: OUTPUT«Array|68298992Array|68299056[[1 3 2] [[1 3 2]]]» | ||
loren | ZoffixW, please explain to me .. | 15:44 | |
Ven | m: my $a = [1, 2]; my @a = @$a; @a.push: 3; say $a; | 15:45 | |
camelia | rakudo-moar a860e8: OUTPUT«[1 2]» | ||
Ven | m: my $a = [1, 2]; my @a = $a; @a.push: 3; say $a; | ||
camelia | rakudo-moar a860e8: OUTPUT«[1 2]» | ||
15:48
skids joined
|
|||
_nadim | rindolf: same procedure, git pull ; t6 t/ please. I hope most is ironed out now | 15:51 | |
ZoffixW | loren, you want the blind to lead the deaf? Very well then... Clone returns a shallow copy, so if you use it in a $ or with a .push (that takes "a" thing), the you get the contents of the array too. But if you assign it into @ or use append, it gets a new storage thing and thus modification is not propagated | 15:53 | |
jnthn | afternoon, #perl6 | ||
yoleaux | 22 Dec 2015 20:33Z <TimToady> jnthn: I think the answer to #126005 is to transform any loop that wants its return value into a map, including KEEP/UNDO, but also loops in non-statementlist context, as the specs ask for; that should give us the correct semantics for KEEP/UNDO and should allow for sink optimization of maps to throw away values later, hopefully after checking return for success | ||
ZoffixW | loren, which is why it was stated above, .clone doesn't work properly on Arrays and is not doing what one might think it should be doing. | ||
FROGGS | o/ | ||
yoleaux | 14:08Z <Skarsnik> FROGGS: You forget to update the plan on t/04-nc/02.t to 13 and make the test succes on make test, when it fail for the 13th because size_t (and bool) are not listed on moar/src/core/nc.c | ||
jnthn | .tell TimToady See you fixed things up by now; I'd actually implemented Seq.from-loop while doing GLR prototyping | 15:54 | |
yoleaux | jnthn: I'll pass your message to TimToady. | ||
jnthn | .tell TimToady So we'd thunk the various bits of the condition. But, so long as we get the semantics right for now, can do it that way :) | 15:55 | |
yoleaux | jnthn: I'll pass your message to TimToady. | ||
15:55
rurban left
|
|||
jnthn is happy to see all the xmas RTs | 15:56 | ||
uh, all the xmas RTs are fixed \o/ | |||
FROGGS | damn, install_core_dist.pl infiniloops here | ||
ZoffixW | Wooohooo | ||
jnthn++ | |||
jnthn | Well, others++ took on the last couple | ||
jnthn nailed the third to last :) | 15:57 | ||
Then got sick. | |||
loren | ZoffixW, thanks for your explanation | ||
ZoffixW | :) | ||
m: my @a = 1, 2, 3; say [@a.head, @a.tail] | |||
camelia | rakudo-moar a860e8: OUTPUT«[(1) (3)]» | ||
ZoffixW | m: my @a = 1, 2, 3; my $head = @a.head; my $tail = @a.tail; say [$head, $tail] | ||
camelia | rakudo-moar a860e8: OUTPUT«[(1) (3)]» | ||
jnthn has one more change to sneak in :) | 15:58 | ||
uruwi | m: my @a = 1, 2, 3; say (@a.head, @a.tail).flat; | ||
camelia | rakudo-moar a860e8: OUTPUT«(1 3)» | ||
FROGGS | ahh, had to remove ~/.perl6/* | ||
loren | It's confusing me so much... | 15:59 | |
ZoffixW finally remembers what they were gumbling about a few weeks ago | |||
m: my @a = 1, 2, 3; say [ @a.first, @a.last ] | |||
camelia | rakudo-moar a860e8: OUTPUT«Method 'last' not found for invocant of class 'Array' in block <unit> at /tmp/fRMkqXSvNX:1» | ||
ZoffixW | m: my @a = 1, 2, 3; say [ @a.first, @a.tail ] | ||
camelia | rakudo-moar a860e8: OUTPUT«[1 (3)]» | ||
ZoffixW | Ah.. dreams | ||
loren, .clone is a low level thing that you shouldn't be touching :) There! Now the confusion is gone :) | 16:00 | ||
:P | |||
loren | So $ reference that Array, and a .push use $ | ||
RabidGravy | I think the takeaway from the last two hours is that DWIM is not DWIW, DWIM has it's limits, treat apparently advanced functionality conservatively | 16:01 | |
ZoffixW | ¯\_(ツ)_/¯ hence my blind leading the deaf comment :) | ||
16:01
llfourn joined
|
|||
ZoffixW | m: my @a = ^3; my $a = |^3; say [ @a, $a ] | 16:02 | |
camelia | rakudo-moar a860e8: OUTPUT«[[0 1 2] 0 1 2]» | ||
loren | ZoffixW, document not say what method can we use .... | ||
ZoffixW doesn't get what's going on here | |||
loren, do you know what "shallow clone" of the Array object is? | 16:03 | ||
dalek | kudo/nom: 29723e3 | FROGGS++ | lib/NativeCall.pm6: map bool/size_t in nativecall to right sized int This mean the don't have to change the NativeCall implementation in the backends, where bool is partially supported by dynall/libffi, and size_t is not. This makes the test pass in t/04-nativecall/02-simple-args.t and will hopefully aid DBDish::Oracle. |
||
ZoffixW | m: my @a = ^3; my $a = |^3; my $b = ^3; say [ @a.WHAT, $a.WHAT, $b.WHAT ] | ||
camelia | rakudo-moar a860e8: OUTPUT«[(Array) (Slip) (Range)]» | ||
ZoffixW | 0.o | ||
dalek | c: d8f36f3 | (Steve Mynott)++ | bin/p6doc-index: fix p6doc CLI index generation |
16:04 | |
c: ec2d529 | (Steve Mynott)++ | bin/p6doc: use EVALFILE not EVAL |
|||
FROGGS | .tell abraxxa please see github.com/rakudo/rakudo/commit/29723e31e7 | ||
yoleaux | FROGGS: I'll pass your message to abraxxa. | ||
loren | ZoffixW, i misunderstand it .. | ||
ZoffixW, sorry to everyone .. | |||
ZoffixW | m: my @one = 1, 2, 3; my $clone = @one.clone; say [ @one.WHAT, $clone.WHAT] | ||
camelia | rakudo-moar a860e8: OUTPUT«[(Array) (Array)]» | ||
RabidGravy rebuilds rakudo *again* (third time today,) | |||
rindolf | _nadim: thanks! Let me see. | ||
ZoffixW | m: my @one = 1, 2, 3; my $clone = @one.clone; say [ @one.WHICH, $clone.WHICH] | 16:05 | |
camelia | rakudo-moar a860e8: OUTPUT«[Array|70161760 Array|70161824]» | ||
RabidGravy | lorra, lorra modules to check in the next day or so | ||
dalek | osystem: fc09664 | thundergnat++ | META.list: Regularize my modules to META6.json format |
||
ZoffixW | "lorra"? | ||
m: my @a = ^3; my $a = [ ^3 ]; say [ @a, $a ] | 16:06 | ||
camelia | rakudo-moar a860e8: OUTPUT«[[0 1 2] [0 1 2]]» | ||
ZoffixW still doesn't get what a "container" is | 16:07 | ||
stmuk | its like a beer can and beer | ||
16:08
llfourn left
|
|||
jnthn | On latest, I get "Unknown type 'size_t' used for native call" | 16:08 | |
I thought I had latest of all the things... | |||
rindolf | _nadim: still fails here - www.shlomifish.org/Files/files/text...a-Dump.txt | ||
ZoffixW | @a = ^3; my $a = [ ^3 ]; say [ @a, $a ] | ||
FROGGS | jnthn: I just fixed it | 16:09 | |
RabidGravy | ZoffixW, I think it's google "Cilla Black lorra" | ||
jnthn | FROGGS: ok :) | ||
FROGGS | jnthn: like, six minutes ago :o) | ||
ZoffixW | m: my @a = ^3; my $a = [ ^3 ]; my @b = $a; say [ @a, $a, @b, @a.WHICH, $a.WHICH, @b.WHICH ] | ||
camelia | rakudo-moar a860e8: OUTPUT«[[0 1 2] [0 1 2] [[0 1 2]] Array|79373904 Array|79373968 Array|79374032]» | ||
RabidGravy | it's a, er, cultural thing | ||
ZoffixW | lol | ||
jnthn | FROGGS: Ah, OK. :) | ||
jnthn proceeds to spectest his change :) | |||
loren | $a is like a pointer, @a is a container ? | ||
moritz | @a is a compound type, $a is Scalar container | 16:10 | |
ZoffixW | So @a is not even a container at all? | ||
stmuk | are these "[DISLOCATED MESSAGE]" intended to remain user faceing or are they internal debugging messages? | ||
loren | What is a scalar container .... | ||
ZoffixW | loren, docs.perl6.org/language/containers | 16:11 | |
ZoffixW re-reads that too | |||
16:11
lustlife left
|
|||
lizmat | stmuk: they are bugs, afaik | 16:11 | |
loren | ZoffixW, thanks | 16:12 | |
16:12
lustlife joined
|
|||
moritz | loren: it's a thing to hold another thing :-) | 16:12 | |
lizmat | stmuk: as in: they shouldn't happen | ||
loren | moritz, -_-.. | ||
moritz, let me read document .. | 16:13 | ||
Usually called a container, it's also be a pointer .. | 16:14 | ||
FROGGS | loren: a pointer is just one way to do it | 16:16 | |
16:18
cdg left
|
|||
lucasb | m: say (while $++ < 3 { 42 }) | 16:18 | |
camelia | rakudo-moar 29723e: OUTPUT«(42 42 42)» | ||
loren | FROGGS, em, so it does. | ||
lucasb | m: say (repeat while $++ < 3 { 42 }) | ||
camelia | rakudo-moar 29723e: OUTPUT«3» | ||
lucasb | m: say (repeat while $++ < 3 { 1+2 }) | 16:19 | |
camelia | rakudo-moar 29723e: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|67987232>}|50361816) ... }» | ||
ZoffixW | 0.o | 16:20 | |
dalek | kudo/nom: d995c87 | coke++ | tools/build/gen-version.pl: Update language version in prep for Christmas. |
||
stmuk | wooo | 16:21 | |
16:21
vv3 joined
16:22
virtualsue joined
|
|||
RabidGravy | grooviness | 16:22 | |
16:23
vv3 left
|
|||
abraxxa | FROGGS: re | 16:23 | |
yoleaux | 16:04Z <FROGGS> abraxxa: please see github.com/rakudo/rakudo/commit/29723e31e7 | ||
lucasb | m: say ({ 42 } while $++ < 3) | 16:25 | |
camelia | rakudo-moar 29723e: OUTPUT«===SORRY!===Cannot find method 'CURSOR'» | ||
timotimo | m: my &metaassign = -> Mu \a, Mu \b { &[+]( (if a.DEFINITE { a } else { &[+]() }), b ) }; my $i = 0; metaassign($i, 1); say $i | 16:26 | |
camelia | rakudo-moar 29723e: OUTPUT«0» | ||
timotimo | m: my &metaassign = -> Mu \a, Mu \b { a = &[+]((if a.DEFINITE { a } else { &[+]() }), b ) }; my $i = 0; metaassign($i, 1); say $i | ||
camelia | rakudo-moar 29723e: OUTPUT«1» | ||
timotimo | m: my &metaassign = -> Mu \a, Mu \b { a = &[+]((a.DEFINITE ?? a !! &[+]() ), b ) }; my $i = 0; metaassign($i, 1); say $i | ||
camelia | rakudo-moar 29723e: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/YXMmas40fS:1» | ||
FROGGS | lucasb: nice one | ||
lucasb | FROGGS: :) | ||
timotimo | ^- jnthn can i have a helping hand with this? i have no clue why it breaks :( | ||
abraxxa | why does rakudobrew build panda now by default? | 16:28 | |
16:28
nanis joined
16:29
mohae left
|
|||
andreoss | m: say(while $++ < 3 { LAST { $-- } }) | 16:29 | |
camelia | rakudo-moar 29723e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YaLg3u3xLHUnable to parse expression in argument list; couldn't find final ')' at /tmp/YaLg3u3xLH:1------> 3say(while 7⏏5$++ < 3 { LAST { $-- } })» | ||
andreoss | m: say(do while $++ < 3 { LAST { $-- } }) | ||
camelia | rakudo-moar 29723e: OUTPUT«(Nil Nil Nil)» | ||
16:29
RabidGravy left
16:30
loren left
|
|||
jnthn | timotimo: Did you manage to golf it down any? | 16:30 | |
nanis | Just built 2015.11-750-ga860e8f with MS VS2015. When running `nmake test`, one test fails: | 16:31 | |
t\04-nativecall\02-simple-args.t with "Unknown type 'size_t' used for native call in method setup at D:\Src\rakudo\lib\NativeCall.pm6:223 in method CALL-ME at D:\Src\rakudo\lib\NativeCall.pm6:234 in block <unit> at t\04-nativecall\02-simple-args.t:66 | |||
hoelzro | o/ #perl6 | ||
nanis | Where are the known types deduced? | ||
abraxxa | nanis: does your build include github.com/rakudo/rakudo/commit/29...025e90d759 ? | 16:32 | |
nanis | abraxxa I'll check, but FYI perl6::build-date=2015-12-23T16:05:07Z and I did a fresh clone, and nuked the install directory before building. | 16:33 | |
abraxxa | nanis: i'm just building nom because of that, you can wait for my tests if you want\ | ||
timotimo | jnthn: that was already a single golf step ... maybe i can make it even better | ||
m: my $i = 0; $i = &[+](($i.DEFINITE ?? $i !! &[+]() ), 1 ) }; | 16:34 | ||
camelia | rakudo-moar d995c8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/K1lpf8L_zIUnexpected closing bracketat /tmp/K1lpf8L_zI:1------> 3[+](($i.DEFINITE ?? $i !! &[+]() ), 1 ) 7⏏5};» | ||
timotimo | m: my $i = 0; $i = &[+](($i.DEFINITE ?? $i !! &[+]() ), 1 ); | ||
camelia | ( no output ) | ||
timotimo | m: my $i = 0; my \a := $i; a = &[+]((a.DEFINITE ?? a !! &[+]() ), 1 ); | ||
camelia | rakudo-moar d995c8: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/fa4EHYYBqk:1» | ||
timotimo | m: my $i = 0; my \a := $i; a = 2; | ||
camelia | ( no output ) | ||
nanis | abbraxxa: Good call. I missed that commit by a few mintues. I just wanted to see if things would build with VS 2015, and they did. | ||
timotimo | m: my $i = 0; my \a := $i; a = a + 1; | ||
camelia | ( no output ) | ||
timotimo | m: my $i = 0; my \a := $i; a = (True ?? a !! 2) + 1; | 16:35 | |
camelia | ( no output ) | ||
abraxxa | FROGGS: i've built nom twice and every time on perl6 -V I get Unhandled exception: Missing or wrong version of dependency 'gen/moar/stage2/QRegex.nqp' (from 'src/Perl6/Pod.nqp') | ||
timotimo | m: my $i = 0; my \a := $i; a = (a.DEFINITE ?? a !! 2) + 1; | ||
camelia | rakudo-moar d995c8: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/Bo5OlxBTiW:1» | ||
stmuk | abraxxa: it doesn't but it reinstalls modules previousily installed | ||
timotimo | jnthn: is that weird enough for you? :D | ||
abraxxa | stmuk: ah, great! | ||
timotimo | m: my $i = 0; my \a := $i; a = 2 + 1; | ||
camelia | ( no output ) | ||
timotimo | m: my $i = 0; my \a := $i; say a.DEFINITE; | ||
camelia | rakudo-moar d995c8: OUTPUT«True» | ||
abraxxa | i nuked it on the second attemplt but still this error | ||
timotimo | m: my $i = 0; my \a := $i; say a.DEFINITE; a = 5; | ||
camelia | rakudo-moar d995c8: OUTPUT«TrueCannot modify an immutable Int in block <unit> at /tmp/mhZiivNy9a:1» | ||
timotimo | m: my $i = 0; my \a := $i; a = 5; | ||
camelia | ( no output ) | ||
timotimo | okay, that's really a little bit weird. | ||
just calling .DEFINITE on it makes it unassignable? | 16:36 | ||
hm. perhaps i see the error | |||
nanis | Thanks everyone, and good luck. Looking forward to Christmas. Bye. | ||
16:36
nanis left
|
|||
abraxxa | maybe because I run rakudobrew in a nom checkout? | 16:37 | |
timotimo | um... am i seeing this right? | 16:38 | |
abraxxa | yes, that was the problem | ||
timotimo | no, i wasn't | ||
jnthn | timotimo: Yes, that's odd | ||
m: my $i = 0; my \a := $i; a = a + 1; | 16:39 | ||
camelia | ( no output ) | ||
jnthn | m: my $i = 0; my \a := $i; a = (a.DEFINITE ?? a !! a) + 1; | ||
camelia | rakudo-moar d995c8: OUTPUT«Cannot modify an immutable Int in block <unit> at /tmp/gHAFTGeyl9:1» | ||
abraxxa | FROGGS: same error | ||
jnthn | m: my $i = 0; my \a := $i; a = (a ?? a !! a) + 1; | ||
camelia | ( no output ) | ||
16:39
dakkar left
|
|||
timotimo | jnthn: i expect it's because the p6definite code deconts over the register that the result is in | 16:39 | |
16:39
kanishka left
|
|||
jnthn | timotimo: Yes, that's what I'm suspecting | 16:39 | |
That's naughty. | |||
And wants fixing | 16:40 | ||
dalek | kudo/nom: bcf63ef | jnthn++ | src/core/Promise.pm: Promise.[anyof|allof] no longer break. They now only care about promises completing *somehow* rather than about the nature of that completion. For `anyof` you'll be doing some follow-up work to get a result anyway, and when you care about getting all of a set of results, you just use `await` with a list of promises. This makes anyof/allof a little easier to work with for their common uses, which is waiting until one/all of a set of things have taken place, when you'll then go on to be interested in them individually. |
||
timotimo | it is, eh? but why does that influence what a is after the fact? | ||
jnthn | timotimo: 'cus a is lowered to a local | ||
timotimo | oh, damn. | ||
jnthn | I'll have a look at it now | ||
timotimo | that'd be it, then. | ||
oh, you will? | |||
neat :) | |||
hankache | what's up everybody | 16:41 | |
timotimo | i'll rewrite the piece of the optimizer that triggers on METAOP_ASSIGN and the METAOP_ASSIGN implementation to be ready when you are done :) | ||
TimToady is up | |||
yoleaux | 15:54Z <jnthn> TimToady: See you fixed things up by now; I'd actually implemented Seq.from-loop while doing GLR prototyping | ||
15:55Z <jnthn> TimToady: So we'd thunk the various bits of the condition. But, so long as we get the semantics right for now, can do it that way :) | |||
timotimo | welcome back, TimToady | ||
16:41
RabidGravy joined
|
|||
RabidGravy | ooh | 16:41 | |
timotimo | hey gravy | 16:42 | |
RabidGravy | Rarr! | ||
FROGGS | abraxxa: what error exactly? | ||
abraxxa: ahh, so you're still not able to build rakudo? | 16:43 | ||
dalek | ast: d1fe0c9 | jnthn++ | S17-promise/a (2 files): Chase anyof/allof semantic changes. |
||
abraxxa | FROGGS: sorry, my fault, hadn't commented out my size_t constant definition | 16:44 | |
16:44
mohae joined
|
|||
abraxxa | as a type check become more strict? I'm getting a failure which I hadn't before | 16:45 | |
Type check failed in assignment to $col_namep; expected NativeCall::Types::CArray[NativeCall::Types::CArray[int8]] but got NativeCall::Types::CArray[NativeCall::Types::CArray[int8]].new | |||
in block at /home/ahartmai/perl6/git/DBIish/lib/DBDish/Oracle/StatementHandle.pm6:494 | |||
the line in question is: my CArray[CArray[int8]] $col_namep .= new; | |||
timotimo | abraxxa: maybe it's not able to .new a nested CArray properly? | 16:47 | |
jnthn | timotimo: Building a patch now. | ||
RabidGravy | tthis may be a bug abraxxa | ||
abraxxa | timotimo: worked with 2015.11 | ||
timotimo | huh. | ||
lucasb | TimToady: when you have time, can you look at the 'while', 'repeat while' and 'loop' list comprehensions in the backlog? thanks | 16:48 | |
16:49
mohae left
|
|||
jnthn | timotimo: Yeah, it was that decont screwup | 16:49 | |
flussence | mornin', #perl6 | 16:50 | |
jnthn | FROGGS: Confirm 02-simple-args.t fixed on latest \o/ | ||
ZoffixW | \o | ||
FROGGS | \o/ | ||
jnthn | timotimo: Can you add a regression test of the cut-down example once I push the patch? | ||
FROGGS | hi ZoffixW | ||
timotimo | jnthn: i feel silly now that it only took like a minute to pinpoint the problem after i started bothering you; i could totally have done that on my own | ||
16:50
mohae joined
|
|||
timotimo | surely can! are regression tests without a RT number okay, though? :P | 16:50 | |
jnthn | Sure :) | 16:51 | |
dalek | kudo/nom: 86c1009 | jnthn++ | src/vm/moar/Perl6/Ops.nqp: Fix p6definite code-gen bug found by timotimo++. |
||
FROGGS | lucasb: can you rakudobug the one-liner you posted? | ||
jnthn | Didn't spectest that...lol yolo | ||
(passes make test though) | |||
FROGGS | hehe | ||
timotimo | does make test even have DEFINITE in it? :) | 16:52 | |
jnthn | Will see if I can fix something else to get two patches for my spectest time :) | ||
I'm not definite it does... | |||
I checked it fixed your thing though :) | |||
lucasb | FROGGS: I'm shy to write emails to rakudobug :) But TimToady will see the backlog later... | 16:53 | |
nine | jnthn: easy! Fix run_alt and become the hero of a generation! Oh wait...you already are | ||
16:53
mohae left
|
|||
FROGGS | lucasb: just write your one-liner and the output to [email@hidden.address] you dont have to add anything to that message :o) | 16:54 | |
TimToady will certainly see the backlog, but must reserve time today to write advent post, so no promises on fixing | |||
FROGGS | TimToady: I've got a patch already I think | ||
16:54
Ven left
|
|||
TimToady | ooh, and I don't even know what the bug is yet :) | 16:54 | |
FROGGS | m: say ({ 42 } while $++ < 3) | 16:55 | |
camelia | rakudo-moar bcf63e: OUTPUT«===SORRY!===Cannot find method 'CURSOR'» | ||
FROGGS | just a one-line patch also | ||
TimToady | heh, ok | ||
lucasb | m: say (while $++ < 3 { FIRST { 42 } }) | ||
camelia | rakudo-moar bcf63e: OUTPUT«===SORRY!===Cannot find method 'CURSOR'» | ||
lucasb | idk how these list comprehensions are supposed to deal with loop phasers... | 16:56 | |
idk FIRST, LAST, etc. is called a loop phasers, however :) | 16:57 | ||
TimToady | well, it's still in a loop, just a different kind of loop (for now) | ||
16:57
ZoffixW left
|
|||
jnthn | nine: What's the easiest known reproduction of alt_nfa? | 16:58 | |
TimToady | we might have an extra level of {} snuck in there to mess up things like FIRST | ||
dalek | ast: 795db8d | timotimo++ | S12-introspection/definite.t: regression test for DEFINITE code gen bug where a decont was accidentally clobbering the local register that contained a variable that we wanted to write to later. |
||
16:59
Deepak_ joined
|
|||
nine | jnthn: mid November. But it can easily be much older than that. The bisect stopped at a totally unrelated commit | 17:00 | |
uruwi | Anyone know why this is segfaulting? pastebin.com/THzTTAFP | ||
If you ask, then I'm willing to give read access to the full repository. | |||
(line 58 in the paste) | 17:01 | ||
17:02
mohae joined
|
|||
nine | jnthn the information I've gathered so far points at a precomp related corruption of an NQP meta model cache | 17:02 | |
jnthn | nine: Yeah, sounds like... | 17:04 | |
Or sounds like a reasonable hypothesis. I've no idea how it could be happening. | |||
Is there a reliable way I can reproduce it? | 17:05 | ||
dalek | ast: 60d1ad6 | timotimo++ | S03-operators/assign.t: test that += on a Failure dies |
17:06 | |
kudo/nom: 587a801 | timotimo++ | src/ (2 files): Optimize METAOP_ASSIGN again |
17:07 | ||
17:07
tipdbmp joined
|
|||
uruwi | Anyone know why this is segfaulting? pastebin.com/THzTTAFP | 17:08 | |
jnthn | uruwi: Not from just looking at the code, now... | ||
*no | |||
17:09
Begi joined
|
|||
uruwi | Do you want to try running it yourself? | 17:09 | |
(the full program I mean, not just that file) | |||
jnthn | Given it has a mass of dependencies, not especially... | ||
RabidGravy | uruwi, or just make the smallest possible example that still segfaults | 17:10 | |
jnthn | If you can run it under one of perl6-gdb or perl6-valgrind it may produce something I can make a good guess from. | ||
uruwi | perl6-gdb-m output pastebin.com/bKeRexiF | 17:11 | |
The error message refers to some file or directory not exiting | 17:12 | ||
lucasb | is the locale set to japanese? | ||
uruwi | * existing | ||
17:12
mohae left
|
|||
uruwi | Yes | 17:12 | |
Skarsnik | Let's see if panda work now ~~ | ||
jnthn | uruwi: can you type "bt" and press enter and see if it produces any more output? | ||
lichtkind | is 25 dez still standing as date? | 17:13 | |
uruwi | pastebin.com/DGgU4G92 | ||
timotimo | jnthn: probably b0rked output thanks to the jit :) | ||
oh, look, it's the mutex destruction bug | |||
didn't we put in a workaround for that, though? | |||
jnthn | Yeah, it's the free of a held mutex one :( | 17:15 | |
Not sure if we did nor not | |||
*or | |||
uruwi | Link to somewhere mentioning it? | 17:16 | |
17:16
mohae joined
17:17
Deepak_ left,
espadrine left
|
|||
jnthn | nine: I tried the catdir thing in rt.perl.org/Ticket/Display.html?id=126832 and couldn't reproduce the run_alt thing | 17:19 | |
abraxxa | RabidGravy, timotimo: can someone confirm that this is a bug? | ||
jnthn | uruwi: It's been discussed a bit on #moarvm | ||
17:21
muraiki joined
|
|||
Skarsnik | panda still can't find shell::comand, it does not get installled >< | 17:21 | |
17:21
andreoss left
|
|||
RabidGravy | abraxxa, it's a regression related to precomp can't reproduce without putting code in a module, don't know if it's RTd | 17:21 | |
abraxxa | RabidGravy: should I open an RT for it? | 17:22 | |
timotimo | abraxxa: sorry, what now? | ||
oh, the CArray[CArray[...]] thing? | |||
abraxxa | timotimo: yes | ||
i don't find a test for that | |||
timotimo | seems buggy, yeah. are you interested in bisecting rakudo to figure out where it started happening? | ||
abraxxa | is it even NativeCall specific of all nested Types? | 17:23 | |
17:23
mohae left
|
|||
abraxxa | m: my Array[Array[Str]] $foo .= new; | 17:23 | |
camelia | ( no output ) | ||
abraxxa | m: use NativeCall; my CArray[CArray[int8]] $foo .= new; | ||
camelia | ( no output ) | ||
RabidGravy | timotimo, abraxxa 's example overcomplicates it, in a precomped module a typeconstraint with a typed CArray fails | 17:24 | |
it didn't used to | |||
Skarsnik | duh | ||
timotimo | "in a precompiled module" ;_; | ||
RabidGravy | i.e | 17:25 | |
abraxxa | add precompilation so close to the release isn't a wise decision imho as it's not changing the API but an optimization only that can be added later | ||
timotimo | it changed a lot of api, actually | 17:26 | |
RabidGravy | m: use NativeCall; sub foo() returns CArray[iuint8] { return CArray[uint8].new }; say foo() | ||
jnthn | Indeed. | ||
camelia | rakudo-moar 587a80: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1r8O6do6NbAn exception occurred while parameterizing CArrayat /tmp/1r8O6do6Nb:1Exception details: 5===SORRY!5=== Error while compiling  Cannot invoke this object at :» | ||
timotimo | well, it was part of the whole curli refactor which changed a lot of api | ||
Skarsnik | gah now shell::command is installed but not precompiled and panda still does not find it >< | ||
perlpilot | abraxxa: +1 (and all of the .precomp dirs littered everywhere) | ||
RabidGravy | m: use NativeCall; sub foo() returns CArray[uint8] { return CArray[uint8].new }; say foo() | ||
camelia | rakudo-moar 587a80: OUTPUT«NativeCall::Types::CArray[uint8].new» | ||
timotimo | in theory, we could release a rakudo completely without precompilation | ||
abraxxa | timotimo: even worse! | ||
17:27
boegel|quassel is now known as boegel,
boegel left
|
|||
RabidGravy | that fails if it's in a module that has been precompiled | 17:27 | |
17:27
boegel joined
|
|||
abraxxa | did 2015.11 have precomp? I've never seen the .precomp dirs before | 17:27 | |
jnthn | Precomp has been around for ages | 17:28 | |
abraxxa | i've removed the .= new; as a workaround | ||
jnthn | But was handled at install time | ||
By Panda | |||
abraxxa | i see | ||
jnthn | More recently it's been moved in Rakudo and made a bunch more robust | ||
abraxxa | that will root installed, non precompiled code fail | ||
17:29
raiph left
|
|||
abraxxa | WTF | 17:29 | |
Type check failed in assignment to $col_namep; expected NativeCall::Types::CArray[NativeCall::Types::CArray[int8]] but got Array | |||
Skarsnik | it's normal that install/share/perl6/site/lib/ is not in where panda search module? | ||
jnthn | Yes, of course it would have been nice if we'd had precomp stuff in Rakudo landed earlier. | ||
Skarsnik | You need the .= new sadly | ||
RabidGravy | yeah, it was at least 14 days ago github.com/jonathanstowe/Audio-Enc...a8d928d034 | 17:30 | |
jnthn | But that's not really how things work. | ||
17:30
mohae joined
|
|||
timotimo | dinner time \o/ | 17:30 | |
jnthn | We make the best effort we can with the limited resource we have. | ||
abraxxa | it's the only point where I need a pointer to a pointer | 17:31 | |
RabidGravy | exactly | ||
[Coke] sees catdir in backscroll and reads catbug | |||
dalek | kudo/nom: 82e6ca2 | jnthn++ | src/Perl6/Grammar.nqp: Fix errors on unknown symbols in constants, enums. Rids us of a copule of cases of "Cannot invoke this object". |
||
flussence | .oO( nobody from outside showed up for the beta release, so we're tricking them into beta-testing now :) |
||
RabidGravy | well even if more people here had made more effort to keep up | 17:32 | |
dalek | ast: a4ace08 | jnthn++ | S32-exceptions/misc.t: Tests for RT #126987. |
||
Skarsnik | who/what could I blame? I did rakudobrew nuke && rakudobrew build moar. panda does not work. I even rerun the bootstreap.pl | ||
17:35
mohae left
|
|||
moritz sighs. Not again, this close before the release | 17:37 | ||
dalek | osystem: 859d327 | PerlJam++ | META.list: Add Test::Class |
17:38 | |
Skarsnik | let's try on e anew user | ||
17:39
mohae joined
|
|||
leedo | fails here as well, with a lot of EVAL is dangerous errors | 17:42 | |
that is running an existing panda install, and bootstrapping | |||
17:42
mohae left
|
|||
jnthn | Haven't done a Panda bootstrap in quite a while in this laptop. Seems to have completed fine on Rakudo HEAD. | 17:43 | |
Skarsnik just wanted to patch some modules and write some user code today | |||
leedo | i'll try nuking install, and redoing it | ||
jnthn runs panda install HTTP::UserAgent to see if he can make the run_alt thing appear that way | 17:45 | ||
RabidGravy | jnthn, that was "fixed" | ||
jnthn | RabidGravy: "fixed" as in "magically vanished"? :) | 17:46 | |
Skarsnik | no precompil | ||
in the code x) | |||
RabidGravy | no precompilation | ||
jnthn | oh | ||
leedo | nuking install seems to let panda install here :) | ||
dalek | p: c353663 | (Zoffix Znet)++ | README.pod: Fix 404 URLs |
||
p: a1339e2 | lizmat++ | README.pod: Merge pull request #264 from zoffixznet/fix-url Fix 404 URLs in README.pod |
|||
jnthn | But it reliably produced the error without "no precompilation"? | ||
Skarsnik | Not cool to have essential module broken x) | 17:47 | |
RabidGravy | but if you were to remove them and run the t/030-cookies.t they would reappear | 17:48 | |
jnthn | OK | ||
RabidGravy | yes | ||
jnthn | Getting headachey again, so probably time to take a break for now | ||
Skarsnik | Oh I found what is wrong | 17:49 | |
RabidGravy | there is an RT with a very small replication I think | ||
nine | jnthn: sorry, was on my way home | 17:50 | |
jnthn: run_alt has become more difficult to reproduce in the past week | |||
17:51
mohae joined
|
|||
jnthn | RabidGravy: Yes, I tried the small replication and couldn't replicate it.. | 17:51 | |
RabidGravy: Thus why I'm onto the larger one now | |||
Skarsnik | rakudobrew nuke did not nuke panda repository so panda did not fetch/build/install modules like Shell::Commad did not get properly reinstalled | ||
RabidGravy | hmm | ||
jnthn | Alas, 03-cookies.t passed | ||
RabidGravy | strange | 17:52 | |
nine | jnthn: yes, my checkout from Dec 13 also passes :/ | ||
Skarsnik | so shell::comand did not get precompiled and the precompiled file install | ||
jnthn | nine: Aww | ||
Skarsnik | ah yes and I can't install XML ~~ | ||
who can merge PR in XML? | |||
jnthn | OK, time for a break. bbl | ||
RabidGravy | :) | ||
nine | Skarsnik: at this point I consider rakudobrew to be actively harmful :/ | 17:53 | |
17:54
rurban joined
|
|||
flussence has always built rakudo "by hand" with a shell script that nukes everything using a «find -exec git-clean», and missed out on all this fun people seem to have with rakudobrew :( | 17:54 | ||
Skarsnik want to fork XML in perl6 | |||
lucasb | for the record, I too brew my own rakudo :) | 17:55 | |
17:57
mohae left
|
|||
lucasb | my adhoc shell script has 'rm -rf ~/.perl6' in it, and it dies if it finds PERL6LIB set in the environment | 17:57 | |
^^ these things have made the thing sane for me | |||
muraiki | I've always used rakudobrew :( | 17:58 | |
stmuk | I've found rakudobrew nuke and rm -rf ~/.perl6 fine | 18:01 | |
Skarsnik | There is no way to put a p5 module in the depends in the Meta file? | ||
flussence | nope | 18:02 | |
nine | Skarsnik: not yet anyway | ||
Skarsnik | I think it's something needed to at least have panda warn that something additionnal is needed ~~ | ||
nine | Skarsnik: we can do better than that :) | 18:03 | |
abraxxa | i'm annoyed by the breakage every time I touch rakudo especially this close to its first release, maybe I'm coming back in half a year or so | ||
Skarsnik | especially for DBIish that has not obvious library name | ||
you search for a libmysql, not libmysqlclient. libpostgressql? not libpq xD | 18:04 | ||
18:04
jevin joined
|
|||
Skarsnik | s/not/nop/ | 18:04 | |
18:05
mohae joined
|
|||
Skarsnik | nine, depend what you can more? if you mean for p5 calling cpan.... I personnaly don't want that. I want the debian package (or build the package with dh_make) installed | 18:06 | |
*mean | |||
dalek | p: 23538e5 | (Zoffix Znet)++ | docs/ops.markdown: Add Table of Contents for easier navigation |
18:08 | |
p: 9d05ece | lizmat++ | docs/ops.markdown: Merge pull request #265 from zoffixznet/ops-toc Add Table of Contents to docs/ops for easier navigation |
|||
nine | Skarsnik: like I told AlexDaniel today: what you want is not nearly as important as what you're gonna do about it ;) | ||
Skarsnik | And now I need to edit all the NC doc because of you x) | 18:11 | |
nebuchadnezzar | I read the 5to6-nutshell and I was surprise by the module import, I had the perl5 habit to always list what I'm using and with perl6 I can do it only if the module writer planned to put some tags | 18:13 | |
it empoyer module writers and not module users :-/ | |||
lucasb | nqp/ops.markdown already had a little ToC. now it has 2. maybe the earlier can be removed now? | ||
*the earlier one | 18:14 | ||
18:14
mohae left
|
|||
_nadim | So i found time between two Christmas dishes preparation to update Rakudo (600+ commits), it broke a thing or two that were surprising but what I liked most is the speed boost. I haven't checked but Imaybe two or three times faster. Maybe precomp has something to do with it. Great work all of you, so far I am enjoying it more than it frustrates me. | 18:15 | |
18:15
smls joined
|
|||
timotimo | _nadim: it's probably a stupid performance regression i introduced in the JIT compiler that was completely killing the multi-dispatch cache | 18:16 | |
it was recently fixed, so maybe that's the difference you saw | |||
18:16
mohae joined,
aindilis` left
18:17
dwarring joined
|
|||
Juerd | Feedback wanted on gist.github.com/Juerd/ae574b87d40a66649692 an idea for an "unpack" replacement. | 18:17 | |
18:17
ZoffixW joined
|
|||
ZoffixW | lucasb, I think it's fine to keep the old one in. I kinda see it more as a list of categories (that are also links) than necessarily a TOC | 18:17 | |
18:17
virtualsue left
|
|||
timotimo | Juerd: we don't have anything that can determine the position of a named argument | 18:18 | |
Juerd | timotimo: These aren't named arguments | ||
timotimo: I'll add that | |||
abraxxa | is t/04-nativecall/06-struct.t a good place for a CArray[CArray[int8]] test? | 18:19 | |
18:19
aindilis joined
|
|||
lucasb | ZoffixW: ok, both can stay | 18:19 | |
nine | nebuchadnezzar: yes that's one of the very few changes that I'm not comfortable with | ||
dalek | c: 78410e8 | (Sylvain Colinet)++ | doc/Language/nativecall.pod: Fix all the libfoo to foo in NativeCall documentation (thank to nine x)) |
||
c: f23805a | (Sylvain Colinet)++ | / (19 files): Merge branch 'master' of github.com/perl6/doc |
|||
18:19
xtreak joined,
mohae left
|
|||
Juerd | timotimo: I've added that the signature is a mere *@foo | 18:19 | |
Skarsnik | git I hate you, stop doing useless merge commit >< | ||
El_Che | that feeling when your .t is bigger than your .pm6 | 18:20 | |
mst | Skarsnik: rebase moar | ||
ZoffixW | :D | ||
Juerd | El_Che: Write more POD :) | ||
ZoffixW | Skarsnik, git pull --rebase ? | ||
mst | El_Che: that's the feeling that you might -just- be approaching having written enough tests ;) | 18:21 | |
timotimo | Juerd: if it's a sub, that'll throw an error, if it's a method, it'll silently swallowing the named arguments :( | ||
El_Che | mst: I ended rewriting some part of the pm for corner cases I hadn't think of | ||
so yeah for testing | 18:22 | ||
Juerd | m: class X { method y (*@foo) { say +@foo } }; X.new.y(pair => 1, :pair(2), :3pair) | ||
camelia | rakudo-moar 82e6ca: OUTPUT«0» | ||
Juerd | Daamn | ||
ZoffixW | El_Che, I had 65 lines of tests for a single letter of code :P here github.com/perl6/modules.perl6.org...b080f95e8b | ||
_nadim | timotimo: In aby case, Great job. | 18:23 | |
Juerd | timotimo: Have to wrap everything in an array then. Ugly :( | ||
nebuchadnezzar | nine: I made some tests with two modules defining a sub with same name, “use Module1” followed by “use Module2” will happily override things without any warning :-/ | ||
El_Che | ZoffixW: hardcore | ||
Juerd | timotimo: Thanks for the heads up though. I was completely unaware of this. | ||
nebuchadnezzar | nine: so, if I do not take care, I can finish by using a sub from Module2 where I want the one of Module1 | ||
s/of/from/ | 18:24 | ||
smls | "my @i = $blob.decode(:big, uint32, uint16, uint8);" looks pretty neat. Juerd++. | ||
hankache | yahou! That's the first time i can update rakudo without nuking everything | ||
This is Rakudo version 2015.11-756-g82e6ca2 built on MoarVM version 2015.11-113-gbd56e2e | |||
implementing Perl 6.c. | |||
ZoffixW | \o/ | ||
timotimo | www.reddit.com/r/perl/comments/3xt...se/cy80n7e - here's new measurements for += | ||
El_Che | hankache: what the fun in updating without nuking stuff? | ||
nine didn't have to nuke for weeks | 18:25 | ||
smls | 6.c has been released? | ||
timotimo | Juerd: thanks for taking the time to write up a proposal :) | ||
hankache | why does it say 6.c? | ||
nine | hankache: because we're gonna release 6.c quite soon | ||
ZoffixW | smls, no, just the version bumped github.com/rakudo/rakudo/commit/d995c87b51 | ||
smls | ok | ||
ZoffixW | hankache, preparing for release | 18:26 | |
hankache | aha ok | ||
18:26
ZoffixW left,
mohae joined
|
|||
smls | Is there a countdown or something? :) | 18:26 | |
hankache | I wouldn't want to miss it | ||
Juerd | smls: Refresh the page, it looks a little less neat now | ||
Skarsnik | Juerd, if you make this type usable with NC, you are my hero x) | ||
Juerd | Skarsnik: What do you mean by 'usable with'? Also, I'm not a C coder so probably not... | 18:27 | |
timotimo: I've updated the gist to include [] around every template | |||
That does have the advantage of being able to use multi methods to get both .decode("utf8") and .decode([...]) | 18:28 | ||
smls | still looks better than unpack :) | 18:29 | |
Juerd | Agreed | 18:30 | |
18:30
mohae_ joined
|
|||
Juerd | And thanks :) | 18:30 | |
18:31
mohae left
|
|||
lizmat | m: (^61).ACCEPTS(60.9).say # this feels wrong | 18:31 | |
camelia | rakudo-moar 82e6ca: OUTPUT«True» | ||
lizmat | ah, but of course, it isn't | ||
Juerd | Hi lizmat. Do you have time to look at my unpack proposal? | 18:32 | |
Skarsnik | Well we need a type to catch char* from C (0 terminated) as raw data | ||
lizmat | I scanned it... | ||
but haven't thought much about it yet | |||
Skarsnik | and not encoded in a Str | ||
18:33
xtreak left
|
|||
Juerd | lizmat: That's okay. At least you didn't hate it then :) | 18:33 | |
Skarsnik: Blob? | |||
flussence | random thought: could we convince .{/de|en/}code('foo') to automatically use an Encode::foo module that's in-scope? would provide future expansion for string charsets as well as any other craziness people dream up. | 18:35 | |
Juerd | flussence: I hope so, because I think that things like hex and binary are string encodings. | 18:36 | |
flussence: And there are more things like that, like base64... | |||
Bit unwieldy to have those all in the mechanism for text encodings. | |||
muraiki | I missed the earlier context for the rakudobrew discussion so I don't know if this is a new thing or not, but the optimizing part of the build is failing | ||
Stage mast : MVM_platform_alloc_pages failed: 12 | |||
El_Che | is there a difference between die die X::AdHoc.new(:payload<foo>).throw and die X::AdHoc.new(:payload<foo>) ? or just syntax? | 18:37 | |
18:38
stanrifkin joined
|
|||
nine | El_Che: if you call .throw you don't need a die | 18:38 | |
lizmat | die(Exception) basically does a Exception.throw afaik | 18:39 | |
chansen_ | Juerd: The syntax seems very verbose compared to the "traditional" pack/unpack template | ||
Juerd | chansen_: That is definitely true. | 18:40 | |
chansen_: Do you see this as a good thing or a bad thing? | |||
timotimo | muraiki: that looks a bit like you're running out of ram perhaps? | ||
muraiki | whoa. someone lowered the ram on my development VM to 2GB T_T | 18:41 | |
18:41
smls_ joined,
smls left
|
|||
abraxxa | is t/04-nativecall/06-struct.t a good place for a CArray[CArray[int8]] test? | 18:41 | |
i'm adding it to 05-arrays.t | |||
timotimo | muraiki: damn, 2gb isn't enough to build rakudo? :( | ||
abraxxa | it was on my raspberry pi | 18:42 | |
240mb ram + 1gb swap file | |||
at least 2015.09 or 10 | |||
flussence | my netbook has 1GB and builds rakudo fine... | ||
muraiki | timotimo: I've got about 1.1GB free | ||
hmm | |||
I'm going to try again, but only building moar manually | 18:43 | ||
abraxxa | how to run tests in a checkout? | 18:45 | |
RabidGravy | abraxxa, that sounds too specific a test, as I said earlier it's all typed CArrays yhat fail typeconstraints | ||
abraxxa | I always get Unhandled exception: Missing or wrong version of dependency 'gen/moar/stage2/QRegex.nqp' (from 'src/Perl6/Pod.nqp') | ||
chansen_ | Juerd: I guess it depends who you ask! I'm used to the concise pack/unpack template, but your syntax looks very clear and extensible! | ||
abraxxa | RabidGravy: better one failing test than none | 18:46 | |
lizmat | Juerd: far from it | ||
abraxxa | RabidGravy: all other CArrays work for me, only CArray[CArray | ||
nine | abraxxa: ./perl6-m instead of just perl6 | ||
RabidGravy | have you got a failing example outside your code? | ||
abraxxa | nine: thanks | 18:47 | |
Juerd | chansen_: Well, I was asking you. Thanks for the feedback :) | ||
abraxxa | why does the test pass? | ||
chansen_ | Juerd: Why not propose it as an alternative instead of a replacement? | 18:48 | |
RabidGravy | what test? | ||
Juerd | chansen_: Because the current .unpack is very incomplete and impossible to extend while keeping backwards compatibility. | ||
abraxxa | RabidGravy: ok my CArray[CArray[int8]] $pointer-to-string .= new, 'can instantiate CArray[CArray[int8]]'; | ||
muraiki | building moar on its own was ok. so I tried rakudobrew again and during the optimize stage saw my available memory rapidly declining to nothing | 18:49 | |
abraxxa | yes, lets change the whole pack/unpack syntax one day before release! | ||
Juerd | chansen_: And I don't think there's anything to gain by having both, to be honest | ||
RabidGravy | as I said earlier as well it only fails in precompiled modules | ||
abraxxa | isn't there a code freeze policy? | ||
muraiki | moar was using 99.2% CPU and 59.1% memory. | ||
Juerd | abraxxa: Nope, I don't see this as an immediate change, but I do hope that pack/unpack get marked experimental | ||
abraxxa | Juerd: don't you think you're a bit late? | 18:50 | |
nine | .tell jnthn fde3d620bf1b22f1b78420e1294a04c663145efe is the last commit with which I can repro run_alt. With b6f0532c2b6fcf95b65f1de63537e91821a123fd it disappeared again. Didn't have to downgrade nqp for that. | ||
yoleaux | nine: I'll pass your message to jnthn. | ||
Juerd | abraxxa: I'll let other people decide that | ||
lizmat | Juerd: ah... eh... hmmm... | 18:51 | |
Juerd | abraxxa: I've contributed to Perl 5 long after its first release and wasn't too late :) | ||
nine | Well if our unpack sucks (and I don't remember anyone working on it in the past year), marking it experimental seems like a good idea. | ||
flussence | chansen_: besides, if we get this verbose stuff in, it'd be trivial to write a Pack::Terse (or *) module that expands the p5 notation to it | 18:52 | |
Juerd | It most definitely suck. I'm glad it's there, but it's not ready for prime time. | ||
s/suck/sucks/ | |||
RabidGravy | unpack, works for me and I have made code with it | ||
chansen_ | Juerd: OK, I guess it's better with your verbose syntax that can be extended. We could release a simple wrapper module that provides the concise template API using the new syntax | ||
flussence: ^^ | |||
abraxxa | is perl6 searching in ./lib for libs? | 18:53 | |
flussence | not by default | ||
Juerd | RabidGravy: It ignores unknown characters in the template, which means it can't be extended. And it has some abstraction breakage in a*, because it deals with Str where that should be Blob. | ||
abraxxa | that was removed from Perl 5 because it's a security risk | ||
RabidGravy | but that's fine I'll just stop making modules until everything is perfect ;-p | ||
Juerd | RabidGravy: These things can't be fixed without breaking compatibility | ||
abraxxa | so why does running my rakudobrewed perl6 fail when run from a rakudo git clone then? | ||
Juerd | RabidGravy: If we mark it as experimental, we can keep the current implementation and use that until we have something better. | ||
RabidGravy: But then at least users are warned that things will probably change. | 18:54 | ||
lizmat | Juerd: how does your idea conflict with pack/unpack? | ||
abraxxa | i thought the whole API was though out and discussed for FIFTEEN YEARS? | ||
and now unpack/pack sucks? | |||
who wrote the synopsis for it and who agreed that it's good? | |||
lizmat | abraxxa: it's a P5 API, really | ||
Juerd | abraxxa: pack and unpack templates aren't specced. | 18:55 | |
abraxxa | lizmat: which seems to handle everything you throw at it fine | ||
Juerd | abraxxa: Even if you think Perl 5 pack/unpack templates are great and should be kept, then still the ones we have now in Perl 6 are incompatible and cannot be made compatible without breaking compatibility. | ||
lizmat | abraxxa: S32/Str:503 | 18:56 | |
abraxxa | so why not keep it, marks it as 'like Perl 5 to get going without learning anything new' and add something easier on the brain with a different name? | ||
lizmat | =item unpack | ||
B<XXX To be defined> | |||
RabidGravy | I've got a working xbase implementation here, which uses unpack | ||
abraxxa | great, so someone implemented something unspeced | ||
lizmat | abraxxa: hardly 15 years of thinking and speccing | ||
abraxxa goes reading Python 3 docs | |||
Juerd | abraxxa: Well, I don't think anyone can actually implement a Perl5-like pack/unpack in the few days we've got left until Christmas... :) | ||
18:56
cdg joined
|
|||
flussence | abraxxa: you've had 15 years to complain about it and you wait until *now*? | 18:56 | |
lizmat | Juerd: I actually started on that but then the flu hit :-( | 18:57 | |
smls_ | I wouldn't mind it being marked experimental for now, like the 'is cached' trait was. | ||
Juerd | lizmat: I got struck last week. Three days in bed... And now I'm procrastinating dayjob-things because it's too much to do before I'm leaving on a christmas vacation... | 18:58 | |
lizmat | Juerd: sounds familiar | ||
lucasb | I'm on a brand new rakudo and panda hangs in '==> Installing Bailador' | ||
Juerd | Heck, the whole .decode to replace .unpack proposal was pure procrastination (from sleeping, though) | ||
chansen_ | flussence++ # Nice counter comment ;o) | 18:59 | |
stmuk | lucasb: I just saw that issue | ||
muraiki | I was able to make it past optimization stage in rakudobrew . it looks like about 1.1GB of memory was in use, which is about how much free memory I had on the vm where rakudobrew ran out of memory. unfortunately the build then died at install-core-dist.pl with "An exception occurred while evaluating a constant" | 19:00 | |
lucasb | stmuk: thanks for confirming it! | ||
abraxxa | RabidGravy: the test I wrote is ok but it fails in my code, no idea why | ||
m: use NativeCall; my CArray[CArray[int8]] $pointer-to-string .= new; $pointer-to-string[0] = CArray[int8].new; | |||
camelia | ( no output ) | ||
lizmat | dinner& | 19:01 | |
smls_ | Another thing that has a "very Perl 5" API, is the 'Test' module. While that good for P5->P6 newcomers now, I predict that in 10 years it will be seen as baggage in core, and will be hard to get rid of. | ||
Juerd | lizmat: Eet smakelijk | ||
chansen_ | When is it Christmas according to Rakudo/MoarVM developers? I celebrate Christmas on the 24th, do I get my Christmas present? ;o) | ||
Juerd | smls_: That's okay. Test::More moved to Test, so the next thing can be called Test::More again ;) | 19:02 | |
smls_ | heh ;) | ||
muraiki | chansen_: Orthodox Old Calendar Christmas, Jan 7 | ||
chansen_: just kidding :) | |||
but yeah, if you guys need some extra days, there's always the old calendar | |||
chansen_ | muraiki: Bah, Julian calendar! ;) | ||
stmuk | its probably 25th CLT (Cola Late Time) | 19:03 | |
Skarsnik | quick survey. what is the version of your libmysqclient on your system? (the libmysqlclient.so.18 for example) | ||
stmuk | 11:59 "just one leetle more commit" | ||
lucasb | another thing I hit is when trying to install 007: 'Could not find _007::Runtime::Builtins in ...' | ||
abraxxa | Skarsnik: how can i determine the version? just by looking at the filename? | 19:04 | |
nine | Skarsnik: 18 | ||
Skarsnik | abraxxa, yes, that how it's should work. (on unix) so.major.minor.subminor.areyoucrazy? | 19:05 | |
19:05
virtualsue joined
|
|||
smls_ | Skarsnik: /usr/lib/libmysqlclient.so.18.0.0 | 19:06 | |
though that's actually MariaDB | |||
abraxxa | it seems Ubuntu mysql-client package nor its dependencies contain that lib | ||
Skarsnik | it's libmysqlclient | 19:07 | |
that has nothing to do with mysql-client actually | |||
I think? | |||
abraxxa | a client that doesn require its client library, yeah looks like mysql | ||
there is no package named like that | 19:08 | ||
it's called libmysqlclient18 which should answer your question without installing | |||
i still don't get it why the nested CArray stuff only fails in DBDish Oracle | 19:09 | ||
TimToady | well, after all that agonizing, my advent entry for the 24th just kinda wrote itself in an hour :) | ||
abraxxa | TimToady: did you delay the release until a code freeze period was established and bugs fixed in a not-overhastly manner? | 19:10 | |
RabidGravy | abraxxa, I think you will find that if you put "no precompilation;" in the top of the file that *does* fail then it will work again | ||
abraxxa | RabidGravy: does the test not use precompilation? | 19:11 | |
RabidGravy | not a script, no | ||
Skarsnik | it's just mysql found interesting to not follow a major abi version so I am not sure putting mysqlclient, v18 in DBIis is a good idea, since the v16 is not that old | ||
and I am pretty sure the C api is exactly the same | 19:12 | ||
araujo checks perl6.org after a long while .... nice redesign! | |||
abraxxa | RabidGravy: so precompilation doesn't get tested although it's on by default for production code? | ||
RabidGravy | only for modules | ||
abraxxa finds that troubling | 19:13 | ||
can it be tested? | |||
TimToady | it's tested when you run Test :) | ||
hankache | :) | 19:14 | |
19:14
cdg left,
zengargoylew joined
|
|||
abraxxa | which doesn't use NativeCall an nested vars | 19:14 | |
muraiki | ok, after `rakudobrew nuke moar`, building did not result in the exception I previously saw in install-core-dist.pl. it build successfully, yay! | ||
hankache | congrats muraiki | ||
muraiki | now I feel too tired to do anything with it though. heh | 19:15 | |
(not because of these problems, just in general) | |||
I think it's time for caffeine | |||
timotimo | christmas tires you out, doesn't it ... | ||
abraxxa | there seems to be no 'use precompilation;' | ||
timotimo | yeah, because that's the default | 19:16 | |
abraxxa | not for scripts | ||
timotimo | hm. perhaps it'd make sense to turn it on and off for individual statements | ||
araujo still needs to go out tomorrow and buy the Christmas food/candies | |||
timotimo | yeah, we don't precompile scripts | ||
abraxxa | and what are .t files? | ||
scripts! | |||
timotimo | yeah | ||
so? | |||
abraxxa | i can't write a failing test case | ||
Skarsnik | you need to put the no precompilation in your module file | ||
timotimo | of course you can | ||
abraxxa | i could be moving it into a module | ||
nine | abraxxa: test scripts use quite a few modules | ||
timotimo | you can "use" the test code from your ... yeah | ||
abraxxa | so every t file should be duplicated in a module so it gets tested with and without precomp | 19:17 | |
timotimo | perhaps we can build a second test runner that just pretends every test file is a module and uses it | ||
RabidGravy | yeah, if the failure is in a module put the code in a module | ||
stmuk | hmm Bailador freezes at the install stage even without using rakudobrew | ||
abraxxa | Skarsnik: the other way round, I want precompilation to get used and show the failure | ||
nine | timotimo: I do wonder wether we could actually precompile scriptes | ||
timotimo | nine: we can, but you'll have to run it with -e '' | ||
Skarsnik | for installed App probably | ||
RabidGravy | abraxxa, fwiw I can't find any way to get the failure in or out of a module | 19:18 | |
abraxxa | i find it just too brittle as it is now because most of the tests are in scripts and so don't get precompiled | ||
RabidGravy: interesting | |||
RabidGravy | it's very possibly some other set of circumstances that aren't immediately obvious | 19:19 | |
19:19
rickbike joined
|
|||
Skarsnik | could be because the module is loaded with require and not use? | 19:19 | |
abraxxa | Skarsnik: need DBDish::Oracle::StatementHandle; | 19:20 | |
nine | Skarsnik: no, both do precompile | ||
Skarsnik | yes but DBIish will require it later x) | 19:21 | |
in DBDIsh install_driver | |||
is there a way to have Test display the type of stuff in got/expected? | |||
or does is just call .gist? | 19:22 | ||
abraxxa | Skarsnik: maybe we should improve is-deeply | ||
Skarsnik | is-deeply is eqv | ||
abraxxa | as it's output is for human and we don't touch the Test API it shouldn't have negative effects | ||
does this help? paste.scsys.co.uk/503418 | 19:23 | ||
nine | RabidGravy: do we want to keep resources a hash with keys like 'libraries/p5helper' and 'images/foo.png' or do we want to follow the spec that would make it nested like $*RESOURCES<libraries><p5helper>? | 19:24 | |
lizmat: ^^^ | |||
stmuk | oh it does successfully install Bailador but take ages | ||
nine | I'm trying to implement the spec right now, but it makes everything more complicated and I don't know if it actually helps with anything | ||
Skarsnik | Remove Bailador from star and put xml x) | 19:25 | |
nine | Except... / is a platform dependent thing :/ | ||
Skarsnik | for path | ||
keep the / | |||
and have stuff that work with it, convert it at the end | 19:26 | ||
stmuk | I liked the API of the p6 XML module -- which is rare for me and XML libraries | ||
RabidGravy | nine, I'm cool either way, spec if you can other if you can't | ||
Skarsnik | I don't like it because I think it leak x) | ||
hankache | lazy list is .. or ... | 19:27 | |
? | |||
RabidGravy | er | ||
.. is a Range, ... isn't | |||
e.g | 19:29 | ||
lizmat | nine: yeah, so making it in the hash, would take the platform dependency away | 19:30 | |
Skarsnik | m: my $a = 4.4e0; say $a.perl; say $a.Str; | ||
camelia | rakudo-moar 82e6ca: OUTPUT«4.4e04.4» | ||
dalek | blets: 45e82d3 | (Herbert Breunung)++ | docs/appendix-b-grouped.txt: set op table completed |
||
timotimo | i don't think there's a problem with just letting the hash key on paths that always have / | ||
RabidGravy | m: say ( 1 .. 2 ).WHAT; say ( 1 ... 2).WHAT; | ||
camelia | rakudo-moar 82e6ca: OUTPUT«(Range)(Seq)» | ||
abraxxa | RabidGravy: i'm compiling moar again, maybe some later commit already fixed my issue | ||
nine | lizmat: OTOH we could declare the / to be logical, split the path on / and let the excellent IO::Path do the joining | ||
lizmat | timotimo: well, that was the essence of the newio branch, but that didn't make it | 19:31 | |
timotimo | yeah :( | ||
flussence | .oO( let's use UNC paths on windows, then we can have / everywhere! ) |
19:32 | |
lizmat | but under pressure, everyting becomes fluid | ||
abraxxa | which is then incompressible ;) | ||
lizmat | so nine: if you think it is over enginieerd, then we'll skip | ||
abraxxa | nope, still fails | ||
nine | lizmat: that way, resources in the META6.json would always be an array, its members either strings or hashes for files with special attributes. With the nested structure, it's always hard to know what a hash means (directory or special file) | ||
Skarsnik | my panda is super slow :( | 19:33 | |
lizmat | nine: fine by me... :-) | ||
abraxxa | Skarsnik: did you feed him too much? | ||
stmuk | hahaha | ||
nine | lizmat: well I do like the ideas and the $*RESOURCES<libraries><p5helper> interface. It's just that implementing it feels like walking uphill through mud :) | ||
19:33
rurban left
|
|||
stmuk | panda seems slow on DBIish and Bailidor | 19:33 | |
lizmat | well, that's us core devs being tortured for the greater good | ||
nine | lizmat: it may also just be exhaustion and stress caused by the relentles release count down | 19:34 | |
abraxxa | what does this mean? Cannot find method 'CALL-ME' | 19:35 | |
at gen/moar/m-BOOTSTRAP.nqp:2854 (/home/ahartmai/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/BOOTSTRAP.moarvm::76) | |||
hankache | we do have a countdown? | ||
where? | |||
when? | |||
how? | |||
nine | hankache: in my head ;) | ||
japhb | nine: Not relentless. It will relent for you as a Christmas present. | ||
hankache: You could consider the advent to be our countdown | |||
mst | nine: trout.me.uk/tick.html | 19:36 | |
abraxxa | never mind, typo | ||
hankache | nine: my @brain = @nine-brain.clone ;) | ||
nine | Oh and there's my girlfriend coming home in about an hour and I promised her to actually spend time with her this evening | ||
Skarsnik | lol | ||
El_Che | nine: you lier! | ||
-a | 19:37 | ||
mst | this is why you need more than one; then you tell them all you're seeing a different one that night, and spend the time hacking instead | ||
lizmat | nine: could you point me to where you are working on this ? | ||
Skarsnik | Oh great | ||
everything that use Str given by a NC routine will leak | 19:38 | ||
japhb | mst: That logic is so twisted it got knotted | ||
timotimo | Skarsnik: does "explicitly manage" help? | ||
leont | japhb: don't get him started on knots ;-) | ||
japhb | Point taken | ||
mst | japhb: there's an old joke about that being why mathematicians tend to have a wife -and- a mistress | ||
Skarsnik | There are explicitly managed and should not | ||
*They | |||
mst | I just sort of reworked it for the oddities of my life ;) | 19:39 | |
japhb | heh | ||
abraxxa | timotimo: isn't that the source of the leak? because it tells Perl to leave it alone in regards to gc? | ||
nine | lizmat: well with that decision out of the way it should actually be a little patch to Panda::Installer::install for detecting paths beginning with 'libraries/' and applying $*VM.platform-library-name and a similar patch to CompUnit::Repository::FileSystem::resource | ||
timotimo | not actually sure | 19:40 | |
hankache | a lazy lisy is a (Seq) or a (List) ? | 19:41 | |
s/lisy/list | |||
timotimo | Seq is an iterator that will not let you fetch older elements once it's iterated past them | ||
Skarsnik | timotimo, if you do a my $a = native_sub(); and the native_sub is marked as returns Str you get a explicitly-managed Str and... it's probably not a good idea | ||
timotimo | a list is one part "reified" elements, one part iterator(s) | ||
Skarsnik | and I fear a my $b = $a will clone and keep the explicitlymanaged trait | 19:43 | |
19:43
stanrifkin left
|
|||
timotimo | clone? why would it clone? | 19:44 | |
abraxxa | a module use NativeCall; and the test script too results in P6M Merging GLOBAL symbols failed: duplicate definition of symbol NativeCall | 19:45 | |
Skarsnik | lol | ||
and github.com/tony-o/perl6-data-dump should be the output of Test. it show the type of stuff. it's better than just .perl x) | 19:46 | ||
hankache | ++what Skarsnik said | 19:48 | |
19:49
labster joined
|
|||
RabidGravy | right now I'm not feeling confident that I will be able to get a release standard rakudo built *and* test all my modules tomorrow | 19:49 | |
abraxxa | +1 | ||
and I only have one module ;( | |||
Skarsnik | someone know a C function that return a char*? | 19:50 | |
RabidGravy | yeah, I have 29 :-\ (how did that happen) | ||
Skarsnik | and take like no argument x) | ||
RabidGravy | getlogin() | ||
Skarsnik | Oh thx | 19:51 | |
nine | lizmat: maybe...we don't even need the patch to rakudo. NativeCall already maps between p5helper and libp5helper.so :) | ||
abraxxa | Skarsnik: PassChar in 15-rw-args.c | ||
Juerd | m: method Str::foo { "bar" }; say "foo".foo | 19:53 | |
camelia | rakudo-moar 82e6ca: OUTPUT«Potential difficulties: Useless declaration of a has-scoped method in mainline (did you mean 'my method Str::foo'?) at /tmp/aS8p7RAPmR:1 ------> 3method7⏏5 Str::foo { "bar" }; say "foo".fooMethod 'foo' not found for invocant of c…» | ||
Juerd | m: class Str { method foo { "bar" } };say "foo".foo | ||
camelia | rakudo-moar 82e6ca: OUTPUT«===SORRY!===P6opaque: must compose before allocating» | ||
Juerd | Is there a way to extend core classes? I'm looking to move Blob.unpack to experimental. | ||
RabidGravy | m: use MONKEY-TYPING; augment class Str { method foo { "bar" } };say "foo".foo | 19:54 | |
camelia | rakudo-moar 82e6ca: OUTPUT«bar» | ||
Juerd | Great, thank you :) | ||
abraxxa | is something wrong with that code? paste.scsys.co.uk/503421 | 19:55 | |
19:55
rurban joined
|
|||
Juerd | "Cannot augment Blob because it is closed" :( | 19:57 | |
flussence | Juerd: ah yeah, that sounds familiar to me... never figured out a way around it and ended up making subs. | 19:58 | |
...which doesn't help for what you're doing, of course. :( | 19:59 | ||
hankache | m: my $lazylist = (1 ... Inf); say $lazylist.eager; | 20:03 | |
camelia | rakudo-moar 82e6ca: OUTPUT«(timeout)» | ||
nine | abraxxa: we don't allow use lib in a module | ||
hankache | this doesn't time out in the latest rakudo ^^ | 20:04 | |
abraxxa | nine: you mean I have to move it before the unit module declaration? | ||
nine: ok, works but not so good error message | 20:05 | ||
nine | abraxxa: move it into the script or use -I or PERL6LIB | ||
abraxxa: to quote jnthn++ "Note that for Perl 6.christmas, we will only support the use of use lib in scripts, not in modules, as its interaction with precompilation is more complex than we have time to reasonably consider (and it's better to wait until we've a good answer than to use a hacky one now)." | |||
hankache | does rakudo timeout? | 20:06 | |
nine | hankache: no, why should it? | ||
hankache | nine: my $lazylist = (1 ... Inf); say $lazylist.eager; | ||
it's hanging | 20:07 | ||
nine | hankache: yes, you ask it to do infinite work and it happily starts doing it | ||
hankache | nine then shouldn't we forbid Inf + eager ? | 20:08 | |
RabidGravy | Skarsnik, this "Consider adding the api version of the library you want to use" is it possible to shut it up without specifiying the version? | ||
flussence | hankache: you're asking perl6 to solve the halting problem. | ||
20:09
[Sno] left
|
|||
Skarsnik | RabidGravy, I was thinking of that. but in most cast it's a fault in the library | 20:09 | |
hankache | flussence halting problem? | ||
Skarsnik | RabidGravy, do you have an example on where you can't put the version? | 20:10 | |
lizmat | m: use MONKEY-TYPING; augment class Blob { method foo { "foo" } } # hmmm... this seems to hang ? | ||
camelia | rakudo-moar 82e6ca: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PRk5uheAutCannot augment Blob because it is closedat /tmp/PRk5uheAut:1------> 3use MONKEY-TYPING; augment class Blob7⏏5 { method foo { "foo" } } # hmmm... th expecting any of: g…» | ||
lizmat | ^^^ hangs for me locally, eating all mem | 20:11 | |
20:11
bobv joined
|
|||
Skarsnik | I am worried to receive that from NC gist.github.com/Skarsnik/181144a2efa6dc50af99 these string should not be expmanaged (and why only the first) | 20:11 | |
RabidGravy | Skarsnik, yes, for files that I have created - the version is irrelevant | ||
hankache | flussence not really, just to throw a warning/error | ||
Skarsnik | RabidGravy, it should not bother if you put a path to the file, it only warn when it's 'foo' | 20:12 | |
try ./foo ? | |||
20:12
AlexDaniel joined
|
|||
RabidGravy | also I have 8 NativeCall libraries to check and fix | 20:14 | |
which really, really sucks | |||
dalek | line-Perl5: 320187e | (Stefan Seifert)++ | / (5 files): Use platform independent library name Requires latest panda |
20:16 | |
nine | lizmat: there ^^^ | ||
abraxxa | I wish you all a Happy Christmas! | 20:17 | |
RabidGravy | nine++ # got it | 20:18 | |
abraxxa, have a good one | 20:22 | ||
abraxxa | my updated code is on github, I'll open an RT for the CArray[CArray bug | 20:23 | |
RabidGravy: thanks! | |||
20:24
darutoko left
|
|||
abraxxa | hahaha | 20:26 | |
my RT is localhost | |||
127001 | |||
rt.perl.org/Ticket/Display.html?id=127001 | 20:27 | ||
tadzik | :D | ||
20:28
skids left
|
|||
moritz | did you know that you can write localhost as 0 too? | 20:29 | |
point your browser to 0:5000/ for example :-) | |||
tadzik | oh, I thought it's 0.0.0.0 :) | ||
flussence | depends on the browser. Some crazy code interprets a bare number as a uint32 IP address | 20:30 | |
abraxxa | it's ::1 | ||
Skarsnik | hey tadzik, did you see the new commit to my pr on json-unmarshal? x) | ||
Juerd | m: pack() | ||
camelia | rakudo-moar 82e6ca: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9llXJ0PwsGCalling pack() will never work with any of these multi signatures: (Str $template, *@items)  (@template, *@items)at /tmp/9llXJ0PwsG:1------> 3<BOL>7⏏5pack()» | ||
flussence | (doesn't work in chromium here) | ||
Juerd | I dont understand the error message | ||
Will never work with any of these... | |||
tadzik | Skarsnik: not yet, will look now :) | ||
Juerd | Shouldn't that be s/never/only/? | ||
RabidGravy | nah, | 20:31 | |
lizmat | Juerd: hmmm.... | ||
flussence | Juerd: "will never work, " | ||
RabidGravy | m: pack(42) | ||
camelia | rakudo-moar 82e6ca: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jW4_r92yEzCalling pack(Int) will never work with any of these multi signatures: (Str $template, *@items)  (@template, *@items)at /tmp/jW4_r92yEz:1------> 3<BOL>7⏏5pack(42)» | ||
Juerd | flussence: Same | ||
TimToady | for each of these signatures, what you said will never work with it | ||
Juerd | RabidGravy: Oh, like that :) | 20:32 | |
abraxxa | bye! | ||
flussence | maybe it should say "Calling pack() with no arguments" in that one case | ||
20:32
abraxxa left
|
|||
RabidGravy | yeah, it's just not clear when there are no args | 20:32 | |
Juerd | I interpreted the () in 'pack()' as a function sigil, not as an empty signature :) | ||
tadzik | Skarsnik: ooh, I see it now :) Nice! | ||
TimToady has scheduled his advent post | 20:33 | ||
RabidGravy | TimToady++ | ||
tadzik | ooooh:) | ||
flussence gets hyped for 4 hours from now | |||
Skarsnik | tadzik, for the "42" stuff, I had a webservice that send id at string because they don't fit in a int32, but since perl6 Int is a bigint it map nicely x) | 20:34 | |
20:35
vv3 joined,
vv3 left
|
|||
[Coke] | it's not too late to mark pack/unpack experimental. | 20:35 | |
20:35
vv3 joined,
vv3 left
|
|||
Juerd | [Coke]: I'm working on it, actually :) | 20:35 | |
tadzik | Skarsnik: yeah, I can see the applications :) I just wonder if maybe there should be a way to keep the module "strict" | 20:36 | |
'cos now, with your change, it kind of coerces types | |||
20:36
vv3 joined,
vv3 left
|
|||
tadzik | and I can imagine someone using J::M as sort of a validator, a bit like Json Schemas | 20:36 | |
Skarsnik | Well it still depend on the type of the attribute | 20:37 | |
20:37
vv3 joined,
vv3 left
|
|||
tadzik | m: my $a = Int("99bottles"); say $a.perl | 20:37 | |
camelia | rakudo-moar 82e6ca: OUTPUT«Cannot convert string to number: trailing characters after number in '0399⏏5bottles' (indicated by ⏏) in block <unit> at /tmp/saagdwaJ3_:1Actually thrown at: in block <unit> at /tmp/saagdwaJ3_:1» | ||
tadzik | perl6++ | ||
Skarsnik | I can't think if it's a NC bug or a failuyre to not have Explicitly managed returned char * gist.github.com/Skarsnik/7f2fee97d56c5acc1587 | ||
tadzik | Skarsnik: I'm trying to be a devil's advocate and find a case where it could possibly bite someone :P | 20:38 | |
20:38
vv3 joined,
vv3 left,
virtualsue left
|
|||
Skarsnik | There is nothing that make these value explicitly managed in the code | 20:38 | |
tadzik | though I very much value that we can now handle bigints like in that case you mentioned | ||
20:39
vv3 joined,
vv3 left
|
|||
tadzik | one could argue that CustomUnmarshaler already covers that, though this is definitely much nicer when it Just Works :) | 20:39 | |
20:39
vv3 joined
|
|||
Skarsnik | Yes x) | 20:39 | |
I also bothered RabidGravy to have automaticly _ case converted to -, but it was more me beeing lazy to not mark everything with is json-name for plop_id that end in plop-id x) | 20:41 | ||
tadzik | haha | ||
Juerd | I wish _ and - were considered the same thing | ||
tadzik | that's a good question though: how does JSON::Marshal handle bigints? | ||
Skarsnik | err | ||
Juerd | Since I've become accustomed to the kebab casing, underscores are annoying to type | 20:42 | |
tadzik | 'cos if it turns them into strings, or we can agree that it should, then I have no other doubts :) | ||
20:42
bobv left
|
|||
RabidGravy | it will just push them out as they are, if they needed to be strings for an API I'd suggest a custom marshaller | 20:43 | |
20:43
mohae joined
|
|||
Skarsnik | Also having a way to add unmarshaling to some core type could nice too. like webservice send timestamp in ISO-something than DateTime understand. I wanted to have t x) | 20:43 | |
*to add that | |||
It's probably just a matter to be able do add a _unmarshal(DateTime, $json) | 20:44 | ||
RabidGravy | Skarsnik, tadzik I'd suggest another module that provides a bunch of "standard" marshallers/unmarshallers | ||
tadzik | RabidGravy: I just thought about that exactly! | ||
20:44
vv3 left
|
|||
tadzik | well, my idea was to have it in core, but I can be convinced | 20:45 | |
RabidGravy | so if it's loaded it looks the type up and gets a marshaller | ||
20:45
mohae_ left,
khw left
|
|||
RabidGravy | so if you want the bog standard behaviour do nothing, otherwise load the module | 20:46 | |
20:46
khw joined
|
|||
tadzik | that's not a bad idea | 20:46 | |
still, I think it's kind of our Core Duty to make bigints DTRT | |||
Skarsnik | Yes, but you will need to add something in marsh/unmarch to be able to 'extend' tehm? | ||
tadzik | even more so with marshal than unmarshal | ||
nine | I can't believe my last TODO before the release is done and it didn't even involve a patch to rakudo :) | ||
tadzik | and since all three of us are at our keyboards, we can probably come up with something sensible :) | 20:47 | |
RabidGravy | I'm not quite sure what the problem with bigints is | ||
Skarsnik | Discord send me BigInt id (aka does not fit on a int32) | ||
so it send it as string | |||
tadzik | so JSON defines its ints to be int32? | ||
Skarsnik | but perl6 Int are big enought | ||
20:48
virtualsue joined
|
|||
tadzik | (I assume so from your example, but I haven't actually checked) | 20:48 | |
Skarsnik | I have no idea | ||
20:48
vv3 joined
|
|||
tadzik | I'll check | 20:48 | |
RabidGravy | no, it's some other software can't handle it | ||
Juerd | Making something experimental is hard :) | 20:49 | |
Damn lexicals! | |||
tadzik | json spec says nothing about range of "number" | ||
RabidGravy | m say from-json('{ "foo": 11111111111112222222222222222222222222222222222222222222233333333333333333333333333333333}').perl | ||
m: say from-json('{ "foo": 11111111111112222222222222222222222222222222222222222222233333333333333333333333333333333}').perl | 20:50 | ||
camelia | rakudo-moar 82e6ca: OUTPUT«${:foo(11111111111112222222222222222222222222222222222222222222233333333333333333333333333333333)}» | ||
20:50
yqt joined
|
|||
RabidGravy | we can parse it | 20:50 | |
tadzik | right | ||
everything looks like it's actually Discord doing something weird here | |||
[Coke] | Do panda modules need to be updated? just ran a freshly built perl6 on bootstrap.pl in a freshly updated panda: gist.github.com/coke/726361e325c678d0472c | 20:51 | |
tadzik | so I'm thinking, maybe it's actually better to have some nice, readymade tool (an unmarshaler probably) to handle this sort of odd documents rather than have it as a standard behaviour | 20:52 | |
20:52
vv3 left
|
|||
[Coke] | how do you login to perl6 advent with the new layout? | 20:53 | |
RabidGravy | which is why I'd say if it is application specific it should be possible but not built in | ||
tadzik | [Coke]: I went to wordpress.com, logged in, then went to the advent blog | ||
20:53
punter joined
|
|||
tadzik | yeah, I agree on that | 20:53 | |
what do you say, Skarsnik | |||
20:53
vv3 joined,
vv3 left
20:54
vv3 joined,
vv3 left
|
|||
tadzik | I think we can come up with some nice syntax for this sort of stuff, so keep it explicit, but not make it a hassle | 20:54 | |
I see no possible harm in that :) | |||
20:55
vv3 joined,
vv3 left
|
|||
RabidGravy | but that's what "unmarshalled-by", "marshalled-by" are for | 20:55 | |
tadzik | right | ||
and is unmarshalled-by(Int(*)) enough to make it work? | |||
20:56
vv3 joined
|
|||
jnthn | Juerd: Another way to make pack/unpack experimental is to have them look for a certain symbol, say $?ALLOW-EXPERIMENTAL-PACK, and then look for it to exist (nqp::getlexcaller would do it), and then just export that symbol from experimental when the :pack tag is used. | 20:56 | |
yoleaux | 18:50Z <nine> jnthn: fde3d620bf1b22f1b78420e1294a04c663145efe is the last commit with which I can repro run_alt. With b6f0532c2b6fcf95b65f1de63537e91821a123fd it disappeared again. Didn't have to downgrade nqp for that. | ||
RabidGravy | so "class F { has $.very-big-number is marshalled-by('Str') is unmarshalled-by('Int') } | ||
tadzik | even that, huh | ||
that's solid work on those traits, I see :) | |||
Juerd | jnthn: I just got something working, will submit PR in a minute. | ||
jnthn | OK, nice :) | 20:57 | |
20:57
lichtkind left
|
|||
[Coke] | tadzik: thanks, that did the trick! | 20:57 | |
RabidGravy | yeah, it's a string method name or a sub :) | ||
Juerd | jnthn: github.com/rakudo/rakudo/pull/649 | ||
jnthn | Juerd: looking | ||
I'm +1 to making them experimental | |||
Juerd | my constant EXPERIMENTAL-PACK := True; is a hack to make it work for the next callee | 20:58 | |
jnthn | Yes, was gonna say | 20:59 | |
I think it's brokne otherwise too | |||
What happens if you do use experimental :pack; sub foo() { ...use pack... }; foo() | |||
I think both can be fixed by using CALLERS:: instead of CALLER:: | |||
Which searches all the way down the dynamic chain | |||
Juerd | Ah | 21:00 | |
Will try that instead | |||
21:01
vv3 left,
vv3 joined,
vv3 left
21:02
vv3 joined,
vv3 left
21:03
vv3 joined,
vv3 left
21:04
khw left,
vv3 joined
|
|||
Juerd | jnthn: Nope, doesn't work with CALLERS | 21:05 | |
21:05
atweiden joined
|
|||
Juerd | jnthn: And I'm out of time, quite possibly for the next few days. :( | 21:05 | |
21:06
geraud joined
|
|||
jnthn | OK, lemme see if I can do it before I get sent to bed :) | 21:08 | |
lizmat | fwiw, I'm ambivalent to making pack/unpack experimental at this stage | 21:09 | |
21:09
vv3 left
|
|||
Skarsnik | tadzik, RabidGravy I don't see the issue of doing it in the 'core' since you have to write the Attribute as Int for the coerce to Int to be done | 21:09 | |
RabidGravy | but if it's coming as a string then it's a string | 21:10 | |
hankache | anyone has an example of this: doc.perl6.org/type/Seq#method_from-loop | ||
Skarsnik | It's not like you say has $.foo and $foo is automaticly a Int | ||
tadzik | RabidGravy: on the other hand, we already cheat with Rat | ||
21:10
vv3 joined,
vv3 left
|
|||
Skarsnik | and Num x) | 21:11 | |
tadzik | or do we, hmm | ||
21:11
vv3 joined,
vv3 left
|
|||
tadzik | yeah, it's the same story: declaring an attr as Rat means (for JSON::Unmarshal): try to make Rat from this, whatever it is | 21:11 | |
RabidGravy | there was one that is cheated, because the json doesn't distinguish | ||
tadzik | it will be consistent if Int were to work the same way | ||
we also do that with Bool | 21:12 | ||
21:12
vv3 joined
|
|||
tadzik | and here there's no excuse | 21:12 | |
labster | Good morning, #perl6. Any LHF needing some work? | 21:13 | |
RabidGravy | I'm cool with it | 21:14 | |
Skarsnik | LHF? | ||
lizmat | RabidGravy: cool with pack/unpack becoming experimental ? | ||
Skarsnik | Oh low hanging fruit x) | ||
lucasb | labster: LHF: Add --make-install description to rakudo's Configure.pl :) | ||
... Configure.pl help message | 21:15 | ||
RabidGravy | lizmat, that as well ;-) | ||
labster | that sounds pretty low! | ||
Skarsnik | guess_libname in NC should be cached ~~ | 21:16 | |
RabidGravy | Skarsnik, however for marshalling I'm still pretty certain that it will have to be a marshalled-by('Str') for those cases | 21:17 | |
21:17
vv3 left
|
|||
Skarsnik | probably | 21:17 | |
21:18
vv3 joined,
vv3 left
|
|||
Skarsnik | How I can marshal/unmash a timestamp with the 2 trait? well it's marshalled by Str but it can be created like that DateTime.new('string value'); | 21:18 | |
Juerd | jnthn: Great! Thanks | 21:19 | |
jnthn | Got a patch that seems to work :) | ||
Juerd | To everyone who's going to celebrate: merry christmas! | ||
I'm disallowing myself to participate in #perl6 for the next few days because of dayjob deadlines. | 21:20 | ||
21:20
Juerd left
|
|||
RabidGravy | DateTime::Parse or something | 21:21 | |
whatever H::UA uses | |||
Skarsnik | I mean how I use the trait? x) | 21:22 | |
Hotkeys_ | Haven't been reading this channel for a few days, any new developments? | ||
RabidGravy | oh | ||
Hotkeys_ | How's the release looking | ||
dalek | kudo-star-daily: d68d5bd | coke++ | log/ (8 files): today (automated commit) |
||
Skarsnik | like has DateTime $timestamp is marshalled-by('Str') is un-marshalled-by('new') ? | 21:23 | |
[Coke] | so, is fresh panda working for anyone? | 21:24 | |
lucasb | [Coke]: worked for me when I bootstraped 1 or 2 hours ago. didn't hit the EVAL usage errors you found | ||
RabidGravy | something like "... is marshalled-by('Str') is unmarshalled-by(sub ($d) { DateTime.new($d) })" | 21:25 | |
21:25
CIAvash left
|
|||
stmuk | panda seems to generally work with a few modules slow to install | 21:25 | |
RabidGravy | for the method name it has to be a method that is called on the value that you have rather than the type | ||
tadzik | [Coke]: works fine here | 21:28 | |
labster | m: "»ö\x[342]\x[20f0]«".say # Camelia with santa hat | 21:30 | |
camelia | rakudo-moar 82e6ca: OUTPUT«»ö͂⃰«» | ||
flussence | [Coke]: works here too (my daily reinstall process includes `panda install Linenoise`) | 21:31 | |
21:31
Hotkeys_ is now known as Hotkeys
|
|||
Hotkeys | last time I used panda it took so long to start doing things I thought it had hanged | 21:32 | |
flussence should get to work on replacing "daily" there with a script that monitors irssi's logfiles for commit messages... | |||
Hotkeys | lol | ||
RabidGravy | [Coke], how fresh? | ||
Hotkeys | why not just monitor git | ||
[Coke] | both are running the latest commit. | 21:33 | |
flussence | I don't think inotify works over remote git yet | ||
[Coke] | trying to remove the install directory for perl6 and do a complete rebuild. | ||
RabidGravy | just trying | 21:34 | |
Skarsnik | err my modules does not work now | 21:37 | |
Cannot call infix:«<»(Any, Int); none of these signatures match: | |||
on a given block | |||
21:38
cognominal left
|
|||
Skarsnik | it worked yesterday | 21:38 | |
lizmat | Skarsnik: any idea where / how that happens | 21:39 | |
anything to do with dates or instants ? | |||
Skarsnik | no | ||
lizmat | *phew* | ||
flussence | [Coke]: just finished building stuff and reinstalling panda. It takes *ages* at "==> Fetching panda" but eventually completes. | 21:40 | |
Skarsnik | github.com/Skarsnik/perl6-gumbo/bl...er.pm6#L63 it fail on that and the last travis build was working | ||
lizmat | flussence: pretty trivial to pump IO.watch-path supply onto an IO::Socket::Async supply ? | ||
Skarsnik | There not even a < comparaison on this | ||
[Coke] | going better this time... | 21:41 | |
lizmat | Skarsnik: which module are we talking about? something in th eecosystem ? | ||
Skarsnik | Gumbo in the ecosystem (you will need to install XML with notests | 21:42 | |
dalek | kudo/nom: bdc8003 | (Juerd Waalboer)++ | / (2 files): Make pack and unpack experimental The current pack and unpack are incomplete and not extensible. Future improvements will be necessary, but can't be made without breaking compatibility. There is currently no language specification for pack and unpack. |
21:43 | |
[Coke] | the panda output "==> Please make sure that inst#/Users/williamcoleda/sandbox/rakudo/install/share/perl6/site/bin is in your PATH" is confusing. | ||
ast: fde8fcf | jnthn++ | S (4 files): Tests using pack/unpack should `use experimental`. |
|||
[Coke] | it's giving a perl6 lib style path but it's meant for the system path. | ||
jnthn++ Juerd++ | |||
afk a bit | 21:44 | ||
tadzik | [Coke]: yeah, I guess that message is a bit obsolete :) | 21:45 | |
dalek | kudo/nom: 4355eac | jnthn++ | src/ (3 files): Remove "as Foo" coercion trait. Which has long been replaced by Foo() coercion types. |
21:46 | |
jnthn | 'night, #perl6 | ||
timotimo | gnite jnthn | ||
have a nice 24th :) | |||
RabidGravy | be groovy | 21:47 | |
AlexDaniel | m: enum Animal (Cat => 25, Dog) | ||
camelia | rakudo-moar 82e6ca: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MoGn2qU4cxUndeclared name: Dog used at line 1» | ||
stmuk | so everything using NC needs to remove 'lib' from the front? | ||
timotimo | oh? | ||
Skarsnik | Yes, blame nine :) | ||
timotimo | huh? | 21:48 | |
RabidGravy | panda working on a just finished installing rakudo here | ||
stmuk | Cannot locate native library 'liblibcurl.so': liblibcurl.so: cannot open shared object file: No such file or directory | 21:49 | |
Skarsnik | it's not that stupid, since on windows lib are just foo.dll | ||
RabidGravy | yeah jusr 'curl' | ||
21:49
terjekv joined
|
|||
timotimo | yeah, it'll put the lib in front for you | 21:49 | |
Skarsnik | fun fact: there is some lib that are called liblibfoo x) | 21:50 | |
timotimo | there's also libowfat (so you can -lowfat) | ||
RabidGravy | and libiberty | 21:51 | |
lucasb | and libuv (so you -luv it) :) | ||
geekosaur | libroken | ||
timotimo | oh! | ||
i never noticed that | |||
geekosaur | (which admittedly goes the other direction) | ||
terjekv | Hi. We're trying to resolve a circular module call using stubs. It works fine if the modules are located in the same file, but if they are spread across different files we get the message "the following packages were stubbed but not defined". Is there a (documented) way to have circular module calls across different files? | ||
Skarsnik | Should I merge than now? github.com/perl6/DBIish/pull/40 DBIish will not work for new rakudo without it x) | 21:52 | |
terjekv, You can't sadly I think | |||
I solved by being loose on some type | |||
+it | 21:53 | ||
terjekv | Ah. Right. Well, that at least explains a lot. And thanks for the idea. | ||
21:54
[Sno] joined
|
|||
RabidGravy | well if you're not using them for typeconstraints you can require the module and the ::('Foo') it to get the package/class whatever | 21:54 | |
Skarsnik | Maybe it can work if you could do unit module Foo in each file | ||
RabidGravy | I've used that in a couple of places | ||
Skarsnik | but I did not try it | ||
21:54
muraiki left
|
|||
Skarsnik | I think it's weird to not be able to have that | 21:55 | |
RabidGravy | so e.g. require Foo; my $f = ::('Foo').new | ||
Skarsnik | I have a channel class that has an owner (so a User) and the user class has channel on it | ||
terjekv | That sounds oddly familiar. I'm not quite sure what unit module actually does, looking at the module documentation for a few. | 21:56 | |
(and the ::('Foo').new idiom kinda hurts my eyes) | |||
RabidGravy | yeah it's not pretty | 21:57 | |
Skarsnik | For me it's a bug x) | ||
21:58
Begi left
|
|||
Skarsnik | I understand if for the precompile to work | 21:58 | |
terjekv | Single pass etc, yeah. But it's a bit odd that you can get around it in the same file but not across files. | 21:59 | |
Also, uhm, what does the "unit" in "unit module Foo" do? | |||
Skarsnik | it declare the file as the Foo unit | ||
21:59
hlafarge joined
|
|||
Skarsnik | if you want it's like putting module Foo { } around everything | 21:59 | |
RabidGravy | which is what I prefer | 22:00 | |
Skarsnik | but I think remember reading that you can have multi file of the same unit | ||
terjekv | Ah. Right. Akin to package {} (conceptually) in perl5? Makes sense though. | 22:01 | |
RabidGravy | yeah | ||
terjekv | I think there will be some stabbing at this, thanks for the input! | 22:02 | |
RabidGravy | there is package, module and class | ||
Skarsnik | I feel like RabidGravy, having code accross multiple module/patch in rakudo/modules to write something that I never finished writing because I spend time patching other stuff xD | 22:03 | |
terjekv | (It's not bad until a branch -l lists enough output that you reach for grep) | 22:04 | |
flussence is pleasantly surprised to find that `st` has about 17 times more unicode support than `urxvt` | |||
22:04
erisch_ joined
22:05
erisch_ left,
punter left
|
|||
RabidGravy gets jiggy with a Proxy in an AT-KEY | 22:06 | ||
stmuk | ha a script I last fixed 2 weeks ago needs more changes more | ||
lizmat | RabidGravy: in core? | ||
22:06
terjekv left
|
|||
RabidGravy | nah, in this GDBM module which I earlier claimed to be able to finish today but I fell asleep for a couple of hours | 22:08 | |
22:08
pierre-vigier joined
|
|||
Skarsnik | I love at-key x) | 22:09 | |
22:11
maettu joined
|
|||
labster | m: (* // "foo").WHAT.say | 22:13 | |
camelia | rakudo-moar 4355ea: OUTPUT«(Whatever)» | ||
22:13
xfix left
22:15
hlafarge left
|
|||
RabidGravy | yeah it's defined | 22:15 | |
labster | But should it curry? | 22:16 | |
lucasb | iow, &&, || and // don't participate in whatever currying. (right?) | ||
RabidGravy | PUT IT IN THE CURRY! | ||
22:17
nmpa joined
|
|||
timotimo | looks like, lucasb | 22:17 | |
22:17
raiph joined
|
|||
captain-adequate | TimToady: Nice post today. | 22:18 | |
dalek | ast: d8d63b4 | lizmat++ | S03-smartmatch/capture-signature.t: Fix fallout of " as " removal |
22:19 | |
ast: b0e1278 | lizmat++ | S32-temporal/Date.t: Fix no special format large/small years fallout |
|||
timotimo | huh? where's toady's post? | ||
stmuk | it was emailed out to those with WP access it seems | 22:20 | |
22:20
nmpa left
|
|||
lucasb | .oO( today's toady's post ) |
22:20 | |
captain-adequate | Oh... The Perl6 advent calendar. | ||
Can't seem to find it on the website... Must've just been emailed I guess. | 22:22 | ||
timotimo | i didn't get a post :( | 22:24 | |
maybe it was accidentally published, then quickly deleted again because it was meant to go up in an hour or so? | |||
labster | Don't open your blog posts before christmas, lucasb | 22:25 | |
perlpilot reads timtoady's post now as it's likely he'll have spotty internet later | 22:28 | ||
timotimo | are recorded talks from the LPW going to be up somewhere? | 22:30 | |
... did talks get recorded? | |||
22:30
krshn joined
|
|||
stmuk | mdk tweeted about looking at the video an evening or two ago | 22:32 | |
hankache | when will the post go live? | ||
stmuk | so I imagine the wheels are turning | 22:33 | |
hankache waiting and waiting and waiting | |||
timotimo | hankache: i can't actually see the post as scheduled in wordpress | ||
perlpilot | hankache, when its meant to be published. 12/24 | ||
dalek | kudo/nom: 047db4b | lizmat++ | src/core/Date (3 files): Streamline DateTime handling - main new logic now in .new($y,$m,$d,$h,$mi,$s,$t) which allows for coercion - no special format for small/large years - check-date/check-value helper functions removed - fixed some cases where multiple of a unit name would not be accepted - use native ints where possible - optimized earlier/later a bit - truncate-parts is now private method truncate-ymd |
||
timotimo | not sure if i've got sufficient privileges to see it if it was there | ||
lizmat learned a lot about dates/instants/datetimes and posix today | |||
diakopter | TimToady: should the title have a Day 24: prefix | ||
hankache | perlpilot there are a lot of 12/24 :) | ||
nine | lizmat: it's a ridiculously complex subject | 22:34 | |
lizmat | I actually found a few issues that I will try to look at tomorrow | ||
hankache | In my part of the word it's already 12/24 | ||
perlpilot | hankache: okay, WP says ... Scheduled 2015/12/24 | ||
hankache | perlpilot timezone? | 22:35 | |
perlpilot | hankache, I dunno really. I was kind of guessing UTC | ||
hankache, see ... your problem is that you're from the unevenly distributed future :) | 22:36 | ||
hankache | perlpilot :) | 22:37 | |
stmuk | has the behaviour of File::Find changed in the last 2 weeks? | 22:38 | |
perlpilot | Under WP's general config is a checkbox for "Show falling snow on my blog until January 4th" Why is that so much easier to find than the timezone | ||
? | |||
stmuk: my plan is to eventually make File::Find obsolete-ish by adding an option to dir() for recursion (there's already a :test for constraining what it returns) | 22:40 | ||
(or ... maybe if I just keep mentioning it here, someone will do it for me, 'cause it doesn't look like I'll have time to work on it until next year :) | 22:41 | ||
22:41
skids joined
|
|||
nine | perlpilot: next year isn't that far away | 22:41 | |
perlpilot: I for one plan to do no hacking at all the next couple of days :) | 22:42 | ||
Skarsnik | and when you will get back, you will get hundred of hungry mail about precompil stuff! | ||
perlpilot | nine: in addition to holiday festivities, I'm moving my family a few hundred miles (still in Texas though :) | ||
nine | And now: sleep. Good night #perl6 :) | ||
labster | lizmat++ | 22:43 | |
Skarsnik | Good night | ||
perlpilot | good night nine! | ||
labster | Good work on the DateTime mess. | ||
22:43
pierre-vigier left
22:45
pierre-vigier joined
|
|||
jdv79 | FROGGS: around? | 22:47 | |
22:49
pierre-vigier left,
pierre-vigier joined,
pierre-vigier left
|
|||
lizmat | labster: thank you, it has been on my radar for a while | 22:52 | |
having had to deal a lot with epoch / dates at former $work, I would like to see them faster :-) | 22:53 | ||
labster | Don't remind me I need to deal with dates at current $work | ||
I'm going to double-check that one of the changes doesn't break large years, though. | 22:54 | ||
dalek | kudo/nom: 18947f4 | lizmat++ | src/core/DateTime.pm: Fix for RT #127003 , zefram++ |
||
22:54
starless joined
|
|||
lizmat | labster: if it did, please add tests for them :-) | 22:55 | |
perlpilot | lizmat++ for DateTime, labster++ for double-checking :) | ||
lizmat | because all of my changes are spectest clean | ||
krshn | a long time perl user just getting started on perl6 | 22:56 | |
what is the best resource to start out with | |||
RabidGravy | docs.perl6.org | ||
Skarsnik | perl6intro? | ||
22:56
rindolf left
|
|||
labster | > DateTime.new(127317232781632218937129); | 22:56 | |
-2602446-2807173-1473579083988834741T17:38:49Z | |||
timotimo | github.com/rakudo/star/blob/master...course.pdf <- this one's pretty good | 22:57 | |
Skarsnik | that an interesting date | ||
labster | The same problem I ran into: anything that stores a year needs to be an Int. | 22:58 | |
krshn | thanks -- have been going through docs.perl6.org for a while. I was hoping something like Modern Perl or something | ||
docs.perl6.org is great though | |||
22:59
starless left
|
|||
Skarsnik | there is a perl6intro thingy but I can't remember the url x) | 22:59 | |
timotimo | perl6intro.com | ||
jdv79 | it looks like my pause changes got reverted. *sigh* | ||
krshn | timotimo: looks perfect. thanks | 23:00 | |
timotimo | have fun with it! :) | ||
23:00
molaf left
|
|||
krshn | loving perl6 so far. but still start writing perl 5 at the drop of the hat | 23:01 | |
the biggest hurdle for me is to think in terms of perl 6 | |||
labster | lizmat: Either we add a couple Ints, or we add a fast path for normal dates which use int, and a slow path for people who want years in the billions | 23:02 | |
krshn | let me throw a random question out there | 23:03 | |
Skarsnik | timotimo, any idea where this error could came from? travis-ci.org/Skarsnik/perl6-gumbo...s/98570710 the previous build (2 days) ago was working and I only changed nc lib path in this. The code pointed by the error is just given on a Int (github.com/Skarsnik/perl6-gumbo/bl...r.pm6#L63) | ||
krshn | i am a scientist and have always wanted to code only in perl.. will perl6 be my goto language for scientific computing? | ||
lizmat | labster: year is already supposed to be an Int... | 23:04 | |
krshn | I am currently moving from matlab -> julia and it has been good so far .. but in my opinion, perl6 can be a very good competitor to julia for scientific computing too.. any thoughts? | 23:05 | |
Skarsnik | No idea. It's not really fast and it does not have lot of testing for Math like other language could have | ||
krshn | it has multiple dispatch, native types | 23:06 | |
Skarsnik | but since it's easy to create sub language in perl6 with the slang, it can probably be interesting x) | ||
krshn | so potentially, there is hope | ||
timotimo | Skarsnik: that's weird. i don't see an instance of infix:«<» in that code | ||
hankache | krshn scientific computing relies most of the time on functional programming | ||
as a matter of fact Perl 6 can be used for functional programming | 23:07 | ||
labster | lizmat: here github.com/rakudo/rakudo/blob/nom/...ime.pm#L98 | ||
hankache | it has lazy lists, junctions, hyperoperator, feed operator (pipe) | ||
lizmat | labster++ | ||
perlpilot | hankache: heh, "can be"? that's an understatement :) | ||
timotimo | scientific computing probably also relies on a bunch of matrix manipulation and vector arithmetic and statistics on big series of numbers and such | 23:08 | |
krshn | thats my point too .. perl6 has a lot of potential | ||
hankache | perlpilot: s/can be/is | ||
krshn the way I see it, Perl 6 is a mutant, it copied every cool feature from every language out there | 23:10 | ||
23:10
perlpilot left
|
|||
timotimo | that'd make it more of a chimera, IMO | 23:10 | |
hankache | :D | ||
krshn | haha :-) | ||
labster | lizmat: $a and $c and probably $e need to be Int. Which is why I'm starting to think we need a pessimized path. | ||
23:10
cpage_ left
|
|||
lizmat | labster: not before Christmas | 23:12 | |
but yeah :-) | 23:13 | ||
it appears we need an extended format after all :-( #127007 | 23:14 | ||
labster | All of these ISO edge cases make me want to restrict core DateTime to RFC 3339. | 23:15 | |
23:16
cygx joined
|
|||
cygx | o/ | 23:16 | |
krshn: perl6 has native arrays and ffi, so it just takes someone to write a bunch of wrappers over the appropriate fortran libs | |||
timotimo | fortran has a different order for multi-dimensional arrays than c (and perl6) do | 23:17 | |
cygx | just write an AT-POS that mangles the index, and you're good to go | 23:18 | |
labster | Are we frozen for v6.c, or can I continue to commit bugfixes? | ||
cygx | (assuming you fortran lib uses ISO_C_BINDING) | ||
don't know off-hand what's required for native fortran bindings | 23:19 | ||
grondilu | Perl 6 for functional programming? Not really. No tail recursion. | ||
Skarsnik | spec are freezed I think, but bug fix or unspeced stuff could change I think | ||
RabidGravy | Hmm, the gdbm thing works a lot better without an error callback | ||
krshn | actually, let me ask it from the other angle.. is there anything that structurally constrains perl6 from being good at scientific computing? | ||
RabidGravy | anyway, ttfn | ||
timotimo | ttyl RabidGravy | 23:20 | |
scientific computing was always something we wanted for perl 6 to be good for | |||
grondilu | just make a R slang and be done with it | ||
timotimo | hehe. | ||
AlexDaniel | haha :) | 23:21 | |
krshn | thats exactly my impression from summarily reading about perl6 features | ||
wow.. if perl6 does scientific computing, my 10+ years wait will be over -- I started with perl5 10 years ago :-) | 23:22 | ||
AlexDaniel | krshn: yeah. In that sense the possibilities are endless | ||
krshn: I think that it needs just a little bit of time for all such things to be written | 23:23 | ||
krshn | i meant, 10+ years of wait will be worth it | ||
cygx | interesting side note: C99 was basically the attempt to eat fortran's lunch regarding scientific computing | ||
tgmath.h, _Complex, variable-length arrays, restrict, ... | |||
lizmat | labster: bugfix away, I know I am... | ||
AlexDaniel | m: say τ² + ½ | 23:24 | |
camelia | rakudo-moar 18947f: OUTPUT«39.9784176043574» | ||
lizmat | labster: but aren't we at least internally working with RFC 3339 ? | ||
23:24
RabidGravy left
|
|||
AlexDaniel | krshn: ↑ though it already has a lot of cool stuff :) | 23:24 | |
cygx | .oO( whatever happened to Fortress? ) |
23:25 | |
krshn | yep. I have been on-and-off on perl6 over the past 10 years .. but now, I am going to make a serious attempt at writing all perl in perl6 | 23:26 | |
jdv79 | so, the perl field value in META6.json should be v6 or 6? | ||
AlexDaniel | krshn: great! Make sure to report all bugs that you find :) | ||
krshn: if you stumble upon any | |||
jdv79 | since we've now concluded, it seems, that version should not have the v in string form | ||
23:28
kid51 joined
|
|||
krshn | does anyone know when a camelia book will be out? | 23:28 | |
AlexDaniel | grondilu: well, you can still use tail recursion. It's just that there's no tail call elimination :) | 23:29 | |
23:30
kaare_ left
|
|||
lizmat | $ 6 'DateTime.new(127317232781632218937129).say' | 23:30 | |
+4034522497029953-07-13T17:38:49Z # labser | |||
labster ^^^ | |||
krshn | when I try to install the latest version of perl6, I get Could not find symbol '&bool' | 23:37 | |
timotimo | ah, yes. you'll have to kill your install folder to make that part go away | ||
Skarsnik | hm, you install with what? | ||
krshn | An exception occurred while evaluating a constant at /home/krshn/local/linux/share/perl6/sources/0FD28AE1C9590AB6C8A04A508BF05A7043967B19:13 Exception details: Could not find symbol '&bool' in block at /home/krshn/local/linux/share/perl6/sources/0FD28AE1C9590AB6C8A04A508BF05A7043967B19:13 | 23:38 | |
jdv79 | woohoo. fixed. | ||
Skarsnik | timotimo, How I can track down commit? (to find the culprit of my infix < error) | ||
timotimo | "git bisect" helps with that | ||
23:38
AndyDee joined
|
|||
jdv79 | that's the fastest pause fix ever. < 1h. | 23:38 | |
dalek | ast: 38e9881 | lizmat++ | S32-temporal/DateTime.t: Test for RT #127003 |
||
ast: 0fa2c59 | lizmat++ | S32-temporal/Date (2 files): Seems we need an extended format after all |
|||
krshn | checkout out rakudo from git | ||
nom branch | |||
timotimo | don't forget to always checkout the tools/build/NQP_REVISION and tools/build/MOAR_REVISION inside nqp | 23:39 | |
krshn | doesn't this do it for me? perl Configure.pl --gen-moar --gen-nqp --backends=moar --prefix=$HOME/local/linux | ||
Skarsnik | it should work | 23:40 | |
you just did it? no previous checkout? | |||
23:40
Ben_Goldberg joined
|
|||
krshn | so I am getting this error for the first time.. installed it this way 5-6 times in the past | 23:40 | |
timotimo | krshn: yeah, files left over are causing this problem, i believe | 23:41 | |
Skarsnik | yes, but is that a clear rakudo directory? | ||
timotimo | i personally have the install folder for perl6 only so i can wipe it if necessary | ||
Skarsnik | because for now the whole stuff does not like old stuff x) | ||
krshn | Skarsnik: yes.. my rakudo is clean | ||
dalek | kudo/nom: 8955469 | lizmat++ | src/core/Date (3 files): Fixes for RT #127005 and RT #127007, zefram++ Plus additional large year value fixed prompted by labster++ |
||
krshn | but as timotimo said, it could be left over from previously | ||
is there a way to delete it ? | |||
timotimo | nothing like "make uninstall"; only rm can do it for you | 23:42 | |
krshn | I tried deleting only that dir but got a bunch of errors after that | ||
timotimo | which dir exactly? | ||
$HOME/local/linux ? | |||
krshn | No.. deleted /home/krshn/local/linux/share/perl6/sources/ | ||
atweiden | timotimo: in JSON::Fast source, lib/JSON/Fast.pm:54 isn't compiling on rakudo 2015.11 | 23:43 | |
Unable to parse expression in argument list; couldn't find final ')' | |||
lizmat | oops s/127005/127004/ | ||
cygx | krshn: get rid of the whole perl6/ thing | ||
timotimo | atweiden: let me have a look | ||
krshn | ok.. I was hesitant doing that :-( | ||
timotimo | atweiden: is that the version that's inside panda? | 23:44 | |
atweiden | this is git head | ||
but i believe it's the same | |||
timotimo | can you tell me your exact rakudo version? | 23:45 | |
also, does "STATEMENT_LIST('hi')" work for you? | |||
like, in a perl6 -e ? | |||
atweiden | it's the 2015.11 release, compiled as github.com/atweiden/pkgbuilds/blob...o/PKGBUILD | ||
timotimo | oh! | ||
you said 2015.11 | |||
sorry about that | |||
yeah, that's incompatible | 23:46 | ||
atweiden | i figured | ||
timotimo | you'll need an earlier JSON::Fast for that | ||
atweiden | so it works on nom? | ||
krshn | cygx: that worked. thanks. | ||
cygx | krshn: when in doubt, go with the nuclear option ;) | 23:47 | |
krshn | anyone one know happened .. why the complaints? | ||
hehe :-) | |||
cygx | something-something change of version scheme | ||
Skarsnik | lot of change in precompiled stuff + change everywhere | ||
krshn | is that a recommended workflow when upgrading perl6 -- or this is transient because of so many things changing? | 23:48 | |
timotimo | it does work on nom, yes | ||
krshn | I mean the nuclear option :-) | ||
Skarsnik | nuke option is the way x) | ||
timotimo | in 2015.11 you'll probably just have to replace STATEMENT_LIST with SEQ | ||
can you try that, atweiden? | 23:49 | ||
cygx | krshn: it's supposed to be a one-time thing... until the next time it becomes necessary ;) | ||
atweiden | timotimo 1 sec | ||
krshn | got it :-) | ||
dalek | ast: 2763fa2 | lizmat++ | S32-temporal/DateTime.t: Add tests for RT #127004 |
||
krshn | how does something like this work -- perl6 -e 'm: say pi²' | 23:50 | |
Skarsnik | timotimo, I mean, is there an easy way to deal with the triple npq/rakudo/moar to check old version ? x) | ||
krshn | is pi a predefined variable? | ||
timotimo | m: say pi | ||
camelia | rakudo-moar 18947f: OUTPUT«3.14159265358979» | ||
Skarsnik | pi is a constant | ||
nebuchadnezzar | m: my $s = "A\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]"; $s.NFD.map(&uniname).map(&say); | ||
camelia | rakudo-moar 18947f: OUTPUT«LATIN CAPITAL LETTER ACOMBINING DOT BELOWCOMBINING DOT ABOVE» | ||
timotimo | m: pi = "hi" | ||
camelia | rakudo-moar 18947f: OUTPUT«Cannot modify an immutable Num in block <unit> at /tmp/g6Z_B9QU_a:1» | ||
timotimo | Skarsnik: delete the nqp and moar installations and use --gen-moar --gen-nqp | 23:51 | |
labster | m: say π; | ||
camelia | rakudo-moar 18947f: OUTPUT«3.14159265358979» | ||
Skarsnik | the gen try to match the rakudo version? | ||
krshn | m: pi = "hi" | ||
camelia | rakudo-moar 895546: OUTPUT«Cannot modify an immutable Num in block <unit> at /tmp/U86QMCcP6G:1» | ||
timotimo | Skarsnik: yes | ||
m: say e | |||
camelia | rakudo-moar 895546: OUTPUT«2.71828182845905» | ||
timotimo | m: say i | ||
camelia | rakudo-moar 895546: OUTPUT«0+1i» | ||
krshn | m: my pi = "hi" | ||
camelia | rakudo-moar 895546: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TyetOZDbokMalformed myat /tmp/TyetOZDbok:1------> 3my pi7⏏5 = "hi"» | ||
nebuchadnezzar | interesting, in REPL I got “(True True True)” at the end of my chained map | 23:52 | |
Skarsnik | m: my constant pi = "hi"; | ||
camelia | ( no output ) | ||
23:52
smls_ left
|
|||
krshn | so you cannot use pi as a variable in code? | 23:53 | |
timotimo | m: my \pi = 100 | ||
camelia | ( no output ) | ||
timotimo | you can | ||
m: my \pi = my $ = 4; pi++; say pi | 23:54 | ||
camelia | rakudo-moar 895546: OUTPUT«5» | ||
Skarsnik | most variable have sigil so.. | ||
timotimo | if you just have "my \pi = 4", you'll end up with something write-once. if you put a scalar in there, however, it just means you can't replace the scalar with another scalar. but the value inside is changable | ||
hankache | krshn but pi is already defined | ||
krshn | m: my $pi=3; say $pi; | 23:55 | |
camelia | rakudo-moar 895546: OUTPUT«3» | ||
krshn | duh.. | ||
:-) | |||
what does \pi do? | |||
hankache | m: say pi; | ||
camelia | rakudo-moar 895546: OUTPUT«3.14159265358979» | ||
timotimo | that's how you define a sigil-less variable | ||
krshn | sigil-less variables. hmm interesting.. | 23:56 | |
dalek | ast: 06bacaa | lizmat++ | S32-temporal/DateTime.t: Add test for very large epochs, labster++ |
||
timotimo | yeah, they are a SSA kind of thing - unless the thing you put into them is a scalar container like i showed above | 23:57 | |
krshn | m: my \hello = "world"; say hello ~ " world"; | ||
camelia | rakudo-moar 895546: OUTPUT«world world» | ||
krshn | m: my \hello = "world"; hello ~= " world"; say hello; | 23:58 | |
camelia | rakudo-moar 895546: OUTPUT«Cannot modify an immutable Str in block <unit> at /tmp/8W_daerOWu:1» | ||
lizmat | will look at the rest of zefram++ 's DateTime related tickets tomorrow | ||
for now, good night #perl6! | |||
krshn | m: my \hello = "world"; \hello ~= " world"; say hello; | ||
camelia | rakudo-moar 895546: OUTPUT«Cannot assign to an immutable value in block <unit> at /tmp/C4_V7y_nMR:1» | ||
krshn | so sigil-less are always immutable? | 23:59 |