Geth | roast: skids++ created pull request #309: Unskips and various roast cleanups |
01:00 | |
roast/master: 16 commits pushed by skids++ review: github.com/perl6/roast/compare/bae...bcc599cc1b |
|||
AlexDaniel looks at github.com/perl6/roast/commit/a743...24f9ec925f and scratches his head | 02:54 | ||
that's not the first time the behavior of state vars in code blocks is changed, and again I wonder how many people were relying on this behavior… | |||
.tell samcv Hey. I'm looking at github.com/perl6/roast/commit/640d...082c4b03a5 and I can't quite understand it. To me it seems like the previous test was explicitly testing Malayalam combiners on a random character, but now it's two combiners on nothing. I guess the previous version wasn't really “unanchored” and the current version is, but the way behavior has changed is really confusing. So if | 03:15 | ||
previously it was possible to match some combiner with <:smth>, now it's not? Is it something we want to change within 6c? (asking because it needs errata change) | |||
yoleaux | AlexDaniel: I'll pass your message to samcv. | ||
AlexDaniel | .tell samcv previously it was possible to match some combiner with <:smth>, now it's not? Is it something we want to change within 6c? (asking because it needs errata change) | ||
yoleaux | AlexDaniel: I'll pass your message to samcv. | ||
samcv | hello | 03:16 | |
yoleaux | 03:15Z <AlexDaniel> samcv: Hey. I'm looking at github.com/perl6/roast/commit/640d...082c4b03a5 and I can't quite understand it. To me it seems like the previous test was explicitly testing Malayalam combiners on a random character, but now it's two combiners on nothing. I guess the previous version wasn't really “unanchored” and the current version is, but the way behavior has changed is really confusing. | ||
So if | |||
03:15Z <AlexDaniel> samcv: previously it was possible to match some combiner with <:smth>, now it's not? Is it something we want to change within 6c? (asking because it needs errata change) | |||
AlexDaniel | ha, yoleaux didn't manage to fit the first part in one message | ||
samcv | well it should match the base character so i'm not sure why it acted that way before. it changed when i updated the unicode database. so unicode may have changed things | 03:17 | |
i mean it doesn't make much sense to match against the combiners, unless the combiners aren't attached to any base character | |||
but it used to test that InMalayam would match if it was a CJK character with a in malayam combining glyph | 03:18 | ||
which didn't make much sense | |||
i mean it's a pretty old file | |||
m: say "á\c[combining caron]" ~~ /<:Mn>/ | 03:19 | ||
camelia | Nil | ||
samcv | like this doesn't match | ||
even though combining caron is Mn | |||
m: say "á\c[combining caron]" ~~ /<:InCombining_Diacritical_Marks>/ | 03:20 | ||
camelia | Nil | ||
samcv | this doesn't match either | ||
neither did "á\c[combining caron]" ~~ /<:InCombining_Diacritical_Marks>/ match in older versions | |||
i have no clue why that test passed before. but in no other cases does it work like that to my knowledge. it seems like it was a mistake | 03:21 | ||
that just happened to work maybe | |||
AlexDaniel | indeed | 03:22 | |
samcv | i'm guessing | ||
i fixed it when i made property values distinct per property :P | |||
AlexDaniel | m: say "\c[combining caron]" ~~ /<:Mn>/ | ||
camelia | 「̌」 | ||
samcv | since the block didn't change at all | ||
AlexDaniel | m: say "\c[combining caron]" ~~ /<:InCombining_Diacritical_Marks>/ | ||
camelia | 「̌」 | ||
Geth | roast/6.c-errata: 592a8d8c47 | (Samantha McVey)++ (committed by Aleks-Daniel Jakimenko-Aleksejev) | S05-mass/properties-block.t Fix InMalayalam test Previously this test was a CJK base with a Malayalam extending character. Replace it so the base character is also Malayalam. IRC discussion: irclog.perlgeek.de/perl6-dev/2017-...i_15144609 |
03:27 | |
AlexDaniel | .tell Zoffix toaster plz | 03:29 | |
yoleaux | AlexDaniel: I'll pass your message to Zoffix. | ||
samcv | i think i almost have fixed the problem where prepend doesn't work right. like "\c[arabic number sign]1" ~~ /:m 1/ | 03:38 | |
nice | |||
yay | 03:41 | ||
AlexDaniel is thinking that unicode support in rakudo would've been garbage without samcv | 03:42 | ||
samcv | :P | ||
it was pretty good, now it's just more better | 03:43 | ||
thanks for the compliment though :) | |||
if all the codepoints are prepend i'll set it to 0 (the index of the base character) otherwise it's whatever codepoint is after the last prepend in the synthetic | 03:48 | ||
u: { .uniprop('Prepend') } | 04:07 | ||
unicodable6 | samcv, U+0000 <control-0000> [Cc] (control character) | 04:08 | |
samcv, U+0001 <control-0001> [Cc] (control character) | |||
samcv, Cowardly refusing to gist more than 5000 lines | |||
samcv | u: { .uniprop-bool('Prepend') } | ||
unicodable6 | samcv, U+0001 <control-0001> [Cc] (control character) | ||
samcv, U+0000 <control-0000> [Cc] (control character) | |||
samcv, Cowardly refusing to gist more than 5000 lines | |||
ugexe | m: while note ++$ { my $a := gather { loop { take 1 } }; for 0 { await start { $a[0] }, start { $a[0] } } } | 04:50 | |
camelia | (signal SEGV)1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 … |
||
ugexe | m: while note ++$ { my $a := gather { loop { take 1 } }; await start { $a[0] }, start { $a[0] } } | 04:52 | |
camelia | 1 Tried to get the result of a broken Promise in block <unit> at <tmp> line 1 Original exception: Cannot call method 'push' on a null object in block at <tmp> line 1 in block at <tmp> line 1 |
||
ugexe | debug symbols + gdb show the segfault at a few different array access points | 05:02 | |
MasterDuke | i just ran it with perl6-gdb-m a couple times and it always pointed to src/6model/reprs/VMArray.c:148 | 05:03 | |
ugexe | yeah thats one. i've also gotten src/core/compunit.h:9, src/gc/wb.h:8, and src/6model/reprs/MVMMultiCache.c:418 | 05:06 | |
MasterDuke | oh, just got MVMSpeshLog.c:54 | 05:07 | |
just did about 10 runs with MVM_SPESH_DISABLE=1, always src/6model/reprs/VMArray.c:148 | 05:09 | ||
[Tux] | This is Rakudo version 2017.08-106-g7da0c2159 built on MoarVM version 2017.08.1-150-g0b81969d | 06:23 | |
csv-ip5xs 1.429 - 1.530 | |||
test 10.015 - 10.187 | |||
test-t 3.487 - 3.624 | |||
csv-parser 11.059 - 11.462 | |||
lizmat | Files=1223, Tests=67636, 291 wallclock secs (11.13 usr 4.54 sys + 1971.26 cusr 207.84 csys = 2194.77 CPU) | 06:56 | |
Geth | rakudo/nom: 0ca5ffa408 | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/BUILDPLAN.nqp Use more idiomatic push rather than @a[+@a] Should be faster as well, although that doesn't matter much at compile time. |
07:03 | |
masak | ok -- hi -- so I have another one. just golfed it. | 07:24 | |
m: constant C = hash(D => sub () { say "OH HAI" }); C<D>() | |||
camelia | OH HAI | ||
masak | if you put the `constant C = hash(D => sub () { say "OH HAI" })` bit in a module and import the module, you get an error. | ||
`Cannot invoke this object (REPR: Null; VMNull)` | |||
something BC-related, p'haps? | 07:25 | ||
jnthn: ping ^ | |||
nine | timotimo: Thinking about your "i find it bad enough that we start the compiler at run time when we use nativecall", that's only necessary because when the native trait is applied, we may not yet know about the returns trait. We only need to be able to run code _after_ the sub is fully declared. | 07:27 | |
masak | m: constant C = sub () { say "OH HAI" }; (C)() | 07:28 | |
camelia | OH HAI | ||
masak | shorter golf ^ | ||
"[BUG] Subs in constants don't survive through module boundary in Rakudo" <-- if I were in a position to submit this one to RT | 07:32 | ||
geekosaur | is it that, or compile vs. runtime fun? | 08:10 | |
hm, on second thought I suspect this is SC related | 08:11 | ||
lizmat | good *, #perl6-dev! | 09:07 | |
timotimo: what is the way to trigger the BUILDALLPLAN 12 case: container_initializer ? | 09:08 | ||
timotimo: apparently, that is being set if %cont_info<build_ast> is set, by | 09:09 | ||
but I can't find where *that* is set, so I wonder if this is a piece of dead code > | |||
? | |||
Skarsnik | releasable6, status | 09:13 | |
releasable6 | Skarsnik, Next release in 5 days and ≈9 hours. 1 blocker. Changelog for this release was not started yet | ||
Skarsnik, Details: gist.github.com/5059886f6536c810d0...733e84f670 | |||
Geth | rakudo: Gnouc++ created pull request #1154: Supress line number if throw X::Package::Stubbed |
09:38 | |
roast: Gnouc++ created pull request #310: Add test for stubbed class |
09:39 | ||
Skarsnik | Who is in charge of this release ? x⁾ | 09:45 | |
and how did I do this fancy parenthesis xD | 09:46 | ||
geekosaur | ⁾ for me is <compose> ^ ) | 09:47 | |
Skarsnik | oh it's ^ + ) for me | 09:51 | |
interesting, ^ is a composer for stuff | |||
geekosaur | "dead key" | 09:52 | |
in X11 parlance at least | |||
Skarsnik | can only do ⁼⁾⁻⁽ and 2 others that does not show on this font/os | 09:53 | |
m: say 2² | 09:56 | ||
camelia | 4 | ||
lizmat | timotimo: found it (re container_initializer) | 10:02 | |
Geth | rakudo/nom: 760530a524 | (Elizabeth Mattijsen)++ | 2 files Remove action 13 from BUILDALLPLAN In BUILDALL this is a noop, so don't put it in the BUILDALLPLAN to begin with. And since we now removed that, we don't need to support this in Mu.BUILDALL either. This should have some effect minor effect on memory usage, and maybe some noticeable effect in build times of objects with attributes that don't need initialization. |
10:09 | |
jnthn | masak: fwiw, I think that one already is in RT | 10:30 | |
lizmat: I think you got a patch in relating to rt.perl.org/Ticket/Display.html?id=132030 ? | 10:58 | ||
lunch & | 11:00 | ||
Skarsnik | hm if I understand this fh are not closed when exiting the sub? | 11:01 | |
like sub foo { my $fh = open "blabl"} I need to close $fh at the end? | |||
ilmari | Skarsnik: yes, because perl6 doesn't use reference counting, so doesn't provide timely destruction | 11:03 | |
LEAVE { $fh.close } should do the trick | 11:04 | ||
Skarsnik | but should the gc close the handle when it will free $fh? | ||
ilmari | it will, but there's no guarantee as to when that will happen | ||
lizmat | jnthn: indeed RT #132030 has been fixed using proposed method one (keeping list of open files) | 11:19 | |
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=132030 | ||
lizmat | jnthn: mind you, not on the JVM, as nqp::filenofh is not implemented there | 11:20 | |
nine | And cannot be implemented | 11:49 | |
At least not without rewriting large parts of I/O | |||
jnthn | We didn't implementing buffering on JVM either | 12:11 | |
*impleemnt | 12:15 | ||
So it's not a big deal | 12:16 | ||
AlexDaniel | Skarsnik_: I am, why? | 13:01 | |
ilmari | speaking of reference counting: xkcd.com/1888/ | 16:22 | |
TimToady | nine: so maybe that's another good reason to get rid of the returns trait in favor of --> | 17:52 | |
yoleaux | 8 Sep 2017 15:05Z <b2gills> TimToady: I would like your input on a document for implementors of Perl 6 dialects since there are currently 2 that I know of gist.github.com/b2gills/7e2781dfd7...59bd751115 | ||
TimToady | b2gills: it is good to have those principles out where people can see them, in short, "Don't ever put the user or the compiler in a situation where they don't know what language they're running." | 17:54 | |
nine: or at least restrict nativecall to using --> | |||
of course, we could always just say it's a DIHWIDT if 'native' comes too early too | 17:55 | ||
nine | We could add such a restriction in a NativeCall:api<2> | 18:00 | |
Except that use NativeCall; (as documented) doesn't specify an API version at all | |||
Skarsnik | I don't like the --> syntax x) | 18:01 | |
(yes, very useful input) | |||
nine | Skarsnik: well what use is the whole "multiple ways to do things" mantra when one cannot make use of it? | 18:02 | |
What we could do however is have the Native trait compile at compile time if the signature is already complete and fall back to runtime if it isn't. Then it's still backwards compatible. | 18:03 | ||
Skarsnik | I must be missing a bit of the conversation, what is the issue with returns ? | ||
hm the code in the native trait is run at compile time. you mean the CALL-ME creation? | 18:04 | ||
nine | Skarsnik: the native call site in MoarVM is created through the nqp::nativecallbuild OP the first time a native sub is called. Doing that at the time the native trait is applied doesn't work in the case of sub foo() is native(Str) returns Int { * } | 18:05 | |
In that case the return type is not yet known at the time the native trait is applied. | |||
Skarsnik | hoo I though returns was just another way to write --> | 18:06 | |
so with --> you know the return type? | |||
nine | apparently :) | 18:07 | |
Skarsnik | dunno when I wrote github.com/rakudo/rakudo/blob/nom/...l.pm6#L234 I remember having the return type at compile time | ||
nine | The returns trait just calls $target.signature.set_returns($type) | 18:08 | |
Skarsnik | m: INIT { say "hello"}; use NativeCall; sub foo is native returns Int {*}; | 18:09 | |
camelia | hello | ||
Skarsnik | that shoud have returned an error, interesting | 18:10 | |
m: INIT { say "hello"}; use NativeCall; sub foo is native(---> Int) {*}; | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Prefix - requires an argument, but no valid term found at <tmp>:1 ------> 3}; use NativeCall; sub foo is native(---7⏏5> Int) {*}; expecting any of: prefix |
||
Skarsnik | m: INIT { say "hello"}; use NativeCall; sub foo is native(--> Int) {*}; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Prefix -- requires an argument, but no valid term found at <tmp>:1 ------> 3"}; use NativeCall; sub foo is native(--7⏏5> Int) {*}; expecting any of: prefix |
||
Skarsnik | duh, it's not the syntax for --> ? | 18:11 | |
nine | m: INIT { say "hello"}; use NativeCall; sub foo(--> Int) is native {*}; | 18:12 | |
camelia | Potential difficulties: The returning type of 'foo' --> Int is erroneous. You should not return a non NativeCall supported type (like Int inplace of int32), truncating errors can appear with different architectures at <tmp>:1 ------> 3… |
||
Skarsnik | Oh yeah I am dumb | 18:14 | |
geekosaur | is native(...) looks in ... for the symbol | ||
kinda hard to distinguish that from a proto | |||
er, a signature | |||
Skarsnik | nine, could you fix the test? (04/18-sig) and replace the returns with --> ? | 18:15 | |
timotimo | nine: is the returns thing in place if you put it before is native perhaps? | 18:36 | |
AlexDaniel | . | 19:08 | |
gfldex | is IO::Handle.lines supposed to work on fifos? | 19:53 | |
i'm getting Original exception: | 19:55 | ||
It is not possible to seek this kind of handle | |||
in block <unit> at bin/fifo-test.p6 line 7 | |||
timotimo | hm, why do we try to seek in there? | 19:57 | |
mst | presumably because lines does a seek-to-start to get all the lines? | 19:58 | |
gfldex | it throws after the first input line is delivered | ||
timotimo | hm, not sure if it should. i'd expect to be able to read a few bytes and then start consuming lines | 19:59 | |
gfldex | source: gist.github.com/gfldex/7d89ad2b177...34c57bb6a8 | 20:00 | |
I can't RT that because RT doesn't like my e-mails anymore | |||
timotimo | i suppose just "radio-fifo-in".IO.lines won't do it? | 20:01 | |
gfldex | I can try | 20:02 | |
.emit "name".IO.lines; just quits after reading 2 lines | 20:05 | ||
.emit for "name".IO.lines; # even | |||
.emit for $fifo-in.lines; # quits after reading just one line | 20:08 | ||
timotimo | huh, that's certainly weird | 20:09 | |
i must admit i haven't used fifo ... i think ever? | |||
ugexe | maybe github.com/rakudo/rakudo/blob/7605...le.pm#L470 needs to have a conditional instead of a try | 20:11 | |
timotimo | what would you condite on? | 20:12 | |
having an attribute "is this a fifo"? | |||
it shouldn't give you the error though :\ | |||
ugexe | in moarvm its here github.com/MoarVM/MoarVM/blob/41e1...ile.c#L102 | 20:13 | |
timotimo | is it really this specific sink-all? it shouldn't be sinking at all | 20:21 | |
geekosaur | really, you should have a fallback for seek failed (terminals/ptys, pipes, fifos, sockets, character special files) | 21:02 | |
it's a common thing, ylou should not blindly assume seekable and then come up with ways to detect the exceptions beforehand | 21:04 | ||
especially since you cannot distinguish a fifo except by moderately tricky open behaviors that require a cooperating second opener *and no non-cooperating ones* which means in practice you can't do those tests. | 21:05 | ||
hm, actually I guess stat/fstat catches fifos. pipes are harder, ptys vs. ttys/serial ports vs. (say) parallel ports, ... just don't get into that business, it will only make you cry | 21:06 | ||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/09/11/...ng-sorted/ | 21:18 | |
samcv | is there a way to `require` something that hasn't been installed with zef? | 21:31 | |
or impossible? | |||
like something in a lib folder for example | |||
geekosaur | -Ilib ? | 21:38 | |
or use lib 'lib' | |||
Geth | roast/6.c-errata: c554b68d92 | (Jonathan Worthington)++ (committed by Aleks-Daniel Jakimenko-Aleksejev) | S04-declarations/state.t Correct bad state expectation Due to a compiler bug, the closure here was not being cloned by its outer scope. This caused various nasty thread safety bugs, and has now been rectified. However, this test depended on the buggy behavior. |
21:48 | |
jnthn | AlexDaniel++ | 21:51 | |
samcv | Geth, that won't work | 21:57 | |
you can't use lib in modules | 21:58 | ||
geekosaur | oh, that was completion fail. was wondering... | 21:59 | |
samcv | require works for thinks installed with zef. cause i'm guessing it's installed to compunits or something? | 22:00 | |
geekosaur | I think if you are using modules "out of place" you're expected to use -I. but I'd have to know more details (and unfortunately would then likely hit the limits of what I know) | ||
docs.perl6.org/language/modules#Finding_Modules ? | 22:02 | ||
samcv | it's just in a folder though | 22:03 | |
so the question is to get it to work without having it installed | 22:04 | ||
geekosaur | hm. I thought that worked for random uninstalled modules | 22:05 | |
lizmat | good night, #perl6-dev! | 22:06 | |
geekosaur | maybe we really do need the dummy CUR for not-properly-installed stuff. would have to error out on things like :ver and :auth since it can't deal with them, and would probably need to keep its own precomp and precomp on first use | ||
samcv | github.com/samcv/test | ||
this is what i'm trying | |||
geekosaur | (we had someone around the other day who was whiny about not being able to arbitrarily hotpatch any file on the system, including having a rant about OS package managers being evil) | 22:07 | |
samcv | the require fails in lib/main.pm6 | ||
night lizmat ! | |||
jnthn | samcv: ooc, is it specifically require that's having issues, and use works? | 22:09 | |
samcv | yes just require | ||
i mean it actually doesn't work when i do use | 22:11 | ||
because it can't find bar with ::( ) | |||
jnthn | The require itself doesn't fail though? | ||
samcv | but if i comment out that line. and only leave the require. then yes that doesn't work | ||
the require is what fails yes. if i change the rquire for use, then it fails on the line below | |||
timotimo | lizmat: i find it strange to have the "ipython perl6 notebook in docker" once as a blog post and once as a tweet | ||
jnthn | samcv: ah, I see the problem | 22:12 | |
samcv | maybe it wants me to refer to it as something other than bar, i don't know? or maybe i need to add module unit or something? | ||
jnthn | sub bar ($str) is export { | ||
That's a lexical sub bar being exported | |||
samcv | need a diff name? | ||
jnthn | I think if you add at the top | 22:13 | |
unit module bar; | |||
And then make it our sub bar($str) { | |||
Then it'll work out | |||
::($var)::{"&$var"}($str); is just a package lookup | |||
samcv | ok cool | ||
timotimo | lizmat++ # weekly again | 22:14 | |
samcv | hmm jnthn Cannot find method 'Any' on object of type Str | 22:16 | |
jnthn | hmm | ||
samcv | ah it's not getting it back hold on | ||
jnthn, how can i dump all symbols? | 22:23 | ||
cause ::($var) is an object | |||
i'm just getting any back when i try to do the lookup | |||
timotimo | you'll probably want ::.keys or maybe .WHO.keys | 22:27 | |
ugexe | don't you have to `our` something you want to access with ::name? | 22:28 | |
timotimo | oh, mhm | 22:29 | |
but we also have MY:: for example | |||
and ::('$var') is MY:: i think | |||
samcv | not getting anything | 22:30 | |
oh wait nvm | |||
::($var)::.WHO.keys.say; i got the sub | 22:31 | ||
if i put `our` on the sub | |||
jnthn | 22:13 < jnthn> And then make it our sub bar($str) { | 22:32 | |
;) | |||
samcv | yeah i still can't use it though | 22:33 | |
::($var)::{"&bar-sub"} this doesn't work | |||
do i need to use some other way to access it? | |||
ah .WHO{ } works | 22:34 | ||
jnthn | ::("$var::&bar-sub") probably works too | ||
samcv | now i get undeclared routine bar-sub used | 22:41 | |
heh | |||
oh oops that was my bad | 22:42 | ||
ugexe | why not import the symbol? require ::("bar") <&bar> | 22:43 | |
samcv | yay got it | ||
can <&bar> be a variable? | 22:46 | ||
i could not get that to work | |||
jnthn | <...> is literal syntax | 22:47 | |
Would have to be {$name-here} or so | |||
samcv | jnthn, that creates a block object | 22:48 | |
ugexe | m: BEGIN my $foo = q|&bar|; require ::("XXX") << $foo >>; ::("&bar")() | 22:51 | |
camelia | Could not find XXX at line 0 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Repository::AbsolutePa… |
||
geekosaur | samcv, afaik that's just a list of expressions at that point | 22:52 | |
although it's entirely possibl nobody implemented or tested the general case; I know various other documented things with respect to importing are missing | 22:54 | ||
ugexe | m: BEGIN my $foo = q|&source-file|; BEGIN "lib/XXX.pm6".IO.spurt(q|unit module XXX; sub source-file is export { $?FILE }|); require ::("XXX") << $foo >>; say ::($foo)() | 22:55 | |
camelia | Could not find XXX at line 0 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Repository::AbsolutePa… |
||
ugexe | m: BEGIN use lib 'lib'; BEGIN my $foo = q|&source-file|; BEGIN "lib/XXX.pm6".IO.spurt(q|unit module XXX; sub source-file is export { $?FILE }|); require ::("XXX") << $foo >>; say ::($foo)() | ||
camelia | /home/camelia/lib/XXX.pm6 (XXX) | ||
jnthn | samcv: I meant after the ::('module-name').WHO or so | 22:56 | |
samcv: But what ugexe is suggested is a better way :) | 22:57 | ||
*suggesting | |||
samcv | ok cool. so use << >> | ||
ugexe | a list of strings | 22:58 | |
"$foo", "baz"; also works | 22:59 | ||
samcv | that doesn't seem to work | 23:00 | |
hm | |||
it says | |||
Use of uninitialized value $subname of type Any in string context. | |||
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. | |||
in any statement_control:sym<require> at /home/samantha/perl6/share/nqp/lib/Perl6/Grammar.moarvm line 1 | |||
ugexe | m: BEGIN use lib 'lib'; BEGIN my $foo = q|&source-file|; BEGIN "lib/XXX.pm6".IO.spurt(q|unit module XXX; sub source-file is export { $?FILE }|); require ::("XXX") "$foo"; say ::($foo)() | ||
camelia | /home/camelia/lib/XXX.pm6 (XXX) | ||
samcv | the valua isn't known at compile time ugexe | 23:01 | |
like this github.com/samcv/test/blob/master/lib/main.pm6 | 23:02 | ||
if i do <<$modulename>> then i get a different error during compilation about uninitialized value used in a string context | 23:03 | ||
but with the comma it seems to be doing the correct thing but it can't handle it not being defined yet | 23:04 | ||
jnthn | Sleep here; 'night | 23:05 | |
timotimo | night jnthn | 23:06 | |
ugexe | yeah kinda weird it can delay knowing the ::("XXX") but not the << $subname >> | 23:09 | |
timotimo | but the sub is supposed to be installed in the lexical scope and that's compile-time? | 23:10 | |
or am i misunderstanding? | |||
ugexe | well if `require ::($foo)` can install that name at runtime, why can't subs be imported from it at that time? | 23:12 | |
timotimo | when you require ::($foo) you can only access its contents indirectly, though? | 23:14 | |
the part after that, the names you want to import, is supposed to give you these thigs as lexical symbols | |||
and then how is the code supposed to use it :) | 23:15 | ||
require ::($mymodule) (prompt "which sub to take?"); i-guess-this-sub-maybe-exists-now(); # how is this supposed to work? | |||
ugexe | ah yeah | 23:17 | |
m: my $foo = q|&source-file|; BEGIN "lib/XXX.pm6".IO.spurt(q|unit module XXX; our sub source-file is export { $?FILE }|); require ::("XXX"); say ::("XXX::$foo")() | 23:21 | ||
camelia | Could not find XXX at line 0 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Repository::AbsolutePa… |
||
ugexe | m: use lib 'lib'; my $foo = q|&source-file|; BEGIN "lib/XXX.pm6".IO.spurt(q|unit module XXX; our sub source-file is export { $?FILE }|); require ::("XXX"); say ::("XXX::$foo")() | 23:22 | |
camelia | /home/camelia/lib/XXX.pm6 (XXX) | ||
timotimo | heh. | 23:23 | |
ugexe | m: my $foo = q|&source-file|; BEGIN "lib/XXX.pm6".IO.spurt(q|unit module XXX; our sub source-file is export { $?FILE }|); require "/home/camelia/lib/XXX.pm6"; say ::("XXX::$foo")() | 23:24 | |
camelia | /home/camelia/lib/XXX.pm6 | ||
timotimo | i'm a little surprised you are able to use IO at begin time even though restricted setting :) | 23:27 | |
geekosaur | restricted setting isn't very | 23:31 | |
timotimo | quite true | 23:32 | |
Geth | roast: skids++ created pull request #311: Add tests for RT#129008 |
23:50 | |
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=129008 | ||
Geth | roast: 9a09b4ee15 | skids++ | S02-literals/pairs.t Add tests for RT#129008 |
||
roast: d762a6f017 | skids++ (committed using GitHub Web editor) | S02-literals/pairs.t Merge pull request #311 from skids/rt129008 Add tests for RT#129008 |
|||
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=129008 | ||
synopsebot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=129008 |