»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
ShimmerFairy m: sub foo(int $a) { say "OK! $a" }; foo(42) 00:21
camelia rakudo-moar 631ac4: OUTPUT«OK! 42␤»
ShimmerFairy m: sub foo(int $a) { say "OK! $a" }; foo(val("42"))
camelia rakudo-moar 631ac4: OUTPUT«Failed to unbox object to integer␤ in sub foo at /tmp/Z7ps_bteHQ:1␤ in block <unit> at /tmp/Z7ps_bteHQ:1␤␤»
ShimmerFairy Util, timotimo: ^^^ that's the basic issue
binding an allomorph to a natively-typed parameter, apparently 00:25
TimToady m: my @v := [1, 2]; my \step1 = 8 X* ^4; my \step2 = @v X+> step1; say step2 X% 256; 01:00
camelia rakudo-moar 631ac4: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Uninstantiable)␤»
TimToady m: my @v := [1, 2]; my \step1 = (8 X* ^4).eager; my \step2 = @v X+> step1; say step2 X% 256;
camelia rakudo-moar 631ac4: OUTPUT«(1 0 0 0 2 0 0 0)␤»
dnmfarrell woo it's quiet here for once. Guess the everyone's asleep eh? FWIW, I just published perltricks.com/article/194/2015/9/2...ing-in-Vim 02:26
shinobi-cl Hi 03:32
dalek kudo/nom: be02b7c | TimToady++ | src/Perl6/Grammar.nqp:
unbreak @a>>.[] dotted form
05:43
TimToady oh, that fixes #124513 if anyone has rt write privs 05:59
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124513
dalek ast: 124aef3 | TimToady++ | S03- (2 files):
True ^^= True is Nil, so var should end up Any
06:02
ShimmerFairy TimToady: I find it hard to believe that you don't :) 06:05
bartolin closed RT #124513 06:10
mst got told I must hate larry earlier today for saying that perl6 and perl5 weren't the same language and I wasn't trying to port my modules to it any more than I was to python 06:16
I. um. really?
[Tux] test 50000 36.333 36.232 06:20
test-t 50000 37.206 37.106
dalek ast: 57f2fdf | usev6++ | S12-methods/parallel-dispatch.t:
Unfudge passing test for RT #124513
06:23
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124513
grondilu rosettacode.org/wiki/Reverse_words_...ing#Perl_6 now prints parenthesis. 06:44
m: say ("foo",) 06:45
camelia rakudo-moar be02b7: OUTPUT«(foo)␤»
grondilu m: say ~("foo",)
camelia rakudo-moar be02b7: OUTPUT«foo␤»
grondilu m: say ~("foo", "bar")
camelia rakudo-moar be02b7: OUTPUT«foo bar␤»
grondilu ok, I just have to stringify then
Ven Hi, #perl6!/ 06:48
s/\/, o\//
grondilu \o 06:49
dalek ast: 30f08b1 | TimToady++ | S03-operators/orelse.t:
update to new orelse semantics
[Tux] tux.nl/Talks/CSV6/test-t.png 07:17
dalek kudo/nom: 5a534d6 | TimToady++ | src/core/Any.pm:
Mu ~~ 0 is false

By default, nothing defined should be accepting anything undefined.
ast: f3a52d4 | TimToady++ | S03-smartmatch/any-num.t:
Mu ~~ 0 and such should return False
ast: 579fc71 | TimToady++ | S03-smartmatch/any-str.t:
Mu ~~ '' should also be false
07:22
Ven perl6.org/compilers/features – should the LoL part be removed? 07:25
.ask TimToady also – perl6.org/compilers/features – can we remove the "missing exception semantics" to orelse/andalso?
yoleaux Ven: I'll pass your message to TimToady.
[Tux] tux.nl/Talks/CSV6/speed3.html 07:26
TimToady Ven, yes you can remove that 07:27
yoleaux 07:25Z <Ven> TimToady: also – perl6.org/compilers/features – can we remove the "missing exception semantics" to orelse/andalso?
Ven TimToady: so, I can mark them as "working as intended" now? 07:29
TimToady yup 07:30
Ven somehow, I keep writing "andthen" as "andalso"..:) 07:32
dalek atures: 4a6ab85 | ven++ | features.json:
Mark andthen/orelse as working

see irclog.perlgeek.de/perl6/2015-09-23#i_11260976 and github.com/perl6/roast/commit/30f0...bc1bb35ff4
07:34
brrt \o 07:39
nine Ven: hasn't NFG been default for several months now? Is still marked red in features 07:44
Ven nine: yeah, jnthn++ might want to confirm we have "everything", but it warrants at least a +- 07:47
nine Well I don't know what StrPos/StrLen is about and I can't find it in src/, so I guess it's gonna end up as +-
moritz StrPos and StrLen are no longer needed 07:50
they were from a time where we thought Buf, Uni and Str were one type
nine Oh, so it might end up as + after all :)
moritz does rakudo-jvm do graphemes? 07:53
TEttinger hm, someone brought up an odd question: if you were using perl 6 code to model English, you'd need to track certain things for verb usage like he swims, she swims, you swim, they swim, I swim, etc. being all only dependent on number. but if you modeled Spanish, you'd need to track formality for the Usted conjugation, and for adjectives you'd need genders for the applied nouns.
ShimmerFairy nine: StrPos and StrLen come from before we knew that the different normalizations would be different types. (A time where you were speculated to need to sprinkle :nfkd adverbs in every call, *shudder* :P)
TEttinger is there some way to attach arbitrary metadata to a perl6 variable, like "how formally this person is to be addressed" or their preferred gender (which also varies between which language, like how German has a neuter gender) 07:54
DrForr English used to have formality too. (see 'thou') and Catalan and Andalusian still have formality for both singular and plural forms. 07:55
ShimmerFairy nine: They don't matter now, since using position/length numbers you get from a Str and then turning around and trying them on a Buf is your own fault :)
TEttinger and I think Japanese has a much more in-depth formality system than most Western languages 07:56
DrForr TEttinger: Offhand I'd package that into an object and overload stringification, or whatever the proper term is now.
TEttinger (the bowing custom alone has so many grades of formality in Japan)
ShimmerFairy DrForr: and before that we didn't have any formality :P (silly French language influences...)
TEttinger and the other question would be, is there a way to enforce that, if you were making say a dictionary, every object that represents a noun has a gender, but verbs and adjectives do not ever have that? 07:58
DrForr One way would be to create a gender role and apply it only to the noun? 07:59
TEttinger the literal question was about gendered natural languages made into an analogy about gendered programming languages. I suggested "perl 6 has every other feature, it probably has a way to represent that"
ShimmerFairy TEttinger: I think the best option (or at least one of the easier ones) would be to have custom classes for that, with maybe a base role .oO(role Word ?) to at least make checking for the right collection of types easier. 08:00
TEttinger yeah
I think it's completely possible, I wonder about a slang...
DrForr Great, Perl6::InEsperanto :) 08:01
ShimmerFairy TEttinger: perhaps I don't understand the question well enough, but I get the sense that anything more complex than classes (messing with the metamodel or such) would likely be overengineering. 08:02
DrForr And really, the natural evolution I would see would be to at least start with an object hierarchy that you can poke and prod at your leisure, then add whatever overloading or casting operations you see fit on top of the working framework, so the code reads how you want. 08:08
Ulti ShimmerFairy does your example of the allomorph issue work with normal Int and not just the native form, because the issue I had only turned up when I added the MAIN with an Int parameter being passed 08:56
ShimmerFairy m: sub foo(Int $a) { say $a }; foo(val("42")) 08:57
camelia rakudo-moar 5a534d: OUTPUT«42␤»
ShimmerFairy m: sub foo(int $a) { say $a }; foo(val("42"))
camelia rakudo-moar 5a534d: OUTPUT«Failed to unbox object to integer␤ in sub foo at /tmp/2r9hthsr_R:1␤ in block <unit> at /tmp/2r9hthsr_R:1␤␤»
ShimmerFairy Ulti: the problem is with binding to natively-typed parameters in signatures, in the implementation of Range's iterator IIRC. (Use --ll-exception with perl6 to see where the error really comes from.) 08:58
dalek kudo/nom: c3ba558 | lizmat++ | src/core/Any-iterable-methods.pm:
Reinstate original grep handler for junctions

