Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-07-17

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 timotimo oh yes! i made it work!
00:02 timotimo the diff is scary-small. but i didn't put the changes to the perl6 script in yet
00:03 timotimo someone needs to do the equivalent changes for windows
00:05 timotimo oh my, the create-jvm-runner script is daunting
00:07 TimToady rn: say map { $_.substr(0, *-2) => $_.substr(1) }, <foo bar>;
00:07 camelia niecza v24-88-g1f87209: OUTPUT«Unhandled exception: Unable to resolve method substr in type Any␤  at /tmp/3AMUsXB1zx line 1 (ANON @ 4) ␤  at /tmp/3AMUsXB1zx line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting l…
00:07 camelia ..rakudo 45fb1b: OUTPUT«"f" => "oo" "b" => "ar"␤»
00:09 TimToady rakudo (and niecza) should be recognizing the implicit reference to $_ by .substr, methinks
00:09 timotimo hey TimToady. froggs and me were discussing wether or not <-[@arr]> should throw "null regex not allowed" if @arr happens to be empty; or wether or not <-[]> should throw that, too.
00:15 mst joined #perl6
00:15 TimToady what makes you think you can interpolate an array there?
00:16 TimToady btw, S04:1639 on the issure of .substr implying use of $_ to suppress hash composing
00:16 synopsebot Link: http://perlcabal.org/syn/S04.html#line_1639
00:17 timotimo froggs suggested i could
00:17 timotimo i didn't know better :)
00:17 TimToady <-[abc]> treats abc as a list literal chars, so <-[@arr]> would match @, a, or r
00:18 TimToady should probably warn on the duplicate r too
00:18 timotimo okay, that's sensible
00:19 Pleiades` joined #perl6
00:19 TimToady nr: say "I am an @array!".comb(/<-[@arr]>/)
00:19 camelia rakudo 45fb1b, niecza v24-88-g1f87209: OUTPUT«I   m   n   y !␤»
00:19 TimToady nr: say "I am an @array!".comb(/<-[@arr]>/).join
00:19 camelia rakudo 45fb1b, niecza v24-88-g1f87209: OUTPUT«I m n y!␤»
00:21 timotimo depart&
01:40 FROGGS_ joined #perl6
01:54 BenGoldberg joined #perl6
02:20 Ben_Goldberg joined #perl6
02:25 BenGoldberg joined #perl6
02:25 btyler joined #perl6
02:45 skids joined #perl6
02:53 OuLouFu joined #perl6
02:57 Pleiades` joined #perl6
03:00 PacoAir joined #perl6
03:04 PacoAir joined #perl6
04:29 Psyche^ joined #perl6
04:50 birdwindupbird joined #perl6
05:09 Woodi joined #perl6
05:47 SamuraiJack joined #perl6
06:45 kaleem joined #perl6
06:49 FROGGS_ TimToady: is /<-[]>/ supposed to throw a "Null regex not allowed" ?
06:58 avuserow joined #perl6
06:58 iSlug joined #perl6
07:09 jtpalmer_ joined #perl6
07:09 anocelot joined #perl6
07:09 rhr joined #perl6
07:11 FROGGS joined #perl6
07:20 iSlug joined #perl6
07:20 iSlug joined #perl6
07:26 sqirrel joined #perl6
07:59 domidumont joined #perl6
08:05 Rotwang joined #perl6
08:06 daxim joined #perl6
08:07 benabik joined #perl6
08:08 fhelmberger joined #perl6
08:23 berekuk joined #perl6
08:23 donaldh joined #perl6
08:23 fhelmberger joined #perl6
08:24 domidumont joined #perl6
08:25 berekuk joined #perl6
08:26 mathw o/
08:30 fhelmberger joined #perl6
08:34 dakkar joined #perl6
08:34 fhelmberger joined #perl6
08:35 dayangkun joined #perl6
08:39 JimmyZ hello
08:40 moritz \o JimmyZ, mathw, *
08:41 mathw lo moritz, JimmyZ
08:47 DrEeevil joined #perl6
08:48 robins joined #perl6
08:49 Myk267 joined #perl6
08:50 donaldh joined #perl6
09:13 hoelzro holy crap do I love Perl 6 regexes.
09:14 hoelzro that is all.
09:18 mathw :)
09:25 hoelzro does Parcel not support {}?
09:26 hoelzro I'd like to extract a sub-sub-match ($<timespec><hours><value>)
09:30 hoelzro (here's the source code: https://gist.github.com/hoelzro/6019135)
09:31 donaldh joined #perl6
09:34 moritz Parcel is purely positional
09:35 moritz hoelzro: note that rakudo is behind the time here (more)
09:35 moritz <hours>?
09:35 moritz that's a quantifier
09:35 moritz so rakudo, by old spec, generates a List (or Parcel) of matches here
09:35 moritz new spec says that ? is special cased, and create a sub-Match right away
09:35 hoelzro but it *should* be generating something that supports {}?
09:36 moritz that's what I'm just telling you
09:36 hoelzro <hours>? doesn't mean "optionally match the hours regex"?
09:36 moritz it does
09:36 moritz so it's a 0 or 1 quantifier
09:36 hoelzro oh, ok
09:36 hoelzro good
09:36 moritz and it used to be that all quantifiers generated lists
09:36 hoelzro I see
09:37 hoelzro soo...I have to access sub-sub-matches by index, then?
09:38 moritz $<hour>[0]<your submatch here>
09:39 hoelzro I see
09:42 moritz and if you change the ? to a **0..1 then your code won't break when rakudo adapts to the new specs
09:42 hoelzro hmm
09:43 hoelzro so under the new specs, how will it change? just $<hour><value>?
09:46 FROGGS ? is not a list quantifier anymore... it was changes in march or april in nqp/rakudo
09:49 FROGGS nr: say "abc" ~~ /$<hour>=[ \w ]?/ # there is no zero as a key
09:49 camelia rakudo 45fb1b, niecza v24-88-g1f87209: OUTPUT«「a」␤ hour => 「a」␤␤»
09:49 FROGGS nr: say "abc" ~~ /$<hour>=[ \w ]**0..1/ # compared to this
09:49 camelia rakudo 45fb1b, niecza v24-88-g1f87209: OUTPUT«「a」␤ hour => 「a」␤␤»
09:49 FROGGS ?
09:53 eternaleye joined #perl6
09:54 FROGGS r: my regex value { \w }; my regex hour { <value>**0..3 }; "abc" ~~ /<hour>?/; say $<hour>[0] # this shows it
09:54 camelia rakudo 45fb1b: OUTPUT«(Any)␤»
09:54 FROGGS r: my regex value { \w }; my regex hour { <value>**0..3 }; "abc" ~~ /<hour>**0..1/; say $<hour>[0] # this shows it
09:54 camelia rakudo 45fb1b: OUTPUT«「abc」␤ value => 「a」␤ value => 「b」␤ value => 「c」␤␤»
09:55 FROGGS but I am curious why this doenst give an array:
09:55 FROGGS r: "abc" ~~ /$<hour>=[ \w ]**0..1/; say $<hour>[0]
09:55 camelia rakudo 45fb1b: OUTPUT«(Any)␤»
09:57 FROGGS r: "abc" ~~ /$<hour>=[ \w ]**0..1/; say %<hour> # rakudobug me thinks
09:57 camelia rakudo 45fb1b: OUTPUT«「a」␤␤»
09:57 FROGGS r: "abc" ~~ /$<hour>=[ \w ]**0..1/; say @<hour> # rakudobug me thinks
09:57 camelia rakudo 45fb1b: OUTPUT«「a」␤␤»
09:57 FROGGS r: "abc" ~~ /$<hour>=[ \w ]**0..1/; say &<hour> # rakudobug me thinks
09:57 camelia rakudo 45fb1b: OUTPUT«「a」␤␤»
09:57 FROGGS std: "abc" ~~ /$<hour>=[ \w ]**0..1/; say &<hour> # rakudobug me thinks
09:57 camelia std c2215f0: OUTPUT«ok 00:01 46m␤»
09:59 hoelzro is there a builtin for executing an external command? like Perl 5's system()?
10:00 FROGGS r: qx(`ls`)
10:00 camelia rakudo 45fb1b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse expression in argument list; couldn't find final ')'â�¤at /tmp/zDnqVAWTnI:1â�¤------> [32mqx([33mâ��[31m`ls`)[0mâ�¤    expecting any of:â�¤        argument listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤Â»â€¦
10:00 FROGGS r: qx(ls)
10:00 camelia rakudo 45fb1b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routines:â�¤    ls used at line 1. Did you mean '&lc'?â�¤    qx used at line 1â�¤â�¤Â»
10:00 FROGGS hmmmm
10:00 hoelzro without slurping output?
10:02 FROGGS r: run("ls")
10:02 camelia rakudo 45fb1b: OUTPUT«run is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub run at src/RESTRICTED.setting:8␤  in block  at /tmp/xwo8PhhFni:1␤␤»
10:02 FROGGS hoelzro: ^^
10:02 hoelzro ah, thanks!
10:02 FROGGS my qx() was bogus, it a sub call
10:10 berekuk joined #perl6
10:20 grondilu joined #perl6
10:21 grondilu How can I use a variable as a quantizer?  my $k = 2; say "foo" ~~ / o ** $k /; # does not work
10:23 FROGGS grondilu: NYI
10:23 grondilu ahh, too bad :/
10:24 timotimo it's not much of a consolation, but you can create a new regex each time with eval or you can put an assertion after it that asks for the right amount :|
10:24 FROGGS r: my $k = 2; say eval "'foo' ~~ / o ** $k /"; # :/
10:24 camelia rakudo 45fb1b: OUTPUT«「oo」␤␤»
10:31 * grondilu used that ^
10:32 * timotimo is cobbling together a "make install" target for jvm
10:43 Bzek joined #perl6
10:48 donaldh timotimo: I started looking at that too.
10:48 timotimo oh, how far along were you?
10:48 timotimo i'm able to execute the "perl6" script from anywhere now
10:49 tadzik AWW YISS
10:49 timotimo but it doesn't look into install/ and i'm pretty sure not everything that should be in there is yet
10:49 jnthn afternoon o/
10:49 donaldh timotimo: Updated ConfigureJVM.pl and started updating Makefile-JVM.in
10:50 timotimo oh, what did you hav eto do in ConfigureJVM.pl?
10:50 donaldh timotimo: absolute path references to nqp_prefix and reusing create_jvm_runner to put a runner with absolute paths in install/
10:50 jnthn timotimo: Note that (if you didn't already) NQP has a different runner in the build directory and in the install
10:50 donaldh jnthn: tho the need for differences is less in rakudo.
10:51 bruges joined #perl6
10:51 donaldh I wrote create_jvm_runner to be reusable when we need an install target.
10:51 jnthn OK, works for me :)
10:51 dmol joined #perl6
10:51 timotimo an important part of the whole thing was this patch: https://gist.github.com/timo/3976562cdf50eb045d98
10:51 donaldh timotimo: I guess you figured out how to get perl6 to work outside of build dir, yes?
10:51 timotimo yes, i did
10:51 donaldh blib needs to be on classpath
10:52 timotimo yes, but not only that
10:52 timotimo you also need --setting=$PREFIX/CORE
10:52 timotimo otherwise it won't find the setting
10:52 donaldh jnthn: any reason for using -Xbootclasspath/a ?
10:53 jnthn donaldh: Yes.
10:53 jnthn donaldh: Avoids an indy bug... :S
10:53 donaldh oh
10:54 donaldh I've been running core setting build from within Eclipse just using a normal classpath.
10:54 timotimo the classpath doesn't enter into it
10:54 timotimo oh, maybe the patch i linked above makes it work? hold on.
10:55 timotimo nope. it doesn't look in the right place unless you specify it
10:55 donaldh timotimo: I updated ConfigureJVM.pl to change $config{'nqp_prefix'} to an absolute path with Cwd::realpath
10:56 timotimo note that you have to actually execute some code like say "hi" in order for it to try to load the core setting
10:56 donaldh yep
10:57 timotimo and you were able to make it work without a --setting?
10:57 donaldh not sure, building
10:57 timotimo does the nqp_prefix actually land somewhere in the code itself?
10:58 timotimo otherwise i don't know how that's supposed to help
10:58 donaldh nqp_prefix gets substituted into NQP_PREFIX in the Makefile
10:58 donaldh Then when we create a jvm runner, it will include absolute paths to the NQP jars.
10:59 timotimo ah. yes, in my experience that's not enough
10:59 timotimo i'll point you at a bit of code, hold on
10:59 donaldh timotimo: I'm not saying it is enough :-) just that it's necessary
11:00 timotimo ah. yes indeed.
11:00 timotimo so, find_setting in ModuleLoaderVMConfig will look at the search paths, which default to . and blib/
11:00 timotimo with the patch i linked to above, it will also look into all the classpaths
11:00 donaldh I'm assuming that we don't want to copy the NQP references into rakudo install dir. After all, they are likely to be the same PREFIX.
11:01 timotimo so it's enough to add that patch i have above and add the absolute path to the directory that the .setting.jar is in to the classpath
11:01 timotimo that's right
11:01 * donaldh wonders if using a PERL_HOME property would be better than overloading the classpath.
11:02 timotimo all you need to do to fix that is change vm_search_path in ModuleLoaderVMConfig.nqp and change the ModuleLoader to look there, too, for all the other things
11:03 timotimo you seem to be more knowledgable about this topic, so i'll gladly let you go ahead and propose a pull-request :)
11:03 donaldh :)
11:05 pecastro joined #perl6
11:05 timotimo if you have any more questions about my setup just let me know
11:05 * donaldh wonders if we can reduce the duplication between ModuleLoader.nqp (nqp) and ModuleLoaderVMConfig.nqp (rakudo)
11:06 timotimo well, the VMConfig gets mixed into the ModuleLoader
11:07 timotimo oh, er
11:07 timotimo i should probably have read the part in the parens :)
11:10 * donaldh gets confused by the duplicate filenames
11:11 donaldh timotimo: I'll propose a pull request later today. Will use your patch to vm_search_paths for now.
11:12 timotimo cool! :)
11:12 timotimo tadzik: have you been experimenting on panda on rakudo.jvm so far?
11:13 * donaldh wonders where we should put CORE.setting.jar in the install dir
11:14 tadzik timotimo: not yet. How could I have run it without being able to run perl6 outside of rakudo directory? :)
11:16 timotimo massive cheating :)
11:16 timotimo copy all the contents of the rakudo directory into every directory that will ever be your cwd :)
11:17 tadzik aww :)
11:18 jnthn donaldh: The install directory may well need some more structure than it has today :)
11:19 donaldh jnthn: indeed
11:19 donaldh :)
11:19 jnthn Segregating .jars produced from NQP and those produced from Perl 6 code would be one way, since that's where the module loader boundaries are...
11:24 donaldh Is lib used for Perl 6 generated jars and blib for nqp generated jars ?
11:25 timotimo no
11:25 timotimo i don't think jars should go in lib
11:25 jnthn No, lib is Perl 6 source code for some modules that we include
11:25 timotimo doesn't "blib" mean "binary libs" or something?
11:25 timotimo as in "compiled"
11:25 moritz it does
11:25 jnthn oh...seems we do end up putting the jar in there too
11:25 timotimo yeah, we do:(
11:25 jnthn blib is where the compiler goes, though
11:26 jnthn Perl6::Grammar's JAR, etc.
11:26 donaldh tho afaik we never add lib to a search path
11:26 cognominal joined #perl6
11:28 jnthn Right, -Ilib is used
11:28 donaldh ah, I see, in t/harness
11:28 jnthn Note that on Parrot we have https://github.com/rakudo/rakudo/blob/nom/src/vm/parrot/ModuleLoaderVMConfig.nqp#L2 and on JVM there's not an equivalent thing so far, iirc.
11:29 jnthn That is, adding a couple of search paths based on install location.
11:30 donaldh Okay, so should I look at the parrot layout and replicate that?
11:31 jnthn Perhaps somewhat, but note that we don't need to do all that complexity
11:32 jnthn For one, I don't think we need the version thing (which exists because bytecode is not compatible between Parrot versions, whereas JVM bytecode is stable).
11:32 jnthn But yeah, some kind of bin/ and lang/nqp/... and lang/perl6/... could work out.
11:33 * donaldh notes that nqp install dir does not have bin/
11:35 jnthn donaldh: Right, it's all flat today
11:36 amkrankruleuen joined #perl6
11:36 amkrankruleuen joined #perl6
11:36 donaldh I'll scrape around for tuits for an nqp patch too.
11:37 donaldh Am assuming that nqp and perl6 will likely end up in the same install PREFIX.
11:38 jnthn I think it's that way today on Parrot, at least.
11:39 donaldh do we have the equivalent of parrots %conf on JVM ?
11:39 colomon joined #perl6
11:40 jnthn There's an nqp::jvmproperties() op, iirc
11:41 timotimo indeed, we currently use that to get the java.class.path, no?
11:41 benabik joined #perl6
11:42 FROGGS donaldh: https://github.com/MoarVM/MoarVM/commit/6b55554fc397af21a2897e743544ccf8abe9f5eb
11:42 FROGGS that is for uname though
11:43 donaldh thx
11:45 donaldh well there's nqp::jvmclasspath and nqp::jvmgetproperties - cool.
11:45 JimmyZ jnthn: ping
11:45 * jnthn is investigating the wrap.t failure at the moment
11:45 jnthn JimmyZ: pong
11:46 JimmyZ jnthn: what's different between assignunchecked and assign? I can't see the difference in the codes
11:46 * moritz would guess that assign does a type check, and assignunchecked doens't
11:46 jnthn What moritz said.
11:46 jnthn Also rw check.
11:47 * JimmyZ didn't see the typecheck
11:47 jnthn Which container impl were you looking at?
11:47 jnthn They look different in Rakudo.
11:47 jnthn They probably don't for code_pair
11:47 JimmyZ jnthn: nqp on parrot
11:48 moritz I guess nqp doesn't do type checks on variables
11:48 moritz (only on routine calls)
11:48 moritz so they would be identical
11:48 JimmyZ well, I see they in 67-container.t
11:49 jnthn Well, nqp doesn't have scalar containers either really :)
11:49 jnthn code_pair is what is used to implement Rakudo's Proxy type.
11:49 JimmyZ the test has assignunchecked and assign
11:50 JimmyZ so I'm confused
11:50 jnthn It's checking both ops exist, but I'm guessing for code_pair it isn't looking for them to behave differently.
11:50 timotimo hm. how do i apply a role { method IS_NODAL { True } } into a method from nqp code? i can't just $codeobj.HOW.mixin($codeobj, role { ... }), can i?
11:50 jnthn See container.c in Rakudo for an example where things differ.
11:51 jnthn timotimo: Well, if you do that you mix in an NQP role...when it probably should be a Perl 6 one.
11:51 timotimo indeed
11:51 jnthn timotimo: But don't do it this way
11:52 jnthn timotimo: I think we should keep it just as an integer flag on the routine.
11:52 timotimo maybe i should give Routine or perhaps Method an is_nodal
11:52 jnthn timotimo: We already have an int $!rw. But that only needs one bit; we can use that field more smartly as a general routine flags one.
11:52 timotimo i do that in BOOTSTRAP.pm i guess?
11:52 jnthn Yeah, could do.
11:52 timotimo ah. i can surely multipurpose that field
11:53 moritz (and rename it in the process)
11:53 timotimo yeah
11:53 timotimo and make extra sure it doesn't check for field-is-non-null where it should mask it first
11:53 jnthn yeah, it's checked in C code in some places (and Java code too) I think
11:54 JimmyZ jnthn:     PMC *target = decontainerize(interp, $1); in set_invocation_spec and set_container_spec, Is it useless? Sorry, I'm a bit confused too...
11:54 JimmyZ :(
11:54 moritz why would it be useless?
11:55 moritz if you do something like   my $x = sub () { }; $x()
11:55 moritz it'll try to invoke the container
11:55 timotimo jnthn: i probably should define a name for the bit mask constants; where would i put something like that?
11:55 moritz so you need to decontainerize to get the actual code object
11:55 JimmyZ moritz: because I'd not see target was used there
11:56 JimmyZ hmm, I just see the java one, it looks like not be used
11:57 moritz PMC *target = decontainerize(interp, $1);
11:58 moritz if ($1->vtable->base_type == smo_id) {
11:58 rindolf joined #perl6
11:58 moritz it should probalby use target instead of $1 here
11:58 JimmyZ the jvm backend didn't use decontainerize
12:00 JimmyZ moritz: if so, there will a example code to explore this bug?
12:12 jnthn timotimo: You'll probably need to do 'em separately in the C/Java as well as in the NQP code...
12:12 jnthn timotimo: There's no "constant" decl in NQP just yet.
12:14 timotimo OK
12:14 timotimo what string do i have to search for to find mention of the rw field in the c and java code?
12:14 timotimo because just rw doesn't give me any of that
12:15 jnthn ->rw in the C code, perhaps
12:15 jnthn $!rw in the Java code
12:16 timotimo i'll have a few looks, thanks!
12:17 * JimmyZ waits for jnthn++'s answer
12:18 jnthn JimmyZ: The use of $1 instead of target looks like a thinko; otoh, it's probably not likely we'll hit the issue...
12:18 timotimo there's a HINT_ROUTINE_RW, can i safely replace that with HINT_ROUTINE_FLAGS? i put the flags field in the very same spot the rw one was in in the bootstrap code
12:18 jnthn timotimo: yes
12:19 timotimo good
12:19 JimmyZ jnthn: so you'd like to remove that line?
12:20 jnthn JimmyZ: We can do.
12:20 JimmyZ good, thanks very much
12:20 jnthn grr...wrap.t has multiple different ways to go wrong, it seems
12:21 * jnthn did fix one of them and is up to test 30 now...
12:22 [Coke] parrot release away.
12:22 timotimo jnthn: did you read the comments about invokedynamic? how much invokedynamic is in rakudo.jvm so far? because a friend of mine is working on this alternative jvm called "avian" that is currently able to run scala and if we get rid of invokedynamic (which is supposedly broken beyond repair at the moment anyway) we could try to get it to run on that as well :)
12:23 moritz huh, invokedynamic is broken?
12:23 jnthn timotimo: I did some benchmarks while adding invokedynamic, and it did help.
12:23 timotimo in java 7, it's usually slower than using reflection manually
12:24 jnthn timotimo: However, some usages of it that I'd expected might be faster were not, so it takes some care to work out where it helps or doesn't...
12:24 jnthn timotimo: It's almost certainly gonna have to improve in the next JDK 'cus they're using it for Java 8 lambdas.
12:24 timotimo i hear they are going for a complete rewrite of invokedynamic
12:25 jnthn Yes, my understanding was they were doing a re-implementation, but same API.
12:25 * timotimo hopes a full spectest will bring any issues with the $!rw to $!flags rewrite to light
12:25 timotimo yes, indeed
12:25 jnthn I believed it was fairly far along, though.
12:27 timotimo i don't know about the status of it
12:29 ajr joined #perl6
12:32 * timotimo is pleasantly surprised
12:34 konundra joined #perl6
12:35 timotimo if someone mixes in a role that is "is nodal", it shouldn't infect the class, right?
12:36 timotimo Conjecture: we can assume is nodal on methods declared in a class that is Iterable, to save having to mark every method as nodal. Or we provide a pragma within a lexical scope that assumes is nodal, so we can use it inside Any as well  -  so i've marked Any as nodal, does that suffice? i'm not 100% sure about the "is Iterable" part of that definition
12:37 jnthn I think it's Iterable itself that'd need marking as "is nodal"
12:37 jnthn Oh, maybe Any too...
12:38 jnthn timotimo: I think that we want to apply the nodality to methods at composition time.
12:38 jnthn timotimo: oh, hm...
12:38 timotimo i put the code to do it into add_method of MethodContainer
12:38 jnthn timotimo: Any doesn't want the marker to inherit, while Iterable does...
12:39 timotimo i thought that problem would be solved with the proto thing, where if a proto is declared in an "is nodal" it should be nodal, but if a subclass that's not nodal re-implements it, it shouldn't be
12:39 timotimo but i may be hallucinating.
12:39 timotimo anyway
12:39 timotimo > say (<a b c>, <d e f>)».elems
12:39 timotimo 3 3
12:39 timotimo > say (<a b c>, <d e f>)».[0]
12:39 timotimo a d
12:40 timotimo \o/
12:41 moritz \o/ indeed!
12:44 timotimo in a few secs it'll work with hashes, too
12:45 PacoAir joined #perl6
12:46 benabik joined #perl6
12:48 timotimo say { "A" => (1, 2, 3), "B" => (5, 6, 7) }>>.[0]  =>  ("A" => 1, "B" => 5).hash
13:00 jnthn Got all but the last 2 tests of wrap.t passing :)
13:01 dalek roast: 643ab0e | (Timo Paulssen)++ | S02-lexical-conventions/unspace.t:
13:01 dalek roast: add a test for unspace between function and arguments
13:01 dalek roast: review: https://github.com/perl6/roast/commit/643ab0e168
13:01 FROGGS jnthn: same for me with bigint.t :o)
13:02 timotimo ossum :)
13:02 jnthn Fixed S14-traits/routines.rakudo.jvm also
13:02 FROGGS swagger
13:02 timotimo was about to ask if that 1 failure was my fault :D
13:07 timotimo oh. should Block get a nodal method, too?
13:07 timotimo r: say Routine.^mro
13:07 camelia rakudo 45fb1b: OUTPUT«(Routine) (Block) (Code) (Any) (Mu)␤»
13:07 * tadzik listens to Swagger
13:07 colomon joined #perl6
13:07 timotimo i suppose i should move it up from Routine into Block, no? perhpas even into Code?!
13:08 timotimo can a block be marked nodal?
13:08 timotimo doesn't seem to make much sense
13:10 jnthn No, think it's Routine level
13:10 timotimo good. i'll add a nqp::can guard to the exploding code.
13:11 jnthn +1
13:12 timotimo should Positional be nodal, too, i wonder?
13:12 timotimo er, associative i mean
13:20 dalek nqp: 937f6e4 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/IndyBootstrap.java:
13:20 dalek nqp: Fix invocant-unshift handling.
13:20 dalek nqp:
13:20 dalek nqp: Was exposed by wrap.t, but could have come up in a variety of ways.
13:20 dalek nqp: review: https://github.com/perl6/nqp/commit/937f6e4383
13:20 dalek rakudo/nom: 5e36364 | jnthn++ | src/Perl6/Metamodel/Dispatchers.nqp:
13:20 dalek rakudo/nom: Add missing decontainerize.
13:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5e36364717
13:22 colomon jnthn++
13:27 dalek roast: 4ffb15f | jnthn++ | integration/error-reporting.t:
13:27 dalek roast: Rakudo JVM fudge updates.
13:27 dalek roast: review: https://github.com/perl6/roast/commit/4ffb15f81a
13:31 timotimo n: my @a = ( { key => "val" }, { key => "val" },{ key => "val" } ); say @a>>.<key>;
13:31 camelia niecza v24-88-g1f87209: OUTPUT«Unhandled exception: Cannot use hash access on an object of type Str␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 355 (Any.at_key @ 9) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/OTeHg9ObIm line 0 (ANON @ …
13:32 timotimo looking for suggestions for things to test for nodality
13:37 timotimo i marked Parces "is nodal", is that sensible? seems sane to me at least.
13:39 timotimo https://github.com/timo/rakudo/compare/nodal - would be interested in a review
13:49 skids joined #perl6
13:52 bluescreen10 joined #perl6
13:55 rindolf joined #perl6
13:57 * colomon thinks JVM must be getting very close to 99% now....
13:58 benabik joined #perl6
14:00 timotimo it should, yeah
14:00 FROGGS well, it already was at 98.51%
14:02 [Coke] I didn't see any improvement from the post-run commits yesterday, though I might have made a mistake during the run manually
14:02 timotimo huh, when was that?
14:03 colomon I'm showing us up ~90 passing tests since yesterday
14:04 * colomon just discovered the comment "THIS IS A TESTING HACK!!!!!" in his shipped production code.  :(
14:04 [Coke] colomon: including the commits from this morning?
14:04 colomon [Coke]: yes
14:05 colomon but I'm not sure exactly when yesterday my reference run was
14:06 [Coke] r: say (25794 + 90) + 26183 # 90 more than yesterday?
14:06 [Coke] r: say (25794 + 90) / 26183 # 90 more than yesterday?
14:06 [Coke] that's 98.85
14:06 camelia rakudo 45fb1b: OUTPUT«52067␤»
14:06 camelia rakudo 45fb1b: OUTPUT«0.988580␤»
14:06 [Coke] need 38 more to crack 99
14:09 moritz what's the Unicode character that folks use in tags of their Perl 6 talks?
14:09 moritz ah
14:09 moritz .uni 蝶
14:09 moritz .u 蝶
14:09 yoleaux No characters found
14:10 moritz oh, and is it correct that YAPC EU speakers don't have to pay any conference fees (and thus don't have to buy a ticket)?
14:12 * moritz just booked flight and hotel
14:12 jnthn moritz: Yes, provided you're giving a full-length talk
14:12 jnthn moritz: (e.g. non-lightning)
14:12 jnthn moritz: http://act.yapc.eu/ye2013/price/index.html
14:13 timotimo what'll your talk be about, moritz? :)
14:15 moritz exceptions and error reporting
14:16 timotimo cool. that contains the "user-oriented stacktrace" you came up with ~half a year ago?
14:16 * moritz must prepare slides :-)
14:16 moritz timotimo: yes
14:16 timotimo i like that :)
14:17 moritz and I plan to talk a bit about the culture
14:17 moritz "LTA error? bug!"
14:22 timotimo just yesterday i bragged about that fact to my local functional programmer's meetup group
14:24 xilo joined #perl6
14:25 timotimo sub foo does business-as("frobbing the data")  -  looks pretty good :)
14:26 [Coke] https://github.com/mame/quine-relay ... wow.
14:26 moritz or maybe  sub foo() is reponsible-for('frobbing the data') { }
14:27 [Coke] (quine) no perl6, but does include pasm
14:27 btyler joined #perl6
14:27 FROGGS [Coke]: yeah, but it is a bit scary too
14:27 timotimo oh, that's even nicer
14:28 moritz well, from a compiler writer's perspective it's not all too scary
14:28 moritz you need two things
14:28 moritz 1) a way to write a quine in one language, and have it do whatever you want
14:28 moritz 2) know how to encode strings in each language, and print to STDOUT
14:29 moritz and then you can go backwards, and generate the code for each stage
14:29 timotimo can you encode unary numbers into the amount of languages the quine goes through before it does something special?
14:29 moritz hm, but that doesn't quiet tell you to make it quine in the end
14:34 benabik joined #perl6
14:36 dalek roast/nodal_tests: 5e6d3e1 | (Timo Paulssen)++ | S03-metaops/ (2 files):
14:36 dalek roast/nodal_tests: nodal-hyper.t: first bunch of nodality tests
14:36 dalek roast/nodal_tests: review: https://github.com/perl6/roast/commit/5e6d3e109f
14:37 timotimo https://github.com/rakudo/rakudo/pull/180 - i started a discussion-pullrequest for nodality
14:39 timotimo https://github.com/rakudo/rakudo/pull/178 - this is ready to merge as well (the nqp ops in questioon have been in nqp for 5 days as well)
14:42 dalek rakudo/nom: ffe7588 | (Timo Paulssen)++ | src/core/IO.pm:
14:42 dalek rakudo/nom: use nqp::file{read,writ,execut}able/fileislink on parrot and jvm
14:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ffe758805d
14:42 dalek rakudo/nom: 62b50c0 | (Tobias Leich)++ | /:
14:42 dalek rakudo/nom: Merge pull request #178 from timo/rwxl_nqp_ops
14:42 dalek rakudo/nom:
14:42 dalek rakudo/nom: use nqp::file{read,writ,execut}able/fileislink on parrot and jvm
14:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/62b50c02e4
14:43 timotimo thank you :D
14:43 mucker joined #perl6
14:43 FROGGS timotimo: somebody else should decide about #180 though...
14:44 timotimo yes, i was asking for a discussion, rather than an immediate merge (there really ought to be a bit you can set to make that clear)
14:44 FROGGS yeah, and I cant even discuss about it :P
14:44 mucker quick query, I want to develop a forthish langhage. Can I go for nqp ?
14:44 FROGGS well, actually I could but it wouldn't be more than babbling
14:45 moritz mucker: having thought about it for 10 seconds, I don't see a big obstacle
14:45 moritz but that doesn't mean too much
14:46 mucker moritz: C bindings are the only problem I see
14:46 moritz you might need some cleverness wrt argument passing, because the stack isn't exposed directly
14:46 jmpy joined #perl6
14:47 colomon forth doesn't need argument passing… just make an array that acts as The Stack and you should be good, I'd reckon.
14:47 timotimo rakudo offers pretty good NativeCall reprs, so i suppose you could copy a bit of what rakudo does for your forth-ish language
14:47 mucker timotimo: that's great !
14:48 timotimo (disclaimer: i don't actually know much except that our nativecall module is really nice)
14:48 mucker if it works may i'll put it for julython
14:50 jnthn NativeCall in Rakudo is a language sugar layer; the primitives for C interop are in nqp :)
14:50 FROGGS (and it really is sweet)
14:51 mucker how is the jvm branch ?
14:51 FROGGS mucker: 98.5%+
14:52 mucker awesome
14:52 timotimo https://github.com/rakudo/rakudo/pull/173  -  wait, this isn't merged yet?
14:52 FROGGS I'm not sure though how well nativecall is yet
14:52 timotimo i thought it was!
14:52 * timotimo investigates
14:52 timotimo yeah, it was.
14:53 jnthn arnsholt++ is working on NativeCall support for NQP on JVM.
14:53 jnthn mucker: It's not a branch these days, either. :)
14:53 timotimo i wonder why github didn't notice.
14:54 mucker jnthn: can you make a gh-pages branch. I can contribute some notes there ?
14:57 donaldh jnthn: do you know if arnsholt has committed anything for NativeCall support on JVM ?
14:59 donaldh jnthn: also, does it make sense to refactor Ops.java into multiple files before it gets any bigger?
14:59 donaldh e.g. FileOps, NativeCallOps, etc.
15:03 jnthn mucker: gh-pages?
15:03 jnthn donaldh: Not sure, but I think when I last talked with him about it, the native call ops were gonna go off in a separate file.
15:03 mucker jnthn: in github every project can have a static website in gh-pages branch
15:07 notjack joined #perl6
15:08 arnsholt donaldh: In my (stealth) branch, I'm making a NativeCallOps.java
15:09 donaldh arnsholt: stealth as in fork ?
15:09 donaldh arnsholt++
15:10 arnsholt Nah, just an unpushed branch
15:10 donaldh :)
15:10 arnsholt It's all a bit unstructured and ugly ATM, so I'm keeping it unpushed
15:10 * FROGGS .oO( ahh sssss push it )
15:10 FROGGS meh
15:10 FROGGS :o)
15:10 arnsholt I'll push it once I have something that works a tiny bit
15:11 jnthn mucker: Hm, we don't currently have docs there though, and it's probably not good to start putting them in two different places.
15:20 kaare__ joined #perl6
15:20 hoelzro is there a way in Actions install_method to determine what "kind" of method is being installed?
15:20 hoelzro ex. regex, rule, method, submethod, etc
15:21 FROGGS .WHAT should tell you, no?
15:22 FROGGS rr: say (my regex { \w }).WHAT; say (my sub {  }).WHAT; say (my method {  }).WHAT; say (my submethod {  }).WHAT
15:22 FROGGS r: say (my regex { \w }).WHAT; say (my sub {  }).WHAT; say (my method {  }).WHAT; say (my submethod {  }).WHAT
15:22 camelia rakudo 62b50c: OUTPUT«(Regex)␤(Sub)␤(Method)␤(Submethod)␤»
15:22 FROGGS r: say (my regex { \w }).WHAT; say (my sub {  }).WHAT; say (my method {  }).WHAT; say (my submethod {  }).WHAT; say (my rule {  }).WHAT
15:22 camelia rakudo 62b50c: OUTPUT«(Regex)␤(Sub)␤(Method)␤(Submethod)␤(Regex)␤»
15:23 hoelzro FROGGS: calling .WHAT on what, though?
15:23 hoelzro on $code?
15:23 FROGGS I'd guess so... exactly are you (in code)?
15:24 FROGGS where*
15:24 hoelzro Actions.pm
15:24 hoelzro around like 2734
15:24 hoelzro in install_method
15:24 FROGGS Perl6::Actions?
15:25 hoelzro yes
15:25 hoelzro in rakudo
15:25 hoelzro (I had an idea for a "friendlier" error message)
15:25 kaleem joined #perl6
15:26 jnthn $code.HOW.name($code) is probably safer.
15:28 FROGGS meh
15:28 FROGGS 2 minutes too late -.-
15:29 YoungFrog joined #perl6
15:30 [Coke] I will have to kick off the java run slightly later than normal today, jnthn, so you have another 90m or so before I start it. just in case, you know.
15:30 FROGGS hehe
15:32 moritz hoelzro: fwiw the "correct" think to do is to throw a typed exception, and simply pass the code object to it
15:32 moritz hoelzro: and then the method message of that exception type can use the type
15:32 ajr joined #perl6
15:33 hoelzro er, I guess this is a warning message
15:33 hoelzro so that might change things up a bit
15:33 * moritz hopes not
15:33 moritz it could be that we don't have p6 level exceptions for those though
15:34 jnthn You can worry_typed or so
15:34 hoelzro well, here's what I'd like to add
15:34 jnthn (once having added the exception)
15:34 hoelzro consider this: sub foo { regex bar { ... } }
15:34 hoelzro Rakudo complains Useless declaration of a has-scoped method in mainline
15:35 hoelzro so I'd like it to say: "Useless declaration of a has-scoped method in mainline (did you mean 'my regex bar'?)"
15:35 moritz oh oh oh
15:35 moritz that's still LTA
15:35 hoelzro LTA?
15:35 moritz how about 'Useless declaration of a has-scoped regex(sic) inside a subroutine"?
15:35 moritz less than awesome
15:35 moritz to the casual observer it's not clear that regexes are methods
15:36 hoelzro I see
15:36 moritz so we should say 'regex' instead of 'method'
15:36 moritz and it's not in the mainline either
15:36 hoelzro ok, makes sense
15:36 moritz if you dont' want to add that detection, just say "outside of a class, role or grammar" or so
15:36 FROGGS you can still add the "did you meant to do..."
15:36 hoelzro hell, I didn't realize that they were methods until I saw that error message =)
15:36 hoelzro I knew they were sub-like, though
15:37 hoelzro FROGGS: that's what I'm really concerned about
15:37 hoelzro I had to scratch my head for a few minutes before realizing what I'd done wrong
15:37 FROGGS yes, same happened here
15:40 hoelzro so I thought it would be a simple fix for me, who has only a passing familiarity with the Rakudo source =)
15:40 colomon joined #perl6
15:55 crazedpsyc joined #perl6
16:05 konundra joined #perl6
16:21 grondilu rosettacode is down?
16:25 SamuraiJack joined #perl6
16:31 sqirrel joined #perl6
16:31 TimToady yes, been down since last night, I think
16:38 rindolf joined #perl6
16:39 TimToady FROGGS: there's no regex inside the [] of <-[]> to be a null regex; it's just an empty list of characters to (not) match
16:40 FROGGS k, understand
16:40 timotimo TimToady: in case you didn't see already, my PR for nodality is up and there's a few remaining questions
16:40 jnthn So it's equivalent to <?> I guess
16:41 TimToady no, that's 0-width, so really equivalent to .
16:41 jnthn oh
16:41 jnthn yeah :)
16:42 TimToady <![]> would be equivalent to <?>
16:42 TimToady er,wait
16:42 TimToady yeah, I think so, but lemme drink some caffeine to see if I wake up
16:43 jnthn ;)
16:43 TimToady timotimo: I will look at it, assuming there's a link in the backlog somewhere.
16:44 TimToady had to take an extra antihistimine last night, and it's taking extra long to wear off...
16:46 FROGGS TimToady: linky: https://github.com/rakudo/rakudo/pull/180
16:47 * TimToady strongly suspects there is now a link in the backlog... :)
16:53 abnorman joined #perl6
17:04 diakopter .tell FROGGS http://www.hanselman.com/blog/MakingABetterSomewhatPrettierButDefinitelyMoreFunctionalWindowsCommandLine.aspx
17:04 yoleaux diakopter: I'll pass your message to FROGGS.
17:07 FROGGS joined #perl6
17:12 FROGGS .
17:12 yoleaux 17:04Z <diakopter> FROGGS: http://www.hanselman.com/blog/MakingABetterSomewhatPrettierButDefinitelyMoreFunctionalWindowsCommandLine.aspx
17:13 diakopter heh
17:17 lizmat good *, #perl6!
17:17 lizmat checking on backlog, I find potential issues with some tests I've written on the JVM: http://irclog.perlgeek.de/perl6/2013-07-16#i_7332646
17:18 lizmat however, if I look at the roast data of today, I don't see any errors
17:18 lizmat but I also don't see any changes in the test files
17:19 diakopter which roast data
17:19 lizmat https://github.com/coke/perl6-roast-data/blob/master/rakudo.jvm_summary.out
17:19 SamuraiJack_ joined #perl6
17:22 pecastro_ joined #perl6
17:23 colomon lizmat: I'm getting failures in that file right now
17:24 diakopter lizmat: I think [Coke] hasn't run it since then
17:24 lizmat could you gist them for me?
17:25 colomon lizmat: https://gist.github.com/colomon/6022597
17:25 lizmat colomon++
17:26 colomon lizmat: looking at the code, I'm not sure is_deeply is appropriate for those tests.
17:27 * colomon isn't sure it isn't, either.  he is confused, mostly
17:27 lizmat ah, why not?   Maybe I'm too used to Test::More's is_deeply ?
17:29 colomon truth be told, I never use is_deeply
17:30 colomon it's calling eqv to compare the two sides -- does that make sense?
17:30 colomon might be we're looking at an infix:<eqv> bug in jakudo
17:31 lizmat no, actually, I think I know why they're wrong
17:32 * colomon is listening
17:32 * colomon is listening to a 4-year-old sing the music from the attack on the Death Star in Star Wars
17:33 lizmat https://gist.github.com/lizmat/6022675
17:33 lizmat could you try that?
17:33 Rotwang joined #perl6
17:34 SamuraiJack_ joined #perl6
17:36 kaare__ joined #perl6
17:36 colomon oh!
17:36 colomon wait a minute
17:36 lizmat .oO( counting down )
17:37 colomon this totally looks like a sort issue
17:37 colomon though with that change it works
17:37 lizmat you mean, my patch did not fix the problem ?
17:37 lizmat ok, pushing  :-)
17:37 dalek roast: cd2d064 | (Elizabeth Mattijsen)++ | S32-hash/delete-adverb.t:
17:37 dalek roast: Remove hash key order dependency, spotted while testong on rakudo.jvm
17:37 dalek roast: review: https://github.com/perl6/roast/commit/cd2d064931
17:38 colomon but why does it work?  seems like that change should make it worse, not better
17:39 lizmat afaik, %h{*} is really the same as %h{ %h.keys }
17:39 lizmat at least current implementation wise
17:39 moritz shouldn't it be the same as %h ?
17:40 diakopter that expands?
17:40 moritz aye
17:40 diakopter hunh.
17:40 colomon lizmat: either way, aren't you relying on the order of the keys in the hash being stable?
17:40 domidumont joined #perl6
17:41 diakopter .tell yoleaux gtfo
17:41 lizmat well, I'm assuming Perl 5's new hash key order behaviour
17:41 [Coke] lizmat: the run hasn't been done yet today.
17:41 [Coke] the roast version is fixed, though, so that fix won't help today's run. :)
17:42 [Coke] jnthn: I'm about to pull the trigger.
17:42 colomon lizmat: isn't writing hash tests that depend on *any* key order behavior incorrect?
17:43 lizmat colomon: Perl 5 guarantees that the order of "keys" and "values" is the same while no changes are made to the hash
17:43 lizmat but can be different in different runs, or even on different hashes being set up the same way
17:46 TimToady .tr ジャー区道
17:46 lizmat if the consensus is that anything related to order in hashes should be tested with a "sort" around it, I can do that  :-)
17:46 TimToady enobot
17:46 lizmat .oO( seems to be a hard one to translate )
17:46 [Coke] r: say 3
17:46 camelia rakudo 62b50c: OUTPUT«3␤»
17:46 [Coke] ah, she's back. awesome.
17:47 lizmat .tr ジャー区道
17:47 FROGGS yoleaoux is still absent
17:47 lizmat [Coke]: that's Camelia, yoleaux seems to be AWOL
17:48 diakopter (inviting yoleaux)
17:48 diakopter (oh yeah, don't need to do that)
17:51 notjack perl6: say 'foo' ~~ /<[a-z] - [a-z]>/;
17:51 camelia niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0m��Unsupported use of - as character range; in Perl 6 please use .. at /tmp/hEMkN140R8 line 1:�------> [32msay 'foo' ~~ /<[a-z[33m�[31m] - [a-z]>/;[0m��Parse failed��»
17:51 camelia ..rakudo 62b50c: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of - as character range; in Perl 6 please use .. for range, for explicit - in character class, escape it or place as last thing�at /tmp/wqz308_zTD:1�------> [32msay 'foo' ~~ /<[a-[33m�[31mz] - [a-z]>/;[0m�»…
17:51 notjack perl6: say 'foo' ~~ /<[a..z] - [a..z]>/;
17:51 camelia rakudo 62b50c, niecza v24-88-g1f87209: OUTPUT«Nil␤»
17:53 stevan_ joined #perl6
17:54 stevan__ joined #perl6
17:54 FROGGS perl6: say 'foo' ~~ /<[a..z] - [a..eg..z]>/; # I am a bit curious about the space chars around -
17:54 camelia rakudo 62b50c, niecza v24-88-g1f87209: OUTPUT«「f」␤␤»
17:54 FROGGS cool
17:55 TimToady .tr :jp :en 邪悪道
17:55 TimToady or maybe that
17:55 TimToady :)
17:57 FROGGS but we are not evil
17:57 TimToady we are not the referent :)
17:58 domidumont joined #perl6
17:59 spider-mario joined #perl6
18:01 colomon joined #perl6
18:02 lizmat colomon: is S32-hash/perl.t still giving errors on JVM as well ?
18:02 colomon lizmat: probably.  one moment.
18:03 colomon yes, tests 1, 5,
18:03 colomon 9
18:03 colomon #      got: '("b" => 2, "a" => 1).hash'
18:04 colomon # expected: '("a" => 1, "b" => 2).hash'
18:04 yoleaux joined #perl6
18:04 lizmat ok, I guess this then boils down to the question: do we want .perl to return a repeatable / ordered set of keys or not for hashes
18:04 colomon probably not, I'd say
18:05 lizmat .gist probably should, I guess
18:05 lizmat but not .perl, right ?
18:06 colomon is it even possible?  I mean, Str keys, sure.
18:06 colomon but do a Hash's keys have to have an ordering?
18:06 lizmat well, the idea of .perl is that we can roundttrip with eval()
18:06 lizmat order of keys thus doesn't matter there
18:07 lizmat .gist is more for human consumption
18:07 lizmat having keys sorted then might be something desireable?
18:09 * colomon doesn't know -- would never try to .gist or .Str a Hash other than for very casual reasons
18:09 dalek roast: ca7012f | (Elizabeth Mattijsen)++ | S32-hash/perl.t:
18:09 dalek roast: Make sure we don't depend on order of keys in Hash.perl (spotted in rakudo.jvm tests)
18:09 dalek roast: review: https://github.com/perl6/roast/commit/ca7012fa22
18:12 * lizmat continuing on backlog
18:16 lizmat jnthn: re http://irclog.perlgeek.de/perl6/2013-07-16#i_7334236 : shouldn't that be &?BLOCK ?
18:25 lizmat donaldh: re http://irclog.perlgeek.de/perl6/2013-07-17#i_7336519 : yes, I think they should be merged back again and/or redeveloped according to S11
18:38 dalek perl6-roast-data: eca1543 | coke++ | / (5 files):
18:38 dalek perl6-roast-data: today (automated commit)
18:38 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/eca15432c5
18:38 [Coke] rakudo.jvm (98.82%)
18:39 lizmat caught up on backlog, afk&
18:39 nwc10 Should I be happy that that is really high, or disappointed that it's almost but not quite 99%?
18:40 [Coke] pretty sure we'll hit 99 tomorrow.
18:40 nwc10 and then yay, first 99% done? :-)
18:41 lizmat yeah, at least 9 tests should pass tomorrow
18:41 jnthn How many testse to 99%? :)
18:41 yoleaux 18:05Z <diakopter> jnthn: there's a bunch of places I'm finding that need the MVM_ASSIGN macro
18:41 yoleaux 18:06Z <diakopter> jnthn: need to do a full code audit one of these days
18:41 yoleaux 18:10Z <diakopter> jnthn: er, MVM_ASSIGN_REF
18:42 benabik nwc10: Onto the next 99%
18:42 [Coke] jnthn: 47 left. and I think we missed a few fixes to roast tests, so probably 45.
18:43 lizmat 47 - 9 = 38
18:44 lizmat S32-hash/delete-adverb andS32-hash/perl should also pass now
18:47 dalek Perlito: 7bc2bb9 | (Flavio S. Glock)++ | src5/lib/Perlito5/Grammar/Print.pm:
18:47 dalek Perlito: Perlito5 - wip indirect-object
18:47 dalek Perlito: review: https://github.com/fglock/Perlito/commit/7bc2bb9196
18:48 [Coke] jnthn: https://gist.github.com/coke/5879701 updated.
18:48 jnthn lizmat: Confirmed that here. :)
18:48 [Coke] if all of them pass, liz, that's 8.
18:51 [Coke] jnthn: wrap is still aborting 2 tests.
18:51 lizmat I thought it was 6 for delete-adverb.t. and 3 for perl.t
18:51 [Coke] new failure: control operator crossed continuation barrier
18:51 [Coke] lizmat: whoops, missed 1, yes.
18:51 lizmat :-)
18:52 lizmat really afk now&
18:54 jnthn hm, seems there's 8-9 more if I can figure out why captialize.t is busted...
18:55 [Coke] jnthn: remove the skip from S32-array/pop.t, it runs fine now.
18:57 bluescreen100 joined #perl6
18:58 [Coke] jnthn: I started down the capitalize path earlier thinking it was LHF, but it got weird and I gave up. I am interested to see what you find!
19:00 [Coke] so, that's 10 so far, leaving 37.
19:01 jnthn [Coke]: yeah, it's werid...
19:01 jnthn *weird
19:01 [Coke] COFFEE TIME
19:30 [Coke] jnthn: you hit the bottom of the rabbit hole yet?
19:31 shlomif joined #perl6
19:34 dalek Perlito: 111f2fa | (Flavio S. Glock)++ | src5/lib/Perlito5/Grammar/Print.pm:
19:34 dalek Perlito: Perlito5 - indirect-object - more rules
19:34 dalek Perlito: review: https://github.com/fglock/Perlito/commit/111f2fa4ef
19:36 cognominal joined #perl6
19:42 moritz jnthn: last I looked at capitalize (was quite some time ago), the problem was with some of the Unicode props in regexes
19:42 moritz like <:L> or so
19:44 pupoque joined #perl6
19:47 pjcj joined #perl6
19:47 colomon wow, just found yet another test that depends on hash order.  sigh.
19:48 jnthn [Coke]: Not yet, it's something with <:L>, but then been on the phone :)
19:48 Myk267 left #perl6
19:51 colomon Error while reading 'TESTTOKEN': No such file or directory at ./eval-client.pl line 10
19:54 dalek Perlito: ad54ae4 | (Flavio S. Glock)++ | src5/lib/Perlito5/Grammar/Print.pm:
19:54 dalek Perlito: Perlito5 - indirect-object - fix printf()
19:54 dalek Perlito: review: https://github.com/fglock/Perlito/commit/ad54ae4378
19:54 dalek roast: 8e666ec | (Solomon Foster)++ | S16-io/bare-say.t:
19:54 dalek roast: Make test work independent of hash order.
19:54 dalek roast: review: https://github.com/perl6/roast/commit/8e666ec6a6
19:58 pupoque joined #perl6
20:05 bbkr joined #perl6
20:09 jnthn yeah, think I've got the wordcase thing fixed
20:10 colomon \o/
20:10 grondilu r: say join ":", "foo fooo".match: / o xx 2 /, :g
20:11 camelia rakudo 62b50c: OUTPUT«␤»
20:12 jnthn grondilu: **
20:12 donaldh joined #perl6
20:12 grondilu yep, found out eventually
20:12 grondilu r: my $k = 2; my $x = eval "/o xx {$k}/"; say join ":", "foo fooo".match: /<$x>/, :g
20:12 camelia rakudo 62b50c: OUTPUT«␤»
20:13 grondilu r: my $k = 2; my $x = eval "/o ** {$k}/"; say join ":", "foo fooo".match: /<$x>/, :g
20:13 camelia rakudo 62b50c: OUTPUT«oo:oo␤»
20:13 * grondilu failed to reproduce an error in some other code.  Ignore lines above.
20:14 notjack r: say join '.','abc' RX 'def';
20:14 camelia rakudo 62b50c: OUTPUT«␤»
20:14 notjack r: say join '.','abc'.split RX 'def'.split;
20:14 camelia rakudo 62b50c: OUTPUT«Cannot call 'split'; none of these signatures match:␤:(Cool : Regex $pat, $limit = { ... }, :all(:$all), Mu *%_)␤:(Cool : Cool $pat, $limit = { ... }, :all(:$all), Mu *%_)␤:(Str:D : Regex $pat, $limit = { ... }, :all(:$all), Mu *%_)␤:(Str:D : Cool $delimiter, $limi…
20:15 FROGGS delimiter missing
20:15 notjack r: say join '.', /a b c/ RX /d e f/;
20:15 camelia rakudo 62b50c: OUTPUT«␤»
20:15 moritz r: say join ', '', ('abc'.comb RX 'def'.comb)
20:15 camelia rakudo 62b50c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/KVL5e6TyPI:1â�¤------> [32msay join ', '[33mâ��[31m', ('abc'.comb RX 'def'.comb)[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤        statement endâ�¤        state…
20:15 lizmat colomon: is that bare-say test not really about what .perl / .gist is returning ?
20:15 notjack FROGGS: I thought DWIM would make .split mean .split('')
20:15 moritz notjack: that's .comb now
20:15 FROGGS r: "abc".split
20:15 camelia rakudo 62b50c: OUTPUT«Cannot call 'split'; none of these signatures match:␤:(Cool : Regex $pat, $limit = { ... }, :all(:$all), Mu *%_)␤:(Cool : Cool $pat, $limit = { ... }, :all(:$all), Mu *%_)␤:(Str:D : Regex $pat, $limit = { ... }, :all(:$all), Mu *%_)␤:(Str:D : Cool $delimiter, $limi…
20:15 FROGGS r: "abc".split :all
20:15 camelia rakudo 62b50c: OUTPUT«Cannot call 'split'; none of these signatures match:␤:(Cool : Regex $pat, $limit = { ... }, :all(:$all), Mu *%_)␤:(Cool : Cool $pat, $limit = { ... }, :all(:$all), Mu *%_)␤:(Str:D : Regex $pat, $limit = { ... }, :all(:$all), Mu *%_)␤:(Str:D : Cool $delimiter, $limi…
20:16 moritz split requires a delimiter.
20:16 FROGGS yeah
20:16 moritz use .comb if you want a list of characters
20:16 FROGGS reading the signatures here isnt ideal
20:16 notjack why does 'comb' mean 'list of characters'?
20:16 notjack r: say join '.','abc'.comb RX 'def'.comb;
20:16 camelia rakudo 62b50c: OUTPUT«␤»
20:16 colomon lizmat: no, it was iterating through a hash and expecting to get the results in sorted order
20:16 jnthn That's 9 more tests from capitalize.t and also 3 more from substr it seems :)
20:17 moritz notjack: because .comb in general searches through strings, and the default search is for any character
20:17 notjack oh, as in "comb my hair" not "comb-inations"
20:17 moritz yes
20:18 FROGGS nr: say ('abc'.comb X 'def'.comb) # what is rakudo doing?
20:18 notjack r: say join ' ','hi there'.comb;
20:18 camelia niecza v24-88-g1f87209: OUTPUT«a d a e a f b d b e b f c d c e c f␤»
20:18 camelia ..rakudo 62b50c: OUTPUT«␤»
20:18 camelia rakudo 62b50c: OUTPUT«h i   t h e r e␤»
20:19 notjack r: say ('abc'.comb RX 'def'.comb)
20:19 camelia rakudo 62b50c: OUTPUT«␤»
20:19 notjack why does RX not work?  Perl6 won't take its medicine.
20:19 [Coke] r: say 'abc'.comb.perl
20:19 camelia rakudo 62b50c: OUTPUT«("a", "b", "c").list␤»
20:19 notjack n: say ('abc'.comb RX 'def'.comb)
20:19 camelia niecza v24-88-g1f87209: OUTPUT«d a d b d c e a e b e c f a f b f c␤»
20:19 notjack ah
20:20 lue r: say <a b c> X <d e f>
20:20 camelia rakudo 62b50c: OUTPUT«a d a e a f b d b e b f c d c e c f␤»
20:20 colomon ah?
20:21 notjack ah, niecza gets me, but rakudo doesn't.
20:21 colomon looks like a rakudobug
20:21 colomon r: say ('abc'.comb X 'def'.comb)
20:21 [Coke] r: say <a b c> RX <d e f>
20:21 camelia rakudo 62b50c: OUTPUT«␤»
20:21 camelia rakudo 62b50c: OUTPUT«d a d b d c e a e b e c f a f b f c␤»
20:22 colomon r: say ('abc'.comb X 'def'.comb)
20:22 camelia rakudo 62b50c: OUTPUT«␤»
20:22 [Coke] r: say ('abc'.comb X 'def'.comb).WHAT
20:22 camelia rakudo 62b50c: OUTPUT«(List)␤»
20:22 notjack say: 6.HOW
20:22 notjack r: say 6.HOW
20:22 camelia rakudo 62b50c: OUTPUT«Perl6::Metamodel::ClassHOW.new()␤»
20:22 notjack r: say 6.WHY
20:22 camelia rakudo 62b50c: OUTPUT«(Any)␤»
20:22 notjack r: say 6.JUSTMAKINGTHINGSUPNOW
20:22 camelia rakudo 62b50c: OUTPUT«No such method 'JUSTMAKINGTHINGSUPNOW' for invocant of type 'Int'␤  in block  at /tmp/4Tb64Ww0Zi:1␤␤»
20:23 notjack there are seriously WHAT HOW WHY operators?
20:23 notjack r: say 6.WHO
20:23 camelia rakudo 62b50c: OUTPUT«().hash␤»
20:23 notjack heh
20:23 FROGGS and WHICH and WHERE
20:23 diakopter r: .WHY
20:23 camelia rakudo 62b50c:  ( no output )
20:23 diakopter r: .WHEN
20:23 camelia rakudo 62b50c: OUTPUT«No such method 'WHEN' for invocant of type 'Any'␤  in block  at /tmp/QxbiQbfnvs:1␤␤»
20:24 notjack r:  say ('6.' ~~ <WHO WHAT WHY WHICH WHERE HOW>)>>.eval;
20:24 camelia rakudo 62b50c: OUTPUT«False␤»
20:24 notjack r:  say ('6.' ~>> <WHO WHAT WHY WHICH WHERE HOW>)>>.eval;
20:24 grondilu rn: for ^2 -> $i { loop (my $j=0; $j < 2; $j++) { say (state $)++ } }
20:25 colomon notjack: .WHAT and .HOW are methods, not operators
20:25 camelia rakudo 62b50c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unsupported use of >> to do right shift;  in Perl 6 please use +> or ~>â�¤at /tmp/HYsceLg3DD:1â�¤------> [32msay ('6.' ~>>[33mâ��[31m <WHO WHAT WHY WHICH WHERE HOW>)>>.eval;[0mâ�¤Â»
20:25 camelia rakudo 62b50c: OUTPUT«0␤1␤2␤3␤»
20:25 camelia ..niecza v24-88-g1f87209: OUTPUT«Potential difficulties:â�¤  $i is declared but not used at /tmp/cN6qE_FlOk line 1:â�¤------> [32mfor ^2 -> [33mâ��[31m$i { loop (my $j=0; $j < 2; $j++) { say [0mâ�¤â�¤0â�¤1â�¤0â�¤1â�¤Â»
20:25 grondilu rn: for ^2 { loop (my $j=0; $j < 2; $j++) { say (state $)++ } }
20:25 camelia niecza v24-88-g1f87209: OUTPUT«0␤1␤0␤1␤»
20:25 camelia ..rakudo 62b50c: OUTPUT«0␤1␤2␤3␤»
20:25 lue don't forget WHENCE and WHEREFORE :)
20:25 dalek nqp: 15a8f56 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
20:25 dalek nqp: Fixes to ischarprop.
20:25 dalek nqp:
20:25 dalek nqp: Unbusts /<:L> \w*/ regex used by wordcase, thus fixing it.
20:25 dalek nqp: review: https://github.com/perl6/nqp/commit/15a8f5609e
20:26 dalek roast: fe3dafd | jnthn++ | S32-str/ (2 files):
20:26 dalek roast: Unfudges after JVM wordcase fixes.
20:26 dalek roast: review: https://github.com/perl6/roast/commit/fe3dafda3e
20:26 dalek roast: b11b533 | jnthn++ | S32-array/pop.t:
20:26 dalek roast: Unskip a pop test on Rakudo JVM; [Coke]++.
20:26 dalek roast: review: https://github.com/perl6/roast/commit/b11b533a00
20:26 notjack colomon: if SkyNet gets written in perl6, it's going to be paronomasiac
20:27 colomon sure enough
20:27 PerlJam .oO( What does he mean "if"?  )
20:27 notjack r: say '6.' ~>> <a b c>;
20:27 camelia rakudo 62b50c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unsupported use of >> to do right shift;  in Perl 6 please use +> or ~>â�¤at /tmp/79tzxREPiw:1â�¤------> [32msay '6.' ~>>[33mâ��[31m <a b c>;[0mâ�¤Â»
20:27 notjack how do I say "$x catenate each $y"?
20:28 notjack uh, "$x catenate each @y"?
20:28 jnthn r: say '6.' >>~>> <a b c>;
20:28 camelia rakudo 62b50c: OUTPUT«6.a␤»
20:28 jnthn Hm
20:28 notjack what's the deal with sometimes needing pairs of >> and sometimes just one ?
20:28 jnthn Binary or unary operator
20:29 notjack oh, hmm
20:29 jnthn ~ is an infix, so it needs two args
20:29 notjack so the >> sorta represents an argument?
20:29 notjack like a mnemonic or placeholder?
20:30 jnthn r: say '6.' <<~<< <a b c>;
20:30 camelia rakudo 62b50c: OUTPUT«6.a 6.b 6.c␤»
20:30 jnthn That's the one
20:30 jnthn Pointing it outwards means "upgrade this side's length as needed"
20:30 notjack oh, so then
20:30 lelf joined #perl6
20:30 notjack r: say <a b c> >>~>> '.6';
20:30 camelia rakudo 62b50c: OUTPUT«a.6 b.6 c.6␤»
20:30 notjack ha!
20:31 notjack r: say <a b c> X~ <d e f>;
20:31 camelia rakudo 62b50c: OUTPUT«ad ae af bd be bf cd ce cf␤»
20:31 notjack r: say <a b c> <<~>> <d e f>;
20:31 camelia rakudo 62b50c: OUTPUT«ad be cf␤»
20:31 notjack hee hee
20:31 notjack what does this do?
20:31 notjack r: say <a b c> >>~<< <d e f>;
20:31 camelia rakudo 62b50c: OUTPUT«ad be cf␤»
20:31 nyuszika7h joined #perl6
20:31 notjack I guess that makes sense, kinda
20:32 notjack what does it do for length errors?
20:32 notjack r: say <a b c> >>~>> <d e>;
20:32 camelia rakudo 62b50c: OUTPUT«ad be cd␤»
20:32 jnthn r: say '6.' >>~<< <a b c>;
20:32 camelia rakudo 62b50c: OUTPUT«Lists on both side of non-dwimmy hyperop of infix:<~> are not of the same length␤left: 1 elements, right: 3 elements␤  in sub hyper at src/gen/CORE.setting:14591␤  in sub hyper at src/gen/CORE.setting:14579␤  in block  at src/gen/CORE.setting:14570␤  in block  at /…
20:32 notjack cyclical
20:33 jnthn That's the error if you use the inwards-pointing form
20:34 notjack r: say '6.' >>~>> <WHO WHAT WHERE WHY WHEN WHICH WHEREFOR HOW>;
20:34 camelia rakudo 62b50c: OUTPUT«6.WHO␤»
20:34 notjack r: say '6.' <<~<< <WHO WHAT WHERE WHY WHEN WHICH WHEREFOR HOW>;
20:34 camelia rakudo 62b50c: OUTPUT«6.WHO 6.WHAT 6.WHERE 6.WHY 6.WHEN 6.WHICH 6.WHEREFOR 6.HOW␤»
20:34 notjack r: say ('6.' <<~<< <WHO WHAT WHERE WHY WHEN WHICH WHEREFOR HOW>)>>.eval;
20:34 camelia rakudo 62b50c: OUTPUT«No such method 'WHEREFOR' for invocant of type 'Int'␤  in block  at eval_4:1␤  in any  at eval_4:1␤  in sub eval at src/gen/CORE.setting:601␤  in sub eval at src/gen/CORE.setting:592␤  in method eval at src/gen/CORE.setting:2827␤  in method dispatch:<hyper> at src/…
20:34 notjack r: say ('6.' <<~<< <WHO WHAT WHERE WHY WHEN WHICH HOW>)>>.eval;
20:34 camelia rakudo 62b50c: OUTPUT«No such method 'WHEN' for invocant of type 'Int'␤  in block  at eval_1:1␤  in any  at eval_1:1␤  in sub eval at src/gen/CORE.setting:601␤  in sub eval at src/gen/CORE.setting:592␤  in method eval at src/gen/CORE.setting:2827␤  in method dispatch:<hyper> at src/gen/…
20:35 notjack r: say ('6.' <<~<< <WHO WHAT WHERE WHY WHICH HOW>)>>.eval;
20:35 camelia rakudo 62b50c: OUTPUT«().hash (Int) 928988205 (Any) Int|6 Perl6::Metamodel::ClassHOW.new()␤»
20:35 notjack r: my Str @a = <some stuff I wrote>; say ('@a.' <<~<< <WHO WHAT WHERE WHY WHICH HOW>)>>.eval;
20:35 camelia rakudo 62b50c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable '@a' is not declaredâ�¤at eval_0:1â�¤------> [32m@a.HOW[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤Â»
20:36 notjack damn you eval, and your seatbelts!
20:36 notjack hey, is . itself a binary operator?
20:36 jnthn No, it's not handled that way
20:37 notjack how would you idiomatically express dynamically invoking multiple methods on a single object?
20:38 FROGGS jnthn: this seems wrong I think: https://github.com/MoarVM/MoarVM/blob/master/src/6model/reprs/P6opaque.c#L611
20:38 jnthn $foo."$_"() for <some methods here>
20:38 FROGGS jnthn: cur_alloc_addr for the first slot cant be zero, which lets fail two tests of t/nqp/60-bigint.t
20:39 perigrin jnthn: no map and a mop call to look them up?
20:39 FROGGS the tests about a P6opaque boxed bigint
20:39 dalek roast/nodal_tests: 3851684 | (Timo Paulssen)++ | S03-metaops/nodal-hyper.t:
20:39 dalek roast/nodal_tests: no longer rely on hash ordering.
20:39 dalek roast/nodal_tests: review: https://github.com/perl6/roast/commit/38516846e1
20:39 jnthn FROGGS: I think it's right; offsets are relative to the start of the object, iirc
20:40 FROGGS hmmm
20:40 notjack r: my Str @a = <some stuff I wrote>; say join "x", @a."$_"() for <WHO WHAT WHERE WHY WHICH HOW>;
20:40 camelia rakudo 62b50c: OUTPUT«No such method 'WHO' for invocant of type 'Array+{TypedArray}'␤  in block  at /tmp/lUn1ZhLSnK:1␤␤»
20:40 jnthn perigrin: I think that'd come out longer...
20:41 FROGGS jnthn: that is my test case https://gist.github.com/FROGGS/c865b021b1eb5420337f
20:41 FROGGS the second say-statement gives zero, when it should be 4
20:42 jnthn FROGGS: Um...does the code in question explicitly check we're getting a P6bigint REPR and do something smart if not?
20:42 FROGGS set_int in P6opaque gets the correct value, and passes it to P6bigint, but the pointer it gets to store data to is off I think
20:42 notjack r: divide by 0 or else;
20:42 camelia rakudo 62b50c: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routines:â�¤    by used at line 1â�¤    divide used at line 1â�¤    else used at line 1â�¤â�¤Â»
20:42 BenGoldberg joined #perl6
20:43 FROGGS jnthn: you mean as the :type parameter?
20:44 FROGGS argument*
20:44 FROGGS this snippet is from bigint.t, which succeeds on nqp@parrot
20:45 notjack r: say 'abc'.comb('c');
20:45 camelia rakudo 62b50c: OUTPUT«Cannot call 'comb'; none of these signatures match:␤:(Cool : Mu *%_)␤:(Cool : Regex $matcher, $limit = { ... }, Mu *%_)␤:(Str:D : Mu *%_)␤:(Str:D : Regex $pat, $limit = { ... }, :match(:$match), Mu *%_)␤  in method comb at src/gen/CORE.setting:2800␤  in block  at /…
20:45 notjack r: say 'abc'.comb(/c/);
20:45 camelia rakudo 62b50c: OUTPUT«c␤»
20:45 notjack r: say 'abc'.comb(/<-[b]>/);
20:45 camelia rakudo 62b50c: OUTPUT«a c␤»
20:45 notjack r: say 'abc'.comb(/(.)<-[b]>/);
20:45 camelia rakudo 62b50c: OUTPUT«bc␤»
20:46 FROGGS nqp@parrot calculates some alignment for the attribute offsets... but stealing that piece just breaks more tests
20:46 jnthn FROGGS: I mean I'm not sure the bigint ops like nqp::tostr_I handle the P6bigint inside a P6opaque
20:46 notjack r: regex not2b {<-[b]>}; say 'abc'.comb(/not2b/);
20:46 camelia rakudo 62b50c: OUTPUT«Useless declaration of a has-scoped method in mainline␤␤»
20:46 jnthn So it may be that the nqp::box_i works correctly
20:46 notjack r: regex not2b {<-[b]>}; say 'abc'.comb(not2b);
20:46 camelia rakudo 62b50c: OUTPUT«Useless declaration of a has-scoped method in mainlineâ�¤[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    not2b used at line 1. Did you mean '&note'?â�¤â�¤Â»
20:46 FROGGS jnthn: I just can say that it works for nqp@parrot, so I though nqp@moarvm must also
20:47 jnthn FROGGS: Yes, it should work, but we're still in the middle of implementing the bigint stuff on MoarVM.
20:47 FROGGS jnthn: ahh, and when using fromstr_I instead of box_i, it works
20:47 jnthn That may be for wrong reasons too ;-)
20:48 FROGGS bah *g*
20:48 * FROGGS goes deeper into the rabbit hole
20:49 dalek rakudo/nom: a8ca889 | jnthn++ | src/vm/jvm/Perl6/Ops.nqp:
20:49 dalek rakudo/nom: Removed outdated comment.
20:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a8ca889aa7
20:49 timotimo you've been forgetting about .WHENCE
20:51 cognominal joined #perl6
20:53 lee_ https://gist.github.com/leedo/c5c9a35920d0e7755238 a little REPL bug. i seem to remember a similar error being fixed a few weeks ago
20:53 lee_ but maybe it didn't apply to expressions that throw errors
20:54 jnthn Hm
20:54 lee_ https://github.com/rakudo/rakudo/commit/c947f7800475da727c3873b66000ba8cf3f051cf
20:54 lee_ was the previous fix
20:55 * jnthn can't reproduce it here.
20:55 lee_ i'll update everything and retry, shoulda done that before
20:58 prammer joined #perl6
21:08 rurban joined #perl6
21:11 Ben_Goldberg joined #perl6
21:14 stevan_ joined #perl6
21:15 lee_ well that did indeed fix it, sorry about that!
21:17 FROGGS jnthn: so, in coerce_Is I should call REPR->box_funcs->get_int, instead of just MVM_bigint_to_str, right?
21:19 jnthn FROGGS: No
21:19 FROGGS :/
21:19 jnthn FROGGS: MVM_bigint_to_str needs to understand the other case
21:19 FROGGS ahh, okay
21:20 jnthn If it's factored like on JVM or Parrot, there's a "find the underlying bigint" function that all of those MVM_bigint_ things call at some point.
21:22 FROGGS MVM_get_bigint
21:22 FROGGS it does only that right now: return &((P6bigint *)obj)->body.i;
21:23 jnthn um, yeah, that's a bad idea :)
21:23 FROGGS cool, I like that moment when the light strikes my head a bit...
21:23 FROGGS :o)
21:23 diakopter LOLOLOLOL
21:23 FROGGS thank you
21:27 timotimo i'm not able to make that fix myself, but *by* *god* is the "missing or outdated version of *foo*" error annoying when it doesn't say what module is causing that error
21:27 Celelibi joined #perl6
21:36 notjack perl6: say 'lol' xx 12;
21:36 camelia rakudo a8ca88, niecza v24-88-g1f87209: OUTPUT«lol lol lol lol lol lol lol lol lol lol lol lol␤»
21:37 notjack perl6: say join'','lol' xx 12;
21:37 camelia niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row (listop with args requires whitespace or parens) at /tmp/NEx2NFtVqI line 1:�------> [32msay join[33m�[31m'','lol' xx 12;[0m��Parse failed��»
21:37 camelia ..rakudo a8ca88: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/h8ipaw54kt:1â�¤------> [32msay join[33mâ��[31m'','lol' xx 12;[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤        statement endâ�¤        st…
21:37 notjack perl6: say join '','lol' xx 12;
21:37 camelia rakudo a8ca88, niecza v24-88-g1f87209: OUTPUT«lollollollollollollollollollollollol␤»
21:37 notjack perl6: say join '','lo' xx 12;
21:38 camelia rakudo a8ca88, niecza v24-88-g1f87209: OUTPUT«lolololololololololololo␤»
21:38 diakopter r: say 'lo'x 12 ~ 'l'
21:38 camelia rakudo a8ca88: OUTPUT«lolololololololololololol␤»
21:39 PerlJam r: say join 'o', 'l' xx 24;
21:39 camelia rakudo a8ca88: OUTPUT«lololololololololololololololololololololololol␤»
21:39 grondilu is there an equivalent to :overlap in P5?
21:39 timotimo yeah, :exhaustive or something like that
21:40 timotimo With the new :ex (:exhaustive) modifier, the current regex will match every possible way (including overlapping) and return a list of all matches.
21:40 PerlJam grondilu: I think you have to loop the string yourself.
21:45 donaldh Urg. Getting 'This representation can not unbox to a native str' from ModuleLoader when it is trying to die with a helpful message.
21:48 konundra joined #perl6
21:59 dalek rakudo/nom: d4ffd7c | jnthn++ | src/ (4 files):
21:59 dalek rakudo/nom: Get PRE/POST support mostly in place.
21:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d4ffd7c21e
21:59 dalek roast: ee62bc1 | jnthn++ | S04-phasers/pre-post.t:
21:59 dalek roast: Unfudging for Rakudo JVM.
21:59 dalek roast: review: https://github.com/perl6/roast/commit/ee62bc1be6
22:04 ajr joined #perl6
22:07 jnthn Too tired to do much more today, but hopefully those things get us closer to the 99% :)
22:07 donaldh jnthn: Is there any way to get a source reference for a __P6opaque__NN so that SixModelObject can generate an informative unbox exception ?
22:08 donaldh jnthn: or any hints for what to introspect in the Eclipse debugger?
22:08 jnthn donaldh: No, and they're potentially shared between types... guess the meta-object can be looked at to see if it has a name that can be introspected.
22:09 jnthn obj.st.HOW
22:10 lizmat (also) sleep&
22:10 donaldh hmm P6OpaqueDelegateInstance
22:10 jnthn Chase the delegate pointer
22:15 donaldh It's P6OpaqueDelegateInstances a few deep until I get to KnowHOWREPRInstance with name NQPClassHOW
22:16 jnthn A few deep? weird.
22:17 jnthn One up from there you should have an actual NQPClassHOW instance, a field of which is a type name...
22:21 notjack say (1..Inf)[-1];
22:21 notjack r: say (1..Inf)[-1];
22:21 camelia rakudo a8ca88: OUTPUT«Cannot use negative index -1 on Range␤  in method gist at src/gen/CORE.setting:10544␤  in method gist at src/gen/CORE.setting:915␤  in sub say at src/gen/CORE.setting:11438␤  in block  at /tmp/YJUfGRPl4a:1␤␤»
22:21 notjack r: say (reverse 1..Inf)[-1];
22:21 camelia rakudo a8ca88: OUTPUT«Cannot use negative index -1 on Failure␤  in method gist at src/gen/CORE.setting:10544␤  in method gist at src/gen/CORE.setting:915␤  in sub say at src/gen/CORE.setting:11438␤  in block  at /tmp/drnVDxQUso:1␤␤»
22:21 notjack r: say (1..10)[-1];
22:21 camelia rakudo a8ca88: OUTPUT«Cannot use negative index -1 on Range␤  in method gist at src/gen/CORE.setting:10544␤  in method gist at src/gen/CORE.setting:915␤  in sub say at src/gen/CORE.setting:11438␤  in block  at /tmp/i1lUm66xiW:1␤␤»
22:21 jnthn r: say (1..10)[*-1];
22:22 camelia rakudo a8ca88: OUTPUT«10␤»
22:22 notjack what's with the *?
22:22 notjack why doesn't plain -1 work?
22:22 notjack r: say (1..10)[*-1];
22:22 camelia rakudo a8ca88: OUTPUT«10␤»
22:22 notjack r: say (1..Inf)[*-1];
22:22 camelia rakudo a8ca88: OUTPUT«Cannot coerce Inf or NaN to an Int␤  in method Numeric at src/gen/CORE.setting:10542␤  in sub infix:<+> at src/gen/CORE.setting:3278␤  in sub infix:<+> at src/gen/CORE.setting:3276␤  in method exists at src/gen/CORE.setting:6446␤  in method at_pos at src/gen/CORE.s…
22:22 notjack r: say (reverse 1..Inf)[*-1];
22:22 camelia rakudo a8ca88: OUTPUT«Cannot .reverse an infinite list␤  in method gist at src/gen/CORE.setting:10544␤  in method gist at src/gen/CORE.setting:915␤  in sub say at src/gen/CORE.setting:11438␤  in block  at /tmp/XOGBjjkC84:1␤␤»
22:24 notjack r: my @a = [12,3,4,5,6,7]; say @a[3,3,1,0];
22:24 camelia rakudo a8ca88: OUTPUT«(Any) (Any) (Any) 12 3 4 5 6 7␤»
22:25 notjack r: my @a = [12,3,4,5,6,7]; say @a[[3,3,1,0]];
22:25 camelia rakudo a8ca88: OUTPUT«(Any)␤»
22:28 TimToady r: my @a = [12,3,4,5,6,7]; say @a[0][3,3,1,0]
22:28 camelia rakudo a8ca88: OUTPUT«5 5 3 12␤»
22:29 notjack ah, I forgot [] meant arrayref in perl
22:29 TimToady r: my $closure = *-1; say $closure(42)
22:29 camelia rakudo a8ca88: OUTPUT«41␤»
22:29 notjack r: my @a = (12,3,4,5,6,7); say @a[3,3,1,0];
22:29 camelia rakudo a8ca88: OUTPUT«5 5 3 12␤»
22:29 notjack r: my @a = (12,3,4,5,6,7); say @a[3,3,1,0,-1];
22:29 camelia rakudo a8ca88: OUTPUT«Cannot use negative index -1 on Array␤  in method gist at src/gen/CORE.setting:10544␤  in method gist at src/gen/CORE.setting:915␤  in method gist at src/gen/CORE.setting:5634␤  in method gist at src/gen/CORE.setting:915␤  in sub say at src/gen/CORE.setting:11438␤ …
22:30 notjack I don't get why I can't just use negative indexing naturally
22:30 FROGGS r: my @a = (12,3,4,5,6,7); say @a[3,3,1,0,*-1];
22:30 camelia rakudo a8ca88: OUTPUT«5 5 3 12 7␤»
22:30 FROGGS security
22:30 notjack security?
22:30 geekosaur because there's no way to distinguish an intended index-from-end from a fencepost error
22:30 FROGGS so dont get something by accident from the end
22:30 geekosaur *-x is unambiguously index from end
22:31 notjack there's no way to distinguish @a[1] from "second element" or "fencepost error fro first element"
22:31 notjack that's not Perl's job
22:31 notjack it's going to screw up slices
22:31 geekosaur by that argument no language should have any error checking
22:31 notjack my @indices=[0,1,-1];
22:32 notjack my @indices=(0,1,-1); @a[@indices];  #oops
22:32 notjack geekosaur: by that argument no one should ever complain about problematic syntax in language design
22:35 Nom- joined #perl6
22:35 geekosaur notjack, why yes, that does also follow if you take your claim far enough.
22:35 notjack geekosaur: I'm glad you see the symmetry.
22:35 geekosaur I want syntactic, not weird semantic, distinction between index-forward and index-reverse
22:36 geekosaur you want anything goes, oh that wasn't what you wanted, too bad!
22:36 notjack I want arithmetic, not syntatic, distinction
22:36 geekosaur frankly I do not miss 1960s languages
22:37 notjack Perl owes a lot - a lot - to 1960s languages
22:38 notjack *-1 feels more like a 1980s 3GL construct than anything else
22:38 notjack (Those, I do not miss)
22:38 geekosaur *shrug* you want PHP, you know where to find it. Ditto C.
22:39 * diakopter doesn't understand that last comment
22:40 notjack_ joined #perl6
22:40 snoopy joined #perl6
22:42 TimToady .tr ジャー区道
22:42 yoleaux Jar district road (ja → en)
22:42 cognominal joined #perl6
22:42 notjack_ my @a = 1..100; my @idx=(0,1,4,1,-1,7,10,-2,5); say @a[@idx];
22:42 notjack_ r: my @a = 1..100; my @idx=(0,1,4,1,-1,7,10,-2,5); say @a[@idx];
22:42 camelia rakudo a8ca88: OUTPUT«Cannot use negative index -1 on Array␤  in method gist at src/gen/CORE.setting:10544␤  in method gist at src/gen/CORE.setting:915␤  in method gist at src/gen/CORE.setting:5634␤  in method gist at src/gen/CORE.setting:915␤  in sub say at src/gen/CORE.setting:11438␤ …
22:43 notjack_ r: my @a = 1..100; my @idx=(0,1,4,1,*-1,7,10,*-2,5); say @a[@idx];
22:43 camelia rakudo a8ca88: OUTPUT«1 2 5 2 100 8 11 99 6␤»
22:43 snoopy r: 'my @indices=(0,1,*-1); say @indices; my @a = 12,3,4,5,6,7; say @a[@indices]
22:43 camelia rakudo a8ca88: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse expression in single quotes; couldn't find final "'"â�¤at /tmp/5bvFpijzTH:1â�¤------> [32m; my @a = 12,3,4,5,6,7; say @a[@indices][33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤  â€¦
22:43 snoopy r: my @indices=(0,1,*-1); say @indices; my @a = 12,3,4,5,6,7; say @a[@indices]
22:43 camelia rakudo a8ca88: OUTPUT«0 1 WhateverCode.new()␤12 3 7␤»
22:43 notjack_ r: my @a = 1..100; my @idx=(0,1,4,1,*-1,7,10,*-2,5); say @a[@idx]; say @idx[4];
22:43 lue r: my @a = 1, 2, 3; my @b = 0, 1, *-1; say @a[@b];
22:43 camelia rakudo a8ca88: OUTPUT«1 2 5 2 100 8 11 99 6␤WhateverCode.new()␤»
22:43 camelia rakudo a8ca88: OUTPUT«1 2 3␤»
22:43 donaldh argh. getting tripped up by PERL6LIB in my env for parrot / rakudo
22:43 notjack_ r: my @a = 1..100; my @idx=(0,1,4,1,*-1,7,10,*-2,5); say @idx[4];
22:43 camelia rakudo a8ca88: OUTPUT«WhateverCode.new()␤»
22:44 notjack_ yeah, that's un-fun.
22:44 lue You can still put from-the-end indices in lists, just replace -1 with *-1
22:44 notjack_ I get it, but then *-1 is a different kind of thing than 1
22:44 notjack_ r: my @a = 1..100; my @idx=(0,1,4,1,*-1,7,10,*-2,5); say @idx[4]+7;
22:44 camelia rakudo a8ca88: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in method Numeric at src/gen/CORE.setting:887␤  in sub infix:<+> at src/gen/CORE.setting:3278␤  in sub infix:<+> at src/gen/CORE.setting:3276␤  in block  at /tmp/LHqQUBKJFE:1␤␤»…
22:44 jtpalmer joined #perl6
22:45 notjack_ r: my @a = 1..100; my @idx=(0,1,4,1,*-1,7,10,*-2,5); @idx =>>- 1;
22:45 camelia rakudo a8ca88: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix > instead�at /tmp/UsJ4punk3M:1�------> [32m @idx=(0,1,4,1,*-1,7,10,*-2,5); @idx =>>[33m�[31m- 1;[0m�»
22:45 rhr_ joined #perl6
22:45 notjack_ r: my @a = 1..100; my @idx=(0,1,4,1,*-1,7,10,*-2,5); @idx >>->> 1;
22:45 integral joined #perl6
22:45 integral joined #perl6
22:45 camelia rakudo a8ca88: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in method Numeric at src/gen/CORE.setting:887␤  in sub infix:<-> at src/gen/CORE.setting:3282␤  in sub infix:<-> at src/gen/CORE.setting:3280␤  in sub hyper at src/gen/CORE.setting:14604␤  …
22:45 lue because things like *-1 create something called WhateverCode, which expects one argument. The array dereferencer (the [] in @a[]) gives the size of the array as that one argument when it encounters WhateverCode as an index.
22:45 notjack_ yes, I understand .. I'm saying that's undesirable.
22:45 lue r: my @a = 1,2,5; say @a[*-*]; # size of array minus size of array == 0
22:46 camelia rakudo a8ca88: OUTPUT«1␤»
22:46 TimToady it's better than magically wrapping around one end of the array but not the other; if you want modular arithmetic on the array indices, there are better ways to do that
22:46 notjack_ TimToady: not without loss of generality
22:47 TimToady -1 in not general
22:47 notjack_ I come from the array programming world (APL, J, K/Q).  Negative indices are a big hit.
22:47 TimToady then the best solution is to declare your arrays to take modular indices
22:47 notjack_ One of the reasons I like p6 is it seems to have a lot of the benefits of the APL family, plus some extra cool stuff
22:48 TimToady yes, but there are also aspects of APL that drive people away screaming
22:48 notjack_ you want to be able to say my @ind=(0,1,-1); and then do things like @a[@ind] and @b[ind] and @a[@ind >>-<<1] etc
22:48 lue .oO(Like lack of a decent Linux-based compiler, IIRC)
22:48 notjack_ TimToady: s/APL/perl/
22:49 notjack_ lue: AFAICT, no compiler exists for APL, Linux or otherwise
22:50 * lue is reminded of his idea to create an APL operators module for P6
22:50 notjack_ lue++
22:50 notjack_ I'm trying to write a J in p6, but hung up because I'm completely ignorant
22:50 lue r: my @a = 1,2,3,4; say @a[*/2];
22:50 camelia rakudo a8ca88: OUTPUT«3␤»
22:51 notjack_ though the lexing went pretty well.
22:52 donaldh https://github.com/rakudo/rakudo/pull/181
22:52 lelf` joined #perl6
22:52 colomon joined #perl6
22:52 lue The most interesting part of an APL module though would be how it works in relation to the non-APL ones (precedence-wise, that is).
22:53 notjack_ imo, one of the most ingeneous design decisions of J is it did away with precedence, almost entirely
22:53 notjack_ that wouldn't work for a syntax-rich language like p6
22:53 notjack_ but it is quite cozy in J
22:53 timotimo donaldh++ # make install for rakudo.jvm
22:53 TimToady unfortunately, most peeople prefer some precedence
22:54 notjack_ the challange is quantifying "some"
22:54 lue precedence isn't an issue within APL (it's right-to-left all the time), but mingling those operators with P6's would be interesting to figure out.
22:54 notjack_ silicon computers are better at maintaing huge tables of precedence than carbon ones are
22:54 notjack_ especially the mushy gray kind
22:54 lue .oO(S03 didn't have an issue quantifying the levels of precedence)
22:54 TimToady lue: obviously you'd just have to pick one precedence level to put them all at
22:55 TimToady lue: yeah, S03 makes it look like no work every went into it :)
22:55 TimToady *eve
22:55 TimToady *ever !!!
22:55 notjack_ *even
22:56 notjack_ there are two precedences of operators in APL, which correspond, roughly, to subs and hyper/meta-operators in p6
22:56 notjack_ then anomalous things like indexing brackets, which you don't have to worry about
22:57 TimToady hypers don't have their own precedence in p6
22:57 lue .oO( ⍝ would require at least a macro and at most a slang. )
22:57 timotimo r: say say "yeah"
22:57 camelia rakudo a8ca88: OUTPUT«yeah␤True␤»
22:57 timotimo does the bool return value for say actually make sense?
22:57 TimToady it does when it returns False because your disk is full
22:58 notjack_ surely the []s in [+] have a higher precedence than the +
22:58 timotimo oke
22:58 TimToady though that's probably a fail
22:58 notjack_ else, they couldn't pick up the + as an argument
22:58 timotimo notjack_: those are listop precedence, yes
22:58 konundra joined #perl6
22:58 timotimo oh, er, no that's not the [ ] being an operator, they are syntax
22:58 timotimo with their own grammar rule actually
22:58 timotimo this isn't a question of precedence then.
22:58 notjack_ what about >><< and friends?
22:59 TimToady hypers don't have their own precedence in p6
22:59 timotimo they are also syntax.
22:59 notjack_ um, what about R?
22:59 TimToady though X and Z are list infixes
22:59 timotimo r: sub frob(Str $foo) { say "succ" }; frob(say "yay");
22:59 camelia rakudo a8ca88: OUTPUT«yay␤Nominal type check failed for parameter '$foo'; expected Str but got Bool instead␤  in sub frob at /tmp/1gmHxfMmAg:1␤  in block  at /tmp/1gmHxfMmAg:1␤␤»
22:59 notjack_ yeah, Z was my next question
22:59 timotimo i think i'll annotate say with "returns Bool" then
22:59 TimToady so slightly looser than list prefixes
22:59 timotimo that ought to make lots of code much more performant! because you end up using the return value of "say" all the time!
23:00 notjack_ anything that can take e.g. + as an argument in APL is termed an "operator" (or, in J, an adverb/conjunction) and has the highest precedence
23:00 notjack_ anything like + or * or % that operate on data (instead of functions) is called a function (in J, verb) and has medium precedence
23:00 notjack_ data, like 'abcded' or 1 2 3 has the lowest precedence
23:01 notjack_ so, in APL, / is an operator (not syntax) and can take a function argument, like +/, which is equivalent to [+] in p6
23:02 notjack_ ~ is similar, and analogous to R
23:02 notjack_ " is similar, and is analogous to >><<
23:02 timotimo right. in APL that may very well make a lot of sense. in perl6land i don't think it makes that much sense – at least at first glance
23:03 TimToady the main difference is that in p6 we wanted very strange things to look very strange, not hide among the other operators
23:03 donaldh PERL6LIB=hello ./perl6 -e 'use Anything' # breaks for me
23:04 donaldh Could someone try this on rakudo jvm ?
23:05 TimToady "This representation can not unbox to a native str"
23:05 donaldh PERL6LIB=blib ./perl6 -e 'use Test' # works
23:05 donaldh Yep, that's what I get.
23:06 donaldh good, isolated test case.
23:06 notjack_ is there a idiomatic way to be able to take a bare operator as an argument ?
23:06 timotimo TimToady: does it make sense to go through the setting and sprinkle it with type annotations where they are correct? how about prefering returns SomeType:D over returns SomeType?
23:06 notjack_ as in zipWith(+,@a)?
23:06 nebuchadnezzar joined #perl6
23:06 timotimo you have to use &infix:<+> or some similar notation
23:06 timotimo (especially since + could be prefix, postfix or infix in that case)
23:06 TimToady @a Z+ @b
23:07 timotimo (although postfix:<+> isn't in the setting, someone could make it up)
23:07 TimToady the Z is uppercase for visibility
23:07 notjack_ I know Z is zipwith, was wondering how I'd write my own
23:07 TimToady I believe it's 'zipwith', yes.
23:07 timotimo i'd think a macro would be the right way to do that, if you know you want the infix:<whatevs> version
23:07 notjack_ can you make a identifier synonym for infix:<+> ?
23:07 timotimo what do you mean by that?
23:07 notjack_ hmm, macros are a good call
23:08 notjack_ (magical declaration) plus = infix:<+>;
23:08 notjack_ zipWith(plus, @a);
23:09 timotimo r: my &the_op = &infix:<+>; say(&the_op)
23:09 camelia rakudo a8ca88: OUTPUT«sub+{<anon>}+{precedence} infix:<+>($a?, $b?) { ... }␤»
23:10 timotimo could also use the $ sigil of course
23:10 TimToady r: constant plus = &infix:<+>; say plus
23:10 camelia rakudo a8ca88: OUTPUT«sub+{<anon>}+{precedence} infix:<+>($a?, $b?) { ... }␤»
23:10 timotimo or that, yes
23:10 notjack_ nice
23:10 notjack_ that's enough for my purposes
23:10 TimToady note that in constant form, you must use () to call it
23:10 notjack_ I'd just write constant plus = infix:<+>; fancyAPLOperator(plus, operands);
23:10 TimToady r: constant plus = &infix:<+>; say plus 1, 2
23:10 camelia rakudo a8ca88: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/cp2wCLrIqo:1â�¤------> [32mconstant plus = &infix:<+>; say plus [33mâ��[31m1, 2[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤        statement endâ�¤        statem…
23:11 TimToady r: constant plus = &infix:<+>; say plus(1, 2)
23:11 camelia rakudo a8ca88: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&plus' called (lines 1, 1)␤»
23:11 TimToady hmm
23:11 TimToady r: constant plus = &infix:<+>; say plus.(1, 2)
23:11 camelia rakudo a8ca88: OUTPUT«3␤»
23:11 TimToady there you go
23:11 TimToady r: constant plus = &infix:<+>; say (plus)(1, 2); # also works
23:11 camelia rakudo a8ca88: OUTPUT«3␤»
23:12 flussence joined #perl6
23:13 notjack_ r: say (1,2,3) +Z 1;
23:13 camelia rakudo a8ca88: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    Z used at line 1â�¤â�¤Â»
23:13 notjack_ n: say (1,2,3) +Z 1;
23:13 camelia niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤        'Z' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36) â�¤  at /home/p6ev…
23:13 TimToady Z+
23:13 notjack_ n: say (1,2,3) Z+ 1;
23:13 camelia niecza v24-88-g1f87209: OUTPUT«2␤»
23:13 TimToady and you don't need the parens, due to *precedence* :)
23:13 TimToady you do need the parens for the hyper version, since hypers are more APL-y
23:14 TimToady nr: say (1,2,3) »+« 1;
23:14 camelia niecza v24-88-g1f87209: OUTPUT«Unhandled exception: Non-dwimmy scalar used with complex item␤  at /home/p6eval/niecza/lib/CORE.setting line 1531 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3361 (ANON @ 15) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3364 (hyper @ 16) ␤…
23:14 camelia ..rakudo a8ca88: OUTPUT«Lists on both side of non-dwimmy hyperop of infix:<+> are not of the same length␤left: 3 elements, right: 1 elements␤  in sub hyper at src/gen/CORE.setting:14591␤  in sub hyper at src/gen/CORE.setting:14579␤  in block  at src/gen/CORE.setting:14570␤  in block  at /…
23:14 TimToady nr: say (1,2,3) «+« 1;
23:14 camelia niecza v24-88-g1f87209: OUTPUT«Unhandled exception: Non-dwimmy scalar used with complex item␤  at /home/p6eval/niecza/lib/CORE.setting line 1531 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3361 (ANON @ 15) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3364 (hyper @ 16) ␤…
23:14 camelia ..rakudo a8ca88: OUTPUT«2␤»
23:14 TimToady bah
23:14 TimToady nr: say (1,2,3) «+» 1;
23:14 camelia rakudo a8ca88, niecza v24-88-g1f87209: OUTPUT«2 3 4␤»
23:15 jferrero joined #perl6
23:15 TimToady that has the precedence of +, not the precedence of listops
23:15 notjack_ hypers and metas are definitely one of the most exciting things about p6 for me
23:15 TimToady because hypers are expected to work more on existing finite structures, not infinite lists
23:16 TimToady APL assumes finite structures, generally, so made decisions more like hypers
23:16 notjack_ both clauses are true, but logically unconnected
23:16 TimToady so you say
23:16 notjack_ there's nothing stopping (e.g.) J from allowing +/i._ where _ is infinity
23:16 rom1504 joined #perl6
23:17 notjack_ we've discussed it any number of times, but nobody donated the tuits
23:17 notjack_ there are drawbacks to the simplified syntax, for sure
23:18 timotimo on the subject of hypers, TimToady, are you planning to review my pull request early enough for me to still have time to fix it up for the upcoming compiler release?
23:18 notjack_ among them, function declaration is fairly primitive
23:18 notjack_ (another reason p6 attracts me)
23:18 donaldh night o/
23:18 BooK joined #perl6
23:19 timotimo night donaldh and thanks for your PR :)
23:19 TimToady timotimo: your notes are a bit terse, but I presume when you say put 'is nodal' into Any, you're talking about putting the trait in, not about making it inherit somehow
23:19 TimToady that is, it inherits the possibility of the trait only
23:19 timotimo yes, that's it. i haven't figured out how to make the inheritance part of it actually work
23:20 TimToady probably okay for now, though in that state it forces every class that 'is Iterable' to add 'is nodal', but maybe that's okay for now, and a conservative default
23:21 TimToady especially if it looks up the most general form of the method
23:21 timotimo indeed. should i go through and put "is nodal" everywhere that already has "is Iterable"? what about positional and associative then?
23:22 TimToady are there any uses of that which aren't iterable?
23:22 timotimo ah, good point. i'll look
23:24 census_ joined #perl6
23:24 * TimToady isn't entire sure how ».foo is implemented any way
23:24 TimToady *anyway
23:24 timotimo Buf does positional, but not Iterable
23:25 TimToady so should Buf default to acting more like a scalar or more like an array?  :)
23:25 TimToady it's a little of both
23:25 timotimo EnumMap does associative but not iterable
23:26 jferrero joined #perl6
23:26 TimToady r: my $b = Buf.new; say @$b ~~ Iterable
23:26 camelia rakudo a8ca88: OUTPUT«True␤»
23:27 TimToady r: my $b = Buf.new; say $b ~~ Iterable
23:27 camelia rakudo a8ca88: OUTPUT«False␤»
23:27 TimToady r: my $b = Buf.new(65, 66, 67); say $b»++
23:27 camelia rakudo a8ca88: OUTPUT«No such method 'succ' for invocant of type 'Buf'␤  in sub postfix:<++> at src/gen/CORE.setting:2075␤  in sub postfix:<++> at src/gen/CORE.setting:2074␤  in sub hyper at src/gen/CORE.setting:14624␤  in sub hyper at src/gen/CORE.setting:14579␤  in sub METAOP_HYPER_PO…
23:27 TimToady heh
23:27 TimToady r: my $b = Buf.new(65, 66, 67); say @$b»++
23:27 camelia rakudo a8ca88: OUTPUT«65 66 67␤»
23:28 TimToady arguably that's wrongish
23:29 TimToady r: my $b = Buf.new(65, 66, 67); say ++«$b
23:29 camelia rakudo a8ca88: OUTPUT«No such method 'succ' for invocant of type 'Buf'␤  in sub prefix:<++> at src/gen/CORE.setting:2068␤  in sub prefix:<++> at src/gen/CORE.setting:2067␤  in sub hyper at src/gen/CORE.setting:14624␤  in sub hyper at src/gen/CORE.setting:14579␤  in sub METAOP_HYPER_PREF…
23:29 TimToady r: my $b = Buf.new(65, 66, 67); say ++«@$b
23:29 camelia rakudo a8ca88: OUTPUT«66 67 68␤»
23:30 TimToady r: my $b = Buf.new(65, 66, 67); ++«@$b; say $b
23:30 camelia rakudo a8ca88: OUTPUT«Buf:0x<41 42 43>␤»
23:30 TimToady r: my $b = Buf.new(65, 66, 67); ++«@$b; say $b.Str
23:30 camelia rakudo a8ca88: OUTPUT«Cannot use a Buf as a string, but you called the Str method on it␤  in method Str at src/gen/CORE.setting:8063␤  in method Str at src/gen/CORE.setting:898␤  in block  at /tmp/G8xZ0D_U4n:1␤␤»
23:30 TimToady r: my $b = Buf.new(65, 66, 67); ++«@$b; say $b.decode("UTF-8")
23:30 camelia rakudo a8ca88: OUTPUT«ABC␤»
23:30 TimToady aww
23:31 timotimo what about List; it does Positional, but not Iterable ... the iterable part comes from the @ container, yes?
23:31 TimToady r: say List.^mro
23:31 camelia rakudo a8ca88: OUTPUT«(List) (Iterable) (Cool) (Any) (Mu)␤»
23:31 TimToady looks Iterable to me
23:31 timotimo oh, btw, should Mu be nodal, too?
23:31 TimToady why?
23:31 timotimo huh? in my code it just does Positional
23:32 timotimo i dunno. because Any is ;)
23:32 TimToady Any is nodal to make all the list methods defined in it nodal
23:32 TimToady what list methods are defined in Mu?
23:32 timotimo oooh
23:32 timotimo List is iterable in Bootstrap!
23:33 TimToady my question is where we look up the 'least derived' method to see how it's marked
23:33 timotimo good point. none are defined in Mu.
23:34 timotimo afaict that part is handled by protos entirely; at least i hope so.
23:34 TimToady @foo».bar pretty much has to do that on the first call to .bar, since you can't call .can without an invocant
23:34 timotimo i suppose a test case is in order for a class hierarchy with protos and stuff
23:34 TimToady timotimo: most of the methods in Any are not multis
23:34 TimToady so don't have a proto
23:35 timotimo so you're saying if i derive from a class that has a method bar, i can never get rid of its nodalness no matter how hard i try?
23:35 TimToady why I changed the spec to say 'least derived'
23:35 TimToady say List.^can('elems')
23:35 TimToady r: say List.^can('elems')
23:35 camelia rakudo a8ca88: OUTPUT«elems elems elems␤»
23:35 TimToady r: say List.^can('elems')[*-1]
23:35 camelia rakudo a8ca88: OUTPUT«elems␤»
23:36 TimToady that's the elems you want to check for 'is nodal'
23:36 timotimo oh!
23:36 timotimo but that's so easy! how is that even possible! ;)
23:36 TimToady but instead of List, probably have to use the first element of the structure to do the lookup
23:36 timotimo yeah, currently i try to look it up on SELF
23:37 timotimo i can change that.
23:37 TimToady self might be an array of something entirely unarray-like, so self won't work
23:37 timotimo good point.
23:37 TimToady Dog.bark might not be nodal even if Tree.bark is
23:38 TimToady the other question is the extent to which we can assume all the elements of the structure have the same type
23:39 timotimo that's hard.
23:39 TimToady yeah, suddenly we're in static-typing land
23:39 timotimo one more problem is that the hyper function gets passed a block -> \obj { obj."$name"(|c) }
23:39 timotimo not really sure how to make that properly signal outwards if obj."$name"(|c) is actually nodal.
23:40 fridim__ joined #perl6
23:40 timotimo the block itself never would be just like that.
23:41 TimToady maybe it ends up coming back to requiring a different dispatcher, as the original duckmapping did
23:41 TimToady one that will fail on an attempt to dispatch to something nodal
23:43 TimToady you'd need an extra bit if you want to cache whether you know something is nodal or not
23:44 TimToady so you call ."elems" the first time, it doesn't know whether it is nodal, so looks up to *-1 and copies the bit into the earlier method routines
23:45 TimToady the spec does say that you can guarantee a single such dispatch for natively typed arrays, since native types don't carry an internal type that could be more specific than the 'of' type
23:46 TimToady for non-native arrays, you can at least cache whether the method name is nodal in the most specific method, and not look it up every time in the most general method
23:46 timotimo okay, but native arrays are NYI, no?
23:46 TimToady yes, but just figuring how hard to push the static typing thing
23:47 TimToady vs just guessing from the first element
23:47 TimToady or letting each element make its own decision, with caching in the first place it'll find the method
23:47 timotimo i'm interested to know how far i have to push this into the "absolutely correct" corner before a first attempt can be merged ;)
23:47 TimToady (rather than the last place)
23:48 TimToady I guess we don't have to make any decision until we find an element that is Iterable (is that what it uses to decide whether to descend?)
23:48 colomon joined #perl6
23:49 timotimo yes, if istype(..., Iterable) succeeds, it will attempt to descend
23:49 iSlug joined #perl6
23:49 TimToady (1,2,3)»[1] is simply going to fail outright
23:50 timotimo however, at that point, our "op" thing is a block that wraps the method call and i don't see how to figure out if that method call will end up being nodal or not without a very big signaling mechanism around it
23:50 TimToady well, as I said above, if we have a form of ."name" dispatch that fails on something nodal, we can just trap that
23:51 timotimo with an exception, yes?
23:51 TimToady it will automatically propagate outside the block on failure
23:51 TimToady yes
23:52 TimToady I think a good case could be made then for latching the decision, and never trying for Iterable again
23:52 TimToady since it's highly likely that if one .elems is nodal, all of them are
23:53 timotimo in that case, what's the difference between checking the first element for nodality and latching upon first finding one that is nodal?
23:54 TimToady otoh, if you're throwing a nodal method at a list of things, it's also pretty certain that all of the elements of the list are Iterable
23:54 TimToady so that just degenerates to examining the first element anyway
23:54 pupoque joined #perl6
23:54 TimToady right, I think we agree on that
23:54 benabik joined #perl6
23:55 TimToady so for now, just check first arg and go with it
23:55 TimToady that should be an easy enough first approximation, and might work forever :)
23:55 timotimo thanks! that's something i can certainly implement with a shred of certainty :P
23:56 timotimo is it considered acceptable to link to irclogs from source code?
23:56 timotimo otherwise i'll summarise why this is an approximation and put up a comment.
23:56 TimToady beats me
23:57 timotimo i'll briefly summarise
23:58 timotimo r: ()[*-1]
23:58 camelia rakudo a8ca88: OUTPUT«Cannot use negative index -1 on List␤current instr.: 'throw' pc 353484 (src/gen/CORE.setting.pir:151255) (src/gen/CORE.setting:9273)␤called from Sub 'sink' pc 385900 (src/gen/CORE.setting.pir:163561) (src/gen/CORE.setting:10552)␤called from Sub 'MAIN' pc 401 (src/g…
23:58 Ulti joined #perl6
23:58 timotimo ah, i'll need to check for that.
23:58 timotimo r: Bool.^can("i_cant_do_this")[*-1]
23:58 camelia rakudo a8ca88: OUTPUT«Cannot use negative index -1 on List␤current instr.: 'throw' pc 353484 (src/gen/CORE.setting.pir:151255) (src/gen/CORE.setting:9273)␤called from Sub 'sink' pc 385900 (src/gen/CORE.setting.pir:163561) (src/gen/CORE.setting:10552)␤called from Sub 'MAIN' pc 401 (src/g…
23:58 timotimo yes indeed
23:59 timotimo r: say (Bool.^can("i_cant_do_this") || [Mu])[*-1]
23:59 camelia rakudo a8ca88: OUTPUT«(Mu)␤»

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

Perl 6 | Reference Documentation | Rakudo