»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:00 atweiden left
dha I just noticed that C<my $foo = "ha";say "beep" if $foo == 0;> works differently in p6 than it does in p5. It looks like in p5 it treats a string with no digits as 0 in a numeric context, but p6 errors out. 00:08
I assume that's intentional?
TimToady yes 00:09
we also treat string '0' as true now, and only '' is false 00:10
on the theory that each normal type should have one distinguished false value, not two...
00:11 [Tux] joined
TimToady (and because p6 knows the difference between a string and a number to a greater extent than p5 does) 00:11
dha aha.
timotimo we should have an opt-out to get a 0 that's True ... like 00 instead of just 0. you know, to go with "0" ... because "" vs "0" created the rule that putting a 0 in front makes it true 00:12
TimToady a lot of the differences keep coming back to the type system, because a lot of the original RFCs were underlyingly complaints about the lack of one
timotimo i think my brain is desperate for some sleep 00:13
TimToady that's so 00
b2gills m: my $a = 0 but True; say $a if $a 00:14
camelia rakudo-moar 4a7219: OUTPUT«0␤»
TimToady well, if you want a 2-character 0 that is true, try ~0 then :P
timotimo that looks a tiny bit like a winking emoticon 00:15
TimToady m: my $a = ~0; say $a if $a
camelia rakudo-moar 4a7219: OUTPUT«0␤»
dha m: my $a = -0;say $a if $a
camelia ( no output )
dha uh...
why did we just get different results? 00:16
TimToady guesses dha's font makes ~ look like -
dha Upon closer looking, yeah. I think I need new glasses.
geekosaur or just a better font; ~ sucks in some of them
TimToady you just need one lens specialized for ~, and the other specialized for -
dha :-) 00:18
Actually, this is not the only reason I need new glasses, so I should really deal with that at some point...
timotimo deal with it at the focal point :) 00:19
timotimo disappears into the night
00:22 Peter_R left 00:27 laouji joined, BenGoldberg joined
TEttinger unifont remains very legible! 00:28
00:28 asdf12z_ left 00:29 vendethiel joined
geekosaur I always found unifont to be ugly as sin 00:30
japhb Just how ugly do you find sin to be? 00:36
ugexe m: my @bar = eager gather for 1,2,3 -> $i { my %foo; take { %foo }; %foo{$i} = $i; }; say @bar.perl
camelia rakudo-moar 4a7219: OUTPUT«[{}, {}, {}]<>␤»
ugexe darn 00:37
hoelzro m: sub foo:bar($/) { ... } 00:38
camelia rakudo-moar 4a7219: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cgdyPA6dES␤Colon pair value '$/' too complex to use in name␤at /tmp/cgdyPA6dES:1␤------> 3sub foo:bar($/)7⏏5 { ... }␤»
hoelzro m: sub foo:bar ($/) { ... }
camelia ( no output )
hoelzro is that expected?
TEttinger geekosaur, ugly but clear at least. Inconsolate is quite pretty and I think is legible
*Inconsolata
00:39 mr-foobar left, laouji left
TEttinger www.fontsquirrel.com/fonts/Inconsolata but ~ and - remain very similar, especially at size 12 00:39
00:39 laouji joined
TimToady hoelzro: yes, pair notation, with a few exceptions, generally slurps up any following circumfixish chars 00:40
hoelzro TimToady: so longname methods need the space?
TimToady m: sub foo:bar[]($/) { ... }
camelia rakudo-moar 4a7219: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
TimToady m: sub foo:bar()($/) { ... }
camelia rakudo-moar 4a7219: OUTPUT«===SORRY!===␤Cannot find method 'ast'␤»
TimToady hmm 00:41
geekosaur yeh, inconsolata's pretty good
TimToady m: sub foo:bar<>($/) { ... }
camelia rakudo-moar 4a7219: OUTPUT«5===SORRY!5===␤Null operator is not allowed␤at /tmp/NOQ3S2MrAv:1␤------> 3sub foo:bar<>7⏏5($/) { ... }␤Other potential difficulties:␤ Pair with <> really means an empty list, not null string; use :bar('') to represent the null string…»
TimToady heh
just use the space
00:41 laouji left
hoelzro you got it =) 00:42
TimToady m: sub foo:bar<x>($/) { ... } 00:43
camelia rakudo-moar 4a7219: OUTPUT«5===SORRY!5=== Error while compiling /tmp/soICC62wKA␤Cannot add tokens of category 'foo'␤at /tmp/soICC62wKA:1␤------> 3sub foo:bar<x>7⏏5($/) { ... }␤»
TimToady std: sub foo:bar<x>($/) { ... }
camelia std 28329a7: OUTPUT«ok 00:00 138m␤»
TimToady rakudo doesn't quite believe in pair-extended names the way std does
std: sub foo:bar<x>($/) { ... }; foo:bar<x>() 00:45
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routine:␤ 'foo:bar<x>' used at line 1␤Check failed␤FAILED 00:00 139m␤»
TimToady hmm 00:46
std: sub foo:bar<x> ($/) { ... }; foo:bar<x>()
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routine:␤ 'foo:bar<x>' used at line 1␤Check failed␤FAILED 00:00 139m␤»
TimToady interesting
std: sub foo:bar<x> ($/) { ... }; foo() 00:47
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routine:␤ 'foo' used at line 1␤Check failed␤FAILED 00:00 139m␤»
00:47 dha left
TimToady thinks that used to work better 00:47
flussence std: sub foo:bar<x> ($/) { ... }; bar()
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routine:␤ 'bar' used at line 1␤Check failed␤FAILED 00:00 139m␤»
00:48 captain-adequate left 00:50 laouji joined, vendethiel left 00:52 Akagi201 joined 00:54 tinyblak joined
skids m: sub a (:$a, :$b){ $a.say; $b.say }; my %f = (:a(0)); a(|%f, :b(1)); 00:56
camelia rakudo-moar 4a7219: OUTPUT«0␤1␤»
skids m: sub a (:$a, :$b){ $a.say; $b.say }; my %f = (:a(0)); a(:a(2), :a(3), :b(1));
camelia rakudo-moar 4a7219: OUTPUT«3␤1␤»
skids m: sub a (:$a, :$b){ $a.say; $b.say }; my %f = (:a(0)); a(|%f, :a(3), :b(1));
camelia rakudo-moar 4a7219: OUTPUT«Unexpected named parameter 'a' passed␤ in sub a at /tmp/0GpneSrcPJ:1␤ in block <unit> at /tmp/0GpneSrcPJ:1␤␤»
skids m: sub a (:$a, :$b){ $a.say; $b.say }; my %f = (:a(0)); a(:a(3), |%f, :b(1));
camelia rakudo-moar 4a7219: OUTPUT«Unexpected named parameter 'a' passed␤ in sub a at /tmp/07JVz0crLm:1␤ in block <unit> at /tmp/07JVz0crLm:1␤␤»
skids Oh hey someoe else noticed RT#77788 yesterday coincientally 00:59
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=77788
01:08 rmgk left, yeahnoob joined, mr-foobar joined 01:10 rmgk joined 01:14 raiph left, vendethiel joined, VinceDee left 01:21 yqt left
dalek osystem: 4b83f6c | (Sterling Hanenkamp)++ | META.list:
Adding ArrayHash to the ecosystem
01:27
01:29 raiph joined 01:32 dayangkun joined 01:35 atroxaper joined
skids zostay++ those will be useful. 01:38
(Though .push gets confusing given what Hash.push does in core.)
01:39 atroxaper left
zostay i tried to do something like the same 01:47
the operations are hashish or arrayish based upon the type of arguments
01:49 tinyblak left 01:50 aborazmeh joined, aborazmeh left, aborazmeh joined 01:54 tinyblak joined
skids Right, but Hash.push does this: 01:56
m: my %f = :b; %f.push((:b)); %f.say
camelia rakudo-moar 4a7219: OUTPUT«b => True True␤»
skids But also:
m: my %f = :b; %f.push(:b); %f.say 01:57
camelia rakudo-moar 4a7219: OUTPUT«b => True␤»
skids m: my %f = :b; %f.push(:b(1)); %f.say
camelia rakudo-moar 4a7219: OUTPUT«b => True␤»
skids ...does nothing with bare pairs as named args.
So maybe a better thing would be for ArrayHash.push to replace when given named parameters, and do what Hash.push does with positional pairs. 01:58
01:59 TimToady left, vendethiel left 02:00 TimToady joined 02:04 noganex_ joined
skids KnottyPairs are a nice clever little idea, too, BTW. 02:05
02:07 noganex left, vendethiel joined 02:12 geekosaur left, geekosaur joined 02:26 nys left 02:28 vendethiel left 02:31 nys joined 02:36 raiph left
zostay thx... i'm not sure how to copy with that... i don't fully understand all the ways in which pairs behave... they still seem strange to me at times 02:52
m: sub t(*@a, *%v) { @a.perl.say; %v.perl.say }; t("a" => 1); t(a => 1); 02:53
camelia rakudo-moar 4a7219: OUTPUT«[:a(1)]<>␤{}<>␤[]<>␤{:a(1)}<>␤»
zostay for example ^^^
s/copy/cope/ 02:54
anyway, definitely happy to entertain suggestions and patches
02:56 AlexDaniel left
skids zostay: that might be a bug, I dunno. 02:59
zostay sure, but i find the difference between (:b) and :b to be equally subtle and confusing even when i grok what's happening 03:01
=> as a constructor has some really interesting power, but there were some things that were nice about it just being a magic comma
03:14 raiph joined 03:15 aborazmeh left 03:17 tinyblak left 03:22 ShimmerFairy left 03:34 ShimmerFairy joined 03:37 nys left
raiph .tell masak jnthn, timtoady, froggs, on unbound names / interface consistency: gist.github.com/raiph/84050de6bb3decb69937 03:50
yoleaux raiph: I'll pass your message to masak.
03:51 atroxaper joined 03:53 laouji left 03:59 khw left
dalek kudo/nom: c8d1126 | (Nick Logan)++ | src/core/CompUnitRepo/Local/Installation.pm:
remove parrot /bin wrapper creation
04:10
kudo/nom: b35c39f | lizmat++ | src/core/CompUnitRepo/Local/Installation.pm:
Merge pull request #453 from ugexe/patch-3

