»ö« 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:04 LLamaRider left 00:14 laouji joined 00:23 b2gills left 00:27 b2gills joined
tony-o m: -- 00:27
camelia rakudo-moar 553f0e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/31yOaG3fRu␤Prefix -- requires an argument, but no valid term found␤at /tmp/31yOaG3fRu:1␤------> 3--7⏏5<EOL>␤ expecting any of:␤ prefix␤»
tony-o m: -- "yo" 00:28
camelia rakudo-moar 553f0e: OUTPUT«Cannot modify an immutable Str␤ in block <unit> at /tmp/FoZ4OwLsK4:1␤␤»
00:39 laouji left 00:41 pochi left 00:43 laouji joined, BenGoldberg joined 00:46 pochi joined
tony-o raiph: i'm running into a problem trying to give EVALFILE scope of a variable 00:48
00:50 adu joined 00:54 khw left
raiph tony-o: oh? 00:59
00:59 aborazmeh joined, aborazmeh left, aborazmeh joined
tony-o raiph: i accidentally uncommented something 01:01
it's working now, working on the grammar to do the interpolating 01:02
raiph tony-o: Did you basically agree or disagree with what I wrote in the issue? Is "the grammar to do the interpolating" the slang to switch from `{` and `}` delimiters? 01:06
tony-o raiph: i totally agree, i think it could be a really cool templating system 01:07
the grammar is to parse the templates and figure out which interpolation to use, separate the blocks from the qqw[] stuff
the problem is the client sockets and server are both running in different threads and they can't talk very well because of the cross thread crap 01:08
oops
01:09 khw joined
raiph tony-o: I'm confused about you writing a grammar to separate the blocks. I was thinking you just let the Perl 6 grammar do its thing. 01:09
tony-o raiph: i can't see how to do that, maybe i'm confused about '--' 01:10
01:13 yqt left
tony-o m: my $l = ' { $raiph } '; my $raiph = 'hello world'; say qqw{$l}; 01:15
camelia rakudo-moar 553f0e: OUTPUT«{ $raiph }␤»
raiph m: my $data; $data<what> = 'that'; print "Hello { "WORLD!" }␤␤Oh, did you want variables too? I can do { $data<what> } too.␤{ (for ^3 -> $a { $a ~ ($a == 2 ?? '' !! ', '); }) }" 01:17
camelia rakudo-moar 553f0e: OUTPUT«Hello WORLD!␤␤Oh, did you want variables too? I can do that too.␤0, 1, 2»
tony-o yea i understand how that interpolation works, but now how to get that interpolation from a file or a string 'slurp'd from a file 01:18
because essentially you end up with literal '{' in the string
raiph tony-o: ooooh 01:20
tony-o i guess that might be called lazy interpolation, i can't think of a good way to achieve that without writing a grammar 01:21
raiph m: my $raiph = 'hello world'; my $l = " { $raiph } "; say qqw{$l};
camelia rakudo-moar 553f0e: OUTPUT«hello world␤»
tony-o before the 'say' happens, $l already contains 'hello world' 01:22
01:22 leont left 01:26 flussence joined
tony-o jnthn: i have a patch for Grammar::Debugger that makes it work, it fails the debugger test because it times out waiting for input but the thing outputs as i'd expect. the tracer also works with the patch *and* it passes the test. it's a hack though. do you want a PR or how else can i make this useable until we figure out the right solution? 01:32
raiph m: my $raiph = 'hello world'; my $l = ' { $raiph } '; say EVAL qqw{$l}; 01:33
camelia rakudo-moar 553f0e: OUTPUT«hello world␤»
raiph tony-o: What's the weakness in ^^ ? 01:34
tony-o m: my $r = 'sup'; my $s = 'hello { $r }'; say EVAL qqw{$s}; 01:35
camelia rakudo-moar 553f0e: OUTPUT«5===SORRY!5=== Error while compiling EVAL_0␤Undeclared routine:␤ hello used at line 1. Did you mean 'shell'?␤␤»
raiph m: my $r = 'sup'; my $s = 'hello { $r }'; say EVAL qqw{"$s"} 01:36
camelia rakudo-moar 553f0e: OUTPUT«hello sup␤»
tony-o m: my $r = '{ for ^3 { .say; } }'; say EVAL qqw{$r}; 01:37
camelia rakudo-moar 553f0e: OUTPUT«0␤1␤2␤Nil␤»
tony-o m: my $r = 'count to 3: { for ^3 { .say; } }'; say EVAL qqw{"$r"};
camelia rakudo-moar 553f0e: OUTPUT«0␤1␤2␤Use of Nil in string context in block <unit> at EVAL_0:1␤count to 3: ␤»
raiph don't .say 01:38
tony-o m: my $r = 'count to 3: { for ^3 { print $_; } }'; say EVAL qqw{"$r"};
camelia rakudo-moar 553f0e: OUTPUT«012Use of Nil in string context in block <unit> at EVAL_0:1␤count to 3: ␤»
raiph do wrap (last statement in a block) in parens
don't say or print 01:39
m: my $r = 'count to 3: { (for ^3 { $_ } ) }'; say EVAL qqw{"$r"};
camelia rakudo-moar 553f0e: OUTPUT«count to 3: 0 1 2␤»
raiph tony-o: I think the semantics of a block inside a string are that it interpolates the return value 01:41
ugexe depends on what you use to quote it though
raiph ugexe: indeed 01:42
if EVAL'd using default double quoted string semantics
01:42 dayangkun joined
tony-o yea i'm not sure i want to expect people with templates to have to do that for a loop 01:43
raiph tony-o: Yeah, that Perl 6 wrinkle is about the weakest aspect of the approach. 01:48
01:48 FROGGS joined 01:50 atroxaper joined
raiph tony-o: Maybe redirect writes to STDOUT to make say/print work as expected? 01:52
01:53 Ben_Goldberg joined 01:54 adu left 01:55 atroxaper left 01:56 BenGoldberg left
raiph tony-o: does a PHP `print` command insert it's output in to the page at the point it occurs? 01:56
tony-o not really sure, i have the STDOUT redirection working right now 01:57
raiph tony-o++ 01:58
tony-o: I'm thinking that a generic redirect-stdout-to-enclosing-string option for strings would be cool. 02:01
tony-o what do you mean? 02:02
raiph m: say "foo { print 'bar' } baz" :dwim # says 'foo bar baz' 02:03
camelia rakudo-moar 553f0e: OUTPUT«barUnexpected named parameter 'dwim' passed␤ in block <unit> at /tmp/Ye9Ue8ZfAd:1␤␤»
02:03 yeahnoob joined
tony-o ahh, yea that's what i'm trying to do so if you need to manipulate something in a loop you can just 'print' it instead of fooling around with ending a block and restarting a block or whatever 02:04
then you're not stuck buffering crap into a temp str to use that as the return value
02:05 adu joined
raiph tony-o: I was thinking that you (the implementor, not user) would redirect STDOUT to a temp str per block and then prepend that temp str to a block's returned value. 02:10
tony-o: and that that would be a useful feature in its own right 02:11
02:11 noganex_ joined 02:14 noganex left
tony-o first i need to figure out matching the right brace for nested { } 02:18
02:19 FROGGS left
ugexe just require putting a \r\n\r\n before each ending }! 02:19
raiph tony-o: Is that so you can switch from `{...}` to some other delimiter? 02:20
tony-o yea
02:21 BenGoldberg joined
dalek c: 56f6381 | hoelzro++ | lib/Type/Str.pod:
Document Str.substr(Range)
02:21
02:22 Ben_Goldberg left
raiph tony-o: I recall reading the blog post that announced PHP. Iirc I read it the same day it was posted. ("Personal Home Page" iirc. 1996 or thereabouts.) It was very simple and low key. A quick hack that was easier than SSIs and Perl. And look what happened. 02:31
(iirc it was before blogs were called blogs, or even weblogs) 02:32
02:33 telex left 02:34 FROGGS joined, telex joined 02:35 adu left 02:38 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk 02:41 vendethiel joined 02:54 davido_ joined 03:20 aborazmeh left 03:23 FROGGS left 03:30 aborazmeh joined, aborazmeh left, aborazmeh joined 03:31 laouji left 03:32 laouji joined 03:33 vendethiel left 03:39 Ben_Goldberg joined 03:43 BenGoldberg left 03:48 raiph left 04:08 nys left 04:09 aindilis joined 04:14 sftp joined, vendethiel joined 04:22 nightfrog joined, laouji left 04:30 dr- joined 04:31 dr- left 04:32 Ben_Goldberg left 04:34 khw left 04:38 adu joined, adu left 04:53 laouji joined 04:59 vendethiel left 05:06 atroxaper joined 05:08 rickbike joined, rickbike left 05:10 rickbike joined 05:11 vendethiel joined, [Sno] left 05:23 quester joined
TimToady waves from tahoe, after driving 700 miles 05:24
moritz particles back 05:25
05:25 atroxaper left, atroxaper joined 05:26 atroxaper left 05:27 rickbike left 05:34 vendethiel left, aborazmeh left 05:44 vendethiel joined 05:52 atroxaper joined 05:55 _mg_ joined 06:03 diana_olhovik joined 06:14 FROGGS joined 06:21 gfldex joined 06:29 RabidGravy joined
RabidGravy morning 06:30
06:32 vendethiel left, mj41 joined
mj41 .tell tony-o See my POC github.com/mj41/SP6/ :-) 06:34
yoleaux mj41: I'll pass your message to tony-o.
06:35 mj41 left 06:42 domidumont joined 06:43 gfldex left 06:46 Ven joined 06:47 domidumont left 06:48 domidumont joined 06:50 amurf left 07:00 zakharyas joined 07:04 atroxaper left 07:09 vendethiel joined 07:15 skids left 07:18 atroxaper joined
masak good morning, #perl6 07:19
pmichaud` # irclog.perlgeek.de/perl6/2015-06-24#i_10801409 07:21
er, pmichaud++
nwc10 good *, masak 07:23
nwc10 wonders what it will take to bootstrap jnthn this morning. Fortutious cosmic ray?
www.planetary.org/blogs/jason-davis...-test.html 07:24
07:25 rindolf joined
masak nwc10: jnthn bootstrapping being slow is (seemingly) a tradeoff to increase the rest of jnthn performance. :P 07:25
nwc10 after the past couple of days, I'm somewhat concerned about the difference betwen "slow" and "Saturday" 07:26
07:33 vendethiel left 07:34 Ven left
masak m: sub foo($a;; $b) { say "OH HAI" }; foo(1, 2); say &foo.signature 07:35
camelia rakudo-moar 553f0e: OUTPUT«OH HAI␤(Any $a, Any $b)␤»
masak submits rakudobug
arguably, that should say `(Any $a;; Any $b)`, because the difference affects the behavior of the signature. 07:36
07:36 espadrine joined 07:39 darutoko joined 07:43 Ven joined 07:44 abraxxa joined 07:45 quester left 07:49 pdcawley joined, pdcawley_ left
RabidGravy masak, what does the semicolon signify? 07:50
Ven masak: separates the mmd-impacting part from the other one 07:51
moritz the double semicolon indicates that everything behind it shouldn't be considered for multi dispatch
Ven oops.
moritz pretty useless in an only-sub
m: multi foo($a;; $b) { say "OH HAI" }; say &foo.signature 07:52
camelia rakudo-moar 553f0e: OUTPUT«(|)␤»
moritz m: multi foo($a;; $b) { say "OH HAI" }; say &foo.candidates[0].signature
camelia rakudo-moar 553f0e: OUTPUT«(Any $a, Any $b)␤»
moritz ... but multis have the same problem :-)
07:53 g4 joined
RabidGravy ah okay 07:53
masak allow me to recommend codewords.recurse.com/issues/three...ata-types/ to anyone with an interest in Category Theory.
I just skimmed it, and it looks quite nice.
07:53 Ven left 07:54 cfa joined
moritz opens it in a browser tab, and hopes to get around to reading it later on 07:54
07:55 vendethiel joined 07:56 [Sno] joined 08:00 zakharyas left
lizmat .tell tony-o I think jnthn would appreciate a PR for the debugger/tracer fixes 08:01
yoleaux lizmat: I'll pass your message to tony-o.
FROGGS masak: what is ;; in a signature? 08:03
lizmat disregard other params for MMD 08:05
DrForr .tell tony-o Might it be possible to have Data::Dump default to non-colorized when output is not going to a tty?
yoleaux DrForr: I'll pass your message to tony-o.
FROGGS lizmat: aha 08:09
masak FROGGS: details are in S06, I believe. 08:11
08:11 jack_rabbit left
masak .oO( when I was young we didn't ask questions on channel; we just pored over the apocalypses, trying to understand them ) :P 08:12
you young'uns with your "synopses" and your "spec" and your "docs" and your "blogs" and your "learnxiny"...
get off my apocalawn! :P 08:13
FROGGS :P 08:15
FROGGS .oO( do they do :S in #scala? )
08:15 dakkar joined
TEttinger FROGGS: they do ;( 08:16
masak the only way to understand Perl 6 back then was to read the Apocalypses, aloud, in TimToady's voice.
DrForr There's a "History of the World, Part 2" joke in there somewhere.
FROGGS .oO( '}' is meant to terminate a statement... except when it's not ) 08:18
nwc10 and, if you were lucky, and could also do an Australian accent, you might be able to read an Exergesis. 08:19
08:20 Ven joined, espadrine left 08:22 gagalicious joined
lizmat and that was quite an Exercise! 08:25
std: sub ($a;;$b;;$c) {} 08:26
camelia std 28329a7: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/BWLZr7O4fp line 1:␤------> 3sub ($a;;7⏏5$b;;$c) {}␤ $c is declared but not used at /tmp/BWLZr7O4fp line 1:␤------> 3sub ($a;;$b;;7⏏5$c) {}␤ $a is declared but not used at /tmp/B…»
lizmat std: sub ($a;;$b;;$c) { $a,$b,$c }
camelia std 28329a7: OUTPUT«ok 00:00 141m␤»
lizmat would multiple use of ;; make any sense ?
moritz no 08:27
08:27 jack_rabbit joined, TEttinger left
dalek kudo/nom: 3e1dab7 | lizmat++ | src/Perl6/Grammar.nqp:
Make use of ;; in sig a NYI compile error for now

This at least prevents #125482 for now.
08:27
08:37 atroxaper left 08:38 amurf joined 08:39 Ven left 08:41 atroxaper joined 08:42 zakharyas joined 08:43 amurf left 08:44 atroxaper left
masak prevents? not if it's just a .worry 08:44
I was also thinking how strict we want to be with `;;` in only subs/methods. they don't make much sense there. 08:45
09:01 vendethiel left
moritz huh? I thought ;; was implemented? 09:03
seems I was wrong 09:04
09:06 espadrine joined
moritz m: multi a(Int;;Cool) { say 1 }; multi a(Int;;Int) { say 2 }; a 0, 0 09:08
camelia rakudo-moar 3e1dab: OUTPUT«Potential difficulties:␤ Use of ;; in signature not yet implemented␤ at /tmp/5GiFBqHgu2:1␤ ------> 3multi a(Int;;7⏏5Cool) { say 1 }; multi a(Int;;Int) { say␤ Use of ;; in signature not yet implemented␤ at /tmp/5GiFBqHgu2:1␤…»
moritz lizmat: in my old rakudo, I get a "Ambiguous call to 'a'" with the ;;, and 2 (second candidate) without the ;; 09:09
lizmat: so I'm pretty sure ;; is actually implemented
even if the information isn't carried to the Signature object
09:10 vendethiel joined 09:11 ][Sno][ joined 09:13 [Sno] left
masak right, the problem might be only in the presentation of the siggie. 09:15
09:21 atroxaper joined
masak m: sub foo($x, $y;; $z) {}; say &foo.arity; say &foo.count 09:23
camelia rakudo-moar 3e1dab: OUTPUT«Potential difficulties:␤ Use of ;; in signature not yet implemented␤ at /tmp/bI6cxCdO5o:1␤ ------> 3sub foo($x, $y;;7⏏5 $z) {}; say &foo.arity; say &foo.count␤3␤3␤»
masak oh, right.
locally, that gives "3\n3\n" 09:24
09:25 laouji left 09:26 laouji joined 09:28 cognominal joined 09:29 andreoss joined
jnthn morning, #perl6 09:30
;; is implemented 09:31
It's just .perl of it that's not
It's also obvious it's being paid attention to; grep Actions.nqp for ;; 09:32
And since it works, code could easily be using it out there.
masak ok. 09:33
dalek kudo/nom: 2bafa97 | (Carl Masak)++ | src/Perl6/Grammar.nqp:
Revert "Make use of ;; in sig a NYI compile error for now"

This reverts commit 3e1dab79af5ddc31aa200305d63348dbf9211dea.
  ';;' is implemented, and hence not NYI.
jnthn The SIG_ELEM_MULTI_INVOCANT flag not being set on a param is what indicates it is opted out of multi-dispatch 09:34
iirc, everything before a ;; has it set
(so if you see the next param doesn't, and the current one does, then you can emit a ;;) 09:36
nwc10 yay, jnthn bootstrapped 09:37
masak .oO( jnthn, dropping implementation clues on channel since 2007 ) :P
jnthn Allergies seem less annoying today than yesterday also :) 09:38
jnthn wonders if he'll get a couple of hours Perl 6 hacking in before going to $work-party :)
nwc10 the alternative is running a class in coffee brewing? 09:41
jnthn Well, or more usefully doing a few final tidying up tasks in the apartment, since I'm leaving it for good tomorrow :) 09:44
09:45 yeahnoob left 09:52 leont joined
RabidGravy m: use NativeCall; for (num64, num32 ) -> $type { my @buff := CArray[$type].new; @buff[$_] = Num(0) for ^10; } 09:52
camelia ( no output )
RabidGravy that almost exact code fails with "Wrong kind of access to numeric CArray in method ASSIGN-POS at lib/NativeCall.pm:333" in Audio::Sndfile but not when isolated like that 09:54
masak RabidGravy: your mission, should you choose to accept it, is to find out why one fails and not the other. 09:56
RabidGravy frankly it's doing my head in, the code in #125408 is fine now, but the original code I started with fails worse 10:00
10:03 atroxaper left
DrForr Speaking of NativeCall, I'm putting together an OpenCV2 binding now that the ANTLR4 port seems to be stabilizing. 10:04
10:06 atroxaper joined
RabidGravy cool 10:17
10:18 leont left 10:19 husanu3 joined, bjz joined 10:25 husanu3 left 10:26 husanu2 joined 10:28 amurf joined, husanu2 left, sqirrel joined 10:29 rindolf left, husanu3 joined
itz_ hahaha I hadn't seen www.youtube.com/watch?v=zC7uPC6KeA4 10:30
10:31 husanu3 left 10:32 amurf left
lizmat jnthn++ moritz++ masak++ for showing the error of my ways :-) 10:34
masak lizmat++ # learning together, the best kind of learning 10:35
lizmat yup, and I learned a bit about the P6 grammar :)
jnthn
.oO( lizmat++ # showing us the way of her errors )
The seperator thing is one of the icky bits of the grammar... 10:36
iirc it actually collects them into an array held in a dynvar...
lizmat yeah, I saw that :-) 10:37
10:37 dayangkun left
jnthn I think there is (by now, perhaps "was") a bug that meant captures on the RHS of %% got lost 10:38
So it may be possible to clean up
If the bug is fixed already, or when the bug gets fixed.
10:40 darutoko- joined
dalek c: cc155f6 | paultcochrane++ | lib/Language/regexes.pod:
Minor wording improvements in regexes.pod
10:41
c: efbb139 | paultcochrane++ | lib/Language/testing.pod:
Convert variable names to kebab-case

This is then more consistent with general Perl6 usage.
10:42 rindolf joined 10:43 darutoko left
RabidGravy boom! got it! 10:46
lizmat masak jnthn moritz : I just realized that the ;; feature is *not* spectested atm, as I did a spectest before pushing and saw no failures 10:50
10:50 ][Sno][ is now known as [Sno]
jnthn RabidGravy: A golf of the nasty bug? 10:55
lizmat: Yes, I was wondering about that...
timotimo i really wouldn't mind if we got a stream-based xml parser for perl6 10:57
masak timotimo: "wouldn't mind" is like the most diluted form of volunteering there is :P 10:59
homeopatic volunteering
lizmat m: sub a (;;$a) { } # jnthn: does this signature make sense?
camelia ( no output )
masak lizmat: ;; in only subs doesn't make much sense in the first place. 11:00
m: sub a (;;$a) { say "OH HAI" }; a(5)
camelia rakudo-moar 2bafa9: OUTPUT«OH HAI␤»
timotimo also not really without a type
lizmat well, ok
masak lack of type is fine after ;; I think
lizmat multi then
it was more about *not* having anything before the ;; 11:01
masak m: multi foo(;;$a) { "OH HAI" }; foo(5)
camelia ( no output )
masak m: multi foo(;;$a) { say "OH HAI" }; foo(5)
camelia rakudo-moar 2bafa9: OUTPUT«OH HAI␤»
masak lizmat: seems to make sense.
RabidGravy jnthn yeah, I added gist.github.com/jonathanstowe/2776...15f42cbd4d to the rt#125408
lizmat masak: how?
masak I guess it means something like "no part of this siggie takes part in candidate resolution" 11:02
lizmat then how does it get to find any method then?
masak lizmat: it's not about finding the method. it's about disambiguating several methods.
lizmat m: multi a (;;$b) { }; multi a (;;$a,$b) { }; say a(42)
camelia rakudo-moar 2bafa9: OUTPUT«Nil␤»
lizmat m: multi a (;;$b) { say "one" }; multi a (;;$a,$b) { say "two" }; a(42) 11:03
camelia rakudo-moar 2bafa9: OUTPUT«one␤»
masak again, there is only one possible candidate in that case.
lizmat m: multi a (;;$b) { say "one" }; multi a (;;$a,$b) { say "two" }; a(42,666)
camelia rakudo-moar 2bafa9: OUTPUT«two␤»
lizmat m: multi a (;;$b) { say "one" }; multi a (;;$a) { say "two" }; a(42)
camelia rakudo-moar 2bafa9: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(Any $b)␤:(Any $a)␤ in block <unit> at /tmp/AQPjykgBxr:1␤␤»
masak right.
lizmat: disambiguating performs a narrowness analysis. 11:04
11:04 sqirrel left
masak lizmat: only things to the left of the ;; participate in it. 11:04
RabidGravy in summary it only does it in a loop and it only does it when the number of elements isn't known to the method at compile time
masak so in the cases above, there is basically no narrowness analysis performed.
jnthn m: multi a (;; Any $b) { say "one" }; multi a (;; Int $a) { say "two" }; a(42)
camelia rakudo-moar 2bafa9: OUTPUT«two␤»
jnthn I...think that one is a bug
masak I think so too
jnthn We probably mis-handled initial ;;
That should be ambiguous
masak unless some other tiebreaking thing kicks in. 11:05
but I don't think it does.
jnthn It shouldn't, I think we just don't handle initial ;; properly
masak m: multi a ($b) { say "one" }; multi a ($a) { say "two" }; a(42)
camelia rakudo-moar 2bafa9: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:(Any $b)␤:(Any $a)␤ in block <unit> at /tmp/F1MBK0dd_e:1␤␤»
masak that's the behavior I expect.
masak submits rakudobug
jnthn Right, same
timotimo RabidGravy: can you try it with MVM_SPESH_DISABLE=1 set in your environment? 11:07
RabidGravy timotimo, yeah that makes it go away (as it does in the actual code) 11:08
timotimo god damn it :S
masak ok, now it's a *cursed* bug.
timotimo can you upload the MVM_SPESH_LOG=broken_carray_access.txt ?
best gzip it :)
11:09 _mg_ left 11:10 _mg_ joined
lizmat jnthn: indeed, SIG_ELEM_MULTI_INVOCANT is set on the first param in (;; $a) 11:11
timotimo ah, good catch. that's probably wrong, then :)
RabidGravy timotimo, added to ticket. bastarding big even gzipped 11:14
timotimo sorry, i recently improved the speshlog to become bigger :) 11:15
RabidGravy :-)
11:19 Alina-malina joined
jnthn Bastarding big? Nodes in the dominance tree are unsure who their parents are? :P 11:19
timotimo RabidGravy: can i has the RT# again?
moritz nah, the parents just didn't marry :-)
RabidGravy timotimo, rt.perl.org/Ticket/Display.html?id=125408 11:20
timotimo 1.6m is bastarding big to you? :)) 11:21
that's nothing! ;) 11:22
jnthn lunch & 11:23
timotimo RabidGravy: is the file called "tz"?
RabidGravy yeah, for no particular reason. I was just running out of two letter filenames 11:24
(ancient practice of mine - give scratch files two letter names to make them easy to delete ;) 11:27
right off out now
11:28 gcole left
timotimo fair enough :) 11:31
11:32 RabidGravy left, gcole joined
lizmat m: (sub a { @_ }).signature.perl.say # shouldn't that be :(;; *@_) ?? 11:33
camelia rakudo-moar 2bafa9: OUTPUT«:(*@_)␤»
dalek kudo/nom: 4e1fa3c | lizmat++ | src/core/Parameter.pm:
Implement multi-invocant method

To check for SIG_ELEM_MULTI_INVOCANT flag
11:35
11:36 laouji left 11:39 El_Che joined 11:40 telex left 11:42 telex joined
lizmat There is a subtle difference in the signature of "sub a { @_ }" and sub a(*@_) { }" that was so far unseen: 11:42
$ 6 '(sub a { @_ }).signature.params[0].multi-invocant.say'
False
$ 6 '(sub a(*@_) { @_ }).signature.params[0].multi-invocant.say'
True
jnthn masak: should @_ have the multi-invocant bit set or not (in either case?) 11:44
alternately: should slurpies ever have the multi-invocant bit set ? 11:46
masak I don't really see why it should. 11:47
but I don't know exactly what multi-invocant is.
dalek kudo/nom: f43725a | lizmat++ | src/core/Signature.pm:
Show ';;' in signatures if they need to be

Fixes #125482
11:48 atroxaper left
lizmat jnthn just said that params with that bit set, are included in MMD? 11:48
masak m: say (sub a(*@_) { @_ }).signature.params[0].WHAT
camelia rakudo-moar 2bafa9: OUTPUT«(Parameter)␤»
11:49 salva joined
lizmat hmmm... musty have inferred that 11:49
11:49 atroxaper joined, atroxaper left
lizmat anyway, the fix causes 3 spectest failures because of difference in handling auto-generated sigs 11:50
masak it's odd. I don't see `multi-invocant` defined or referred to anywhere.
lizmat it's probably an implementation detail
I just added the multi-invocant method
(if you're looking at the source) 11:51
t/spec/S06-signature/unspecified.rakudo.moar (Wstat: 768 Tests: 17 Failed: 3)
Failed tests: 5, 9, 13
feels to me either the test is wrong (now), or having the flag set on auto-generated sigs is wrong 11:52
masak: should there be a difference between the sig of "sub a { @_ }" and "sub a(*@_) { }" ?
jnthn lizmat: I suspect it should probably be set on anything that isn't after a ;; 11:53
lizmat ?? I thought you just said it should be set on anything *before* ;; ? 11:54
ah, uh. duh :-)
jnthn I...yeah, negations are not unbad. :)
lizmat so the autogenned sig is wrong ? 11:55
masak .oO( but what about the excluded middle? what about parameters that are exactly on top of the ;; ? ) :P
jnthn lizmat: Yeah, that's probably just an oversight 11:56
lizmat should I create a ticket for that and todo the failing tests?
or can you give me a pointer as to where to look to fix this oversight ?
jnthn Yeah, please. I think there'll be a good way to fix it generally
Well, probably in World.nqp's create_parameter method 11:57
lizmat ah, ok, lemme check
jnthn I think if the param info hash doesn't have the multi_invocant key we should default it to setting the bit, whereas today we probably default to not doing so
You may be able to eliminate places that actions.nqp sets it as a result of this...
(expect the place that sets it to 0)
11:58 Ven joined 12:00 domidumont left
timotimo do we now get a ;; before every *%_? 12:03
jnthn shouldn't
timotimo it would be kind of nice to have that hint for people who tend to forget about nameds only being used for tie-breaking
jnthn Well, we will if the bug isn't fixed...
timotimo you know, the thing where the order of subs decides
lizmat $ 6 '(sub a(:$n) { }).signature.params[0].multi-invocant.perl.say' 12:04
Bool::True
jnthn The language in the spec suggests that maybe, post-6.0, we will have nameds play into the candidate sort 12:05
timotimo oh
i see
lizmat so any named param seem to have the multi-invocant bit set atm
jnthn I'm not sure how viable that is, but I'd rather keep .multi-invocant only ever show up after a ;;
That is, keep it aligned with what the programmer wrote
masak +1 12:06
simple rule: "was there a ;; before this parameter?"
jnthn aye 12:07
timotimo fair enough
jnthn I like simple rules
lizmat $ 6 '(sub a($a;;:$n;) { }).signature.perl.say'
:(Any $a;; Any :n($n))
jnthn ...and I can not lie
masak jnthn: doesn't preserve the meter. you have to like big rules or something :P
lizmat so: the current rule is: all params have multi-invocant bit set unless there was a ';;' seen, in which case only the params before the ;; have it 12:08
masak .oO( I like excessively bending the meter of original works and I cannot lie )
lizmat: or, shorter, all params not after a ;; have it 12:09
jnthn masak: As a Brit, I think it's the foot and inch I'm meant to be preserving, not the meter :P 12:10
lizmat
.oO( said in true British syncopation )
masak the sun never sets on antiquated measurements. 12:11
12:13 domidumont joined
daxim docs.perl6.org needs an explanation of its usage examples under the headlines. I cannot figure out what :D: means or **@p or |p 12:16
masak daxim: +1 12:18
daxim: saying things in words (besides showing the symbols) would help immensely.
moritz it would also be cause for lots of redundancy
daxim just hyperlink the things to its appropriate page, that already would make me happy 12:19
moritz (which isn't a priori a bad thing in docs, but it does lead to more maintenance)
masak moritz: the words describing things like **@p don't change all that often 12:21
jnthn Maybe the bits of signature syntax could link to the appropriate bit of the signatures doc 12:22
Ah, I htink that's what daxim meant...
daxim yes!
masak ok, good. 12:25
dalek ast: 6948ef3 | lizmat++ | S06-signature/unspecified.t:
Fudge failing tests for RT #125486
12:27
timotimo is something wrong with *.WHAT? 12:28
m: say ("hi", 1, 0.9).map(*.WHAT)
camelia rakudo-moar f43725: OUTPUT«hi 1 0.9␤»
timotimo m: say ("hi", 1, 0.9).map({ $_.WHAT })
camelia rakudo-moar f43725: OUTPUT«(Str) (Int) (Rat)␤»
timotimo star: say ("hi", 1, 0.9).map(*.WHAT)
camelia star-m 2015.03: OUTPUT«hi 1 0.9␤»
jnthn I don't think .WHAT auto-curries (by design)
moritz right; it's not a method 12:29
timotimo hm
fair enough
moritz it's a macro in method disguise
timotimo and >>.WHAT isn't supposed to work either?
moritz m: say (1, 'foo')>>.WHAT 12:30
camelia rakudo-moar f43725: OUTPUT«(Parcel)␤»
12:30 g4 left 12:33 aborazmeh joined, aborazmeh left, aborazmeh joined
dalek ast: ce42e09 | hoelzro++ | S32-str/substr (2 files):
Add basic tests for substr/substr-rw + Range
12:37
12:37 zakharyas left
lizmat afk for a bit& 12:38
12:39 zakharyas joined
hoelzro morning #perl6 12:45
12:50 atroxaper joined, husanu3 joined 12:52 husanu3 left 12:54 atroxaper left 12:56 husanu2 joined 13:00 husanu2 left 13:01 Ven left 13:10 domidumont left, domidumont joined
Woodi hi #perl6 :) 13:12
hoelzro can anyone think of why *not* inlining a block would prevent phasers + return from working properly? I was trying to fix RT #125480 last night, but this is my first dance with the optimizer
ahoy Woodi
13:13 husanux5 joined, husanux5 left
Woodi hoelzro: becouse it returns to not inlined block ? :) 13:13
but I have no idea what I'm talking about :) 13:14
hoelzro =)
13:14 husanux7 joined 13:15 rindolf left
Woodi let assume big photo is a list... user read it into memory and views or edit. so big memory blobs are valid cases. but this is "slurp" case... 13:18
13:18 husanux7 left
Woodi in "for lines()" for should use lines-iterator... if it create array of all lines in file then lines work like slurp, not lines :) 13:20
13:20 husanux9 joined, leont joined 13:21 husanux9 left
Woodi but probably we want something like "workflows" in photo editing... load, remove noise, up curves, sharper, save; one after one or batch... 13:21
psch Woodi: but lines() is just "lazy slurp" until the input record seperator..? 13:22
Woodi so keeping things in memory is like DOM xml parsing and for iterators we want SAX-like processing...
psch might be missing the point
13:23 Ven joined
Woodi psch: but looks lines() have side effect of keeping lines in memory 13:23
timotimo i think if you open a big photo, you'll most likely mmap it rather than reading it
PerlJam good morning #perl6 people 13:24
Woodi timotimo: no idea how editors do it :) but I was going to something similiar...
psch Woodi: i think that's what tie is/was (ab)use in p5? i.e. tie the array directly to the file on disk..?
i didn't really look closely at tie, fwiw 13:25
i have no idea how we'd do that in perl6 either
13:25 husanux3 joined
Woodi you see, we traditionaly thinks open/read/write/close file what is low level work. probably we need something like FileReader or FileAccessPoint in Java terminology, some layer above files... 13:28
PerlJam Hmm. If I read the tests right for .substr(Range), a range of 2..3 is one character?
13:29 husanux3 left
moritz wouldn't 2..2 make more sense as one character? 13:29
13:29 _mg_ left
PerlJam it would. That's why I'm hoping I'm reading wrong 13:29
moritz PerlJam++ # reviwing test 13:30
psch 2..^3 makes most sense imo
Woodi: why? your example seems to only imply we need in-place, on-disk editing somehow
moritz psch: ... which is the same as 2..2, if you only consider integers
Woodi and Iterator allows "access structure elements sequentially while hiding internal representation". so probably our list iterators some bigger subject...
moritz and string indexes tend to be integral
psch moritz: true... in light of that i'd actually retract the statement 13:31
moritz: as in, it might lend itselfs to be confused for an open interval
Woodi psch: it's example. it can be file it can be something else
psch Woodi: did you see the Cat type in the design documents? afair it's supposed to be text-only, but i might be misremembering
Woodi psch: looking 13:32
moritz m: say 'foobar'.substr(0..1) 13:33
camelia rakudo-moar f43725: OUTPUT«f␤»
moritz m: say 'foobar'.substr(3..4)
camelia rakudo-moar f43725: OUTPUT«b␤»
moritz m: say 'foobar'.substr(3..3)
camelia rakudo-moar f43725: OUTPUT«␤»
PerlJam m: say 'foobar'.substr(4..3);
camelia rakudo-moar f43725: OUTPUT«Number of characters argument to substr out of range. Is: -1, should be in 0..Inf; use *-1 if you want to index relative to the end␤ in block <unit> at /tmp/84F0_ObDSh:1␤␤»
psch hmm 13:34
PerlJam could use a better message there I guess
psch well, it works if it's thought of as character boundaries, instead of character position
not sure if that's intuitive
PerlJam it's not.
I'm positive it's not :) 13:35
psch PerlJam++ # intuition
13:37 Ven left
moritz psch: substr, index, Match.{from,to} all index characters, not character boundaries 13:39
13:46 Ven joined
PerlJam m: say "foobar".substr("0x2"..3); # we need a way to say "Range of Int" I think 13:51
camelia rakudo-moar f43725: OUTPUT«o␤»
13:56 aborazmeh left 13:58 _mg_ joined 14:05 leont left 14:06 amurf joined
ShimmerFairy Quick thought on substr ranges: we have ..^ , ^.. , and ^..^ as operators, so I disagree with treating the endpoint of a .. range as exclusive :) 14:07
b2gills Currently it seems very Pythonish, not Perlish 14:08
14:10 amurf left
Ulti the endpoint of a range is exclusive atm? 14:15
oh substr ranges 14:16
dalek ast: 93edb02 | PerlJam++ | S32-str/substr (2 files):
update existing and add more substr(Range) tests
14:17
kudo/nom: f9dca91 | PerlJam++ | src/core/Str.pm:
fix off-by-one on substr(Range) endpoint
14:18 RabidGravy joined 14:20 Woodi joined
RabidGravy warm 14:22
14:24 _mg_ left
[ptc] ugexe, tony-o_, hoelzro: have finally tested the new travis-build code (it takes a while) 14:29
ugexe, tony-o_, hoelzro: please review: github.com/paultcochrane/travis-bu...c5810f06d4
PerlJam [ptc]: Random question ... did you want to set TEST_JOBS so that the tests can run somewhat in parallel? 14:31
[ptc] PerlJam: not explicitly, no... Never thought/knew about it 14:32
14:33 leont joined
[ptc] PerlJam: is this something you'd recommend? 14:34
PerlJam um ... I'm not sure now that it would have an effect in how you're testing. 14:35
[ptc] yeah, the tests take place on my local machine in a vagrant virtual box 14:37
the IO in the virtual box is *very* slow and thus testing any changes is somewhat painful
14:39 atroxaper joined
hoelzro my slides from my "Hacking on Rakudo" talk are available now! docs.google.com/presentation/d/1JV...sp=sharing 14:39
[ptc] hoelzro++ 14:41
PerlJam hoelzro: slide 18 says "let's make some changes!" ... Did you live edit the rakudo grammar at that point? :-)
hoelzro yes!
PerlJam awesome!
hoelzro and I did a video of the same thing in the following slide
PerlJam hoelzro++
[ptc] very cool! 14:42
14:42 rindolf joined 14:44 atroxaper left
PerlJam hoelzro: You could that talk/slides into a nice tutorial too. (might increase rakudo's truck number in the long run) 14:44
hoelzro PerlJam: I was thinking of doing a screencast series
cognominal Atom is six month sin advance compared to Perl 6. They freezed the API, then worked on the perfs :)
hoelzro starting with learning Perl 6 itself, then onto the compiler
commute&
PerlJam hoelzro++ very nice 14:45
nine Oh I hate Google docs "The version of the browser you are using is no longer supported". But it's the latest available version.
moritz or so you think. 14:46
14:48 JimmyZ_ joined
dalek kudo-star-daily: a95a726 | coke++ | log/ (2 files):
today (automated commit)
14:48
14:53 abraxxa left 14:56 zakharyas left, diana_olhovik left 14:57 zakharyas joined
itz_ if any Atom users wanted to experiment with that editor's tag support they could try App::p6tags </advert> :) 15:00
(it works for me in vim anyway) 15:01
hoelzro [ptc]: your change looks good to me 15:05
psch grr LibraryLoader *shakes fist* 15:06
oh, nvm, java.net.URL it was /o\ 15:08
well, let's see if this patch actually can help me with loading nested jars.. 15:09
[ptc] hoelzro: ok, I'll let BanzaiMan know, thanks 15:10
15:10 domidumont left 15:14 domidumont joined
japhb .ask nine How do you pass @*ARGS and %*ENV to an Inline::Python instance? It doesn't seem to be doing it automagically, but perhaps I've got something wrong with my setup .... 15:14
yoleaux japhb: I'll pass your message to nine.
15:20 skids joined 15:31 zakharyas left 15:37 andreoss left 15:40 gcole left, gcole joined 15:46 diana_olhovik joined
skids While the hood is still open on Paramater.perl, If someone could look over the conversation on github.com/rakudo/rakudo/pull/446 I had a couple questions about how to handle things like \@foo (or for that matter, what they do in the first place). 15:46
timotimo er, isn't \ for sigilless parameters? 15:48
skids Also I have a first cut of a second approximation to .assuming nearing completion (I hope) that uses that PR. First cut because it uses EVAL.
15:48 raiph joined
timotimo cool :) 15:48
skids Yeah that's what confuses me.
psch yeah, \ is the not-a-sigil sigil
timotimo we also have/had \ for captures i think 15:49
psch we still have that, but not in a signature
m: my $a = \(1, "foo"); $a.WHAT.say
camelia rakudo-moar f9dca9: OUTPUT«(Capture)␤»
timotimo m: my @foo = 1, 2, 3; say \@foo 15:50
camelia rakudo-moar f9dca9: OUTPUT«\([1, 2, 3]<>)␤»
skids Also last night I could not figure out how to get named arguments stored in a @ back into a Capture as named arguments.
timotimo |%(@foo)?
skids No there are positionals in it too. 15:51
psch huh?
like [1, "a", 3]?
where "a" is the named key
skids m: my @foo = (1, 2, :a); \(|@foo).hash.perl.say;
camelia rakudo-moar f9dca9: OUTPUT«EnumMap.new()␤»
psch oh, so it is a pair 15:52
or, should be at least
skids Yes, trying to replicate how the stuff in the initializer is parsed. Anyway it was just for test functions so I worked around it. 15:53
timotimo m: my @foo = (1, 2, :a); say @foo.perl
camelia rakudo-moar f9dca9: OUTPUT«[1, 2, :a]<>␤»
PerlJam m: my @foo = (1, 2, :a); \@foo.say
camelia ( no output )
timotimo hm
psch m: my @foo = (1, 2, :a); my (@pos, %named) = @foo.classify({ $_ !~~ Pair }); say @pos.perl, %named.perl
camelia rakudo-moar f9dca9: OUTPUT«[Bool::False => [:a], Bool::True => [1, 2]]<>{}<>␤»
PerlJam well ... it should be like that I'd guess. 15:54
psch but eh
PerlJam m: my @foo = (1, 2, :a); \@foo.perl.say
camelia ( no output )
psch breaks on pairs as positional of course :/
PerlJam weird
psch m: my @foo = (1, 2, :a); 8\@foo).perl.say
camelia rakudo-moar f9dca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rrOyNDNj2T␤Confused␤at /tmp/rrOyNDNj2T:1␤------> 3my @foo = (1, 2, :a); 8\7⏏5@foo).perl.say␤»
psch m: my @foo = (1, 2, :a); (\@foo).perl.say
camelia rakudo-moar f9dca9: OUTPUT«\([1, 2, :a]<>)␤»
PerlJam oh, precedence
psch not sure how it parses that, though... 15:55
m: \"a".say
camelia ( no output )
psch m: \("a".say)
camelia rakudo-moar f9dca9: OUTPUT«a␤»
psch vOv
skids m: \(1,2,:a).perl.say; \(1,2,:a).hash.say; my @a = (1,2,:a); \(|@a).perl.say; \(|@a).hash.say; # That the .perl output is the same is LTA. 15:57
camelia rakudo-moar f9dca9: OUTPUT«\(1, 2, :a)␤EnumMap.new(:a)␤\(1, 2, :a)␤EnumMap.new()␤»
PerlJam .tell pmichaud I had a couple of minor comments on glr-draft. See gist.github.com/perlpilot/0eb929474ad1c3888f7d 15:58
yoleaux PerlJam: I'll pass your message to pmichaud.
15:58 sqirrel joined
psch m: my qa = 1,2,:a; (\(|@a)).perl.say< 15:58
camelia rakudo-moar f9dca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/auT7resfqQ␤Malformed my (did you mean to declare a sigilless \qa or $qa?)␤at /tmp/auT7resfqQ:1␤------> 3my qa7⏏5 = 1,2,:a; (\(|@a)).perl.say<␤»
psch m: my qa = 1,2,:a; (\(|@a)).perl.say
camelia rakudo-moar f9dca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FECEB39c5p␤Malformed my (did you mean to declare a sigilless \qa or $qa?)␤at /tmp/FECEB39c5p:1␤------> 3my qa7⏏5 = 1,2,:a; (\(|@a)).perl.say␤»
psch skids: i don't know, it makes sense to me. the first is a literal Capture, the second is an array lowered into the signature of a literal capture 15:59
("lowered" isn't the right word there, i think...)
skids: well, except if you'd like | represented in .perl, but i don't know how useful that is 16:00
skids m: \(1,2,:a).perl.say; \(1,2,$(:a)).perl.say; # better illustration 16:01
camelia rakudo-moar f9dca9: OUTPUT«\(1, 2, :a)␤\(1, 2, :a)␤»
16:01 FROGGS left
psch m: say \(1,2,$(:a)) ~~ :($, $, :$a); say \(1,2,:a) ~~ :($, $, :$a) # 16:03
camelia rakudo-moar f9dca9: OUTPUT«False␤True␤»
psch yep, that's LTA
i'd argue it's even wrong
skids Yes the .perl will evaluate to the former in both cases if fed back in.
16:05 sqirrel left 16:17 spider-mario joined, _mg_ joined 16:18 khw joined
skids m: ::<Int>.say; ::<Any>.say; ::<Mu>.say; ::<T>.say; ::<Array[Int]>.say; # It's not fantastically easy to do the last type-declared test here, unless there is another way I don't know about. It's easy enough the work around that Any and an undeclared type have the same result. 16:18
camelia rakudo-moar f9dca9: OUTPUT«(Int)␤(Any)␤(Mu)␤(Any)␤(Any)␤»
16:19 uncleyea1 joined, uncleyear left 16:20 diana_olhovik left
skids *that/to 16:21
erm.
*the/to
hoelzro anyone have thoughts on a :createonly option for open()? 16:23
tony-o TimToady: where did you drive there from, san diego? that's like 1/3 the way across the country 16:24
yoleaux 06:34Z <mj41> tony-o: See my POC github.com/mj41/SP6/ :-)
08:01Z <lizmat> tony-o: I think jnthn would appreciate a PR for the debugger/tracer fixes
08:05Z <DrForr> tony-o: Might it be possible to have Data::Dump default to non-colorized when output is not going to a tty?
JimmyZ_ no thought, except create-only😊 16:25
timotimo hoelzro: you used one of my bugs as demonstration for your talk! :) 16:26
tony-o DrForr: not sure i know how to tell if i'm outing to a TTY 16:27
16:27 nys joined
skids Well, the construction industry uses "green field" for building without demolition, but that's a horrible name. 16:27
anyway afk.
flussence m: say $*OUT.t 16:28
camelia rakudo-moar f9dca9: OUTPUT«Cannot find method 'isatty': no method cache and no .^find_method␤ in block <unit> at /tmp/mn2aiSpTA7:1␤␤»
16:28 _mg_ left, domidumont left
hoelzro timotimo: yup! it was an easy fix =) 16:30
timotimo :) 16:31
tony-o jnthn: PR'd Grammar::Debugger
16:32 skids left
tony-o .tell mj41 i might use that instead of protone :-) 16:32
yoleaux tony-o: I'll pass your message to mj41.
TimToady tony-o: we came from Idaho Falls, via Craters of the Moon 16:33
tony-o flussence: i get the same isatty error on a tty 16:34
16:34 gfldex joined
tony-o TimToady: that's a hell of a drive 16:34
flussence tony-o: it's a thing that *should* work, but doesn't :( 16:36
tony-o .tell DrForr i can make it default when $*OUT.t starts working. in the mean time, it shouldn't colorize output if you don't have Term::ANSIColor installed or if you use the flag 16:40
yoleaux tony-o: I'll pass your message to DrForr.
DrForr tony-o: man 3 isatty # checks the current FD
yoleaux 16:40Z <tony-o> DrForr: i can make it default when $*OUT.t starts working. in the mean time, it shouldn't colorize output if you don't have Term::ANSIColor installed or if you use the flag
16:41 JimmyZ_ left
DrForr Well, not the current FD, the one passed in. 16:41
tony-o how would i use that to check for TTY? using nativecall? 16:42
DrForr It's sort of a moot point ATM because installing it via Panda requires Term::ANSIColor be installed.
I'd guess so. It'd be nice to have that as an IO:: method though.
tony-o panda installs Term::ANSIColor ? 16:44
DrForr 'panda install Data::Dump' fails because Term::ANSIColor is needed as a dependency.
hoelzro PerlJam: you made the changes around substr(Range), right? 16:46
PerlJam hoelzro: aye.
16:46 yqt joined
ugexe Term::ANSIColor isnt a dependency according to the meta. it looks like an optional require in the source only 16:46
hoelzro PerlJam: my thought for the range form of substr was so that I could do something like $s.substr($/.from .. $/.to)
ugexe oh there is an instance where its not in a try block 16:47
DrForr Last time I tried to install it through Panda it failed a test.
hoelzro but now that the last index in the range is included, it would have to be $/.to - 1
ugexe github.com/tony-o/perl6-data-dump/...ump.pm6#L4
hoelzro did someone raise a concern with excluding the end of the range?
ugexe should probably be a try{}
16:47 Ven left
PerlJam hoelzro: yeah, it's not intuitive. 16:47
tony-o pushed up a fix for it 16:48
PerlJam hoelzro: Also, you can do $s.substr($/.from ..^ $/.to)
hoelzro ahhh that's true
RabidGravy wouldn't it be better if IO::Handle.t emitted a NYI exception rather than what it does now?
hoelzro that makes sense to me
DrForr Aha, thanks. I'll have to redownload/install at ome point this evening, I'll check then.
16:48 diana_olhovik_ joined
TimToady ハイキング & 16:49
PerlJam I added some tests for substr/substr-rw that test ranges with ^.. ..^ and ^..^ too since substr is doing the math with the end points
cfa hey folks; quick question regarding indirect object colon notation and simple terms: is there a reason that join <a b c>: ',' works but join ['a', 'b', 'c']: ',' does not?
DrForr m: [ <a b c>, ['a', 'b', 'c']] 16:50
camelia ( no output )
DrForr m: say [ <a b c>, ['a', 'b', 'c']]
camelia rakudo-moar f9dca9: OUTPUT«a b c a b c␤»
DrForr Mumble.
TimToady cfa: looks like a bug 16:52
std: (join ['a', 'b', 'c']: ',').say 16:53
camelia std 28329a7: OUTPUT«ok 00:00 141m␤»
TimToady m: (join ['a', 'b', 'c']: ',').say
camelia rakudo-moar f9dca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pZiCDWz38C␤Confused␤at /tmp/pZiCDWz38C:1␤------> 3(join ['a', 'b', 'c']:7⏏5 ',').say␤ expecting any of:␤ colon pair␤»
cfa TimToady: okay, thanks. thought i was missing something obvious.
TimToady really ハイキング &
16:57 espadrine left 17:00 Ven_ joined
nine .botsnack 17:00
yoleaux :D
15:14Z <japhb> nine: How do you pass @*ARGS and %*ENV to an Inline::Python instance? It doesn't seem to be doing it automagically, but perhaps I've got something wrong with my setup ....
nine .tell japhb I don't :/ I don't know how to get them in the C code. Though I could probably pass those two to the init call and have NativeCall create the strings for me. But Python seems to know at least ENV anyway: perl6 -Ilib -e 'use Inline::Python; my $py = Inline::Python.new; $py.run(qq{import os\nprint os.environ["HOME"]\n});' 17:01
17:01 dakkar left
yoleaux nine: I'll pass your message to japhb. 17:01
nine /home/nine 17:02
17:05 domidumont joined
japhb nine: It seems to grab the ENV from process start; changes to %*ENV (even done with BEGIN before 'use Inline::Python') do not propagate. 17:16
yoleaux 17:01Z <nine> japhb: I don't :/ I don't know how to get them in the C code. Though I could probably pass those two to the init call and have NativeCall create the strings for me. But Python seems to know at least ENV anyway: perl6 -Ilib -e 'use Inline::Python; my $py = Inline::Python.new; $py.run(qq{import os\nprint os.environ["HOME"]\n});'
japhb I notice that our functions that spawn children seem to need the env passed to them, so I'm guessing the normal handling of %*ENV doesn't update the process's view of the C environment. 17:17
(And maybe that's not a portable concept, actually -- but a decent embedding interface ought to support changing the environment that the embedded interpreter sees, as well as its view of the command line arguments.) 17:18
nine src/core/Env.pm fills a hash with the values of the environment, but I cannot find any code for writing back 17:22
pmichaud m: say 'japh'.substr(2..2) 17:23
yoleaux 15:58Z <PerlJam> pmichaud: I had a couple of minor comments on glr-draft. See gist.github.com/perlpilot/0eb929474ad1c3888f7d
camelia rakudo-moar f9dca9: OUTPUT«p␤»
pmichaud that feels wrong to me.
m: 'japh' ~~ /p/; say $/.perl 17:24
camelia rakudo-moar f9dca9: OUTPUT«Match.new(ast => Any, list => (), hash => EnumMap.new(), orig => "japh", to => 3, from => 2)␤»
pmichaud I'm not a fan of the Range version anyway, though. 17:25
say (2..2).elems 17:26
m: say (2..2).elems
camelia rakudo-moar f9dca9: OUTPUT«1␤»
pmichaud I feel better now.
17:35 muethos joined
timotimo nine: when we popen we pass the modified environment 17:42
nine: it's a bit like our $*CWD, which is also pretty much completely virtual
17:42 jaffa4 joined
jaffa4 hi all 17:43
Unable to parse expression in double quotes; couldn't find final '"'
17:43 amurf joined
jaffa4 How would you find the start of "? 17:43
timotimo hm, didn't someone want to implement that a few weeks back? 17:44
jaffa4 I have a long program, takes many minutes to compile
and it has this error message at the end
timotimo that's very argh, indeed.
jaffa4 does std produce more information error message? 17:46
17:46 _mg_ joined
jaffa4 std: print " 17:46
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Unable to parse double quotes at /tmp/sfFdHQDhIT line 1:␤------> 3print 7⏏5"␤Couldn't find final '"'; gave up at /tmp/sfFdHQDhIT line 1 (EOF):␤------> 3print "7⏏5<EOL>␤Parse failed␤FAILED 00:00 135m␤»
jaffa4 Is it possible to print the parse of a partially compiled program? 17:47
17:48 amurf left 17:51 yqt left 17:57 Ven_ left 18:02 husanu7 joined 18:08 rickbike joined 18:14 husanu7 left 18:15 FROGGS joined 18:17 atroxaper joined 18:20 pecastro_ joined 18:21 telex left, pecastro left 18:22 atroxaper left, telex joined 18:25 bin_005 joined
timotimo i think i'll have a go at giving the nibbler for quotes and such an output for where it started parsing the quotes 18:31
18:33 Alina-malina left 18:37 skids joined
timotimo ah, we have that in heredocs 18:44
where is the error actually thrown? :o 18:47
hoelzro rosettacode.org/wiki/Primorial_numbers#Perl_6 # won't this consume all memory because constant @primes is assigning, and not binding, (1..*).grep(*.is-prime)? 18:48
jaffa4 rakudo: say "$_\t{join \"\n\" }\n" 18:49
camelia rakudo-moar f9dca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Missing block␤at /tmp/tmpfile:1␤------> 3say "$_\t{join \"\n\" }\n"7⏏5<EOL>␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ statement…»
PerlJam hoelzro: lazy evaluation says "no" :)
hoelzro PerlJam: you're saying it *wouldn't* consume all memory?
jaffa4 rakudo: my @a = (); say "$_\t{join \"\n\",@a }\n" 18:50
camelia rakudo-moar f9dca9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Missing block␤at /tmp/tmpfile:1␤------> 3y @a = (); say "$_\t{join \"\n\",@a }\n"7⏏5<EOL>␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ …»
hoelzro I thought list assignment coerced the RHS into an Array
timotimo nope. no clue.
PerlJam m: constant @primes = (1..*).grep(*.is-prime); say @primes[57];
camelia rakudo-moar f9dca9: OUTPUT«271␤»
timotimo maybe hoelzro can sniff it out? :)
PerlJam hoelzro: only if we eagerly evalute will it consume all ram 18:51
hoelzro I thought list assignment *did* eagerly evaluate?
18:51 TEttinger joined
timotimo i think constants are always bound, though 18:51
hoelzro timotimo: I did a few changes similar to that for Chicago.pm
ahhhhh
timotimo not actually sure 18:52
hoelzro I could probably add that string start/end diagnostics to the compiler, but I'm trying to have a "no compiler work" week, since I spent all last week working on the compiler =/
I have aspirations for improving the tooling, or writing modules, and then I always find a bug and feel compelled to fix it! 18:53
PerlJam always has aspirational feelings toward Perl 6 and Rakudo
hoelzro I think we all do =) 18:54
PerlJam but unless I code while the aspiration is warm, there's always something else that distracts
(right now that pesky $work thing is distracting me ;) 18:55
hoelzro and #perl6 is distracting you from $work? =P
PerlJam #perl6 is helping me procrastinate ;) 18:56
hoelzro s/'#perl6'/Perl 6/; fixed that for you ;)
PerlJam :) 18:57
timotimo hmm 19:03
19:24 _mg_ left, yqt joined
nine timotimo: nqp::openpipe creates a fresh copy of %*ENV. That approach doesn't work as well if changes done by Perl 6 code should be propagated to Python/Perl 5 even after initialization of the other interpreter. 19:30
19:32 muethos1 joined, muethos left
timotimo ah, mhh 19:36
19:42 muethos joined, muethos1 left 19:44 kaare_ joined 19:45 [Sno] left 19:46 domidumont left 19:47 muethos1 joined, muethos left 19:49 pdcawley left 19:55 muethos1 left 19:57 muethos joined 19:59 Alina-malina joined, rindolf left 20:03 muethos left 20:05 haroldwu_ left, muethos joined
Ulti hoelzro++ for bug fix video 20:08
20:12 darutoko- left 20:17 lichtkind joined
FROGGS m: my @a = { x => 1, y => 2 }; my @b; @b[0] = @a[0].clone; @a[0]<x>++; say @b # how can I easily clone the values? 20:25
camelia rakudo-moar f9dca9: OUTPUT«x => 2, y => 2␤»
FROGGS m: my @a = { x => 1, y => 2 }; my @b; @b[0] = @a[0]».clone; @a[0]<x>++; say @b # hmmm, is that what I think it is? 20:27
camelia rakudo-moar f9dca9: OUTPUT«x => 1, y => 2␤»
bartolin FROGGS: are you aware of RT #118559? maybe that bug bites you here? 20:28
m: class Foob { has @.fields; }; my $x = Foob.new(fields=>["a","b"]); my $x2 = $x.clone(fields=>["c","d"]); say $x.fields; say $x2.fields
camelia rakudo-moar f9dca9: OUTPUT«c d␤c d␤»
20:30 kaare_ left
lizmat PerlJam++ # fixing my off-by-ones 20:30
FROGGS bartolin: I'm not sure if it will bite me tbh...
sleepy FROGGS is sleepy
itz_ github.com/rakudo/rakudo/pull/441 *cough* 20:32
FROGGS itz_: does that break spectests? 20:33
itz_ I don't think so but I'll check
FROGGS itz_++ 20:34
20:37 rickbike left
itz_ the build seems faster than a few days ago! 20:48
20:52 rickbike joined
masak 'night, #perl6 21:02
21:04 [Sno] joined 21:05 uncleyea1 is now known as uncleyear, uncleyear left, uncleyear joined 21:12 FROGGS left
dalek kudo/nom: c3cd709 | skids++ | src/core/Parameter.pm:
Add .sigil and .twigil methods to Parameter

   It is also a convenience versus piddling around with output from .perl
21:13
kudo/nom: c2e2a93 | lizmat++ | src/core/Parameter.pm:
Merge pull request #446 from skids/assuming

Add .sigil and .twigil methods to Parameter
itz_ make spectest passes with that pull req 21:19
tony-o slowed down for me itz_ : Stage parse : 32.706
dalek kudo/nom: f7d5cf2 | lizmat++ | src/core/Parameter.pm:
Show simple named parameters simply

as :$n instead of as :n($n)
kudo/nom: 743fbfe | (Steve Mynott)++ | lib/Pod/To/Text.pm:
wrap paragraph lines at 75 chars if POD_TO_TEXT_WRAP is set
21:20
kudo/nom: aa9e558 | (Steve Mynott)++ | lib/Pod/To/Text.pm:
tweaking following irc feedback
kudo/nom: 6b62dbb | lizmat++ | lib/Pod/To/Text.pm:
Merge pull request #441 from stmuk/stmuk

wrap paragraph lines at 75 chars with IRC feedback
itz_ ty
lizmat yw :-)
21:21 amurf joined 21:25 amurf left
El_Che is concurrency as described in doc.perl6.org/language/concurrency feature stable and/or implemented? 21:30
lizmat El_Che: implemented for the most part on both Moar and JVM 21:31
El_Che lizmat: thx. It looks very nice 21:32
lizmat wrt stable: there are still some stability issues under stress, so don't use that on your heavy loaded website just yet
it *is* very nice :-)
21:32 muethos left
hoelzro .tell jnthn when you have a minute, could you glance over rt.perl.org/Ticket/Display.html?id=125480 ? I've been trying to fix it without breaking what *you* fixed there 21:33
yoleaux hoelzro: I'll pass your message to jnthn.
El_Che I have a radius_check script in perl5 for testing/monitoring RADIUS end-to-end. I spent some time to adapt it to use it for loadtesting. The concurrency of p6 looks very promising 21:34
(pun not intended :) )
skids El_Che: just basic auth or crypto EAP?
El_Che skids: well, protocol itself is just a call to radclient and eapol_test, so both (depending on backend handler or if auth or acct) 21:35
jnthn hoelzro: re 125480 - not sure what this issue is, but the resaon we didn't have it before was simply because we never even ran the LEAVE blocks in question, I'd imagine. 21:36
yoleaux 21:33Z <hoelzro> jnthn: when you have a minute, could you glance over rt.perl.org/Ticket/Display.html?id=125480 ? I've been trying to fix it without breaking what *you* fixed there
hoelzro tries 21:37
skids El_Che: let me know if you post it. I'm not sure if I want to aim a load-tester at my production servers right at this moment, but eventually I should work up the nerve to :-)
21:37 diana_olhovik_ left
El_Che skids: our RADIUS software (Radiator) is perl 5, btw. Flexible as hell, but the lack of concurrency results in a complicated architecture. If the vendor would port Radiator to perl6, wow 21:38
skids: well, the idea is to load test the test and quality environment. I am probably moving some software RADIUS proxies to hardware (netscaler)
but I want to be sure it can handle the load (university wifi: +/- 120k users) 21:39
skids I've occasionally fantasized about a Perl6 RADIUS implementation; FreeRADIUS is a true workhorse, though, hard to beat that perforance-wise. 21:40
hoelzro jnthn: sure enough, you're right
El_Che well, that may be true, but the strength of Radiator is that it's written in perl5: you can write your perl hooks and put it almost everywhere
RADIUS doing auth for sslvpn, smtps, internal and external (roaming, partnets) wifi, wired mab, wired 802.1x, you name it 21:42
so those hooks are life savious
r
so keeping the flexibility while having concurrency is a big win 21:43
skids El_Che: 120K is about 10x my load. We've got this ugly NAC system sandwiched in between instances, though, plus eduroam proxy, so I tread lighty. FreeRADIUS is actually really very functional (if occasionally obtuse) and the perl extension support is nice there, too. Never have needed it, though. 21:44
El_Che skids: it is also an option. But besides the load problem (I split 1 100% proc to a system of proxies and backends on 2 machines) radiator has been fine. But wifi usage is always going up :) 21:50
skids If there's ever a Perl6 busybox system put together for cablemodems -- you know when we need a lot less RAM someday :-) -- I could see that to be a good playground to start implementing RADIUS in 6, and scale from there. 21:52
lizmat I was under the impression that sno is trying to do exactly that
El_Che so perl6 really wants to be the new java :) 21:53
skids sno++ then. Oh and lizmat++ for merging that PR. :-)
lizmat yw
El_Che: in concept, I would say yes: in execution, I would hope not :-) 21:54
21:54 atroxaper joined
skids gist.github.com/skids/7c86c24afd2ac49b0923 # my current scratch file for .assuming work, for anyone who wants to mangle their brain today. 21:57
dalek kudo/nom: 40a8b20 | lizmat++ | src/core/Parameter.pm:
Don't show Any unless we need to
21:58
21:58 atroxaper left
dalek ast: 13a795c | lizmat++ | / (3 files):
Match lack of Any in signature
21:59
hoelzro I was just looking over some old notes I'd written on hacking Rakudo, and there's a reference to pir::
skids Ah that Any change probably broke all my tests in that gist :-) Time to rakudobrew again :-) 22:00
jnthn lizmat: One slight consideration about the Any thing
hoelzro feels nostalgic
lizmat jnthn: yes?
jnthn It's a cleanup, but Any is only the default in some cases.
m: (-> $x, Any $y { }).signature.perl.say
camelia rakudo-moar 6b62db: OUTPUT«:($x, Any $y)␤»
jnthn Blocks get Mu by default
Which we don't show 22:01
Hmmmmm. :)
skids There's code to strip the Mu, and put it back on for Mu @a.
jnthn But...Mu is the default for arrays too? :)
I don't have a good answer (as so ain't asking for any changes at the moment) 22:02
lizmat m: (-> Any @a { }).signature.perl.say
camelia rakudo-moar 6b62db: OUTPUT«:(Any @a)␤»
lizmat m: (-> Mu @a { }).signature.perl.say
camelia rakudo-moar 6b62db: OUTPUT«:(Mu @a)␤»
jnthn Just noting that which type is the default is context sensitive 22:03
And we don't actually capture that context into the Signature (nor Parameter) objects at present.
lizmat ok, so maybe I should rewrite it by making a 'my $default = 'Any'" and matching that ?
so that we can just change that var in the future ? 22:04
skids Oh nice I wrote my tests right and survived that. Good me.
jnthn m: ohh
camelia rakudo-moar 6b62db: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iotozLH8pZ␤Undeclared routine:␤ ohh used at line 1␤␤»
jnthn oops
Actually a Signature *does* have a backlink to a code object
Which won't exist for Signature literals
But you *can* use it when it's there 22:05
lizmat but this was a change to Parameter
not to Signature
jnthn Yeah.
lizmat does the Parameter have a backlink to te Signature ?
jnthn No
Maybe .perl on Parameter by default always emits the type
lizmat well, that's what I just changed 22:06
jnthn And we have it a named parameter :surrpess-type = Mu
lizmat if it is Any (without :D or :U) it won't
jnthn And Signature.perl can pass that
Yeah, I'm saying that's wrong for .signature on a Blcok
Because block parameters default to Mu, not Any
tony-o m: ({ ; }).signature.perl.say;
camelia rakudo-moar 6b62db: OUTPUT«:(;; $_? is parcel)␤»
lizmat ok, I'm not seeing it atm, could you provide a (failing) test ? 22:07
skids I just compiled that and Block seems exempt.
(well &)
jnthn -> $x, Any $y { } # the Any here is a change from the default so wants to end up in Signature.perl
sub ($x, Any $y) { } # while here the Any is just re-stating the default and can be omitted 22:08
-> Mu $x, $y { } # The Mu here can be skipped
lizmat ok, gotcha now
brb
jnthn sub (Mu $x, $y) { } # the Mu here should be shown 'cus it's not the default
tony-o jnthn: i sent you a PR for Grammar::Debugger
jnthn tony-o: Saw that in my email; didn't get to looking quite yet :) 22:09
(Will get to it in 5-10 mins)
skids OIC, pointy blocks. 22:10
So should the .perl for a pointy block be what, "-> stuff" rather than ":(stuff)"? Or how do we know from the .perl what the defaults are? 22:13
22:13 RabidGravy left
tony-o http::server::threaded tests shouldn't hang anymore, found the right combo of start blocks 22:16
dalek kudo/nom: a47a3d8 | lizmat++ | src/core/ (3 files):
Use faster substr(Str) instead of Str.substr()
22:21
22:21 bin_005 left
lizmat jnthn: I'm fading, so I'll look at the pointy block .perl Mu issue tomorrow, unless skids beats me to it :-) 22:22
good night, #perl6!
22:23 silug joined 22:25 rickbike left 22:28 jaffa4 left 22:33 gfldex left
jnthn tony-o: Merged it to unbreak things for those depending on the module, but really a fix should go into Rakudo to make the patch unrequired 22:37
(I'll look into that in the next days)
The patch pretty much nails down what's going wrong, which is nice :) 22:38
tony-o++
tony-o thanks jnthn - i realize it's a hack but it'll let us use it :-)
jnthn aye
22:39 Alina-malina left 22:56 vendethiel left
jnthn sleep & 22:59
23:01 amurf joined 23:03 bjz left 23:04 vendethiel joined
raiph .tell pmichaud GLR feedback gist.github.com/raiph/1dd0891cde8f1cbe78ce 23:14
yoleaux raiph: I'll pass your message to pmichaud.
23:15 grondilu left 23:17 grondilu joined 23:28 vendethiel left 23:33 spider-mario left, lichtkind left 23:52 aindilis left, aindilis joined 23:59 yqt left