The new Seq based code for some reason does not handle grepping using with a junction (at least according to test 28 in S32-list/grep.t). Adding this candidate using the original code, makes the test pass. Not 100% if that test is legit, though. At least this reinstates the previous behaviour.
09:53
Ulti ShimmerFairy well the issue for me is in MAIN I specify Int as the type and thats not what I got 09:56
just calling .Int on that before passing it in fixes everything
so its something to do with the MAIN wrangling
ShimmerFairy Ulti: you get an IntStr, which isa Int. If you really mean integer, you have to convert it to numeric (and if you really mean string, you have to convert it to string) 09:57
ShimmerFairy The issue isn't with MAIN, the issue is with the fact that IntStr won't unbox like Int does in binding to natively-typed signature params, for whatever reason. 10:00
Ulti I kind of expect what I got from MAIN to be an instance of that specific type though :/ 10:01
Ulti but yeah I guess I wouldnt notice if it was all working as expected 10:02
ShimmerFairy Ulti: that's not how parameters work in general, though. (You can use Int() as a coercive type parameter however, which say "accept objects of type Any, and call .Int on it, and give me that")
Hm, I think perhaps I don't have that quite right, so nvm 10:03
Ulti also another big win, the junction form of finding primes (which is incredibly elegant) now runs in 1 second instead of 11 from two years ago :)
ShimmerFairy sure but whats coming from MAIN is a little magical since I'm not passing into it 10:04
psch is kind of relieved to see allomorphs have bumps on both backends :P
moritz lizmat: fwiw grep is supposed to work with arbitrary matches, smart-matching against them
m: say ('a', 42).grep(Int)
camelia rakudo-moar 5a534d: OUTPUT«(42)␤»
moritz so also with junctions, yes
m: say ('a', 42).grep(Int|Str)
camelia rakudo-moar 5a534d: OUTPUT«any((42), (a))␤»
moritz but that's wrong 10:05
it should just return ('a', 42).Seq, not a junction
psch m: sub f(int $x) { say $x }; f val("42") # points at MoarVM/src/core/args.c:199, which suggests the composition get the storage spec right 10:06
camelia rakudo-moar 5a534d: OUTPUT«Failed to unbox object to integer␤ in sub f at /tmp/Gf51tkPs9p:1␤ in block <unit> at /tmp/Gf51tkPs9p:1␤␤»
Ulti m: my @primes.push($_) unless $_ %% any(@primes) for 2 .. 1000; say @primes[0..2]
camelia rakudo-moar 5a534d: OUTPUT«(2 3 5)␤»
psch +doesn't
lizmat moritz: that's the bug I just fixed
moritz lizmat: ok, great
ShimmerFairy Ulti: P6 automatically processes stuff that comes through the commandline with val(), since there's no way for someone typing at the commandline to specify numbers vs. string data :)
psch unless there's bigint wonkiness hiding there somewhere, which is possible... 10:07
ShimmerFairy Ulti: before val() and allomorphs existed, rakudo did a hackish version of it just for val()
Ulti apart from me the programmer did specify I wanted an Int
if its not numeric MAIN exits with usage
ShimmerFairy *just for MAIN
psch: fwiw this also occurs trying to bind a native num
psch m: sub f(num $x) { say $x }; f val("42.0")
camelia rakudo-moar 5a534d: OUTPUT«coerce string to num NYI␤ in sub f at /tmp/Et088YiAuO:1␤ in block <unit> at /tmp/Et088YiAuO:1␤␤»
ShimmerFairy m: sub foo(num $x) { say $x }; foo(val("42e0"))
camelia rakudo-moar 5a534d: OUTPUT«Failed to unbox object to number␤ in sub foo at /tmp/vtqU8dcPV5:1␤ in block <unit> at /tmp/vtqU8dcPV5:1␤␤»
psch aah right 10:08
hmm
yeah "42.0" is a RatStr isn't it
ShimmerFairy yep, and there aren't any native rats out there :)
psch ShimmerFairy: well, in that case it's probably not the add_I workaround, but an actual problem in delegation of $!box_target 10:09
m: use nqp; my $x = IntStr.new(5, "5"); say nqp::unbox_i($x) # but uhh 10:10
camelia rakudo-moar 5a534d: OUTPUT«5␤»
psch m: use nqp; my $x = IntStr.new(5, "5"); say nqp::unbox_i($x).WHAT # but uhh
camelia rakudo-moar 5a534d: OUTPUT«(Int)␤»
psch .WHAT reboxed iirc?
moritz all method calls do
psch right
ShimmerFairy psch: makes sense, multiple box targets is something I spotted when working on this, and I'm surprised it didn't cause an explosion of problems :)
moritz it did, on JVM, no? 10:11
psch moritz: kind of, yes. but the first hint at the problem was because the getBI implementation was overly optimistic 10:12
moritz: as in, it assumed that the unboxIntSlot is always 0
(which it isn't with IntStr)
trying to fix it lead me to discover that we don't even get the right values for the unbox{*}Slot fields... 10:13
well, for IntStr at least
which is kind of weird..?
ShimmerFairy m: use nqp; sub foo(num $x) { say $x }; foo(nqp::unbox_n(val("42e0"))) 10:15
camelia rakudo-moar 5a534d: OUTPUT«42␤»
ShimmerFairy psch: if I had the expertise to look into it, I'd try seeing what exactly the whole signature binding business does, and why it fails on allomorphs
psch j: sub foo(num $x) { say $x }; foo(val("42e0")) 10:19
camelia rakudo-jvm 5a534d: OUTPUT«42␤»
psch huh
ShimmerFairy psch: considering the error message exists in MoarVM, I don't find that _too_ surprising :) 10:20
psch ShimmerFairy: well, a similar error message exists in org.perl6.rakudo.Binder...
ShimmerFairy: the surprising bit is that apparently the storage spec seems to differ, because both backends look rather similar in their checking code 10:21
ShimmerFairy sure, I'm just saying that, as a VM-level error message, I'm not surprised to find only one VM with an issue :)
andreoss # grammar Y { token TOP { [<a> | <b> | <c>]+ } { make ... } }
how can I make a ordered list here? 10:22
$/.values>>.made has broken order
psch andreoss: named captures build a hash, you can &sort them by e.g. .pos 10:23
andreoss: oh, i think Match.caps() already does that
psch m: grammar G { token TOP { [$<a>=a | $<b>=b | $<c>=c ]+ { make $/.caps() } } }; G.parse("abaacab").say; 10:25
camelia rakudo-moar c3ba55: OUTPUT«「abaacab」␤ a => 「a」␤ b => 「b」␤ a => 「a」␤ a => 「a」␤ c => 「c」␤ a => 「a」␤ b => 「b」␤»
psch m: grammar G { token TOP { [$<a>=a | $<b>=b | $<c>=c ]+ { make $/.caps()>>.Str } } }; G.parse("abaacab").say; 10:25
camelia rakudo-moar c3ba55: OUTPUT«「abaacab」␤ a => 「a」␤ b => 「b」␤ a => 「a」␤ a => 「a」␤ c => 「c」␤ a => 「a」␤ b => 「b」␤»
psch ...something like that
m: grammar G { token TOP { [$<a>=a | $<b>=b | $<c>=c ]+ { make $/.caps()>>.values } } }; G.parse("abaacab").ast.say; # i suppose 10:26
camelia rakudo-moar c3ba55: OUTPUT«((「a」) (「b」) (「a」) (「a」) (「c」) (「a」) (「b」))␤»
andreoss m: grammar Y { token TOP { ^^ [ <a> | <b> ]+ % \s $$ { make $/.caps()>>.values>>.made } } ; token a { \d+ { make +$/ } }; token b { \w+ { make ~$/ } } ; }; Y.parse("A 1 b 3 c 2").ast.perl.say 10:41
camelia rakudo-moar c3ba55: OUTPUT«($("A",), $(1,), $("b",), $(3,), $("c",), $(2,))␤»
andreoss m: grammar Y { token TOP { ^^ [ <a> | <b> ]+ % \s $$ { make do $_.made for $/.caps()>>.values } } ; token a { \d+ { make +$/ } }; token b { \w+ { make ~$/ } } ; }; Y.parse("A 1 b 3 c 2").ast.perl.say 10:44
camelia rakudo-moar c3ba55: OUTPUT«Method 'made' not found for invocant of class 'List'␤ in block at /tmp/edy3yFPLqk:1␤ in regex TOP at /tmp/edy3yFPLqk:1␤ in block <unit> at /tmp/edy3yFPLqk:1␤␤»
andreoss m: grammar Y { token TOP { ^^ [ <a> | <b> ]+ % \s $$ { make $/.caps()».values.flat».made } } ; token a { \d+ { make +$/ } }; token b { \w+ { make ~$/ } } ; }; Y.parse("A 1 b 3 c 2").ast.perl.say 10:46
camelia rakudo-moar c3ba55: OUTPUT«("A", 1, "b", 3, "c", 2)␤»
andreoss so not obvious 10:48
lizmat .tell jnthn got a diff for grep-index: gist.github.com/lizmat/bc7a10a695d361d94e71 the win does not seem to warrant the code bloat, do you agree? 11:11
yoleaux lizmat: I'll pass your message to jnthn.
dalek kudo/nom: 62a5033 | lizmat++ | src/core/Any-iterable-methods.pm:
Only instantiated Junctions, please
11:15
nine andreoss: if order is important, use .map instead of >> 11:31
andreoss: err...disregard that 11:33
lizmat DrForr++ : blogs.perl.org/users/drforr/2015/09...pdate.html 11:57
DrForr Oh, thanks. 11:58
I figured I was straight enough to write something up. There's lots more of course, but that's best kept off public networks :)
lizmat :-) 11:59
dalek kudo/nom: 1acccc2 | lizmat++ | src/core/Any-iterable-methods.pm:
Make .unique about 2x / 3x faster

