Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-07-01

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

All times shown according to UTC.

Time Nick Message
00:33 jnap joined #moarvm
00:57 vendethiel joined #moarvm
01:48 colomon joined #moarvm
01:59 camelia joined #moarvm
02:01 xiaomiao joined #moarvm
02:08 xiaomiao joined #moarvm
02:20 vendethiel-- joined #moarvm
04:22 cognominal joined #moarvm
04:22 japhb_ joined #moarvm
04:22 TimToady joined #moarvm
04:22 ggoebel111116 joined #moarvm
06:14 lizmat joined #moarvm
07:01 ingy joined #moarvm
07:03 FROGGS joined #moarvm
07:06 FROGGS o/
07:07 tadzik o/
07:11 zakharyas joined #moarvm
07:15 sergot o/
08:08 timotimo ohai
08:21 brrt joined #moarvm
08:21 brrt \o
08:22 donaldh joined #moarvm
08:31 jnthn o/
08:32 nwc10 \o
08:33 timotimo o
08:33 nwc10 jnthn:  t/spec/S32-list/roll.t is still pavement pizza
08:34 jnthn nwc10: Was that the one with the spesh_slots failure?
08:34 nwc10 I think so
08:34 nwc10 http://paste.scsys.co.uk/404629
08:34 nwc10 offhand can't remember if that's a different backtrace
08:35 nwc10 t/spec/S32-list/pick.rakudo.moar now passes
08:35 jnthn Nope, same one.
08:35 nwc10 I thought that those two had been failing in the same way
08:35 jnthn Darn. That means my attempted fix for it dodn't work.
08:35 nwc10 I can't promise you that I'm awake
08:35 jnthn *didn't
08:40 dalek joined #moarvm
09:33 dalek MoarVM/moar-jit: 4ca7c7c | (Bart Wiegmans)++ | / (13 files):
09:33 dalek MoarVM/moar-jit: Split the C parts of the JIT
09:33 dalek MoarVM/moar-jit:
09:33 dalek MoarVM/moar-jit: This gives us three 'parts': graph construction,
09:33 dalek MoarVM/moar-jit: graph compilation, and logging / bytecode dumps.
09:33 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/4ca7c7cf0e
09:33 brrt dalek works again
09:33 jnthn zo/
09:33 jnthn uh, \o/
09:34 brrt i'm wondering if splitting the 'emit' parts into architecture-specific directories is worth the trouble
09:35 jnthn Not until we have more than one arch, I guess ;)
09:36 brrt no, but i mean, split the 'emit' part into stuff like arithmetic, entry / exit, branches, comparison, etc
09:38 brrt which would necessarily be in a directory rather than in files because each architecture would have different ones
09:38 jnthn oh
09:39 jnthn But that causes build pain, I thought, as they need to be one .dasc file?
09:40 brrt build pain is my tradeoff too
09:40 jnthn interp.c works out as a big file, mostly 'cus you can search quite easily for op names in it.
09:40 jnthn I suspect one big file here will also have that property..
09:40 brrt fair enough
09:41 brrt hmm.. you're right, you can't link dasc files
09:41 brrt they construct different 'action lists'
09:43 brrt you may be able to .include them, but i wonder if it's worth the trouble
09:45 jnthn Probably not
09:48 brrt that settles that, then :-)
09:57 brrt bbal
09:57 brrt left #moarvm
10:03 tadzik joined #moarvm
10:24 nwc10 jnthn: if I disable the fixed size allocator,  t/spec/integration/advent2010-day11.t also fails: http://paste.scsys.co.uk/404678
11:10 sergot I have a question, how can I obtain the memory address that is stored inside the MVMObject(OpaquePointer in this case)?
11:10 sergot like here: MoarVM/src/6model/reprs/CPointer.c:28:    dest_body->ptr = src_body->ptr;
11:14 jnthn Don't think we expose that at all so far.
11:14 jnthn Well, and you have to know it's a CPointer REPR to do it.
11:15 jnthn Wait, do you mean at a C level?
11:15 jnthn 'cus I meant we don't have an nqp::nativewhere op...
11:17 FROGGS in C
11:17 jnthn Oh, then you just check REPR(obj)->ID is the right thing, and then cast :)
11:20 FROGGS not like this?
11:20 FROGGS body = (MVMCPointerBody *)REPR(obj)->box_funcs.get_boxed_ref(tc, STABLE(obj), obj, OBJECT_BODY(obj), MVM_REPR_ID_MVMCPointer)
11:20 FROGGS oh, perhaps not
11:20 FROGGS it has no box_funcs
11:21 FROGGS so it really is just a cast, when the ->ID fits... nice!
11:22 FROGGS sergot: so I think: if (REPR(obj)->ID == MVM_REPR_ID_MVMCPointer) cpointer_body = (MVMCPointerBody *)OBJECT_BODY(obj)
11:22 FROGGS and then you can use cpointer_body->ptr
11:23 sergot FROGGS++ jnthn++ thanks, I'll give it a try
11:27 vendethiel joined #moarvm
11:30 brrt joined #moarvm
11:30 brrt \o #moarvm
11:30 brrt wingolog pointed me to: http://www.cs.umb.edu/~offner/files/flow_graph.pdf
11:30 brrt may be fun for us
11:30 FROGGS hi brrt
11:30 brrt hi froggs :-)
11:31 FROGGS I think I fell in love with the native call implementation in moar btw :o)
11:31 FROGGS arnsholt++
11:32 brrt what is it that makes you like it so much? :-)
11:32 FROGGS it is very readable, and I think it makes it easy to extend way more than I though would be possible
11:33 * brrt has to check it out, then
11:33 FROGGS like compared to what you can do by hand in P5's XS
11:34 FROGGS brrt: the memory-to-P6-class unpacking caught my eye for example
11:36 jnthn Curiously, the moar nativecall code was a fairly direct port of the Parrot code, with a ton of cleanups made possible 'cus Moar actually knows 6model natively.
11:36 jnthn Well, "Parrot code" as in "code in the NQP repo largely built by arnsholt" :)
11:39 FROGGS I guess everything looks better when you got rid of Parrot's 'ops' language
11:40 jnthn PIR? :)
11:41 brrt winxed was doable.....
11:41 FROGGS jnthn: no, like in nqp_bigint.ops
11:41 jnthn In Moar I found a neat way to sidestep the issue: don't have an assembly language :)
11:41 FROGGS the C like stuff
11:41 jnthn FROGGS: oh, right :)
11:41 FROGGS which will the be translated to C
11:41 jnthn Yeah, we code-gen fairly little in Moar too
11:42 FROGGS I like PIR though :o)
11:42 jnthn src/core/oplist generating op meta-data being the obvious example.
11:44 brrt ot: 'the ict team manages nearly 500 workstations and 120 (virtual) servers'
11:44 brrt 120 servers for 500 people!
11:45 FROGGS brrt: we have almost as many here for 500ppl
11:45 jnthn Well, or they could be providing services to the outside world too? :)
11:47 brrt unlikely, this is about a corporate it team :-)
11:47 brrt how do you manage so many servers then, how do you get to that?
11:49 jnthn "Virtual" is probably the key
11:49 brrt i suppose they do a server-per-application type of setup
11:49 jnthn And lots of automation.
11:51 FROGGS it is often server-per-application, but also a few servers are needed per office
11:51 FROGGS and when you have like >10 offices...
11:51 FROGGS then you already have >30 servers
11:51 brrt hmm, i suppose so
11:51 brrt why servers per office?
11:51 * brrt sometimes feels he doesn't understand IT at all
11:52 FROGGS 1x active directory (slave), 1x file and printing, 1x software package distribution
11:52 brrt jnthn: what are your thoughts on using size_t?
11:52 brrt hmmm
11:53 jnthn brrt: No objections to it
11:53 brrt ok, great :-)
11:53 brrt i like using it because it is always correct for sizes
11:53 jnthn Well, presuming you're using it as sizes of stuff you pass to malloc, realloc, calloc, etc.
11:53 brrt mmap, in this case :-)
11:54 LLamaRider joined #moarvm
11:55 jnthn or that :)
11:58 FROGGS jnthn: ops shall be added before sp_*, right? what about osrpoint?
11:59 jnthn osrpoint is a normal op
11:59 jnthn So add after that
11:59 jnthn But before sp_
11:59 FROGGS thanks :o)
12:19 jnap joined #moarvm
12:37 timotimo osrpoint ops are thrown out by the specializer when they would be relevant to jit etc, right?
12:37 jnthn ?
12:37 jnthn They're always removed from specialized code
12:38 jnthn By the time we get to JITting, their role is done
12:41 timotimo right
12:41 vendethiel joined #moarvm
13:04 brrt joined #moarvm
13:21 brrt hmm, new commits trigger bugs
13:22 brrt oh, wait
13:22 brrt i know what is wrong
13:27 jnthn Insufficient cowbell?
13:28 brrt cowbell? :-)
13:28 brrt no, i changed passing the current frame to passing the cu because it's more useful
13:29 jnthn http://knowyourmeme.com/memes/needs-more-cowbell
13:33 brrt :-)
13:47 btyler joined #moarvm
13:51 woolfy joined #moarvm
14:06 vendethiel joined #moarvm
14:06 sergot How can I get the value of a MVMObject (which is int32 in p6)?
14:08 sergot or just the value, Str, Rat, whatever
14:09 sergot In C :)
14:09 FROGGS you can ask for its storage spec, this tells you what it can store
14:10 FROGGS and how many bits it can store for sized ints
14:10 FROGGS look at MoarVM/src/core/coerce.c:274
14:11 sergot FROGGS++ thanks
14:12 FROGGS ss.bits will tell you the bits, when you know it is an integer or numeric thingy
14:17 carlin joined #moarvm
14:23 FROGGS sergot: also, spec.is_unsigned is interesting for your
14:23 FROGGS you*
14:28 sergot ok, thanks FROGGS++
14:38 dalek MoarVM/moar-jit: ad5044c | (Bart Wiegmans)++ | src/ (13 files):
14:38 dalek MoarVM/moar-jit: Create MVMJitCode structure
14:38 dalek MoarVM/moar-jit:
14:38 dalek MoarVM/moar-jit: This is a single structure that contains the function pointer
14:38 dalek MoarVM/moar-jit: as well as the size of the fragment, the number of locals, and
14:38 dalek MoarVM/moar-jit: the 'magic bytecode' which is now constant.
14:38 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/ad5044c553
14:38 dalek MoarVM/moar-jit: 420671c | (Bart Wiegmans)++ | src/jit/emit_ (3 files):
14:38 dalek MoarVM/moar-jit: Use special register for CU
14:38 dalek MoarVM/moar-jit:
14:38 dalek MoarVM/moar-jit: CU is actually used more often than the frame pointer
14:38 dalek MoarVM/moar-jit: or the envionment (because the latter is often a lookup
14:38 dalek MoarVM/moar-jit: 'higher up' in the frame hierarchy). So it makes more
14:38 dalek MoarVM/moar-jit: sense to store it directly rather than look it up through
14:38 brrt dalek didn't die, did it?
14:40 nwc10 not this time
14:41 brrt :-)
14:58 * brrt thinks its becoming time for dinner
15:02 jnthn Will it be sugary? :P
15:03 brrt hmmm... macaroni, salami, cheese, tomatoes
15:03 brrt so starchy, not so much sugay
15:03 brrt oh wait
15:03 brrt melon after
15:04 brrt hey, can i ask for a bit of advice, unrelated to actual programming?
15:06 jnthn Sure
15:06 jnthn .oO( hope it's not a cooking question :) )
15:07 jnthn .oO( "yes, deep-frying the melon sounds great!" )
15:07 brrt lol
15:07 brrt are you scottish?
15:07 jnthn No
15:07 brrt i'm pondering whether i should continue for my masters degree, or not
15:07 * moritz has studied 9 months in Scotland
15:07 jnthn Born near to Birmingham, to English parents. Grew up in Yorkshire. :)
15:08 brrt full blooded english then :-)
15:08 moritz did you mean "full bloody english?" :-)
15:09 jnthn moritz: That's what we call breakfast :P
15:09 brrt lol
15:09 moritz brrt: I'm sure nobody can give you advise on that without much more context
15:10 moritz (but I'm afk soon anyway; will backlog)
15:10 jnthn brrt: What are your motivators for continuing, and what are the reasons not to?
15:12 * jnthn vaguely knows this sort of pondering, since he was encouraged a decent bit by his uni to stay on for a PhD program :)
15:14 brrt good question :-)
15:14 brrt ehm.....
15:14 brrt i'm not sure yet myself :-$
15:14 brrt i think... the most obvious demotivating factor is that i'm afraid i won't do anything with it
15:15 brrt moritz - many people give advice with quite a bit less context :-)
15:15 brrt i.e. with my studying
15:15 brrt i mean here i am, having fun hacking on a jit compiler
15:16 brrt it's kind of likely that after getting a masters degree in biology my best bet at employment will still be IT
15:17 brrt the most important motivating factor is that i'd like to do work that has some net positive impact, and i suspect that will be easier / more doable with a longer education
15:17 brrt (another demotivating factor is that i frankly have no more money left, but in the netherlands, such things can often be arranged)
15:20 jnthn Personally, I'd not dwell hugely on the "not do anything with it" thing. So far as finding work goes, a degree vs a masters degree probably won't make a huge difference (having a degree vs not having one at all does, but beyond there it's often not a huge factor).
15:21 jnthn Unless the goal is within research/academia, of course.
15:22 jnthn But if that was a clear goal then I suspect you'd not be asking whether you'd do anything with it, since it's probably critical path if staying in the academic world for the long haul is a goal :)
15:23 jnthn I realized when I was pondering the PhD that career wise it wasn't going to matter hugely for me. So the question was more about whether I wanted to spend 3-4 years of my life on that journey.
15:24 jnthn Which I guess is how I see these things: getting a first degree is fairly critical-path career wise since it's used as a filter for various interesting jobs. Beyond there, it's probably more about the journey than the qualification at the end of it all.
15:26 brrt hmm, i see
15:27 brrt i should note, though, that a bachelors' degree at university level is - somewhat justifiably - not seen as 'academic' or sufficient in the netherlands
15:27 brrt but, i'll be making dinner now for real ;-)
15:27 jnthn Hmm, OK :)
15:27 brrt thanks
15:27 brrt left #moarvm
16:01 FROGGS joined #moarvm
16:40 brrt joined #moarvm
17:00 brrt left #moarvm
17:20 vendethiel joined #moarvm
17:21 jnap left #moarvm
17:28 jnap joined #moarvm
18:05 brrt joined #moarvm
18:13 * brrt thinks that the amd x64 documentation is really better than the intel documentation
18:15 rurban yes
18:15 lizmat joined #moarvm
18:49 brrt one time in the future, i want to implement linking for moarvm jit
18:49 brrt i.e., serialize the blob, and during deserialization, lookup all the stuff we are calling
18:56 dalek MoarVM/moar-jit: 2834d7c | (Bart Wiegmans)++ | src/jit/log.c:
18:56 dalek MoarVM/moar-jit: Dump JIT code in separate files
18:56 dalek MoarVM/moar-jit:
18:56 dalek MoarVM/moar-jit: We use the CUID as well as the name of the static frame
18:56 dalek MoarVM/moar-jit: to determine the name of the file.
18:56 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/2834d7c75f
19:12 FROGGS jnthn: how is your mood today?
19:12 FROGGS do mind more grey hair? /o\
19:12 FROGGS I'd like to apply this: https://gist.github.com/FROGGS/a027fecd527c2871b2b6
19:13 FROGGS which would make an OpaquePointer gistify to this:
19:13 FROGGS OpaquePointer<0x7f9e8db8fda0>
19:13 FROGGS OpaquePointer<NULL>
19:13 FROGGS and it would let you create a new one like OpaquePointer.new( $old-pointer + 4 )
19:14 FROGGS and then could have your .cast-to method there, or perhaps we could call it .coerce
19:14 FROGGS this would be a powerful setup me thinks
19:15 jnthn lemme look (between stirring my curry :))
19:15 FROGGS hehe, yeah
19:16 FROGGS man, sometimes I wish I could just walk by and taste your curry :o)
19:19 brrt nqp-m: sub cur(str $a) { sub ry(str $b) { nqp::say($a ~ $b); }; }; cur("foo")("bar");
19:19 camelia nqp-moarvm: OUTPUT«foobar␤»
19:19 brrt curry :-)
19:19 FROGGS more awesome would be OpaquePointer<0x7f9e8db8fda0>(reachable) and OpaquePointer<0x7f9e8db8fda0>(out out bounds), but that's up to a distant future :o)
19:19 FROGGS yeah, I wanna have that now too :/
19:20 brrt hmm....
19:20 FROGGS stupid germans do not have curry usually
19:20 brrt really?
19:20 brrt germans do have curry ketchup :-)
19:20 FROGGS well, not that often compared to guys from the island at least
19:20 FROGGS eeks
19:20 FROGGS sort of
19:21 brrt sauerkraut with a sausage on a bun with curry ketchup is a recognized dish in some parts of the netherlands :-)
19:22 brrt what would you mean with 'reachable'? does-not-throw-a-segfault?
19:23 * brrt wonders if he can find - on x64 - how to determine if something is accessible
19:24 FROGGS yes, that it is 'ours'
19:25 brrt nobody in stackoverflow land seems to know how
19:25 brrt but there /must/ be some kind of interrupt , and we ought to be able to catch it
19:26 FROGGS yeah, I thought it might be hard to get that information
19:26 brrt signal catching is what people usually do
19:27 brrt but - iirc - that has thread problems
19:29 FROGGS yeah, all ppl say it is impossible... okay, idea scratched :o)
19:30 brrt all ppl don't typically have a dynamic assembler in their toolkit
19:30 brrt :-)
19:32 brrt what was i doing?
19:32 brrt oh yes, return value handling
19:35 FROGGS hehe
19:35 FROGGS sorry for the distraction :P
19:38 jnthn FROGGS: curry is ready... \o/ will review after I nom :)
19:38 FROGGS happy nomming :o)
19:48 * brrt has much need for a 'nqp-m-debug' type of script
19:48 brrt :-)
20:00 brrt .... pointers aren't typically returned in floating point registers, are they?
20:01 FROGGS that's not what I would expect at least
20:02 brrt well, they aren't :-)
20:02 brrt i should've added a smiley
20:04 jnthn mmm...that's the nicest thing I've cooked in a while :)
20:07 jnthn FROGGS: I'm a tiny bit uneasy about treating a pointer as just a kind of boxed integer... :)
20:07 FROGGS good, that will make your mind open for new things :P
20:07 jnthn But I guess that's kinda what it is :)
20:07 FROGGS we do that kind of cast in many places
20:08 FROGGS nqp::where for example
20:08 dalek MoarVM/moar-jit: 366e0f8 | (Bart Wiegmans)++ | src/jit/ (7 files):
20:08 dalek MoarVM/moar-jit: Merge return-value handling into c-call
20:08 dalek MoarVM/moar-jit: review: https://github.com/MoarVM/MoarVM/commit/366e0f855f
20:08 FROGGS sad that our nativecast does not handle Str yet, otherwise I would substr(1,...) by moving the pointer
20:09 * brrt shares the uneasiness, but mostly because of sign-and-conversion errors
20:09 brrt i.e. pointers tend to be handled much more rigidly than integers in c
20:09 FROGGS jnthn: do you have suggestions about how to make nativecast available once it is done? should it be a method on OpaquePointer?
20:10 brrt i'm off to watch belgium-usa
20:10 brrt :-) see you tomorrow!
20:10 jnthn brrt: ooh, who are you rooting for? :)
20:10 brrt belgium :-)
20:10 jnthn :)
20:11 jnthn Go Europeans :)
20:11 brrt not the underdog here, i think
20:11 brrt but still
20:11 brrt good night :-)
20:11 jnthn Hope it's better than the Switzerland - Argentina game :)
20:11 FROGGS brrt: see you!
20:11 jnthn o/
20:11 brrt left #moarvm
20:12 jnthn FROGGS: No, I think it's gonna have to be a sub
20:12 FROGGS okay
20:12 jnthn FROGGS: 'cus you want to be able to do it to your own pointer types too
20:12 FROGGS yeah, probably
20:13 FROGGS I mean, it could be both to provide some sugary way of casting that pointer...
20:13 FROGGS btw, that pointer fiddling and manual casting would help with the problems [Sno] pointed at a while back
20:14 FROGGS that one lib returned a list of structures, so we could walk that list now
20:14 FROGGS (it returned the pointer to the first)
20:14 jnthn ah, true
20:15 FROGGS but... we'd perhaps need a way to query the sizeof a Perl 6 class as it looks like in C land to do that perhaps
20:16 FROGGS okay, I'll prepare the commit in a bit and also the NativeCall PR
20:16 FROGGS dinner first though
20:43 dalek MoarVM: 6b458f7 | (Tobias Leich)++ | src/6model/reprs/CPointer.c:
20:43 dalek MoarVM: allow pointer math using CPointer repr
20:43 dalek MoarVM:
20:43 dalek MoarVM: This means that NativeCall's OpaquePointer type can be gistified as
20:43 dalek MoarVM: OpaquePointer<0x7f9e8db8fda0>, which will be helpful for debugging
20:43 dalek MoarVM: when making bindings to C libraries. This also allows us to do basic
20:43 dalek MoarVM: pointer arithmethic so that we can iterate over the bytes of a CStr
20:43 dalek MoarVM: by incrementing the memory address.
20:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6b458f7e55
21:23 timotimo yay for pointer arithmetic ...
21:31 FROGGS yes, that's pretty awesome in a way...
21:31 FROGGS timotimo: wait for nativecast
21:31 FROGGS it is worth mentioning next monday
21:32 timotimo that'll be nice to have indeed
21:32 FROGGS only sized ints/nums are missing AFAIK
21:33 FROGGS and after that we will probably try to make function pointers work
21:33 FROGGS we'll see if we really need them for openssl
21:37 timotimo ah, we're doing this for sergots gsoc among other things?
21:37 FROGGS yes, that's the main motivation
22:20 donaldh joined #moarvm
22:46 lizmat joined #moarvm
22:46 jnthn sleep &
22:48 FROGGS sleep well
22:50 * lizmat is home and goes to bed as well
22:50 FROGGS gnight lizmat
23:10 jnap1 joined #moarvm

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