| jnthn | On my box, even a Java say hello world is > 10 MB... | 23:00 | |
| timotimo | for memory usage, at least. | ||
| as in: how little can you possibly pay | |||
| jnthn | I'm sure we can slim it down a bunch from how it is now. | 23:01 | |
| But not sure we'll get it *that* far down. | |||
| timotimo | right. 50 megabytes seems reachable | ||
| since we're already at ~98 | |||
| maybe i should really make that heap analyser before diving into the littlebigint stuff again. | 23:05 | ||
|
01:25
jnap joined
02:23
colomon joined
02:25
jnap joined
03:26
jnap joined
03:38
cognominal joined
04:27
jnap joined
05:28
jnap joined
07:06
FROGGS joined
|
|||
| FROGGS | o/ | 07:08 | |
| diakopter | o! | 07:24 | |
|
07:25
tokuhirom joined
07:29
jnap joined
08:09
tgt joined
08:37
odc joined
|
|||
| nwc10 | jnthn: trying this paste.scsys.co.uk/296660 to stop wrongly chasing "REPR" on STables, and I get this paste.scsys.co.uk/296661 which makes me think that it was concealing another garbage collection bug... :-( | 08:42 | |
| not sure if I will have time to torture *that* one out | |||
| FROGGS | nwc10: I did pretty much the same about 20 minutes ago :o) | 08:48 | |
| that is, applied the STable check, and let my rakudo build explode | |||
| and then I thought: I am not supposed to do that :o) | 08:49 | ||
| hoelzro: you need to take care of MVMObject *env when you allocate things in here: github.com/hoelzro/MoarVM/commit/5...dae81R1058 | 08:52 | ||
| hoelzro | I have to free it after I'm done? | ||
| FROGGS | no, not that | 08:53 | |
| when you allocate (or encode a string), you trigger a gc run | |||
| and then your pointers are likely to move | |||
| hoelzro | oh, I see | ||
| FROGGS | and if you don't temp_root or MVMROOT them, you're looking at outdated pointers | ||
| the rule is: is a pointer retrieved before, and used after an allocation, root it | 08:54 | ||
| hoelzro | does that just apply to objects, or any Moar data (such as strings)? | 08:55 | |
| I was kinda just doing by example | |||
| FROGGS | only MVMObjects as I see it | 08:57 | |
| nwc10: correct? | |||
| because a MVMString has no MVMCollectible header | 08:58 | ||
| nwc10 | I don't know the answer to that one | 08:59 | |
| hoelzro | I'll look for other examples of MVMObject | 09:21 | |
| thanks, FROGGS! | |||
| FROGGS | hoelzro: either MVMROOT(tc, env, { <code here> }); | 09:23 | |
| MVM_gc_root_temp_push(tc, (MVMCollectable **)&env); | |||
| and a pop later | 09:24 | ||
| hoelzro | alright | 09:26 | |
| FROGGS | hoelzro: you can also do a pop_n, if you intend to pop several | 09:27 | |
|
09:31
jnap joined
|
|||
| jnthn | And MVMString is actually an MVMObject too. Also, MVMSTable would need rooting, though you rarely hold those. | 10:10 | |
| nwc10 | bother. Yaks stacked - 2 | 10:19 | |
| -2) figure out why the torture goes SEGV as of rebasing a week or more ago | 10:20 | ||
| -1) use torture to figure out this bug | |||
| actually maybe I have an off-by one | |||
| -0) fix this bug | |||
| and *then* maybe a few more before I can do the thing I actualyl want to do | |||
|
10:23
ggoebel1113 joined
10:31
jnap joined
|
|||
| FROGGS | nwc10: what is the thing you want to do, ooc? | 10:34 | |
| nwc10 | reduce the object header by 1 pointer | 10:36 | |
| hoelzro | I don't know if I ever got an answer to this -- is nqp::close($pipe) supposed to silently fail? | 10:55 | |
| the JVM openpipe test closes a handle twice, and doesn't seem to expect complaints | 10:56 | ||
| FROGGS | hoelzro: dunno | 10:59 | |
| jnthn | Does Perl count double-close as an error, in general? | 11:01 | |
| FROGGS | jnthn: you mean Peril? the old one? | ||
| nwc10 | $ perl -e 'close STDIN or warn $!;' -e 'close STDIN or warn $!;' | 11:03 | |
| Bad file descriptor at -e line 2. | |||
| can camelia do that? | |||
| moritz | no, camelia only does 6 | ||
| it's not onion or camel, after all :-) | |||
| FROGGS | perl -E 'use strict; use warnings; open(FH, ">hurz"); print(FH "hello"); close(FH) or warn 1; close(FH) or warn 2;' | ||
| 2 at -e line 1. | |||
| yeah | 11:04 | ||
| hoelzro | I think I found a bug in close, actually | 11:07 | |
| after closing, the old value of fd is still in the handle | 11:08 | ||
| so if that fd is re-distributed to the program by the OS, a double close could accidentally close an unrelated file | |||
| small chance, but it's possible | |||
| especially in a long running program | |||
| FROGGS | hoelzro++ | 11:11 | |
| hoelzro | I'll fix that tonight | ||
| jnthn | yes, that wants fixing | 11:12 | |
| hoelzro++ | |||
| hoelzro | \o/ | ||
| I'm helping! | |||
| FROGGS | of course you are | ||
| brb | |||
|
11:19
tgt joined
11:21
woolfy1 joined
11:24
lizmat joined
11:29
tgt joined
|
|||
| hoelzro | can I configure it so that libuv is built with debugging symbols? | 12:03 | |
| FROGGS | hack the makefile and make clean && make install ? | 12:09 | |
| hoelzro | ok, so get my hands dirty =) | 12:11 | |
| jnthn | nqp: say(nqp::can(nqp::null(), 'dugong')) | 12:12 | |
| camelia | nqp-parrot: OUTPUT«Null PMC access in find_method('dugong')current instr.: '' pc 42 ((file unknown):69510504) (/tmp/tmpfile:1)» | ||
| ..nqp-moarvm: OUTPUT«(signal SEGV)» | |||
| ..nqp-jvm: OUTPUT«Can not call method 'dugong' on a null object in (/tmp/tmpfile:1) in (gen/jvm/stage2/NQPHLL.nqp:1099) in eval (gen/jvm/stage2/NQPHLL.nqp:1085) in evalfiles (gen/jvm/stage2/NQPHLL.nqp:1291) in command_eval (gen/jvm/stage2/NQPHLL.nqp:1195) in …» | |||
| FROGGS | jnthn: do you have any pointers (haha!) about my v5 STable problem? | 12:16 | |
| jnthn | FROGGS: Well, mostly just working out where the STable is repossessed, and why... | 12:17 | |
| FROGGS | hmmm | ||
| dalek | arVM: 4080274 | jnthn++ | src/6model/6model.c: Make nqp::can have null check like nqp::findmethod |
12:23 | |
| arVM: 57206b0 | jnthn++ | src/core/ (2 files): Bring lookup semantics in line with other backends |
|||
| FROGGS | hmmm, it calls Perl5::Grammar.add_categorical for pre-/infixes that are in Perl5::Terms.pm which is v6 code | 12:32 | |
|
12:33
jnap joined
|
|||
| jnthn | That should mix in rather than modify the existing thing... | 12:34 | |
| FROGGS | true | 12:35 | |
| jnthn | I did fix one thing that made it not do so, though | ||
| Which is that the cache flushing would touch it | |||
| I added scwbdisable and scwbenagle around that | 12:36 | ||
| FROGGS: github.com/perl6/nqp/commit/080ce0...a05d83a5d9 | |||
|
12:41
tgt joined
|
|||
| FROGGS | I think the problem is that v5 loads Perl5::Terms as a v6 module, but it does it itself, when it should tell rakudo to do it | 12:51 | |
| wait no, I mean sort of... | 12:53 | ||
| kinda | |||
| hmmm | |||
| the question is: why does it use the Perl6::Grammar for parsing but then calls my add_categorical? | 12:54 | ||
| moritz | .oO( it's a kind of magic ) |
12:55 | |
| FROGGS | .oO( Merlin's Pants! ) |
12:56 | |
| Perl6::Grammar calls add_categorical on $/.CURSOR, I'll change that to self for testing | 13:05 | ||
|
13:34
jnap joined
13:42
dalek joined
|
|||
| moritz | somehow I have MANIFEST files in my 3rdparty submodules | 14:07 | |
| is that an artifact of something I did? or do others have that too? | |||
| jnthn | moritz: I see that it thinks there's untracked stuff in 2 of my 3rdparty submodules... | 14:08 | |
| dalek | arVM: 52fc525 | moritz++ | .gitignore: .gitignore release tarballs |
14:09 | |
|
14:23
jnthn joined
14:35
jnap joined
14:42
jnap joined
|
|||
| timotimo is digging around in the python api docs for gdb | 14:50 | ||
| FROGGS | I am switching back to $/.CURSOR.add_categorical now, but do a rebless of the cursor when switching grammars | ||
| timotimo | and now i'll have to dig deeper into the moarvm code so that i can write the automated garbage collector analyzer | ||
| does run_gc seem like a good entry point? | 14:51 | ||
| diakopter | what do you want to analyze | 14:52 | |
| timotimo | ever^H^H^H^Has much a spossible | 14:53 | |
| like what kinds of objects are how common on the heap | 14:54 | ||
| how many of each type get thrown out, how many get kept, how many get promoted to gen2 | |||
| how many things get kicked out of the gen2 | |||
| that sort of thing | |||
| since the gc already runs over all that data anyway, it'd be a good place to look, IMO. | |||
| diakopter | hm | 14:55 | |
| timotimo | hm? | ||
| dalek | arVM: 96dc4ea | diakopter++ | / (6 files): skeleton parts for call profiling |
||
| timotimo | i think run_gc is a very good place to look | ||
| diakopter | hm - to summarize all of that, you could count how many gc runs each object lives | 14:56 | |
| then when it's destroyed, write the data to a log in memory or something | 14:57 | ||
| of the reprname, typename (if available) | |||
| timotimo | i'm working on a gdb plugin | 14:59 | |
| i can just have a python-level dict collect all that data | |||
| in as much detail as i'd like | |||
| the good thing is you don't have to compile the support into the moarvm binary, all you need is gdb | 15:00 | ||
| FROGGS | Incompatible MROs in P6opaque rebless :o( # though, it feels a bit saner now | ||
| timotimo | and you can put the stats gathering into it only for select runs/frames/threads/... | 15:01 | |
| really, you can have an arbitrary watchpoint trigger the analysis | |||
| that's pretty neat | |||
| one thing that'll be a bit harder is to identify the classes properly | 15:06 | ||
| since getting the name of an object's class requires me to do some runloop trickery :\ | |||
| so i'll probably end up counting lots and lots of P6opaque objects | |||
| okay, need to get off this train soon | |||
|
15:13
tgt joined
15:16
ggoebel1113 joined
15:59
tgt joined
|
|||
| timotimo | i can't add breakpoints with commands to gdb from python, except by using the eval facility of gdb | 16:17 | |
| so i'll probably have to use "step to" and friends from python | |||
| jnthn | Rakudo Moar builds CORE.setting a little faster than Rakudo JVM on my box these days. | 16:43 | |
| Not quite a fair comparison, mind, since Moar doesn't have to build hundreds of lines of concurrency stuff | 16:45 | ||
| [Coke] | all is fair. | 16:51 | |
| TimToady | All for fair, and fair for all! --the Fair Musketeers | 16:59 | |
| timotimo | gdb apparently won't let me do things the way i had hoped to :( | 17:10 | |
| so i'll have to spit out data from moarvm - into a file perhaps - and then postprocess that | 17:11 | ||
| because i don't want to do the data analysis in C :| | |||
|
17:20
benabik joined
17:23
FROGGS joined
|
|||
| FROGGS | jnthn: I think I have worked around that STable problem | 17:38 | |
| jnthn | FROGGS: yay | 17:39 | |
| FROGGS | it is like $/.CURSOR is still the v5 one when switching back and forth and then try to mixin an infix in a v6 block | 17:40 | |
| and since I don't need these as proper infixes, I can just declare them as ::('infix:<P5+>'), and can still call them as subs | 17:41 | ||
| so I don't even have to touch Perl5::Actions | 17:42 | ||
| timotimo | sounds good | 17:43 | |
| how far do you get after that? :) | |||
| FROGGS | still failing like 80% of what v5-p passed | ||
| openpipe is one of the big things there | 17:44 | ||
| because the test suite needs it | |||
| timotimo | good point. | 17:47 | |
| since you've worked around the problem yourself, does that mean you won't do openpipe on moar now? :( | |||
| well, at least for windows | |||
| FROGGS | I still do it of course | ||
| I am not a git :o) | |||
| timotimo | :) | 17:48 | |
|
18:57
japhb_ joined
19:00
jnap joined
|
|||
| FROGGS | ll lib/Perl5/Config.* | 19:38 | |
| -rw-r--r-- 1 froggs froggs 580313 Jan 28 18:02 lib/Perl5/Config.jar | |||
| -rw-r--r-- 1 froggs froggs 33240641 Jan 30 20:34 lib/Perl5/Config.moarvm | |||
| -rw-r--r-- 1 froggs froggs 53899 Jan 26 20:16 lib/Perl5/Config.pm | |||
| Project Euler | |||
| err | 19:39 | ||
| LOL!! | |||
| jnthn: --------------^ | |||
| timotimo | wat. | 19:40 | |
| FROGGS | that explains why it takes like ten minutes to compile | ||
| it has to pull all these bytes of its sleeves | 19:41 | ||
| timotimo | what is all that data? >_> | ||
| FROGGS | I guess it is a result of the heavy "sub ::('foo')(...) {...}" usage | 19:42 | |
| v5 seems to be a nice test case for moar :o) | |||
| maybe because of the absurdities its author does | 19:43 | ||
|
19:48
jnap joined
|
|||
| FROGGS | perl6-m -I/home/froggs/dev/v5/lib --stagestats --target=mbc --output=lib/Perl5/Config.moarvm lib/Perl5/Config.pm | 19:59 | |
| Stage start : 0.000 | |||
| Stage parse : 965.384 | |||
| jnthn | I'll bet it's deriving shitloads of languages and then keeping the NFAs somehow... | 20:07 | |
| FROGGS | jnthn: either that, or the 1k lines hash it contains is expensive | 20:09 | |
| because other modules like English.pm depend on Terms.pm too, but are only 3meg in size | |||
| damn | 20:10 | ||
| declaring subs like ::('infix:<P5+>') call add_categorical too :o( | |||
| so I got my STable problem back | |||
| damn | |||
|
20:32
eternaleye joined
|
|||
| timotimo | ;( | 20:32 | |
| FROGGS | I just put a return in my add_categorical which is called accidently :/ | 20:34 | |
| timotimo | :< | ||
| masak | add... catgegorical? | 20:40 | |
| masak perks up | |||
| did somebody say category theory? :) | |||
| FROGGS | no, not at all :o) | ||
| FROGGS hides | |||
| jnthn shoots a terminal arrow at masak | 20:43 | ||
| masak | hehe, it's objects that are terminal, not arrows... :) | 20:44 | |
| jnthn | bah | 20:45 | |
| masak | maybe I should hold a category theory session on IRC... :> | 20:47 | |
| masak .oO( #perl6-cat-theory ) | |||
| FROGGS | hmmm, if I would declare my subs like ::('infix<P5+>') it would not be recognized as a categorical | ||
| jnthn | FROGGS: Uh, you're using a syntax explicitly intended to defer lookups at runtime to try and mutate the grammar at compile time? :) | 20:48 | |
| Unless you're using that to set up an export hash... | |||
| stash | |||
| In which case you want the & on there and a : after infix. | |||
| FROGGS | I don't want to mutate the grammar at all | 20:49 | |
| because no one will actually use infix P5+ | |||
| they will type + which results in a call to sub infix:<P5+> | 20:50 | ||
| jnthn | ah | ||
| FROGGS | so I don't need that extra rubbish :o) | 20:51 | |
| and I got rid of the monkey typing today too fwiw | |||
| jnthn hopes his wrist is fully better soon so he can stop monkey typing... | 20:52 | ||
|
20:52
jnap joined
|
|||
| FROGGS | my hands are fine atm, even when I hack like 14 hours a day | 20:53 | |
| timotimo | wow | ||
| do yourself a favor and start using workrave | 20:54 | ||
| jnthn | Well, the wrist is more thanks to landing on it when I slipped on some ice a few days back... | ||
| timotimo | :( | ||
| masak | :( | 21:03 | |
|
21:03
benabik joined
|
|||
| FROGGS | jnthn: it took ages again because my custom postcircumfix tried to match everywhere again | 21:21 | |
| jnthn: here, look yourself :o) gist.github.com/FROGGS/f2784975d7553ca15d5b | 21:23 | ||
| takes 10s as it is, an 0.5s when the hash's content is commented | 21:24 | ||
| and takes 0.2s when only the postcircumfix is commented | |||
| the resulting file size is 1_758_864, but only 435_232 when the hash's content is commented, and only 12_598 without the postcircumfix | 21:26 | ||
| diakopter | FROGGS: lolololololol | 21:27 | |
| FROGGS | :o) | ||
| jnthn | What on earth is in the hash... :) | ||
| FROGGS | as I said, v5 is weird enough to highlight such strange things :o) | ||
| TEXT!! | |||
| bloody text | |||
| jnthn | Nearly nothing...wtf... | ||
| FROGGS | *g* | 21:28 | |
| FROGGS .oO( A design flaw in the VM? How much has to be rewritten? Are there already blog posts about the end of MoarVM? ) | |||
| :P | |||
| jnthn: I can provide a bigger hash if you want to see it compiling for >900s :o) | 21:31 | ||
| but I guess 10s is nice enough | |||
| diakopter | well | ||
| the dumper doesn't dump the serialized stuff | |||
| jnthn | FROGGS: If you remove the postcircumfix, does it make a difference? | ||
| FROGGS | jnthn: yes, 0.2s compile time and a tinsy file | 21:32 | |
| diakopter | only thing I can think of is inadvertent duplication of data by the serializer | ||
| jnthn | OK, so it's nothing to do with the hash | ||
| FROGGS | jnthn: no, I think random code will behave the same | 21:33 | |
| jnthn | FROGGS: If you just have a file of general bits of code and that postcircumfix at the top, does it do the same? | ||
| FROGGS | I'll check | ||
| jnthn | OK. How high is memory use with/without the postcircumfix? Notably different also? | ||
| diakopter: I'm suspecting it's not the serializer itself; I think it may just be Doing Its Job | 21:34 | ||
| diakopter: And it's the stuff it's being asked to do that's the problem. | |||
| FROGGS | yes, fifty lines of "1 + 2 + 3 + 4;" and that postcircumfix take >20s to compile | ||
| 42s to be exact | 21:35 | ||
| with: 27.68user 0.05system 0:27.75elapsed 99%CPU (0avgtext+0avgdata 232820maxresident)k | 21:36 | ||
| 0inputs+23160outputs (0major+62425minor)pagefaults 0swaps | |||
| without 0.35user 0.04system 0:00.40elapsed 99%CPU (0avgtext+0avgdata 102448maxresident)k | |||
| 0inputs+24outputs (0major+26689minor)pagefaults 0swaps | |||
| jnthn | Whee | 21:37 | |
| OK, I don't *know* what it is, but that gives me some clues. Thanks. | |||
| I really should work on my slides right now... | |||
| But will see if I can get at it tomorrow or the weekend. | 21:38 | ||
| FROGGS | maybe here is something obviously wrong, dunno: github.com/rakudo/rakudo/commit/6a...86daa57e75 | ||
| no hurry, nobody is using that atm :o) | |||
| diakopter | it's not a sev 1? ;) | ||
| FROGGS | no, certainly not :o) | 21:39 | |
| jnthn | .oO( SIGSEV1 ) |
||
| FROGGS | no problem, I got one atm :/ | 21:40 | |
| I wonder... src/core/interp.c:252 | 21:41 | ||
| bindlex_no | |||
| hmmm | |||
| dalek | arVM: d44d015 | (Tobias Leich)++ | src/core/interp.c: find_lex_by_name can return NULL, check for it |
21:53 | |
|
21:53
jnap joined
|
|||
| diakopter | I suppose that's one approach | 21:53 | |
| (adding null checks) | 21:54 | ||
| FROGGS | and the other? | ||
| diakopter | well someday we wanted to make the pmcnull thingy | ||
| <- teasing jnthn by calling it pmc ;) | |||
| FROGGS | hehe | 21:55 | |
| well, for me atm I prefer to get the following rather a SIGSEGV: | 21:56 | ||
| Cannot bind to not existing lexical 'self' | |||
| in sub P5unpack at lib/Perl5/Terms.pm:1216 | |||
| diakopter | :) | ||
| jnthn | Aye, this one isn't even the case that the null strawberry unicorn would handle anyway... | ||
| FROGGS | spot the error: multi P5unpack(Str:D: \SELF) is export { SELF.P5unpack( CALLER::DYNAMIC::<$_> ) } | 21:57 | |
| diakopter | $*CALLER | ||
| FROGGS | no | ||
| it is about a lexical 'self' | |||
| *g* | |||
| jnthn | uh, yeah...why the : in a sub :P | 21:58 | |
| FROGGS | :P | ||
| yeah | |||
| jnthn | Wrong failure mode, though...should never even compile | ||
| FROGGS | this is the definition of WAT | ||
| diakopter | std: multi P5unpack(Str:D: \SELF) is export { SELF.P5unpack( CALLER::DYNAMIC::<$_> ) } | ||
| camelia | std 09dda5b: OUTPUT«ok 00:01 128m» | ||
| FROGGS | std is lying | ||
| this is really annoying when you turn methods into subs or subs into methods | 21:59 | ||
|
22:12
tgt joined
22:50
arnsholt joined
22:53
jnap joined
|
|||