2x for pull-one situation, 3x for push-all situations
Ven lizmat++ # great perf. improvements :D 12:03
lizmat: I wonder which kind of abstractions we'll be able to factor out of these classes after some point 12:04
lizmat yeah, it feels it can use a lot of sugar / macro's :-) 12:05
nine Well all those optimizations have in common that they replace the abstracted, generic code with concrete, optimized implementations. So abstracting might be counter productive ;) 12:17
moritz nine: what they all have in common is knowledge about when the end is reached, and how to generate the next value; it's just that avoiding doing that in several method calls is faster 12:21
nine: so there really is something that can be abstracted, and the default Iterator API does it; it just does it with too much overhead 12:22
lizmat I see the following reason: 12:25
map needs to take care of: 1 returning more than one value per iteration, 2. making sure any loop-like phasers are fired
the latter could be fixed, I think 12:26
the former is basically not generically possible
perhaps we need a map that does not fire any loop-like phasers and must take 1 return value per iteration? 12:27
perhaps filter() ? 12:28
nine filter sounds more like grep 12:29
lizmat well, unique is a grep, grep-index is a grep, squish is a grep :-) 12:30
hmmmm....
nine They don't seem to be implemented as grep 12:31
dalek kudo-star-daily: b59e098 | coke++ | log/ (9 files):
today (automated commit)
lizmat no, they weren't, because of grep being implemented in terms of map
that's no longer the case :-) 12:32
nine >(
:)
lizmat turning that last opt into a generic grep, makes it 2x as slow :-( 12:40
lizmat at least :-( 12:41
nine Let's not do that then :) 12:42
lizmat hmmm.... may have a test failure here, double checking 12:43
jnthn afternoon, #perl6 12:46
yoleaux 11:11Z <lizmat> jnthn: got a diff for grep-index: gist.github.com/lizmat/bc7a10a695d361d94e71 the win does not seem to warrant the code bloat, do you agree?
lizmat jnthn o/
ok, between 1.2 and 1.5 times slower :-(
RabidGravy erp
jnthn guesses he has some patches to read...
lizmat: Note that one downside of making grep not be implemented in terms of map is that it'll also no longer be parallelized without further work 12:47
(though maybe you already took care of that and implemented HyperSeq.grep)
lizmat no, I didn't... but will do when I get around to it :-) 12:48
jnthn ok
I will review what's happened in grep
I guess it still supports next/last/redo like map?
lizmat yes, the only spectest breakage is handling regexes directly 12:50
sorry, no, regexes directly is fine
having a regex inside a callable by itself: /a/ is ok, { /a/ } fails, { m/a/ } is ok
[Coke] RT: 1,024; GLR: 4, testneeded: 9; xmas: 108
jnthn { /a/ } is more than a little dubious. 12:51
I'm surprised it worked before
lizmat well, yes, that's why I didn't fix the code or the test
I wasn't sure which one was dubious
jnthn { m/a/ } is fine
Because it means "immediately match against $_" 12:52
lizmat yup
jnthn But { /a/ } means "return a Regex"
lizmat /a/ is also fine, as we have a separate candidate (opt) to handle that
[Coke] m: (2/6).WHAT.say; (2/6).perl.WHAT.say;
camelia rakudo-moar 1acccc: OUTPUT«(Rat)␤(Str)␤»
jnthn And boolifying it will try to match it against...some $_, but you'd be darn lucky if what's in $_ is the right thing
[Coke] m: (2/6).WHAT.say; (2/6).perl.EVAL.WHAT.say;
camelia rakudo-moar 1acccc: OUTPUT«(Rat)␤(Rat)␤»
jnthn So I think .grep({ /a/ }) is bogus, and if it worked it was an accident. 12:53
lizmat ok, then I'll adapt the tests
dalek ast: b8cd2e8 | lizmat++ | integration/advent201 (2 files):
Fix bogus tests wrt to { /a/ }
12:55
lizmat jnthn: theoretical question: if grep is a HyperSeq, and unique is a grep, how would the system know that unique has a global state that doesn't let itself be hypered ? 13:00
jnthn lizmat: It doesn't; we need to review such things and .serial them 13:01
lizmat ok, that's what I thought :-)
jnthn lizmat: Or, better still, to give them a parallel implementation.
lizmat yeah, that would be the consequence of that
jnthn .uniq is a little challening I guess 13:02
jnthn .squish is quite easy 13:02
You just need to be very careful at the join points
lizmat it's unique nowadays :-)
jnthn gah, stop renaming stuff! :P
lizmat well, uniq in unix is squish around here :) 13:03
jnthn True :)
lizmat so I think that made sense :)
pmurias hi 13:15
moritz \o pmurias 13:18
jnthn is looking into the POST regression 13:19
jnthn lizmat: I don't think you need to keep the custom candidate for Junction 13:27
(for grep)
lizmat: I think that it should be a small fix in the grep iterator
Of note, I suspect: 13:28
method BUILD(\list,\test) {
Needs to be Mu \test
lizmat jnthn++ I will test that
jnthn Oh, it's a BUILD
But I think you know where I mean :)
oh, I did copy it...gah, wake up brane! :)
lizmat yeah, all the way through
jnthn Well, variables default to Mu, it's just parameters
(which default to Any) 13:29
moritz also, I think you can optimiize $value ~~ $!test into $!test.ACCEPTS($value) 13:29
lizmat moritz: I seem to recall I tried that, but that it caused spectest failures
but I will check again
carlin m: need Test; Test::ok 1; 13:30
camelia rakudo-moar 1acccc: OUTPUT«Could not find symbol '&ok'␤ in block <unit> at /tmp/bKFqz9j1YQ:1␤␤Actually thrown at:␤ in block <unit> at /tmp/bKFqz9j1YQ:1␤␤»
carlin is it possible to call an exported sub that you didn't export?
*didn't import
jnthn carlin: Only if it declared itself "our" 13:31
You're better off importing. Note that import is lexical in Perl 6, so you can easily control the scope of the import.
moritz carlin: only if you go hunting in the packages EXPORT scope (oh, and don't do that)
dalek kudo/nom: e741fcd | jnthn++ | src/Perl6/World.nqp:
Unbust POST.
13:32
carlin okay, thanks jnthn and moritz
jnthn
.oO( POST no bills about that bug any more... )
[Coke] wonders if all post stuff is working now, testing... 13:36
jnthn [Coke]: Well, pre-post.t is clean (well, as clean as it was before, e.g. nothing unfudged is failing) 13:37
[Coke] ok, there are fudged things in there, so the ticket is still open. danke. 13:38
jnthn I just unbusted the regression, so wasn't expecting anything beyond that.
Anything anyone has that they really want me to look at?
psch m: sub f(int $x) { $x }; f val("42") 13:39
camelia rakudo-moar 1acccc: OUTPUT«Failed to unbox object to integer␤ in sub f at /tmp/xi58JTFI5R:1␤ in block <unit> at /tmp/xi58JTFI5R:1␤␤»
psch m: sub f(int $x) { $x }; f nqp::unbox_i(val("42"))
camelia ( no output )
dalek kudo/nom: 0cd80e4 | lizmat++ | src/core/Any-iterable-methods.pm:
Remove unnecessary Junction candidate

Default for parameters is Any, not Mu. jnthn++ for the pointer
ast: 5015ba2 | coke++ | S04-phasers/pre-post.t:
less forceful fudge
jnthn psch: Hmm 13:40
psch jnthn: ^^^ that seems kinda easy-ish from a distance, and allomorphs still have 1/3rd failures in their test file
on moar that is, jvm jumps between "dies the first test" and "fails 2/3"
depending on my progress and guesses... :)
ShimmerFairy psch: allomorphic.t passes everything for me on moar 13:41
psch ShimmerFairy: oh? my last run on moar was a few days ago, but i doubt you changed anything..? 13:43
ShimmerFairy I did update the test files a bit a couple days ago
psch ah, that might be it i guess
jnthn Do we have a test to cover that native issue?
(Or an RT?)
hm, what the heck is this code doing... 13:45
ah... 13:46
But yeah, I think I see the fix.
m: my $x = 42; sub foo(num $) { }; foo($x) 13:47
camelia ( no output )
jnthn grmbl
m: my $x = 42; sub foo(num $a) { say $a }; foo($x)
camelia rakudo-moar 1acccc: OUTPUT«42␤»
jnthn m: my $x = 42; sub foo(num $a) { say $a.WHAT }; foo($x)
camelia rakudo-moar 1acccc: OUTPUT«(Num)␤»
jnthn m: my $x = 42e0; sub foo(int $a) { say $a.WHAT }; foo($x) 13:48
camelia rakudo-moar 1acccc: OUTPUT«(Int)␤»
jnthn Those should die...
Goblin_ How can i compile perl 6 file to windows executable ? 13:50
jnthn Goblin_: Don't know of a way to do that yet 13:51
Goblin_ How to distribute program? 13:54
moritz same as with Perl 5: as source
and the user must have the compiler installed
DrForr Same way you do in perl5, source ideally packaged in a module like what's on modules.perl.org.
moritz though fat packing would be cool 13:55
(but requires Rakudo and all dependencies to be relocatable)
psch well, there's this half-baked jar-packaging in a branch... 13:56
moritz
.oO( There's Java in the Jar! )
jnthn I expect somebody will build a way at some point to bundle a load of modules up into an executable with the VM linked in 13:57
jnthn is muchly relieved to find that NQP and its tests don't rely anywhere on the magical int/num unbox coercion accident 13:58
psch oh, insight! 13:58
pmurias jnthn: what's that incident about? 13:59
psch the type object that gets passed into add_I from IntStr.new has the proper unbox{Int,Str}Slot values!
...but that'd mean all the other _I ops also need to care for the type..?
jnthn pmurias: The thing I pasted above 14:00
m: my $x = 42; sub foo(num $) { }; foo($x) # should die 14:01
camelia ( no output )
jnthn (Does now locally)
psch unless i can assume the REPRData is populated correctly after new finishes
but there's nothing indicating that it should be
dalek kudo/nom: be46c2e | lizmat++ | src/core/Any-iterable-methods.pm:
Make .grep(Mu) use .ACCEPTS instead of ~~

  moritz++ for the pointer
[Coke] isn't ~~ ACCEPTS under the coversd? 14:08
moritz mostly, yes
but ~~ also topicalizes
[Coke] sees that tools/autounfudge is using the limited perl6 instance (to restrict memory and time) but still seems to get hung up. 14:10
dalek ast: a1c7756 | jnthn++ | S02-types/native.t:
Tests for int/Int->num and num/Num->int args.

Should constrain; in Moar they accidentally coerced. And it seems we had no test coverage for that.
14:11
dalek p: e0fdaee | jnthn++ | src/QAST/Node.nqp:
Tighten up use of natives in QAST dumping.

Also, things end up simpler. This is in anticipation of a MoarVM patch that tightens up int/num native parameters.
14:21
dalek kudo/nom: 49fd469 | jnthn++ | src/Perl6/Actions.nqp:
Make sure we end up with int, not num, here.
14:23
jnthn psch: Seems I've a fix for val passing to a native int/num, testing it doesn't regress anything and adding tests. 14:29
psch jnthn++ 14:30
jnthn I'd better check passing to str works too :) 14:30
[Coke] t/spectest.data has a test last marked "# last to prevent load interference" - -1 - if that test is failing under load, it needs to be fixed, not hidden. 14:34
sjn \o 14:36
lizmat sjn o/
sjn quick question; can I make a subtype of Positional where I'm only allowed to have a certain max amount of elements? 14:37
or something
(e.g. an array where I'm allowed max 8 elements)
jnthn subset Limited of Positional where .elems <= 8 14:38
Or something
But
m: my @a := Array.new(:shape(8)); @a[4] = 42
camelia ( no output )
jnthn m: my @a := Array.new(:shape(8)); @a[8] = 42
camelia rakudo-moar be46c2: OUTPUT«Index 8 for dimension 1 out of range (must be 0..7)␤ in block <unit> at /tmp/mCNnUD0mqc:1␤␤»
jnthn You can already do that, and when I wire up the syntax sugar then it'll be just `my @a[8]`
sjn how would I use that in a signature? 14:39
jnthn Ah, in a sig you'll have to do it with a where for the time being
while .elems < 8
sjn ok
jnthn oops
sjn where*
jnthn where .elems < 8
:)
nine m: subset Limited of Positional where .elems < 8; my Limited $a = [1, 2, 3]; $a.push: $_ for 1 .. 10; say $a.elems; # also .elems is only checked on assignment
camelia rakudo-moar be46c2: OUTPUT«13␤»
nine m: subset Limited of Positional where .elems < 8; my Limited $a = []; say $a ~~ Limited; $a.push: $_ for 1 .. 10; say $a ~~ Limited # funny 14:41
camelia rakudo-moar be46c2: OUTPUT«True␤False␤»
dalek p: 8304e17 | jnthn++ | tools/build/MOAR_REVISION:
Get Moar with native arg fixes.
14:43
[Coke] jnthn: t/spec/S02-types/native.rakudo.moar is failing 50, 52 here.
dalek kudo/nom: ddd2fe6 | jnthn++ | tools/build/NQP_REVISION:
NQP bump for Moar/NQP native param fixes.
14:43
[Coke] ... trying again. :)
jnthn [Coke]: Yeah, I pushed it by accident
[Coke] I assume those last 2 commits fix it?
jnthn [Coke]: Meant to git push in another window, and push the test after the thing I jsut pushed now :) 14:44
dalek ast: 71f348a | jnthn++ | S02-literals/allomorphic.t:
Tests for allomorphs and native parameters.
14:44
jnthn psch: ^^ now passing on Moar; hope that covers what you were meaning :) 14:45
psch jnthn: tbh, i just caught ShimmerFairy++ and Ulti++ discussing the behavior this morning... :)
sjn m: subset Limited of Positional where .elems < 8; sub foo (Limited @myargs) { say "got {@myargs.elems} args" }; foo(1,2,3,4) 14:45
camelia rakudo-moar be46c2: OUTPUT«Too many positionals passed; expected 1 argument but got 4␤ in sub foo at /tmp/ySySsT2Enq:1␤ in block <unit> at /tmp/ySySsT2Enq:1␤␤»
jnthn psch: Well, good to clear it up :) 14:46
sjn not sure what do do here
jnthn OK, that next... 14:47
*what next... :)
psch std: sub f(:\a) { }
camelia std 28329a7: OUTPUT«ok 00:00 138m␤»
psch m: sub f(:\a) { }
camelia rakudo-moar be46c2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4hi5ah4pK3␤Missing block␤at /tmp/4hi5ah4pK3:1␤------> 3sub f(:7⏏5\a) { }␤»
psch that's something that i postponed RTing because RT was really slow at that time 14:48
but i guess that's mostly Perl6::Grammar
jnthn :\a looks...pretty :P
But yeah, makes sense it should work
psch got the idea to try when there was the "is parcel" to "is raw" change 14:49
nine m: subset Limited of Positional where .elems < 8; sub foo (Limited @myargs) { say "got {@myargs.elems} args" }; foo((1,2,3,4))
camelia rakudo-moar be46c2: OUTPUT«Type check failed in binding @myargs; expected 'Positional[Positional]' but got 'List'␤ in sub foo at /tmp/fBjklpqXuM:1␤ in block <unit> at /tmp/fBjklpqXuM:1␤␤»
nine m: subset Limited of Positional where .elems < 8; sub foo (Limited $myargs) { say "got {$myargs.elems} args" }; foo((1,2,3,4))
camelia rakudo-moar be46c2: OUTPUT«got 4 args␤»
nine sjn: ^^^
sjn: Limited @myargs means an Array where each element is a Limited.
sjn it does? 14:50
hm
jnthn sub foo(*@args where Limited) { } # may cut it
[Coke] runs spectest with TEST_JOBS=50 for grins. 14:51
dalek kudo/nom: abb9712 | lizmat++ | src/core/Any-iterable-methods.pm:
Make .unique(:as) about 1.5x faster

