00:20 vendethiel joined 03:15 vendethiel joined 04:35 vendethiel joined 05:58 rurban__ joined 06:31 vendethiel joined 08:05 FROGGS joined 08:07 zakharyas joined 08:25 FROGGS joined 10:34 rurban joined 11:03 harrow joined 11:21 zakharyas1 joined 12:39 pyrimidi_ joined 12:51 brrt joined
brrt \o 12:51
timotimo o/ brrt 12:57
how are you? :)
brrt busy as always 12:58
and you? :-)
timotimo ups and downs ;) 12:59
brrt i have a 90% finished blog post that was obsoleted by TimToady++
so i have to find another spin on it
timotimo d'oh
FROGGS /o\ 13:02
btw, that's my progress as of last night: 14:39
gist.github.com/FROGGS/239a936c29bf0873c38f
I want to get rid of the 'is symbol' this evening, and then care about proper memory handling
as one can see I implemented a CPPStruct repr 14:40
(which is a direct copy of CStruct)
jnthn FROGGS: Plus it adds the vtable pointer for you? 14:41
FROGGS jnthn: no, it does nothing about vtables yet 14:43
I don't even know yet if I have to care about these things
jnthn I thought the typical layout for C++ object instnaces is the first slot of the object is the v-table pointer. 14:44
FROGGS that might be true, though I map the perl6 methods to the symbols I see in the library
timotimo so you don't have direct attribute access? 14:45
FROGGS timotimo: that's a question about the right memory layout and attribute offset calculation me thinks
timotimo which is probably also cpp compiler defined? 14:46
FROGGS because, structs in C++ without a constructor and vtables are laid out identical to C structs
timotimo oh, ok
FROGGS perhaps...
arnsholt FROGGS: You are completely nuts =) 14:50
FROGGS *g* 14:51
no, I'm not :o)
brrt FROGGS++
cpp compatibility is a huge deal
FROGGS btw, the name mangling is the same problem as with the names on the jvm 14:52
and we only have to care about two compilers atm, so no big deal
timotimo clang doesn't cpp? 14:54
brrt clang is cpp by default 14:55
timotimo k
FROGGS ahh, clang was not listed on that wikipedia page... 14:58
the 'is symbol' trait is now optional... was just about juggling a few lines around in zavolaj 15:18
class b2World is repr<CPPStruct> {
has OpaquePointer $.data;
method new(b2Vec2) is native("libBox2D") { * }
method Dump() is native("libBox2D") { * }
}
that's (almost) all one needs for a very limited test case
jnthn FROGGS: How does it know this is C++ and it should name-mangle? Are you writing a NativeCallPP? :) 15:19
FROGGS another interesting bit will be to mangle the name for parameters that are `const b2Vec2&`, these are mangled to "RK6b2Vec2"
jnthn: no, the repr tells so 15:20
arnsholt Knowing it's C++ is presumably CPPStruct vs. CStruct
FROGGS aye
arnsholt How to name mangle is a lot harder though =)
jnthn But what about functions from C++?
FROGGS jnthn: they are exposed as symbols, like in C 15:38
because, it boils down to C conventions anyway, that's the reason the names are mangled after all 15:39
tadzik oh oh 16:02
FROGGS so, when somebody has nice online literature about vtables and so forth in C++, I'll enjoy reading it :o) 16:16
I just don't understand the need for them currently
16:33 brrt left 17:28 japhb joined 17:54 mj41 joined 18:46 FROGGS joined 19:40 rurban joined
FROGGS today I want to get the memory layout right... 19:50
ahh, that search.cpan.org/~plicease/FFI-Platy...-CPP-0.04/ uses libffi under the hood 19:54
21:07 ilbot3 joined 21:10 moritz joined 21:46 Peter_R joined 22:04 FROGGS_ joined 22:08 Peter_R joined 22:16 colomon joined 22:38 ilbot3 joined
japhb Hmmm, the irclog seems to be missing FROGGS' line at 20:18 UTC. 23:11
moritz: ^^ 23:12
Hmmm, I see a couple rejoins. ilbot3 having issues?
jnthn japhb: It had a hiccup earlier.
japhb ah 23:13
thankfully the local-net hiccup did not occur at the sametime as the ilbot hiccup. :-)
jnthn :)
23:14 vendethiel joined 23:47 vendethiel joined