Perl 6 language and compiler development | Logs at colabti.org/irclogger/irclogger_log/perl6-dev | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm Set by Zoffix on 27 July 2018. |
|||
Geth | rakudo: vrurg++ created pull request #2966: Added test for async bug |
00:49 | |
01:13
evalable6 left
01:16
evalable6 joined,
ChanServ sets mode: +v evalable6
|
|||
Geth | rakudo: kazcw++ created pull request #2967: add tests for #2965 |
02:09 | |
synopsebot | RAKUDO#2965 [open]: github.com/rakudo/rakudo/issues/2965 I can't HAS stub? | ||
Kaiepi | m: say sub () { LEAVE return 1 }() | 03:10 | |
camelia | Attempt to return outside of any Routine in sub at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Kaiepi | m: EVAL "say sub () { LEAVE return 1 }()" | 03:11 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma to override this error, but only if you're VERY sure your data contains no injection attacks) at <tmp>:1 ------> 3EVAL "say… |
||
Kaiepi | m: use MONKEY-SEE-NO-EVAL; EVAL "say sub () { LEAVE return 1 }()" | ||
camelia | Attempt to return outside of any Routine in block at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Kaiepi | evalable6, say sub () { LEAVE return 1 }() | 03:12 | |
evalable6 | (exit code 1) Attempt to return outside of any Routine in sub at /tmp/wmjLFMatY3 line 1 in block <unit> at /tmp/wmjLFMatY3 line 1 |
||
Kaiepi | ok weird i can get this to run fine outside of eval, but not when i'm using it | ||
wait never mind | 03:19 | ||
MoarVM panic: Internal error: Unwound entire stack and missed handler | |||
03:36
Kaiepi left
03:38
Kaiepi joined
03:42
Kaiepi left,
Kaiepi joined
03:47
Kaiepi left
03:51
Kaiepi joined
04:06
vrurg left
|
|||
timotimo | Kaiepi: probably the fact that you were using " instead of ' and the LEAVE was running outside of the eval anyway :) | 04:52 | |
05:24
epony left
06:43
notable6 left,
nativecallable6 left,
coverable6 left,
evalable6 left,
benchable6 left,
undersightable6 left,
unicodable6 left,
quotable6 left,
reportable6 left,
releasable6 left,
squashable6 left,
greppable6 left,
bisectable6 left,
bloatable6 left,
statisfiable6 left,
committable6 left,
shareable6 left
06:44
releasable6 joined,
nativecallable6 joined,
quotable6 joined,
statisfiable6 joined
06:45
shareable6 joined,
greppable6 joined,
ChanServ sets mode: +v greppable6,
coverable6 joined,
squashable6 joined,
ChanServ sets mode: +v squashable6
06:46
undersightable6 joined,
reportable6 joined,
bloatable6 joined,
ChanServ sets mode: +v bloatable6
06:47
committable6 joined,
notable6 joined,
unicodable6 joined,
ChanServ sets mode: +v unicodable6,
benchable6 joined,
evalable6 joined,
ChanServ sets mode: +v evalable6
06:48
bisectable6 joined
07:19
robertle joined
|
|||
lizmat | Files=1262, Tests=107959, 205 wallclock secs (26.67 usr 7.79 sys + 2857.02 cusr 284.08 csys = 3175.56 CPU) | 09:13 | |
looks like S11-modules/export.t is broken: Could not instantiate role 'Foo::Bar': | 09:14 | ||
vrurg ^^ ?? | |||
ah, fixed in a commit last night, so please ignore ^^ :-) | 09:19 | ||
Geth | rakudo: db46aeb3ac | (Tom Browder)++ (committed using GitHub Web editor) | docs/rakudo-nqp-and-pod-notes.md move plural s outside bold type |
11:21 | |
13:28
lucasb joined
13:35
pamplemousse joined
13:54
pamplemousse left
|
|||
tbrowder | hi, #perl6-dev | 14:45 | |
i have a pod question: why do we need to completely parse pod during a program execution? i know the current specs require it, but what about, in a future version, just bypassing it and having p6doc do that? for one thing, maybe it would speed up execution. | 14:51 | ||
14:52
vrurg joined
|
|||
tbrowder | plus it should require less memory. | 14:53 | |
better security (see github concerns)? | 14:55 | ||
just cogitating... | |||
ugexe | well, $=pod for one | 14:59 | |
timotimo | execution wouldn't speed up, and we're almost good at not deserializing things that aren't used | ||
so the pod objects are in the .moarvm file, but won't be blown up to actual objects | |||
ugexe | also what if you want to write pod that changes the perl6 grammar | 15:03 | |
timotimo | how do you mean? | 15:04 | |
ugexe | as a joke lets say i wanted to create a DSL but implemented in pod such that when out of the pod one can write in the dsl | 15:05 | |
and by "in pod" i most likely mean executing perl6 code inside pod | |||
is this not possible? | 15:06 | ||
timotimo | you can't really put perl6 code inside of pod, just in between pod bits | 15:07 | |
but of course if you have a slang that looks inside pod bits, there can be code in there | |||
ugexe | so id have to write another slang to allow to run perl6 code in pod | ||
tbrowder | timotimo: i'm really asking the question because i want to start working in pod again but may be up against the "no-double-parse" rule. | 15:10 | |
timotimo | yeah, that makes it a little trickier | ||
tbrowder | fundamentally the pod chunks (pod between ambient code) are a list of lines that unfortunately require a lot of look back or really ugly code. my current look is trying to delay assembly of the tokens to qast until all the parts are defined but, by first analyzing grossly by lines, the pain may be eased. | 15:16 | |
timotimo | i kind of wish the samecase and samemark subs/methods would support a way to repeat the pattern | 17:13 | |
lizmat | m: dd Rakudo::Internals::JSON.from-json(Q/+1/) # /me is surprised that "+1" is not a valid numeric JSON string | 17:16 | |
camelia | Invalid JSON: at 1: expected a json object, but got + (context: "+1") in block <unit> at <tmp> line 1 |
||
lizmat | m: dd Rakudo::Internals::JSON.from-json(Q/-1/) # while -1 is | ||
camelia | -1 | ||
lizmat | timotimo: ^^^ is that correct ? | 17:17 | |
17:18
lucasb left
|
|||
jnthn | lizmat: Just about to head out for dinner, but: yes, pretty sure that leading + is not supported in JSON | 17:18 | |
lizmat: See the number rule at www.json.org/ | |||
lizmat | thanks :-) | 17:19 | |
Kaiepi | m: say my @ = from-json '[]' | 17:22 | |
camelia | [[]] Saw 1 occurrence of deprecated code. ================================================================================ Sub from-json (from GLOBAL) seen at: <tmp>, line 1 Please use JSON::Fast, JSON::Tiny or JSON::Pretty from mo…» | ||
Kaiepi | hm still makes a nested array | 17:23 | |
i'll take a stab at making it parse arrays properly | 17:26 | ||
ugexe | that is proper | ||
timotimo | it's because JSON::Fast was born as a drop-in replacement of JSON::Tiny | 17:27 | |
which returns arrays inside scalar containers | |||
m: say my @ = (from-json '[]')<> | |||
camelia | [] Saw 1 occurrence of deprecated code. ================================================================================ Sub from-json (from GLOBAL) seen at: <tmp>, line 1 Please use JSON::Fast, JSON::Tiny or JSON::Pretty from modu…» | ||
Kaiepi | yeah, i know | ||
i raised an issue on JSON::Fast a while ago about it | |||
timotimo | i've been negligient :( | 17:28 | |
ugexe | m: my $ = from-json "{}"; # this seems broken though | ||
camelia | Use of Nil in string context in block <unit> at <tmp> line 1 Invalid JSON: reached end of string when looking for something in block <unit> at <tmp> line 1 Saw 1 occurrence of deprecated code. =========================================… |
||
timotimo | ugexe: nope, "{}" is the empty string | ||
you want '{}' | 17:29 | ||
ugexe | oh right | ||
Kaiepi | m: use nqp; sub a { my $foo = []; $foo }; my @a = a; say @a | 17:31 | |
camelia | [[]] | ||
Kaiepi | m: use nqp; sub a { my \foo; nqp::p6store(foo, []); $foo }; my @a = a; say @a | 17:32 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Term definition requires an initializer at <tmp>:1 ------> 3use nqp; sub a { my \foo7⏏5; nqp::p6store(foo, []); $foo }; my @a = |
||
Kaiepi | m: use nqp; sub a { my $foo := Nil; nqp::p6store($foo, []); $foo }; my @a = a; say @a | ||
camelia | Cannot modify an immutable Str (Nil) in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Kaiepi | m: use nqp; sub a { my $foo; nqp::p6assign($foo, []); $foo }; my @a = a; say @a | 17:33 | |
camelia | [[]] | ||
Kaiepi | m: use nqp; sub a { my \foo := []; $foo }; my @a = a; say @a | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$foo' is not declared. Did you mean 'foo'? at <tmp>:1 ------> 3use nqp; sub a { my \foo := []; 7⏏5$foo }; my @a = a; say @a |
||
Kaiepi | m: use nqp; sub a { my \foo := []; foo }; my @a = a; say @a | ||
camelia | [] | ||
Kaiepi | m: use nqp; sub a { my \foo := []; foo }; my @a = a; @a = 1,2,3 | 17:34 | |
camelia | ( no output ) | ||
Kaiepi | m: use nqp; sub a { my \foo := []; foo }; my $a = a; $a = 1 | 17:35 | |
camelia | ( no output ) | ||
Kaiepi | ok good looks like the return value being immutable doesn't matter when assigning it | 17:36 | |
lizmat | Kaiepi: ftr, I'm currently working at completely re-imagining "from-json" | 17:46 | |
should be ready by tomorrow | 17:47 | ||
and hopefully at least 2x as fast | |||
Kaiepi | well shit | ||
oh well at least i didn't spend too much time on this | |||
lizmat | Kaiepi: hope you learned something from it, even though the result wasn't what you expected ? | 17:48 | |
Kaiepi | should i still pullreq it anyway in case there are issues with the rewrite? | ||
lizmat | Kaiepi: sure... at least it won't be lost, if someone want to go back later :-) | ||
Kaiepi | i learned bound values become mutable again after being returned from functions, so that's a plus i guess | ||
lizmat | Kaiepi: @a = a, is basically the same as @a.STORE(a) | 17:50 | |
which takes an iterator of a and stores it in the array | |||
so it doesn't matter if a is bound / ro or not | |||
as long as it has an .iterator method that produces values, it is ok | 17:51 | ||
Geth | rakudo: Kaiepi++ created pull request #2968: Fix RI's from-json creating nested arrays on assign |
18:01 | |
tobs | I want to parse expressions (mostly polynomials, but extensibility would be nice). The operator precedence parser part of nqp's HLL::Grammar looks really neat. Is that available in a stable form (as I hear you shouldn't use nqp in Perl 6 code). | 19:02 | |
s/.$/?/ | |||
(oh, sorry, I mistook this for #perl6) | 19:03 | ||
Geth | rakudo: b7e0e894d7 | (Ben Davies)++ | src/core/Rakudo/Internals/JSON.pm6 Fix RI's from-json creating nested arrays on assign `my @ = from-json '[]'` would return `[[]]` before this since the result of parsing the array was being assigned to a Scalar. The other parser subroutines also have some minor changes in case any similar bugs happen with them. |
20:32 | |
rakudo: fd1d626c95 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | src/core/Rakudo/Internals/JSON.pm6 Merge pull request #2968 from Kaiepi/from-json Fix RI's from-json creating nested arrays on assign |
|||
timotimo | i'm glad rakudo's internal from-json can make this change %) | ||
Kaiepi | :) | ||
ugexe | did you benchmark the change? | 21:17 | |
all that truly matters for the internal parser is speed | 21:18 | ||
22:25
Kaiepi left
22:30
Kaiepi joined
|
|||
Geth | nqp/match-speedup: 116ef733ed | (Jonathan Worthington)++ | 2 files Always produce integers in captures hash So we don't have to coerce things during comparison. |
23:34 | |
nqp/match-speedup: 97d40c8395 | (Jonathan Worthington)++ | 2 files Use a better data structure for Match setup info So we can calculate once what we would previously re-calculate on every Match object construction. |
|||
jnthn | Got similar patches for Rakudo too, and some further match construction re-working; in the benchmark I've been playing with (a regex with a few positional captures) I'm seeing Match construction come out at under 60% of the time it used to. | 23:37 | |
timotimo | whoa | 23:38 | |
jnthn | The above seems to make several percent improvement to CORE.setting parse time | 23:39 | |
Will tinker with it some more tomorrow | 23:40 | ||
timotimo | would you think generating from-capnames with compiler services sometimes could be a win? | ||
oh | 23:41 | ||
the loop goes over the passed-in capnames | |||
not as trivial to compile-time-build | 23:42 | ||
i'm pretty sure i need a sleep real soon now | |||
gnite jnthn :) | |||
jnthn | from-capnames is called at compile time, that's the point :) | 23:43 | |
Then the result serialized | |||
timotimo | i thought that's prepare-hash | 23:45 | |
but yes, i think i see that now | |||
i love it | |||
MasterDuke | jnthn++ | 23:54 | |
but speaking of always producing integers, github.com/perl6/nqp/pull/518 should help with that when i merge after the next release | 23:55 | ||
jnthn | MasterDuke: Yeah, we might be able to simplify what I did after that :) | 23:57 | |
The nums are quite horrible, we have a >= in MATCH and since it's `num >= int` then it goes the whole Bridge path... | 23:58 | ||
MasterDuke | i think i checked and after my PR there aren't any nums allocated (at least when building nqp, not sure about rakudo) | 23:59 |