There is little point in optimising the cases with a :with parameter, as the bottleneck there is the use of first() to check identity.
nine sjn: my Int $foo; # $foo should obviously be an Int; my Int @foo; # @foo should almost as obviously contain Ints 14:52
ilmari m: subset Limited of Positional where .elems < 8; sub foo(*@args where Limited) { say "got {@args.elems} args" }; foo(1..3); foo(1..9)
camelia rakudo-moar be46c2: OUTPUT«got 3 args␤Constraint type check failed for parameter '@args'␤ in sub foo at /tmp/c58rugr1hW:1␤ in block <unit> at /tmp/c58rugr1hW:1␤␤»
dalek kudo/nom: 564a255 | coke++ | t/spectest.data:
Add these already passing tests to spectest
[Coke] S04-statements/lift.t appears to be a conjectural test that refers to something that no longer exists. 14:54
Can I kill it?
ah. RT #124579 was rejected, but the test wasn't deleted. Killing test.. 14:55
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124579
lizmat [Coke]:: also spec commit eb0f21689e70b3280745 14:56
"This is going away in favor of better parameter declarations that can implicitly default to operators as seen by the caller."
dalek ast: 0a0e339 | coke++ | S04-statements/lift.t:
Lift was unspecced. Removing test file

RT #124579
14:57
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124579
TimToady wanted to close a couple of tickets last night but doesn't have the RT charm to do that yet 15:06
jnthn [Coke]: Do you have admin access to fix ^^? :) 15:07
zostay m: sub f(*@a) { @a.say }; f('a' => 1, 'b' => 2, 'c' => 3); f(a => 1, b => 2, c => 3);
camelia rakudo-moar 49fd46: OUTPUT«[a => 1 b => 2 c => 3]␤Unexpected named parameter 'a' passed␤ in sub f at /tmp/oXPl6sok4E:1␤ in block <unit> at /tmp/oXPl6sok4E:1␤␤»
jnthn zostay: If you want to capture named params into a hash, there's *%h 15:08
zostay right, i'm just trying to understand the nuances of when an arg is a Pair and when an arg is a named parameter 15:09
jnthn zostay: Whenever there's an identifier to the left of the => it's a named arg 15:10
TimToady basically it comes down to whether there's a bare identifier
and :foo is always considered bare
zostay that makes sense to me, thx
TimToady and has to be at the arg level, so parens are also hiding 15:11
jnthn m: say uniname(0x7F) 15:12
camelia rakudo-moar 49fd46: OUTPUT«DELETE␤»
jnthn m: say 0x7F
camelia rakudo-moar 49fd46: OUTPUT«127␤»
TimToady shoulda been named RUBOUT :)
jnthn Just looking into the missing <.print> and <.graph> in regexen 15:13
zostay cool beans, now that Pair has been refactored to handling binding, i am making KnottyPair obsolete and removing it
jnthn TimToady: iiuc, <.print> is the same as <-cntrl>?
TimToady that's at least a good first approximation 15:15
jnthn Ah, Perl 5's re docs have a different definition
"All printable characters, which is the set of all graphical characters plus those whitespace characters which are not also controls." 15:16
And
(graphical is defined as)
"Any character that is graphical, that is, visible. This class consists of all alphanumeric characters and all punctuation characters."
jnthn leaves print as "not control" for now, and makes graph annum + punct 15:18
timotimo jnthn: i realize people keep piling things onto your plate; how do you feel about investigating the chaining of flattening in the perl6 optimizer or the nfa to statelist thing branch? :| 15:19
jnthn m: say nqp::iscclass(nqp::const::CCLASS_PUNCTUATION, '_', 0)
camelia rakudo-moar 49fd46: OUTPUT«1␤»
jnthn timotimo: Chaining of flattening? 15:21
The NFA thing...I know that at some point I need to deal with the fact that our NFAs don't quite get NFG right, so probably something to poinder when I get to that. 15:22
timotimo jnthn: the optimizer has a flag that signifies "was this block flattened?" that gets passed to "incorporate_inner", but it's never set to 1 15:23
jnthn Oh, *that* kind of flattening 15:24
timotimo when i set it to 1 after flattening the block, it causes problems: a QAST::Var that gets turned from lex to local inside a block that's far removed from where i'd've expected it, and it breaks because the var wasn't defined in that block
jnthn apparently still has the GLR swapped in... :)
timotimo right, i should have disambiguated immediately :) 15:25
TimToady let's not overload "flat" any further
timotimo we should call executables that contain modules and scripts and such "flat", too 15:26
jnthn TimToady: Yeah, though thankfully this one's in the bowels of the optimizer only :)
timotimo so, i thought there's some kind of oversharing and the one thing i recalled that shares qast nodes across large distances was build_inline_info, but that's not at fault here 15:28
jnthn ooh yay, seems I get to remove the last fudge marks from stdrules.t. 15:30
[Coke] TimToady: you should be a bug admin now. 15:31
timotimo if not, bug admins now
[Coke] (please be sure to cc the mailing list when replying to tickets via the webterface, which is pretty much the only advice I give to people answering tickets. :)
TimToady okay 15:32
nine [Coke]: what mailing list? 15:37
timotimo perhaps rakudobug@ ? 15:37
dalek p: bf1d2ad | jnthn++ | src/QRegex/Cursor.nqp:
Implement <.print> and <.graph> rules.
hoelzro o/ #perl6 15:39
dalek ast: ba45802 | coke++ | S05-syntactic-categories/new-symbols.t:
Add refs to RT #126142
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126142
[Coke] perl6-compiler - it's one of the options when replying to a ticket via the webterface, to cc the mailing list. 15:40
dalek kudo/nom: c43ac75 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for <.print>/<.graph>.
jnthn [Coke]: Isn't that the default?
[Coke] the mailing list gets the initial email ona ticket, but the default is not to cc them on comments later.
so, no.
jnthn I see a 15:41
TimToady it's a single click to do it though
jnthn Bcc: [email@hidden.address]
[Coke] jnthn: yes. you have to click to enable it.
jnthn I'd been assuming that meant it was mailing the list... :S
TimToady the bullet is misleading
TimToady it looks like a clicked button 15:41
[Coke] adds a NYI ticket.
jnthn I see this in the Recipients section, though?
TimToady it didn't send my last message when I forgot to click 15:42
but this time it did
dalek ast: cafa204 | jnthn++ | S05-mass/stdrules.t:
Unfudge tests for <.print> and <.graph>.
15:43
jnthn There's an easy one off my "stuff before xmas" list :) 15:44
[Coke] r: use Test; ok(" a b\tc" ~~ m/@<chars>=( \s+ \S+ )+/, 'Named simple array capture');
camelia rakudo-moar 564a25: OUTPUT«===SORRY!===␤QAST::Block with cuid cuid_1_1443023098.31053 has not appeared␤» 15:45
..rakudo-jvm 564a25: OUTPUT«===SORRY!===␤setcodeobj can only be used with a CodeRef␤»
jnthn TimToady: Please can you at some point make a ruling on rt.perl.org/Ticket/Display.html?id=67128 ?
[Coke] ^^ that's at least LTA, but should that work?
dalek kudo/nom: 3970634 | lizmat++ | src/core/Str.pm:
Oops, we need an if instead a while here

  timotimo++ for spotting. No noticeable performance difference, though
