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
e_14159 has joined #kspacademia
e_14159_ has quit [Ping timeout: 378 seconds]
raptop has joined #kspacademia
UmbralRaptor has quit [Ping timeout: 204 seconds]
raptop has quit [Quit: Bye]
egg|laptop|egg has joined #kspacademia
<umbralraptop>
!8 Does WMATA want 0 riders as of 2022?
<galois>
title: Principia/quantities.hpp at 1473783c197eecc8a7955638f83f4de0f9a9249c · mockingbirdnest/Principia · GitHub
<SnoopJ>
we have so much move-only stuff in our hot code
<SnoopJ>
it has been the source of many headaches recently because SWIG does incredibly poorly with it
<egg|laptop|egg>
oh yes SWIG is dreadful
<SnoopJ>
yea just in general
<SnoopJ>
but that in particular just of
<egg|laptop|egg>
otoh CLIF is quite nice in my eggsperience
<SnoopJ>
oof*
<egg|laptop|egg>
(and in particular CLIF doesn’t make me write ancient C++)
<SnoopJ>
I'd switch to cppyy probably if a switch were possible
<SnoopJ>
but the powers that be are holding onto SWIG for...well, who knows
<SnoopJ>
it certainly ain't because it does a good job. one of those move-only objects comes anywhere near a collection and things are broken again :(
<SnoopJ>
I'd rather just write bindings by hand
<whitequark>
egg|laptop|egg: what are the other options?
<SnoopJ>
I'm gonna try to do the advent in C++ this year :3
<egg|laptop|egg>
whitequark: well, what you are doing creates black boxes and then tosses them, to replace them with the ones you want to keep, right? so that’s an option
<whitequark>
no
<whitequark>
black boxes acquire some resource on construction and destroy it in the destructor
<whitequark>
this resource is expensive to acquire and discard
<egg|laptop|egg>
ah, so that is what you want to avoid
<whitequark>
the whole point of the exercise with reset() is to preserve black boxes and not create them unnecessarily
<whitequark>
yup
<whitequark>
idk, maybe put the black box construction to init() or something?
<egg|laptop|egg>
yeah if you delay the black box construction that works, but then you have objects that need to be init()ed and baaarf
<egg|laptop|egg>
I think you just want a (possibly private/friend) constructor that takes existing black boxes, uses them, and default-constructs the rest
<egg|laptop|egg>
(alternatively something completely different that maintains a pool of black boxes in a centralized place but I do not have the necessary conteggst)
<whitequark>
then i need tags and baaaarf
<whitequark>
no centralized pools of any kind.
<egg|laptop|egg>
nah you don’t necessarily need tags (also tags aren’t that bad tbh, they can be nice to make constructors eggsplicit)
<egg|laptop|egg>
if you pass black boxes, that is a different constructor than the default
<whitequark>
tags are nominative so i have to come up with them and so on
<whitequark>
passing black boxes :/
<whitequark>
i *guess*
<whitequark>
i hate it but i hate all the other solutions more
* egg|laptop|egg
confused by the meaning of bureaucracy in that conteggst
<whitequark>
you have to put names in namespaces and manage them.
<whitequark>
names which have no other purpose than to be names.
<whitequark>
i hate that.
<whitequark>
if this was ocaml i could've used a polymorphic variant or something.
<egg|laptop|egg>
Stat rosa pristina nomine, nomina nuda tenemus
<whitequark>
egg|laptop|egg: hm, this doesn't work i htink
<egg|laptop|egg>
how so
<whitequark>
well it technically does but
<whitequark>
so i have a tree of modules (which can contain other modules) and some leaves are black boxes
<whitequark>
i can't just make a constructor that takes all modules as arguments
<whitequark>
it'd have to be all cells
<egg|laptop|egg>
cells?
<whitequark>
er, *all modules
<egg|laptop|egg>
right
<egg|laptop|egg>
A constructor that takes the thing itself by value (the caller moves)
<egg|laptop|egg>
and then every module has that, and the constructor just passes the modules down until you reach the black boxes, all other members get default-constructed
<egg|laptop|egg>
OK no that’s not legal
<egg|laptop|egg>
you could make a custom move constructor but move-that-destroys is evil so no, so I guess it has to be either tagged constructor or constructor that takes all direct member modules
<whitequark>
:s
<whitequark>
ok
<whitequark>
should it be more like `p_top new_top(old_top, reset{})` or `p_top new_top(reset{}, old_top)` or `p_top new_top(reset{old_top})`?
<whitequark>
actually i guess less `reset{}` and more `extract_black_boxes_from{}` or something like that