egg|zzz|egg changed the topic of #principia to: READ THE FAQ: http://goo.gl/gMZF9H; The current version is Clifford. We currently target 1.2.2, and 1.3.1. <scott_manley> anyone that doubts the wisdom of retrograde bop needs to get the hell out | https://xkcd.com/323/
stratochief_ is now known as stratochief
Hypergolic_Skunk has quit [Quit: Connection closed for inactivity]
NathanKell|AFK is now known as NathanKell
icefire has quit [Quit: Leaving]
NathanKell is now known as NathanKell|AFK
Mike` has quit [Ping timeout: 182 seconds]
Mike` has joined #principia
Wetmelon has quit [Ping timeout: 186 seconds]
NolanSyKinsley has quit [Remote host closed the connection]
Hypergolic_Skunk has joined #principia
Wetmelon has joined #principia
<egg> lamont: yes, I know
<egg> lamont: have you looked at those lamont endpoints?
<GH> [Principia] pleroy opened pull request #1718: Journal for Cohen (master...CohenJournal) https://git.io/vAtH7
<GH> [Principia] pleroy pushed 2 new commits to master: https://git.io/vAtQ9
<GH> Principia/master e3d737e pleroy: Journal for Cohen.
<GH> Principia/master dcb21c1 Pascal Leroy: Merge pull request #1718 from pleroy/CohenJournal...
<GH> [Principia] pleroy tagged 2018021521-Cohen at 1c05f15: https://git.io/vAt7O
icefire has joined #principia
<egg> !seen lamont
<Qboid> egg: I last saw lamont on [11.02.2018 04:42:37] in #RO saying: "Slaintemaith: i was AFK, you found what you need?"
NolanSyKinsley has joined #principia
icefire has quit [Quit: Leaving]
<GH> [Principia] eggrobin opened pull request #1719: Ifdef out the explicit instantiations on *nix (master...debloat) https://git.io/vAqTR
icefire has joined #principia
<awang> egg: How much speedup are you seeing due to PGO?
<egg> awang: 15-20%?
<awang> Oh, that's pretty decent
<lamont> egg: i installed the dll and just smoke tested that things look normal but haven’t written code against the actual endpoint yet
NathanKell|AFK is now known as NathanKell
<egg> lamont: ok
<egg> lamont: but you managed to actually call it?
<lamont> no, that’s what i mean no written code
<egg> ah
<egg> ok
<egg> meow
<lamont> literally just dropped the dll in and fired up ksp and smoke tested it to make sure it didn’t immediately blow up or something
<egg> you'll probably need to get the pointer to the plugin by yoinking the private plugin_ from the adapter
<egg> and then the rest is just calling the endpoint according to the lack of documentation
<lamont> well its just C# so can’t i grab the method via reflection?
<egg> lamont: sure
<egg> lamont: but the function takes a pointer to the C++ plugin as its first argument
<egg> you need to have that
<lamont> ah i see
<lamont> wait wut, pointers in C#?
<lamont> hahaha TIL
<lamont> evil
<egg> lamont: this is the magical descriptor from which the function is defined https://github.com/eggrobin/Principia/blob/lamont-endpoints/serialization/journal.proto#L375-L396
<egg> (is_subject) means it's an extension method for that thing in the C# definition
<egg> lamont: yeah, IntPtr
<egg> lamont: you can also have pointers with unsafe code, but that's not the case here, it's just an IntPtr
<lamont> is your assembly “Principia” or "principia"?
<egg> lamont: which assembly
<egg> lamont: the C# one?
<lamont> yeah
<egg> it's ksp_plugin_adapter
<egg> (yes that's a weird name)
<egg> principia is the managed DLL (or so)
<lamont> 'k
<egg> (or dylib which is called so because I cannot into macintosh)
<egg> s/managed/native/
<Qboid> egg meant to say: principia is the native DLL (or so)
<lamont> yah, because mac is gonna mac
<lamont> [LOG 12:28:00.553] FOUND PRINCIPIA!!!
NathanKell is now known as NathanKell|AFK
<egg> lamont: :D
<lamont> [LOG 13:09:16.352] failed to find principia__ExternalGetNearestPlannedCoastDegreesOfFreedom
<lamont> principiaMethod = ReflectionUtils.getMethodByReflection("ksp_plugin_adapter", "principia.interface", "principia__ExternalGetNearestPlannedCoastDegreesOfFreedom", BindingFlags.Public | BindingFlags.Static);
<lamont> (strongly suspect i’m missing something as to where that method winds up and how it should be called)
<lamont> s/called/named/
<Qboid> lamont meant to say: (strongly suspect i’m missing something as to where that method winds up and how it should be named)
Hypergolic_Skunk has quit [Quit: Connection closed for inactivity]
<awang> egg: You should run Principia through perf
<egg> lamont: yeah, the actual function is called ExternalGetNearestPlannedCoastDegreesOfFreedom
<lamont> what namespace does it actuall land in?
<egg> lamont: it p/invokes an entrypoint called principia__
<egg> lamont: hmm
<egg> lamont: principia.ksp_plugin_adapter
<egg> lamont: in class Interface probably
<lamont> yeah thats the BindingFlags.Static bit
<lamont> oh the class is named "interface"
<egg> lamont: Interface, not interface
<egg> lamont: I don't think a class can be called that; at least it shouldn't :-p
<lamont> still not getting it...
<egg> lamont: it's internal, not public
<egg> (maybe we should make them public, but anyway, it gets generated that way right now)
<lamont> oh
<lamont> but if its not public how can i call it externally?
<lamont> heh, well i’m very familiar with that from ruby, but i’m a bit surprised c# lets you do that
<egg> reflection lets you do whatever you want :-)
<egg> lamont: you'll also need to get the IntPtr plugin_ from the PrincipiaPluginAdapter class, and that's private
<lamont> obj.send(:private_method) in ruby
<lamont> or obj.instance_variable_set(:@ivar)
<egg> :D
<lamont> also you can just open up any class and start scribbling over the internals if you like, nothing stopping you
<lamont> “monkeypatching”
<egg> lamont: I mean you can probably do a fair bit of silliness with C# reflection tbh
<lamont> it seems to not quite be as total insane as ruby tho
<lamont> principia.ksp_plugin_adapter.Interface ?
<egg> lamont: yeah
<lamont> [LOG 14:22:12.561] FOUND principia__ExternalGetNearestPlannedCoastDegreesOfFreedom!!!
<egg> :D
<egg> lamont: well it's not really principia__ on the C# side right
<lamont> yeah unfixed debug string
<egg> lamont: btw you can find the actual declaration in interface.generated.cs
<egg> (which will have been generated as part of the build process by *magic*)
NathanKell|AFK is now known as NathanKell
<egg> um
<egg> I should have kept XYZ in there rather than XY
<egg> fixed
<egg> lamont: interface.cs has the operators from XYZ to Vector3d and back, so those exist (that's why the generated structs are partial)
NathanKell is now known as NathanKell|BRB
NolanSyKinsley has quit [Ping timeout: 186 seconds]
NolanSyKinsley has joined #principia
NathanKell|BRB is now known as NathanKell
NathanKell is now known as NathanKell|AFK