15:47
jnthn [Coke]: I...think so, yeah
m: multi foo(:$d!, *@f) {}; multi foo(*@f) { say "works" }; foo()
camelia rakudo-moar 564a25: OUTPUT«works␤»
jnthn m: multi foo(*@f, :$d!) {}; multi foo(*@f) { say "works" }; foo()
camelia rakudo-moar 564a25: OUTPUT«Ambiguous call to 'foo'; these signatures all match:␤:(*@f, :$d!)␤:(*@f)␤ in block <unit> at /tmp/Ck5R19Bsbw:1␤␤»
jnthn std: multi foo(:$d!, *@f) {}; multi foo(*@f) { say "works" }; foo()
camelia std 28329a7: OUTPUT«Potential difficulties:␤ @f is declared but not used at /tmp/rT08h6Drfz line 1:␤------> 3multi foo(:$d!, *7⏏5@f) {}; multi foo(*@f) { say "works" }; ␤ok 00:00 140m␤»
jnthn std: multi foo(:$d!, *@f) {}; multi foo(*@f) { say "works" }; foo() # OK shut up about unused crapp STD 15:48
camelia std 28329a7: OUTPUT«Potential difficulties:␤ @f is declared but not used at /tmp/NwpdpWFw_3 line 1:␤------> 3multi foo(:$d!, *7⏏5@f) {}; multi foo(*@f) { say "works" }; ␤ok 00:00 141m␤»
jnthn std: multi foo(:$d!, *@f) {}; multi foo(*@f) { say "works" }; foo() # OK
camelia std 28329a7: OUTPUT«Potential difficulties:␤ @f is declared but not used at /tmp/KO9jaF8oLB line 1:␤------> 3multi foo(:$d!, *7⏏5@f) {}; multi foo(*@f) { say "works" }; ␤ok 00:01 141m␤»
jnthn std: multi foo(:$d!, *@f) {}; multi foo(*@f) { say "works" }; foo() #OK
camelia std 28329a7: OUTPUT«ok 00:00 141m␤»
jnthn *sigh*
One feature Rakudo will NOT be borrowing from STD...
timotimo :D
jnthn std: multi foo(*@f, :$d!) {}; multi foo(*@f) { say "works" }; foo() #OK
camelia std 28329a7: OUTPUT«ok 00:01 141m␤»
jnthn Hm, so you can order things that way
lizmat m: (^10).grep( { .say } ).grep( { last } ) # did this work pre-GLR (as in only say 0 ?) 15:52
camelia rakudo-moar 564a25: OUTPUT«0␤»
lizmat if not, yeah GLR :-) 15:53
jnthn lizmat: I think it should have worked pre-GLR
lizmat star: (^10).grep( { .say } ).grep( { last } ) 15:54
camelia star-m 2015.03: OUTPUT«0␤»
jnthn Though I'm sure it works more efficiently nowadays :)
lizmat ok, but it still workd now :-)
jnthn wonders if there's a test for that :)
lizmat well, one could wonder whether they should live in roast 15:55
as laziness is really optional, no?
jnthn Yes, I think those semantics are something one should be able to rely on 15:56
jnthn I mean, for $*IN.lines.grep(/a/) { last if /b/; } 15:56
jnthn We don't expect it to swallow ahead on the filehandle there 15:56
In fact, we'd be rather upset if it did :) 15:57
dalek ast: 442a23d | coke++ | S05-capture/array-alias.t:
Add note for RT #126143
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126143
jnthn So I think such semantics are required by the language.
(And so are a good thing to roast)
lizmat ok, time to write some tests, then
as I think these are most definitely, not tested yet
dakkar hmm. I have a class with a «submethod DESTROY { }» that serialises some state; what's the best way to test that it works? 15:58
in other words, how do I trigger object destruction?
lizmat from Perl 6, you can't
dakkar (or am I thinking too much like perl5 / c++ here?)
lizmat: I feared such a response :)
lizmat you can never be sure that your DESTROY method will be called
dakkar not at all? not even at process termination? 15:59
timotimo correct
lizmat especially not at process termination
dakkar argh
so I have to *explicitly* tell my objects to save themselves? :(
lizmat well, there are things like LEAVE phasers
and will leave 16:00
jnthn And END still exists
lizmat my $object will leave { $object.save }
my $object will leave { $object.save } = Class.new
dakkar eh. conceptually, to me, that's the "wrong" place to say it
why should the caller have to know that the object is caching state to disk?
it could (in my case) just rebuild the state every time 16:01
it's an implementation detail, inside the class
lizmat dakkar: I think we will find some syntactic sugar for will leave in the future 16:02
lizmat but I don't think that will be before Christmas :-( 16:02
dakkar I'm not objecting to the syntax
lizmat I understand your point...
dakkar if, when creating an object, I want to attach some code to "when this name goes out of scope", «will leave» is fine
I'm trying to solve a slightly different problem… 16:03
lizmat I've been looking at making a "use Class" in a scope make magic happen to variables with objects of that type leaving that scope
it's hard :-)
dakkar if it weren't hard, it would have been done already :)))) 16:04
looks like you people have already solved all the easy and medium problems
moritz there are still a lot of low-hanging fruits in Perl 6 land
lizmat cycling& 16:06
jnthn dakkar: If we wanted to keep timely destruction of objects in Perl 6 then we'd pretty much be forced to do ref counting, which is (a) not good for concurrency, and (b) would rule out running on things like the JVM 16:07
dakkar I understand that
it's the part where DESTROY may not be called at all that worries me
dalek rl6-roast-data: 272b4a7 | coke++ | / (8 files):
today (automated commit)
dakkar I have no issues with "it will be called at some point between last-ref-goes-away and global destruction"
moritz maybe we should have a way to signal "always do a global destruction at exit" 16:08
[Coke] pmurias: what can I do to fix the nqp-js builds on hack?
TimToady which an embedding interface would turn on by default
jnthn Trouble is, even if we do manage to find a way to make that happen on, say, MoarVM, it'll only be setting you up for bug reports about misbehavior on JVM et al. 16:09
TimToady: Yes, embedding is where we'd want to find a way, though note that "free all memory" != "call all DESTROYs"
jnthn We could arrange for the latter too, or a decent approximation. 16:10
[Coke] psch: you're working on jvm, aye? currently 1432 failing tests. 16:11
jnthn Darn, fixing RT #118467 - or at least the first attempt - caused a small number of odd regressions. 16:12
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=118467
[Coke] 63 failures on moar-jit and moar-nojit.
psch [Coke]: yeah, i'm still working on the IntStr stuff
[Coke] (not on my os x box, but on hack)
psch++
TimToady jnthn: yeah, I've noticed lately that fixing one corner case tends to light up several others :/ 16:13
jnthn TimToady: Why didn't we just design a really simple language like Java where there aren't enough features for corner caess? ;) 16:14
TimToady because it wasn't there!
jnthn :)
psch checked vs unchecked exceptions, native arrays vs object arrays...
i'll admit, javas corners are rounded and padded :) 16:15
jnthn Apparenlty it's time to ponder dinner :) Will continue hunting later. :) 16:16
pmurias [Coke]: do you have a stack trace of the builds failing? 16:24
pmurias [Coke]: or do you mean how to we make the version of nqp-js the evalbot automatically rebuilt? 16:26
[Coke] not evalbot, my daily runs. one sec.
github.com/coke/perl6-roast-data/b...y.out#L120 16:27
pmurias checks 16:28
[Coke]: it's an issue with building the node.js module we use to implement nqp::sleep 16:31
pmurias [Coke]: while googling the error message someone seems to suggest that it's the fault of the debian node.js package 16:33
pmurias and using a nodesource node.js fixes that 16:33
[Coke] ok. verified this is debian. How does one do that last thing? 16:34
TimToady hmm, the message cc'd to p6c doesn't mention the state change
[Coke] nope. for bonus points, you need to say "so I'm resolving/rejecting/whatever" in the comment. :| 16:35
the originator of the ticket gets an email on the state chagne.
pmurias [Coke]: I'm not sure, I'm a lousy sysadmin and I don't have root on hack (and likely shouldn't :) ) 16:38
psch github.com/RobertCNelson/omap-imag.../issues/61 has <npm install -g npm> as workaround for that error 16:42
[Coke] that page also says, "This is not a good idea". :) 16:46
I'll leave this to moritz. :)
psch oh, i must've overlooked that 16:47
TimToady actually, I find it kind of reassuring that my fan backs off during S17; means we're sleeping and not busylooping 17:03
liztormato dakkar: if you don't mind objects hanging around until global destruction, it would be trivial to put objects of a class in an array to be used to execute DESTROY on in an END block 17:05
PerlJam liztormato: sounds like someone could write a role/module just for that purpose too. 17:10
liztormato Yeah. Will prototype when I get home unless someone beats me to it 17:11
jnthn back for a little bit 17:39
nine liztormato: Inline::Perl5 does something similar with the first object 17:42
jnthn m: multi foo(*@x where True) { }; foo(1,2) 17:58
camelia ( no output )
jnthn m: multi foo(*@x where True) { say @x }; foo(1,2)
camelia rakudo-moar 397063: OUTPUT«[1 2]␤»
jnthn m: multi foo(*@x where @x) { say @x }; foo(1,2) 17:59
camelia rakudo-moar 397063: OUTPUT«[1 2]␤»
jnthn The move.t and rename.t spectest fails after my multi patch are pretty odd 18:16
[Coke] S32-io/move.t was -just- added. 18:18
it passed here, so I added it. might not have been passing for you yet.
(rename.t is from May, no such luck there.)
jnthn Oh... 18:20
FROGGS[mobile] o/ 18:21
hello from a bus
[Coke] Hello, bus, I'm dad. 18:22
jnthn Huh, rename.t is unhappy without my patches too
psch o/ FROGGS[mobile] 18:22
[Coke] ship it!
FROGGS[mobile] bus it! 18:23
jnthn runs a fresh spectest to make sure his fix for the real regression is really fine enough :) 18:25
TimToady m: constant @digs = flat (0..9 xx *) X% 10; 18:32
camelia rakudo-moar 397063: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QtHfi3cEDg␤An exception occurred while evaluating a constant␤at /tmp/QtHfi3cEDg:1␤Exception details:␤ Earlier failures:␤ Cannot .elems a lazy list␤ in block at /tmp/QtHfi3cEDg:1␤␤ Final …»
TimToady that's...not so good 18:33
jnthn What tries to .elems, I wonder... 18:34
TimToady m: constant @digs = (|(0..9) xx *) X% 10;
camelia ( no output )
TimToady flat?
FROGGS[mobile] why should it? 18:35
jnthn I can't imagine why .flat would.
Well, or flat
TimToady handle-begin-time-exceptions from the trace 18:36
patrickz Is there any initiative or plan to get a CPAN lookalike (CPAN as in a Website where one can browse modules, look at documentation and a store where versioned modules can be put) up and running by 6.christmas? 18:36
[Coke] patrickz: I doubt that will happen, no.
TimToady no, that's after, I guess
[Coke] work is being done to take advantage of the PAUSE infrastructure. 18:37
FROGGS[mobile] patrickz: I've got such a dream, but I'm not working on that bit this year I fear
jnthn *sigh* Gah, now I've managed to make a couple of spectests hang with the fix :/ 18:38
TimToady m: constant @digs = ((0..9 xx *) X% 10).flat;
camelia rakudo-moar 397063: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E9qpH898eb␤An exception occurred while evaluating a constant␤at /tmp/E9qpH898eb:1␤Exception details:␤ Earlier failures:␤ Cannot .elems a lazy list␤ in block at /tmp/E9qpH898eb:1␤␤ Final …»
patrickz It's neither decided whether it'll be CPAN that's adapted or a separate platform, is it?
FROGGS[mobile] it kinda is 18:39
patrickz no CPAN?
[Coke] PAUSE looks very likely. CPAN is more than just the website, though.
I suspect the website is not going to be done before christmas, no.
FROGGS[mobile] as most of us dont expect that either search.cpan.org or metacpan will Mix P5 an P6 stuff 18:40
TimToady m: constant @digs = ((0..9 xx *) X% 10).WHAT;
camelia rakudo-moar 397063: OUTPUT«5===SORRY!5=== Error while compiling /tmp/StJIjX20Kc␤An exception occurred while evaluating a constant␤at /tmp/StJIjX20Kc:1␤Exception details:␤ Earlier failures:␤ Cannot .elems a lazy list␤ in block at /tmp/StJIjX20Kc:1␤␤ Final …»
patrickz I have read something on ShimmerFairies blog that CPAN is fundamentaly incompatible with Perl6s versioning schema.
TimToady curious
[ptc] m: my @files = find(:dir("/tmp"), :type("file")); say @files; say @files.WHAT
camelia rakudo-moar 397063: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DplRL7tSFu␤Undeclared routine:␤ find used at line 1␤␤»
pink_mist my personal expectation is that metacpan will make a p6.metacpan.org site for p6
[Coke] patrickz: as far as I know, that's not the case. 18:41
[ptc] m: use File::Find; my @files = find(:dir("/tmp"), :type("file")); say @files; say @files.WHAT
camelia rakudo-moar 397063: OUTPUT«===SORRY!===␤Could not find File::Find in any of:␤ file#/home/camelia/.perl6/2015.09-95-g3970634/lib␤ inst#/home/camelia/.perl6/2015.09-95-g3970634␤ file#/home/camelia/rakudo-inst-2/share/perl6/lib␤ file#/home/camelia/rakudo-inst-2/share/perl…»
patrickz is looking that up
[ptc] bother...
[Coke] no one at metacpan is going to do that on their own, I'm sure.
anyway, yes, it'd be great to have. Probably won't be by christmas.
[ptc] patrickz: I had a discussion with Andreas König at the Austrian Perl Workshop about that last year, and it seems that Perl6 modules can be uploaded without problems; only Perl5 modules get indexed 18:42
patrickz: however, afaict it was planned to have Perl6 modules on CPAN
patrickz rdstar.wordpress.com/2014/03/09/perl6-and-cpan/ 18:43
[ptc] come to think of it, FROGGS[mobile] probably knows more about thaty
*that
FROGGS[mobile] we can upload stuff via PAUSE, yes 18:44
so we make use of their mirrors, and author registrations 18:45
FROGGS[mobile] patrickz: we have our own distribution indexer running on cpan already btw 18:46
patrickz Ignoring the website for now, I think it'd be great to have the module platform efforts point in one single direction by christmas, to make sure Perl6 will end up with one single most famous place for modules to be put. (And not end up with a fractured ecosystem like Java or Android)
TimToady oh, duh, 0..9 xx * is a precedence problem 18:48
FROGGS[mobile] patrickz: there can be a douzen sites that use the same data from cpan, mind 18:49
dalek kudo/nom: cf3439c | jnthn++ | src/core/List.pm:
Add missing .cache in flat slurpy handling.

