Camelia, the Perl 6 bug

IRC log for #perl6, 2015-03-01

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:09 ash_gti Whats the perl6 alternative to `<cmd>`
00:14 ash_gti ah, I found it, shell and run
00:17 aborazmeh joined #perl6
00:17 aborazmeh joined #perl6
00:29 kaare__ joined #perl6
00:56 Hor|zon joined #perl6
01:02 jnthn_ joined #perl6
01:03 dalek rakudo/nom: 61c59db | (Geoffrey Broadwell)++ | src/core/IO/Path.pm:
01:03 dalek rakudo/nom: Implement IO::Path.resolve on r-m/POSIX
01:03 dalek rakudo/nom:
01:03 dalek rakudo/nom: ONLY expected correct on POSIX filesystems, but committing now because
01:03 dalek rakudo/nom: "implemented on r-m/POSIX" is better than purely NYI.  Other backends
01:03 dalek rakudo/nom: need only support nqp::readlink to get the POSIX support, but someone
01:03 dalek rakudo/nom: else will need to do the non-POSIX filesystem work.
01:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/61c59db4d5
01:06 dalek rakudo-star-daily: 421b28d | coke++ | log/ (9 files):
01:06 dalek rakudo-star-daily: today (automated commit)
01:06 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/421b28d6ba
01:06 dalek perl6-roast-data: 624dda9 | coke++ | / (9 files):
01:06 dalek perl6-roast-data: today (automated commit)
01:06 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/624dda97a2
01:09 aborazmeh joined #perl6
01:09 aborazmeh joined #perl6
01:21 aborazmeh joined #perl6
01:21 aborazmeh joined #perl6
01:22 ash_gti does `qx/foobar/` set any variable like $? to indicate the exit status of the subprocess?
01:22 psch ash_gti: &shell gives you a Proc::Status
01:23 psch ash_gti: qx// only cares about stdout
01:23 ash_gti can you also get the output with &shell?
01:23 psch http://doc.perl6.org/type/Proc::Status
01:23 psch m: Proc::Status.^methods.say
01:23 camelia rakudo-moar 61c59d: OUTPUT«status Numeric Bool <anon> <anon> <anon>␤»
01:25 psch m: say Proc::Status.^can('out')
01:25 camelia rakudo-moar 61c59d: OUTPUT«␤»
01:26 psch ah, no, i'm remembering Test::<&is_run> i think...
01:27 ash_gti Proc::Async seems like it would work for both reading from stdout and finding the exit status
01:27 ash_gti $? is pretty easy though, oh well
01:28 telex joined #perl6
01:29 psch on a different note, i have a «public String run(String code)» in EvalServer that works
01:29 psch unfortunately it needs a ~2600 characters long CLASSPATH
01:30 psch because our .jar loading is patently weird™
01:33 psch though for some reason i get an «unitialized value of type Any in string context» in ModuleLoader.nqp, from the looks of it in a nqp::loadbytecode call..?
01:46 laouji joined #perl6
02:14 colomon joined #perl6
02:16 colomon don’t suppose we have rakudo to C++ NativeCall working yet?  processing command line args is a pain in C++
02:20 ash_gti that would be nice
02:22 psch the tests in rakudo/cpp look rather minimal at present, but i don't know what there really is on C++ feature that's needed to make NativeCall neat for it
02:22 ash_gti colomon: getopt_long ?
02:24 colomon looking at it now…
02:26 ash_gti for me its man 3 getopt_long
02:28 * psch &
02:29 bjz joined #perl6
02:32 raiph joined #perl6
02:40 ash_gti can you have a named param with a default value?
02:40 jack_rabbit joined #perl6
02:43 colomon joined #perl6
02:46 Hor|zon joined #perl6
02:48 ilbot3 joined #perl6
02:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
02:49 aborazmeh joined #perl6
02:49 aborazmeh joined #perl6
02:55 ssutch joined #perl6
03:07 jack_rabbit joined #perl6
03:18 TimToady .tell lizmat (key => 0).Bag must remove key or it violates the bag's contract; the whole point of a Bag with 0 items in it is that that is no different from an empty Bag
03:18 yoleaux TimToady: I'll pass your message to lizmat.
03:19 TimToady .tell lizmat Throwing info away is not our lowest ideal, or however you say that...
03:19 yoleaux TimToady: I'll pass your message to lizmat.
03:22 TimToady ash_gti: are you asking about getopt_long or about Perl 6?  In P6, sure, just add "= stuff()"
03:22 ash_gti no, I metioned getopt_long for @colomon
03:23 colomon TimToady: I was lamenting not having sub MAIN in C++
03:23 ash_gti I was putting the ‘= stuff’ before I closed the ), thats all, sub MAIN(:t(:$theme) = 'atom-light-syntax’) vs sub MAIN(:t(:$theme = 'atom-light-syntax’))
03:25 Mouq m: sub (:t(:th)) {}
03:25 camelia rakudo-moar 61c59d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0AEXZTScqb␤Malformed parameter␤at /tmp/0AEXZTScqb:1␤------> 3sub (:t(:7⏏5th)) {}␤    expecting any of:␤        named parameter␤        formal parameter␤»
03:25 Mouq m: sub (:t(:$th)) {}
03:25 camelia rakudo-moar 61c59d: ( no output )
03:26 Mouq m: sub (:t( :$th )) {}
03:26 camelia rakudo-moar 61c59d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0yAAc9tKQn␤Unable to parse named parameter; couldnt find right parenthesis␤at /tmp/0yAAc9tKQn:1␤------> 3sub (:t( :$th7⏏5 )) {}␤    expecting any of:␤        shape declaration␤»
03:26 Mouq std: sub (:t( :$th )) {}
03:26 camelia std 28329a7: OUTPUT«ok 00:00 138m␤»
03:26 * Mouq rakudobugs
03:27 cognominal joined #perl6
03:35 noganex_ joined #perl6
03:36 Mouq I'm closing RT #123939, moritz++ TimToady++
03:36 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123939
03:37 TimToady m: sub foo(::T $f, ::T $g) { say T }; foo(1,"foo")
03:37 camelia rakudo-moar 61c59d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iBATkJS9lD␤Redeclaration of symbol T␤at /tmp/iBATkJS9lD:1␤------> 3sub foo(::T $f, ::T 7⏏5$g) { say T }; foo(1,"foo")␤»
03:37 TimToady \o/
03:40 PerlJam m: Bag.new-from-pairs( tea => 42 ).perl.say;
03:40 camelia rakudo-moar 61c59d: OUTPUT«().Bag␤»
03:41 Mouq m: Bag.new-from-pairs( 'tea' => 42 ).perl.say;
03:41 camelia rakudo-moar 61c59d: OUTPUT«("tea"=>42).Bag␤»
03:41 Mouq :|
03:42 PerlJam aye.  But I'm also wondering why it didn't complain about an unexpected named parameter
03:42 Mouq Methods don't
03:42 Mouq generally
03:42 PerlJam ah.
03:42 PerlJam oh, that's right.  I forgot
03:42 PerlJam Mouq++
03:43 Mouq Should I bug that too :9
03:44 PerlJam I'm not sure it is a bug.  But it could surely surprise people.
03:45 * ShimmerFairy forgot if there was a reasonable explanation for an implicit *% parameter on methods, which she still disagrees with
03:47 TimToady http://design.perl6.org/S12​.html#Interface_Consistency is the argument
03:48 Mouq PerlJam: Considering that method is neither designed nor tested, except a bit on MixHashes, I'd say it'd be good to at least get in the system
03:48 TimToady jnthn++ has said that we might be able to find a bit in the captures to tell whether a given argument has ever been bound, and warn on unbounds at the end
03:49 PerlJam That would help
03:49 ShimmerFairy The reason why I disagree with it is that I've yet to see a case where implicit *%_ was a helpful thing to have, and plenty of times where you really wanted to pass a Pair instead of a named argument.
03:49 TimToady m: ( tea => 42 ).Bag.perl.say
03:49 camelia rakudo-moar 61c59d: OUTPUT«("tea"=>42).Bag␤»
03:50 TimToady how is that method needed?
03:50 Mouq m: ( 'tea' => 42 ).Bag.perl.say
03:50 camelia rakudo-moar 61c59d: OUTPUT«("tea"=>42).Bag␤»
03:50 Mouq Hmm
03:50 PerlJam huh
03:50 TimToady coercion to Bag already handles pairs
03:50 PerlJam I just saw it in the email thread.
03:50 TimToady and doesn't have the named arg problem
03:50 Mouq m: say MixHash.new-from-pairs("blood" => 1.1, "love" => 1.3, "rhetoric" => 2.2); say ("blood" => 1.1, "love" => 1.3, "rhetoric" => 2.2).MixHash
03:50 camelia rakudo-moar 61c59d: OUTPUT«MixHash.new(blood(1.1), love(1.3), rhetoric(2.2))␤MixHash.new(blood(1.1), love(1.3), rhetoric(2.2))␤»
03:51 Mouq (That's the way it's used in the tests we have involving new-from-pairs)
03:52 ShimmerFairy I wonder if %_.unbounded-pairs would be a feasible thing, either for standard Perl 6 or some sort of module...
03:52 TimToady that's why coercers are different from composers
03:52 Mouq So, new-from-pairs is really in want of deprecation?
03:53 colomon joined #perl6
03:53 Mouq ShimmerFairy: Isn't that just *%_ ? :P
03:54 ShimmerFairy well, it would have to account for arguments that get bounded later on.
03:55 TimToady unfortunately, polymorphism kinda demands that you be able to talk to each layer in the hierarchy in its own terms, and you have to do that through a single method call that can go to multiple methods
03:55 TimToady but we can certainly find some way of detecting when you misspelled a named arg
03:56 TimToady btw, ShimmerFairy++ on new name :)
03:56 ShimmerFairy thanks :)
03:57 colomon joined #perl6
04:00 Mouq m: say {a => "b", c => "d"}.pairs.Bag
04:00 camelia rakudo-moar 61c59d: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏b' (indicated by ⏏)␤  in method Int at src/gen/m-CORE.setting:15023␤  in method Int at src/gen/m-CORE.setting:6830␤  in block  at src/gen/m-CORE.setting:1975…»
04:01 FROGGS_ joined #perl6
04:01 PerlJam WAT
04:01 TimToady coercers are not composers
04:02 TimToady m: say {a => "b", c => "d"}.pairs.bag
04:02 camelia rakudo-moar 61c59d: OUTPUT«No such method 'bag' for invocant of type 'List'␤  in block <unit> at /tmp/nx8OLNFwNz:1␤␤»
04:02 TimToady m: say bag {a => "b", c => "d"}.pairs
04:02 camelia rakudo-moar 61c59d: OUTPUT«bag(a => b, c => d)␤»
04:02 ShimmerFairy last I checked, "b" is not a number :) (nor is "d")
04:02 TimToady that's a composer
04:02 PerlJam that first message is _so_ LTA though
04:03 TimToady m: say new Bag: {a => "b", c => "d"}.pairs
04:03 camelia rakudo-moar 61c59d: OUTPUT«bag(a => b, c => d)␤»
04:03 TimToady that's also a composer
04:03 TimToady m: say Bag({a => "b", c => "d"}.pairs)
04:03 camelia rakudo-moar 61c59d: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏b' (indicated by ⏏)␤  in method Int at src/gen/m-CORE.setting:15023␤  in method Int at src/gen/m-CORE.setting:6830␤  in block  at src/gen/m-CORE.setting:1975…»
04:03 TimToady coercer, so fails
04:04 Mouq Gotcha
04:04 colomon output seems wrong, though?  shouldn’t it be bag(a => b => 1 …) or something like that?
04:04 colomon m: say bag <a b c>.list
04:04 Mouq m: say {a => "b", c => "d"}.pairs.&bag.perl
04:04 camelia rakudo-moar 61c59d: OUTPUT«bag(a, b, c)␤»
04:04 camelia rakudo-moar 61c59d: OUTPUT«("a" => "b"=>1,"c" => "d"=>1).Bag␤»
04:04 TimToady .gist
04:04 colomon m: say bag <a b c a>.list
04:04 camelia rakudo-moar 61c59d: OUTPUT«bag(a(2), b, c)␤»
04:04 colomon ah
04:05 colomon interesting
04:07 TimToady we really did name "gist" that to mean something tl;dr-ish
04:07 TimToady chops infinite lists off too
04:07 TimToady m: say 1,2,4 ... *
04:07 camelia rakudo-moar 61c59d: OUTPUT«1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736…»
04:07 TimToady that used to fail
04:08 TimToady m: say 1 xx *
04:08 camelia rakudo-moar 61c59d: OUTPUT«1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...␤»
04:08 TimToady note the Texas ...
04:08 TimToady that was put by .gist
04:08 ShimmerFairy was about to say; any reason it's different from the other list's … ?
04:09 TimToady the other one was truncated by evalbot
04:09 ShimmerFairy ah
04:10 TimToady colomon: is your client still doing smart quoting for you? :)
04:10 colomon TimToady: ya sure
04:10 TimToady I fixed it fer ya
04:11 colomon ??
04:11 Mouq haha
04:11 TimToady colomon: try typing an expression to camelia with "" or ...
04:12 colomon m: say “like this?”
04:12 camelia rakudo-moar 61c59d: OUTPUT«like this?␤»
04:12 colomon TimToady++
04:12 TimToady .u ’
04:12 yoleaux U+2019 RIGHT SINGLE QUOTATION MARK [Pf] (’)
04:12 TimToady I notice it puts that for your apostrophe though
04:12 colomon m: say ‘hmm'
04:12 camelia rakudo-moar 61c59d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BJFc1i3828␤Unable to parse expression in smart single quotes; couldn't find final "’" ␤at /tmp/BJFc1i3828:1␤------> 3say ‘hmm'7⏏5<EOL>␤    expecting any of:␤        argument list␤        p…»
04:12 TimToady we don't handle that one yet as part of an identifier
04:13 TimToady they have to balance
04:13 TimToady m: say ““like this?””;  # curious
04:13 camelia rakudo-moar 61c59d: OUTPUT«“like this?”␤»
04:13 TimToady \o/
04:14 Mouq QLang++
04:14 lizmat joined #perl6
04:16 ShimmerFairy m: say „hallo!“ # I obviously don't expect this to work
04:16 camelia rakudo-moar 61c59d: OUTPUT«5===SORRY!5===␤No valid term seen where one is required␤at /tmp/jvue_Uqrkw:1␤------> 3say 7⏏5„hallo!“ # I obviously don't expect this␤Bogus term␤at /tmp/jvue_Uqrkw:1␤------> 3say 7⏏5„hallo!“ # I obviously don't expect thi…»
04:16 TimToady m: my \Q = "protogospel"; say Q
04:16 camelia rakudo-moar 61c59d: OUTPUT«protogospel␤»
04:16 TimToady ShimmerFairy: other night I said we should make that work :)
04:16 TimToady shouldn't be a problem, since only the opener has to be unique
04:17 TimToady the closers can be shared like that
04:18 ShimmerFairy I vaguely remember the general rule was in S02, but there was already an exception to that rule, so it shouldn't be an issue :)
04:21 colomon joined #perl6
04:23 TimToady oh, except that's the wrong closer
04:24 Mouq m: say q„
04:24 camelia rakudo-moar 61c59d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cHVl03sPhc␤Couldn't find terminator ”␤at /tmp/cHVl03sPhc:1␤------> 3say q„7⏏5<EOL>␤»
04:24 TimToady > say „hallo”
04:24 TimToady hallo
04:25 dalek rakudo/nom: 37f8dd9 | TimToady++ | src/Perl6/ (2 files):
04:25 dalek rakudo/nom: reduce cultural imperialism slightly
04:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/37f8dd9667
04:27 ShimmerFairy TimToady: it's the right closer in German, though :)
04:29 ash_gti so, I made a set of scripts for using the perl.tmbundle perl6 grammar to create an html page https://github.com/ashgti/perl​6-syntax-highlight-validation
04:29 dalek nqp: 63987b2 | TimToady++ | src/QRegex/P6Regex/Grammar.nqp:
04:29 dalek nqp: allow low openers in regex too
04:29 dalek nqp: review: https://github.com/perl6/nqp/commit/63987b2de8
04:30 * TimToady thinks there are more Spanish speakers in the world than German...
04:31 ash_gti http://en.wikipedia.org/wiki/List_of_l​anguages_by_number_of_native_speakers agrees with you
04:33 * TimToady waits for someone to put in a vote for high-reversed-9 quotes..
04:34 TimToady m: say q‟foo”
04:34 camelia rakudo-moar 61c59d: OUTPUT«foo␤»
04:34 Hor|zon joined #perl6
04:34 TimToady who uses those?
04:37 ash_gti would that make “ not interpolate?
04:37 ash_gti m: my $f = 123; say q”f is $f”;
04:37 camelia rakudo-moar 61c59d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7MM6CvEVEM␤Use of a closing delimiter for an opener is reserved␤at /tmp/7MM6CvEVEM:1␤------> 3my $f = 123; say q7⏏5”f is $f”;␤»
04:39 ash_gti m: my $f = 123; say q"f is $f";
04:39 camelia rakudo-moar 61c59d: OUTPUT«f is $f␤»
04:39 TimToady actually, the Spanish don't apparently use the low quotes, according to http://en.wikipedia.org/wiki/Quotation_mark
04:39 ShimmerFairy Dutch does the „...” thing, though
04:39 TimToady that's mostly in .eu, and it's a mess, not surprisingly :)
04:41 ShimmerFairy at least we won't be supporting lojban quotes any time soon :P
04:47 TimToady I think we can handle Esperanto though
04:49 ShimmerFairy Hmm... I'm not sure about that one. :P
04:49 Mouq mo nabmi zo'e lu nu curmi la lojbo sitsku valsi… dang that's verbose
05:07 adu joined #perl6
05:29 ash_gti heres an example of the syntax I started for TextMate and atom if anyone is curious https://rawgit.com/ashgti/b9f21f21bbc​c63e4cf9d/raw/296c6084a44ede66f311785​254a23d1c34ad2366/syntax-sample.html
05:29 ash_gti I think I am going to work on quotes next, like regexp and heredocs
05:36 sivoais joined #perl6
05:37 renormalist joined #perl6
05:37 Mouq ash_gti: Nice!
05:44 ash_gti does anyone know off the top of their head where the .LANG('MAIN','quote') is found?
05:45 ash_gti or how I would find out where its defined?
05:53 tmch joined #perl6
05:58 asdf12z_ joined #perl6
06:04 ash_gti joined #perl6
06:16 colomon joined #perl6
06:22 Hor|zon joined #perl6
06:54 xfix joined #perl6
07:15 rindolf joined #perl6
07:18 Mouq ash_gti: https://github.com/perl6/nqp/blob​/master/src/HLL/Grammar.nqp#L643
07:18 Mouq (sorry for late reply)
07:19 Mouq Or do you mean…
07:19 Mouq What do you mean?
07:19 Sqirrel joined #perl6
07:19 laouji joined #perl6
07:20 ash_gti well, I am trying to figure out how to match different types of quotes so I was looking up the grammar for them
07:20 ash_gti but in the rakudo perl6 grammar it loads the .LANG(‘MAIN’, ‘quote’)
07:21 Mouq .LANG('MAIN', 'quote') looks up the 'quote' rule in 'MAIN', which just means Perl6::Grammar
07:21 Mouq (usually :P)
07:22 Mouq m: my $interpolation = "here"; say 'no $interpolation\qq[ $interpolation]!'
07:22 camelia rakudo-moar 37f8dd: OUTPUT«no $interpolation here!␤»
07:22 Mouq ^^ That's what it means
07:24 Mouq Does that help?
07:25 ash_gti https://github.com/rakudo/rakudo/bl​ob/nom/src/Perl6/Grammar.nqp#L4661 is where I think the ‘q{foobar}’ is parsed, I think
07:25 ash_gti m: say q{{foo bar foobar}}.perl;
07:25 camelia rakudo-moar 37f8dd: OUTPUT«"foo bar foobar"␤»
07:25 ash_gti m: say qw{{foo bar foobar}}.perl;
07:25 camelia rakudo-moar 37f8dd: OUTPUT«("foo", "bar", "foobar")␤»
07:31 davido_ joined #perl6
07:44 gfldex joined #perl6
07:47 fhelmberger joined #perl6
07:48 jack_rabbit joined #perl6
07:52 pyrimidi_ joined #perl6
08:03 aborazmeh joined #perl6
08:03 aborazmeh joined #perl6
08:07 Alina-malina joined #perl6
08:11 virtualsue joined #perl6
08:11 Hor|zon joined #perl6
08:11 prime joined #perl6
08:16 darutoko joined #perl6
08:22 Kristien joined #perl6
08:28 diana_olhovik_ joined #perl6
08:29 ash_gti https://rawgit.com/ashgti/055797e1199b​5cff4e43/raw/01cdafbd5d0f680fd8f6dc191​42726669ce347e2/Perl6Grammar.pm.html I ran the Perl6/Grammary from Rakudo through the syntax highlighter, let me know if anyone sees any glaring mistakes, its not complete yet, but its an improvement
08:30 Mouq ash_gti++
08:30 Mouq ash_gti: It doesn't seem to handle "$<B>"
08:31 ash_gti ya, its not recongizing any of the regexp language either yet
08:31 ash_gti I also need to match package names and subnames
08:33 ash_gti I am getting a bit tired, but I’ll try to work on this a bit more tomorrow, cya
08:36 diana_olhovik__ joined #perl6
08:43 MadcapJake joined #perl6
08:44 Aurelie joined #perl6
08:53 _mg_ joined #perl6
08:54 virtualsue joined #perl6
08:55 wicope joined #perl6
09:04 lizmat .botsnack
09:04 yoleaux :D
09:04 yoleaux 03:18Z <TimToady> lizmat: (key => 0).Bag must remove key or it violates the bag's contract; the whole point of a Bag with 0 items in it is that that is no different from an empty Bag
09:04 yoleaux 03:19Z <TimToady> lizmat: Throwing info away is not our lowest ideal, or however you say that...
09:12 Hor|zon joined #perl6
09:14 rurban joined #perl6
09:20 espadrine joined #perl6
09:23 dalek rakudo/nom: 300167d | lizmat++ | src/core/Baggy.pm:
09:23 dalek rakudo/nom: Allow Failure to percolate up
09:23 dalek rakudo/nom:
09:23 dalek rakudo/nom: Pretty sure this is tested with a "dies_ok" in the spectest, and not with a
09:23 dalek rakudo/nom: "throws_like", so the test was passing for the wrong reason on (a=>-1).Bag
09:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/300167dafd
09:25 Rounin joined #perl6
09:27 dj_goku joined #perl6
09:27 dj_goku joined #perl6
09:34 diana_olhovik joined #perl6
09:43 DrForr_ G'morning. Is there a specific place to report bugs? I've got a fairly simple test case that takes out te VM I ru perl6 on.
09:43 DrForr_ (was looking at the p6 wiki for a site, nothing really stood out.)
09:46 moritz DrForr_: rakudobug@perl.org
09:46 DrForr_ Thanks. I'm stripping down the test case, will send it soonish.
09:48 jnthn .tell TimToady it's a little pain with our one-passness, but I wonder if *%_ generation being triggered by the presence of a nextsame/callsame somewhere in the method body would do it.
09:48 yoleaux jnthn: I'll pass your message to TimToady.
09:50 mr-foobar joined #perl6
10:02 lizmat joined #perl6
10:03 rurban joined #perl6
10:06 kst` joined #perl6
10:06 kjs_ joined #perl6
10:10 dalek doc: ea1a253 | moritz++ | lib/Type/Cool.pod:
10:10 dalek doc: Cool: sub forms of abs, sqrt; examples
10:10 dalek doc: review: https://github.com/perl6/doc/commit/ea1a2536b5
10:16 jack_rabbit joined #perl6
10:18 mr-foobar joined #perl6
10:42 lizmat commute&
10:47 kjs_ joined #perl6
10:47 dalek rakudo/nom: dcda6c3 | (Carl Masak)++ | src/core/Temporal.pm:
10:47 dalek rakudo/nom: disallow .later() without any named arguments
10:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dcda6c3205
10:48 masak someone(tm) is welcome to add a spectest to check for that, too.
10:50 jnthn m: use Test; dies_ok { now.later }
10:50 camelia rakudo-moar 300167: OUTPUT«ok 1 - ␤»
10:50 jnthn m: now.later
10:50 camelia rakudo-moar 300167: OUTPUT«No such method 'later' for invocant of type 'Instant'␤  in block <unit> at /tmp/V9f7kygmlw:1␤␤»
10:50 jnthn Oh :)
10:50 jnthn m: DateTime.now.later
10:50 camelia rakudo-moar 300167: OUTPUT«use of uninitialized value $unit of type Any in string context  in sub thread_junction at src/gen/m-CORE.setting:1␤␤use of uninitialized value $unit of type Any in string context  in sub thread_junction at src/gen/m-CORE.setting:1␤␤use of uninitial…»
10:50 jnthn m: dies_ok { DateTime.now.later }
10:50 camelia rakudo-moar 300167: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ajkgtwv4Vw␤Undeclared routine:␤    dies_ok used at line 1␤␤»
10:50 jnthn m: use Test; dies_ok { DateTime.now.later }
10:51 camelia rakudo-moar 300167: OUTPUT«use of uninitialized value $unit of type Any in string context  in sub thread_junction at src/gen/m-CORE.setting:1␤␤use of uninitialized value $unit of type Any in string context  in sub thread_junction at src/gen/m-CORE.setting:1␤␤use of uninitial…»
10:51 jnthn masak: Does that one pass with your branch?
10:51 jnthn uh, your commit
10:54 masak $ perl6 -e 'use Test; dies_ok { DateTime.now.later }'
10:54 masak ok 1 -
10:54 DrForr_ bug report sent.
10:54 masak DrForr_++
10:57 laouji joined #perl6
11:00 DrForr_ It's a rare edge case I imagine, but it should still throw a compile-time error rather than what it did.
11:01 Hor|zon joined #perl6
11:04 jnthn m: say 5.54 / 19.86
11:04 camelia rakudo-moar 300167: OUTPUT«0.278953␤»
11:09 FROGGS_ you are calculating your hight divided by the year of birth in percent?
11:14 jnthn haha :P
11:14 jnthn That's off by one on my birth year though :P
11:15 DrForr_ Is that the bug? :)
11:16 jnthn No, the calc was time after / time before of a benchmark (the after being when I implemented a few things missing in the JIT so it could JIT-compile a benchmark :))
11:16 jnthn Which accounts entirely for some of the native-ref performance slowdowns.
11:16 jnthn And partially for a couple of them.
11:17 sirdancealot joined #perl6
11:18 FROGGS_ ewww
11:19 [ptc] how does one extract the Pod structure of a file containing code and Pod?  I've found that EVAL("filename") on a pure-Pod file returns this structure, but a file containing both runs the code only
11:20 [ptc] there's probably something simple I'm missing, but grepping the specs, docs, rakduo hasn't turned up much
11:20 spider-mario joined #perl6
11:27 jnthn m: say 606 / 1155
11:27 camelia rakudo-moar dcda6c: OUTPUT«0.524675␤»
11:46 telex joined #perl6
11:55 vendethiel joined #perl6
12:02 [Tux] FROGGS_, Slang::Tuxic fails on nameless sub with arg-spec - https://gist.github.com/Tux/c57969dc265fb0012408
12:02 FROGGS_ [Tux]: that's kinda expected
12:02 [Tux] :(
12:03 FROGGS_ since 'sub' can be a subroutine name, unlike in other lanugages
12:03 FROGGS_ languages*
12:03 [Tux] hmmm
12:04 kjs_ joined #perl6
12:05 jnthn Try spelling it out as "anon sub" maybe
12:06 jnthn Alternatively, if you don't need to use "return" in there, go with a pointy block
12:08 isBEKaml joined #perl6
12:09 [Tux] anon sub works. I'll go with that for now
12:10 dalek rakudo/native-ref: ed74d05 | jnthn++ | src/Perl6/Optimizer.nqp:
12:10 dalek rakudo/native-ref: Annotate return type on node post-inline.
12:10 dalek rakudo/native-ref:
12:10 dalek rakudo/native-ref: Allows full inlining on chains like '$x ~ $y ~ $z', where the types of
12:10 dalek rakudo/native-ref: $x, $y, and $z are all known.
12:10 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/ed74d053de
12:17 vendethiel joined #perl6
12:22 virtualsue joined #perl6
12:23 perl6_newbee joined #perl6
12:28 perl6_newbee hi all
12:28 perl6_newbee what happened to MIME::Base64?
12:28 perl6_newbee I want to install LWP::Simple but got error: MIME::Base64 is not present in the module ecosystem
12:28 perl6_newbee temporarly vanished?
12:28 laouji joined #perl6
12:29 perl6_newbee also gone by purpose?
12:29 dalek rakudo/native-ref: 1145f2a | jnthn++ | src/Perl6/Optimizer.nqp:
12:29 dalek rakudo/native-ref: Optimize away ref taking when args are known ro.
12:29 dalek rakudo/native-ref:
12:29 dalek rakudo/native-ref: This only works for subs, and then only those we can compile-time
12:29 dalek rakudo/native-ref: analyze. Still, that covers quite a lot of ground for code using
12:29 dalek rakudo/native-ref: native types.
12:29 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/1145f2ad85
12:29 dalek rakudo/native-ref: 45f77e5 | jnthn++ | src/core/Stringy.pm:
12:29 dalek rakudo/native-ref: Add prefix:<~> candidates for native int/num.
12:29 dalek rakudo/native-ref:
12:29 dalek rakudo/native-ref: We can handle these very cheaply, and have them inlinable.
12:29 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/45f77e57bd
12:30 jnthn perl6_newbee: No idea, it's still listed on http://modules.perl6.org/
12:30 perl6_newbee yeah, listed it is.
12:31 perl6_newbee I will update rakudobrew and panda and try again
12:34 moritz http://ecosystem-api.p6c.org/projects.json also includes it
12:35 coffee` joined #perl6
12:40 perl6_newbee I had to update panda, now it is installing. However, I had to git ignore the panda/ext directory, before it did the pull request
12:43 dalek Heuristic branch merge: pushed 44 commits to nqp by jnthn
12:43 jnthn That was the merge of native-ref in NQP
12:43 moritz \o/
12:45 [ptc] moritz: have you got a minute?
12:45 moritz [ptc]: yes
12:46 dalek nqp: a01002f | jnthn++ | tools/build/MOAR_REVISION:
12:46 dalek nqp: Bump MoarVM for JIT of some native ref ops.
12:46 dalek nqp: review: https://github.com/perl6/nqp/commit/a01002f5ed
12:46 [ptc] I'm trying to extract pod from source files containing both code and pod, however have hit a bit of a wall
12:46 [ptc] I've worked out that one can slurp in the file and EVAL that (with $=pod on the end) and that creates a pod structure
12:46 [ptc] however, that's only if there is *only* pod in the file
12:47 moritz right, otherwise it runs the code
12:47 [ptc] how does one extract the pod structure without running the code in the file?
12:47 [ptc] exactly
12:47 moritz [ptc]: maybe it requires a rakudo patch
12:47 [ptc] and the EVAL trick I found inside htmlify, hence why I thought you'd know :-)
12:47 moritz [ptc]: at least off-hand, I can't think of anything clever
12:47 [ptc] oh
12:47 [ptc] how does --doc work then?
12:48 moritz from inside rakudo :-)
12:48 [ptc] ah
12:48 moritz but that's a good lead
12:48 moritz check what it does
12:48 [ptc] already have, and got a bit lost...
12:48 moritz here's a really, really hacky idea
12:48 moritz write to Pod::To::Perl module
12:48 moritz that simply returns $pod.perl
12:49 moritz then run   perl6-m --doc=Perl thefile
12:49 moritz capture the output, eval it
12:49 moritz did I mention it was really, really hacky? :-)
12:49 [ptc] you're right, that *is* hacky!  :-D
12:49 * [ptc] grings
12:49 [ptc] *grins
12:50 Hor|zon joined #perl6
12:50 [ptc] how do I write to the Pod::To::Perl module?
12:51 moritz class Pod::To::Perl { method render($pod) { $pod.perl } }
12:51 [ptc] ok
12:52 * [Tux] wonders if he did not understand defaults correct ...
12:52 [Tux] method foo (Str $needed, Int $optional = 0) { ... }
12:53 [Tux] $optional being default, right? And set to 0 if not passed
12:53 jnthn [Tux]: Yes
12:53 moritz yes
12:53 [Tux] but it *also* renders it to be readonly
12:53 jnthn Sure
12:53 [Tux] if '$optional--' is used inside the sub, Cannot assign to an immutable value
12:53 moritz all parameters are
12:54 jnthn Just making something have a default doesn't magic up a container.
12:54 jnthn Add "is copy" for that
12:54 moritz unless marked 'is rw' or 'is copy'
12:54 * [Tux] alters assumptions in his mind (that might take a bit)
12:55 perl6_newbee FYI: installing LWP::Simple failed, because get-unsized.t tries to get http://rakudo.org, and that is down. Had to install with --notests
12:56 vendethiel joined #perl6
12:56 rurban joined #perl6
12:56 [ptc] moritz: it works!
12:56 moritz [ptc]: that's a bit scary
12:57 [ptc] it's also very cool, and allows me to get a bit further :-)
12:57 [ptc] thanks heaps!
13:01 moritz you're welcome
13:06 moritz jnthn: fwiw I got no new spectest failures due to the nqp merge (with a rakudo that uses the new nqp, of course)
13:07 FROGGS_ moritz: there seems to be a problem with NULLs in DBIish with the Pg driver
13:08 moritz FROGGS_: care to elaborate (or even better, open an issue?)
13:08 FROGGS_ moritz: when I select row, I get a NULL back as an empty string
13:08 moritz :(
13:09 FROGGS_ when I then select rows with a where clause and that empty string, I of course dont get back the said rows
13:09 jnthn moritz: Yay. And rakudo native-ref merge coming up soon too :)
13:09 FROGGS_ moritz: so I think we want to use the Str type object for NULLs
13:15 dalek Heuristic branch merge: pushed 63 commits to rakudo/nom by jnthn
13:15 jnthn Vive le native-ref
13:15 jnthn Or something. :)
13:15 laouji joined #perl6
13:16 isBEKaml_ joined #perl6
13:17 [Tux] if @aoa is a list of @aof's, like [[1,2,3],[4,5,6],[6,7,8]], how do I do «for @aoa -> @aof { for @aof -> $f { ... }}»?
13:18 jnthn [Tux]: As in, without needing the outer loop?
13:18 [Tux] no, as in how will @aof be a list
13:18 [Tux] as in perl5's @$ref
13:20 jnthn m: sub foo(@a) { say elems @a }; foo(my @ = 1, 2, 3); foo([1,2,3]);
13:20 camelia rakudo-moar dcda6c: OUTPUT«3␤3␤»
13:20 jnthn The signature binding itself removes the outer Scalar
13:21 jnthn And -> @aof { ... } is just a lambda, so the @aof is a signature, so it's normal sig binding semantics there
13:21 arnsholt jnthn++ # Habemus i++!
13:21 Alina-malina joined #perl6
13:21 [Tux] my sub has a (*@args) signature. If @args.elems == 1 and @args[0].^name ~~ /Array/ I want to expand @args[0] instead of using @args
13:22 [Tux] arnsholt, for native int ?
13:22 * [Tux] compiles again
13:23 jnthn oh...
13:23 [Tux] https://gist.github.com/Tux/a1e61d22f31d30a5c8bf <= code example speaks louder than words
13:24 moritz FROGGS_: can you please open an issue for the NULL thingy?
13:24 FROGGS_ moritz: will do in a bit
13:24 jnthn m: sub has-a(*@args) { @args = @args>>.flat; say @args.perl; }; has-a(1); has-a(1, 2, 3); has-a([1,2,3]);
13:24 camelia rakudo-moar dcda6c: OUTPUT«Array.new(1)␤Array.new(1, 2, 3)␤Array.new(1, 2, 3)␤»
13:24 jnthn [Tux]: Like that?
13:24 [Tux] :)
13:25 [Tux] see, how much I still need to learn? :)
13:25 [Tux] Inline::Perl5 now fails on moar
13:26 [Tux] getlexref_i: lexical is not an int
13:26 [Tux] in method unpack_return_values at lib/Inline/Perl5.pm6:413
13:26 jnthn Hmm
13:26 jnthn Trust a module I have no idea how to build on Windows to be the one that fails :/
13:26 [Tux] but yeah $i++ FIX !!!!
13:26 [Tux] jnthn++
13:27 [Tux] http://tux.nl/Files/20150301142709.png
13:27 * jnthn notes that $native-i++ needs some perf work yet
13:28 jnthn [Tux]: :)
13:29 jnthn [Tux]: Is the s{} one the thing you already filed in RT?
13:29 [Tux] don't know. that was one of the first and I am not really sure if it is a bug or something actually impossible
13:30 [Tux] https://gist.github.com/Tux/8d83069f3bb2b87cf98c <= that is the test case
13:31 [Tux] => Cannot call 'subst-mutate'; none of these signatures match:
13:33 [Tux] jnthn, I cannot use >>.flat, as it seems to remove undefined items from the list :(
13:33 [Tux] probably related to dropping Nill
13:35 jnthn Ugh
13:35 [Tux] bug?
13:35 jnthn Well, we know Nil should not be dropped
13:36 jnthn Is there any reason you don't write a pair of multis to handle the case?
13:36 jnthn multi foo(@arr) { }; multi foo(*@arr) { }
13:36 bartolin |Tux|: wrt to your gist: there is RT #123597 about s{} only working on strings
13:36 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123597
13:36 bartolin and jnthn++
13:37 [Tux] bartolin, yep, that one
13:37 [Tux] thanks
13:37 jnthn I think I know the problem with Inline::Perl5, but gotta go for a bit...
13:37 jnthn bbi~1h
13:37 bartolin [Tux]: np
13:39 * [Tux] must go
13:39 [Tux] thanks again for the help
13:42 isBEKaml joined #perl6
13:51 Hor|zon joined #perl6
13:54 grondilu joined #perl6
13:54 grondilu m: my int $n = 0; say $n++
13:54 camelia rakudo-moar 8e0cc1: OUTPUT«0␤»
13:55 grondilu m: say (my int $ = 0)++
13:55 camelia rakudo-moar 8e0cc1: OUTPUT«Expected a native int argument for '$a'␤  in sub postfix:<++> at src/gen/m-CORE.setting:5617␤  in block <unit> at /tmp/0iP02V4nhw:1␤␤»
13:55 Aurelie joined #perl6
13:55 grondilu m: say (my int $n = 0)++
13:55 camelia rakudo-moar 8e0cc1: OUTPUT«Expected a native int argument for '$a'␤  in sub postfix:<++> at src/gen/m-CORE.setting:5617␤  in block <unit> at /tmp/kuO7g1tuB2:1␤␤»
14:10 masak jnthn++ # vive le native-ref! \o/
14:10 mj41 joined #perl6
14:19 vendethiel masak: it's "la" ;p
14:20 masak vendethiel: vive la reference native!
14:24 [TuxCM] joined #perl6
14:30 laouji joined #perl6
14:31 mj41 Hi, rakudo.org down?
14:33 masak seems like. :( http://www.downforeveryoneorjustme.com/rakudo.org
14:33 masak "It's not just you! http://rakudo.org looks down from here."
14:37 FROGGS_ m: my $s = "foo"; $s &&~= "bar"; say $s # :o(
14:37 camelia rakudo-moar 8e0cc1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/o8vdT8b39p␤Preceding context expects a term, but found infix ~= instead␤at /tmp/o8vdT8b39p:1␤------> 3my $s = "foo"; $s &&~=7⏏5 "bar"; say $s # :o(␤»
14:40 Humbedooh joined #perl6
14:40 Humbedooh joined #perl6
14:42 masak FROGGS_: &&~= ?
14:43 FROGGS_ like &&=
14:43 FROGGS_ concat if lhs is trueish
14:45 masak m: sub infix:<&&~>($l, $r) { $l ?? $l ~ $r !! $r }; my $s = "foo"; $s &&~= "bar"; say $s
14:45 camelia rakudo-moar 8e0cc1: OUTPUT«foobar␤»
14:45 masak there ya go.
14:45 psch \o
14:45 masak o/
14:46 FROGGS_ masak++
14:46 zakharyas joined #perl6
14:47 psch vendethiel: i have a «public String run(String code)» prototype running, albeit with a few weirdnesses
14:47 vendethiel psch: sounds amazing.
14:47 psch vendethiel: first call is expectedly slow, but it gets faster after that
14:47 vendethiel oooh :o)
14:48 virtualsue joined #perl6
14:48 psch reusing CompilationUnits doesn't work, which probably has reasons, i'm not particularly knowledgable what those might be
14:49 psch the weirdest bit is that for some reason it tries to load CORE.setting, doesn't find it, but still works :s
14:50 psch vendethiel: https://gist.github.com/pes​chwa/96571d2ce74cedeea055O
14:50 psch colomon++ seems to be smoking currently, which influences the timings
14:50 vendethiel psch, four o four
14:51 psch huh
14:51 psch https://gist.github.com/pe​schwa/96571d2ce74cedeea055
14:51 psch where did that O come from...
14:53 rmgk_ joined #perl6
14:55 [TuxCM] "WHICH" link on http://doc.perl6.org/routine/%3D%3D%3D is 404
14:55 psch getting the CLASSPATH right is also rather arcane currently, because we need not only the jars in there, but also the path for at least one of them, because we're looking through CLASSPATH ourselves to find a specific jar
14:56 raiph joined #perl6
14:59 colomon joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs