00:09 jnap joined 01:10 FROGGS__ joined 01:55 btyler joined 04:11 dalek joined 06:50 FROGGS__ joined 07:16 zakharyas joined 08:20 odc joined, woolfy joined, camelia joined, hoelzro joined, retupmoca joined, TimToady joined 08:21 japhb_ joined, ashleydev joined, harrow joined, rurban_ joined, timotimo joined, flussence joined, tokuhirom joined 08:44 odc joined, woolfy joined, hoelzro joined, retupmoca joined, TimToady joined, camelia joined 08:49 brrt joined
brrt \o #moarvm 08:49
jnthn o/ brrrt 08:58
oops, over-r
brrt :-) 09:02
brrt figured out that... phi nodes are just skipped during codegen?
jnthn Sure
They don't mean anything.
They represent join points in the SSA graph 09:03
brrt i had thought they'd be needed to re-assign local registers
jnthn But SSA numbers things reg[i]
brrt or some such
but that's not necessary at all :-)
jnthn No, a PHI always looks like r[o] = PHI(r[1], ..., r[n]), where r is the same register :) 09:04
brrt hmm.. i guess they represent an 'end point' of some algorithms, i.e. you can't analyze the value of a register further than the phi node 09:05
interesting
jnthn Well, we dont' do it yet, but we can do fact merging at teh PHIs 09:06
That is, if we look at all the incoming things and they all agree on the known type, then we can propagate that known type to r[o]'s facts too
Whereas if they disagree then we can't 09:07
So they have a role in type info propagation.
brrt i understand
nice
but, for codegen, they can be ignored
(for now) 09:08
jnthn riht
*right, even
brrt how long is this summer again?
too short i think
jnthn oh, a few years, I think :P
brrt :-D
brrt is reminded of the steve yegge post that said that building a compiler was a 'lifetime of work'
and mine/ours isn't even finished yet 09:09
jnthn No, my lifetime seems to be continuing...
brrt :o)
jnthn Anyway, we need to tend to mid-term evils between 23rd and 27th 09:19
brrt thats ages 09:21
jnthn Of June :)
brrt that is ages from now, is what i mean :-)
:-)
jnthn It's...10 days away for the deadline for those :)
Then 18th Aug is when summer ends :)
brrt by then we'll have conditionals i should think and hopefully loops?
jnthn I hope so :) 09:22
nwc10 "Hello To Our Friends And Fans In Domestic Surveillance"
jnthn Your next task is labels and gotos/branches, I guess?
brrt yes, i'm actually working on that now
i had ints for labels, if you can recall? 09:23
jnthn \o/
nwc10 It's far more important to actually complete the mid term eval by the deadline than what the detail is
brrt thats not good enough, it seems
jnthn ah
brrt you mean, fill in a form? :-p 09:24
nwc10 - its funny how google lost nearly all of the good nerd vibe they had going with the NSA business
nwc10 don't worry about not having X to show for the mid term eval - I don't think that anyone is going to read the actual detail. As long as it says "student is doing work and is not just scamming us for the money" it's useful
brrt i'm worried about progress nevertheless :-)
nwc10 yes, OK, to be fair, the mentors are going to read the detail, but it won't be news to them. 09:25
timotimo i wonder if anyone really thinks it's a good idea to try to scam *google* :P
nwc10 you're not going to be kicked off the programme for submitting a report with insufficient progress
brrt lots of people think so timotimo :-)
nwc10 you *would* be kicked off for not submitting the report
(as I understand it)
jnthn aye
brrt fair point :-) 09:26
jnthn I think it'd be nice if by midterm sub foo() { my int $i := 0; while $i < 1000000 { $i++ }; say($i) } can be jat.
brrt my guess is that if i'd fill in a report and never let anybody hear anything of me that would be noticed too, right?
jnthn uh, jitted :)
brrt that... should be doable, yes
nwc10 yes, that would be noticed. Probably fairly quickly :-) 09:27
brrt say($i) is cource_is or something?
nwc10 this isn't a course or exam that you can fail by not making the pass mark
jnthn brrt: Yeah.
nwc10 as best I can tell, from the admin side it's all about effort, and not about acchievement. Did the student actually try? 09:28
jnthn Indeed.
nwc10 at least for getting payment
for Google's (later) recruiting purposes, acchievement will also matter
jnthn Given we actually have something very simple being JITted already, I think it's quite clear the student is trying :)
brrt++
nwc10 but again, that's not absolute. That's "from starting point, how much changed" 09:29
jnthn ok, taking studnets to lunch &
timotimo stud .. net? :)
brrt see you
nwc10 yes, thanks for simplifying my point. You have something JITted. That's evidence
brrt used to work for studenten.net
also lunch & :-) 09:31
FROGGS__ uhh 09:38
==> Testing HTTP::Message
t/01-basic.t .. ===SORRY!===
No STable at index 8
Ć³.Ć²
ohh, hmmm, it works when I install it via panda, rather then rebootstrapping panda 09:39
ohh no, now this:
==> Testing HTTP::Message
t/01-basic.t .. ===SORRY!===
No STable at index 8
tadzik that's the same
except this time it didn't print "Ć³.Ć²"
:> 09:40
timotimo %)
FROGGS__ *g*
but it really should print that when being so sorry
when were you the last time so sorry that your shouted it? 09:41
tadzik :D
FROGGS__ you*
tadzik OKAY FINE I'M SORRY ARGLEBARGLE
timotimo tadzik: when i'm at the point where GTK::Simple will let you start animations that get rendered with cairo from a callback with a correct frame timer, will you try to build something game-like? :3
tadzik timotimo: hm, I don't see why not :) 09:42
but: what advantage will that give me over Steroids, other than having Gtk available?
or I may just put Steroids on top of Cairo/Gtk
timotimo with steroids you can't do any vector graphics 09:43
not yet anyway
tadzik troo
timotimo though it wouldn't be hard to put cairo directly on top of sdl2
tadzik I need to catch up on Steroids, but I'm all deep in my bachelor's thingy
(and Civ5 recently)
timotimo aye, that's fine
the last time i thought i was close to the milestone of being able to put cairo drawing into a gtk callback, i stumbled upon about 200 methods and objects i should bind in order to get there ... 09:44
10:08 brrt joined 10:27 brrt left 11:46 FROGGS joined 12:15 jnap joined 12:59 brrt joined 13:59 btyler joined 14:00 brrt joined
brrt had never considered you could just pass a va_list to another function 14:49
nwc10 see also va_copy and va_end
for proper portability. 14:50
brrt will check those out
14:56 woolfy joined
brrt wonders if msvc has va_copy since it is defined in C99 15:00
15:01 donaldh_ joined
nwc10 if it isn't defined, it probably isn't needed for that platform. 15:11
but you may not need to copy the pesky little things
I think that it's because on some platforms it's malloc()d data, so if you don't va_end, you leak
and if you don't va_copy but you do va_end (twice) you double free. 15:12
brrt i see 15:15
15:20 donaldh_ joined 15:28 brrt left 15:30 brrt joined 15:34 brrt joined 15:35 brrt left
japhb A positive note for you guys -- as of my tests last night, nqp-moarvm/master was faster than perl5/v5.20.0 at rc-man-or-boy-test; perl5 was about 30% slower than nqp-m, as a matter of fact. :-) 15:42
btyler woah 15:44
japhb Sadly r-m is still about 6.1x slower than nqp-m on that test, but I'll take the nqp-m win over perl5 any day. :-)
15:44 jnap joined 16:18 FROGGS joined
timotimo that's nice to hear :) 16:24
rurban_ And moar is about 2x faster than parrot on the nqp tests 16:28
timotimo rurban_: you got a target to catch up to :) 16:30
FROGGS but a moving target :o)
it was easy to pass parrot when it was sleeping 16:31
rurban_ I don't think I can catch up. Let's see what the parrot jit will bring. But there's still the horrible PCC with ext_call and IMCC string encoding quirksand all the sprintf varargs mess to improve. 16:33
jnthn evening, #perl6 16:34
uh
#moarvm :)
Well, that summarizes how exhaust I am :P
timotimo o/
jnthn: so no OSR today? :P
jnthn :P 16:35
We're meant to be tidying up for release, not doing dangerous stuff :P
timotimo troo
17:08 lizmat joined 17:29 jnap joined
[Coke] moar is currently failing 3 spectests. 17:30
S02-types/deprecations.rakudo.moar 30 - deprecation $*OS
S02-types/deprecations.rakudo.moar 31 - deprecation $*OSVER
S32-io/IO-Socket-Async.t 4 - Echo server
lizmat S02 ones are mine 17:31
[Coke] lizmat++
timotimo the async socket server fails seem to be spurious 17:32
FROGGS jnthn: I have this in star for lwp-simple that might trigger the problem: 17:33
-Subproject commit 267ac05bbf2534005f95ab39a0d62ec71ccc014a
+Subproject commit d11d5a17f9588ccc535d010ef5f706baa6ed6135
though, it makes no sense from looking at that commit 17:34
[Coke] niecza is failing 1200 tests even. :| 17:35
ww.
18:05 btyler joined
rurban_ [Coke]: same for parrot. github.com/rurban/roast/commit/c0d...3104f03573 18:30
[Coke] rurban_: lizmat is fixing those. 18:31
rurban_ Yes, just saw.
[Coke] not going to bother fudging them. (Does explain why jvm isn't failing them, though)
rurban_ jvm is skipping them also 18:37
#?rakudo.jvm skip 'tracebacks in deprecations'
18:43 brrt joined
jnthn wtf, skellefteaa has no station, but my hotel is on stationsgatan... :P 19:14
uh, ww
moritz jnthn: station has been closed since the road has been named? :-) 19:17
jnthn I don't think the train ever went there :) 19:25
brrt wonders if google street view went there 19:33
and.. it did
jnthn Where hasn't it been... :) 19:39
japhb jnthn: That's classified. ;-) 19:44
brrt ugh, constant folding :-( 19:45
brrt wonders if simple argument passsing works yet 19:47
jnthn brrt: CF where?
brrt its not actually constant folding what i mean, buf if(1) { foo(); } else { bar(); } is compiled - by whom? - to { foo(); } 19:48
which i need it not to do :-)
jnthn haha 19:49
probably spesh :)
brrt we seem to have conditionals 19:51
of, and arguments, if they're known to be ints :o) 19:53
jnthn :) 19:54
dalek arVM/moar-jit: b0ed6c9 | (Bart Wiegmans)++ | src/jit/emit_ (3 files):
Very minor cleanup
19:58
arVM/moar-jit: 952e534 | (Bart Wiegmans)++ | / (7 files):
Branches (based on integers) now seem to work.