Needed if we end up doing a bind check in a multi-dispatch. Has been a potential issue for a while, but an upcoming multi-dispatch tweak made a spectest show up this problem.
18:52
kudo/nom: f2488e7 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Multi-dispatcher shouldn't ignore all beyond **@x.

There may be extra, required, named arguments beyond it that serve as a tie-breaker.
ast: d35c69e | jnthn++ | S06-multi/positional-vs-named.t:
Unfudge tests for RT #118467.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=118467
jnthn Finally...
FROGGS[mobile] jnthn++ 18:53
patrickz I'm fine with that (there is CPAN/MetaCPAN after all). But having documentation looking different and having to use different installation strategies for two modules is time-consuming and annoying. That's one of the features I like so much about Perl. Go to MetaCPAN, find the fitting module, and look at the synopsis at the top of the page. Happyness. :-)
FROGGS[mobile] patrickz: the site showing dists is independend from your dist installer anyway 18:55
jnthn TimToady: From S11: "Any proto declaration that is not declared my is exported by default. Any multi that depends on an exported proto is also automatically exported. Any autogenerated proto is assumed to be exported by default." Do we still want those semantics? 18:58
TimToady: Especially as "my" is now the default for any routine declaration.
FROGGS[mobile] I envision a shop like page btw, that allows to create profiles like "dev-laptop", and install the dists of that profile 18:59
patrickz Compare that to Java. Documentation for Tomcat is different from documentation for Guava. They start to converge on Maven Central. But some time ago one had to add separate repository links for nearly every library one wished to depend on. 19:00
FROGGS[mobile] like the app-/playstore remembers what you've bought to ease reinstallation
FROGGS[mobile] eww 19:01
FROGGS[mobile] docs are Pod shipped with the dist, there should be no trouble 19:03
patrickz Once Pod6 hits PrimeTime. :-) Go ShimmerFairy! 19:04
Until then there is README.md...
FROGGS[mobile] jnthn: pollut\Wexport something by default? I'd say no 19:05
patrickz: well, the web page renders it
it might be less fun to read locally 19:06
same goes for markdown though
patrickz True. I can't blame WIP of documentation of modules on markdown I guess.
jnthn FROGGS[mobile]: Yes, my gut feeling is "I'd think we maybe don't want that feature any more", in which case I can remove that bit from the design docs, close the RT, and we're another issue before Christmas down. :) 19:07
RabidGravy all my modules just have pod no actually documentation in the README
rindolf Hi all. Sup?
jnthn But will hold fire in case TimToady++ feels different :)
FROGGS[mobile] :o) 19:08
rindolf: supper'sup
almost at least
rindolf FROGGS[mobile]: bon appetit. 19:09
FROGGS[mobile] thanks :o) 19:10
TimToady jnthn: we can get rid of it 19:11
jnthn TimToady: Will do :) 19:13
dalek ecs: bab6c34 | jnthn++ | S11-modules.pod:
Remove language on auto-export of protos.

