UmbralRaptor changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> egg|nomz|egg: generally if your eyes are dewing over, that's not the weather. | <ferram4> I shall beat my problems to death with an engineer. | We can haz pdf
egg|laptop|egg has quit [Remote host closed the connection]
<catalograptop> WeylandsWings: compiling data from a few catalogs for more simulations
e_14159_ has joined #kspacademia
e_14159 has quit [Ping timeout: 378 seconds]
<egg|cell|egg> Are you going to compile a new catalog
<egg|cell|egg> RAdial velocity ProspecTive ObseRvation catalog
<catalograptop> uh
catalograptop has quit [Read error: Connection reset by peer]
catalograptop has joined #kspacademia
catalograptop is now known as raptop
e_14159 has joined #kspacademia
e_14159_ has quit [Ping timeout: 378 seconds]
* raptop stabs thunderstorms
raptop_ has joined #kspacademia
raptop has quit [Ping timeout: 190 seconds]
raptop_ has quit [Ping timeout: 189 seconds]
raptop has joined #kspacademia
raptop has quit [Ping timeout: 190 seconds]
<_whitenotifier-d13c> [Principia] pleroy commented on issue #2562: KSP 1.8.1 - Aerodynamic issue with Principia and FAR - https://git.io/Jf1TR
<_whitenotifier-d13c> [Principia] pleroy closed issue #2562: KSP 1.8.1 - Aerodynamic issue with Principia and FAR - https://git.io/Jfc9K
egg|laptop|egg has joined #kspacademia
egg|cell|egg has quit [Ping timeout: 378 seconds]
egg|cell|egg has joined #kspacademia
egg|cell|egg has quit [Ping timeout: 189 seconds]
egg|cell|egg has joined #kspacademia
<egg|cell|egg> Whitequark: I keep wanting to read cxxrtl as right to left
<whitequark> hah
<whitequark> all of the _t identifiers are reserved by c99, right?
<whitequark> or was it posix?
<egg|cell|egg> I think POSIX has opinions yes
<egg|cell|egg> But e.g. C++ adds a dozen every time
<egg|cell|egg> Though it does so in std so maybe there isotopic reservations matter less
<egg|cell|egg> Idiotic not isotopic
egg|laptop|egg has quit [Remote host closed the connection]
egg|laptop|egg has joined #kspacademia
egg|cell|egg has quit [Ping timeout: 204 seconds]
egg|cell|egg has joined #kspacademia
egg|laptop|egg has quit [Remote host closed the connection]
<whitequark> egg|cell|egg: i can use reinterpret_cast to cast between two POD structures with identical layouts, right?
<whitequark> static_cast yells at me bc no inheritance
<egg|cell|egg> Nope
<whitequark> what
<egg|cell|egg> You want bit_cast
<whitequark> ok
<whitequark> that's C++20, i have C++11
<egg|cell|egg> One minute let me start an orc client in the new computer
<whitequark> er, sorry
<egg|cell|egg> IRC
<whitequark> cast between two POINTERS to POD structures with identical layouts
<whitequark> I accidentally a critical word
<whitequark> context: I have this thing in C++ https://paste.debian.net/1150422/
<whitequark> and I have this thing in C https://paste.debian.net/1150423/
<whitequark> and in the C bindings I cast the C++ thing to the C thing
<whitequark> the pointer to the C++ thing to the pointer to the C thing*
egg|laptop|egg has joined #kspacademia
egg|laptop|egg is now known as egg_
egg_ is now known as egg|upstairs|egg
<egg|upstairs|egg> whitequark: meow
<egg|upstairs|egg> OK so
<whitequark> (have you looked at the log?)
<egg|upstairs|egg> yeah
<egg|upstairs|egg> the meow_casts that are not std::bit_cast are just named subsets of C-style cast semantics
<whitequark> right ok
<egg|upstairs|egg> reinterpret_cast is almost as lax (except constness)
<whitequark> i remember that now
<whitequark> ah
<egg|upstairs|egg> but it does not do magic, strict aliasing still applies
<egg|upstairs|egg> std::bit_cast actually does stuff otoh
<egg|upstairs|egg> you can implement it in C++earlier with memcpy
<whitequark> does strict aliasing prohibit casting A* to B* if A and B are both standard-layout and the layout is the same?
<egg|upstairs|egg> I strongly recommend implementing it
<egg|upstairs|egg> I think it does prohibit that
<whitequark> well that's fucking dumb
<whitequark> i refuse
<egg|upstairs|egg> strict aliasing explicitly allows very very few things
<egg|upstairs|egg> like, technically, std::uint8_t does not have to be a character type
<egg|upstairs|egg> so the stardard allows it to have strict aliasing
<egg|upstairs|egg> (nobody does that thankfully, all implementation treat it as a byte)
<egg|upstairs|egg> s/implementation/implementations/
<galois> egg|upstairs|egg meant to say: (nobody does that thankfully, all implementations treat it as a byte)
<egg|upstairs|egg> whitequark: I think unions can type pun in C but not in C++, but to my knowledge nobody exploits that in C++ yet
<egg|upstairs|egg> whitequark: note of course that, because memcpy is the mechanism to say "this is aliased" rather than "I want to copy stuff", it almost always gets compiled away
<whitequark> I can't copy
<egg|upstairs|egg> much like inline doesn't mean inline, memcpy doesn't mean copy
<egg|upstairs|egg> :-p
<whitequark> the converted pointer ends up passed via FFI
<whitequark> whcih is the whole point of converting it
<galois> [WIKIPEDIA] Forces françaises de l'intérieur | "Les Forces françaises de l'intérieur (FFI) sont le résultat de la fusion, au 1er février 1944, des principaux groupements militaires de la Résistance intérieure française qui s'étaient constitués dans la France occupée : l'Armée secrète (AS, gaulliste, regroupant Combat, Libération-Sud, Franc-Tireur…"
<egg|upstairs|egg> so you are interchanging the pointer across languages?
<whitequark> yeah, from c++ to c, or anything that speaks c abi
<whitequark> that's why it's standard-layout
<egg|upstairs|egg> yeah at that point I think you are reaching outside what the C++ standard talks about anyway
<whitequark> but the code that exports a c api is in c++
<egg|upstairs|egg> hm
<whitequark> so i'm doing the conversion there
<egg|upstairs|egg> I'm mildly confused tbh, why do you need two layout-equivalent types in the C++ side then
<whitequark> well, one of them comes from the c++ header (which has constructors and can't be parsed by a c compiler), and another comes from the c header (which can)
<egg|upstairs|egg> hm
<egg|upstairs|egg> and why do you need them to not be copied?
<egg|upstairs|egg> (i.e., what is the intended lifecycle of the objects around all those calls)
<whitequark> because the function that does the conversion returns a pointer with the same lifetime as the pointer it takes
<egg|upstairs|egg> I don't really understand the broader context; what happens to the C object from the boundaries of the C ABI here
<whitequark> the API looks more or less like this:
<whitequark> struct c_layout_thing { int a; };
<whitequark> struct c_layout_container { std::vector<c_layout_thing> things; };
<whitequark> struct c_layout_thing *get_thing(struct c_layout_container *container, int index);
<_whitenotifier-d13c> [Principia] nickersonm starred Principia - https://git.io/Jf18w
<whitequark> void do_something(struct c_layout_container *container) { /* do something with container->things[..].a */ }
<whitequark> the C code will call get_thing(), manipulate thing->a, then call do_something()
<whitequark> which will presumably do something else with thing->a.
<egg|upstairs|egg> OK so then the vector has to be a vector of the actual C layout things, not their C++ alias
<whitequark> yeah and i don't want that.
<whitequark> because i want the c_layout_thing to have a constructor, which can't be a part of the c header
<egg|upstairs|egg> hmm
<egg|upstairs|egg> you could do horrible ifdef things to remove the constructor if you are looking at the header in C
<whitequark> i have a completely separate header for c
<whitequark> for a few reasons, one of them being that c enums can't have storage type specified
<whitequark> so on the c++ side i have a `enum x : uint32_t` and on the c side i have a `uint32_t` and then a separate `enum x` for the values
raptop has joined #kspacademia
egg|cell|egg has quit [Ping timeout: 378 seconds]
<whitequark> i guess i could... inehrit from the c thing
<egg|upstairs|egg> yeah that could work I think?
<egg|upstairs|egg> The other option is definitely UB; some UBs are worse than other, but I think this is a UB that actually gets used by most compilers (I am having trouble godbolting my way to an example but that mostly says that I suck at this rather than that reinterpret_cast is being treated specially by the compiler)
egg|upstairs|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has joined #kspacademia
egg|upstairs|egg has joined #kspacademia
<whitequark> mhm
egg|upstairs|egg has quit [Read error: Connection reset by peer]
<raptop> "Description of some particular keywords" why would the readme file with your data table not include descriptions of all keywords used?
egg|upstairs|egg has joined #kspacademia
<egg|upstairs|egg> whitequark: I believe the common initial subsequence union thing is a C thing only https://twitter.com/cvtsi2sd/status/1268907568052699142
<kmath> <cvtsi2sd> @whitequark Besides, the Rules already allow to use these two types interchangeably in an union as they share a "co… https://t.co/MsCONr4OmC
<egg|upstairs|egg> (though in practice C++ implementations tend to not use the UBness of union punning if I remember Regehr’s post correctly)
<egg|upstairs|egg> cppreference says "Note that many C++ compilers relax this rule, as a non-standard language extension, to allow wrong-type access through the inactive member of a union (such access is not undefined in C)."
egg|upstairs|egg_ has joined #kspacademia
egg|upstairs|egg has quit [Ping timeout: 190 seconds]
* raptop onces again hochos FORTRAN formatted tables
<_whitenotifier-d13c> [Principia] pleroy commented on issue #2590: Vessels teleport/switch places upon EVA - https://git.io/Jf1zo
<_whitenotifier-d13c> [Principia] pleroy opened pull request #2600: Skip collisions with unready Kerbals - https://git.io/Jf1zi
<_whitenotifier-d13c> [Principia] Pending. Build queued… - 
<_whitenotifier-d13c> [Principia] Pending. Building… - http://casanova.westeurope.cloudapp.azure.com:8080/job/Principia/4332/
<_whitenotifier-d13c> [Principia] Success. Build finished. - http://casanova.westeurope.cloudapp.azure.com:8080/job/Principia/4332/
<_whitenotifier-d13c> [Principia] eggrobin labeled pull request #2600: Skip collisions with unready Kerbals - https://git.io/Jf1zi
egg|upstairs|egg_ has quit [Remote host closed the connection]
egg|upstairs|egg has joined #kspacademia
egg|cell|egg has quit [Ping timeout: 378 seconds]
egg|cell|egg has joined #kspacademia
egg|upstairs|egg has quit [Remote host closed the connection]
egg|upstairs|egg has joined #kspacademia
egg|upstairs|egg has quit [Ping timeout: 204 seconds]
egg|cell|egg has quit [Ping timeout: 378 seconds]
egg|upstairs|egg has joined #kspacademia
egg|upstairs|egg has quit [Remote host closed the connection]
<_whitenotifier-d13c> [Principia] pleroy edited a comment on issue #2590: Vessels teleport/switch places upon EVA - https://git.io/Jf1zo
<_whitenotifier-d13c> [Principia] pleroy closed issue #2590: Vessels teleport/switch places upon EVA - https://git.io/Jfaz1
<_whitenotifier-d13c> [Principia] pleroy pushed 2 commits to master [+0/-0/±6] https://git.io/Jf1ot
<_whitenotifier-d13c> [Principia] pleroy a8e5aa7 - Skip collisions with unready Kerbals.
<_whitenotifier-d13c> [Principia] pleroy ea4a7bd - Merge pull request #2600 from pleroy/2590 Skip collisions with unready Kerbals
<_whitenotifier-d13c> [Principia] pleroy closed pull request #2600: Skip collisions with unready Kerbals - https://git.io/Jf1zi
<raptop> !8 will GMU's reopening attempt kill TAs?
<galois> raptop: no
* raptop should check on Zoom's unicode support
<raptop> !8 Are these events drifting towards mandatory drinking?
<galois> raptop: yes
<raptop> >_<
armed_troop has quit [Quit: Bye]