Loops should work too, but I haven't checked.
brrt is going to see if loops work now
any idea why $i++ needs hllboxtype? 20:05
jnthn Did you declare it my int $i 20:06
?
brrt yep, i did
its passed as an int, too, by spesh
jnthn Sure, well, that won't be changed by spesh... :) 20:07
Hmm
What code have you got?
Is the loop in void context?
brrt i'll post it in a bit 20:08
(wow, github recognises perl6, that is awesome) 20:10
jnthn :)
brrt gist.github.com/bdw/bcbe6e478413d9dfe96d nqp compiler adds hllboxtype_i 20:11
and - converts it to numeric, too 20:12
and back
so it seems.. loops work now? 20:13
20:13 cognominal joined
brrt is going to calculate fibonacci series in jitted code, just because he can 20:13
jnthn brrt: uh, wtf is doing on with that code-gen... 20:19
brrt i have /no/ idea
but somehow somebody seems to think we're dealing with objects, then we should deal with floats, then with integers again
where somebody == the compiler :-)
20:20 odc joined, camelia joined, TimToady joined, retupmoca joined, hoelzro joined
brrt maybe somewhere type tags are added wrongly? 20:20
dalek arVM/moar-jit: 2167243 | (Bart Wiegmans)++ | foo.nqp:
A version of fibonacci that is completely jitted :-D
jnthn brrt: Yeah, I can see what's going on. It's the postinc thingy which is optimizer-opaque, it seems 20:22
Also I see that the opt is missing a trick in some of the p6bench things too :) 20:23
brrt ok. i have no idea about the internals of nqp :-) 20:26
20:36 FROGGS joined 20:48 cognominal joined
dalek arVM/moar-jit: 4af25c4 | (Bart Wiegmans)++ | / (3 files):
Add MacOSX recognition to jit Configure.pl

  btyler++ for helping to find the right configuration