It probably made more sense before we settled on lexical scoping for resolving routine calls and `my` as the default routine scope. Today, less so.
19:15
FROGGS[mobile] language? 19:19
CurtisPoe p6: class Point { has Rat $.x; has Rat $.y }; my $p = Point.new(x => 5.0,y => 3.0); say $p.x 19:19
camelia rakudo-moar 397063: OUTPUT«5␤»
rindolf So my rakudobrew solution to that Project Euler problem used to run in under a second, and after the latest rakudobrew update it started running at 1.2s. 19:20
CurtisPoe Question: if I must pass “5.0” instead of “5” for the Rat, why does it print a value it can’t accept?
A clearer example: 19:21
p6: my Rat $x = 5.0; print $x
camelia rakudo-moar 397063: OUTPUT«5»
CurtisPoe p6: my Rat $x = 5; print $x; # boom 19:22
camelia rakudo-moar 397063: OUTPUT«Type check failed in assignment to '$x'; expected 'Rat' but got 'Int'␤ in block <unit> at /tmp/tmpfile:1␤␤»
pink_mist p6: print my Rat $x = 5.0; #shorter example
camelia rakudo-moar 397063: OUTPUT«5»
pink_mist anyway, I'd guess it's because that's how it stringifies
FROGGS[mobile] because .Str is not .perl
it is not meant to roundtrip 19:23
CurtisPoe I know it’s not meant to round-trip, but it seems odd that we now display to people values that we cannot use in the program. 19:24
jnthn Do you expect us strings to not need quoting too? 19:25
s/us//
CurtisPoe jnthn: The quotes aren’t part of the string :)
Since Int/1 is guaranteed to always hold true, I was arguing that having ‘my Rat $foo = 3’ be allowed. Most did not agree, but seeing that “disallowed 19:26
But seeing that “disallowed” value in the output was odd.
jnthn Heh, fine, if you can argue that then I can argue that the .0 isn't part of the value, and also just needed to make it clear we're writing a Rat literal :P 19:27
FROGGS[mobile] stringifying something is very much known to be a lossy transformation
CurtisPoe If we’re going to be consistent, it seems like Rats should stringify to have a decimal place.
FROGGS[mobile] how does this apply to other things, say, a Match? 19:29
skids m: now.Str.say; 19:33
camelia rakudo-moar f2488e: OUTPUT«Instant:1443036825.257303␤»
skids m: Instant:⏏1443036775.442184;
camelia rakudo-moar f2488e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/z8taWeCKdI␤Confused␤at /tmp/z8taWeCKdI:1␤------> 3Instant:7⏏5⏏1443036775.442184;␤ expecting any of:␤ colon pair␤»
skids m: Instant:1443036775.442184;
camelia rakudo-moar f2488e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TGvoTYusAZ␤Confused␤at /tmp/TGvoTYusAZ:1␤------> 3Instant:7⏏051443036775.442184;␤ expecting any of:␤ colon pair␤»
[Coke] m: my Rat $x = 5.0; say $x.perl; 19:59
camelia rakudo-moar f2488e: OUTPUT«5.0␤»
[Coke] ^^ that is expected to roundtrip.
.gist is not. 20:00
m: my $a = (1..10023423).flat; say $a.perl;
m: my $a = (1..1002).flat; say $a.perl; 20:01
camelia rakudo-moar f2488e: OUTPUT«(timeout)»
rakudo-moar f2488e: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, …»
[Coke] gist is, for better or worse, lossy.
[Coke] (btw, CurtisPoe, I agree with your request - Rats should be able to take literal Ints and DTRT. I was hoping masak could explain -why- the type system ended up in a way that didn't let that happen, but I'm not sure that ever came through.) 20:02
TimToady but as for print round trippng, that's what .perl is for 20:04
m: say 5.0.perl
camelia rakudo-moar f2488e: OUTPUT«5.0␤»
TimToady notice that one puts the .0
CurtisPoe Thanks, Coke. I never did here a counter-example of why ‘my Rat $foo = 2’ is bad. There was discussion about performance in hot code, but that was the only convincing argument (to me) :) 20:05
TimToady we might be able to intuit a Rat() type rather than a Rat type, but we don't even implement Rat() there on assignment yet, and that's considered post 6.0 anyway 20:06
unless someone who is not jnthn sneaks in an implements coercive assignment :) 20:07
jnthn It's not a performance thing. I need to go sleep, but I can probably explain 3 or 4 ways we could make `my Rat $x = 3` "work", and why they all make things worse than the status quo, and thus why things won't be chaning. 20:08
But...tomorrow... 'night
TimToady o/
speaking of which, never et lunch... & 20:09
CurtisPoe ‘night jnthn 20:11
zacts CurtisPoe: are you ovid? 20:12
or an ovid wannabe? :-P
if you are ovid, I like your beginning perl book.
CurtisPoe Yes, I’m Ovid :)
zacts coolio! :-)
CurtisPoe But that nick is apparently taken.
zacts ah I see
anyway, cool. I can't wait for this hopeful release of Perl 6 this winter 20:13
CurtisPoe Quick question: if you had to name the top 3 benefits the average programmer will get from Perl 6, what would it be? (I think subsets, the OO model, and working concurrency in a dynamic language (though the latter might not be for the average programmer)) 20:17
lizmat CurtisPoe: remember that concurrency may be hidden in junctions and >> hypers 20:19
so average programmers may be using concurrency (I should say: async features) without knowing it
pink_mist what about perl6's infinite list features? 20:21
vendethiel today learned that "F[2;3]" worked in APL 20:26
they didn't use * tho, only M[;3] if they wanted to skip the 1st one :P
dalek osystem: e6f1f9a | Carlin++ | META.list:
Add UNIX::Privileges
20:27
[Coke] CurtisPoe: yah, Coke was also taken. :P 20:54
CurtisPoe That sentence, out of context, makes Perl 6 hackers seem dangerous :) 20:55
[Coke] wonders if there's anythign to rescue from his APL grammar on parrot.
cognominal CurtisPoe: you forgot first class Unicode support with NFG. Also, grammars bring in the support of OO for regexen. This gives a new dimension to the motto : only perl can parse Perl because the lexer and parser are written in Perl. Perl 6 brings string handling to a higher level, leapfrogging all the languages that have copied Perl 5. 20:56
carlin m: my $x = now; EVAL($x.perl) 20:57
camelia rakudo-moar f2488e: OUTPUT«===SORRY!===␤Cannot find method 'compile_time_value'␤»
carlin m: my $x = now; say $x.perl
camelia rakudo-moar f2488e: OUTPUT«Instant.new(<1176079147668/815>)␤»
cognominal rubyists are dangerous too with their rails.
carlin m: <1176079147668/815> 20:57
camelia rakudo-moar f2488e: OUTPUT«===SORRY!===␤Cannot find method 'compile_time_value'␤»
carlin Is that known? (or somehow expected?) 20:58
[Coke] not expected. 20:59
please open a ticket via [email@hidden.address] 21:00
[Coke] commutes 21:00
psch m: <2147483647/8> 21:03
camelia ( no output )
psch m: <2147483648/8>
camelia rakudo-moar f2488e: OUTPUT«===SORRY!===␤Cannot find method 'compile_time_value'␤»
psch carlin: did you rakudobug that yet? 21:04
apparently not, according to "sort by created"
carlin psch: working on it now 21:05
psch carlin: ahh, alright, i'll abort then 21:05
psch carlin: i suspect 2**31 - 1 working and 2**31 not is a hint :) 21:05
lizmat .tell jnthn should the COMPOSE phaser be in nope or not? 21:06
yoleaux lizmat: I'll pass your message to jnthn.
lizmat .tell jnthn or maybe some way to export something into a class that will get run when a class is "finalized" at compile time 21:07
yoleaux lizmat: I'll pass your message to jnthn.
lizmat .tell jnthn thinking about something like class A is reaped {} to make objects run their DESTROY at global destruction 21:09
yoleaux lizmat: I'll pass your message to jnthn.
psch # Looks like you planned 93 tests, but ran 45 21:11
# Looks like you failed 7 tests of 45
that's it for today for allomorphic.t
i'm gonna push getBI/makeBI, cause the rest seems to come from somewhere else... 21:12
carlin bug sent, including psch++'s hint 21:15
apotheon CurtisPoe: Hi. 21:15
apotheon waits to see if CurtisPoe even remembers him. 21:18
dalek p: 97a0490 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Fix a comment.
21:21
p: 7190914 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/ (2 files):
Fix getBI and makeBI again, differently this time.

