Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-06-27

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:04 ugexe the promise is also marked as kept
00:06 ugexe m: say Proc.new(:exitcode(42))
00:06 camelia rakudo-moar 91212c: OUTPUT«Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => -1, pid => Any, signal => Any)␤»
00:13 ugexe FROGGS: https://github.com/rakudo/rakud​o/blob/nom/src/core/Proc.pm#L14 BUILD needs :$!exitcode
00:14 ugexe for this line in Proc::Async: $!exit_promise.keep(Proc.new(:exitcode(status)))
00:30 japhb ugexe: Send a PR?  The collection of people with commit rights in Rakudo is much larger (and spans many more timezones).
00:30 ugexe im testing it right now
00:34 japhb Excellent!
00:41 timotimo atweiden, raiph: you want "my Silo @silos" rather than "my Array[Silo] @silos", otherwise you're declaring an AoA
00:48 Ben_Goldberg joined #perl6
00:52 atweiden timotimo: intended to be multidimensional array
00:56 tony-o m: enum Silo <ASSETS EXPENSES INCOME LIABILITIES EQUITY>; my Array[Silo] @silos; my Silo @assets = ASSETS; @silos.unshift($(@assets)); say @silos.perl
00:56 camelia rakudo-moar 91212c: OUTPUT«Array[Array[Silo]].new(A​rray[Silo].new(Silo::ASSETS))␤»
00:57 [Sno] joined #perl6
00:58 tony-o atweiden ^^
00:58 ugexe nqp-m: nqp::say(nqp::istype(-1, Int));
00:58 camelia nqp-moarvm: OUTPUT«0␤»
00:58 ugexe m: use nqp; say nqp::istype(-1, Int);
00:58 camelia rakudo-moar 91212c: OUTPUT«1␤»
00:59 tony-o nqp-m: nqp::say(nqp::istype(-1, int));
00:59 camelia nqp-moarvm: OUTPUT«0␤»
00:59 tony-o nqp-m: nqp::say(nqp::istype(-1, twitter));
00:59 camelia nqp-moarvm: OUTPUT«0␤»
01:00 tony-o nqp-m: nqp::say(nqp::istype(-1, int8));
01:00 camelia nqp-moarvm: OUTPUT«0␤»
01:05 timotimo oh, now i see that, too
01:16 [Sno] joined #perl6
01:42 atroxaper joined #perl6
01:58 ShimmerFairy joined #perl6
02:05 aborazmeh joined #perl6
02:05 aborazmeh joined #perl6
02:09 noganex_ joined #perl6
02:12 raiph m: constant #`( s/constant/term/? ) scalar = $ = 42; say scalar; scalar--; scalar.say;
02:12 camelia rakudo-moar 91212c: OUTPUT«42␤41␤»
02:12 raiph m: constant #`( s/constant/term/? ) dict = { pi=>i, e=>now }; say dict; dict<pi>--; say dict.invert
02:12 camelia rakudo-moar 91212c: OUTPUT«e => Instant:1435371205.021879, pi => 0+1i␤Instant:1435371205.021879 => e -1+1i => pi␤»
02:12 raiph m: constant #`( s/constant/term/? ) list = [pi, e]; list[2] = True; say list; list>>--; say list; say [+] @(list)
02:12 camelia rakudo-moar 91212c: OUTPUT«3.14159265358979 2.71828182845905 True␤2.14159265358979 1.71828182845905 False␤3.85987448204884␤»
02:14 rubz joined #perl6
02:23 sue__ joined #perl6
02:24 raiph m: constant dict =%= pi, i, e, now; say dict; dict{pi}--; say dict.invert
02:24 camelia rakudo-moar 91212c: OUTPUT«2.71828182845905 => Instant:1435371876.325275, 3.14159265358979 => 0+1i␤Instant:1435371876.325275 => 2.71828182845905 -1+1i => 3.14159265358979␤»
02:25 raiph .oO ( enjoying a few rounds of sigil golf )
02:27 raiph m: constant scalar =$= 10; scalar += 5; say [1,2] >>+>> scalar;
02:27 camelia rakudo-moar 91212c: OUTPUT«16 17␤»
02:28 raiph m: constant list =@= 10; list += 5; # compile error?
02:28 camelia rakudo-moar 91212c: ( no output )
02:28 raiph m: my @list = 10; @list += 5; # compile error?
02:28 camelia rakudo-moar 91212c: ( no output )
02:29 raiph m: constant list =@= 10,20; say list >>+>> 5
02:29 camelia rakudo-moar 91212c: OUTPUT«15 25␤»
02:32 raiph .oO ( s/constant/a/, where 'a' introduces a term, to enable "a foo =@= ..." etc.)
02:38 rmgk_ joined #perl6
02:50 ugexe Proc::Async exitcode PR sent
02:51 raiph ugexe++
02:52 raiph ugexe: Do you like or dislike the sigilless idiom (see ^^)? Do you know what it's downsides are?
02:56 ugexe i like sigils, because i feel it explains more naturally while reading left to right
02:57 raiph ugexe: Me too. I think it's a mistake to leave out the sigils in serious code.
02:57 Ben_Goldberg m: my @list = 10; @list += 5; say @list
02:57 camelia rakudo-moar 91212c: OUTPUT«6␤»
02:58 colomon joined #perl6
02:58 raiph ugexe: Unless serious code includes code for beginners.
02:59 raiph Ben_Goldberg: great example
03:02 raiph m: constant foo = 1,2; #`( code much later ) foo += 5; say foo # not obvious that the increment of foo is wrong
03:02 camelia rakudo-moar 91212c: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/DMcRrUSE1g:1␤␤»
03:02 raiph Heh, interesting
03:03 ugexe problem is, if you put code like that out there for beginners it will become what people think is standard. sort of like how perl5 was plagued with terrible google results like matts script archive
03:05 kaare_ joined #perl6
03:08 Ben_Goldberg m: my @x = 'Just Another Perl/Bidi Hacker,'.comb; print(chr(8237) ~ @x.shift ~ chr(8238) ~ @x.pop) while @x;
03:08 camelia rakudo-moar 91212c: OUTPUT«‭J‮,‭u‮r‭s‮e‭t‮k‭ ‮c‭A‮a‭n‮H‭o‮ ‭t‮i‭h‮d‭e‮i‭r‮B‭ ‮/‭P‮l‭e‮r»
03:08 ugexe if i have to write some ugly C-like code for whatever reason i might find it useful to have a slang to do that so I can make the code more terse
03:15 Ben_Goldberg m: my $x = +my @x = 'Just Another Perl/Bidi Hacker,'.comb; print 8237.chr, @x.shift, 8238.chr, @x.pop while @x; print 8236.chr x $x;
03:15 camelia rakudo-moar 91212c: OUTPUT«‭J‮,‭u‮r‭s‮e‭t‮k‭ ‮c‭A‮a‭n‮H‭o‮ ‭t‮i‭h‮d‭e‮i‭r‮B‭ ‮/‭P‮l‭e‮r‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬»
03:16 raiph ugexe: I meant as introductory, lies-to-children code. Create an alias for
03:16 raiph oops
03:19 Ben_Goldberg Lies-to-children are important.  If noone told you: When playing, Reversi (aka Othello), whomever has the most corners at the end of the game wins... you'd play extraordinarily poorly, at least at first.
03:24 raiph m: constant foo = 1,2; #`( code much later ) foo += 5; say foo
03:24 camelia rakudo-moar 91212c: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/NwKu2T8_p_:1␤␤»
03:24 raiph m: constant foo =@= 1,2; #`( code much later ) foo += 5; say foo
03:24 camelia rakudo-moar 91212c: OUTPUT«7␤»
03:25 raiph m: constant @foo = 1,2; #`( code much later ) foo += 5; say foo
03:25 camelia rakudo-moar 91212c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0WWo3E3sqj␤Prefix + requires an argument, but no valid term found␤at /tmp/0WWo3E3sqj:1␤------> 3 @foo = 1,2; #`( code much later ) foo +7⏏5= 5; say foo␤    expecting any of:␤        prefix␤»
03:25 raiph m: constant @foo = 1,2; #`( code much later ) @foo += 5; say @foo
03:25 camelia rakudo-moar 91212c: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/Owht8dqc0b:1␤␤»
03:25 raiph m: constant @foo = [1,2]; #`( code much later ) @foo += 5; say @foo
03:25 camelia rakudo-moar 91212c: OUTPUT«7␤»
04:13 Ben_Goldberg joined #perl6
04:18 aborazmeh joined #perl6
04:18 aborazmeh joined #perl6
04:24 tony-o m: \foo = Int.new(10); foo +=5; foo.say
04:24 camelia rakudo-moar 91212c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/slJwFu7BUZ␤Preceding context expects a term, but found infix = instead␤at /tmp/slJwFu7BUZ:1␤------> 3\foo =7⏏5 Int.new(10); foo +=5; foo.say␤»
04:24 tony-o m: my \foo = Int.new(10); foo +=5; foo.say
04:24 camelia rakudo-moar 91212c: OUTPUT«Default constructor for 'Int' only takes named arguments␤  in block <unit> at /tmp/Ws2FHwOh59:1␤␤»
04:36 tony-o m: my \foo = $(1,2); foo +=5; foo.say
04:36 camelia rakudo-moar 91212c: OUTPUT«Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/AKn0reHeu0:1␤␤»
04:50 amurf joined #perl6
04:57 tinyblak joined #perl6
05:11 [Sno] joined #perl6
05:19 StavroMueller joined #perl6
05:19 atroxaper joined #perl6
05:38 telex joined #perl6
05:46 bjz joined #perl6
06:04 dalek rakudo/nom: 254eff9 | (Nick Logan)++ | src/core/Proc.pm:
06:04 dalek rakudo/nom: bugfix: exitcode for Proc::Async
06:04 dalek rakudo/nom:
06:04 dalek rakudo/nom: Proc::Async sets the exitcode via `Proc.new(:exitcode(1))` so BUILD requires a :$exitcode argument
06:04 dalek rakudo/nom:
06:04 dalek rakudo/nom: See https://github.com/rakudo/rakudo/bl​ob/nom/src/core/Proc/Async.pm#L176
06:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/254eff921c
06:04 dalek rakudo/nom: 0ff4557 | FROGGS++ | src/core/Proc.pm:
06:04 dalek rakudo/nom: Merge pull request #449 from ugexe/patch-4
06:04 dalek rakudo/nom:
06:04 dalek rakudo/nom: bugfix: exitcode for Proc::Async
06:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0ff4557af8
06:15 RabidGravy joined #perl6
06:17 raiph .tell tony-o I've realized that use of {(...)} entirely eliminates the problems ("fooling around with ending a block and restarting a block or whatever ... buffering crap into a temp str to use that as the return value")
06:17 yoleaux raiph: I'll pass your message to tony-o.
06:18 raiph .tell tony-o (Also, that the say-in-say approach will end in tears)
06:18 yoleaux raiph: I'll pass your message to tony-o.
06:19 raiph .tell tony-o I've updated https://github.com/tony-o/per​l6-template-protone/issues/1
06:19 yoleaux raiph: I'll pass your message to tony-o.
06:30 xfix joined #perl6
06:30 xfix joined #perl6
06:34 araujo_ joined #perl6
06:34 rindolf joined #perl6
06:40 amurf joined #perl6
06:41 araujo__ joined #perl6
06:58 tinyblak joined #perl6
06:59 gfldex joined #perl6
07:18 dalek doc: 5e2a992 | RabidGravy++ | lib/Type/IO/Path.pod:
07:18 dalek doc: Add link/symlink
07:18 dalek doc: review: https://github.com/perl6/doc/commit/5e2a992842
07:25 tinyblak joined #perl6
07:58 dalek doc: 0b24f07 | RabidGravy++ | lib/Type/IO/Path.pod:
07:58 dalek doc: Add chdir()
07:58 dalek doc: review: https://github.com/perl6/doc/commit/0b24f076ed
08:02 darutoko joined #perl6
08:08 vendethiel joined #perl6
08:09 atroxaper joined #perl6
08:22 rurban joined #perl6
08:23 xfix_ joined #perl6
08:23 rurban left #perl6
08:35 jaffa4 joined #perl6
08:35 jaffa4 hi all
08:36 jaffa4 How can I translate binmode?
08:36 jaffa4 I guess it is :bin in open
08:36 jaffa4 I would like to be able to set it independently
08:36 jaffa4 not at open
08:40 labster jaffa4: what do you mean by independently?
08:40 jaffa4 like binmode in Perl 5
08:42 labster Ah, you mean setting it on a filehandle outside of an open call.
08:44 labster my $fh = "foo".IO.open(); $fh.encoding('bin'); # should work, not sure if it does
08:49 labster hm, no test cases for this, not an encouraging sign
08:51 labster jaffa4: if you want binmode with a layer, like utf-8 or iso-8859-1 or windows-1252 -- all of those will work by passing it to the encoding function.  I'm just not sure about actual binary binmode yet.
08:51 labster *encoding method
08:52 jaffa4 where is the source?
08:53 labster for this?  /src/core/IO/Handle.pm, but it looks like I'll need to dig into NQP to see how it actually handles binary.
08:59 jaffa4 what is the url?
09:00 [Tux] m: IO::Handle.^methods».name.say
09:00 camelia rakudo-moar 0ff455: OUTPUT«FALLBACK gist new␤»
09:00 labster https://github.com/rakudo/rakudo/b​lob/nom/src/core/IO/Handle.pm#L572
09:00 [Tux] hmm, locally I get this: pipe open input-line-separator nl close eof get getc words lines read seek tell write opened t print print-nl slurp slurp-rest spurt copy chmod IO path flush encoding DESTROY e d f s l r w x modified accessed changed watch umask say Str gist perl <anon> <anon>
09:01 labster [Tux]: probably RESTRICTED.setting
09:04 labster m: say "/home/camelia/test".IO.open.^methods
09:04 camelia rakudo-moar 0ff455: OUTPUT«pipe open input-line-separator nl close eof get getc words lines read seek tell write opened t print print-nl slurp slurp-rest spurt copy chmod IO path flush encoding DESTROY e d f s l r w x modified accessed changed watch umask say Str gist perl <anon> <a…»
09:04 spintronic joined #perl6
09:08 RabidGravy looking at the code for IO::Handle it would seem that the only major thing that :bin does at that level is *not* set any encoding
09:09 jaffa4 yes, but encoding is set, how to undo it
09:09 diana_olhovik_ joined #perl6
09:09 labster read it in as ascii, and then call .encode on the string to get a Buf?  not awesome.
09:10 RabidGravy read will just get the bytes anyway doesn't it?
09:11 labster yes.
09:12 labster m: "test".IO.open.read(20).say
09:12 camelia rakudo-moar 0ff455: OUTPUT«Buf[uint8]:0x<>␤»
09:12 labster perhaps I should try that on a bigger file :D
09:14 labster I wish there was someone around who could give a more definitive answer, but early Saturday morning is not the best time for this channel.
09:15 labster This is something that should work and be documented, though.
09:15 labster And tested, of course.
09:16 RabidGravy there isn't an nqp op for the opposite of setencoding as far as I can tell
09:16 domidumont joined #perl6
09:17 labster QASTOperationsMAST.nqp:QAST::MASTOperatio​ns.add_core_moarop_mapping('setencoding', 'setencoding', 1);  It's just sent straight down the the VM anyway.
09:17 Foxcool joined #perl6
09:18 spintronic joined #perl6
09:20 [Sno] joined #perl6
09:22 domidumont joined #perl6
09:25 atroxaper joined #perl6
09:27 labster night, #perl6
09:27 RabidGravy erp
09:29 Woodi hallo #perl6
09:29 RabidGravy erp
09:29 Woodi grammars kills me constantly :)  https://gist.github.com/ano​nymous/bcb011dc022b76857855
09:29 Woodi G1 works, G2 IMO should be simple replacement but don't work...
09:31 RabidGravy Woodi, change the  "rule parts" to "token parts"
09:34 Woodi yay :)
09:34 RabidGravy a, er, rule of thumb is that a "rule" is the combination of some tokens
09:35 RabidGravy not strictly accurate but it helps me remember ;-)
09:36 Woodi so tokens as "leaves" and rules as "nodes", will try that. thanx :)
09:38 RabidGravy pretty much, it's down to the difference between the implicit flags applied to the "rule", "token" and "regex" largely
09:50 RabidGravy right, off out now
09:51 Al-Caveman joined #perl6
10:01 spider-mario joined #perl6
10:13 gagalicious left #perl6
10:17 amurf joined #perl6
10:23 domidumont joined #perl6
10:37 dpk joined #perl6
10:47 cognominal joined #perl6
10:47 xfix joined #perl6
10:47 xfix joined #perl6
10:49 leont joined #perl6
10:49 cognominal joined #perl6
10:50 aborazmeh joined #perl6
10:50 aborazmeh joined #perl6
11:03 lizmat good *, #perl6!
11:04 lizmat m: Proc::Status.new   # where did it go?
11:04 camelia rakudo-moar 0ff455: OUTPUT«Could not find symbol '&Status'␤  in block <unit> at /tmp/_JwT2ZYuIi:1␤␤»
11:05 lizmat there's a Proc::Status class in the setting...
11:13 jaffa4 how would you translate this &(%linkage{$opt})($A,$B.$C) from Perl 5
11:13 jaffa4 ?
11:16 moritz %linkage{$opt}($A, $B, $C)
11:16 moritz jaffa4: but I doubt that what you wrote is actually valid perl 5 code
11:17 jaffa4 moritz:  ... and you are right
11:17 jaffa4 let us approximately
11:18 moritz no, it's good to be precise when talking about syntax
11:25 Alina-malina joined #perl6
11:33 dalek rakudo/nom: acaeb17 | lizmat++ | src/core/IO/Handle.pm:
11:33 dalek rakudo/nom: Revive Proc::Status
11:33 dalek rakudo/nom:
11:33 dalek rakudo/nom: This is a bandaid.  Some recent changes made Proc::Status disappear from
11:33 dalek rakudo/nom: the world when still having code defining it.  Suspect some sort of MOP
11:33 dalek rakudo/nom: messup with creating parent packages.  By creating a stub for the parent
11:33 dalek rakudo/nom: package beforehand, we seem to have quelched the issue.  Something that
11:33 dalek rakudo/nom: needs to be investigated further!
11:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/acaeb17897
11:37 lizmat interestingly, now test 13 in t/spec/S17-procasync/basic.t (line 39) fails because the returned object is a Proc rather than a Proc::Status
11:37 lizmat whereas the other tests work out ok afterward
11:38 lizmat .tell jnthn you might want to have a look at why https://github.com/rakudo/rakudo/commit/acaeb17897 was needed to revive Proc::Status
11:38 yoleaux lizmat: I'll pass your message to jnthn.
11:41 lizmat .tell jnthn as an added datapoint, check why test 13 in t/spec/S17-procasync/basic.t (line 39) fails
11:41 yoleaux lizmat: I'll pass your message to jnthn.
11:43 AlexDani` joined #perl6
11:46 tinyblak joined #perl6
11:54 diana_olhovik joined #perl6
11:57 tinyblak joined #perl6
11:59 rurban joined #perl6
12:00 lizmat looking at #125485, I guess
12:00 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125485
12:01 lizmat m: "{ @_ }"  # is just an expression of:
12:01 camelia rakudo-moar acaeb1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/V4Li3mqwS1␤Placeholder variable @_ may not be used here because the surrounding block takes no signature␤at /tmp/V4Li3mqwS1:1␤------> 3"{ @_ }7⏏5"  # is just an expression of:␤    expecting any of…»
12:01 lizmat m: -> { @_ }   # this one
12:01 camelia rakudo-moar acaeb1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FbH2YyCuDC␤Placeholder variable '@_' cannot override existing signature␤at /tmp/FbH2YyCuDC:1␤------> 3<BOL>7⏏5-> { @_ }   # this one␤»
12:10 lizmat perhaps use of @_ and $^a in blocks should be referring to the first outer code instead ?
12:13 pmurias joined #perl6
12:13 moritz but then you couldn't say   reduce { $^a + $^b }, @vals
12:14 moritz just write explicit signatures for routines that contain other blocks, and you're fine
12:14 jaffa4 Is perl6-debug-m supoosed to work?
12:15 jaffa4 What is the state of perl6-debug-m?
12:17 lizmat moritz: good point
12:17 lizmat well, hmmm... then perhaps only if the block is part of an interpolated string?
12:18 lizmat I can see that as something that would help p5 -> 6 migration
12:18 lizmat anyways, afk until later today&
12:24 jaffa4 What could help?
12:33 bjz joined #perl6
12:36 ShimmerFairy joined #perl6
13:02 atroxaper joined #perl6
13:09 domidumont joined #perl6
13:10 RabidGravy joined #perl6
13:11 jaffa4 I have a code which seems to fail without saying a word
13:11 Fleurety joined #perl6
13:12 spintronic joined #perl6
13:17 rindolf joined #perl6
13:18 nowan joined #perl6
13:24 Woodi RabidGravy++  # mixing rules with tokens works :)
13:24 Fleurety joined #perl6
13:27 Woodi about GLR: for me "tuples" sound weird too. they was used in old relational database texts so they have v. old-ish conotations...
13:27 pmurias nqp-js: say("still alive...?");
13:27 camelia nqp-js: OUTPUT«/bin/sh: node: command not found␤»
13:28 Woodi Nil is planned to disappear ? so how to get results with NULLs from db ?
13:29 pmurias would just having it as DBI::NULL be a problem?
13:30 Woodi also in 1990 Mr. Codd augmented relational database theory with one more NULL, some 4th-valued-logic...
13:30 timotimo and why wouldn't a type object be a good fit?
13:31 Woodi pmurias: you get data from db, ( "J.Kowalski", male, Nil, Nil), this looks nice...
13:32 timotimo the cool thing about type objects is you still get to know what type the column has
13:32 timotimo also: oh god, NULL values are EVIL in SQL :)
13:32 Woodi timotimo: I don't know. but we have some Mu's so maybe someone already thinking about this :)
13:33 Woodi timotimo: but 'we don't know value for that' is proper answer... at least to keep shape of tables :)
13:36 sjn_phone_ joined #perl6
13:36 araujo joined #perl6
13:36 araujo joined #perl6
13:50 AlexDaniel So, how can I run a shell command, get its output, and have the parameters quoted correctly? This link describes everything besides shell quoting https://perl6advent.wordpress.com/2014/12/06/​day-06-running-external-programs-from-perl-6/
13:52 AlexDaniel this was a painful perl5 problem which required CPAN dependency (ShellQuote)
13:52 moritz AlexDaniel: http://doc.perl6.org/type/Proc::Async
13:53 AlexDaniel moritz: are you sure that it actually answers my question?
13:53 geekosaur um? you could do it without ShellQuote
13:54 geekosaur unless your notion of how to do it is incorrect from the start, which tbh is suggested by that response
13:54 geekosaur (the correct answer is *don't use the shell*)
13:54 AlexDaniel thanks, that does not help as well
13:55 AlexDaniel moritz: you see, most people will not bother with that
13:55 AlexDaniel moritz: look at that perl6advent link and notice this line
13:55 AlexDaniel my @commit_results = qqx/git commit -am "$message"/.lines;
13:55 AlexDaniel clearly a mistake
13:55 amurf joined #perl6
13:55 FROGGS[mobile] joined #perl6
13:56 AlexDaniel so I'm asking how to fix that, and you tell me that the answer is to use Proc::Async. If that's true, do you understand that we will keep seeing shell injection everywhere?
13:56 FROGGS[mobile] AlexDaniel: use: run($prog, ..., :out)
13:57 moritz AlexDaniel: I'm just saying hat Proc::Async offers capturing and no need for quoting
13:57 FROGGS[mobile] that's available since yesterday
13:57 moritz oooh
13:57 AlexDaniel m: say run 'echo' 'test'
13:57 camelia rakudo-moar acaeb1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SBoxeFPZi0␤Two terms in a row␤at /tmp/SBoxeFPZi0:1␤------> 3say run 'echo'7⏏5 'test'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤     …»
13:58 FROGGS[mobile] comma
13:58 moritz no &run in camelia either, I think
13:58 AlexDaniel m: say run 'echo', 'test'
13:58 camelia rakudo-moar acaeb1: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub run at src/RESTRICTED.setting:14␤  in block <unit> at /tmp/ci9sXRssZo:1␤␤»
13:58 AlexDaniel okay I'll recompile
13:58 FROGGS[mobile] AlexDaniel: look at S32-io/pipe.t
13:58 FROGGS[mobile] there are examples
13:59 AlexDaniel FROGGS[mobile]: thanks
14:05 lichtkind joined #perl6
14:05 nys joined #perl6
14:08 moritz FROGGS[mobile]: why does sub run do a 'try $proc.spawn(@args)'? (I mean, why the 'try'?)
14:12 FROGGS[mobile] moritz: I dunno, I forgot
14:12 moritz FROGGS[mobile]: looks dangerous to me
14:14 FROGGS[mobile] then we should remove it and test
14:15 moritz I'm doing a spectest as is, and hope that I'll remember to remove it and re-test when it finishes :-)
14:15 moritz (or maybe I should do it on hack, not on my workstation :-)
14:15 tinyblak joined #perl6
14:18 FROGGS[mobile] :o)
14:18 FROGGS[mobile] I guess it was about a "cmd not found" issue
14:19 FROGGS[mobile] ohh dang, I forgot to test run/shell on windows :S
14:20 moritz but the API is *very* nice, FROGGS[mobile]++
14:20 moritz and FROGGS++ too, I guess :-)
14:20 AlexDaniel $output = run('echo', $test, :out).out.get;
14:20 AlexDaniel $output = qqx/echo $test/;
14:20 AlexDaniel Huffmanly speaking, which one is better and why?
14:22 FROGGS[mobile] good question
14:24 diana_olhovik__ joined #perl6
14:24 AlexDaniel FROGGS[mobile]: thanks for listening, I always feel ignored when I raise questions about shell quoting
14:25 moritz I realize the defaults are maybe still the wrong way around, but now Perl 6 has a much nicer API for capturing err/out and no need for quoting
14:25 moritz compared to p5
14:25 AlexDaniel the typical answer is "well, it works, so what's your problem?". Well, you can inject any arbitrary shell thing into it, that's the problem...
14:26 AlexDaniel and if it had better Huffman coding I think that the problem will fade away
14:26 AlexDaniel well, at least it will get better
14:26 FROGGS[mobile] AlexDaniel: I'll think about a sane and safe short-cut
14:27 moritz maybe have a quoting for that preserves scalars as single items, and only splits literals on spaces?
14:28 AlexDaniel that's what I though, actually
14:28 AlexDaniel which basically means that it should autoquote variables, but then again, what does it mean to quote things correctly?
14:28 AlexDaniel it depends on the underlying shell
14:28 jaffa4 Is this ok grep ($_ eq $opt, @hits)?
14:29 moritz so that   my $foo = "a b"; my @list = q:w:S<echo $foo> is equivalent to   my @list = ('echo', $foo)
14:29 moritz jaffa4: it doesn't do what you want
14:29 jaffa4 std: grep ($_ eq $opt, @hits)
14:29 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Variable $opt is not predeclared at /tmp/7hVV_j54vO line 1:␤------> 3grep ($_ eq 7⏏5$opt, @hits)␤Variable @hits is not predeclared at /tmp/7hVV_j54vO line 1:␤------> 3grep ($_ eq $opt, 7⏏5@hits)␤Check failed␤FAILED 00:00…»
14:29 geekosaur I feel like insistence that making the naive shell quoting solution "work" is just encouraging security holes
14:30 moritz jaffa4: if $opt is a string, you can just do @hits.grep($opt)
14:30 AlexDaniel geekosaur: what do you mean?
14:30 moritz geekosaur: the point is to not need shell quoting
14:30 geekosaur yes, I understand this is not popular. the widest proof being how the Internet is rife with such security holes (mostly in the related area of SQL quoting)
14:30 moritz geekosaur: but always pass the argument list out-of-band
14:30 geekosaur moritz, but I was informed that avoiding the shell was not the correct answer
14:31 moritz geekosaur: who informed you, and it wasn't the correct answer to what question?
14:31 geekosaur because the question was shell quoting. never mind thaty the question is wrong
14:31 geekosaur sigh
14:31 * moritz minds that the question is wrong
14:31 geekosaur yes, I understand the point was to ask about shell quoting itself
14:32 moritz appeal to authority doesn't work well in here, sorry
14:32 geekosaur but, from a security standpoint,m the answer to that is "avoid it at all costs"
14:32 AlexDaniel yea the question was a bit wrong, you are right
14:32 AlexDaniel geekosaur: if the answer is "use 'run'" then it is OK though
14:32 geekosaur because even when you think uyou've covrred all the cases, you get hit by shellshock *sigh*
14:33 geekosaur (I mean, who expects their dhcp client is vulnerable to shell injection attack?)
14:34 moritz only those who you call "paranoid"
14:34 AlexDaniel geekosaur: so what do you recommend? Make 'run' better Huffmanly coded and that's it?
14:35 geekosaur I don't know. I feel like there is a tendency to say "people will use the simple solution so let's make it secure" and this fails when there is demonstrably no way to make it secure. But also demonstrably steering people away from the simple solution doesn't work
14:35 AlexDaniel geekosaur: good point
14:37 AlexDaniel FROGGS[mobile]: backticks are not used? We can use backticks for that! Haha
14:37 FROGGS[mobile] AlexDaniel: with an argument list? :o)
14:38 AlexDaniel yeah :)
14:44 dalek doc: 9d2b828 | moritz++ | lib/Type/Proc.pod:
14:44 dalek doc: Document type Proc (and &run)
14:44 dalek doc: review: https://github.com/perl6/doc/commit/9d2b828e2d
14:44 dalek doc: d1bcc0a | moritz++ | lib/Type/IO.pod:
14:44 dalek doc: Fix documentation for &run in type IO
14:44 dalek doc: review: https://github.com/perl6/doc/commit/d1bcc0a185
14:45 moritz FROGGS[mobile]: a short proof-read of those docs would be very much appreciated
14:47 AlexDaniel actually, we should listen to what geekosaur said
14:47 AlexDaniel and after reading "Piping several commands is easy too." I realize that he is absolutely right
14:49 AlexDaniel which probably means that qx should actually go away
14:49 araujo joined #perl6
14:49 araujo joined #perl6
14:53 geekosaur unclear actually. the problem is if you remove it, someone will re-add it (probably in an even worse way) for convenience
14:53 geekosaur see "steering people away from the simple solution doesn't work"
14:55 AlexDaniel what about qwx or something?
14:55 moritz FROGGS[mobile], jnthn: it's a bit unfortunate that Proc.out and Proc::Async.stdout have a diverging naming scheme
14:55 AlexDaniel that will split stuff by spaces and pass that to run
14:55 FROGGS joined #perl6
14:58 FROGGS[mobile] moritz: aye, and I'd vote for shorter names fwiw
14:58 FROGGS moritz: I'll proofread the docs this evening
14:59 FROGGS I've got currently about five kids under age 6 around me
15:02 jaffa4 This is ok, right?  return (0) if $passthrough;
15:05 timotimo i'd propose "return 0 if $passthrough" instead
15:11 shlomif joined #perl6
15:11 tinyblak joined #perl6
15:12 AlexDaniel FROGGS: "with an argument list? :o)" hm, it can do the same thing < > is doing
15:14 FROGGS[mobile] I was thinking about that, but I'm not sure about that yet
15:16 skids joined #perl6
15:19 japhb Apologies that I've only skimmed, but doesn't the quoting of << >> get what most people want from "shell quoting" when they don't *actually* want a shell?
15:20 japhb Note << >> instead of < >
15:21 AlexDaniel japhb: I'm not really following you, can you show a code example?
15:25 japhb AlexDaniel: Well, I'm not caught up with the details of FROGGS++'s new implementations, but in the old days I might have said something along the lines of run(<< echo "foo $bar" @baz <<wheee>> >>) and expected it to work safely
15:25 JimmyZ_ joined #perl6
15:26 japhb I guess that should have been @baz[]
15:27 japhb But my point was that << >> has a lot of the DWIM that people want from shell quoting without the danger of an actual shell parsing.
15:30 jnthn evening, #perl6
15:30 yoleaux 11:38Z <lizmat> jnthn: you might want to have a look at why https://github.com/rakudo/rakudo/commit/acaeb17897 was needed to revive Proc::Status
15:30 yoleaux 11:41Z <lizmat> jnthn: as an added datapoint, check why test 13 in t/spec/S17-procasync/basic.t (line 39) fails
15:31 japhb o/ jnthn
15:31 nwc10 good UGT heresy, jnthn
15:31 nwc10 DB are less late than the scandawedigian railways?
15:31 CIAvash joined #perl6
15:32 AlexDaniel $output = run('echo', $test, :out).out.get;
15:32 AlexDaniel $output = run(<<echo $test>>, :out).out.get;
15:32 AlexDaniel $output = qqx/echo $test/;
15:32 timotimo << >> is still not properly implemented, right?
15:32 CIAvash joined #perl6
15:32 AlexDaniel japhb: you see, it does make it easier
15:32 AlexDaniel japhb: maybe just a bit
15:32 japhb AlexDaniel: Of course, you can use real guillemots, but the keyboard I am on is less than awesome for entering Unicode ...
15:33 timotimo « »
15:33 japhb And then it gets more readable
15:33 AlexDaniel oh right
15:34 AlexDaniel and it is actually one character shorter then
15:34 AlexDaniel still not shorter than qqx...
15:34 ugexe i look forwarding to writing my first run(<<$cmd $var>>.list>>.value>>)
15:34 japhb I find I often "spend" that minor savings by adding an extra space before the first item and after the last.
15:35 japhb Since Windows doesn't actually have multiple arguments, how is run() implemented there?
15:36 dalek rakudo-star-daily: ff22ac7 | coke++ | log/ (2 files):
15:36 dalek rakudo-star-daily: today (automated commit)
15:36 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/ff22ac79fc
15:36 dalek perl6-roast-data: 25f8ebd | coke++ | / (9 files):
15:36 dalek perl6-roast-data: today (automated commit)
15:36 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/25f8ebdca7
15:36 japhb (For precision, I mean that at the C runtime level, processes receive a single giant string, rather than pre-split command and args as in the *nix world -- and then they do their own command string parsing)
15:36 ugexe im not sure what the answer is, but you use %* in powershell
15:37 FROGGS[mobile] japhb: libuv handles it in some way
15:37 * japhb fears that implementation
15:37 lichtkind_ joined #perl6
15:37 FROGGS[mobile] we pass it a char **
15:38 japhb Good for libuv for at least presenting the better API to its callers, I suppose.  But man, I hope they've implemented something that all the C runtimes will handle correctly ....
15:38 nys joined #perl6
15:41 jnthn I suspect they've had more resources to think it through than we'd have been able to give to it if we'd solved it ourselves... :)
15:42 jnthn Plus it's presumably been exercised plenty thanks to node.js using libuv.
15:42 japhb True!
15:51 * skids also looked at better commandline parsing (emulating legacy syntaxes) a couple weeks ago.
15:52 Ven joined #perl6
15:52 skids There wer a couple blockers for what I wanted to do.
15:52 skids The primary one was that Cursor doesn't work right yet from inside rules.
15:53 skids So there was no way to build something like a <bag($bag)> subrule that would match strings from a bag anywhere in a grammar, but only as many times as they were in the bag.
15:54 skids Also I had to punt and rejoin ARGS with '\0' separators, for lack of matching against structural data.
15:56 tinyblak joined #perl6
15:57 * TimToady is home again, and finds the air at sea level is too thick now...  :)
16:03 jnthn I think the structural matching stuff is very post-6.0 :) Not sure what "Cursor doesn't work right yet" means, though...
16:04 skids You don't get a current .pos.
16:04 skids Or a current partial match.
16:04 jnthn Depends.
16:04 japhb Welcome back to the lowlands, TimToady!
16:05 jnthn You should if in, say, a code block
16:05 skids You don't though.
16:05 jnthn m: 'a' ~~ /(.) { say $/[0] } /
16:05 camelia rakudo-moar acaeb1: OUTPUT«「a」␤»
16:06 skids On the first time, sometimes you do.  It is not reliable.
16:06 jnthn It'd help if you actualy showed code.
16:06 jnthn *actually
16:07 * skids digs around in his stuff.
16:07 mst skids: you're currently telling one of the authors you know his code better than him, without showing any examples
16:07 mst skids: this is ... unlikely to help anybody
16:07 jnthn On the <bag($bag)> thing, where did you plan to keep the "how many we saw" state?
16:07 skids Dynamic probably.
16:07 jnthn In TOP?
16:08 skids Likely defined in a custom .parse.
16:09 mst perl5 has a rule for regexp questions where we ask for input, expected output, and what code you have so far
16:09 mst generally for fiddly stuff an example of that form is the only way to clearly communicate
16:09 mst so maybe that would be the best next step?
16:10 estrabd joined #perl6
16:10 khw joined #perl6
16:11 skids mst: I actually have to be somewhere right now, so I can't do that right now.  Was looking for a quick example but looks like I was doing it on cli, so I'll have to go see if it's still in my history.
16:12 mst skids: ok, just, "you don't though" isn't desperately easy to diagnose :)
16:13 * TimToady pictures jnthn as a desperado...
16:13 mst if I was a gun fighter with his eyesight I'd be pretty desperate too
16:14 vendethiel *g*
16:15 jnthn m: grammar G { method parse(*@, :$bag) { my %*BAGGED := $bag.BagHash; my $*BAG-RX = /| @($bag.keys)/; callsame; }; token TOP { <.bag>+ }; token bag { (<{ $*BAG-RX }>) <?{ %*BAGGED{~$0}-- }> } }; say G.parse('aabbc', bag => bag <c b a a b >); say G.parse('aaabbc', bag => bag <c b a a b >);
16:15 camelia rakudo-moar acaeb1: OUTPUT«「aabbc」␤(Any)␤»
16:16 jnthn There's a quickly thrown together solution for the problem (or one like the problem) I think you're wanting to solve, btw.
16:17 jnthn oh, now I look at it it can be a tad simpler too
16:17 jnthn m: grammar G { method parse(*@, :$bag) { my %*BAGGED := $bag.BagHash; my $*BAG-RX = /| @($bag.keys)/; callsame; }; token TOP { <.bag>+ }; token bag { ($*BAG-RX) <?{ %*BAGGED{~$0}-- }> } }; say G.parse('aabbc', bag => bag <c b a a b >); say G.parse('aaabbc', bag => bag <c b a a b >);
16:17 camelia rakudo-moar acaeb1: OUTPUT«「aabbc」␤(Any)␤»
16:17 jnthn a thing of type Regex already interpolates proper
16:17 skids jnthn: yeah that's about where I started but it eventually started breaking in alternations/backtracking.
16:18 timotimo yeah, you can't do backtracking withouta bit of extra thought
16:18 jnthn Yeah, if you want to go backtracking you'll have fun with that approach
16:18 timotimo i actually had hoped we could get an UNDO phaser fired when backtracking over an embedded closure
16:18 TimToady backtracking doesn't tend to work with dynvars
16:18 skids I don't think you can do it at all, actually.  I could not find a way.
16:19 timotimo you can detect you've backtracked by looking at your match object's "from"
16:19 timotimo record what you've matched so far at what position and subtract that from the original bag
16:19 timotimo AFK for a bit
16:19 jnthn Aye, I guess a lot of our usage of them in the Perl 6 grammar works out 'cus we do one-pass parsing.
16:20 TimToady indeed
16:20 skids timotimo: that was what I was trying to do but the .from was not carrying the value it should have been.  And yes an undoish thing would obviate the need to do that.  But I don;t knwo syntactically where we'd put it.
16:20 timotimo { check if item is in the bag and remove item from bag, return success; UNDO { put item back into the bag } }
16:21 timotimo but it's NYI and also not specced to work at all
16:21 skids timotimo: and in some cases, .from isn't quite enough you need the current partial match, which was also not always showing wat it should have.
16:21 jnthn I suspect the problem isn't immediate backtacking, but backtracking higher up the tree.
16:21 uncleyear joined #perl6
16:22 skids timotimo: I do think that's a good possibility.  It keeps the code in one place.
16:23 skids Anyway, got to go now.  I'll circle back on it later with a not-working example. :-)
16:23 jnthn If you're willing to mark those places you can probably write a method bag-transaction($rx) { my %rollback = %*BAG-HASH; my \result = self.$rx(); %*BAG-HASH = %rollback unless result; result }, which you'd call as <bag-transaction <foo-that-calls-bag>>
16:24 jnthn Not tested! :)
16:25 jnthn (But the mechanism - receiving and invoking a regex on the current Cursor - is the exact one that things like before and after use.)
16:27 jnthn fwiw, I don't think https://rt.perl.org/Ticket/Display.html?id=125485 is a bug at all; a block in an interpolation is just a normal block.
16:28 jnthn (We parse it exactly the same as one, and we'd better had, or people will get mighty upset if lexicals they declare in one leak out)
16:29 TimToady m: sub dump_array { say "({join ')(',OUTER::<@_>})\n"; }
16:29 camelia rakudo-moar acaeb1: ( no output )
16:29 TimToady that is the correct way to write it
16:30 TimToady (me agreeing with jnthn++ here)
16:30 jnthn I do, however, somewhat fear we're not smart enough to go and placeholderize the surroudning block.
16:30 TimToady m: sub dump_array { say "({join ')(',OUTER::<@_>})\n"; }; dump_array(1,2,3)
16:30 camelia rakudo-moar acaeb1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FPkjZk6By8␤Calling dump_array(Int, Int, Int) will never work with declared signature ()␤at /tmp/FPkjZk6By8:1␤------> 3{ say "({join ')(',OUTER::<@_>})\n"; }; 7⏏5dump_array(1,2,3)␤»
16:30 jnthn ('cus we don't look so deeply into OUTER:: yet)
16:31 jnthn Should you be able to OUTER::<$^a> to declare a placeholder in your outer's scope too? :)
16:31 TimToady m: sub dump_array { @_; say "({join ')(',OUTER::<@_>})\n"; }; dump_array(1,2,3)
16:31 camelia rakudo-moar acaeb1: OUTPUT«(1)(2)(3)␤␤»
16:32 TimToady jnthn: well, as long as the code is being compiled in-line, seems like it's reasonable for it to work; can't do it from an EVAL of course
16:32 jnthn *nod*
16:33 jnthn While we're on it: do we also want OUTER::<$does-not-exist> to complain, or do we keep that late-bound?
16:33 TimToady std: { say OUTER::<$does-not-exist> }
16:33 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Variable OUTER::<$does-not-exist> is not predeclared at /tmp/TIHwEpx1SD line 1:␤------> 3{ say 7⏏5OUTER::<$does-not-exist> }␤Check failed␤FAILED 00:00 137m␤»
16:33 jnthn m: { say OUTER::<$does-not-exist> } # think it's not even an error
16:33 camelia rakudo-moar acaeb1: OUTPUT«(Any)␤»
16:34 jnthn std: { say OUTER::<$does-not-exist> }; say $does-not-exist
16:34 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Variable OUTER::<$does-not-exist> is not predeclared at /tmp/Al8jRu6sFb line 1:␤------> 3{ say 7⏏5OUTER::<$does-not-exist> }; say $does-no␤Variable $does-not-exist is not predeclared at /tmp/Al8jRu6sFb line 1:␤------> 3{ say OUTE…»
16:34 jnthn oops
16:34 jnthn std: { say OUTER::<$does-not-exist> }; my $does-not-exist
16:34 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Variable OUTER::<$does-not-exist> is not predeclared at /tmp/8gls_dbEUh line 1:␤------> 3{ say 7⏏5OUTER::<$does-not-exist> }; my $does-not␤Check failed␤FAILED 00:00 138m␤»
16:34 jnthn OK, so it really really does want a pre-decl.
16:34 TimToady yup
16:34 jnthn OK...guess that and the placeholder thing make sense to fix together.
16:35 jnthn I should probably think about some shopping and dinner first, though...
16:35 TimToady this also fits in with the hypothetical COMPILING::, which doesn't even have to be lexically inside
16:37 TimToady would you mind picking up some half-and-half while you're out?  2% tastes funny in my coffee...
16:37 jnthn You...put dairy products in your coffee? o.O
16:38 vendethiel he did say it tasted funny...
16:38 jnthn :D
16:38 raiph joined #perl6
16:38 jnthn I guess this is what 5 years in Scandinavia gets me. :)
16:39 mst whole milk or cream in a very dark coffee is nice occasionally
16:39 mst otherwise, yeah, wat
16:39 * TimToady brews his coffee very dark
16:40 atroxaper joined #perl6
16:40 TimToady and half-and-half provides just about the right number of calories for bootstrapping one's brane if one is not a breakfast eater
16:42 mst ah, right, which probably approximates whole milk with maybe a touch of extra cream
16:42 * mst had to google to work out what it was ;)
16:43 jnthn mst: heh, me too :)
16:44 jnthn anyways, bbiab
16:44 TimToady well, supposedly half milk, half cream, but I doubt anyone hits that exactly...
16:49 araujo joined #perl6
16:57 raydiak g'morning #perl6
16:57 dalek rakudo/nom: 243e400 | moritz++ | src/core/Int.pm:
16:57 dalek rakudo/nom: Give Int a constructor
16:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/243e400b1f
16:57 dalek rakudo/nom: 99724b1 | moritz++ | src/core/Proc.pm:
16:57 dalek rakudo/nom: Avoid swallowing exceptions from Proc.{spawn,shell}
16:57 dalek rakudo/nom:
16:57 dalek rakudo/nom: ... though I cannot find a case where it matters; at best it is a micro
16:57 dalek rakudo/nom: optimization
16:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/99724b193b
17:06 rindolf joined #perl6
17:26 telex joined #perl6
17:27 zostay is there a maximum line length for buffered IO? say when slurping or reading lines?
17:28 TimToady shouldn't be, or it's a bug
17:28 TimToady ever since Perl 1
17:29 zostay hmmm... ok, trying to figure out why panda has trouble reading the projects.json file on travis-ci.org
17:29 zostay the file is downloading correctly onto the server, but something is going wrong when it slurps it or the JSON module parses it
17:29 zostay trying to pin down which
17:30 zostay might be related to the file system used there
17:30 ugexe dont know why the filesystem would manifest problems now suddenly
17:30 diana_olhovik_ joined #perl6
17:30 zostay dunno, looks like the file is slurped correctly
17:31 zostay got the correct number of bytes at least in my test
17:31 FROGGS joined #perl6
17:32 zostay still can't figure out why JSON::Tiny chokes on the parse then, but doesn't choke on my own machine ever
17:32 zostay in fact, it's not even consistent across builds, some of my builds are fine and some aren't, it seems
17:32 zostay but the ones that aren't are consistently bad, but have an identical .travis.yml file
17:33 amurf joined #perl6
17:33 zostay debugging this is a PIT
17:33 zostay PITA
17:36 ugexe do you know what error it gives when it chokes?
17:37 RabidGravy memory?
17:38 zostay https://travis-ci.org/zostay/per​l6-ArrayHash/jobs/68613264#L1072
17:39 ugexe i take it that also happens if you dont wget the projects.json yourself?
17:39 zostay yes, i've checked the file and it's downloading all 123153 bytes (or whatever)
17:40 zostay unless something is getting corrupted, it has the file
17:40 zostay i don't see anything weird and json_pp will parse it just fine on travis-ci
17:41 ugexe and JSON::Tiny will not parse it?
17:41 zostay apparently not, it would be nice if JSON::Tiny could report where it is having the trouble
17:42 ugexe try 'from-json' (not loading JSON::Tiny)
17:42 dalek doc: bf45d64 | FROGGS++ | lib/Type/IO.pod:
17:42 dalek doc: fix documentation of shell()
17:42 dalek doc: review: https://github.com/perl6/doc/commit/bf45d648af
17:42 ugexe the built in json deal
17:44 ugexe your `cat ~/.rakudobrew/moar-nom/install/sha​re/perl6/site/panda/projects.json` show no output
17:50 zostay that's weird, travis CI must have dropped the long line from the file, it was definitely there before
17:51 zostay i've done ls -l in other builds in this troubleshooting series that shows the correct number of bytes still ;)
17:51 zostay https://travis-ci.org/zostay/per​l6-ArrayHash/jobs/68617337#L172
17:51 zostay cat is empty there too for some reason
17:52 zostay i was first fooled though because travis cuts off extra long lines, it does not handle them well
17:53 zostay ah... you can download the log and see the cat output
17:56 vendethiel moritz: thanks
17:56 zostay trying a new build with from-json() parsing lines to see what the output is
18:02 zostay i give up for now... it just parsed correctly for me using both a pretty-printed version of the JSON and the original one-line long JSON
18:03 zostay or i'm a complete moron
18:04 zostay and my own META.info is wrong and i've been running down the wrong rabbit hole
18:05 dalek rakudo/nom: 4638656 | TimToady++ | src/Perl6/Grammar.nqp:
18:05 dalek rakudo/nom: explicitly disallow ::$foo and such
18:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/463865667d
18:07 vendethiel TimToady: aren't those $ going to interpolate?
18:07 vendethiel oh, i'm dumb. it's by design obviously
18:08 FROGGS joined #perl6
18:08 jnthn m: ::$foo
18:08 camelia rakudo-moar 99724b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hC88J5S53P␤Two terms in a row␤at /tmp/hC88J5S53P:1␤------> 3::7⏏5$foo␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        s…»
18:08 jnthn std: ::$foo
18:08 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Two terms in a row at /tmp/okNtYcj63O line 1:␤------> 3::7⏏5$foo␤    expecting any of:␤      POST␤   feed_separator␤ infix or meta-infix␤    infixed function␤       postcircumfix␤  postfix␤        postfix_prefix_meta_operator␤   postop␤ sta…»
18:10 TimToady m: ::%foo
18:10 camelia rakudo-moar 99724b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/drMnUERr7O␤Undeclared routine:␤    foo used at line 1␤␤»
18:10 TimToady well, yesterday timotimo++ was attempting ::&foo
18:10 TimToady which also looks like an infix
18:12 * TimToady should also point out that he has already classified STD as a prototype that is being thrown away, so is not inclined to maintain it
18:14 ugexe m: FOO: my $bar = gather for ^5 { next FOO if $_ > 2; take $_ }; # is label on gather NYI? or is this just  wrong?
18:14 camelia rakudo-moar 99724b: OUTPUT«Unhandled exception: No exception handler located for next_label␤   at src/gen/m-CORE.setting:13092  (/home/camelia/rakudo-inst-1/share/perl​6/runtime/CORE.setting.moarvm:next:34)␤ from src/gen/m-CORE.setting:716  (/home/camelia/rakudo-inst-1/share/perl…»
18:14 jnthn ugexe: You want the label next to the for
18:16 TimToady otoh, there are still some things that STD does better, like implementing backtrack controls, and actually closing over its backtrack points...
18:16 ugexe ah ha
18:24 FROGGS jnthn: have you spectested today already? I wonder if my run()/shell() changes break anything there
18:24 FROGGS jnthn: I no access to my windows box currently
18:25 FROGGS especially S32-io/pipe.t is of interest
18:26 jnthn FROGGS: No, but I've got a fresh build done :)
18:26 FROGGS \o/
18:26 * jnthn runs spectest
18:27 TimToady m: ::&foo
18:27 camelia rakudo-moar 463865: OUTPUT«5===SORRY!5=== Error while compiling /tmp/alDUeYFgUi␤Malformed lookup of ::&foo; please use ::('&foo'), ::{'&foo'}, or ::<&foo>␤at /tmp/alDUeYFgUi:1␤------> 3<BOL>7⏏5::&foo␤    expecting any of:␤        term␤»
18:28 colomon joined #perl6
18:51 dalek roast: 4d56eb4 | FROGGS++ | S17-procasync/basic.t:
18:51 dalek roast: replace Proc::Status by Proc
18:51 dalek roast: review: https://github.com/perl6/roast/commit/4d56eb4de1
18:53 jnthn FROGGS: ohnoes!
18:53 jnthn t\spec\S32-io\pipe.t                                        (Wstat: 1024 Tests: 11 Failed: 4) Failed tests:  4, 6, 8, 10 Non-zero exit status: 4 Parse errors: Bad plan.  You planned 13 tests but ran 11.
18:54 FROGGS ó.ò
18:54 jnthn hm, and it hangs when I run it at the command line after test 11, rather than failing
18:55 FROGGS and the other failures are potentially about line endings
18:55 FROGGS though, I'm not sure
18:56 bin_005 joined #perl6
18:56 FROGGS ahh no, test 4 is about the exit code
18:56 molaf__ joined #perl6
18:56 FROGGS I'll look into it on Monday
18:56 jnthn FROGGS: https://gist.github.com/jnthn/285493f9cba44ba7f006
18:57 colomon joined #perl6
18:57 FROGGS huh
18:58 FROGGS that probably mean that libuv does the autoquoting wrong?
18:58 jnthn my $sh1 = run($*EXECUTABLE, '-e', 'say join "\n", reverse lines', :in, :out);
18:58 jnthn maybe so :S
18:59 japhb That's sounds just like what I was afraid of.  :-(
19:01 FROGGS $ perl6 -e "run('perl6', '-e','say 42')"
19:01 FROGGS 42
19:01 FROGGS I guess that explodes for you?
19:01 FROGGS which means, it does not quote things containing whitespace
19:02 jnthn FROGGS: No explosion for that one
19:02 jnthn oh, but
19:02 japhb Embedded spaces *and* embedded quotes, perhaps?
19:02 jnthn perl6 -e "say run('perl6', '-e','say 42')"
19:02 jnthn Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => -16, pid => Any, signal => 38)
19:02 jnthn sad exit code is sad
19:03 FROGGS true
19:03 japhb Ah, so it just needs the spaces.  :-(
19:03 FROGGS but anyway
19:03 jnthn Dammit.
19:03 FROGGS jnthn: I'll investigate
19:03 jnthn FROGGS++
19:03 japhb Are the pipes readable even with failed exitcode?
19:03 japhb (So you can read the error message?)
19:03 FROGGS japhb: yes
19:03 japhb OK, good.
19:10 jaffa4 I have a bug, the compiler just quits silently, no error message.. I know it idid not finish compiling
19:10 jaffa4 What dod you do if that happens?
19:11 FROGGS jaffa4: can you paste the output you got?
19:11 jaffa4 no output
19:11 jaffa4 no error message
19:11 FROGGS but there was output before it just stopped, right?
19:11 jaffa4 before?
19:11 FROGGS aye
19:11 jaffa4 no
19:11 FROGGS I'd try to find out what the next step would be, and run that manually (under valgrind or gdb)
19:13 dalek rakudo/nom: b197408 | FROGGS++ | src/core/IO/Handle.pm:
19:13 dalek rakudo/nom: fix deprecation begin for pipe()/open(:p)
19:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b197408e34
19:14 jnthn If you think it's a compiler crash, also try running with --stagestats
19:15 jaffa4 it is a compiler crash because I know there are still some unresolved variables
19:16 jaffa4 tage start      :   0.000 then  Stage parse      :... that it
19:16 yqt joined #perl6
19:18 FROGGS jaffa4: what is the command you are running?
19:18 jaffa4 perl6-m.bat --stagestats D:\m\p6\getopt_LONG\lib\Getopt\Long.pm6
19:18 FROGGS ahh
19:20 FROGGS jaffa4: is that code in a repository somewhere?
19:22 jaffa4 FROGGS: https://gist.github.com/ja​ffa4/18c3e7816ecdb518ecec
19:24 FROGGS jaffa4: I replied with the output I get
19:26 jaffa4 ok I used star which is not sensitive about unit
19:27 jaffa4 if you add missing unit, what do you get?
19:33 jaffa4 FROGGS:
19:36 FROGGS jaffa4: I replied again
19:37 jaffa4 so it is a compiler bug, but current compiler does not have any more
19:37 jaffa4 It just exists in the last Rakudo start
19:37 dalek roast: 14607d6 | FROGGS++ | S05-match/capturing-contexts.t:
19:37 dalek roast: RT #125345, test (non-)capturing and cursor pos
19:37 dalek roast: review: https://github.com/perl6/roast/commit/14607d62fe
19:37 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125345
19:38 FROGGS jaffa4: yeah possible... sadly I have no old star to confirm that
19:41 uncleyear joined #perl6
19:49 mj41 joined #perl6
19:50 AlexDaniel joined #perl6
19:58 dalek rakudo/nom: 4cfec0c | FROGGS++ | src/Perl6/Actions.nqp:
19:58 dalek rakudo/nom: propagate ignorecase into regex subrules, RT #116256
19:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4cfec0c38d
19:58 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=116256
19:59 dalek roast: 6ecf415 | FROGGS++ | S05-modifier/ignoremark.t:
19:59 dalek roast: add tests for subrules under ignoremark, RT #116256
19:59 dalek roast: review: https://github.com/perl6/roast/commit/6ecf415d8a
19:59 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=116256
20:01 jaffa4 How do I clear configure settings?
20:01 FROGGS make realclean or make clean?
20:02 jaffa4 no it uses bad make
20:02 * japhb prefers the Aliens option: delete the whole tree and start from scratch ... but then he's seen all the configure/make bugs over the years
20:03 FROGGS gnight
20:03 japhb (It's why I keep my local clone separate from my build tree)
20:03 japhb o/ FROGGS
20:06 TimToady you're current configuration is in config.status
20:07 TimToady *your
20:07 TimToady Each of you're possessive pronouns should have it's own apostrophe.
20:11 geekosaur apos'trophe's ar'e f'un?
20:11 jaffa4 kool
20:15 raydiak .oO( as long as they aren't in you'r Package'Names, cuz that's ugly )
20:17 atroxaper joined #perl6
20:18 TimToady "aren't" and "that's" arent possessive, so should be spelled "arent" and "thats"  :-)
20:23 ugexe m: say Version.new("1").ACCEPTS(Version.new("v1")); # should these compare to Order::Same? i.e. treat /^v [\. || \d || '*']/ differently
20:23 camelia rakudo-moar 4cfec0: OUTPUT«False␤»
20:24 geekosaur (Package'Names? is that perl5? :p )
20:27 japhb I'm reminded of the apostropocalypse (in Neal Stephenson's novel Reamde, in reference to an actual linguist getting frustrated at a fantasy author's penchant for added apostrophes in every other word in his made-up languages.)
20:28 geekosaur I was roughly channeling that with the "are fun" comment, yes
20:28 geekosaur s/roughly/loosely/
20:28 jaffa4 make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4ff283)
20:29 raydiak geekosaur: yes you can use ' instead of :: in p5; I think it actually started in an earlier version though
20:29 geekosaur yes, that was the joke
20:29 geekosaur perl 5 introdiuced :: as an alternative to '
20:29 raydiak ah
20:30 geekosaur (' was in use as package separator at least back to perl 3)
20:30 TimToady yes, was poorly borrowed from Ada
20:31 raydiak I'm glad to have been spoiled by the better syntaxes of my time :)
20:31 jaffa4 :: is more visible than .   .  is easier to tyoe
20:31 jaffa4 Dont' you agree, TimToady?
20:33 TimToady well, we do try to avoid confusing those two concepts visually
20:34 Ven joined #perl6
20:36 Khisanth joined #perl6
20:45 domidumont joined #perl6
20:47 mj41 joined #perl6
20:51 rindolf joined #perl6
20:54 rurban joined #perl6
20:57 Ben_Goldberg joined #perl6
21:03 VinceDee joined #perl6
21:05 diana_olhovik joined #perl6
21:06 bin_005 joined #perl6
21:13 jnthn sleep; should have some hacking time tomorrow, and certainly will in the next week :) o/
21:14 lizmat good night, jnthn!
21:15 lizmat hmmm... at appears HEAD has failures in t/spec/S14-roles/parameterized-type.t and t/spec/S04-blocks-and-statements/temp.t
21:16 dalek rakudo/nom: bbe2ffa | lizmat++ | src/Perl6/Grammar.nqp:
21:16 dalek rakudo/nom: Turn a print on STDERR into a worry
21:16 dalek rakudo/nom:
21:16 dalek rakudo/nom: Fixes #125495
21:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bbe2ffa176
21:16 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125495
21:19 lizmat fwiw, I had run into the print on STDERR and was thinking to myself: WTF ?
21:22 rurban joined #perl6
21:43 dalek roast: 1f37c47 | lizmat++ | S06-signature/multi-invocant.t:
21:43 dalek roast: Add some Signature.multi-invocant tests
21:43 dalek roast: review: https://github.com/perl6/roast/commit/1f37c47840
21:44 dalek rakudo/nom: 89ff9b3 | lizmat++ | t/spectest.data:
21:44 dalek rakudo/nom: Add some Signature.multi-invocant tests
21:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/89ff9b3d04
21:45 lizmat m: (sub a(;;$a)).signature.perl.say   # seems we don't handle this one correctly (anymore)
21:45 camelia rakudo-moar 4cfec0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hkUKiD2XCb␤Missing block␤at /tmp/hkUKiD2XCb:1␤------> 3(sub a(;;$a)7⏏5).signature.perl.say   # seems we don't ␤    expecting any of:␤        new name to be defined␤»
21:45 lizmat m: (sub a(;;$a) {}).signature.perl.say   # seems we don't handle this one correctly (anymore)
21:45 camelia rakudo-moar 4cfec0: OUTPUT«:($a)␤»
21:45 lizmat expected to see (;;$a) there
21:45 zakharyas joined #perl6
21:45 lizmat m: (sub a($b;;$a) {}).signature.perl.say   # this seems to work ok
21:45 camelia rakudo-moar 4cfec0: OUTPUT«:($b;; $a)␤»
21:47 lizmat too sleepy now, will look at it tomorrow, so good night, #perl6!
21:52 timotimo "new name to be defined" is also wrong there, isn't it?
21:53 mj41 joined #perl6
21:54 espadrine joined #perl6
21:59 rurban joined #perl6
22:03 Begi joined #perl6
22:09 vendethiel- joined #perl6
22:26 Ven joined #perl6
22:28 vike joined #perl6
22:35 leont joined #perl6
22:43 bjz joined #perl6
22:57 bjz joined #perl6
23:31 quokka_ joined #perl6
23:38 lolisa joined #perl6
23:52 bjz joined #perl6
23:55 atroxaper joined #perl6

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

Perl 6 | Reference Documentation | Rakudo