timotimo | it turns out i didn't end up bringing ndarrayviews to a functioning POC today | 00:35 | |
MasterDuke | timotimo: how good are you with Java? | 02:00 | |
timotimo | not good | 02:01 | |
MasterDuke | ha, neither am i (that's why i'm asking!) | 02:02 | |
well, to anybody really, any suggestions for my ArrayIndexOutOfBounds exception when trying to create a ClassReader with an InputStream? | 02:03 | ||
timotimo | i don't know anything about classloaders | ||
well, when i worked on the jvm port of rakudo, AIOOB was always about having push operations not followed by the right amount of poppiness | 02:04 | ||
maybe the other way around, too | |||
MasterDuke | i was definitely surprised to get that error, i'm not doing anything with an array myself, this is the problem line: github.com/MasterDuke17/nqp/blob/s....java#L331 | 02:06 | |
timotimo | well, if you're using getResourceAsStream, you're probably giving ASM an array of bytes or something | ||
ASM is *really* bad at turning exceptions that relate to ASM internals to sensible exceptions about its functionality | |||
like, it's the worst | |||
MasterDuke | yeah. i've never used it before, it hasn't been the easiest stuff to understand | 02:07 | |
timotimo | but yeah ... got no clue :( | ||
it's actively resisting being understood, clearly. | |||
anyway, i haven't touched the *Reader or *Visitor stuff of ASM at all | 02:08 | ||
i'll be off to bed now :| | |||
but i wish you the best of luck | |||
MasterDuke | .tell psch still having the same problem, any suggestions? this is the problem line: github.com/MasterDuke17/nqp/blob/s....java#L331 | ||
yoleaux2 | MasterDuke: I'll pass your message to psch. | ||
MasterDuke | timotimo: thanks, later... | 02:09 | |
samcv | perl6.wtf uses roast right? | 04:35 | |
timotimo | that's correct | 04:36 | |
samcv | ok cool :) | ||
timotimo | be aware: it's not unfallible | 04:37 | |
like, it seems to say there's not a single test for subbuf-rw | |||
... i didn't actually check | |||
Generated on 2016-10-07 - so it's one and a half months out of date | |||
it takes exceedingly long to generate, i suppose | 04:40 | ||
viki | timotimo: actually, last time I ran the script, it failed because it couldn't merge master moarvm on top of the branch with coverage support | 05:29 | |
psch | . | 05:36 | |
yoleaux2 | 02:08Z <MasterDuke> psch: still having the same problem, any suggestions? this is the problem line: github.com/MasterDuke17/nqp/blob/s....java#L331 | ||
MasterDuke | psch: i tried upgrading asm to 4.2 and 5.1, but got the exact same behavior | 05:38 | |
psch | MasterDuke: i'm trying the other accept candidate on ClassVisitor right now | ||
"Any attribute whose type is not equal to the type of one the prototypes will not be parsed" | |||
MasterDuke: not sure that will help, but yeah | 05:39 | ||
MasterDuke | "cr.accept(cv, new Attribute[] { new CommentAttribute("") }, 0);" from the asm docs? | ||
psch | yeah | ||
well, with the right class name :) | 05:40 | ||
timotimo | viki: probably because of ops not really being mergable by git itself | 05:41 | |
MasterDuke | yep. i think i tried that before and it didn't seem to work, but that was a while back in my experimenting | ||
psch | well, the asm user guide has quite a bit of "attributes are hard and clunky to use" | 05:43 | |
so maybe using normal annotations -- or just stuffing a String where just the line number used to be -- is the cleaner solution | |||
MasterDuke | well, it did work when it loaded the class file from the local directory | 05:44 | |
yeah, annotations might be better overall, but i think they'd still have the same problem | 05:45 | ||
that is, you'd still need to create a ClassReader+Visitor, and that's where it's failing | 05:46 | ||
psch | no, it's not | ||
it's failing during reading, not during creation | |||
at least i'm fairly sure about that, because that's what AIOOB usually means | 05:48 | ||
MasterDuke | but then how come it works when using the "String classname" candidate when the class is extracted out of the jar and in the CWD? | 05:49 | |
psch | well, stepping through it with jdb it does find the resource | 05:51 | |
main[1] dump info.compUnit.getClass().getClassLoader().getResourceAsStream("3CE0973F925D7507D9B062C5E98B7D9871761704") | 05:52 | ||
info.compUnit.getClass().getClassLoader().getResourceAsStream("3CE0973F925D7507D9B062C5E98B7D9871761704") = { | |||
buf: instance of byte[12827177] (id=1887) | |||
so the .accept doesn't do the right thing | |||
MasterDuke | i also tried creating a byte[] manually and using that candidate, exact same thing | 05:53 | |
psch | yeah, sure would be nice if asm had reasonable error messages :/ | 05:58 | |
aha (?) | 06:01 | ||
MasterDuke | intellij-support.jetbrains.com/hc/...-Exception | 06:02 | |
psch | so, apparently readClass calls readUTF8 inside the ClassReader | ||
MasterDuke | ^^^ is that any help? | ||
psch | there we read an unsigned short | ||
and *that* is out of bounds of the constant pool | |||
...probably not | |||
but i'll look | |||
"I had an entry "/home" which also got scanned for classes. This is where this error occured." from the link | 06:03 | ||
that does look completely unrelated | |||
MasterDuke | thought so, but grasping at straws | 06:04 | |
psch | hmm | ||
so, yeah | 06:05 | ||
readUTF8 looks into the CONSTANT_Utf8 items | |||
and apparently there isn't 40k of those | |||
well, the 'SETTING::*' strings are in the class file... | 06:06 | ||
maybe the ClassReader messes something else up and doesn't read the Attributes correctly first..? | 06:07 | ||
like, i'm guessing that custom attributes don't really go into the normal constant pool | |||
'cause we'd get "class file to large", just from adding all the filenames | |||
like, we've been scraping on the upper limit of the constant pool for quite a while | 06:08 | ||
soo i'd guess it's really just looking at the wrong thing, apparently | |||
well, i'm pretty much out of ideas | 06:11 | ||
MasterDuke | hmm, i saw some SO Q&As that mentioned manually walking the classpath and opening jars and looking inside them (or something like that). think that's required? | ||
psch | it shouldn't be | ||
...unless the ClassLoader we're using throws custom attributes away | |||
which is possible, i suppose? | |||
MasterDuke | well, i used the same one before when it worked | 06:12 | |
psch | right, except in one instance you're loading from CLASSPATH and in the other you're loading what has been loaded to instantiate the class | 06:13 | |
...i think | |||
MasterDuke | ohhhhh | ||
psch | i'm a bit fuzzy on what exactly getResourceAsStream does there | ||
i'm honestly not really sure that makes sense | 06:14 | ||
MasterDuke | i mean it sounds plausible, but my Java-fu is weak | 06:15 | |
looks like arnsholt wrote ./src/vm/jvm/runtime/org/perl6/nqp/jast2bc/JASTCompiler.java, maybe he'll have a suggestion | 06:17 | ||
psch | maybe, yeah | 06:20 | |
MasterDuke | i just built the version that works when the class is in CWD, maybe i'll try using jdb to see it's doing | 06:21 | |
because i do like the look of "in throw (SETTING::src/core/Exception.pm:64)" | 06:23 | ||
psch | wiki.jvmlangsummit.com/pdf/23_Kuleshov_asm.pdf looks like you're doing exactly the right thing, anyway | 06:24 | |
pages 13-16 is what i'm looking at fwiw | |||
MasterDuke | that's reassuring | 06:27 | |
btw, how did you run jdb? | 06:30 | ||
psch | perl6-jdb-server | 06:31 | |
it starts suspended, so you need to run 'jdb -attach 8000 -sourcepath $paths-seperated-by-colons' and "run" then | |||
"src/vm/jvm/runtime/:nqp/src/vm/jvm/runtime/:src/:nqp/src/:.:nqp/" is my $paths-seperated-by-colons, when running -attach from the rakudo repo root | 06:32 | ||
MasterDuke | perl6-jdb-server with my -e '...'? | 06:35 | |
psch | whatever you like, actually | 06:36 | |
perl6-jdb-server is a drop-in replacement for perl6-j | |||
it just starts a jdb session as well and suspends it before execution starts | |||
MasterDuke | it's past sleep time for me, i'll have to pick this up later. thanks for the help | 06:40 | |
.ask arnsholt if you don't mind backlogging, psch and i are running into some ASM troubles and git suggests you might be able to help out | 06:42 | ||
yoleaux2 | MasterDuke: I'll pass your message to arnsholt. | ||
moritz | lizmat++ # typo fix | 07:03 | |
yoleaux2 | 20 Nov 2016 22:51Z <lizmat> moritz: in blogpost: "and nothing as fixed" s/as/was/ ? | ||
[TuxCM] | This is Rakudo version 2016.11-15-g014d4cf built on MoarVM version 2016.11-8-gb582aeb | 07:29 | |
csv-ip5xs 3.120 | |||
test 13.836 | |||
test-t 6.430 | |||
csv-parser 14.789 | |||
lizmat | Files=1154, Tests=53764, 210 wallclock secs (12.89 usr 3.76 sys + 1280.05 cusr 116.85 csys = 1413.55 CPU) | 11:04 | |
viki | .tell TimToady never mind. japhb said the reason is mostly due to val() being done prior to addition of fancy pants minus ( irclog.perlgeek.de/perl6-dev/2016-...i_13587383 ) | 12:25 | |
yoleaux2 | viki: I'll pass your message to TimToady. | ||
lizmat | re. val() and MAIN: perhaps we *do* need a EnumStr type and val processing of strings looking like enums? | 12:27 | |
that would make it at least consistent across the board ? | |||
nine | lizmat: I've had similar thoughts, too | ||
viki | The idea occured to me, but the problem I see is it makes code sensitive to allomorphs flaky | 12:28 | |
m: my $set = set <meows>; say $set{'meows'} | |||
camelia | rakudo-moar 014d4c: OUTPUT«True» | ||
viki | ^ now that will break the second I happen to have an enum "meows" in the scope, because it'll now be an EnumStr | ||
masak | that is a really good point | 12:29 | |
lizmat | but wouldn't $set<meows> then do work ? | 12:30 | |
viki | Yes, but what if 'meows' is a variable, coming from elsewhere? | 12:31 | |
lizmat | yeah, treu | ||
true | |||
.tell TimToady any thoughts on val() also processing enums in scope ? | 12:51 | ||
yoleaux2 | lizmat: I'll pass your message to TimToady. | ||
lizmat | .tell TimToady aka: having val("True") returning Bool::True | 12:54 | |
yoleaux2 | lizmat: I'll pass your message to TimToady. | ||
arnsholt | That sounds kind of icky. For that to work, val() would have to go groping in its caller's lexical environment | 13:07 | |
yoleaux2 | 06:42Z <MasterDuke> arnsholt: if you don't mind backlogging, psch and i are running into some ASM troubles and git suggests you might be able to help out | ||
lizmat | arnsholt: it would be as simple as ::("True") | 13:09 | |
arnsholt | Sure, that'd work for enums defined in the setting | 13:11 | |
But if you have an enum defined in user code, that's not in val's lexical environment | |||
Ohnoes, ASM! That's a long time ago... | 13:12 | ||
arnsholt goes scrollbacking | |||
lizmat | m: enum E <A B C>; dd ::("A") # arnsholt | ||
camelia | rakudo-moar 014d4c: OUTPUT«E::A» | ||
lizmat | ah, in val() lexical env | ||
hmmm.... | 13:13 | ||
m: sub a($a) { ::($a) }; sub b { enum E <A B C>; dd a "A"}; b # still seems to work outside of lexical env, arnsholt ? | 13:16 | ||
camelia | rakudo-moar 014d4c: OUTPUT«E::A» | ||
lizmat | ah, that's because enums are our by default | ||
jnthn | iirc enum is our-scoped by default | ||
yoleaux2 | 20 Nov 2016 23:21Z <lizmat> jnthn: something needs fixing in the bowels: github.com/rakudo/rakudo/commit/014d4cff2f | ||
lizmat | :-) | ||
jnthn | I don't think that one is too far up the bowels | 13:17 | |
arnsholt | psch, MasterDuke: It's not quite clear to me what exactly is going wrong. Do you have a gist or something? (Also, the JAST compiler is mostly an integration of code jnthn originally wrote which was external to the compiler) | ||
jnthn | I think in BOOTSTRAP.nqp you'll find it registering the int/num ref types and it's probably copy/paste-tweak a line or two | ||
arnsholt | Oh, I thought enums were lexical. In that case I guess it'll be less icky | 13:18 | |
lizmat | jnthn: will look | ||
jnthn | arnsholt: Well, they are if you stick a "my" on 'em | ||
psch | arnsholt: afaiu, a ClassVisitor over an InputStream/byte[] cannot find the CONSTANT_Utf8 pool correctly, in comparison to a ClassVisitor over a .class file from the filesystem | ||
arnsholt: mind though that the behavior stays consistent over asm 4.1, 4.2, 5.0, so it's unlikely to be an actual bug in their code | |||
arnsholt | jnthn: True, true. Then I guess the question is what would val() do in that case | 13:19 | |
psch: Weird. So where does the InputStream come from? | |||
psch | arnsholt: github.com/MasterDuke17/nqp/blob/s....java#L331 throws ArrayIndexOutOfBoundsException | ||
arnsholt: i dug into the asm source, and that's an access onto a String[] that gets populated with CONSTANT_Utf8 | 13:20 | ||
arnsholt: github.com/MasterDuke17/nqp/blob/s....java#L291 is where we write the Attribute, fwiw | 13:21 | ||
arnsholt | Never encountered that stuff, I'm afraid | ||
psch | i don't think we can annotate java methods with different source files, can we? | 13:24 | |
as in, a SourceFileAnnotation is actually classfile-scoped | |||
arnsholt | I haven't a clue, sorry | ||
psch | 'cause that's what i'm thinking is more sensible in the end. the asm user guide (paraphrased) says Attributes are weird, and Annotations are easier, so maybe we can coopt an existing Annotation instead... | 13:25 | |
MasterDuke | the builtin SourceFile attribute is once per class, so won't work since we have a single giant class | 13:27 | |
but maybe there's an Annotation that would work | 13:28 | ||
irclog.perlgeek.de/perl6-dev/2016-...i_13595901 | |||
docs.oracle.com/javase/specs/jvms/...vms-4.7.10 | 13:29 | ||
jnthn: looks like arnsholt passed the blame on to you. any thoughts re the AIOOBE with a ClassVisitor over an InputStream? | 13:36 | ||
jnthn | AIOOBE could be anything | 13:41 | |
It generally means "you called/mis-matched methods" | |||
I've had it blow up that way when leaving too many things on the stack, iirc | |||
Just crappy error reporting on ASM's part :( | |||
dalek | kudo/nom: 6d726f8 | lizmat++ | src/Perl6/Metamodel/BOOTSTRAP.nqp: Hook up native shaped str arrays jnthn++ for the pointer |
13:43 | |
lizmat | afk& | 14:28 | |
FROGGS | o/ | 14:41 | |
timotimo | yo | 14:42 | |
dalek | kudo/nom: cb9df2b | (Zoffix Znet)++ | src/core/allomorphs.pm: Teach val() to handle U+2212 minus Includes handling in forms as −42, 42e−72, and 42−72i |
15:22 | |
ast: d904753 | (Zoffix Znet)++ | S32-str/numeric.t: Test stringification of numerals with U+2212 minus in them |
15:24 | ||
viki | eeeehhhh.... s/stringification/parsing from string/; | 15:25 | |
timotimo | unstringification, then? | 15:34 | |
viki | Precicely :) | 15:36 | |
japhb wishes it was Sunday, not Monday ... still in the mood for personal hacking | |||
viki | It's not Sunday!? | 15:37 | |
OH CRAP I FORGOT TO GO WORK!! | |||
viki giggles | |||
timotimo | the bad thing about sundays is that stores don't sell you stuff | ||
i much prefer saturdays for that reason | |||
jnthn | Many of them here actually do. | ||
viki | timotimo: what country is that at? | ||
timotimo | germany | ||
psch | stores here have open from 9 am till 12 am on sundays i think | 15:38 | |
timotimo | you can go to gas stations and get stuff there, but the prices are pretty steep | ||
psch | which is kinda sorta like not open | ||
viki | You can get stuff here any day of the week. But I dislike national holidays for that same reason. | ||
timotimo | mhm | 15:39 | |
jnthn | I used to live walking distance to Austria. First time I took a stroll there on a Sunday, I quickly understood I would not be getting a snack/drink there to help the walk back. :) | ||
japhb | (day of week discrimination)-- | 15:40 | |
viki | Thou shall not buy snaks on a Sabbath | 15:41 | |
ilmari | how about snakes? | ||
perlpilot | That's just one of the older forms of social engineering. Take a day of rest, don't do anything ... no one else will be doing anything either. | 15:42 | |
viki | speaking of days off... | 15:45 | |
viki goes back to playing video games and eating cookies | |||
DrForr | And don't buy them on planes, definitely. | 15:46 | |
dalek | p: b45f0e3 | (Pawel Murias)++ | src/vm/js/RegexCompiler.nqp: [js] Get $!cstack from a cursor correctly and prepare for a VMArray being stored there. |
17:24 | |
p: 62f0624 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js: [js] Clone VMArrays correctly. [js] Handle more things returned from .Num when numifying. |
|||
p: bc6f14a | (Pawel Murias)++ | src/vm/js/Compiler.nqp: [js] Fix bug. |
|||
kudo/nom: bfe89a5 | lizmat++ | / (2 files): shaped(int|num|str)array.AT-POS at least 15% faster By rewriting in nqp ops: please note there is no optimization for 1/2/3dimmed native shaped arrays yet |
19:51 | ||
kudo/nom: e0a415f | (Zoffix Znet)++ | src/core/Str.pm: Make prefix:<~> actually call .Str on an item This fixes the issue that using ~ does not coerce an allomorph into its Str component. This is in contrast to prefix<+>, which does. Remove return type constraint, since we don't know what .Str would return on custom Str subclasses. |
20:00 | ||
rakudo/nom: bd42363 | (Zoffix Znet)++ | src/core/IO/ArgFiles.pm: | |||
rakudo/nom: Fix incorrect $*ARGFILES.lines() limit counter | |||
rakudo/nom: | |||
rakudo/nom: Patch by lucasb++ | |||
rakudo/nom: | |||
viki | github.com/rakudo/rakudo/commit/bd...29b6466566 | 20:01 | |
dalek | ast: c84496e | (Zoffix Znet)++ | S16-filehandles/argfiles.t: Test $*ARGFILES.lines($limit) works across files Test for fix in commit github.com/rakudo/rakudo/commit/bd...29b6466566 |
20:14 | |
ast: e7adb53 | (Zoffix Znet)++ | S02-literals/allomorphic.t: Test prefix:<~> coerces allomorphs to Str irclog.perlgeek.de/perl6/2016-11-21#i_13606506 Fixed in github.com/rakudo/rakudo/commit/e0a415f453 |
20:18 | ||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/11/21/...perl-6-入门/ | 21:50 | |
cog_ | lizmat++ | 21:51 | |
vendethiel | lizmat++ :) | 21:54 | |
jnthn | lizmat++ | 22:05 | |
A nice week :) | |||
lizmat | indeed :-) | 22:10 | |
[Coke] | www.learningperl6.com/2016/11/16/q...sequences/ - "this site can't be reached" -- my restrictive work proxy, probably. | 22:19 | |
perlpilot | aye, it works here. | 22:20 | |
lizmat | [Coke]: works for me too :-) | 22:35 | |
dalek | kudo/nom: ecc202e | lizmat++ | / (2 files): shaped(int|num|str)array.ASSIGN-POS at least 10% faster By rewriting in nqp ops: please note there is no optimization for 1/2/3dimmed native shaped arrays yet |
22:57 | |
|Tux| | .tell FROGGS hpux.connect.org.uk only ships 32bit objects :( :( - I will install libffi by hand | 22:58 | |
yoleaux2 | |Tux|: I'll pass your message to FROGGS. |