remove parrot bin/ wrapper creation
04:17 dayangkun left 04:24 dayangkun joined, BenGoldberg left 04:28 tinyblak joined 04:29 dayangkun left 04:37 dayangkun joined 04:43 amurf joined 04:46 laouji joined 04:47 amurf left
dalek ar: 9e1b5fa | FROGGS++ | docs/announce/2015.06.md:
unmention JVM, too many modules fail
05:03
05:05 raiph left 05:06 kaare_ joined 05:18 vendethiel joined 05:20 aborazmeh joined, aborazmeh left, aborazmeh joined, aindilis left, aindilis joined 05:23 vendethiel left 05:24 vendethiel joined 05:25 gfldex joined, laouji left 05:26 laouji joined 05:31 quester joined 05:32 atroxaper left 05:36 Alina-malina left 05:37 Alina-malina joined 05:41 atroxaper joined 05:42 atroxaper left 05:43 atroxaper joined 05:46 Psyche^_ joined 05:50 Alina-malina left, Psyche^ left 06:02 aborazmeh left 06:06 |Tux| left, ][Sno][ left, skids left 06:07 |Tux| joined, FROGGS left 06:09 diana_olhovik_ joined, vendethiel left 06:14 vendethiel joined 06:17 Sqirrel left 06:22 [Sno] joined
masak morning, #perl6 06:30
yoleaux 03:50Z <raiph> masak: jnthn, timtoady, froggs, on unbound names / interface consistency: gist.github.com/raiph/84050de6bb3decb69937
masak reads that gist 06:31
clearly relevant for #perl6: elm-lang.org/blog/compiler-errors-for-humans -- HN discussion: news.ycombinator.com/item?id=9805978 06:32
06:33 Firedancer left
masak "It is kind of shocking how much better things get when you focus on the user." 06:33
06:36 vendethiel left, FROGGS joined 06:38 vendethiel joined
masak raiph: ok, both TimToady and FROGGS suggest throwing a warning in the backlog. I'm probably slow here, but isn't an implicit *%_ and then a warning kind of like inviting someone for dinner and then slapping them for taking food? 06:38
ShimmerFairy "color is a huge usability improvement." and yet their error messages look like walls of one color to me :P
masak raiph: I mean, if we're warning at the end, couldn't we just drop implicit *%_ altogether, and have the program die at bind-time instead? 06:39
FROGGS masak: warning about something is like deprecating that something.... I think I said that too in that context
masak right.
06:39 _mg_ joined
ShimmerFairy Good thing we have a deprecation warning setup, then :) 06:39
masak nonono 06:40
FROGGS masak: so *if* we warn, the implicit *%_ is just a thing that helps us to warn
masak *sigh*
I'm not getting through here.
FROGGS masak: and then we can think about removing the *%_ entirely
masak ok.
FROGGS but, I'm not sure either way
moritz masak: deprecation warnings are only for a transitional period
FROGGS I just see that *%_ seems to be confusing for some people
masak I think *%_ and then warning is literally the worst of all possible worlds. I hope we don't get stuck in that combination. 06:41
ShimmerFairy me too. *%_ should just not be there
masak implicit *%_ is a case of "ok, you thought about this carefully at the design stage. it just didn't end up being beneficial in the implementation." 06:42
moritz one could issue a deprecation warning when an implicit *%_ receives a value at run time
ShimmerFairy always finds the "interface consistency" funny when you consider subs never had *%_
06:42 mr-foobar left
ShimmerFairy *argument 06:42
06:45 atweiden joined
FROGGS moritz: that was also what we (bartolin and me) were thinking 06:48
like: "Gosh, we just dropped a named argument" 06:49
though, I don't think this will work out that nicely
we'll get false positives all over the place
masak false positives? 06:50
FROGGS we will warn too often 06:51
like, you add another named arg to class A, and class B, which A inherits from, warns about that extra arg for methods that B does 06:52
so you have to tell 'upstream' to change their code, which is crap
masak that's what interface consistency was meant to solve, no? 06:53
FROGGS exactly
masak "we can warn when people rely on the feature, but that will get in the way of people correctly relying on the feature"
why do I feel like there's no way to win in this scenario? 06:54
06:56 Ven joined
FROGGS I dunno, but I share that feeling 06:56
'guess we need a third option :o)
06:58 rindolf joined
atweiden hey guys, i am wondering if this is a gap in my knowledge or rakudobug 06:58
gist.github.com/atweiden/00aee14e2ed59471bb59 06:59
am trying to make copy of %wallet, then update the copy in place (%wllt). I use a scalar container explorer subroutine 'in_wallet' for this, then return the copy.
the subroutine 'in_wallet' appears to be updating both %wallet and the copy of %wallet (%wllt). i have tried passing %wallet 'is copy' with identical results
masak atweiden: yes, you're just copying the reference
that's generally true with objects
07:00 vendethiel left
atweiden hmm, i assumed i would need to use ':=' to point to the original class's container for that 07:02
how should i pass %wallet as a copy only? 'is readonly'?
07:02 FROGGS left
masak you need to make a new hash and put the entries from the old hash in the new hash 07:02
though an explicit .clone might work too 07:03
atweiden so does 'is copy' not work with objects? 07:04
masak basically not. it doesn't do what would be least-surprise.
atweiden eh, it makes some sense as i never instantiated a new wallet class. 07:05
masak bit tied up right npw 07:06
now*
might be able to help you more later
atweiden i think i have all the help i will need, it should be straight forward tyvm masak 07:07
07:08 Ven left 07:10 salv0 joined 07:15 tinyblak left 07:16 vendethiel joined
masak rest of channel: idiomatic way to clone a hash? 07:16
07:17 Ven joined
ShimmerFairy masak: my %newhash = gather for %oldhash { take $_ } ? 07:20
07:21 abraxxa joined, darutoko joined
Ven o/, #perl6 07:22
masak ShimmerFairy: useless use of gather ;)
ShimmerFairy: that's just `my %newhash = %oldhash`, at least pre-GLR
Ven: \o
07:24 zakharyas joined 07:30 dayangkun left
atweiden masak: appears to be working with for %wallet.kv -> $silo, $wallet { %wllt{::($silo)} = $wallet.clone; } 07:30
07:32 telex left, tinyblak joined 07:33 Psyche^_ left
JimmyZ my $newhash = %oldhash.clone? 07:33
07:33 Psyche^ joined
JimmyZ %newhash 07:33
07:34 telex joined 07:35 steve_mc joined 07:37 vendethiel left
Ven m: sub dynidx(@a, $n) { Proxy.new(FETCH => { @a[$n] }) }; my @a = 1, 2, 3; my $i = dynidx(@a, 1); say $i; @a[1] = 50; say $i; 07:40
camelia rakudo-moar b35c39: OUTPUT«2␤2␤»
Ven m: sub dynidx(@a, $n) { Proxy.new(FETCH => { @a[$n] }) }; my @a = 1, 2, 3; my $i := dynidx(@a, 1); say $i; @a[1] = 50; say $i;
camelia rakudo-moar b35c39: OUTPUT«2␤50␤»
Ven is reading blogs.perl.org/users/david_mertens/...erl-6.html
07:42 g4 joined, g4 left, g4 joined 07:43 RabidGravy joined 07:46 atroxaper left 07:48 quester left
RabidGravy morning 07:51
masak \o 07:52
07:56 dayangkun joined
ShimmerFairy I found a bug: 07:56
my @a = 1,2,3; my @b = 2,3,4; my @c = 3,5,7; my $Z; for (@a; @b; @c) { say $_ }
m: my @a = 1,2,3; my @b = 2,3,4; my @c = 3,5,7; my $Z; for (@a; @b; @c) { say $_ }
camelia rakudo-moar b35c39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QTu2xSaIiG␤Unsupported use of C-style "for (;;)" loop; in Perl 6 please use "loop (;;)"␤at /tmp/QTu2xSaIiG:1␤------> 3y @b = 2,3,4; my @c = 3,5,7; my $Z; for 7⏏5(@a; @b; @c) { say $_ }␤»
ShimmerFairy m: my @a = 1,2,3; my @b = 2,3,4; my @c = 3,5,7; my $Z; for (@a; @b) { say $_ }
camelia rakudo-moar b35c39: OUTPUT«1 2 3␤2 3 4␤»
masak notabug, methinks 07:57
ShimmerFairy How else should you compose a LoL in the for loop in this case? You can put a ; after @c as a workaround, at least
[@a; @b; @c], which would've been my guess for another way of doing it, doesn't actually work 07:58
07:59 domidumont joined
ShimmerFairy m: my @a = 1,2,3; my @b = 2,3,4; my @c = 3,5,7; my $Z; for ((@a; @b; @c)) { say $_ } 08:00
camelia rakudo-moar b35c39: OUTPUT«1 2 3␤2 3 4␤3 5 7␤»
ShimmerFairy ^ another workaround
08:00 atroxaper joined 08:03 domidumont left 08:04 domidumont joined, abraxxa1 joined 08:07 abraxxa left
ShimmerFairy m: say "AAA" ~~ / $<letter>=(A)**3 /; say "AAA" ~~ / $<letter>=(A)**{3} / 08:13
camelia rakudo-moar b35c39: OUTPUT«「AAA」␤ letter => 「A」␤ letter => 「A」␤ letter => 「A」␤「AAA」␤ letter => 「AAA」␤»
ShimmerFairy What's with the different behavior here? In code, I'm using a dynamic variable, which demands the **{} form, though I want the result you get from bare ** (as well as from a simple + quantifier) 08:14
masak ShimmerFairy: that does look like a bug. please submit, kthx.
ShimmerFairy just for reference to another quantifier: 08:15
m: say "AAA" ~~ / $<letter>=(A)+ /;
camelia rakudo-moar b35c39: OUTPUT«「AAA」␤ letter => 「A」␤ letter => 「A」␤ letter => 「A」␤»
ShimmerFairy masak: OK, I wasn't sure if there was some hidden super-good reason for it :P 08:16
masak not that I'm aware
08:16 dakkar joined 08:18 rindolf left 08:20 amurf joined
Ven blog.travis-ci.com/2015-06-30-cryst...travis-ci/ ooh, that's great to hear :) 08:21
ShimmerFairy masak: rakudobug'd :) 08:22
masak: btw, do you happen to know why (thing)**$*VARIABLE doesn't work, and you need the braces around $*VARIABLE? 08:23
08:24 Alina-malina joined 08:25 amurf left, domidumont left
masak ShimmerFairy++ 08:29
ShimmerFairy: historical raisins.
ShimmerFairy: `x ** y` used to also cover the semantic space that `x +% y` now covers. that is the `y` could be a string. 08:30
or a piece of regex.
jnthn morning, #perl6
masak the braces are there to catch some of these old thinkos.
not entirely sure it's still needed -- probably everyone has upgraded now. 08:31
jnthn: mornin'
Ulti /win 2 08:32
erk
jnthn
.oO( /fail 2 )
08:33
ShimmerFairy masak: to be fair, **$*VAR looks like you're doing something suspicious, when out of context :P 08:34
masak ShimmerFairy: well, you should usually put in the spaces, unless you're constrained by :s 08:35
ShimmerFairy masak: for whatever reason, I don't typically put space between the quantifier and the information it uses (so atom+ atom* atom? atom**3) 08:36
08:36 tinyblak left 08:41 laouji left, laouji joined 08:44 CharellKing joined
RabidGravy today starts with more dicking around with a twenty year old P5 module 08:45
jnthn Damn, that's probably older than some people on this channel... :) 08:48
masak ShimmerFairy: I think the difference (for me) is that `**` is an infix operator, and so I tend to put in the spaces. not so for the three postfixes `+*?` 08:51
08:53 tinyblak joined
ShimmerFairy masak: fair enough, I think when I first learned of ** my mind simply saw it as another quantifier, and decided on the whitespace conventions to match :) 08:54
masak never too late to change ;)
it *is* another quantifier. just an infix one.
jnthn We don't really parse it as an infix, iirc. 08:57
masak in that case, the regex slang has to have special postfix parsing 08:59
well, it has to anyway
since you can `a +`
masak .oO( it's a "postfix with benefits" )
RabidGravy |Tux|, you're an HP-UX type of guy aren't you? Got a minute to test Term::Cap to see if an injudicious merge has been un-done? 09:02
09:03 Alina-malina left
masak .oO( "You're an HP-UX type of guy, aren't you? Find your perfect match here! [link]" ) 09:03
|Tux| :) 09:04
RabidGravy, do you want your own HP-UX account?
RabidGravy Oooooh 09:05
yeah that would be cool, I can banish this forever then ;-)
|Tux| see private dialog 09:06
jnthn m: my @a = [1,2],[3,4]; say @a[0;0] 09:09
camelia rakudo-moar b35c39: OUTPUT«1␤»
jnthn m: my @a = [1,2],[3,4]; my @x = 0,0; say @a[|@x]
camelia rakudo-moar b35c39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/n8J7z8KgOo␤Arg-flattening | is only valid in an argument list␤at /tmp/n8J7z8KgOo:1␤------> 3 @a = [1,2],[3,4]; my @x = 0,0; say @a[|7⏏5@x]␤»
jnthn m: my @a = [1,2],[3,4]; my @x = 0,0; say @a[||@x] 09:10
camelia rakudo-moar b35c39: OUTPUT«5===SORRY!5===␤Arg-flattening | is only valid in an argument list␤at /tmp/a8P4TFhoQw:1␤------> 3 @a = [1,2],[3,4]; my @x = 0,0; say @a[|7⏏5|@x]␤Arg-flattening | is only valid in an argument list␤at /tmp/a8P4TFhoQw:1␤------> 3@a = [1,…»
jnthn m: my @a = [1,2],[3,4]; my @x = 0,0; say postcircumfix:<[ ]>(@a, |@x)
camelia rakudo-moar b35c39: OUTPUT«0␤»
jnthn m: my @a = [1,2],[3,4]; my @x = 0,0; say postcircumfix:<[ ]>(@a, ||@x)
camelia rakudo-moar b35c39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KdPkoouMHc␤Variable '&prefix:<|>' is not declared␤at /tmp/KdPkoouMHc:1␤------> 3 @x = 0,0; say postcircumfix:<[ ]>(@a, |7⏏5|@x)␤»
jnthn m: :x(3,3,3) 09:13
camelia ( no output )
jnthn m: :x(3,3,3).perl.say
camelia rakudo-moar b35c39: OUTPUT«:x($(3, 3, 3))␤»
jnthn m: :x(3;3;3).perl.say
camelia rakudo-moar b35c39: OUTPUT«:x((3; 3; 3).item)␤»
09:13 espadrine joined 09:16 atroxaper left 09:18 sjn_phone joined, mr-foobar joined 09:25 tinyblak left
jnthn .tell TimToady Was going through S09 in prep for working on multi-dim stuff and spotted various things that seem a little off or in need of review/decisions: gist.github.com/jnthn/fa6a9a3618ae322cb581 09:26
yoleaux jnthn: I'll pass your message to TimToady.
09:38 atroxaper joined
Ulti can I make an argument for .Bag on Str to be more like Str.comb.Bag? 09:41
09:41 Ven left
Ulti kind of unlikely when someone calls bag on a string they meant a bag with nothing in apart from the string :/ not entirely sure when that would ever be useful? 09:42
09:43 |Tux| left
Ulti m: say "hello".Bag 09:43
camelia rakudo-moar b35c39: OUTPUT«bag(hello)␤»
Ulti m: say "hello".comb.Bag
camelia rakudo-moar b35c39: OUTPUT«bag(l(2), e, h, o)␤»
09:44 cognominal left 09:45 sjn_phone_ joined
Ulti if you wanted a bag with just the string in you could still do bag("hello") 09:46
09:47 sjn_phone left 09:48 sjn_phone joined, smls joined 09:49 sjn_phone_ left 09:50 |Tux| joined
smls would post a comment on run4flat's blog, but it looks like the login/comment system on blogs.perl.org is utterly borked... :( 09:53
DrForr I just posted something last night, it seemed to work. 09:54
09:55 |Tux| left
smls strange 09:55
09:55 |Tux| joined, atroxaper left
smls looks like I'm not the only one for whom it's broken: github.com/blogs-perl-org/blogs.pe...issues/294 09:57
09:58 atroxaper joined 09:59 yeahnoob left 10:00 atweiden left, abraxxa1 left 10:04 abraxxa joined
RabidGravy |Tux|++ # he's the man with the HP-UX plan! 10:06
10:10 amurf joined 10:14 amurf left
smls DrForr: Could you post a comment to blogs.perl.org/users/david_mertens/...erl-6.html for me, with a link to smls2.wordpress.com/2015/07/01/re-...in-perl-6/ ? 10:15
DrForr Uh, not today :/ I guess this is the issue we're talking about. 10:16
10:16 _mg_ left
smls heh 10:17
DrForr Even after logging in. 10:18
10:18 gtodd left
DrForr I don't know how much I can say about this, but I can tell you these issues are being worked on. 10:18
10:19 domidumont joined, domidumont left 10:20 domidumont joined 10:23 VinceDee joined 10:24 CharellKing left 10:26 iH2O joined, tinyblak joined 10:31 iH2O left, tinyblak left, Akagi201 left 10:32 Akagi201 joined, tinyblak joined 10:34 CharellKing joined 10:35 RabidGravy left 10:36 dayangkun left, Akagi201 left 10:39 abraxxa left 10:45 |Tux| left, |Tux| joined 10:46 _mg_ joined 10:49 tinyblak left 10:51 TEttinger left 10:53 Ven joined 10:56 Ven_ joined, abraxxa joined, rindolf joined 10:58 Ven left 10:59 RabidGravy joined, Ven_ left
RabidGravy there 10:59
11:03 atroxaper left
DrForr Nailed it? 11:03
(whatever 'it' is...)
RabidGravy nope, just rebooted laptop due to "new kernel"
11:03 domidumont left
DrForr linode+irssi+screen = never having to say /quit :) 11:04
RabidGravy I remember them olden days when it took the Linux kernel ten years to go from 1 to 2, it appears to have go 3 -> 4+ in less than a year
11:05 tinyblak joined 11:06 Alina-malina joined 11:10 spintronic left, spintronic joined 11:12 atroxaper joined
smls DrForr: I managed to post a comment on blogs.perl.org after all, by logging in via OpenID using "openid.stackexchange.com" 11:15
11:19 RabidGravy left, Ven joined 11:24 sjn_phone left 11:27 smls left
masak just throwing this out there, since I'm thinking about it currently: for something like `my {{{$new-identifier}}};` or `sub foo({{{$param}}})` to work inside a quasi, these unquotes need to be sure they are getting an AST of the right type. maybe unquotes should require their content to be statically typed? 11:41
11:51 |Tux| left, Tux__ joined
ShimmerFairy masak: I think you caught this before, but I brought forth the idea that macros are "$thing generators", where $thing is a variety of things (variable, function, class, and so on), and if macros could maybe benefit from specifying what they generate. 11:55
I can certainly see unquotes benefiting from the same kind of thing, maybe.
11:55 Ven left
masak I've yet to think of a case where it's absolutely necessary. the crucial thing is, of course, that the parser knows exactly what to expect next after it's parsed an unquote. 11:56
maybe something like `sub foo({{{$param}}})` vs `sub foo({{{$paramlist}}})` 11:57
in the former case, it's ok to insert a comma after the unquote. in the latter case not.
ShimmerFairy How would the parser usually differentiate the two? Or is that an example of something that can only happen in macroland? 11:58
masak it's an example of something that can only happen with unquotes
because usually the parser has all of the program text available at parse time, without holes
but quasis say "here, parse these known things. ignore the holes for now." which is fine, but the parser needs to be sure what "parsing state" it's in at all times, especially after an unquote. 11:59
ShimmerFairy Hmm... how difficult would it be to twist this around, so instead of "how can the parser know what to get next?", it's "what can the parser allow here?", and then the fault lies with the unquoted thing instead of the surrounding text. 12:00
masak oh, sure.
my point is that there can be *no* ambiguity about the parser state. and I'm not sure that's acheivable without requiring that the (Qtree) type of the thing in the unquotes be statically known, at least in some cases. 12:01
12:02 RabidGravy joined
RabidGravy now that was somewhat of an unscheduled reboot 12:02
12:02 CharellKing left
masak TimToady++ keeps reminding us that the parser must always know what language it's parsing. this falls under that. the parser is not allowed to be in an ambiguous state. 12:02
12:04 iH2O joined
ShimmerFairy I'm fine with macros being a bit more static than the rest of Perl 6, if that turns out to be the better solution. (In fact, my earlier suggestion about specifying the macro's "type" probably stems from thinking in too much of C++-ish way :P) 12:04
masak this whole line of thinking stems from me starting to think seriously about unquotes in non-EXPR positions. 12:05
iH2O I have the latest Rakudo Moar untared in /root/.perl6/2015.06 and was trying to compile it with this as usual:
masak which we'll probably see implemented in 007 before Rakudo.
ShimmerFairy
.oO( sub foo({{{paramlist}{$stuff}}}) , to make the triple-braces even worse)
iH2O perl Configure.pl --backend=moar --gen-moar
make
make install
make rakudo-test
but "make" fails :( pastebin.com/4f3z3P98
masak ShimmerFairy: ick. no. :) 12:06
ShimmerFairy: took me a while to even parse that in my head.
iH2O: looking.
ShimmerFairy masak: Suddenly my mind is trying to analogize an english workbook sort of thing, where you have example sentences with blank lines where you need to fill in the right thing. I wonder how helpful that framing could be (probably not very) 12:07
masak iH2O: huh. curious.
iH2O: all I can say so far is "it shouldn't fail like that".
iH2O I should say I have an old distro
masak shouldn't matter, really. 12:08
iH2O all previous Rakudo versions compiled fine on my distro
jnthn That's an odd place to fail too...I mean, it almost got right to the end...
12:08 cognominal joined
jnthn iH2O: Could you try running the last step manually, but add the option "--ll-exception"? 12:09
masak jnthn++ # helping iH2O
iH2O yes, I'll be back...
I have to reboot...
12:10 iH2O left
ShimmerFairy masak: I want to say you could maybe check the type of the expression appropriately, like making sure $thing in {{{$thing}}} is of type QParamList, before moving on in parsing. But depending on how complex expressions can get in unquotes, that might not be feasible. 12:12
masak ShimmerFairy: onus is on the macro author not to make the expression in the unquote so complex as to be uncheckable. 12:13
ShimmerFairy: like, maybe we only allow a single (statically typed) variable.
which is not really a limitation because you can still initialize that variable however you want.
ShimmerFairy masak: I think moving all the work outside of the quasi would be good practice regardless 12:14
masak right; keep the unquotes small. 12:15
maybe we could even mandate that on the parse level. an unquote has to look like {{{$foo}}}
(for any variable $foo) 12:16
ShimmerFairy I don't know if you want to allow other sigils and twigils too :)
12:16 domidumont joined
ShimmerFairy masak: would checking the .WHAT of the variable (however that's actually done in the parsing) allow for more freedom than just static typing, or would that not be a considerable improvement on what you can do? 12:17
masak the only optional I can think of that makes sense is sigilless (backslash variables and constants)
but hey, if someone can make it work with @foo or &foo (and can get past the type checking), then be my guest. 12:18
like, maybe @params makes sense for a paramlist
RabidGravy computer really not happy with this heat, may have to get some active cooling going 12:19
ShimmerFairy masak: I'm thinking $var, @var[index-not-slice], %var{key} should be allowed, if the parser is super-strict about the syntax. And maaaaaaybe {{{@foo}}} -> {{{@foo[0]}}}{{{@foo[1]}}}...
masak ShimmerFairy: recall that "checking the .WHAT" happens at runtime, long after the parse. so that's a no-go.
ShimmerFairy ah, so there's no .WHAT-like info available at parse time then? Darn, I guess I'll have to live static typing, such a tragedy. :P 12:20
jnthn masak: The alternative I guess is a syntax that makes people spell out the grammatical category if it's not a term.
ShimmerFairy masak: I also realized, depending on how you name the QTree types, our macros might be mistaken for Qt Code :) .oO(my QFunction $foo; ...) 12:21
masak ShimmerFairy: you're right, we can't disallow indexing. that's too useful.
ShimmerFairy: fortunately, array/hash elements can be easily type-declared too :>
jnthn {{{|postfix| $foo}}} 12:22
ShimmerFairy masak: basically, "what does qq// allow for interpolation without requiring braces" is my line of thought
masak jnthn: right. TimToady++ has been playing around with such ideas.
ShimmerFairy jnthn: I came up with {{{postfix}{$foo}}} >:)
masak ShimmerFairy: the Qtree types will end up having names like Q::Given
jnthn I can see how to get that idea to work with the grammar...
More easily than the type one
ShimmerFairy Alternatively, since everybody wants the colon: {{{postfix: $foo}}}
masak jnthn: ok, good to know. 12:23
ShimmerFairy: nice
ShimmerFairy: now if we could only get rid of the {{{ }}} :)
jnthn Because we could actually register a postfix in the LTM-er that has {{{postfix} as the LTM prefix.
masak I've been thinking about stealing backticks
ShimmerFairy masak: it would provide nice symmetry with sub postfix:<stuff> , incidentally
masak `postfix $foo`
ShimmerFairy (well, kinda-symmetry)
masak and maybe 'expr' should be the default: `expr $bar` same as `$bar` 12:24
12:24 AlexDaniel joined
jnthn And if we can get the syntax to just be an extra entry into the token table, or at least give it a fixed prefix that will be, then it's not too hard. 12:24
masak or maybe the default should depend on the parsing context.
jnthn Hm, I'd thought term would be the default :) 12:25
ShimmerFairy masak: I like the use of backticks. I think inserting code in place of text is nicely similar to the shell's "command in place of arguments" :)
masak ShimmerFairy: there's no .WHAT-like info available at parse-time. and I think I can convince you of that quite easily.
jnthn (Since term is a grammatical category, and EXPR ain't)
masak m: for "OH HAI", 42 -> $x { say "In the case of '$x', the type is $x.^name()" }
camelia rakudo-moar b35c39: OUTPUT«In the case of 'OH HAI', the type is Str␤In the case of '42', the type is Int␤»
ShimmerFairy
.oO( sub expr:<TIMTOWTDI>() { }; )
masak ShimmerFairy: look at the above eval. at *parse time*, we know nothing about $x.WHAT 12:26
12:26 Woodi joined
masak ShimmerFairy: at runtime, the qq string gets built twice, with totally different types of $x 12:26
ShimmerFairy: same deal with quasi blocks. they get built at runtime, at the site of the quasi statement.
ShimmerFairy masak: yeah, absolute best the parser could do would be any(Str|Int) , I'd think.
masak ShimmerFairy: that will not happen. 12:27
ShimmerFairy: and, fair enough, what I looped over was really @xs
ShimmerFairy: which I got as a parameter and know nothing about
ShimmerFairy of course not, I'm just saying if the parser decided to go out of its way to figure out $x, it'd see from there that "sometimes it's a Str, sometimes an Int" when parsing the opening part of the for loop 12:28
masak that kind of type inference is uncharacteristic of Perl 6
was my point
ShimmerFairy Got it. 12:29
I think something like `infix:$operator` would be a nice alternative to those ugly braces :) 12:33
.oO(or maybe ☃infix:$operator☄)
masak you like the colon there? did you see my proposed `infix $operator` ? it's a bit less cluttered and just as clear semantically. 12:35
jnthn .u ☃
yoleaux U+2603 SNOWMAN [So] (☃)
ShimmerFairy yeah, b-but... everybody wants the colon! (in reality, I'm fine either way)
jnthn hah 12:36
But where's the comet terminator? :P
ShimmerFairy jnthn: I don't know about you, but I'll never forget snowman-comet
jnthn: it's there, keep looking :P
tadzik I'll never forget double bacon bug :)
jnthn oh, so it it is!
ShimmerFairy And then `` would obviously be the Texas version of ☃☄ :P 12:37
tadzik: I'm not familiar with that one
tadzik ShimmerFairy: when creating a list in compile time, it would duplicate the elements you initialized it with 12:38
so Array.new("bacon") would contain <bacon bacon>
ShimmerFairy ah
tadzik oh, that was a fun project :)
masak what the bacon duplication project? :P 12:42
s/what/what,/
tadzik at some point :)
"Hey, you ever gonna run out of bacon?" "No. Because I work at ze bacon duplication project" 12:43
masak when you're an evil overlord, you have to use "ze" like that instead of "the"
tadzik Or a muffin thug: www.youtube.com/watch?v=3PxCFRgXl6M 12:44
ShimmerFairy "Too bad, I vas gonna offer you zome bacon von my bacon triplication project." 12:45
masak saying "von" is extra evil. 12:46
open question: what are all the distinct "parsing modes" in Perl 6 that an unquote can legally appear in? 12:47
ShimmerFairy I think the easiest part of that question would be all the languages on the braid; the main language, regex, Q, ... 12:49
jnthn masak: I'd start out with the various grammatical categories in the grammar...
(And then see what's missing.) 12:50
masak ShimmerFairy: let's limit ourselves to the main language for now. 12:51
ShimmerFairy: regexes are too different. and not all that critical to get working with unquotes. 12:52
ShimmerFairy fair enough, I think regexes are sufficiently powerful as it is :) (I wonder if you could argue that inserting code snippets in regex can accomplish a lot of what macros are trying to do for the main language) 12:54
12:55 MueThoS joined 12:56 iH2O joined
masak ShimmerFairy: and Q basically falls into 'constant string' and 'main slang' 12:57
iH2O jnthn: can you be more specific how I have to give the option --ll-exception because I get only the message "unknown option"
masak ShimmerFairy: no, it's not possible to argue that. that's an (understandable) mixing-up of levels. 12:58
ShimmerFairy: if that were true, then inserting code snippets into orginary code could also accomplish a lot of what macros are trying to do.
jnthn iH2O: Change into the rakudo build directory and then 13:00
./perl6-m --ll-exception --target=mbc --output=lib/NativeCall.pm.moarvm -Ilib lib/NativeCall.pm
iH2O I'll be back...
13:01 Dee22 joined
masak the suspense! 13:01
13:01 muraiki joined
jnthn Hasta la vista! 13:02
13:02 iH2O left 13:03 VinceDee left
DrForr .seen niner 13:06
yoleaux I haven't seen niner around.
DrForr .seen tadzik
yoleaux I saw tadzik 12:44Z in #perl6: <tadzik> Or a muffin thug: www.youtube.com/watch?v=3PxCFRgXl6M
masak .seen nine
yoleaux I saw nine 29 Jun 2015 19:47Z in #perl6: <nine> Is there a way besides panda to install a module?
tadzik DrForr: I'm here
DrForr It was more of an Inline-Perl5 question, I thought you might've shared nicks. 13:07
tadzik :)
Woodi hallo today :) 13:08
maybe s/{{{...}}}/macro(...);/ ? 13:09
masak Woodi: I'm sorry, but the keyword `macro` is taken by something that actually makes sense to call "macro".
Woodi masak: oops ? {{{...}}} is not macro ??
masak indeed not. 13:10
Woodi so what it is ? :)
masak it's a hole in the code, usually referred to as an "unquote".
Woodi ah right, template... 13:11
masak but disregarding the choice of name, having some kind of function-call syntax `unquote(...)` would probably work. 13:12
maybe &unquote could even be (internally) specified as a macro. :>
there's a certain pleasant metacircularity about that idea.
13:12 atroxaper left
Woodi also: can we postpone 6.0.0 to 2016.12 ? # first! one more year of fun ! 13:12
13:13 atroxaper joined
Woodi there could be many reasons... 13:13
13:13 atroxaper left
Woodi documentation, "extended beta"... 13:13
and, of course, making things official will change mood... 13:14
masak Rakudo Star was first released in 2010. I'd say that's a fairly extended beta.
but I can understand the sentiment of wanting to keep us in beta longer :)
Woodi but I'm not familiar how things are realy matured...
masak and yet you keep making suggestions as if you were 13:15
funny, that
RabidGravy I started work on Term::Cap on 23/03 and put it aside as I chose to tackle some easier things, it seems quite easy now
Woodi masak: it's not 0,1; I know something :)
13:16 gtodd joined
masak [citation needed] 13:16
13:16 Akagi201 joined 13:18 Akagi201_ joined
masak Woodi: I'm sorry. did not mean to be snarky. and I do not want to encourage elitism and haughtiness. 13:21
13:22 Akagi201 left
Woodi there was also discusion about quotemeta - it is like tr/// but not replaces but inserts chars. so maybe ti(%pairs, $string). then: use Quotes; ...; tiSQL($string); 13:22
masak Woodi: I don't think a postponement to 2016 is going to happen. things seem to be on track for Christmas 2015.
Woodi masak: no wory :)
masak .oO( be hapy )
Woodi right :) 13:23
masak Woodi: I'm hoping we'll see SQL slangs where (injection-)safe string insertion is the default. 13:24
ditto HTML/XML 13:25
13:26 Sqirrel joined 13:29 sqirrel_ joined
Woodi m: grammar G { rule TOP { 'd' \d }; }; my @r = "abddad2d31c" ~~ m:g/ <G> /; # we have something like that ? 13:29
camelia rakudo-moar b35c39: OUTPUT«Method 'G' not found for invocant of class 'Cursor'␤ in block <unit> at /tmp/eDHN3Mjszu:1␤␤»
13:29 _mg_ left
jnthn If you call it G::TOP it probably works out 13:29
masak m: grammar G { rule TOP { 'd' \d }; }; my @r = "abddad2d31c" ~~ m:g/ <G::TOP> / 13:30
camelia ( no output )
masak m: grammar G { rule TOP { 'd' \d }; }; my @r = "abddad2d31c" ~~ m:g/ <G::TOP> /; say @r.perl
camelia rakudo-moar b35c39: OUTPUT«[]<>␤»
masak \o/
Woodi empty...
masak I know how to make it work with .comb 13:31
never got that m:g thing to do what I want
13:31 nys joined
Woodi I look for some grep like thing that return Match objects. and same thing that can be used in for loop.. 13:32
jnthn m: grammar G { rule TOP { 'd' \d }; }; say "abddad2d31c".match(/ <G::TOP> /, :g).say
camelia rakudo-moar b35c39: OUTPUT«␤True␤»
jnthn hm
Ohh...
You used rule 13:33
token.
masak m: grammar G { token TOP { 'd' \d }; }; my @r = "abddad2d31c" ~~ m:g/ <G::TOP> /; say @r.perl 13:34
camelia rakudo-moar b35c39: OUTPUT«[Match.new(ast => Any, list => (), hash => EnumMap.new("G::TOP" => Match.new(ast => Any, list => (), hash => EnumMap.new(), orig => "abddad2d31c", to => 7, from => 5)), orig => "abddad2d31c", to => 7, from => 5), Match.new(ast => Any, list => (), hash => E…»
masak \o/
oh, and there's EnumMap, winner of "Most Wrongly Named Type"
jnthn What do you want it to be called? :) 13:35
Woodi thanx, now I can parse game config files :)
masak anything else. FrozenHash. FrozenMap. ImmutableHash. Can'tTouchThis.
ElsaTheIceQueen.
then if we ever want a map for enums, we'll have that name free! :D 13:36
jnthn I'm not sure all of those are better :P
masak I'm not sure they are worse :P
jnthn The last suggestion is at least cool...
13:36 g4 left
masak more than cool 13:36
is there a single German word that captures the feeling of an inheritance hierarchy being so deep that you need an IDE just to manage it? :) 13:38
moritz vererbungsüberwätigt (adj.)
vererbungsüberwältigt (adj.) 13:39
timotimo +1
masak "inheritance overwhelming"? 13:40
moritz overwhelmed
not overwhelming
masak oh, ok.
yeah, sounds like the word I was looking for.
masak tweets
Woodi so 2017 then ?
jnthn masak: I think the single English word for it is "enterprisey" :P 13:41
masak Woodi: worst thing is, I have no idea whether you're serious or just trolling. :P 13:42
13:44 _mg_ joined 13:45 domidumont left 13:47 amurf joined 13:50 JimmyZ_ joined 13:52 Tux__ is now known as |Tux|, amurf left 13:55 MueThoS left 14:02 iH2O joined
iH2O jnthn: pastebin.com/e3tb7FbB 14:03
14:03 gtodd left 14:06 gtodd joined, aborazmeh joined, aborazmeh left, aborazmeh joined
RabidGravy I don't think it should be released until someone asks why there isn't a mailling list manager written in it 14:14
14:15 novice-273K joined, tinyblak left
jnthn iH2O: Is your install directory a place you've installed a Rakudo before? 14:16
Hm, looks like it shouldn't be...
It seems to be exploding while trying to read some MANIFEST file describing installed modules... 14:17
novice-273K what is the object $¢ ? 14:18
14:18 _mg_ left
timotimo it's the cursor object 14:18
i think it's short for $/.CURSOR
RabidGravy m: say $¢.WHAT
camelia rakudo-moar b35c39: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ABH1sUVTfQ␤Name must begin with alphabetic character␤at /tmp/ABH1sUVTfQ:1␤------> 3say $7⏏5¢.WHAT␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ stateme…»
14:18 _mg_ joined
timotimo you may be using the wrong kind of ¢ 14:19
and it may only be available in nqp?
jnthn It's only available in the scope of a regex/rule/token 14:20
And yes, it's current Cursor
iH2O jnthn:not really, my PATH variable didn't reference the rakudo ~/.perl6 tree I checked that before
jnthn iH2O: It's not so much about your PATH, but the places listed in the output of running -e "say @*INC"
14:21 gtodd left
RabidGravy I can't actually see what kind of ¢ it is, looks kinda like a euro cent symbol but who knows 14:21
jnthn I've no idea how you'd have ended up with anything invalid in such a file, however
timotimo i think i once managed to get the wrong kind of ¢ inputted
but with having NFG by now that's probably not possible any more
14:23 _mg_ left
iH2O jnthn: let me check the output of "say @*INC" from the previous working rakudo version... 14:24
brb
14:24 laouji left
iH2O quit 14:24
14:24 gtodd joined, iH2O left
JimmyZ_ No such method 'ast' for invocant of type 'Any' 14:25
# I had seen it before, but I dont know how it disappeared.
timotimo that's our great error message for "couldn't parse the json, sorry"
masak really? :/
timotimo we could improve the error output for the built-in "from-json"
moritz JSON::Tiny has a better error message 14:26
timotimo yup
moritz come to the dark side, we have UX
masak there's a "from-json" that's not in JSON::Tiny?
timotimo that's a 2015.06 perl6 ... don't we read from a serialized blob nowadays?
we require(d?) json parsing so early, that installing a module wasn't an option 14:27
m: say to-json(["hi", {:foo, :bar}])
camelia rakudo-moar b35c39: OUTPUT«[␤ "hi",␤ {␤ "bar" : true,␤ "foo" : true␤ }␤]␤»
timotimo so we have this, too
14:28 tinyblak joined
masak gets a p5 "core modules" déjà vu 14:28
ShimmerFairy That feels like a really weird thing to have exposed in perl6 core, without so much as a use statement. 14:29
14:29 atroxaper joined
timotimo yes, it is kinda weird 14:30
i'm investigating
masak ooc, what was it that required to-json and from-json?
timotimo we could hide it away into DO-NOT-LOOK-HERE::
[Coke] I think it was the modules db. 14:31
timotimo i think so, too ... but that's no longer json nowadays
masak was gonna say. the need is gone.
jnthn Oddly though...there's a from-json in the current code?
So yeah, I'm confused too
timotimo ah, we use that to read a manifest file 14:32
masak anything we can do about that? do we have to? 14:33
timotimo not 100% sure
i don't know yet where that manifest file is written during the make step
ShimmerFairy If it _had_ to be somewhere, I'd much prefer nqp::from-json() (though I realize the possibility that may not be easy) 14:34
timotimo that's actually doable by just throwing the implementation into the QASTOperationsMAST/*JAST and exposing it like that 14:35
14:35 atroxaper left 14:38 novice-273K left, AlexDani` joined, uncleyea1 joined 14:40 avalenn_ joined 14:41 mephinet- joined, pmichaud_ joined, sqirrel_ left, ab5tract_ joined, f3ew_ joined, sjn_ joined, bcode_ joined, grondilu_ joined 14:42 bonsaikitten joined, mathw_ joined, KotH_ joined, sivoais_ joined, StavroMu1ller joined, Blub\1 joined 14:44 Timbus joined 14:46 vike1 joined, AlexDaniel left, RabidGravy left, uncleyear left, felher left, Timbus_ left, ilbot3 left, xiaomiao left, erdic left, sjn left, avalenn left, isacloud left, mtj_ left, robinsmidsrod left, KotH left, retupmoca left, ab5tract left, f3ew left, frew left, mathw left, timotimo left, JimmyZ left, ingy left 14:47 telex left, aborazmeh left 14:48 BinGOs joined, erdic joined, telex joined, raiph joined
[Coke] you could try ripping it out and see what breaks. :) 14:49
14:50 RabidGravy joined, dakkar left
masak that's the spirit! 14:50
14:50 dakkar joined 14:51 mr-foobar left 14:52 dakkar left, dakkar joined, timotimo joined, felher joined 14:53 mtj_ joined
dalek kudo/nom: 6bc26a5 | lizmat++ | src/core/Variable.pm:
Be more strict in setting variable default values
14:53
14:53 felher is now known as Guest30472, retupmoca joined, ilbot3 joined, alcaveman joined, frew joined, ingy joined, dakkar left, JimmyZ joined 14:54 dakkar joined 14:55 gtodd1 joined, gtodd left 14:57 uncleyea1 is now known as uncleyear, uncleyear left, uncleyear joined
Woodi is 100% troll free. that is, negative ones 14:59
masak glad to hear it :)
14:59 gtodd1 left 15:00 dakkar left, dakkar joined 15:01 gtodd joined 15:04 isacloud joined 15:05 chansen_ joined 15:07 vendethiel joined 15:08 sivoais_ is now known as sivoais, sivoais left, sivoais joined 15:09 robinsmidsrod joined 15:10 iH2O joined 15:11 diana_olhovik_ left
iH2O jnthn: I removed the 2015.06 version and put back 2015.03 The output of perl6 -e 'say @*INC' is 15:12
file:/root/.perl6/2015.03/install/languages/perl6/lib inst:/root/.perl6/2015.03/install/languages/perl6 inst:/root/.perl6/2015.03/install/languages/perl6/site
(the file:.. above is not a link to click on)
15:13 sjn_ is now known as sjn
timotimo that's correct; the prefix used to have a :, now it has a # 15:13
iH2O wise change :-P 15:14
15:15 tinyblak left
[Coke] Bug in rakudo star. "make rakudo-spectest", gives: 15:16
cd rakudo && /Applications/Xcode.app/Contents/Developer/usr/bin/make spectest
cd t/spec && git pull
fatal: Not a git repository (or any of the parent directories): .git
make[1]: [spectest_update] Error 128 (ignored)
I thought we disabled the git check in R* somehow.
15:17 khw joined
[Coke] make modules-test failed horribly for me. 15:19
Lots of, e.g.: Testing modules/doc with /tmp/rakadak/bin/perl6-m... 15:20
Could not execute (/tmp/rakadak/bin/perl6-m t/pod-convenience.t): open3: exec of /tmp/rakadak/bin/perl6-m t/pod-convenience.t failed at /opt/local/lib/perl5/5.16.3/TAP/Parser/Iterator/Process.pm line 168.
(required make install first) 15:21
perl6-lwp-simple tests hang on t/socket-sanity.t on OS X behind a firewall/proxy. (many other tests in that module just fail) 15:22
So, mostly ok, though. FROGGS++ 15:23
15:24 captain-adequate joined 15:28 rarara joined 15:30 vendethiel left 15:31 gtodd left 15:40 sjn_phone joined
ugexe blog.travis-ci.com/2015-06-30-cryst...travis-ci/ 15:41
15:42 domidumont joined
timotimo if i wasn't so strongly on the "make startup faster" team, i'd suggest we throw out file# and inst# and try to auto-detect 15:42
lizmat that was the whole point of making @*INC entries Str again 15:44
fwiw, I'm not too happy with file# either, open to suggestions as alway
s
japhb OK, I *think* I managed to pick up most of the unquote discussion in the backlog. Short thoughts: I like `...` for the unquote markers. I like unquotes specifying the grammatical category they fill, e.g. `postfix:...` or `postfix ...`. I would like to "interpolate" several items, e.g. several params into a paramlist, without starting or ending the paramlist. 15:45
timotimo hmm
japhb I would like to also unquote something "unbalanced", like starting a paramlist but not ending it, or vice versa. 15:46
15:46 domidumont left
japhb So perhaps `starting_category|unquote_expr|ending_category` sort of thing, where the first and third are optional and DWIM. 15:47
TimToady so some ideas like | and slip, applied at that level
yoleaux 09:26Z <jnthn> TimToady: Was going through S09 in prep for working on multi-dim stuff and spotted various things that seem a little off or in need of review/decisions: gist.github.com/jnthn/fa6a9a3618ae322cb581
japhb TimToady: Yes, that.
[Coke] would it make sense to replace file#foo with a pair of type-enum and value? 15:48
(rather than have another mini-language to parse)
japhb [Coke]: I've wondered why we didn't already to that, but I assumed there was some serialized-form round-tripping needed that I hadn't thought enough about. 15:49
lizmat [Coke]: not sure what you're getting at, could you elaborate? 15:50
something like file => foo ?
15:50 zakharyas left
sergot hi #perl6 o/ 15:51
I have a question
:)
tadzik shoot :)
sergot What arguments would you use to convince people to use perl6? :) 15:52
tadzik I see where this is going :)
15:52 sjn_phone left
sergot I mean, what are the coolest features 15:52
tadzik: I try to gather some information :))
tadzik right :) 15:53
sergot Grammars are awesome for exaplme
what else? :)
15:54 iH2O left 15:57 diana_olhovik joined 16:00 tinyblak joined
RabidGravy sergot, in no particular order, nice concurrency model, clean object model. easy extensibility 16:00
16:00 espadrine left
RabidGravy for me anyway 16:01
16:02 Dee22 left
[Coke] lizmat: yes, file=>$name vs. "file#$name". no clue if it would make things easier/faster/whatever, but special strings make me sad. 16:02
16:02 VinceDee joined, ShimmerFairy left
lizmat [Coke]: have you considered things like 'PERL6LIB=file => foo perl6 program' 16:03
[Coke] nope. 16:04
I can see where that'd be painful.
but our interface to INC from env vars doesn't have to equal what we use internally, either.
but that's also painful.
lizmat yes, it's a world of pain, well, sort of :-) 16:05
16:10 Ven joined 16:12 spider-mario joined 16:15 ShimmerFairy joined 16:17 skids joined
dalek kudo/nom: bcc6128 | lizmat++ | src/core/Variable.pm:
Handle Mu and Nil better
16:18
16:19 Ven left 16:20 uncleyea1 joined, uncleyear left
flussence m: say 0.base(2) 16:21
camelia rakudo-moar 6bc26a: OUTPUT«0␤»
flussence hm, my local build is returning '' there
ugexe sergot: the receptive and easily accessible developers :)
TimToady hides behind a bananaphone 16:22
dalek ast: ae33205 | lizmat++ | S02-types/WHICH.t:
Add X::Parameter::Default::TypeCheck class
16:24
ast: 3e73c1e | lizmat++ | / (2 files):
Add/Adapt is default() compile-time checks tests
TimToady there's something that's been bothering me about exception names like X::Parameter::Default::TypeCheck 16:29
the reason we use typed exceptions is so that we can say 'when X::Syntax'
but we have here all this specificity like X::Parameter::Default which is merely a package name, not actually part of the isa chain 16:30
so is pretty useless for smartmatching 16:31
lizmat so what isa tress are you thinking about then?
TimToady so the question arises, why are we using nested package spaces when hyphens would do just as well
lizmat X::Comp / X::Syntax / ...
16:32 Ven joined
lizmat *trees 16:32
TimToady or CamelCase, like X::ParameterDefaultTypecheck 16:33
what does the :: buy us?
lizmat not a lot
and then mix in roles like "X::Syntax" for smartmatching ?
TimToady well, maybe we should be making the longer ones derive from their prefixes in general 16:34
anyway, don't have the answer, but just wanted to point out something that was bugging me subconsciously for a while 16:36
16:36 gtodd joined, bcode_ is now known as ilbelkyr
TimToady typed exceptions are designed for isa typematching, and then we basically throw that away 16:37
japhb TimToady++ # Making the subconscious conscious since ... wait, how long have you been designing now?
lizmat TimToady: yeah, got that 16:38
also what is bugging me: $ ack 'die\ ' src/core | wc -l
103
16:38 raiph left
TimToady what bugs you about that, if it's throwing an exception object? 16:39
lizmat you cannot typematch it ?
16:39 itz__ joined
lizmat well, other than X::AdHoc ? 16:39
[Coke] even our non adhoc exceptions are pretty ad hoc. 16:40
lizmat hehe
TimToady I guess those aren't throwing exception objects...where did I see die X::Stuff.new then? 16:41
I guess I was thinking of all the fails that return exception objects 16:44
actual throws tend to use, er, .throw for some reason
flussence something's not quite right here: 16:47
> use nqp; say (nqp::base_I(0, 2), nqp::base_I(0, 3), nqp::base_I(1, 2)).perl
("", "0", "1")
16:51 JimmyZ_ left
dalek kudo/nom: 5bfaaf4 | timotimo++ | src/Perl6/World.nqp:
be even more tolerant in our failsafe error output
16:51
[Coke] masak, thought you might appreciate this: -> (12:51) From prox [@work], to random: - "Don't ever estimate dumbasser 16:52
y" -> (12:51) From prox [@work], to random: - "Don't ever UNDERestimate dumbasse
ry"
timotimo with SPESH_NODELAY=1, i get the core setting parse to explode as soon as line 15 16:54
hmm. X::PseudoPackage::InDeclaration could potentially have something to do with dynamic vars going wrong somehow? 16:55
sergot ugexe++ 16:56
RabidGravy++
thanks
16:57 abraxxa left 17:02 dakkar left 17:04 tinyblak left
flussence timotimo: I'm trying the spectest with that ooc, and all kinds of things exploding 17:04
timotimo yes, known ;(
it already explodes in the nqp tests
TimToady jnthn, masak: re parsing unquotes, it's not necessary to stick them into the LTM table, we merely have to make each protoregex capable of recognizing something that says "call this instead of any of the ordinary candidates" 17:05
17:05 vendethiel joined
TimToady an unquote is a basically a one-shot slang macro 17:05
17:06 gtodd left
TimToady so all we need is a unique escape that any protoregex can recognize in its standard LTMing 17:06
TimToady has suggested ¤ in the past
17:06 gtodd joined
TimToady so ¤infix:($whatever) or so would be adequate for proto infix to recognize it should insert $whatever and return 17:08
presumably feeding $whatever to the action routine for infix 17:09
which would then vet $whatever for well-formedness via any acceptable AST structure 17:10
reusable slang macros require more work, and should look like deriving a new language 17:11
the proposal there was a 'slang' declarator that knows to install methods or regexes into the named slang
or the current $~MAIN, by default 17:13
flussence timotimo: here's an interesting thing, almost all the tests that blow up during that run are fudged ones 17:14
timotimo huh? 17:15
fudged as in: "in a file that the fudger did something with" or "a todo'd test"?
flussence there's about 5 or 6 *.t files in the list of failures, among a hundred or so *.rakudo.moar ones 17:16
TimToady these slang rules/methods would be structured internally exactly like ordinary rules/methods, but you just 'make' the same sort of QTree/QAST that you'd return if it were simply an unquote
timotimo hm
aren't there just a whole lot more files in total that are fudged?
flussence maybe, it's just something odd that stood out to me 17:17
17:18 tinyblak joined
timotimo mhm 17:19
17:20 raiph joined 17:25 amurf joined 17:29 AlexDani` left, amurf left 17:30 mr-foobar joined 17:36 _mg_ joined 17:40 atroxaper joined
timotimo somehow it seems like the invocation for "is_pseudo_package" breaks ... i can't see how it'd give "Callable is actually a pseudopackage!" 17:41
17:41 cognominal left 17:44 atroxaper left
timotimo and when i put a say statement in is_pseudo_package it doesn't crash any more 17:46
nine Good evening! 17:51
yoleaux 30 Jun 2015 21:33Z <DrForr> nine: Silly point to make, but pragmas appear to not be run when declared as 'use utf8:from<Perl5>;' - I realize it's silly but something to think about.
timotimo hey nine 17:52
17:53 yqt joined
nine .tell DrForr Yes, use lib:from<Perl5> not working has bothered me for quite a while. It's tedious to have to resort to EVAL for that. I can't really see the point of use utf8:from<Perl5> though. use utf8 only tells perl that the source code is in utf-8. The only source that could affect is the one you give EVAL or run(). And if you do that you may as well include the use utf8; there. 17:54
yoleaux nine: I'll pass your message to DrForr.
DrForr Yes, I agree that it's somewhat pointless to use in perl6 code seeing as that's guaranteed UTF-8 clean, but I'm trying to come up with a way to migrate p5 code that won't involve steam coming out of my ears, and one notion I had was that being able to use that means that you can start by moving *all* use() blocks out of an EVAL block. 17:57
yoleaux 17:54Z <nine> DrForr: Yes, use lib:from<Perl5> not working has bothered me for quite a while. It's tedious to have to resort to EVAL for that. I can't really see the point of use utf8:from<Perl5> though. use utf8 only tells perl that the source code is in utf-8. The only source that could affect is the one you give EVAL or run(). And if you do that you may as well include the use utf8; there.
DrForr Ack. Not quite a botloop :)
I'm mainly looking at p5-p6 migration strategies, and Dancer2's test suite has soe interesting challenges. 17:58
nine Ok, that does indeed sound like a good use case. So the question remains: how do I actually recognize that the use'd thing is a pragma instead of a module? 17:59
I'd like to hear about those challenges. Maybe there's something I can do about them.
DrForr Well, the traditional way would be to assume that lower-case module names are pragmas, but we all know that's not necessarily the case. 18:00
What I'm more interested in solving is a different issue, though. 18:01
nine No. there are plenty modules out there, often ones which turn various pragmas on.
DrForr Sorry, what I meant is merely that I recognize that it can't be done by assuming lc($name) eq $name. 18:02
nine I was just agreeing in an elaborate way :) 18:03
DrForr Ah. got it.
That's actually not as interesting to me right now as something related.
18:03 Ven left
DrForr Namely, I have a t/app.t in my proto-Dancer6 directory, and in there I have: 18:04
EVAL 'use Dancer2;':lang<perl5>;
18:05 yqt left
DrForr (may not be quite the right synta, the point is I'm eval'ing 'use Dancer2' in the test directory. 18:05
s/$/)/
The problem is that the module (Dancer2) isn't installed, so I can't do 'use Dancer2:from<Perl5>;' as I can with other test modules that are installed. 18:06
So it'd be nice to be able to say something like 'use lib:from<Perl5> "t/";' so I can migrate all of the module names out of the EVAL block. 18:07
My thinking here is that it's easier later on to remove the ':from<Perl5>' bit with a sed pass, rather than having to edit files by hand. 18:08
PerlJam DrForr: You could use PERL5LIB, could you not?
DrForr Oh, from the command line, let me give that a try. 18:09
Seems to have no effect. With that I get the same "This appears to be Perl 5 code." error from the perl6 interpreter. 18:11
Let me throw this up on github first..
18:13 marchelzo_ joined
nine It seems like what's preventing use lib:from<Perl5> from working is Perl 6 itself. The Perl5ModuleLoader is not used in that case. It's silently ignored. 18:16
18:17 ][Sno][ joined, [Sno] left
jnthn lizmat: ^^ sounds like something you may know the right place to fix :) 18:17
marchelzo_ how is perl6 coming along 18:22
DrForr I'm not sure if theres a workaround otherwise. Of course the :from<Perl5> and :lang<perl5> syntaxes are pretty much the same, but it irks me that a perfectly valid syntax doesn't work in that edge case.
marchelzo_: pretty well, I'd say.
jnthn DrForr: I suspect the "use lib:from<Perl5>;" can be made to work 18:23
I suspect we're delegating too late
marchelzo_ Is there a good estimate for when it will be stable?
18:23 ][Sno][ is now known as [Sno]
DrForr Oh, I don't doubt it, I also suspect I can't fix it without much more work than is altogether practical. :) 18:23
nine jnthn: use lib is not even handled like all the other pragmas: elsif $name eq 'cur' { # temporary, will become 'lib'
PerlJam marchelzo_: it's stable now as far as I'm concerned. 18:24
DrForr marchelzo_: The best way to find out is to try it :)
marchelzo_ PerlJam: Oh, sorry. I haven't been following it very closely.
So the language is finished, but the implementation still needs work?
PerlJam marchelzo_: there's no such thing as "finished" :)
jnthn DrForr: Yes, I suggested lizmat++ look at it as she knows that area of the code very well and may spot what's up faster than the rest of us ;) 18:25
DrForr Yeah, I have been following :) I'm just figuring out where that will lead next for migration.
marchelzo_ PerlJam: So there are still breaking changes being made to the language?
jnthn marchelzo_: In some areas, yes, though experience tells that sometimes, the implementation of something forces tweaks to the language design. :) 18:26
(that was in answer to "the language is finished"
)
DrForr marchelzo_: The odds are right now you won't run into an area that's in flux before 6.0rc1 comes out, let's put it that way :)
marchelzo_ Is there a good perl6 guide available for free? 18:27
PerlJam marchelzo_: doc.perl6.org start there 18:28
marchelzo_: or better ... perl6.org/documentation/
DrForr There's also learnxinyminutes.com/perl6 # I may have the wrong domain nae...
PerlJam marchelzo_: the second link I mentioned has a link to learnxinyminutes and a bunch of others 18:29
huh.
marchelzo_ Yeah I saw. Thanks, this is good.
PerlJam just noticed that the "Using Perl 6" book is stated as an "Onyx Neon Press book" 18:30
(which I find a little weird since it has yet to be published :)
18:32 rickbike joined
DrForr That still sound like "You haven't decided on a name? What do you like? You? Good, put 'em together." 18:35
*sounds
TimToady well, the GLR is likely to break a few things yet, especially making [] not containerize itself 18:42
rickbike Where in perl6 docs can I find the 'for' syntax? I expected in "Control Flow" section. 18:43
TimToady S04:487
synbot6 Link: design.perl6.org/S04.html#line_487
marchelzo_ Reading through the learn X in Y minutes for perl 6... it's like they tried to take every feature from every language, plus some more, and fit it into perl 6. 18:46
nine marchelzo_: not every feature. Only the most useful. 18:47
moritz marchelzo_: and the amazing thing is that the result is still coherent
masak .u currency sign
yoleaux U+00A4 CURRENCY SIGN [Sc] (¤)
marchelzo_ I'll have to see that to believe it. I do enjoy most of the features in other languages, but I'm wondering if it might just be too much. 18:48
nine marchelzo_: then by all means you should just try out Perl 6 and see for yourself :)
masak TimToady: ¤infix:($whatever) and `infix $whatever` are functionally equivalent. but ` is on more people's keyboards than ¤ and also, it doesn't look butt-ugly.
marchelzo_ It seems there is a lot of "alternate syntax". The language doesn't seem opinionated at all. 18:49
masak and don't come telling me that it looking ugly and being hard to type are features, because I've heard it before and I don't agree. :)
to me, Huffman coding stops somewhere before you make life unpleasant and ugly for users.
18:53 marchelzo_ left 18:56 rindolf left
[Coke] who nds hfmn nyw? 18:59
jnthn nt msk
masak rght
mst the trouble with doing that is that then later the vowels all escape at once: 19:00
AAAAAAAAAAAAAAAAAAAAAAAAAAAIIIIIIIIEEEEEEEEEE
moritz uou!
masak (usually they show up in Maori)
jnthn Wow, it's like crossing from Russia to Finland :P
nine That's odd. 'lib' really is no pragma in Rakudo but a plain module. Makes it more mysterious that use lib:from<Perl5> just doesn't work as it should 19:01
DrForr nine: Here's motivation. gist.github.com/drforr/11014c51d03ecea04fa6 19:02
With 'use lib;' and declaring the p6 subclass it gives me almost 1:1 translation between the existing p5 code and p6. 19:03
[ptc]
.oO( dwn wth vwls! )
masak jnthn: is that why Russia and Finland are historically enemies? "gv s bck r vwls!" -- "ei ei ei!" 19:04
DrForr dd. ttlly dsmvwlng y.
[ptc] were they then disemvoweled? 19:06
DrForr And the test still would work after Dancer2::Core:App gets migrated to p6, 'cause the stub needs to do nothing.
ugexe FROGGS: Are shell/run expected to work with :merge at this time? On moar it outputs 'Aborted' when trying to access .lines/.get. JVM does not error, but only captures the stdout. 19:07
19:08 raiph left 19:11 _mg_ left 19:12 dha joined 19:13 raiph joined 19:15 yqt joined 19:17 rarara left, zakharyas joined
dalek ast: b251b6f | usev6++ | S (2 files):
Change (and move) test for RT #98854
19:23
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=98854
dha m: $x = 123; $x.printf 19:30
camelia rakudo-moar 5bfaaf: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5jSNwuxUv5␤Variable '$x' is not declared␤at /tmp/5jSNwuxUv5:1␤------> 3<BOL>7⏏5$x = 123; $x.printf␤»
dha m: my $x = 123; $x.printf
camelia rakudo-moar 5bfaaf: OUTPUT«123»
dha m: my $x = 123;$x.printf("%d\n");
camelia rakudo-moar 5bfaaf: OUTPUT«Directives specify 0 arguments, but 1 argument was supplied␤<Internal error while creating backtrace: MVMArray: Can't pop from an empty array in method AT-POS at src/gen/m-CORE.setting:14779␤ in method next-interesting-index at src/gen/m-CORE.settin…»
dha Why does C<printf> (and C<sprintf> for that matter) work as a method if you can't give it a format string? 19:31
RabidGravy m: "%d\n".printf(123)
camelia rakudo-moar 5bfaaf: OUTPUT«123␤»
RabidGravy it does :) 19:32
bartolin std: sub f { f(|$) }
camelia std 28329a7: OUTPUT«ok 00:00 138m␤»
dha ... the FORMAT STRING is the needed object?? 19:33
bartolin m: sub f { f(|$) }
camelia ( no output )
19:33 bin_005 joined
dha Ok, why does C<printf> work on a variable containing an integer, then? 19:33
(as in my code above) 19:34
Because the way you just showed that it works with a format string it completely weird.
RabidGravy I guess because it becomes a format with just the literal "123" in 19:35
dha The seems to me WHOLLY couterintuitive.
19:36 cognominal joined
dha considers just documenting this as "WTF" 19:37
Or "works as a method, but FOR THE LOVE OF ALL THAT IS HOLY, DON'T DO THAT."
ugexe I SEE what you MEAN 19:39
skids m: sub a ($? is parcel ) { }; &a.signature.say 19:41
camelia rakudo-moar 5bfaaf: OUTPUT«(\?)␤»
skids m: sub a (\?) { }; &a.signature.say
camelia rakudo-moar 5bfaaf: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gxOlOzjYy2␤Missing block␤at /tmp/gxOlOzjYy2:1␤------> 3sub a (\7⏏5?) { }; &a.signature.say␤»
jnthn I think .fmt is the sane thing. I do wonder if .printf on anything besides a file handle makes sense...
skids I just sent a PR to fix that and related stuff.
(Not the parsing, bit the .perl) 19:42
19:44 dha left, dha joined
dha So, yes, IMO, the method invocation of (s)printf is insane and should be changed. So there. 19:46
19:46 espadrine joined 19:48 Sqirrel left
b2gills Since the format for s?printf is just a string, and not a special type, I'm not sure that it makes sense for it to be a method on the format 19:48
jnthn dha, b2gills: I'd agree. 19:49
dha Do we still need/have C<srand>? 19:50
19:50 Sqirrel joined
jnthn yes 19:51
b2gills m: say &srand.signature
camelia rakudo-moar 5bfaaf: OUTPUT«(Int $seed --> Int)␤»
19:52 kaare_ left
dha Ah. Ok, fwiw, it's not in the doc pages, apparently. 19:52
jnthn Add it to WANTED 19:53
Or encourage somebody else to :)
19:53 espadrine left
dha Can I assume the semantics are largely the same as in perl 5? 19:55
b2gills I'd argue that we should carefully consider the addition of any `.lower-case` methods that get added to built-in types
m: for ^5 { srand 1; say rand } 19:56
camelia rakudo-moar 5bfaaf: OUTPUT«0.308302962221659␤0.308302962221659␤0.308302962221659␤0.308302962221659␤0.308302962221659␤»
DrForr Unicode makes that nontrivial.
dha Unicode makes everything nontrivial.
DrForr Even triviality. 19:57
dha indeed.
19:57 bin_005 left
b2gills Unicode is better than any current alternative though 19:57
moritz human languages make everything nontrivial
DrForr Hey, my EBCDIC props earned me some swag at YAPC. 19:58
b2gills humans make everything nontrivial
DrForr To summarize the summary, people are a problem.
dha Bingo. 19:59
masak especially users.
b2gills especially people who don't know how to code but think they know how things should work 20:00
20:00 Peter_R joined
b2gills m: say 10 ** 10 ** 10 # what? 20:01
camelia rakudo-moar 5bfaaf: OUTPUT«0␤»
b2gills j: say 10 ** 10 ** 10
camelia rakudo-jvm 5bfaaf: OUTPUT«Inf␤»
20:02 captain-adequate left
skids Eh, if it weren't for problems there'd be nothing to do. 20:02
RabidGravy :)
dha Can I just add "all the stuff that's not documented" to WANTED? :-/
masak b2gills: please submit a rakudobug, kthx
dha looks at the void below "The C<state> Declarator"
20:03 yqt left 20:04 uncleyea1 is now known as uncleyear, uncleyear left, uncleyear joined
RabidGravy dha, it's tricky because everyone just goes "it's like static in C" and all the developers either know what that means or pretend they do ;-) 20:05
dha Well, it's described in the p5 docs, for pete's sake. Can't we use that as a template? 20:06
jnthn It's nothing like static in C, 'cus it's per closure clone...
RabidGravy well yes but you know what I mean 20:07
TimToady masak: you kinda tend to hear only the bikesheddy parts of what I said, which I already disclaimed as 'or so'; my point was from the point of the parser, it's pretty obvious where things hook in
dha Is C<study> still a thing?
TimToady dha: no
masak RabidGravy: "you know what I mean" is not a sufficient riposte when someone says what you said is factually wrong :P
dha yay. 20:08
20:08 bin_005 joined
masak TimToady: sorry; I heard that part too. I only replied to the part I disagreed with :) 20:08
it's good news about the parser, because that's been a concern for me in the past few days.
looking forward to seeing how it looks in implementation. probably first in 007. 20:09
20:09 yqt joined
TimToady but, as I've mentioned, there's really no need for a 'macro' keyword, if we can throw normal rules and methods into slangs 20:09
jnthn TimToady: fwiw, I agreed that we don't have to do it with the LTM-er also, it just felt like the easy path :)
TimToady well, unquotes doesn't need LTM, but slang rules still do
jnthn I more meant that `infix: ...` as an unquote could just go into the infix alternation 20:10
masak the other day I had the thought that unquotes are a "cross-cutting concern", almost completely orthogonal to the normal grammar rules.
TimToady 'slang token' roughly corresponds to 'macro is parsed', while 'slang method' corresponds more to bare macro
jnthn e.g. token infix:sym<unquote> { '`infix:' ~ '`' <unquote> } 20:11
RabidGravy masak, I'm too hot for any other
20:11 tinyblak left
TimToady jnthn: well, I'd rather have some unquote escape that is the same everywhere, I think, just to jog people out of reading it as inline code 20:12
and my liking for ¤ is related to that mental jogging, not to trying to make things hard for people
¤ is trivial to type for anyone with a compose key, and we can also texas it
masak I agree that it should look "different". 20:13
"anyone with a compose key" might be a smaller group than you think :)
jnthn TimToady: I don't see how that contradicts my implementation suggestion though...I just took backticks as the jogger, which I guess crawl rather than jog...
masak .oO( >(o)< )
TimToady I'd still rather reserve bare ` for user use, but what the texas version is can still be bikeshedded
timotimo there's also the people with a ctrl-c and ctrl-v combination capable keyboard
masak yes, but... *sigh* 20:14
TimToady jnthn: oh, the fact that your ` disappearing inside my eyes says it's not 'joggy' enough
masak "you can write Perl 6 macro code, just copy-and-paste this handy symbol!" is not sexy advice
TimToady it's no worse than «»
it's in Latin-1
jnthn masak: TimToady did say we can Texas it too 20:15
masak ok, regrouping. my real objection is that it doesn't deserve to be a sigil, because it doesn't really denote a category of variable. it's "the wrong hook". 20:16
TimToady it's...not a sigil
jnthn Oh, I'd not been seeing it as a sigil.
TimToady more like a namespace switcher
masak and for some reason it feels better if it surrounds the unquote, like {{{ }}} or ` ` do
TimToady no it doesn't :P 20:17
masak goes and writes some code instead
TimToady
.oO(de gustibus...)
masak ...non erat multiplicandum :P
TimToady anyway, categories tend to be associated with pair notation, and infix:() already has its own bracketing for pilliness of the argument 20:18
masak ok, granted. 20:20
vendethiel o/
TimToady I think of sigils as noun markers, and this is more meta than that
20:20 darutoko left
TimToady in fact, it's kind of a metamarker 20:20
masak by the way, I don't just hate ¤. I hate ¢ too. :P 20:21
vendethiel happens to have ¤, but still hates it along with c/
jnthn How about £? :) 20:23
vendethiel disagrees with a sigil, because it doesn't make sense to forbid {{{Q::Call.new(...)}}} imho
PerlJam masak: "hate" seems a little strong. Are you sure? :)
dha So, S29 mentions C<syscall>, but doesn't actually say anything about it. Do we still have it, and is it any different from its Perl 5 version?
TimToady for the Texas version, we'll just use SOMETHING-WICKED-THIS-WAY-COMES:infix:($whatever) 20:24
masak PerlJam: is there a better word for a visceral reaction, wanting for the complete removal of something?
TimToady and do you hate the set operators? 20:25
jnthn dha: afaik, "gone to module space"
PerlJam masak: "despise"?
dha *nod*
PerlJam masak: loathe? deplore?
masak PerlJam: sold.
all three. 20:26
PerlJam heh
masak jnthn: I just saw µ is in Latin-1. it's not half-bad, as it's the Greek letter for 'm' as in 'macro' :)
µinfix:($op)
hm, a bit too letter-like.
there's also ¶infix:($op) 20:27
PerlJam masak: still seems like an okay design trade-off to me right now. These things are difficultish to type because you really shouldn't be typing them all that often.
TimToady
.oO(Any sufficiently advanced technology is indistinguishable from nazis. --Arthur C Godwin)
jnthn masak: Surprise, a Greek letter looks letter-like :P
Now, a Greek bailout, otoh... 20:28
masak PerlJam: I'm a bit tired of that argument. there's a point where de-Huffmanizing something crosses the border into being a mean designer.
threshold*
design*
TimToady
.oO(haters gonna hate)
PerlJam masak: being "mean" now still leaves open the option to be nicer later. 20:29
masak meh
I'm more in favor of trying to get it right sooner
timotimo we need someone to build a simple "Emoji" slang that'll allow emoji in identifiers, method names etc
masak "The pilcrow was a type of rubrication used in the Middle Ages to mark a new train of thought, before the convention of visually discrete paragraphs was commonplace." (about ¶)
jnthn masak: Is that easier to type than ¤? 20:31
.u ¤
yoleaux U+00A4 CURRENCY SIGN [Sc] (¤)
masak jnthn: ...no :/ 20:32
PerlJam What's the compose key sequence for a pilcrow?
TimToady goes to take a nap and dream of fillet minions...
masak and I'm not sure I like any solution that looks like a sigil.
jnthn And both are Latin-1...
TimToady masak: are you thinking it looks like a sigil because it relates to currency? that wasn't in my head at all...
b2gills where should a test for `10**10**10 > 10**10` go? RT #125524 20:33
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125524
masak props to anyone who comes up with an ASCII solution that has all the nice properties discussed in the backlog (declares grammatical category, visual pillishness)
TimToady: maybe.
TimToady nap really & 20:35
masak TimToady: I also think that the fact that it relates to currency makes it a weird choice for unquotes. Perl is usually more connotation-aware than that. which is why I pasted the Wikipedia quote about the pilcrow. at least that one has something resembling a rationale/strange consistency. 20:36
lizmat m: use Test:from<Zip>; ok 1 # the problem with from<> in use 20:37
camelia rakudo-moar 5bfaaf: OUTPUT«ok 1 - ␤»
masak I love the Test.pm from Zip 20:38
dha S29 indicates that C<tie> and C<tied> are replaced by container types. Are containers in this context documented explicitly somewhere? 20:39
jnthn m: use lizmat:from<Echt>;
camelia rakudo-moar 5bfaaf: OUTPUT«===SORRY!===␤Do not know how to load code from Echt␤»
20:39 bin_005_e joined, bin_005 left
lizmat but that's because the module 'lizmat' does not exist 20:39
jnthn Oh...it looks at the from as a fallback?
lizmat yes 20:40
20:40 FROGGS joined
jnthn Yeah, that's probably the wrong way...I figure :from just just very early on delegate to another appropriate loader. 20:40
*should just
FROGGS o/
lizmat well, yes, that's the plan
masak aye.
lizmat wish I had the inspiration to work on that
the hot weather is seriously messing with my motivation 20:41
jnthn urgh
lizmat 35 today, 38 tomorrow
jnthn OMG
That's horrible
20:41 vendethiel- joined
muraiki you crazy people and your celsius 20:41
dha muraiki++
PerlJam lizmat: you're not in Texas are you?
lizmat 95 today, 105 tomorrow
no, in the NL 20:42
ugexe 95 seems about average :)
lizmat if you're in TX with airco
this is NL and no airco
jnthn It's climbing to 35C here in Prague by the weekend. Thankfully I'll be in Kyiv by then, which will be a few degrees cooler and I'll have airco there... 20:43
The warm evenings are probably gonna hose my sleep the next couple of nights, alas...
20:43 vendethiel left
lizmat yeah, on a tropical schedule now: up at 5:30 to air out the house 20:43
masak jnthn: better implement all the hard stuff tonight, then! :P
lizmat :-)
masak is implementing prefix/postfix precedence in 007 20:44
...for custom ops.
jnthn Well, I started on multi-dim stuff earlier today... 20:45
dalek kudo/nom: bf717b8 | (Nick Logan)++ | src/core/CompUnit.pm:
deprecation fix: CompUnit.precomp s/pipe/shell/

This may be better expressed as something like `my $proc = run($*EXECUTABLE, @args, :merge); my $result = $proc.out.lines.join` once the `:merge` implementation works.
kudo/nom: a92a407 | FROGGS++ | src/core/CompUnit.pm:
Merge pull request #455 from ugexe/patch-5

deprecation fix: CompUnit.precomp s/pipe/shell/
masak TimToady: fwiw, I agree with you that whatever unquote marker we arrive at should "jog" the reader a bit. 20:46
lizmat jnthn: could you update the Changelog with things you've done the past week ?
it would help me with the P6W 20:47
masak TimToady: {{{ }}} is quite good at that. a little too good, perhaps. while also re-using hash/block syntax, which isn't so great.
jnthn lizmat: I'm in the middle of some $dayjob stuff, but if I gisted you my worklog for the last week would that help? :) 20:48
lizmat yes
jnthn lizmat: What date do you want from
?
lizmat from 23 June or thereabouts
PerlJam masak: How about ¶ ... ⁋ ? ;> 20:49
jnthn lizmat: gist.github.com/jnthn/13d6303ea8bf4ea3b57f 20:50
20:50 AlexDani` joined
b2gills I wish I could blame the heat for a lack of motivation, it's more likely from the concussion I had many years ago. .oO( I remember that day like it was tomorrow ) 20:52
muraiki b2gills: I've had 3 concussions, with the most recent about 2 weeks ago. horrible things. the second one was the worst... I still had symptoms 2 years later
timotimo lizmat: i think you'll have to do this one, too, lizmat >_< 20:53
lizmat timotimo: working on it :-)
muraiki but I was at least able to blame it for solving the wrong problem twice (we have new people learning perl5 and I answered a completely different question than the homework assignment asked... twice)
masak PerlJam: pretty :)
PerlJam: the ⁋ can be read as "and now back to your regularly scheduled ⁋arsing" :⁋ 20:54
jnthn .u ⁋
yoleaux U+204B REVERSED PILCROW SIGN [Po] (⁋)
jnthn Not in my font
lizmat I was looking at an RT ticket earlier today, until I realised it was a P5 ticket (#125522 to be precise :-) 20:55
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125522
jnthn :(
20:55 gfldex left
dha The documentation on C<time> could use a bit of fleshing out. 20:55
muraiki night all
20:55 muraiki left
masak synbot6: you paste URLs to P5 tickets? traitor! :P 20:56
dalek ast: 58afbdf | usev6++ | S06-signature/slurpy-params.t:
Use existing ticket number RT #113964
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=113964
jnthn The most interesting bit of that ticket is this quote: 20:57
The parser needs to commit to whether the brace is opening a
nested lexical scope before arbitrary expressions inside the braces
can be parsed
In Rakudo we actully parse it as a lexical scope and then migrate symbols back out of the now-throwaway scope if we analyze it to be a hash :)
masak .oO( Perl 6 people: "Look, we already solved this, and the solution is nice!" -- Perl 5 people: "Did you hear something? I thought I heard something." ) :P 20:59
jnthn I think our ability to do it probably lies in some pretty deep differences :)
Not a borrowable little thing. 21:00
masak troo 21:01
dha Do we have a perl 6 equivalent to C<times>?
lizmat dha: not that I'm awar 21:02
e
dha Ok, that's what it looked like.
21:03 zakharyas left, amurf joined
lizmat I wonder how hard it would be to make a times() using NativeCall 21:03
PerlJam lizmat: hold on a sec and I'll show you :)
ugexe j: my @a = 1,2,3,4; my @b = gather for @a -> $i { KEEP take $i; UNDO take $i; state $x++; $x > 2 ?? 1 !! 0 } # known? (keep/undo in gather for jvm) 21:04
PerlJam lizmat: class Timing { has $.time = time; has tms $.times = times;
camelia rakudo-jvm 5bfaaf: OUTPUT«control operator crossed continuation barrier␤ in code at /tmp/aIBbap9MWf:1␤␤»
PerlJam }oops
lizmat: gist.github.com/perlpilot/6ad78bada61335115510
that probably leaks like a sieve though
(I was playing with this the other day)
masak "control operator crossed continuation barrier"? that's a new one. 21:05
21:05 bin_005_e left, bin_005_e_q joined
lizmat masak: seen it a few times when using gather/take on the jvm 21:05
dha C<tr///> doesn't seem to be in the docs... 21:07
21:08 amurf left, tinyblak joined
ugexe design.perl6.org/S05.html#Transliteration 21:09
dha Yeah, in the specs, but not the docs. 21:10
ugexe ah
dha The spec document also doesn't really describe C<tr///> but more the C<.trans> method. 21:11
Although I'm assuming it works the same way as in p5, except that you specify ranges differently. 21:12
21:12 Peter_R left
lizmat PerlJam: any idea how your times() implementation works with (libuv) threads? 21:15
PerlJam nope
japhb ASCII unquote marks: ~~~ at start and end, like '~~~$qtree~~~'. Mnemonic: Stitch this in ~~~here~~~.
PerlJam japhb: worse than {{{ }}} IMHO 21:16
21:16 atroxaper joined
japhb PerlJam: I think it's a little less over-pillish, but it's just an idea. 21:16
arnsholt What about ⦃$ast⦄, with Texas {|$ast|}? 21:19
21:19 Sqirrel left
masak arnsholt: not Latin-1, I guess. 21:20
21:20 diana_olhovik left
arnsholt Definitely not Latin-1 21:20
japhb masak: Latin-1 isn't a hard requirement as long as there's a Texas version, IIUC. Hence set ops.
21:20 atroxaper left 21:21 Sqirrel joined
masak *nod* 21:21
timotimo the rakudo star announcement changelog has "native arrays" as a change ...
dalek kudo/nom: 88153ff | lizmat++ | docs/ChangeLog:
Some more ChangeLog entries of last week
21:22
lizmat timotimo: I think that's correct, from the previous Rakudo Star
timotimo that's not that verbose
[Coke] lizmat: "is required" on attrs.
21:23 Novice-273C joined
Novice-273C m: say "ok" if / < +alpha >+ / for "abcd" 21:23
camelia ( no output )
dalek kudo/nom: bf3c167 | lizmat++ | docs/ChangeLog:
has $.a is required, FROGGS++
21:24
Novice-273C say "but without leading space before subrule it works. why?" if / <+alpha >+ / for "abcd" 21:26
m: say "but without leading space before subrule it works. why?" if / <+alpha >+ / for "abcd" 21:27
camelia rakudo-moar a92a40: OUTPUT«but without leading space before subrule it works. why?␤»
FROGGS lizmat: I was just the merger of the 'is required' 21:28
21:28 beastd joined
lizmat ah, who did the work then> 21:28
?
FROGGS [Coke]++ did all the work
lizmat also: could you describe what you did with pipe() / shell() / run() (I seem to have lost track)
[Coke]++
21:29 rickbike left
FROGGS pipe() only gave you stdout, and was in fact invoking a shell 21:29
now you can read stdout/stderr from run() and shell() by passing :out and :err, and you can write to its stdin by passing :in 21:30
so pipe() is limited and was deprecated
lizmat ok, will mention that :-) 21:31
FROGGS you can also suppress e.g. stderr from a subprocess by passing :!err
lizmat FROGGS: BTW, this is the breakage I see on the JVM: gist.github.com/lizmat/573712315223a7bbca11
FROGGS the default is to inherit the std streams from your process, which is identical to passing :in('-'), :out('-'), ...
O.O 21:32
lizmat $ perl6-j -e 'say QX "echo"' 21:33
Unable to execute 'echo' (ff00)
ugexe i ran into that today as well 21:34
21:35 espadrine joined
dha Can I assume C<umask> is gone? 21:35
lizmat actually, no, it *is* a method on IO
dha Ah. 21:36
21:36 itz_ joined
dha Thanks. 21:36
lizmat m: IO.umask.say
camelia rakudo-moar a92a40: OUTPUT«18␤»
lizmat m: IO.umask.fmt("%o").say # better :-) 21:37
camelia rakudo-moar a92a40: OUTPUT«22␤»
21:38 itz__ left
dha Huh. An attempt to use C<undef> as a verb tells me "in Perl 6 please use undefine function or assignment of Nil" 21:39
Can you actually undefine a function in p6?
lizmat no...
21:39 alcaveman left
dha ok, so maybe that error message should be changed... :-) 21:40
lizmat m: my $a is default(42) = 666; say $a; undefine $a; say $a
camelia rakudo-moar a92a40: OUTPUT«666␤42␤»
21:43 TEttinger joined
dalek kudo/nom: 9c2c36b | lizmat++ | src/Perl6/Grammar.nqp:
Clarify use of undefine(), dha++
21:44
FROGGS lizmat: btw, the jvm spectest errors you pasted seem to be caused by a crash of the evalserver 21:50
lizmat FROGGS: perhaps, but I'm running it without any TEST_JOBS= setting, so serially, does it use the evalserver then? 21:51
FROGGS yes 21:52
lizmat how can I otherwise make sure I don't use the evalserver ?
FROGGS so you dont have the startup time every time
masak 'night, #perl6
FROGGS I dunno
you probably have to hack the harness script
timotimo gnite masak
FROGGS gnight masak
lizmat FROGGS: not reaily interested in good startup times, just in good results
gnight masak
good tests, really :-) 21:53
21:54 gcole joined 21:58 Novice-273C left 21:59 espadrine left, espadrine joined
dalek kudo/nom: 6cfc5e0 | lizmat++ | docs/ChangeLog:
Mention deprecation of pipe()
22:01
jnthn probably gone for night &
22:02 telex left
FROGGS gnight jnthn 22:02
lizmat good night, jnthn 22:04
22:04 telex joined 22:06 japhb left 22:07 rickbike joined
FROGGS dalek: ? 22:07
22:07 [Sno] left
FROGGS lizmat: I just pushed a fix for QX 22:08
22:08 japhb joined
lizmat ok, will test 22:08
dalek kudo/nom: a436fec | FROGGS++ | src/core/Proc.pm:
check status of closed stream in QX, lizmat++
22:11
22:11 RabidGravy left
dha I'm guessing C<use> is still part of p6, even though it's not in the docs? 22:12
lizmat Another Perl 6 weekly has been wrought: p6weekly.wordpress.com/2015/07/01/...-the-year/
dha lizmat++
lizmat dha: if it's not in the docs, it should be :-)
it is very much a part of Perl 6
dha I thought so too!
lizmat and on that note, I'm going to call it a (short) night 22:13
dha but putting it into the search field at doc.perl6.org does not produce results.
rickbike Can I access just the captured elements in a global match, like as an array?
lizmat someone should put it on the doc todo then :-)
rickbike design.perl6.org/S05.html#Capturing...ed_matches doesn't work, no match.
22:13 Possum left
dha lizmat- should it be in WANTED? 22:14
lizmat yeah, WANTED :-)
good night, #perl6!
dha Indeed. Will put it in.
good night lizmat 22:15
cognominal lizmat++ 22:16
vendethiel- 'night lizmat :) 22:17
22:18 espadrine left
dha So, S32 says that C<utime> is gone, replaced by C<Path.times>. But I can't find C<Path.times> in the docs. 22:20
22:20 Possum joined
dha looking in IO::Path is similarly unhelpful. 22:21
AlexDani` what is the easiest way to know the current iteration number when using a for loop? Like if I had $i or something 22:22
timotimo you can iterate over a list's .kv
to get the iteration number as well as the item
22:23 bin_005_e_q left
timotimo m: for lines[0].words.kv -> $i, $w { say $i, $w } 22:23
camelia rakudo-moar a436fe: OUTPUT«0Céad␤1slán␤2ag␤3sléibhte␤4maorga␤5Chontae␤6Dhún␤7na␤8nGall␤»
AlexDani` hm 22:24
22:24 RabidGravy joined
AlexDani` ok, but anything shorter? :) 22:24
timotimo m: for lines[0].words { say ++$, $_ }
camelia rakudo-moar a436fe: OUTPUT«1Céad␤2slán␤3ag␤4sléibhte␤5maorga␤6Chontae␤7Dhún␤8na␤9nGall␤»
timotimo m: for lines[0].words { say $++, $_ }
camelia rakudo-moar a436fe: OUTPUT«0Céad␤1slán␤2ag␤3sléibhte␤4maorga␤5Chontae␤6Dhún␤7na␤8nGall␤»
timotimo ^- anonymous state variable 22:25
AlexDani` huh!
ok, that's it
22:25 KotH_ is now known as KotH
hahainternet aww man i just discovered the REPL doesn't have previous/next with arrows 22:26
am i being dumb or have i got an ancient version or what
FROGGS m: for lines[0].words.kv { say $^i, $^word }
camelia rakudo-moar a436fe: OUTPUT«0Céad␤1slán␤2ag␤3sléibhte␤4maorga␤5Chontae␤6Dhún␤7na␤8nGall␤»
AlexDani` FROGGS: indeed!
FROGGS hahainternet: you need to install Linenoise via panda
hahainternet FROGGS: o/ 22:27
dha So, S29 says "Should replace C<vec> with declared buffer/array of C<bit>, C<uint2>,
C<uint4>, etc."
has it, in fact, been replaced?
AlexDani` m: .say for dir 22:28
camelia rakudo-moar a436fe: OUTPUT«"/home/camelia/star".IO␤"/home/camelia/.cpanm".IO␤"/home/camelia/.local".IO␤"/home/camelia/.npm".IO␤"/home/camelia/.perl6".IO␤"/home/camelia/.perlbrew".IO␤"/home/camelia/.rcc".IO␤"/home/camelia/.ssh".IO␤"/home/camelia/Perlito".IO␤"/home/c…»
22:30 tinyblak left, nowan left 22:33 nowan joined
dha There appears to be a C<wait> method in the C<Supply> role. I'm am unclear whether this relates to Perl 5's C<wait> function. any ideas? 22:34
AlexDani` do I have to close filehandles or are they closed automatically when it gets out of scope? 22:37
timotimo not when it gets out of scope, but when it gets garbage collected eventually 22:39
22:39 FROGGS left
AlexDani` hm, in other words it is not a good idea to rely on that? 22:40
timotimo correct 22:42
you can annotate variables with a phaser that'll execute when they go out of scope, though
i think that's "will leave { ... }"
RabidGravy dha, not really 22:46
dha Yeah. Figures. 22:47
RabidGravy there is no core fork() so the notion of wait is redundant
timotimo can't you also wait for pids that you didn't start yourself? 22:48
22:48 beastd left
RabidGravy you could, but that hey 22:50
dha I have finished perlfunc. *thud* 22:51
timotimo awesome :)
Supply.wait blocks until the Channel was closed or threw an error 22:52
dha I'm still trying to figure out if this is something anyone is actually going to use.
timotimo i surely won't :) 22:53
except, maybe if i end up talking to a perl5 user again
dha Yeah, I'm guessing that, of the people in this channel, I'm probably the most likely to actually find any of this helpful. :-)
timotimo we do get newcomers all of the time, i bet many of them have a history with perl5 as well 22:54
RabidGravy Supply.wait? Sure, it saves a Promise is you've started off a thread that is going to pump a bunch of stuff to a Supply
[Coke] dha++
RabidGravy ;-) 22:55
timotimo i wouldn't call that "save a supply" to be honest
because it uses a supply internally :)
22:55 spider-mario left
RabidGravy promise 22:56
timotimo er
yes, promise
RabidGravy oh I know, just one you need to know about ;-) 22:57
timotimo sure
a whole lot of the async and multithreading stuff gives you "less stuff to know about" 22:58
22:58 raiph left
rickbike I can't get a match from lol() per design.perl6.org/S05.html#Capturing...ed_matches 22:58
RabidGravy but yeah dha++ # documenting
dha Thanks. 22:59
timotimo rickbike: it could be that that's not yet implemented :\
b2gills dha: Perl 5's `wait` is more or less replaced with `await` which works on Promise objects
dha Ah. I thought that might be a possibility, but was unclear. 23:00
23:00 amurf joined
timotimo hm, there's tests 23:00
ah, i see, 'lol()' is supposed to give you the result of the match object?
b2gills The use-cases are similar but there is quite a difference
RabidGravy sorta kinda but Promises don't have anything to do with processes
timotimo that's interesting
rickbike: your code might work if you use @().lol 23:01
nothing in rakudo connects the sub lol to the current match object
23:04 Sqirrel left 23:05 gcole left 23:07 Akagi201_ left
rickbike timotimo: Yes, @().lol Thanks! 23:11
timotimo there could be/ought to be a ticket in our request tracker for this feature 23:12
searching for "lol" gives "0 tickets found" 23:13
so i guess i'll create one later tonight
rickbike Where is the RT?
timotimo rt.perl.org
you can feed it via [email@hidden.address] 23:14
23:14 TEttinger left
rickbike I'll send a bug report. 23:16
timotimo cool
it'll be something like "lol() doesn't refer to the current match result" or something
23:17 Sqirrel joined 23:31 tinyblak joined 23:32 maddingue joined 23:36 lucasb joined 23:39 tinyblak left
lucasb m: my @a; undefine(@a); say @a.defined 23:41
camelia rakudo-moar a436fe: OUTPUT«True␤»
lucasb m: my %h; undefine(%h); say %h.defined 23:42
camelia rakudo-moar a436fe: OUTPUT«True␤»
lucasb ^^ This feels a little strange. Has it already been discussed?
dha m: my @a = <1 2 3 4>;say @a;undefine(@a);say @a; 23:47
camelia rakudo-moar a436fe: OUTPUT«1 2 3 4␤␤»
dha m: my @a;say @a.defined;
camelia rakudo-moar a436fe: OUTPUT«True␤»
dha m: my @a;@a.perl; 23:48
camelia ( no output )
dha m: my @a;say @a.perl;
camelia rakudo-moar a436fe: OUTPUT«[]<>␤»
dha I guess a declared variable is considered true, by virtue of having been... typed? I dunno. 23:49
m: say @q.defined;
camelia rakudo-moar a436fe: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tJAlIeDXt1␤Variable '@q' is not declared␤at /tmp/tJAlIeDXt1:1␤------> 3say 7⏏5@q.defined;␤»
dha I'm now wondering under what circumstances .defined would ever return false. 23:50
ugexe m: sub foo($bar?) { say $bar.defined }; foo() 23:51
camelia rakudo-moar a436fe: OUTPUT«False␤»
dha Hm. Apparently defined will return true for any instance. It returns False on the type object, but otherwise true. 23:52
lucasb My thought was that undefine() makes sense for scalar vars. But for arrays and hashes... those will never be undefind by assigning Empty to them
*undefined
dha m: my $x;say $x.defined;undefine($x);say $x.defined; 23:53
camelia rakudo-moar a436fe: OUTPUT«False␤False␤»
ugexe m: sub foo($bar?) { say $bar.defined }; foo(Any)
camelia rakudo-moar a436fe: OUTPUT«False␤»
dha Huh.
ugexe m: sub foo($bar?) { say $bar.DEFINITE }; foo(Any)
camelia rakudo-moar a436fe: OUTPUT«False␤»
lucasb I think what I was trying to say is about the name of the function. 23:54
iirc, both Python and Ruby has a .clear method on theirs lists/arrays and hashes/dicts 23:55
ugexe i dont think you are supposed to use Empty
lucasb yeah, I'm behind on the new semantics of GLR and Nil/Empty. I don't know what happened the previous months :) 23:57