Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-09-09

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:33 woosley joined #moarvm
05:36 Woodi joined #moarvm
06:05 diakopter ...
06:10 JimmyZ how many hours left to push nfg?
06:44 FROGGS joined #moarvm
06:46 diakopter ack
06:46 diakopter still embroiled in gc.
06:46 sorear there's a deadline?
06:46 diakopter well, self-imposed
07:00 FROGGS morning o/
07:01 diakopter hi
07:02 JimmyZ how many hours left to push nfg?
07:05 jnthn will nfg be pushed soon?
07:05 yoleaux 8 Sep 2013 22:28Z <FROGGS> jnthn: I think I got something, it does not resume though :/, it dies as if it does not find the handler in the second run: https://gist.github.com/FR​OGGS/d006980f3c95b53364ca
07:05 jnthn ;)
07:05 jnthn morning, #moarvm :)
07:06 diakopter sigh.
07:07 FROGGS someone should really push nfg :P
07:07 FROGGS ohh, what a magical number of users here...
07:07 diakopter how many?
07:07 JimmyZ Is it really really hard to type `git push orgin nfg:nfg`?
07:07 diakopter yes
07:08 JimmyZ how about copy my one
07:08 JimmyZ :P
07:08 diakopter enough teasing please.
07:09 diakopter if the code isn't in a state that's usable by someone else, all the work will have been wasted.
07:10 FROGGS diakopter: 42
07:10 diakopter because it's so far diverged from a commit many many months ago
07:10 diakopter the best person to re-merge it is I
07:11 diakopter the worst that could happen is someone wastes their own time making non-progress trying to understand it enough to integrate it
07:11 FROGGS true I guess
07:12 JimmyZ FROGGS: Did you get how to use msvc debugger?
07:12 diakopter and frustration and annoyance could result, and going down wrong paths of fixing
07:12 * arnsholt goes to vote
07:12 arnsholt Then more JVM native call!
07:12 FROGGS JimmyZ: I have still the express version installed, and this one does not have devenv
07:13 JimmyZ FROGGS: just open a project, and select moarvm.exe
07:13 diakopter *headdesk*
07:13 FROGGS JimmyZ: and, I think bisecting might be a better choice for this issue because even gdb does not produce a useful backtrace
07:13 diakopter JimmyZ: he can't "open a project" without the program to open it with
07:14 diakopter wait.
07:14 FROGGS diakopter: the VS express has a GUI
07:14 diakopter oh.
07:14 diakopter that's devenv.exe
07:14 diakopter what else could it be named?
07:14 diakopter you said you didn't have a devenv.exe
07:15 JimmyZ I always open the project and select moarvm.exe, and I can use msvc debuuger
07:15 FROGGS I'll install VS no-express after $work
07:15 JimmyZ FROGGS: I'm using express too
07:15 JimmyZ I still don't know what your problem
07:16 FROGGS diakopter: the gui is called VCExpress.exe
07:16 FROGGS err, VS...
07:16 diakopter ah.
07:19 FROGGS The program "[1076] moarvm.exe: system own" exited with Code 1 (0x1).
07:19 * FROGGS changes the working dir and adds args
07:20 FROGGS ohh, nice
07:20 FROGGS exception in MVMuint64 MVM_repr_elems(MVMThreadContext *tc, MVMObject *obj) {
07:20 FROGGS return REPR(obj)->elems(tc, STABLE(obj), obj, OBJECT_BODY(obj));
07:20 FROGGS }
07:21 JimmyZ FROGGS: Do you use it by open a project and select moarvm.exe?
07:21 FROGGS JimmyZ: I openend moarvm.exe as a project
07:21 JimmyZ FROGGS: yes, I did this way too
07:22 JimmyZ FROGGS: you got this, and look the bt, you will find intstruction are all zero
07:23 FROGGS +obj0x00000000 {header={...} st=??? pad=??? }MVMObject *
07:23 FROGGS +tc0x00382b30 {nursery_alloc=0x00d3c12c nursery_alloc_limit=0x00db0020 gc_status=0 ...}MVMThreadContext *
07:25 FROGGS damn it, I'd like to change the language to english... it hard to understand german in this context
07:25 JimmyZ ...
07:25 * JimmyZ is using chinese version..
07:26 timotimo LC_ALL=C
07:26 FROGGS hehe
07:26 timotimo oh wait, windows ... :(
07:26 timotimo i guess you'll have to get a computer from the UK then
07:26 FROGGS if you see the word "Stapelrahmen" you have to translate it to english to know what it means
07:26 timotimo hahahaha
07:27 timotimo one of our profs calls has this word "kellerabzug". please indulge me and guess what it could mean.
07:27 FROGGS timotimo: no, you sort of can switch the language, you can even download language packs for polski for example, but I dont find the option to switch
07:27 timotimo you switch by installing a different windows?
07:27 FROGGS nah
07:27 FROGGS kellerabzug... hmmm
07:28 diakopter collaborator?
07:28 timotimo there's kind of a twisted logic to it
07:28 FROGGS like base trigger or something?
07:28 timotimo not at all
07:28 diakopter heh.
07:29 FROGGS timotimo: do tell, please
07:29 timotimo stack trace.
07:30 FROGGS bah
07:30 FROGGS yeah, but I understand now
07:30 FROGGS >.<
07:30 timotimo because a stack is a "kellerspeicher" and a print-out is sometimes called "abzug"
07:30 timotimo although the first time i heard that word the "abzug" part reminded me more of these emergency smoke removal thingies you find in buildings
07:31 odc joined #moarvm
07:32 FROGGS ARGLBARGL
07:32 FROGGS the language selector shows: <german>, <like windows>
07:32 timotimo %)
07:38 dalek MoarVM/gcorch: f17b31c | diakopter++ | / (13 files):
07:38 dalek MoarVM/gcorch: wip3
07:38 dalek MoarVM/gcorch: review: https://github.com/MoarVM/MoarVM/commit/f17b31c3b0
07:39 JimmyZ FROGGS: I think the introductions is zero because nqp pass frames with zero instruction. but debuging nqp is hard to me
07:40 FROGGS hmmm
07:41 JimmyZ the hard part to me is waiting for compiling :(
07:43 not_gerd joined #moarvm
07:43 not_gerd o/
07:44 FROGGS hi not_gerd
07:46 not_gerd I played around with C11 this weekend
07:46 not_gerd you can do some nifty things with _Generic
07:46 not_gerd eg a type-safe printf, or automatically matching C types with dynamically-types runtime types
07:51 not_gerd also wrote https://gist.github.com/gerdr/7bf984dbc8b365d13330 because I finally got annoyed enough with ALT-Tab
07:51 not_gerd not much on the moarvm front, though
07:52 not_gerd diakopter: what would be most useful for me to do - build system (shared/static), bc validation, nativecall, something else?
07:53 JimmyZ seflhost!
07:53 JimmyZ *self
07:54 JimmyZ kidding :)
08:04 diakopter not_gerd: I'd guess .. hmm.
08:05 diakopter *thinks a bit*
08:05 diakopter actually if you want to start diving into debugging the serialization tests....
08:05 diakopter that would save jnthn the most time
08:06 not_gerd_ joined #moarvm
08:07 diakopter not_gerd_: you missed my reply maybe
08:07 not_gerd_ diakopter: saw the logs
08:07 diakopter .tell raiph http://www.reddit.com/r/perl/comments/1lumnn/in_a_​parallel_universe_what_would_have_happened/cc3swfq
08:07 yoleaux diakopter: I'll pass your message to raiph.
08:08 not_gerd_ I can look into the serialization tests later today
08:12 FROGGS I think it dies on winxp 32 when compiling op no_op
08:13 not_gerd who needs that op anyway - just get rid op it ;)
08:13 not_gerd *of
08:13 FROGGS *g*
08:13 diakopter heh.
08:17 JimmyZ I thought parrot's noop was used by rakudo/nqp
08:20 dalek MoarVM: f6d1e4d | (Tobias Leich)++ | src/core/interp.c:
08:20 dalek MoarVM: declaration before code
08:20 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/f6d1e4d0bd
08:21 FROGGS -.-
08:21 FROGGS FROGGS--
08:21 timotimo hm. is that just convention or is there something important about it?
08:22 not_gerd timotimo: MSVC only supports bits and pieces of C99
08:23 not_gerd declaration after code is not (yet?) one of them
08:23 not_gerd the reply to C coders from Microsoft has been 'just use C++'
08:23 timotimo >_<
08:25 timotimo i know! write moarvm in c++, so you have a super sophisticated object system to use for perl6!
08:26 FROGGS \o/ let's do it now!
08:26 JimmyZ Creating a C project is not as easy as Creating a C++ project in MSVC ...
08:33 diakopter *wham* *wham* *wham*
08:33 jnthn wow, I go to teach and when I come back you're talking about C++ :P
08:33 timotimo diakopter: wake me up before you go go?
08:33 diakopter gogo?
08:34 jnthn We could go Go... :)
08:34 timotimo go-go, apparently
08:34 FROGGS in src\mast\compiler.c line 560 o->operands is NULL
08:35 FROGGS jnthn: we will convert everthing to C++ when you are not looking ò.ó
08:35 FROGGS MUHAHHAHAAHA
08:36 timotimo just replace every puts with cout <<; that's all, right?
08:37 JimmyZ replace all struct to class XXX  { }
08:37 timotimo ah, that too, yes
08:37 timotimo oh, and replace ".h>" with ">" in includes
08:37 timotimo oh, actually
08:37 timotimo <(.*).h> with <c\1>
08:38 timotimo probably have to wrap it between #try and #except file-not-found
08:38 not_gerd timotimo: using *.h is fine - it is just guaranteed to place the symbols in the top namespace
08:38 * jnthn really does not know C++ :)
08:38 not_gerd c* may or may not do so
08:38 JimmyZ well, I know nothing about C++ :P
08:39 jnthn I drink with the C++ teacher at $dayjob enough to know lots of crazy things about it... :)
08:39 timotimo don't you mean c\\\?
08:39 not_gerd ie if you #include <cstdio>, you *should* use std::puts()
08:39 jnthn timotimo: Is that a programming language you can't escape from? :P
08:39 arnsholt jnthn: Have you read the C++ FQA?
08:40 jnthn arnsholt: A while back :)
08:40 timotimo tee hee
08:40 JimmyZ I haved read part of C FQA
08:40 jnthn not_gerd: You could do the serialization stuff in so far as there are tests for it, so it's "just" makign them pass...but it may not be the most -Ofun thing to do :)
08:41 jnthn bc validation is important from an error detection / security standpoint :)
08:42 jnthn arnsholt++ has written some tests, iiuc, that should make nativecall stuff easier to check is working too...it's certainly not critical path, but we'll need it before Rakudo on Moar is useful for a bunch of stuff that depends on it.
08:43 timotimo jnthn++ #moarvm blog post the other day
09:21 BinGOs joined #moarvm
09:21 dalek joined #moarvm
09:51 JimmyZ FROGGS: I think add 'if(!op)  DIE(vm, "XXXX", op);' to compile_instruction after 'unsigned short op   = o->op;' will help you get a nqp backtrace
09:51 JimmyZ which may be useful
09:52 FROGGS JimmyZ: awesome, will try
09:52 JimmyZ or set a brakepoint condition if op == 0
09:53 JimmyZ well, breakpoint is not that useful since you can it in the segfault backstrace 2~3 level
09:55 JimmyZ the o->op will be something like 26634692934, after unsigned short op   = o->op, you got a op = 0
09:55 JimmyZ s/can it/can see it/
09:57 dalek MoarVM/validation: a9d954c | diakopter++ | build/Makefile.in:
09:57 dalek MoarVM/validation: more consistent build output
09:57 dalek MoarVM/validation: review: https://github.com/MoarVM/MoarVM/commit/a9d954c3bf
09:57 dalek MoarVM/validation: f50dfa1 | (Tobias Leich)++ | / (9 files):
09:57 dalek MoarVM/validation: added nqp::rethrow, t/nqp/44 only misses resume
09:57 dalek MoarVM/validation: review: https://github.com/MoarVM/MoarVM/commit/f50dfa1d24
09:57 dalek MoarVM/validation: d345e38 | (Gerhard R)++ | / (10 files):
09:57 dalek MoarVM/validation: Merge branch 'master' into validation
09:57 dalek MoarVM/validation: review: https://github.com/MoarVM/MoarVM/commit/d345e38107
09:57 dalek MoarVM/validation: e089933 | (Tobias Leich)++ | src/core/interp.c:
09:57 dalek MoarVM/validation: declaration before code
09:57 dalek MoarVM/validation: review: https://github.com/MoarVM/MoarVM/commit/e089933431
09:58 FROGGS JimmyZ: https://gist.github.com/FR​OGGS/43f4ae11d579518d3948
09:58 arnsholt not_gerd: If you decide to work on the native call stuff, I'm working on the JVM side in nqp/nativecall-jvm
09:59 arnsholt The general approach there should work for Moar as well
10:00 JimmyZ FROGGS: I think you could use .DUMP for debug
10:00 JimmyZ NQP one
10:00 FROGGS JimmyZ: where should I call that?
10:01 not_gerd arnsholt: so it doesn't make sense to try to recycle the parrot version?
10:01 JimmyZ FROGGS: NQPHLL.nqp:914
10:01 JimmyZ I thind, dump the mast
10:01 JimmyZ *think
10:01 dalek MoarVM/validation: 8bd9665 | (Gerhard R)++ | src/core/validation.c:
10:01 dalek MoarVM/validation: Remove TODO and debug code
10:01 dalek MoarVM/validation: review: https://github.com/MoarVM/MoarVM/commit/8bd96656f4
10:02 arnsholt not_gerd: Yeah, there's probably lots of code you can reuse there too
10:02 * JimmyZ decommute
10:03 not_gerd arnsholt: I've started with a naive import of the parrot code in a branch
10:05 not_gerd the idea was to get that to (mostly) compile by doing a stupid Parrot -> MoarVM translation and start from there
10:05 not_gerd if the JVM stuff is superior that might not be a good idea
10:06 not_gerd how close is the JVM factoring to Parrot?
10:06 arnsholt Looking pretty close, so far
10:06 arnsholt Of course there's going to be some differences since I'm using JNA to call into C, but I'm keeping the general gist of it
10:07 arnsholt Also trying to clean it up a bit as I go along
10:08 arnsholt The Parrot -> Moar approach is probably going to work out pretty well
10:11 FROGGS JimmyZ: it doesnt not dump the op: https://gist.github.com/FR​OGGS/43f4ae11d579518d3948
10:13 not_gerd arnsholt: is there any logic in place to actually inline structures instead of just referencing them by pointer?
10:14 not_gerd I did not see anything like that in the Parrot code
10:14 FROGGS ahh, QASTMoar.nqp line 3414
10:16 FROGGS okay, fixed that I think
10:23 dalek MoarVM: 8e0e8a7 | (Tobias Leich)++ | lib/MAST/Nodes.nqp:
10:23 dalek MoarVM: properly DUMP op names
10:23 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/8e0e8a7f62
10:23 arnsholt not_gerd: Nope. We have to implement it at some point, though
10:24 arnsholt But I'm still not sure how the Perl 6 side of things is going to look, which makes implementing the plumbing a bit pointless (and a bit tricky)
10:27 FROGGS JimmyZ: including opnames: https://gist.github.com/FR​OGGS/43f4ae11d579518d3948
10:36 jnthn not_gerd: P6bigint is an example of a REPR that can inline something more complex, but in reality int/num/str are all examples of it too
10:37 not_gerd class Bar is repr('CStruct') { ... }; class Foo is repr('CStruct') { has Bar $.bar is inline }
10:37 not_gerd or something similar
10:37 arnsholt Yeah, that's what I'm hoping for
10:39 FROGGS hmmm, it gets op 42968
10:39 FROGGS (when we only have 492)
10:45 diakopter well that can't be right :)
10:46 diakopter jnthn: vs2012 has a really pretty dark theme built in
10:49 foo_bar_baz joined #moarvm
10:49 arnsholt not_gerd: Oh, one more thing: I'm planning on killing off the CStr REPR and related functionality (NativeCall.explicitly-manage(), most notably) once I get the JVM stuff working
10:49 arnsholt So no need to put too much work into that =)
10:52 diakopter arnsholt: dupe of buf or something?
10:52 diakopter er carray?
11:01 not_gerd diakopter: the validation branch is ready for review, btw
11:01 arnsholt Yeah, decode string into buf and copy that into a CArray
11:01 not_gerd still some TODOs, but we pass selftest and do strcitly more checks than master
11:02 arnsholt And then we can control whether the memory backing the array should be freed or not separately
11:06 dalek Heuristic branch merge: pushed 58 commits to MoarVM/nativecall by gerdr
11:06 not_gerd just got the branch up to date
11:09 diakopter arnsholt: I like that plan
11:10 diakopter arnsholt: will the one on jvm use sun.misc.Unsafe so the pointers can *actually* be passed to C libraries?
11:11 * diakopter looks at validation branch (again)
11:20 arnsholt diakopter: I'm using JNA to interact with foreign stuff, since that lets me avoid writing C altogether
11:25 arnsholt Dunno if JNA uses that stuff internally, though I suspect not
11:25 arnsholt From looking at the API, I think it stores C pointers as Java longs and does most of the heavy lifting as part of the JNI bits
11:40 not_gerd arnsholt: any comments on https://gist.github.com/gerdr/96b7fa74fc99c44b10a1
11:55 jnthn diakopter: Yeah...it's prettier than the 50 shades of grey theme at least...
11:56 jnthn arnsholt: The way I factored the decode/encode ops, they can potentially work against a CArray directly too without the copying :)
11:56 jnthn arnsholt: Where potentially means "if they dont' already work we can make them do so"
12:35 arnsholt Oh, that's briliant!
12:36 arnsholt Something like that was on my list to do eventually, but for the first version I was just going to do the stupid version
12:37 arnsholt not_gerd: CUnion is good, we probably should do that eventually
12:37 arnsholt Not sure I like the pointer changes
12:38 arnsholt I would like to do something like a deref-able pointer type eventually, but that should be separate from CArray
12:39 arnsholt I think being explicit about whether a C pointer is an array or a pointer to a single element is a good distinction to have
12:45 not_gerd comceptionally, how many pointer types do we want - VoidPointer, ObjectPointer, ArrayPointer, CheckedPointer
12:46 not_gerd s/com/con/
12:46 not_gerd no, that's nor right
12:46 not_gerd if we have an ArrayPointer, no need for CheckedPointer
12:47 not_gerd but UncheckedPointer perhaps
12:47 arnsholt At the Perl 6 level, I think we want two: OpaquePointer and TransparentPointer
12:47 arnsholt I don't think NativeCall should start dabbling with bounds checking
12:49 not_gerd VoidPointer, ObjectPointer, CheckedPointer, UncheckedPointer would make sence, imo
12:50 not_gerd the latter three know their types and CheckdPointer its bounds
12:50 not_gerd you can do arithmetics with the last 2
12:50 arnsholt But do we really want to support pointer arithmetic at the HLL level_
12:51 not_gerd well, I do ;)
12:53 not_gerd how else are you going to write operating systems in Perl6 ;)
12:55 jnap joined #moarvm
12:56 FROGGS we sould totally write a Winux(tm) in Perl 6 that fit everyone's needs
12:58 tadzik sounds easy. Let's just combine all the best parts of everything
12:59 jnap joined #moarvm
13:00 FROGGS and I already now some awesome killer features I'm going to implement first!
13:00 FROGGS brb # cake
13:17 not_gerd arnsholt: https://gist.github.com/gerdr/0d176de4732660a7b2fd
13:17 not_gerd that would be what I'd like to aim for
13:19 LWA joined #moarvm
13:19 arnsholt Still not too keen on pointer arithmetic
13:20 arnsholt And we can probably back both Transparent and Opaque pointers by a unified CPointer REPR
13:20 dalek joined #moarvm
13:21 arnsholt Just throw an exception if the REPR hasn't been specified to be of a certain type
13:24 not_gerd I don't know what's the convention here - are NULLs ok for xxREPRData members?
13:25 not_gerd or just allocate the REPRData even if it's ignored?
13:25 not_gerd semantically, VoidPointer and TypedPointer REPRs are distinct, imo
13:37 arnsholt Well, just let the REPR data be the type object for the type we're pointing to
13:37 arnsholt Then it'll be null if we don't know what we're pointing to and non-null otherwise
13:41 not_gerd Parrot's CArrayREPRData also has an elem_kind member
13:41 not_gerd I haven't looked into how that's used and if it's really necessary for TransparentPointer
13:42 not_gerd but first guess would be yes, we want to have it
13:42 arnsholt We use elem_kind for NULL elements, IIRC
13:43 arnsholt Since those return the type object
13:43 diakopter arnsholt: but does jna have a call to malloc in C or using Unsafe?
13:44 * diakopter imagines Unsafe
13:44 arnsholt diakopter: I have no idea. It lets you malloc/free, but I don't know if that's via Unsafe or done directly in C
13:45 arnsholt It uses libffi internally, so it might be in C
13:52 not_gerd bye, #moarvm
13:52 not_gerd left #moarvm
14:33 dalek joined #moarvm
14:36 Guest1337 joined #moarvm
14:54 benabik joined #moarvm
15:06 Guest1337 joined #moarvm
15:35 FROGGS[mobile] joined #moarvm
15:37 FROGGS[mobile] jnthn: if I cant fix the 32bit windows problem, do you think we can look at that together this weekend?
15:38 diakopter nooo :P
15:38 diakopter it was obviously introduced by my gc fixes; I'll fix it asap
15:39 FROGGS[mobile] I'm not so sure about that
15:42 Guest1337 joined #moarvm
15:43 jnthn FROGGS[mobile]: Yeah, or I may get chance sooner...I recreated it on my laptop last night, but was too hosed to do anything about it.
15:44 FROGGS[mobile] awesome
15:44 FROGGS[mobile] damn, I whish it was friday already
15:44 * diakopter wonders how in the world jnthn will have to time to prepare a 2-week class in 1 week, and then to fit it in 2 days
15:45 FROGGS[mobile] hehe
15:45 jnthn diakopter: By having it 95%+ prepared already. :)
15:45 lizmat I'm more worried about the state of mind of the workshoppees on Sunday night
15:47 FROGGS[mobile] lizmat: because of all these bad puns there?
15:47 jnthn lizmat: With a little luck, the Rakudo/NQP parts of their branes will look more like mine. :)
15:47 diakopter and the rest.. mush
15:47 jnthn I make no claim as to whether that's a *good* state :P
15:47 lizmat and that's supposed to make me less worried ?  :-)
15:48 jnthn lizmat: If nothing else, they'll be better at loose coupling and puns... :P
15:48 jnthn Which are the two most important things, really...
15:49 lizmat I feel decoupled already  :-)
15:49 * jnthn avoids a "train of thought" pun...
15:51 diakopter lizmat: does Wendy know you feel this way? :)
15:51 lizmat ah, yes
15:58 LWA joined #moarvm
16:32 * TimToady wishes English had two different words for "has", because he has a liver in a very different sense than he has a lover...
16:32 * TimToady doesn't like 'is inline'...
16:34 Ulti how are those different types of has, both are vital for life
16:34 Ulti just in different scales of time
16:35 TimToady well, then compare my liver to a laver, or a louver instead
16:35 arnsholt TimToady: Does 'is flattened' make you less sad?
16:35 TimToady no, that's not the point...
16:35 TimToady that makes me sadder because it's even longer
16:36 TimToady and I suspect pointerness for that repr should not be the default
16:37 jnthn Let's do what c# does and introduce "struct" to go with "class" but mean "flattens" :P
16:37 TimToady has Ptr[Foo] $.foo; or some such
16:37 jnthn dinner &
16:38 arnsholt has Ptr[AStruct] might work, I guess
16:38 TimToady well, if it's a violent enough default switch, a different keyword is in order; hence my ruminations about the meanings of "hash"
16:38 TimToady *has!!!
16:38 TimToady HAS $.foo;   # :)
16:38 TimToady HAS $.liver;
16:39 moritz made-of $.liver;
16:39 TimToady has $.laver;
16:39 TimToady well, probably shouldn't be doing language design here... :)
16:41 lizmat owns?
16:41 TimToady same problme
16:41 TimToady em
16:41 TimToady though it does have the advantage of being a different word, at least
16:42 lizmat now to decide whether it is the liver or the lovers that one owns
16:42 TimToady contains $.liver;  # too long <sniff>
16:43 TimToady part $.liver;
16:43 TimToady I kinda like that
16:43 lizmat .o( do we part with our liver / lover )
16:44 lizmat if considered as a verb
16:44 jnthn .oO( contains $.lover )
16:44 jnthn really dinner &
16:45 TimToady jnthn: I wasn't gonna go there :)
17:00 FROGGS[mobile] class House { got $door; }
17:01 FROGGS[mobile] class Goat { got $good; }
17:09 Ulti also weird that l[aeio]ver are all words but luver isn't :S reserved for future use :)
17:19 FROGGS joined #moarvm
17:25 FROGGS jnthn: is it okay if I bug you later about nqp::resume?
18:00 TimToady (discussion moved from #moarvm) I think that CStruct should probably default to aggressive inlining of any constant(ish)-sized 'has', and you must override that with explicit typing: Ptr[Any] or Scalar[Any] or whatever
18:00 TimToady so a CStruct might inline the header of an Int, though of course it can't inline anything variable sized
18:01 TimToady unless there is a relative sane max size (for something unionish)
18:02 TimToady they are, after all, C structs, so they should behave like C structs in requiring indirection to be explicit
18:02 arnsholt (We're still in #moarvm =)
18:02 TimToady oops :)
18:03 japhb joined #moarvm
18:03 timotimo was about to say :)
18:03 TimToady well, you guys are the guts-folk at the moment anyway... :)
18:03 TimToady this is more implementation philosophy; we can talk about whether we want a 'struct' keyword on #perl6 :)
18:04 arnsholt I sort of agree that it makes sense to default to inlining aggregates
18:04 diakopter HAZ
18:05 benabik joined #moarvm
18:05 TimToady you are what you eat?
18:05 arnsholt But on the other hand, having pointer as the default has been a pretty nice default
18:05 diakopter HAZE
18:06 arnsholt Oh, and it's worth noting that CStruct and CArray maintain two separate storage spaces, ATM
18:06 FROGGS btw, I'd like to reserve 'template' as a keyword for the verbose for of pack/sprintf (which can be one thing I hope)
18:06 FROGGS form*
18:07 diakopter just reserve the keyword forms
18:07 diakopter formats
18:07 diakopter you could even use the p5 formats
18:07 diakopter sorry, I'm being a griefer a bit too much lately
18:08 TimToady .oO( use timeline 'FROGGS'; from future import 'template'; )
18:08 FROGGS hehe
18:08 TimToady well, I guess auth is kinda like a future alternative timeline
18:09 FROGGS I still have no clue how such a template would look like
18:09 TimToady .oO( the many forks interpretation of QM )
18:11 diakopter TimToady: when does Aron say the expansion will speed up to lightspeed and all the other galaxies will suddenly disappear
18:11 diakopter well, not suddenly.
18:11 diakopter redshift away
18:12 TimToady I'm not aware that Aron says that, but he probably is personally acquainted with people who do say :)
18:12 diakopter oh, I was hoping he was there for you to ask
18:12 TimToady went home last night
18:13 TimToady in any case, he'd say 'assuming that dark energy is proportional to the actual size of space, and assuming we know how to measure the actual size of space correctly...'
18:13 diakopter and assuming it doesn't start contracting before then?
18:14 TimToady that is subsumed in the first assumption
18:14 TimToady or the second...
18:15 diakopter maybe instead of the galaxies getting further apart everything's uniformly shrinking
18:16 diakopter including speed of light changing
18:16 diakopter *farther
18:16 FROGGS I am your farther?
18:16 diakopter no, murther
18:16 TimToady Use the farce!
18:17 FROGGS hehe
18:17 FROGGS it is, it is
18:17 diakopter or the farsi
18:18 * FROGGS resumes the work on nqp::resume
18:19 * diakopter throws away his work on gc
18:19 FROGGS *g*
18:34 LWA joined #moarvm
19:06 cognominal joined #moarvm
19:34 jnthn om nom
19:34 * jnthn had dinner at a place that had one of his fave imperial stouts on tap :)
19:35 lizmat sounds excellent!
19:35 arnsholt Indeed!
19:36 jnthn (If you're curious, Evil Twin Imperial Biscotti Break)
19:37 FROGGS O.o
19:38 jnthn TimToady: In general, languages seem to divide into those that inline vs. reference based on kind of type (e.g. C#'s struct vs class package decls), and those that don't care about the kind of type but let you decide at the point of usage.
19:39 jnthn C and C++ being in the latter category
19:43 Woodi joined #moarvm
19:45 jnthn FROGGS: what did you want to ask about resume?
19:45 FROGGS jnthn: well, that was what I had yesterday https://gist.github.com/FR​OGGS/d006980f3c95b53364ca
19:46 FROGGS jnthn: I'm now at a point where it is in the handler, hits the resume
19:47 FROGGS so it should unwind to the frame of the exception, right after the die() for example, right?
19:47 jnthn aye
19:47 FROGGS how do I jump to after the die()?
19:47 jnthn And then set the pc to the instruction just after it
19:47 jnthn ou just set the pc, which hangs off tc->
19:48 jnthn But we may not be saving that address yet
19:48 FROGGS yeah, I was guessing that
19:48 jnthn I forget what origin is, whether it's the frame of addr
19:48 jnthn lemme look
19:48 jnthn ah, just the frame
19:49 FROGGS the frame, yeah
19:49 jnthn So yeah, we aren't saving quite enough in the exception yet
19:49 FROGGS okay, so I need to save the tc->interp_cur_op when throwing?
19:49 jnthn Right, we need that and the pc of the next instruction too
19:49 FROGGS pc?
19:49 jnthn program counter
19:49 jnthn Sorry, CPU term :)
19:49 FROGGS ahh
19:50 jnthn As in, the bytecode address
19:50 jnthn See how the return ops work, for example.
19:50 FROGGS k
19:50 jnthn Basically you re-arrange the op so that it does its incrementing (cur_op += ...) and *then* makes the call to throw the exception.
19:50 jnthn So that the PC is already correct and you just save it.
19:51 jnthn It really should be nothing more than an assignment in each direction :)
19:51 FROGGS okay
19:53 jnthn (like, assign current pc into a slot you add to MVMException, then assign it back after unwinding)
19:56 FROGGS why don't we have cur_op += X in interp. anymore?
19:56 FROGGS interp.c
19:56 jnthn um...we don't?
19:56 diakopter *giggle*
19:56 FROGGS only in a few places
19:56 FROGGS diakopter: please tell :o)
19:56 jnthn I see it
19:57 diakopter not_gerd++ made it depend on magic pixie dust
19:57 FROGGS I see it for newlexotic but not for die
19:57 diakopter to know where to branch
19:57 diakopter well die is non-local
19:57 jnthn grr, I hate magic pixie dust
19:57 jnthn It must be recent, my local clone doesn't even have it.
19:58 FROGGS diakopter: I guess there is a list of the offsets somewhere?
19:58 jnthn um, I still see it in latest too?
19:58 diakopter FROGGS: what revision/branch are you at
19:58 diakopter (I don't see that)
19:58 * jnthn is in master
19:59 * diakopter is.. oh
19:59 jnthn And just pulled
19:59 FROGGS master/HEAD
19:59 jnthn And see the cur_op += ...
19:59 diakopter FROGGS: yeah I think your editor is hiding those lines or something
20:00 FROGGS O.o
20:00 FROGGS my editor hides lines?
20:00 jnthn FROGGS: You don't see like:
20:00 jnthn OP(add_i):
20:00 jnthn GET_REG(cur_op, 0).i64 = GET_REG(cur_op, 2).i64 + GET_REG(cur_op, 4).i64;
20:00 jnthn cur_op += 6;
20:01 jnthn goto NEXT;
20:01 jnthn ?
20:01 FROGGS jnthn: I see that
20:01 FROGGS https://github.com/MoarVM/MoarVM/b​lob/master/src/core/interp.c#L968
20:01 jnthn Ok, so it's doign the cur_op +=... what are you missing?
20:02 jnthn Ohh!
20:02 jnthn You were talking specifically about the die op.
20:02 FROGGS yeah
20:02 jnthn sorry, I misunderstood and thought you meant in general...
20:02 FROGGS not about "die Op", which would be germish anyway :P
20:02 diakopter well, if you want die to be resumable..
20:03 jnthn Yeah, so you need to move the &GET_REG(...) use in MVM_exception_throwobj call to store that MVMRegister * in a variable.
20:04 jnthn And then cur_op += ...,  and then do the throwobj call.
20:04 jnthn So that whereever origin is set will also be able to set the PC.
20:04 diakopter jnthn: I can't wait to implement an interpreter on top of moarvm
20:05 diakopter *giggle*
20:06 FROGGS jnthn: isnt the &GET_REG(cur_op, 0) at line 973 a noop?
20:07 diakopter well, it does the cast for you
20:07 diakopter (so it's the standard way to do that)
20:08 FROGGS and passes it to MVM_exception_throwobj that doesn't use it
20:08 diakopter jnthn was saying to make it use it
20:09 diakopter are *all* dies resumable in p6?
20:09 * diakopter will cry if so
20:09 diakopter I'll just have to append a while(1) to the end of every die
20:10 benabik Heh.  I remember when people made that discovery in Parrot.
20:10 jnthn FROGGS: Yes, for now, but on resume we should probably but somehting in there...
20:10 jnthn diakopter: Only those that are made in the runloop, I think.
20:10 diakopter p6 die is higher level?
20:10 benabik diakopter: Wouldn't just exit(1) be better?
20:11 jnthn diakopter: In MoarVM the cost of that is really low, though.
20:11 benabik Or maybe reallydie("don't resume that")
20:11 jnthn diakopter: I mean, we already gotta keep track of the throwing frame for the sake of backtraces.
20:11 diakopter diediedie("stay dead")
20:11 jnthn well, it's not normally die exceptions that get resumed.
20:11 jnthn It's warn control exceptions and the lime.
20:11 jnthn *like
20:12 benabik die("message"); die("double tap")
20:12 diakopter die('yeah') or exit('showed you')
20:12 jnthn :D
20:37 FROGGS ok 8 - resuming from resumable exceptions works \o/
20:37 FROGGS can't believe it
20:37 jnthn \o/
20:38 FROGGS and fwiw, it helps to copy all needed data when copying exception objects
20:38 jnthn ;)
20:38 jnthn Does that mean we pass all the 44-try-catch.t? :)
20:39 FROGGS not ok 4 - statement prefix form of try work
20:39 jnthn ah
20:39 FROGGS this is the last one
20:39 jnthn ok :)
20:39 jnthn I really am too tired to look :(
20:39 jnthn But, great progress! :)
20:40 dalek MoarVM/nativecall2: 5a8fd9c | (Gerhard R)++ | / (9 files):
20:40 dalek MoarVM/nativecall2: Start on nativecall re-implementation
20:40 dalek MoarVM/nativecall2: review: https://github.com/MoarVM/MoarVM/commit/5a8fd9cd62
20:41 not_gerd joined #moarvm
20:41 not_gerd o/
20:41 FROGGS it is exceptionally fun when it works :o)
20:41 FROGGS (even when it takes days)
20:44 jnthn ;)
20:44 jnthn gonna attempt some sleep..though if it's epic fail I may be back...
20:44 jnthn &
20:45 * not_gerd is going to add pointer arithmetics to MoarVM
20:45 FROGGS gnight jnthn :o)
20:45 not_gerd I think I arrived at a factoring that's not too 'out there'
20:45 not_gerd good night
20:53 diakopter not_gerd: heh, cool; can't wait to see it :)
20:55 FROGGS for what do we need that ooc?
21:02 FROGGS ohh, `try nqp::die("...")`is a BOOTCode
21:03 FROGGS or, hmmm, maybe not
21:04 not_gerd FROGGS: run-time C interop without having to register types
21:16 * [Coke] likes https://identicons.github.com/dfc​78a3215db5068bad1ec3f9b80c3d9.png
21:16 [Coke] (moarvm's github icon)
21:36 foo_bar_baz joined #moarvm
21:41 flussence .oO( we could have a »m̈«, like the one in #perl6 )
21:41 FROGGS +1
21:42 flussence I'm not sure how well most people's clients will play with a Serious Unicode thing like that, but it's a good testcase :)
21:43 flussence (looks fine on irssi+tmux+urxvt, fwiw)
21:43 FROGGS and on xhat :o)
21:43 FROGGS xchat
21:44 dalek MoarVM: 9de0ad5 | (Tobias Leich)++ | / (10 files):
21:44 dalek MoarVM: added nqp::resume, review needed
21:44 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9de0ad5877
21:53 FROGGS ../moarvm nqp.moarvm -e 'my $x := (try nqp::die("oops")); say($x.HOW.name($x));' # is BOOTCode, should be NQPMu
21:53 FROGGS dunno how to fix that atm
21:53 diakopter FROGGS: resume shouldn't end with a goto; it's non-returning, like die
21:54 diakopter well..
21:54 diakopter I mean
21:54 diakopter hang on
21:55 diakopter *tc->interp_cur_op is just cur_op
21:56 diakopter .... it needs lotsa work
21:56 diakopter but I'm not exactly sure which things to do
21:56 diakopter gtg
21:56 diakopter meeting
22:06 dalek MoarVM/nativecall2: cbc9666 | (Gerhard R)++ | / (10 files):
22:06 dalek MoarVM/nativecall2: Reorganize native stuff and add CFlexibleStruct
22:06 dalek MoarVM/nativecall2: review: https://github.com/MoarVM/MoarVM/commit/cbc966606e
22:06 not_gerd good night
22:06 not_gerd left #moarvm
22:16 benabik joined #moarvm

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary