nine | I fear I have to rewrite the whole dependency loading code to fix the occasional failures on file systems with coarse time stamps, i.e. RT #128156 | 09:09 | |
Right now we try to load a precomp file, during loading of the dependencies notice that one of them changed, precompile the source again and load the result. | 09:10 | ||
Sometimes compilation is so fast that it finishes in the same Instant (with just 2 second resolution on crappy file systems) as the dependency's. Then we declare it outdated though we just precompiled it and try to load from source. | 09:12 | ||
Problem is that we really don't know which of them is older when the time stamps match, so we cannot rely on the target module being fresher even though we just compiled it ourselves. Someone else could have recompiled the dependency in the meantime. | 09:15 | ||
All of this was much easier when we locked the whole precomp store during module loading. But a global lock is a luxury we just cannot afford :) | 09:16 | ||
The solution will probably be to first check all dependencies, then open all dependencies' files, then check again and only if they still check out actually pass them to the CompUnit::Loader | 09:18 | ||
If they don't check out again, rinse and repeat. | 09:19 | ||
This will actually make module load times unbounded, but that's just the price for going lockless. | 09:24 | ||
psch | two second resolution on a file system really seems pretty crappy, at a glance :S | 09:25 | |
dalek | kudo/nom: 05691d4 | lizmat++ | src/core/Rakudo/Internals.pm: Make EmptyIterator still faster for push-all |
09:27 | |
kudo/nom: beb3c98 | lizmat++ | src/core/List.pm: Make iteration of Lists about 10% faster - by differentiating between reified/non-reified lists - by making sure an iterator doesn't take slow, non-reified path again - by making smaller, inlineable methods - by not allocating if not necessary - by using the new EmptyIterator if a list is completely empty |
|||
nine | On to be fair, the race condition has been there all along. The timestamp issue just exposed it even in a non-parallelized test. | 09:29 | |
lizmat | psch: that's FAT for you, or are there other ones ? | 09:33 | |
if I remember correctly, there were only 5 bits left for the second value | |||
on MS-DOS FAT systems | |||
nine | lizmat: seems like on OS X we also only get 1 second resolution of time stamps. Though that could just be a missing patch for MoarVM | 09:34 | |
psch doesn't know a lot about file systems | |||
lizmat | nine: on OS X, you could use IO.watch | 09:35 | |
but I have doubts on the timeliness of it, judging from how long it sometimes takes before a Finder window updates | 09:37 | ||
nine | lizmat: sounds like a possible optimization once I've fixed the algorithm. Because it might turn out that we will recompile unnecessarily in certain cases just to be sure. | 09:38 | |
pmurias | nine: would just md5ing things be a possible solution on systems with crappy timestamps? | 09:58 | |
nine | pmurias: indeed an intriguing proposition. That would change the question from "is it up to date" to "is it the same". | 10:04 | |
pmurias | nine: s/md5/sha1/ ;) | 10:11 | |
nine | pmurias: yes, yes, yes, I can generate the sha when assembling the precomp file and store it on top | 10:17 | |
psch | hrm, this is weird | 10:25 | |
i've added code to check for valid args for the setcodeobj calls we write | |||
and there's no problem there | |||
which is somewhat inconsistent with the error that pops up :P | |||
travis-ci | Rakudo build failed. Elizabeth Mattijsen 'Make iteration of Lists about 10% faster | 10:27 | |
travis-ci.org/rakudo/rakudo/builds/133703776 github.com/rakudo/rakudo/compare/7...b3c9868963 | |||
psch | i suppose that means i'll have to check where exactly that setcodeobj call comes from | 10:33 | |
nine | psch: look for generated code, not the runtime | ||
psch | nine: i'm checking (and dying if there's a problem) during code gen | 10:34 | |
the bit commented with "Add code object fixups" in jvm/QAST/Compiler.nqp, to be precise | |||
and if it's not going through there, i really don't know where it could go through | 10:35 | ||
that's the only place we use setcodeobj in Compiler.nqp | |||
well, except it's a setcodeobj call that gets written to QAST somewhere in e.g. World | |||
...huh, that fits doesn't it | 10:36 | ||
as in, the problem that we have is that is *doesn't* get a fixup | |||
nine | github.com/perl6/nqp/blob/master/s....nqp#L3382 | 10:38 | |
that's definitely it | |||
psch | yeah, that's where my debug code sits | ||
nine | the code obj is there during compilation but no longer when loaded from the bytecode file | 10:39 | |
the equivalent code on moar doesn't run | |||
but adding a check for is_nested will give you a NPE | 10:40 | ||
because it's expecting more code objects than it finds | |||
lunch now | |||
dalek | p: a855dd0 | (Pawel Murias)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp: Decontainerize the argument to setwho for consistency with the JVM backend. |
11:04 | |
p: eb74bba | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files): [js] Serialize/deserialize the HLL role. |
|||
p: 29186d6 | (Pawel Murias)++ | src/vm/js/ (2 files): [js] Decontainerize the arguments to a whole bunch of ops. |
|||
p: 235f116 | (Pawel Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: [jvm] Remove dead code. |
|||
nqp: 6f33259 | (Pawel Murias)++ | src/vm/jvm/ (2 files): | |||
nqp: [jvm] Make nqp::reprname decontainerize it's argument. | |||
[Tux] | This is Rakudo version 2016.05-28-gbeb3c98 built on MoarVM version 2016.05 | 11:18 | |
test 20.347 | |||
test-t 13.025 | |||
csv-parser 34.376 | |||
nine | Oh the irony! nqp::sha1 can only hash strings, not buffers though SHA1 is clearly defined on a byte level rather than character data. | 14:51 | |
timotimo | m( | 15:23 | |
yeah | |||
nine | I guess decoding the buffer from latin-1 should keep it unharmed | 15:24 | |
timotimo | it'd still be nice if we would just let the sha1 op take bufs, too | 15:39 | |
also less overhead i suppose | |||
you wouldn't want to build a hash cracker when you can only work with strings and they'd have to be decoded every single time | |||
nine | Meh...with a decode("latin-1") it's not \0 safe | 16:52 | |
lizmat | I guess it's because nqp::sha predates Buf/Blob implementation | 16:58 | |
timotimo | yeah, could very well be | 17:40 | |
Woodi | nine: looks turning off atimes and dirtimes is common optimalization on SSD drives :) isn't atomic move enought ? also repo lock on maintenance work is not uncommon... | 18:39 | |
geekosaur | that's not so much optimization as it is extending write lifetime | 18:44 | |
Zoffix | Does anything bad happen if I delete my fork of rakudo? | 18:47 | |
I can't be arsed to figure out how to make it up to date with rakudo/rakudo... | |||
geekosaur | you lose any non-upstreamed changes you might have | 18:48 | |
Zoffix | Ah, k. There aren't any. | ||
geekosaur | other than that, it seems to do the right thing (I had a trashed fork of another project, nuked it and re-forked, things became sane and nothing appears to have come unhinged/dangling) | 18:49 | |
psch | alternatively you can add upstream as remote and do something like "git pull upstream && git reset --hard upstream/nom" i think | ||
and then force push to your fork | 18:50 | ||
actually, i think the pull isn't needed, and a fetch might be enough | |||
'cause pull might want to merge, which makes everything annoying :) | |||
Zoffix | Normally git pull --rebase github.com/rakudo/rakudo; works, but there are conflicts this time. | 18:51 | |
How long is our deprecation cycle? | 18:52 | ||
psch | pre-christmas it was a half a year i think? then a clean break with christmas, and "it didn't come up yet" now afaik :) | ||
Zoffix | m: say from-json '[]' | 18:53 | |
camelia | rakudo-moar beb3c9: OUTPUT«[]» | ||
Zoffix | Oh, I thought that was deprecated and giving warnings... never mind | ||
psch | m: sub f is DEPRECATED { }; f() | ||
camelia | ( no output ) | ||
Zoffix | (it probably is, but isn't giving warnings) | 18:54 | |
Hm, it is: github.com/rakudo/rakudo/blob/3f9f...etty.pm#L7 | |||
psch | m: say %*ENV.keys.grep(/:i dep/) | 18:55 | |
camelia | rakudo-moar beb3c9: OUTPUT«(RAKUDO_NO_DEPRECATIONS)» | ||
psch | m: say %*ENV.grep(.key ~~ /:i dep/) | ||
camelia | rakudo-moar beb3c9: OUTPUT«Method 'key' not found for invocant of class 'Any' in block <unit> at /tmp/EUyiVLcsPO line 1» | ||
psch | m: say %*ENV.pairs.grep(.key ~~ /:i dep/) | ||
camelia | rakudo-moar beb3c9: OUTPUT«Method 'key' not found for invocant of class 'Any' in block <unit> at /tmp/qVtov65sRF line 1» | ||
Zoffix | Ah | ||
psch | m: say %*ENV.pairs.grep(*.key ~~ /:i dep/) | ||
camelia | rakudo-moar beb3c9: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/fiG4AtUwgW line 1()» | ||
psch | grm | ||
m: say %*ENV.grep({ $_ .key ~~ /:i dep/ }) | |||
camelia | rakudo-moar beb3c9: OUTPUT«(RAKUDO_NO_DEPRECATIONS => 1)» | ||
psch | there :P | ||
Zoffix | m: BEGIN %*ENV<RAKUDO_NO_DEPRECATIONS> = 0; say from-json '[]' | 18:56 | |
camelia | rakudo-moar beb3c9: OUTPUT«[]Saw 1 occurrence of deprecated code.================================================================================Sub from-json (from GLOBAL) seen at: /tmp/e_bkH_UeV4, line 1Please use JSON::Fast, JSON::Tiny or JSON::Pretty from https:/…» | ||
Zoffix | Is there some way to find out what stuff is specifically deprecated and when it's supposed to be removed? | 18:57 | |
I mean other than grepping for 'deprecated' and looking up commit dates ;/ | |||
psch | it used to say when stuff was gonna be removed i think | 19:01 | |
not sure how that worked, though | |||
Zoffix | :/ | 19:02 | |
geekosaur | that was only done for stuff deprecated before 6.c, and they were all deprecated by release | 19:13 | |
I think deprecations that are part of spec are here until 6.d at least | |||
Zoffix | k | 19:16 | |
FWIW: I'm getting test failures with current rakudo checkout: gist.github.com/zoffixznet/7623d88...d9c4b0ebb9 | 19:17 | ||
geekosaur | (actually I'd assume spec deprecations are valid now, marked deprecated in 6.d, removed in 6.e) | ||
psch | i think S17 is still suspectable to flapping | ||
Zoffix: do they reliably fail at the same spot, even when run standalone with make or with perl6-m? | 19:18 | ||
geekosaur | S17-supply is certainly still flapping. the S17-lowlevel one I don't recall seeing on linux or os x | ||
oh, I see, from-json. not spec, and no idea how it's being handled | 19:19 | ||
Zoffix | S17 segfaulted on the third try: gist.github.com/zoffixznet/ccf2b5d...c9818da084 | ||
psch | yeah, i'd think that's the same, known, inconsistent behavior | 19:20 | |
unfortunately not enough people who understand moar async around vOv | |||
Zoffix | S17-supply/syntax.t just says Aborted on each run: gist.github.com/zoffixznet/3898ea1...4bbe2c9463 | ||
Oh... do I need to do some sort of special magic on them, to make them rakudo-specific? | 19:21 | ||
psch | if you ran them with 'make $file' or 'make spectest' there should be a $file.rakudo in the same folder | 19:22 | |
i think even .rakudo-moar | |||
that one you can run with perl6-m | |||
Zoffix | And t/spec/S32-num/power.rakudo.moar seems to reliably fail the same: gist.github.com/zoffixznet/6e5b6aa...5ab7fb6bc9 | ||
I don't have .moar files for the other two tests, so I guess they don't have special stuff | 19:23 | ||
psch | Zoffix: well, considering that "fail" is passing a few TODOs and a few not that's ok :) | ||
TODO tests are expected to not pass, and come up in the summary if they do pass | 19:24 | ||
Zoffix | Oh, ok. | ||
bartolin | those passing TODOs should probably fudged specifically for OS X (they pass for me on FreeBSD as well) | 19:26 | |
*be fudged | |||
Zoffix | So... any idea on how to fix any of this stuff? Or will it go into release anyway? | 19:28 | |
psch | considering the S17 flappers have been around for probably a year or so... :/ | 19:29 | |
Zoffix | :/ | ||
psch | passing TODOs usually only pass platform-specific | ||
well, it *is* moar-dependent async, feel free to dig in :) | |||
Zoffix | I'm not ready for that yet :P | ||
bartolin | speaking of fudged tests which actually pass: there is skiped block in integration/advent2014-day05.t which works on my machine. could someone else try and run that test file without the "skip"? | 19:36 | |
I'm a bit reluctant to change that in roast because it seemed to be a flapper, too | |||
psch | seems to hang here..? | 19:41 | |
psch waits another minute or so | |||
yeah, still nothing happening | 19:43 | ||
bartolin: 5 minutes now, still hanging. i'd leave that skipped :) | 19:46 | ||
Zoffix | PR to fix RT#128284 github.com/rakudo/rakudo/pull/777 | 19:47 | |
rt.perl.org/Ticket/Display.html?id=128284 | |||
Oh, w00t! PR #777 :) If only I gave any credence to the existence of lucky numbers 😜 | 19:48 | ||
psch | m: my $a = { say "foo"; say "bar" }; say $a.?name | 19:50 | |
camelia | rakudo-moar beb3c9: OUTPUT«» | ||
psch | m: say Callable.^can('name') | ||
camelia | rakudo-moar beb3c9: OUTPUT«Too many positionals passed; expected 2 arguments but got 3 in block <unit> at /tmp/N0KzTkHJ0t line 1» | ||
psch | m: say Callable.can('name') | ||
camelia | rakudo-moar beb3c9: OUTPUT«()» | ||
psch | Zoffix: i think .? doesn't do what you think it does | ||
Zoffix | psch, it calls a method if it exists or returns a Nil .... doesn't it? | 19:52 | |
bartolin | psch: thanks! | ||
psch | Zoffix: it does, sorry | 19:53 | |
Zoffix | m: say "{$_.?name() || $_.^name()}" for sub{}, sub bar {}, *, -> {}, {;}, &[<], &sum | ||
camelia | rakudo-moar beb3c9: OUTPUT«SubbarWhateverBlockBlockinfix:«<»sum» | ||
psch | actually, i misinterpreted my result for the Block test above :) | ||
Zoffix | Ah | ||
psch | m: say Nil | 19:54 | |
camelia | rakudo-moar beb3c9: OUTPUT«Nil» | ||
Zoffix | psch, it returns an empty string | ||
psch | m: say { Nil }() | ||
camelia | rakudo-moar beb3c9: OUTPUT«Nil» | ||
psch | Block.name does? | ||
Zoffix | m: my $a = { say "foo"; say "bar" }; say $a.name eqv '' | ||
camelia | rakudo-moar beb3c9: OUTPUT«True» | ||
psch | that is really confusing | 19:55 | |
m: say "" // "foo" | 19:56 | ||
camelia | rakudo-moar beb3c9: OUTPUT«» | ||
psch | well, never mind where that name method comes from vOv | ||
otherwise it looks fine to me, even though i somewhat dislike || for "is this a non-empty Str" | 19:57 | ||
or "is this 0", for that matter | |||
but that's probably just me :) | |||
psch isn't really programming-minded anymore, apparently | 19:58 | ||
well, for today only hopefully :P | |||
dalek | kudo/nom: 9ff1af5 | (Zoffix Znet)++ | lib/Test.pm6: Fix RT#128284: warnings on failing Test::cmp-ok Instead of attempting to stringify the matcher, we try to call .name (that will give us name for named subs) or call ^.name, which will give us the name of the thing, such as Block, Whatever, etc. |
19:59 | |
kudo/nom: 4a7eaa0 | peschwa++ | lib/Test.pm6: Merge pull request #777 from zoffixznet/fix-RT128284 Fix RT#128284: warnings on failing Test::cmp-ok |
|||
Zoffix | \o/ | 20:00 | |
psch | now, considering that passing $op to &cmp-ok as Str is per design, feel free to solve that too ;) | 20:01 | |
geekosaur | glwt | 20:02 | |
Zoffix | Wouldn't doing so nullify my RFC to ditch that feature? :P | 20:04 | |
psch | ...i suppose it would | ||
Zoffix | Plus, I don't know how to fix the security issue ¯\_(ツ)_/¯ | ||
psch | well, it *is* EVAL... | ||
on the other hand it is a test function | 20:05 | ||
Zoffix | m: EVAL "run 'ls'" | ||
camelia | rakudo-moar beb3c9: OUTPUT«run is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in sub run at src/RESTRICTED.setting line 14 in block <unit> at EVAL_0 line 1 in block <unit> at /tmp/bf7rOdD5sz line 1» | ||
Zoffix | It's protected here... | ||
psch | m: "run 'ls'".EVAL.say | ||
camelia | rakudo-moar beb3c9: OUTPUT«run is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in sub run at src/RESTRICTED.setting line 14 in block <unit> at EVAL_0 line 1 in block <unit> at /tmp/p5No4LGFRS line 1» | ||
Zoffix | m: use Test; cmp-ok '', '~~>;warn run "ls"; <z', '', ''; | ||
camelia | rakudo-moar beb3c9: OUTPUT«Perlitodalek-queueevalbotevalbot.logfooliblogmboxnqp-jsp1p2p6eval-tokenperl5rakudo-j-1rakudo-j-2rakudo-j-instrakudo-j-inst-1rakudo-j-inst-2rakudo-m-1rakudo-m-2rakudo-m-instrakudo-m-inst-1rak…» | ||
psch | oh hm | 20:06 | |
actually that's quite easy to fix in that specific case i think | |||
Zoffix | Well volunteered! :P | ||
psch | m: my $x = '<'; say ::("&infix:<$x>") | 20:07 | |
camelia | rakudo-moar beb3c9: OUTPUT«No such symbol '&infix:<<>' in block <unit> at /tmp/f7U8AXJNyy line 1Actually thrown at: in block <unit> at /tmp/f7U8AXJNyy line 1» | ||
psch | m: my $x = '<'; say ::("&infix:[$x]") | ||
camelia | rakudo-moar beb3c9: OUTPUT«Use of uninitialized value <element> of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in any canonicalize_pair at src/Perl6/World.nqp line 4331Use of uninitialized value <element> of type A…» | ||
psch | m: my $x = '<'; say ::("&infix:<<$x>>") | ||
camelia | rakudo-moar beb3c9: OUTPUT«Use of uninitialized value $x of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in code at /tmp/v0XBTsvRYJ line 1No such symbol '&infix:<<<>>' in block <unit> at /tmp/v0XBTsvRYJ line 1…» | ||
psch | well, maybe not :P | ||
also kinda silly that the actual symbol isn't found, but it doesn't parse error | |||
m: my $x = '=='; say ::("&infix:<$x>") | |||
camelia | rakudo-moar beb3c9: OUTPUT«sub infix:<==> (Mu $?, Mu $?) { #`(Sub+{<anon|52917568>}+{Precedence}|51437744) ... }» | ||
Zoffix | m: my $x = '<'; say ::("&infix:«$x»") | 20:08 | |
camelia | rakudo-moar beb3c9: OUTPUT«Use of uninitialized value $x of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in code at /tmp/cBZsGiWNCQ line 1sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|52917568>}|67963888) ... }» | ||
Zoffix | m: BEGIN my $x = '<'; say ::("&infix:«$x»") | ||
camelia | rakudo-moar beb3c9: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|52917568>}|52845664) ... }» | ||
psch | oh, right, that again | ||
Zoffix | How come the == worked? | ||
psch | well, the ::() lookup itself is runtime | ||
so i suspect that we really don't install &infix:<<>, because we couldn't even parse it anyway | 20:09 | ||
Zoffix | m: my $x = '<'; say ::("&infix:«$x»") | ||
camelia | rakudo-moar beb3c9: OUTPUT«Use of uninitialized value $x of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in code at /tmp/AD4OLKgg4Z line 1sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|52917568>}|73985008) ... }» | ||
Zoffix | m: my $x = '=='; say ::("&infix:«$x»") | ||
camelia | rakudo-moar beb3c9: OUTPUT«Use of uninitialized value $x of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in code at /tmp/QbpwRhao_k line 1No such symbol '&infix:«==»' in block <unit> at /tmp/QbpwRhao_k line 1…» | ||
psch | see, it warns, but finds it | ||
Zoffix | oh | ||
wtf | |||
m: my $x = '=='; say ::("&infix:<$x>") | |||
camelia | rakudo-moar beb3c9: OUTPUT«sub infix:<==> (Mu $?, Mu $?) { #`(Sub+{<anon|52917568>}+{Precedence}|53330048) ... }» | ||
psch | yeah, double interpolation | ||
m: my $x = '=='; say ::("&infix:<<$x>>") | |||
camelia | rakudo-moar beb3c9: OUTPUT«Use of uninitialized value $x of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in code at /tmp/MhnVYdLjll line 1No such symbol '&infix:<<==>>' in block <unit> at /tmp/MhnVYdLjll line 1…» | ||
psch | ...probably, something like that | 20:10 | |
m: my $op = '&infix:<<>'; say ::($op) | |||
camelia | rakudo-moar beb3c9: OUTPUT«No such symbol '&infix:<<>' in block <unit> at /tmp/kqEHnTJzve line 1Actually thrown at: in block <unit> at /tmp/kqEHnTJzve line 1» | ||
psch | m: my $op = '&infix:[<]'; say ::($op) | ||
camelia | rakudo-moar beb3c9: OUTPUT«No such symbol '&infix:[<]' in block <unit> at /tmp/25Vr57bheU line 1Actually thrown at: in block <unit> at /tmp/25Vr57bheU line 1» | ||
psch | m: my $op = q{&infix:['<']}; say ::($op) | ||
camelia | rakudo-moar beb3c9: OUTPUT«No such symbol '&infix:['<']' in block <unit> at /tmp/8jkZPafY7u line 1Actually thrown at: in block <unit> at /tmp/8jkZPafY7u line 1» | ||
psch gives up vOv | 20:11 | ||
Zoffix | I don't get what you mean by double interpolation.... What difference is there between m: my $x = '=='; say ::("&infix:«$x»") and m: my $x = '=='; say ::("&infix:<$x>") | ||
psch | m: my $x = "foo"; say <$x>; say <<$x>> | 20:12 | |
camelia | rakudo-moar 4a7eaa: OUTPUT«$x(foo)» | ||
nine | Woodi: we don't use atime, but we surely need mtime. Also I was not talking about locking the repo on maintenance but on read | ||
psch | i'm really just getting more confused right now, honestly | ||
the "" interpolate the $x already :/ | 20:13 | ||
bartolin | psch, Zoffix: is this related: RT #127284 | ||
rt.perl.org/Ticket/Display.html?id=127284 | |||
psch | bartolin: probably somehow, yeah | 20:14 | |
Zoffix | m: sub &infix:«$op» { say $^a + $^b }; 2 $op 4 | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«===SORRY!=== Error while compiling /tmp/Ab3Fo4SH5qMissing blockat /tmp/Ab3Fo4SH5q:1------> sub⏏ &infix:«$op» { say $^a + $^b }; 2 $op 4 expecting any of: new name to be defined» | ||
Zoffix | m: sub infix:«$op» { say $^a + $^b }; 2 $op 4 | 20:15 | |
camelia | rakudo-moar 4a7eaa: OUTPUT«===SORRY!=== Error while compiling /tmp/lNbcZ1arYQColon pair value '$op' too complex to use in nameat /tmp/lNbcZ1arYQ:1------> sub infix:«$op»⏏ { say $^a + $^b }; 2 $op 4 expecting any of: postfix» | ||
Zoffix | m: sub infix:<$op> { say $^a + $^b }; 2 $op 4 | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«6» | ||
Zoffix | OK. For some reason I thought «» in this case was just a different way to write <> | ||
m: sub infix:q{$op}| { say $^a + $^b }; 2 $op 4 | 20:16 | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«===SORRY!===Internal error: find_var_decl could not find $_» | ||
psch | *that* is neat | ||
but yeah, the colonpair after routine_decl doesn't allow different quoting constructs | 20:17 | ||
as in, it's really a colonpair, not a colon followed by a Str | |||
Zoffix | m: sub infix:<\<\<\<> { say $^a + $^b }; 2 <<< 4 | 20:18 | |
camelia | rakudo-moar 4a7eaa: OUTPUT«6» | ||
b2gills | m: my $op = '+'; say CORE::{"&infix:<$op>"}(3,4) | 20:19 | |
camelia | rakudo-moar 4a7eaa: OUTPUT«7» | ||
bartolin | heh, RT #126646 is also fixed, Zoffix++ | 20:21 | |
Zoffix | m: use MONKEY-SEE-NO-EVAL; my $op = '<'; $op.subst-mutate: '<', '\<'; my $matcher = EVAL "&infix:<$op>"; $matcher(3,4).say; $matcher(4,3).say | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«TrueFalse» | ||
Zoffix | So that's the fix for the Str form of cmp-ok | ||
Zoffix won't submit it, because of wanting Str form to be gone :P | 20:22 | ||
Well, part of the fix. > is needed too | 20:23 | ||
psch | i wouldn't really consider it fixed while it still has EVAL, actually | ||
Zoffix | Is there even a way to avoid the EVAL, while keeping Str? | 20:24 | |
psch | m: my $x = '<'; say quietly ::("&infix:«$x»") | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«Use of uninitialized value $x of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in code at /tmp/rxyY2JVyLD line 1sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|61760624>}|66583376) ... }» | ||
psch | hrm, that's not how that warnings goes away :/ | ||
but yeah, without that uninit warning that form would be right | |||
'cause that's a runtime lookup, not an EVAL | |||
m: my $x = '<'; say quietly ::('&infix:«$x»') | 20:25 | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«No such symbol '&infix:«$x»' in block <unit> at /tmp/SX20Q2JPSf line 1Actually thrown at: in block <unit> at /tmp/SX20Q2JPSf line 1» | ||
psch | ...really weird | ||
m: my $x = '<'; say quietly ::('&infix:«\qq[{$x}]»') | |||
camelia | rakudo-moar 4a7eaa: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|61760624>}|64543632) ... }» | ||
geekosaur | ? | ||
psch | ah, there you go | ||
m: my $x = '<'; say ::('&infix:«\qq[{$x}]»') | |||
camelia | rakudo-moar 4a7eaa: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|61760624>}|70859600) ... }» | ||
psch | so, that form, with < > if the op contains « or » | 20:26 | |
Zoffix | Ah, k | ||
psch | m: my $x = '<'; say ::('&infix:«\qq[$x]»') | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|61760624>}|73292640) ... }» | ||
psch | well, *that* form :) | ||
don't need {} inside qq for a scalar | 20:27 | ||
Zoffix | What if it contains both > and »? | ||
psch | m: my $x = '<'; say ::('&infix:[\'\qq[$x]\']') | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«No such symbol '&infix:['<']' in block <unit> at /tmp/MmAxrmkdTf line 1Actually thrown at: in block <unit> at /tmp/MmAxrmkdTf line 1» | ||
psch | :/ | ||
then everything is broken /o\ | |||
m: say &infix:['<'] | |||
camelia | rakudo-moar 4a7eaa: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|61760624>}|68303488) ... }» | ||
psch | ah | 20:28 | |
Zoffix | ? | ||
psch | m: say &infix:«==» | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«sub infix:<==> (Mu $?, Mu $?) { #`(Sub+{<anon|61760624>}+{Precedence}|34816160) ... }» | ||
psch | m: say ::('&infix:«==»') | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«No such symbol '&infix:«==»' in block <unit> at /tmp/nwWRSu5Krx line 1Actually thrown at: in block <unit> at /tmp/nwWRSu5Krx line 1» | ||
psch | Zoffix: well, we only *install* one form of the &infix ops for runtime lookup, but the grammar cheats when it parses it at compile time | ||
Zoffix: note that «==» also doesn't nominally exist | 20:29 | ||
m: say CORE::{&infix:«==»} | |||
camelia | rakudo-moar 4a7eaa: OUTPUT«Sub+{<anon|61760624>}+{Precedence} object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/fpmM9ei7yf line 1Nil» | ||
psch | m: say &(CORE::{&infix:«==»}) | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«Sub+{<anon|61760624>}+{Precedence} object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/qN0gdtVvPM line 1Nil» | ||
psch | anyway, yeah | ||
b2gills | say ::{'&infix:«<»'}; say ::{'&infix:<+>'} | 20:30 | |
m: say ::{'&infix:«<»'}; say ::{'&infix:<+>'} | |||
camelia | rakudo-moar 4a7eaa: OUTPUT«sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|61760624>}|60447488) ... }sub infix:<+> (Mu $?, Mu $?) { #`(Sub+{<anon|61760624>}+{Precedence}|52712400) ... }» | ||
psch | m: say ::('&infix:«==»') | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«No such symbol '&infix:«==»' in block <unit> at /tmp/SX6n176EIX line 1Actually thrown at: in block <unit> at /tmp/SX6n176EIX line 1» | ||
psch | ...i already did that | ||
psch better heads bedwards o/ | 20:31 | ||
b2gills | For some reason if there is a < it has to be «» otherwise it has to be <> | ||
psch | b2gills: 'cause that's the literal lexical names | ||
b2gills | m: say ::('&infix:<==>') | ||
camelia | rakudo-moar 4a7eaa: OUTPUT«sub infix:<==> (Mu $?, Mu $?) { #`(Sub+{<anon|53470544>}+{Precedence}|42791312) ... }» | ||
psch | b2gills: the compile look-up cheats, but the runtime on doesn't | ||
b2gills: hence why &infix:«==» prints &infix:<==> | 20:32 | ||
..."hence why" reads like i should really go to bed :P | |||
o/ | |||
b2gills | m: say -> $op { ::{'&infix:<' ~ $op ~ '>'} // ::{'&infix:«' ~ $op ~ '»'} } for « + < » | 20:34 | |
camelia | rakudo-moar 4a7eaa: OUTPUT«-> $op { #`(Block|55970128) ... }-> $op { #`(Block|55970200) ... }» | ||
b2gills | m: say -> $op { ::{'&infix:<' ~ $op ~ '>'} // ::{'&infix:«' ~ $op ~ '»'} }($_) for « + < » | 20:35 | |
camelia | rakudo-moar 4a7eaa: OUTPUT«sub infix:<+> (Mu $?, Mu $?) { #`(Sub+{<anon|53470544>}+{Precedence}|47724080) ... }sub infix:«<» (Mu $?, Mu $?) { #`(Sub+{<anon|53470544>}|55459632) ... }» | ||
travis-ci | Rakudo build failed. peschwa 'Merge pull request #777 from zoffixznet/fix-RT128284 | 21:20 | |
travis-ci.org/rakudo/rakudo/builds/133778427 github.com/rakudo/rakudo/compare/b...7eaa06b5e3 |