00:27
stratochief_ is now known as stratochief
00:44
Hypergolic_Skunk has quit [Quit: Connection closed for inactivity]
02:49
NathanKell|AFK is now known as NathanKell
04:03
icefire has quit [Quit: Leaving]
04:06
NathanKell is now known as NathanKell|AFK
05:01
Mike` has quit [Ping timeout: 182 seconds]
05:07
Mike` has joined #principia
05:22
Wetmelon has quit [Ping timeout: 186 seconds]
05:52
NolanSyKinsley has quit [Remote host closed the connection]
08:27
Hypergolic_Skunk has joined #principia
08:50
Wetmelon has joined #principia
10:58
<
egg >
lamont: yes, I know
11:01
<
egg >
lamont: have you looked at those lamont endpoints?
12:05
<
GH >
Principia/master e3d737e pleroy: Journal for Cohen.
12:05
<
GH >
Principia/master dcb21c1 Pascal Leroy: Merge pull request #1718 from pleroy/CohenJournal...
12:55
icefire has joined #principia
13:01
<
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?"
15:17
NolanSyKinsley has joined #principia
16:58
icefire has quit [Quit: Leaving]
16:58
<
GH >
[Principia] eggrobin opened pull request #1719: Ifdef out the explicit instantiations on *nix (master...debloat)
https://git.io/vAqTR
18:15
icefire has joined #principia
18:18
<
awang >
egg: How much speedup are you seeing due to PGO?
19:03
<
egg >
awang: 15-20%?
19:05
<
awang >
Oh, that's pretty decent
20:00
<
lamont >
egg: i installed the dll and just smoke tested that things look normal but haven’t written code against the actual endpoint yet
20:02
NathanKell|AFK is now known as NathanKell
20:03
<
egg >
lamont: but you managed to actually call it?
20:03
<
lamont >
no, that’s what i mean no written code
20:04
<
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
20:04
<
egg >
you'll probably need to get the pointer to the plugin by yoinking the private plugin_ from the adapter
20:04
<
egg >
and then the rest is just calling the endpoint according to the lack of documentation
20:04
<
lamont >
well its just C# so can’t i grab the method via reflection?
20:06
<
egg >
lamont: but the function takes a pointer to the C++ plugin as its first argument
20:06
<
egg >
you need to have that
20:06
<
lamont >
wait wut, pointers in C#?
20:07
<
lamont >
hahaha TIL
20:08
<
egg >
(is_subject) means it's an extension method for that thing in the C# definition
20:08
<
egg >
lamont: yeah, IntPtr
20:09
<
egg >
lamont: you can also have pointers with unsafe code, but that's not the case here, it's just an IntPtr
20:21
<
lamont >
is your assembly “Principia” or "principia"?
20:21
<
egg >
lamont: which assembly
20:21
<
egg >
lamont: the C# one?
20:21
<
egg >
it's ksp_plugin_adapter
20:22
<
egg >
(yes that's a weird name)
20:22
<
egg >
principia is the managed DLL (or so)
20:22
<
egg >
(or dylib which is called so because I cannot into macintosh)
20:22
<
egg >
s/managed/native/
20:22
<
Qboid >
egg meant to say: principia is the native DLL (or so)
20:24
<
lamont >
yah, because mac is gonna mac
20:29
<
lamont >
[LOG 12:28:00.553] FOUND PRINCIPIA!!!
20:55
NathanKell is now known as NathanKell|AFK
21:31
<
lamont >
[LOG 13:09:16.352] failed to find principia__ExternalGetNearestPlannedCoastDegreesOfFreedom
21:33
<
lamont >
principiaMethod = ReflectionUtils.getMethodByReflection("ksp_plugin_adapter", "principia.interface", "principia__ExternalGetNearestPlannedCoastDegreesOfFreedom", BindingFlags.Public | BindingFlags.Static);
21:34
<
lamont >
(strongly suspect i’m missing something as to where that method winds up and how it should be called)
21:35
<
lamont >
s/called/named/
21:35
<
Qboid >
lamont meant to say: (strongly suspect i’m missing something as to where that method winds up and how it should be named)
21:37
Hypergolic_Skunk has quit [Quit: Connection closed for inactivity]
21:39
<
awang >
egg: You should run Principia through perf
21:47
<
egg >
lamont: yeah, the actual function is called ExternalGetNearestPlannedCoastDegreesOfFreedom
21:47
<
lamont >
what namespace does it actuall land in?
21:47
<
egg >
lamont: it p/invokes an entrypoint called principia__
21:48
<
egg >
lamont: principia.ksp_plugin_adapter
21:48
<
egg >
lamont: in class Interface probably
21:48
<
lamont >
yeah thats the BindingFlags.Static bit
21:52
<
lamont >
oh the class is named "interface"
21:56
<
egg >
lamont: Interface, not interface
21:57
<
egg >
lamont: I don't think a class can be called that; at least it shouldn't :-p
21:57
<
lamont >
still not getting it...
21:57
<
egg >
lamont: it's internal, not public
21:58
<
egg >
(maybe we should make them public, but anyway, it gets generated that way right now)
21:58
<
lamont >
but if its not public how can i call it externally?
22:01
<
lamont >
heh, well i’m very familiar with that from ruby, but i’m a bit surprised c# lets you do that
22:02
<
egg >
reflection lets you do whatever you want :-)
22:02
<
egg >
lamont: you'll also need to get the IntPtr plugin_ from the PrincipiaPluginAdapter class, and that's private
22:04
<
lamont >
obj.send(:private_method) in ruby
22:05
<
lamont >
or obj.instance_variable_set(:@ivar)
22:05
<
lamont >
also you can just open up any class and start scribbling over the internals if you like, nothing stopping you
22:05
<
lamont >
“monkeypatching”
22:05
<
egg >
lamont: I mean you can probably do a fair bit of silliness with C# reflection tbh
22:06
<
lamont >
it seems to not quite be as total insane as ruby tho
22:21
<
lamont >
principia.ksp_plugin_adapter.Interface ?
22:22
<
lamont >
[LOG 14:22:12.561] FOUND principia__ExternalGetNearestPlannedCoastDegreesOfFreedom!!!
22:24
<
egg >
lamont: well it's not really principia__ on the C# side right
22:24
<
lamont >
yeah unfixed debug string
22:25
<
egg >
lamont: btw you can find the actual declaration in interface.generated.cs
22:25
<
egg >
(which will have been generated as part of the build process by *magic*)
22:35
NathanKell|AFK is now known as NathanKell
23:24
<
egg >
I should have kept XYZ in there rather than XY
23:26
<
egg >
lamont: interface.cs has the operators from XYZ to Vector3d and back, so those exist (that's why the generated structs are partial)
23:27
NathanKell is now known as NathanKell|BRB
23:41
NolanSyKinsley has quit [Ping timeout: 186 seconds]
23:43
NolanSyKinsley has joined #principia
23:59
NathanKell|BRB is now known as NathanKell
23:59
NathanKell is now known as NathanKell|AFK