For Rakudos IntStr, we have to rely on the target type to get the right unboxIntSlot, because for some reason the LHS already comes with the same REPR but different REPRData. It works for now, but I can imagine cases where it would stop working - I'm not sure how likely these cases are to occur, though.
travis-ci NQP build failed. Pepe Schwarz 'Fix getBI and makeBI again, differently this time. 21:25
travis-ci.org/perl6/nqp/builds/81859185 github.com/perl6/nqp/compare/bf1d2...90914a1985
psch sighs 21:25
psch travis, you don't even build nqp-j 21:25
dalek kudo/nom: 1247986 | peschwa++ | tools/build/NQP_REVISION:
Bump NQP_REVISION

Get a probably durable enough implementation of getBI and makeBI for IntStr.
21:29
psch it keeps happening though
all the last few times i pushed an nqp commit travis complained /o\
Zefram_Fysh carlin: your bug is already in RT as [perl #126103] 21:33
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126103 21:34
Zefram_Fysh there are a couple of followups to RT tickets that I've sent to [email@hidden.address] (replying to messages from RT) and they haven't shown up in RT. followups that I send manually to [email@hidden.address] do show up. are the followups to the former address lost, or merely being delayed? 21:49
lizmat my replies to [email@hidden.address] arrive back at the mailing list, so I would expect to see them at some point 21:51
Zefram_Fysh do they show up in the RT web interface too? 21:53
lizmat afaik they do 21:54
Zefram_Fysh will wait a bit then
dalek kudo/nom: 747c69f | lizmat++ | src/core/Any-iterable-methods.pm:
Make .squish()/.squish(:with) about 2.5x faster
22:08
dnmfarrell does Perl 6 have an equivalent of P5's "select"? I'm thinking for checking whether a socket will block or not when read 22:54
pink_mist why not do it async instead? attach a Supply and whenever it 22:58
dnmfarrell ah well because I want to build a multiplexer :)
pink_mist no need, that's already in the language =) 22:59
dnmfarrell: www.youtube.com/watch?v=JpqnNCx7wVY please see this excellent talk on the topic by jnthn++
dnmfarrell thanks for the link, is there a particular part of that talk that discusses multiplexing? I don't want to watch an hour long video if possible 23:01
dalek ast: 4841832 | thundergnat++ | S06-advanced/return.t:
Add tests for RT #126049, remove faulty test that didn't catch it.

Add tests for RT #126049. Remove faulty test. String comparison on arrays with empty elements leads to tears... or bugs, at least.
23:02
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126049
pink_mist I ... would haveto rewatch it myself to be able to say :P
and that'd take an hour :P
lizmat 6guts.wordpress.com/2015/09/23/updates/ # jnthn++ 23:03
geekosaur would appreciate language materials that are not videos, btw 23:07
dalek kudo/nom: 88c191b | lizmat++ | src/core/Any-iterable-methods.pm:
Make .squish(:as)/squish(:as,:with) 1.5..2x faster

The fact that for each value, a block needs to be called, dampens the optimization fun here.
geekosaur (Being that videos and I are increasingly incompatible)
pink_mist geekosaur: well there are the excellent slides for that talk too =) 23:08
lizmat would appreciate finding people willing to make such materials
pink_mist geekosaur: you can find them on the link lizmat++ posted =)
lizmat goes to bed
so good night, #perl6!
pink_mist goog night, lizmat 23:09
pink_mist dnmfarrell: alright, so it's basically from the 18 minute mark until a few minutes before the 40 minute mark 23:50
dnmfarrell pink_mist: I'm at 41:57 right now :D 23:51
pink_mist haha alright :P
pink_mist hope it was enlightening =) 23:52
dnmfarrell Yeah I'm enjoying it! But ... here's the issue: if you try to read from a socket and it's empty, it blocks. So what I want is way to check socket before I read from it. I'm not sure this helps with that problem. 23:52
dnmfarrell Or maybe I'm not thinking about it in the right way 23:53
geekosaur async lets you have a bunch of threads that block on reads but collect their output as it becomes available? 23:54
this is how most languages that aren't C or Perl5 handle it 23:55
pink_mist doc.perl6.org/type/IO::Socket::Async have a look at this maybe?
dnmfarrell pink_mist: thanks, I'd overlooked that 23:58