paramter. Also added some documentation to help people find the right options :-)
20:52
arVM: 674fe7c | jnthn++ | docs/ChangeLog:
Add 2014.06 ChangeLog entries.
20:53
timotimo ++ Specializer can optimize optimize named args 20:55
optimize optimize go!
brrt is very happy with the whole spesh thing 20:56
hoelzro go go gadget optimizer? 20:57
timotimo aye, it's cool stuff
20:57 lizmat joined
jnthn haha, thanks 20:57
brrt ok, hmm, i haven't thought on how to do next what i want to do next, next
i know what i want to do, though, want to know and help me out? 20:58
dalek arVM: f7532c8 | jnthn++ | docs/ChangeLog:
Fix fix a double word; timotimo++.
jnthn brrt: Did you, ooc, do any timing of it against the interpreted version? :)
brrt no, did not 20:59
i should
jnthn OK
And yes, let's talk about what you want to do next.
Actually would be good to plot a few days ahead.
timotimo brrt: did you try a measurement of jitted fib vs regular fib? :)
jnthn I'm about tomorrow, while teaching, and in the evening 21:00
brrt i know what i want to do :-), i want to somehow do something with return values
jnthn But will be about rather less on Thu (travel), Fri (DDDX conf), Sat (visiting UK friends), and Sun (travel)... 21:01
brrt problem is that sometimes i need to store them in a register, and sometimes i need to dereference and store, sometimes i need to store a value there
ok, i'll be busy too, i have hospital-styled appointments again :-)
(tomorrow, that is)
FROGGS time perl -E '`../foo.nqp` for 0.50' 21:03
real0m4.010s
same timings for with and without inline
but... it perhaps just measures startup time
jnthn What's in foo.nqp? 21:04
brrt: Hope hospital-styled appointments go fine.
brrt: Can you give some examples of the return value problem?
brrt gist.github.com/bdw/a519663b655ac0ae25ba
FROGGS 21:05
^
jnthn, i expect so (re: hospital) :-) just checks and stuff
ehm, yes, let me checkout master and point you at some lines
interp.c line 2221 (getlex_ni) 21:08
basically, that is
call a function
get a pointer
dereference pointer
copy pointer to register
eh, copy value to register
jnthn Copy deref...right.
brrt that isn't the tricky one, though 21:09
jnthn Isn't "dereference a pointer" a single instruction?
brrt yes
i don't have a way to represent 'dereference a pointer stored in a cpu register' yet 21:10
that would need special casing
thats possible (all is equally possible), but do i really want to add a big and perhaps complex 'do-stuff-with-return-value' node? 21:11
(i'm guessing the answer is yes, though :-))
jnthn How many different ways are there, really? 21:12
brrt i have no idea
on cpu level, not so much :-)
on moarvm level? well, at least three
i don't think it ever happens we copy a return value to a lexical (i hope) 21:13
so as long as all return values eventually read or store from work registers, the combinations seem manageable
jnthn No, we don't 21:14
Oh
Well, auto-viv of an object lexical may
timotimo since we already have inlining, we could get around return values a bunch of times in jitting :P
jnthn But you might just call a function to do that.
brrt to auto-vivify a lexical? yes, i guess we could do that, too
jnthn It's lazy allocation of scalars, really 21:15
Worth it from a perf perpsective
'cus $/, $!, and $_ are declared everywhere, but rarely used
brrt hmm 21:17
ok, beer napkin calculations 21:19
i have two address modes for destination operands - register and memory
i have 3 address modes for source operands, namely literal, register, memory 21:20
memory-memory is impossible
(we might as well assume that it is impossible for all systems)
(memory is always register + offset, by the way) 21:21
memory-64 bits literal is also impossible
that gives me? register-register, register-memory, register-literal, register-literal64, memory-register, memory-literal 21:23
memory-literal64 can be faked by two ops
memory-memory too
basically, as long as i can represent a node that says 'take this data and store it there' then i'm golden whatever the requirements of moarvm ops may be 21:24
i /want/ that 21:25
(the copy node idea, that is)
what do you think? i can reduce it to 6 options :-)
jnthn Do we get good code from the 6 options?
brrt hmmm
i'm not sure how to answer that 21:26
jnthn (memory-literal64 being faked by 2 ops wsa the one that sounded odd to me)
brrt we get ... reasonable code, as the little benchmark above showed
i.e. a 2x speedup, and thats pretty nice imho
you have to emit a special opcode to load 64 bit literals from the bytecode as the normal 'mov' opcode takes 32 bit numbers maximum 21:27
FROGGS brrt: my timing: 6.45s for disabled jit, and 2.2s with jit enabled
brrt: I like it :o)
jnthn Note that the loop outside the foo() call is not JITted
brrt no, it isn't :-)
jnthn Or even spesh'd 21:28
brrt thats a goal for OSR, isn't it?
jnthn Right :)
FROGGS can I recompile rakudo with jit?
brrt otherwise you can never 'get' at the frame
FROGGS tries 21:29
brrt basically, i think you get reasonable code that way, but you move quite a bit of complexity up too the graph constuctor
jnthn *nod* 21:30
But the graph constructor having it means it simplifies getting, say, x86 or ARM working with JIT later :)
brrt which is kind-of where we want it, but we ( i ) am not sure if that complexity should include which register has what, which kind of leaks there
agreed
FROGGS okay, looks like I can still build rakudo 21:31
brrt i'd hope so :-) i'd be /extremely/ surprised if you could JIT anything in there
jnthn :)
The JIT will grow in skills :)
21:32 donaldh joined
brrt i'm quite optimistic :-) 21:32
FROGGS stage parse was 45s, which is in the usual range for my box :o)
brrt i'm not sure if the branch of master i merged moar-jit with was quite recent enough (i.e. i think there have been reports of segv's fixed :-))
jnthn yeah, was a couple 21:33
brrt: Beyond that, what kind of ops are you plotting to work on next? 21:34
brrt i still need to do some integer arithmetic, which is easy (but requires careful doc reading) 21:35
i'll need to do floating-points
thats basically the 'basic easy stuff', that doesn't require much architecture / thinking / setup 21:36
jnthn *nod* 21:37
brrt the 'invoke' tail call stuff, that needs to be done, is - i think - pretty well worked out in theory, but will probably give some challenges
jnthn Yes.
Do you have all the sp_getarg_* in?
brrt sp_getarg_i
no others, they should be simple though, they're just copies afaik 21:38
(it would be a matter of adding case statements :-)
i think i even have param_rp_i ?
nope, don't have param_rp_i yet 21:42
so, in short 21:46
next day, i want to start on return value handling
that /may/ include creating a copy node
or, it may not, i'm not sure which is simple 21:47
(i may also decide not to do the copy node until i've augmented dynasm, thats possible too)
when i've got eturn values, there is a boatload of ops i can jit 21:48
and when thats done, i want to work on invoke(_.)? ops 21:49
when that is done, this week may be over, but i think we should take a look at deopt then 21:50
i.e. sp_guard* and the like
jnthn Yes 21:52
And sp_fastcreate
And sp_p6oget...
And sp_p6bind...
brrt looks at those ops cus' he hasn't seem them yet 21:54
jnthn They're optimized forms of object allocation and get/bind attr 21:55
Which mostly boil down to pointer operations.
dalek arVM/moar-jit: 543226c | (Bart Wiegmans)++ | / (5 files):
Added support for other sp_getargs_. ops
21:59
brrt ok
pointer operations i can handle
jnthn :)
As for deopt_one, which the guards need, I suggest that we just write functions in deopt.c that, instead of searching for an index, can take one. 22:00
And we JIT code that just passes the deopt index
And since the register frames are already in the right shape, it's then mostly just a case of the JITted code doing a return. 22:02
And letting the interp take over.
brrt hmm.. yes, agreed 22:05
do we know at codegen time what that deopt index is?
jnthn Yeah
it's really easy
brrt (ooh gnome3 zoom feature follows cursor these days. haven't had that since zoomtext :-D)
jnthn You just take the spesh node that will deopt and look at ->annotations, and follow the linked list until you hit a deopt_one annotation
And then read deopt_idx :) 22:06
brrt ok, thats pretty simple
jnthn yeah :)
brrt writes that down
jnthn :)
OK, I need to rest soon...getting very sleepy... 22:07
brrt sleep well
jnthn thanks
'night
brrt in .. elfeketallaa or what it was called :-)
'night :-)
jnthn Oh, I'm just at home right now 22:08
Not going there until Sunday :)
brrt ok, better yet
jnthn :)
brrt no sleep like home
jnthn aye
'night
brrt 'night
TimToady thinks looping and indexing into arrays of natives will be one of the biggest wins for jitting, eventually 22:14
lizmat hopes JITting will also work on NFG 22:15
TimToady I just said that, basically :)
brrt what is nfg?
TimToady our eventual form for representing unicode strings on a grapheme-by-grapheme basis, even when unicode doesn't define precomposed graphemes 22:16
tadzik woot. Awesomeness
brrt++
brrt oh, normalized form g :-)
lizmat S15:82
synopsebot Link: perlcabal.org/syn/S15.html#line_82
TimToady but on a jit level, we're talking arrays of signed ints, probably
brrt lizmat: 404 :-(
FROGGS the html file of S15 is not up 22:17
lizmat raw.githubusercontent.com/perl6/sp...nicode.pod
brrt sees no reason why that shouldn't work
again, pointer arithmetic is easy :-)
give me pointers and addition and substraction and i'll be a happy hacker 22:18
give me lots of c calls to call, weird ABI's / function call requirements, and i'm.. less happy
did you know (any of you :-)), by the way, that x86 has instructions for a): string opeations and b); array bounds checking? 22:20
FROGGS and amd64 lacks these? 22:21
brrt no, has them too 22:22
i don't know what they do, though
and also special ops for looping
amd64 is just a superset, i meant to say that :-)
FROGGS that is what I always thought :o) 22:23
lizmat remembers the time she would put X86 code in hex into a buffer and then call that buffer 22:26
but that's 20+ years ago 22:27
brrt in a hex buffer? :-o
brrt can't read x86 hex let alone write it 22:28
lizmat this was another language (TenCORE if you must know) 22:30
foo,2048 would define a buffer of 2K
foo <= xCEDE00FA.... 22:31
would assign it (<= was actually a special character)
ah, the memories :-)
tadzik heh, I remember writing code for MCUs in binary and running it, and that was like 3 years ago
but that was "crazy university stuff" 22:32
brrt whut
tadzik imagine a drill sergeant saying "after tonight, you're gonna be real army men!"
brrt and to be a real army man, you had to program an MCU in binary?
tadzik yeah 22:33
nothing was ever too "low level" anymore
brrt i thought real army man used x-ray guns to switch their bits by hand
s/man/men/
tadzik I must've skipped that class :( 22:34
brrt anyway, i've only recently come to appreciate how little the basic interpreter for commodore 64 (my first programming language) actually did
lizmat I remember the days I had to flip bits with huge magnets :-)
brrt i feel cheated 22:35
you did?
:-o
tadzik but I remember how amazed I was when the teacher was operating on 4-ish switches simultaneously (?), counting in binary in a pace of like 4 numbers per second :)
brrt was already amazed with the display of a _real_ pdp8 in the psychological experiment lab @university
lizmat well, let me put it this way: my first floppy was a 96K single sided singe density floppy
tadzik lizmat: wow, that's amazing :)
lizmat and a sewing machine sized luggable Osborne-1 22:36
featuring CP-M and Wordstar
and the screen the size of a nowadays phablet 22:37
brrt en.wikipedia.org/wiki/Floptical
lizmat with a resulotion of 80 x 25 characters
tadzik I think GRRM still uses Wordstar to write his books 22:38
brrt GRRM? 22:39
oh, i see
tadzik George Martin, the Game of Thrones guy
I think it's time to sleep & G'night #moarvm
brrt 'night 22:40
22:42 brrt left
lizmat gnight tadzik 22:43
22:47 woolfy joined
hoelzro brother: I just saw this: www.freelists.org/post/luajit/DynAS...umentation 23:12
thought you might find it handy!
er
that was meant for brrt 23:13
.seen brrt
FROGGS 33mins ago
hoelzro thanks FROGGS =P 23:19
23:20 jnap joined