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> … one of the other grad students just compared me to nomal O_o | <ferram4> I shall beat my problems to death with an engineer.
<egg>
Fiora: "antiwasserverstopfenflussigkeit" :D
<egg>
e_14159: how would you actually say that thuogh
<egg>
s/uo/ou
<Qboid>
egg meant to say: e_14159: how would you actually say that though
icefire has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
<xShadowx>
so i know what the bends is, but how much does pressure need to change to cause it? ie can surface to vacuum (roughly 15 psi) cause it? thats just 30 ft of water, doesnt seem like thatd be deep enough
* xShadowx
should stop looking for ways to kill kerbals
<lamont>
yeah NASA has to worry about getting astronauts bent
<lamont>
i suspect that the effects will be largely constrainted to type I DCS, though so joint pain and such and not neuro symptoms
<xShadowx>
at that point, prolly self recovery?
<lamont>
we’re all basically doing a long saturation dive to 1 ata, and they don’t use 1 ata in space i don’t think, so even with explosive decompression to vacuum you’re getting fractions of an atm
<xShadowx>
!wa atmospheric pressure inside ISS
<Qboid>
xShadowx: Seems that Wolfram is unable to understand that.
<lamont>
and your fast tissues / blood / water-ey stuffs can handle i think a 2x oversaturation gradient
<lamont>
oh interesting, totally incorrect, its 14.7 so about 1 ata
<xShadowx>
google says iss is 14.7
<xShadowx>
ninja
<lamont>
yeah okay so they keep it higher to reduce the pure O2 risk
<lamont>
still you’ve got a 0.79 ppN2 and you’ll tolerate ambient pressure dropping to 0.40 ata quickly without getting bent
<lamont>
(bent in your fast tissues that lead to type 2)
<xShadowx>
so not worth caring about unless its underwater :|
<xShadowx>
and not enough ksp goes underwater for that to matter
<lamont>
type 1 isn’t really a problem underwater either
<xShadowx>
i mean the effect in general, less value to code it, unless people are gonna dive down into water / worthless to make it for space use
<lamont>
at worst it’ll onset at the 20 foot safety stop, and it hits the joints and is just painful, most of the time it only happens after the bubble shower after surfacing — 30 mins to 4 hours post dive or so
<xShadowx>
read priv, thats the list i been coding heh
<lamont>
has a “task” to research on “Potential Subclinical Neurologic Changes in Astronauts due to Repeated Hypobaric Exposures” and notes “This task will examine the efforts currently used by the military and diving communities to evaluate the long term effects of Type II DCS. Although NASA has had very few Type II incidents during ground tests and none in flight, we are entering a new season of space exploration and should consi
<lamont>
adding relevant tests to LSAH if applicable.”
<lamont>
so NASA has apparently had zero type 2 incidents in flight. the type 2 incidents on the ground were probably people who shunted due to a PFO or something and they likely washed out and never made it to space
<lamont>
there’s also the word “subclinical” there which indicates they’re probably more worried about accumulated damage that can’t be detected right after one low pressure episode
<lamont>
interesting the the pre-spacewalk protocol takes over 12 hours and that is all on 100% O2 breathing and a good chunk of it is at a reduced ambient pressure in the airlock.
<lamont>
there’s considerable debate in the diving community over if dropping the ambient pressure does anything or not once you’re on 100% O2
<lamont>
oh actually my bad, most of it is at 26.5%, so yes that makes sense, they only do two washouts with 100% O2
<xShadowx>
lamont: re radiation suggestion, kerbalism does a radiation sim, not to say i wont try to make such, just it exists :P
<UmbralRaptor>
So there's a post on the KSP forums about an eggsoplanet atmosphere. The relevant papers are behind Nature's paywall. Would I get in trouble for posting sci-hub links?
<bofh>
I can't fathom why you wpuld.
<lamont>
ah, figures someone out there had done that
<SnoopJeDi>
I can see the moderation team preferring to distance themselves from it, but I've never really been on the fora so
<SnoopJeDi>
UmbralRaptor, you checked Scholar already, right?
<SnoopJeDi>
long shot but sometimes it pans out
Wetmelon has quit [Ping timeout: 201 seconds]
<UmbralRaptor>
SnoopJeDi: No, but it's a pair of recent nature papers, so…
<SnoopJeDi>
fair
<UmbralRaptor>
(I think I found a preprint of one on ArXiv)
<kmath>
<chordbug> the real star of my twitter bio: this soft hyphen https://t.co/hZ9bJ6M2S4
<egg|work|egg>
!u ꟃ
<Qboid>
U+A7C3 (ꟃ)
<egg|work|egg>
!u vỽw
<Qboid>
U+0076 LATIN SMALL LETTER V (v)
<Qboid>
U+1EFD LATIN SMALL LETTER MIDDLE-WELSH V (ỽ)
<Qboid>
U+0077 LATIN SMALL LETTER W (w)
<egg|work|egg>
@#$%^@#$%
<Soozee>
Unknown command, try @list
<egg|work|egg>
ok, so I figured out what mastodon is doing
<egg|work|egg>
it's taking the second language from my language list, ignoring the fact that the first is en-GB
* egg|work|egg
stabs mastodon in the bad i18n
<egg|work|egg>
even if I put en-US in the list it ignores that
<egg|work|egg>
stabbity stabbity stab
<egg|work|egg>
they ignore all language preferences that say en
<egg|work|egg>
oookay, experimenting in chrome, which allows for "fr" and "en" settings without region subtags, it seems thath they don't match en to en-GB or en-US
<egg|work|egg>
(chrome on desktop that is, vs. mobile where it uses the system settings)
<egg|work|egg>
right, and on my phone the headers contain en-GB, fr-FR and fr, but no en
<egg|work|egg>
welp.
<Iskierka>
submit a fix?
<egg|work|egg>
!wpn bofh
* Qboid
gives bofh a progressive mechanism
<egg|work|egg>
!wpn Iskierka
* Qboid
gives Iskierka a Hitachi zygomorphism
egg|mobile|egg has quit [Ping timeout: 204 seconds]
egg|phone|egg has joined #kspacademia
egg|phone|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has joined #kspacademia
egg|cell|egg has joined #kspacademia
egg|cell|egg has quit [Client Quit]
egg|phone|egg has quit [Read error: Connection reset by peer]
Technicalfool has quit [Ping timeout: 186 seconds]
APlayer has quit [Ping timeout: 204 seconds]
<bofh>
egg|work|egg: ?
<bofh>
egg|work|egg: to answer your question from yesterday: 99.99999% certain yes that a+(b-a) can be > b with the right cancellation, but can't think of an example off the top of my head and am too lazy to construct one :P
<egg|work|egg>
bofh: huh
<bofh>
08:56 < egg|phone|egg> The Twitter but with synapsids thing <- this is prolly my fav description of Mastodon yet
<egg|work|egg>
bofh: credit goes to UmbralRaptor (who call them the diapsid website and the synapsid website) though
<bofh>
accurate
<egg|work|egg>
s/call/calls/ probably, unless UmbralRaptor is a dromaeosaur collective
<bofh>
LOL
<egg|work|egg>
bofh: still no reply on that numerics question :-\
<bofh>
egg|work|egg: give him time (it's a complicated one, like I actually have no clue what to do for (a) in the general case, in the special case of say pow(x,y) you mostly separate it into an exp(x)-like thing and a log(x)-like thing)
<bofh>
rofl, I think I'll call this technique "numerical separation of variables"
<bofh>
this brought to you by a terrible PDEs course I took ages ago.
<egg|work|egg>
bofh: yeah, it's mostly that I'm uselessly worrying about being bad at interacting with numerical cats on twitter :-p
<bofh>
egg|work|egg: so like if I haven't scared off stephen canon over the years somehow I guarantee you that you won't :p
<egg|work|egg>
Fiora: also why didn't you go with actual liquid in the belt tubes?
<egg|work|egg>
I guess sealing them might be tricky...
<bofh>
oh man too bad there's lightning or else I'd debate more dancing in rain while listening to russian folk-pop(?). yes I am a perfectly mature individual.
<bofh>
egg|work|egg: that sounds like a great way to have $LIQUID leak given cracks.
<egg|work|egg>
bofh: random thoughts of bromine ampoules are crossing my mind for some reason
<egg|work|egg>
but I don't think that would be a very good prop to wear on a belt somehow
<egg|work|egg>
bofh: kmath also has ;c if you like parentheses, but why bother when you can play with RPN :-p
<egg|work|egg>
also ;c looks like a strange smiley
<bofh>
whitequark: true, but for some reason it never occurred to me that: A) this would work on ABS, B) just binding bromine ions into the matrix is sufficient, no need to do any fancy co-polymerization with halogenated monomers
<bofh>
whitequark: in general I need more coffee today
<bofh>
egg|work|egg: rpn is faster :p
<bofh>
(okay replace that with "I need more coffee" (or at least caffeine), since I'm pretty sure that's a constant for me)
<egg|work|egg>
bofh: replace what?
Moistmelon has joined #kspacademia
<bofh>
s/today//
Wetmelon has quit [Ping timeout: 201 seconds]
<bofh>
heh, fail.
<Qboid>
bofh meant to say: whitequark: in general I need more coffee
<kmath>
<susanmvickers> Liquid oxygen is paramagnetic so it sticks to magnets. It's also -183 °C and light blue! (Gif credit anyone?)… https://t.co/UlGuH6LpkT
<bofh>
like I mean on the one hand, cool, paramagnetic liquids are neat. on the other hand, LOX.
<whitequark>
^
<whitequark>
also I read that as "parametric liquids"
<whitequark>
that would be p cool too
<whitequark>
regardless of their temperature that is
<SnoopJeDi>
liquid oxygen's paramagnetism is indeed frickin neato
<egg|work|egg>
whitequark: hm, what would parametric liquid entail eggsactly
ferram4 has joined #kspacademia
Technicalfool has quit [Read error: Connection reset by peer]
<SnoopJeDi>
APlayer, no, simulated annealing is a different strategy for choosing the direction you'll step in
<APlayer>
SnoopJeDi: I was linked "Descent Gradient" yesterday
<SnoopJeDi>
Right, gradient descent is a highly informed optimization technique: you know what direction "downhill" is
<SnoopJeDi>
annealing is much more random in terms of how you'd make that choice, and if you're clever about turning the "temperature" (step size) down the right way, you can more easily find global maxima sometimes
* SnoopJeDi
not doing a great job explaining
<APlayer>
What's the difference between gradient descent and hill climbing, then?
<SnoopJeDi>
I don't know what you mean by "hill climbing," but I think you're using two names for the same thing
<e_14159>
One goes up, one goes down :-)
<SnoopJeDi>
(maximizing a function is the same as minimizing another in optimization: we almost never discuss maximizing anything canonically)
<e_14159>
They're the same except for a minus.
<APlayer>
e_14159: Makes sense. In that case, Wikipedia's page on gradient descent is overly complicated.
<SnoopJeDi>
yea, going uphill as fast as possible is the mirror twin of going downhill as fast as possible
<SnoopJeDi>
heh, any wikipedia page for a mathematical concept is likely to be hot garbage
<APlayer>
Mostly, you can get the essence of it by skimming the right paragraphs.
<e_14159>
APlayer: s/gradient descent/everything
<SnoopJeDi>
You can get lost in the weeds very very easily if you don't keep the basic premise in mind
<Qboid>
e_14159 thinks APlayer meant to say: e_14159: Makes sense. In that case, Wikipedia's page on everything is overly complicated.
<APlayer>
Can't confirm.
<SnoopJeDi>
And the basic premise of this particular corner of optimization techniques is "From where I'm standing, that looks like the best direction to go"
<SnoopJeDi>
very often, what looks like the best direction where you're standing is a terrible direction!
<APlayer>
SnoopJeDi: Why not say "If I lay a ball down here, it will land at the point I am looking for." :P
<e_14159>
But that would introduce momentum :P
<SnoopJeDi>
APlayer, ask yourself why the ball would do that (hint: what direction does the force point?)
<SnoopJeDi>
also yea, introducing momentum into optimization techniques is...icky.
<SnoopJeDi>
but if you *really* wanna go there: distill.pub/2017/momentum/
<SnoopJeDi>
(no but really don't go there that's for e_14159 et al.'s sake)
<egg|nomz|egg>
e_14159: SnoopJeDi: in this case the problem is 1d, so it's vastly nicer though
<APlayer>
Dammit, didn't account for momentum
<SnoopJeDi>
APlayer, momentum is a distraction
<SnoopJeDi>
Your intuition is telling you something useful about descent
<APlayer>
But I see how you could implement, say, simulated annealing with a limit on how fast you can switch the directions of your jumps.
<SnoopJeDi>
If you place a ball on a "hill", what direction does the net force point?
<e_14159>
Momentum is a technique that's applied to gradient descent to avoid getting stuck in saddle points; it really isn't necessary for the concept.
<egg|nomz|egg>
e_14159: especially in 1d :-p
egg|nomz|egg is now known as egg
<e_14159>
egg: Details, details.
<egg>
life is simple in one dimension
<e_14159>
Life is awesome in > 1 000 000 dimensions :P
<SnoopJeDi>
the punchline to the question about the force: F = -∇U
<APlayer>
Okay, let's say I implement gradient descent to find the next closest approach. I need a function, though. One that represents the distance between the two objects at time t. And how does that work?
<APlayer>
Please don't tell me I need RK4 or something for that
<egg>
well if it's just 1-body gravitation you do that the usual way by solving Kepler's equation?
<APlayer>
"The usual way". I am not used to calculating distances between two objects in orbit. :P
<egg>
you have your Keplerian elements, compute the mean anomaly at time t, convert to Cartesian (solving Kepler's equation with your favourite root finder), that gives you the position of one vessel at time t
<egg>
do that with the other vessel, subtract, take the norm, that's the distance
<APlayer>
Ah, well, converting to cartesian makes sense too.
<APlayer>
Is there a paper on catersian -> keplerian and vice versa that is relatively easy to understand? I found a bunch myself last time I looked, but they used stuff that was too complicated for me. I mean, such a small piece of maths can't be this hard.
<SnoopJeDi>
right, closest approach is concisely: "I have a function F that tells me the distance at closest approach and that function has so-and-so parameter(s), I wanna mimize it"
<APlayer>
Could I simplify this by first converting the orbit into altitude and angle (r and anomaly) and incorporate inclination somehow, i.e. through some sort of polar 3D graph, and thus easily convert from Keplerian to Cartesian coordinates?
icefire has joined #kspacademia
<SnoopJeDi>
I don't understand what you mean by "polar 3D graph"
<APlayer>
A polar graph (R, Theta) that somehow implements a third dimension
<SnoopJeDi>
so, any trajectory is uniquely specified in *either* coordinate system
<egg>
also mean anomaly is not meaningfully an angle
<egg>
the angle from the central mass is true anomaly
<egg>
getting true from mean typically goes through eccentric, and involves solving Kepler's equation
<egg>
it's in the pdf I linked you, and in the pages SnoopJeDi linked you
<APlayer>
Yeah, I recall that from a previous heavy orbital mechanics session
<SnoopJeDi>
it's quite common to do all your celestial mechanics business in convenient coordinates (Kepler)
<SnoopJeDi>
and then do the appropriate transformation to Cartesian if you wanted to plot it the way I *think* you're describing
<SnoopJeDi>
(i.e. to plot the trajectory through physical space)
<SnoopJeDi>
nothing too magical in all of that though
<APlayer>
I am describing something that involves r, theta and /something/ to plot things in 3D. Unlike the normal x, y, z cartesian vectors.
<SnoopJeDi>
they describe exactly the same thing
<APlayer>
Yes, but from r, /theta/ and probably a second angle, you can get x, y, z much faster than going through Kepler's equation.
<SnoopJeDi>
I have no idea what that's supposed to mean
<SnoopJeDi>
A point is a point, the coordinates you use to talk about it don't change what point it is
<APlayer>
And you could probably (I think?) get that r, /theta/, /second angle/ thing equally fast from Keplerian elements?
<APlayer>
I am trying to find a shortcut to get this point
<SnoopJeDi>
I encourage you to read the very nice text I just linked you
<SnoopJeDi>
Because I think what you're trying to do is ad-hoc re-invent orbital elements
<SnoopJeDi>
(which aren't super helpful for plotting but are *great* for calculation)
<APlayer>
Not quite
<APlayer>
I am trying to ad-hoc reinvent a system for plotting from orbital elements.
<egg>
what you are reinventing is true anomaly
<egg>
which is part of the way to turn Keplerian elements (with mean anomaly or somesuch) into Cartesian elements
<APlayer>
Not quite that again
<egg>
(or rather you're reinventing something weirder than true anomaly since you apparently want spherical coordinates)
<APlayer>
Imagine the same problem in 2 D.
<egg>
yes the problem *IS* bidimensional
<egg>
in the orbital plane
<APlayer>
Rather than go through this complicated routine, I can pretty directly get my current altitude
<APlayer>
And also directly my angle theta, which is the true anomaly
<egg>
no you cannot, you need a complicated routine to get it
<egg>
that's the thing we are trying to tell us
<egg>
and the polar coordinates in the orbital plane *are* the true anomaly and the distance from the centre
<APlayer>
IIRC there was a function that could get you r from the eccentricity, SMA and true anomaly?
<APlayer>
Directly get it, that is. Without solving Kepler's equation
<egg>
but *you need to get true anomaly*
<egg>
that's the whole point of Kepler's equation
<egg>
you don't have true anomaly as a function of time
<APlayer>
Isn't that one of the Keplerian elements? :O
<egg>
once you have it it's trivial trig
<egg>
APlayer: what you have is *mean* anomaly, which evolves linearly with time
<APlayer>
Woops, then
<egg>
please read the things we link you to
<APlayer>
I am familiar with the three kinds of anomaly
<APlayer>
I really just mixed up which was one of the Keplerian elements
<egg>
the name matters not
<egg>
if you understand what it is, you understand that true anomaly as a function of time is hard
<APlayer>
Yes
<egg>
and the thing you have is time
<APlayer>
Too, yes.
<egg>
so you need to get true anomaly from time, which is hard (because it's Kepler's equation)
<egg>
(by hard I mean not analytic, it's not hard to plug it into a root finder fundamentally)
<APlayer>
IIRC Eulers Method did it very well
<egg>
wat
<egg>
you got the wrong mathematician's name probably
<egg>
bofh: yeah, but then I know exactly how fast it goes since that just depends no the interval, which is known statically :-p
<egg>
lamont: I don't know tbh, they have a lot of bodies, I'd be quite worried about accuracy too, since we have trouble with Phobos and Deimos already
<egg>
Phobos dephases wrt ephemerides fairly quickly (the rest is fine)
<egg>
we'd need more harmonics on Mars
<soundnfury>
egg: does that make you panic?
<bofh>
isn't Phobos in a *fairly* unstable orbit?
<soundnfury>
bofh: ISTR it's only about 50Ma from rocheing into a ring
<egg>
bofh: it's fairly affected by harmonics at least :-p
<soundnfury>
(but that's not what you asked ofc)
<bofh>
soundnfury: huh, that's not long.
<lamont>
does principia take any shortcuts such as ignoring the effects of, IDK, pluto on mercury, or is it really strictly N-body and scales like N^2?
<egg>
lamont: strictly N-body, because we convinced ourselves that ignoring interactions is way trickier than it sounds
<kmath>
<Alex_Parker> Anybody know of any important ducks in creation myths? Asking for a lumpy space friend.
<UmbralRaptor>
lamont: does ignoring spacecraft count?
<egg>
well yeah we ignore spacecraft
<e_14159>
"A lumpy space friend"? 4942?
<egg>
but that's easy, it means they have vanishing mass; it's hard to start ignoring things and stay internally consistent (something something the perturbation term in Encke's method not being what one might think something)
<lamont>
yeah, i was wondering how you would have decided where to make the cut
<UmbralRaptor>
e_14159: 2014 MU69 may look like 67/P Churyumaov-Gerasimenko. But be 5x larger.
<egg>
lamont: it's more that making the cut has insidious side effects
<lamont>
sure
<egg>
lamont: so we were looking at it for vessels and found out the following
<egg>
if you're orbiting Earth, and ignore the effect of *whatever*
<egg>
then you have to integrate in the geocentric frame, otherwise you'll screwed by the attraction of earth to *whatever*
<egg>
but then that means you leave the nice inertial barycentric frame
<egg>
it might be possible to optimize by lumping moons into oblate megajupiters, but other than that it's really hard to get something that works
<egg>
UmbralRaptor: oblate megasun!
<egg>
bofh: what APlayer said they used was fixed point, not newton
<egg>
bofh: also, German Wikipedia *really* likes putting names everywhere, "beruht auf dem banachschen Fixpunktsatz"
<APlayer>
The one where you did result += stuff(result)
<egg>
well they all do that, they're iterative methods
<APlayer>
Uh
<egg>
not the Taylor expansion, but the Newton method to find that root would be iterative too
<APlayer>
Well, let me find what eggsactly I did
<egg>
APlayer: nah, I see what you linked, it's clear enough
<bofh>
egg: rofl -satz is best suffix.
<APlayer>
I may have linked the wrong thing
* egg
mildly confused as to how much bofh speaks german
<lamont>
ah so gravity tends to transitively infect everything
<APlayer>
I just remember result += stuff(result), what exactly stuff() was could be different from what I linked
<bofh>
egg: not, I just used to do (still do somewhat) a ton of convex optimization
<bofh>
so stuff like nullstellensatz and whatnot were commonly-encountered terms.
<egg>
bofh: wait, you don't speak german? but you seemed to be making some sense of those Encke books I linked
* egg
greatly confused
<egg>
lamont: yeah afaict
<egg>
lamont: there may be a smart solution, but I haven't found any
<bofh>
egg: I can skim technical German by comparison to English, a limited vocab and google translate.
<lamont>
well you could treat some smaller bodies like ships
<bofh>
like technical $LANG, especially mathematical $LANG is much easier to parse than $LANG in general.
<egg>
lamont: hm, so not affecting other bodies, but affecting ships? but then you get the same issue but backwards
<lamont>
oh right, derp
<egg>
lamont: and on the other hand if you give them no gravity at all things get silly near them
<egg>
bofh: true
BPlayer has joined #kspacademia
<lamont>
can’t orbit the ISS, so couldn’t orbit that body either
APlayer has quit [Ping timeout: 383 seconds]
<egg>
bofh: especially if it's one of those papers where there are virtually no words :-p
<lamont>
has to pull on the ship, so transitively has to be pulled on by everything that pulls on the ship and has to pull on everything that pulls on it. truly infectious.
<lamont>
bloody gravity, always ruining things
<bofh>
egg: yep :P
<egg>
bofh: any idea on the question we're discussing with lamont (trying to ignore small bodies)
<BPlayer>
egg: I can't find it, must have deleted it since then...
<lamont>
you should probably update your wiki with that, its a much stronger proof that you can’t use ephemerides to simplify principia’s calculations for seemingly irrelevant bodies
<BPlayer>
But what I don't get is why Principia simulates gravity for planets themselves. IMO that only creates problems with incompatible solar systems.
<bofh>
egg: sec, let me read thru backlog
ferram4 has quit [Read error: Connection reset by peer]
<BPlayer>
Couldn't you just leave planets be and on rails, and only simulate gravity for vessels?
ferram4 has joined #kspacademia
<lamont>
nope, because if jupiter pulls on a spaceship then jupiter has to pull on the earth
<BPlayer>
But what for?
<lamont>
otherwise the spaceship moves wrong with respect to the earth
<BPlayer>
Humm, yes...
<BPlayer>
Have you tried it, or how do you know that?
<lamont>
egg: lamont: so we were looking at it for vessels and found out the following
<BPlayer>
I mean, that's not immediately obvious, how did you find that out when creating Principia?
<lamont>
[12:41pm] egg: if you're orbiting Earth, and ignore the effect of *whatever*
<lamont>
[12:42pm] egg: then you have to integrate in the geocentric frame, otherwise you'll screwed by the attraction of earth to *whatever*
<BPlayer>
I need to go for today... See you!
<UmbralRaptor>
"on rails" could mean that you could get Mercury's orbit more accurate than Principia!
<UmbralRaptor>
Dear Professor,
<UmbralRaptor>
<UmbralRaptor>
I would like to give you an evaluation copy of the following digital textbook for your consideration.
<UmbralRaptor>
…
<UmbralRaptor>
???
BPlayer has quit [Ping timeout: 383 seconds]
<egg>
UmbralRaptor: or we could add GR :-p
<egg>
!wpn UmbralRaptor
* Qboid
gives UmbralRaptor an alternating foil
<egg>
!wpn lamont
* Qboid
gives lamont a symmetric torch
<lamont>
the pricipia extended universe could include realistic rotating black holes
<UmbralRaptor>
!wpn -add:adj Christoffel
<Qboid>
UmbralRaptor: Adjective added!
<UmbralRaptor>
!wpn -add:wpn symbol
<Qboid>
UmbralRaptor: Weapon already added!
<UmbralRaptor>
egg, lamont: hah!
<SnoopJeDi>
!wpn egg
* Qboid
gives egg a radio isomorphism
<UmbralRaptor>
!wpn SnoopJeDi
* Qboid
gives SnoopJeDi a holographic squirrel
<egg>
UmbralRaptor: lamont: but as I told bofh, I'd need to make another mod called Feldgleichungen
<kmath>
<johnregehr> this is pretty important: Laz's ear got stuck inside out while he was self-cleaning https://t.co/4oLEhJIywL
TonyC2 has quit [Ping timeout: 200 seconds]
<egg>
bofh: hm, I had never looked at the effect of the calling convention setting in MSVC https://godbolt.org/g/BPCPF5 Ꙩ_ꙩ
<egg>
(although it seems to have made the vector one worse, now it has three scalar multiplications instead of a packed and a scalar?)
<egg>
cc Fiora, whitequark
<egg>
aaaargh the link strips the FEFF at the beginning so it doesn't compile with MSVC
<egg>
no problem that can't be solved by putting *two* BOMs though: https://goo.gl/Qn8HBs
<Fiora>
omg
<Fiora>
so that's what happened
<Fiora>
why does the msvc one only have one function
<Fiora>
oh they're ordered differently
<egg>
yeah, MSVC does what it wants when it comes to ordering things :-p
<egg>
Fiora: yeah some intermediate code must decode the string, see the BOM, say "ah it's a BOM, I'll stuff it in the trash"
<egg>
but of course if you give it another BOM it's all fine :-p
<egg>
Fiora: note that in addition to setting __vectorcall by default I added GS- in that example, otherwise the compiler decides to add a bunch of checks
<bofh>
egg: yeah, GS is the equivalent of -fstack-protector-all + some more hardening.
<egg>
bofh: Fiora: any thoughts on the three versions of the vector*scalar multiplication?
<bofh>
sec, reading.
<bofh>
also fuck everything about the hellscape that is Win32 string processing functions and BOMs and the wonderful function IsStringUnicode()
<egg>
bofh: yeah; you can mostly get by in daily life by prefixing any string that's not ASCII with u8 now though :-p
<bofh>
And working in Codepage 65001 *mostly* works now too.
<egg>
yeah, my cmd is well-behaved in that respect
<egg>
I think my powershell is more capricious but meh
<bofh>
what on *earth*, why is it generating 3x mulsd instead of a mulpd + movsd there?
<bofh>
brb, Agner Fog
<egg>
bofh: well because the calling convention puts the args in those registers I'd guess?
<egg>
bofh: also I did the goto-into-nested-loop thing again (for the same reason, I made a trajectory plotting algorithm that has an adaptive stepsize :D)
<bofh>
oh, are those registers callee-save?
<bofh>
no wait, no they're not, only xmm6/xmm7/onwards are callee-save in Win64 callconv, xmm0-xmm5 are all caller-save
<bofh>
also lol adding -march=native or even -march=core2 generates lovely asm in the clang case.
<bofh>
ohhh I see. I guess it assumes scalars in independent registers instead of something contiguous on the stack
<egg>
yeah
<egg>
which is what allows it to have a faster scalar*scalar (the struct is in a reg)
<bofh>
overall I can't imagine much of a difference overall in this case, even on the microbenchmark mul is only a few more (one on HSW if I'm reading this correctly) cycles than the unpack, and the memory move is slow.
<bofh>
but not dramatically so
<bofh>
overall, meh? I generally bias against fiddling with calling conventions whenever possible, but that may be habit/paranoia.
<bofh>
yeah the next one kinda makes the joke obvious
Wetmelon has joined #kspacademia
<bofh>
egg: admittedly, innerproduct (or scalarproduct as I call it in the context of asm implementations, blame ffmpeg) is a fairly easy autovectorization case.
<egg>
bofh: ah but it's all scalar ops in both cases :-p
<bofh>
Oh, that's why you do it over an array :P
<bofh>
you're getting scalar ops because it's being done on scalars :P
<egg>
it's just that it's register only here
<bofh>
also oh hey it's the Wedge product
<egg>
and clang is back playing with shuf?
<bofh>
clang loves shufps/shufpd. In fairness, they're *great* opcodes.
<egg>
though less so than when whitequark found that pathological example
<egg>
bofh: yes but I want to read them as [ʃuf]
<bofh>
oh man so there was once this hilarious pathological example I found with clang's basic block autovectorizer that uh
<Fiora>
bofh: a common autovectorizer problem (see ps4 clang for a good i.e. horrifying example) is trying so hard to vectorize that you spend more time putting things in and out of the vectors than actually doing real work
<bofh>
let's just say that if you ran it through a permutation minimizer (no idea what the problem is called, but I'm pretty sure it's equivalent to min Circuit-SAT), it would be very good.
Moistmelon has joined #kspacademia
<bofh>
Yep, sadly familiar. It's one of the reasons why ffmpeg still uses -fno-tree-vectorize in its CFLAGS.
<Fiora>
PC llvm is much, muchl ess bad
<Fiora>
sony presumably jacked up the autovectorizer thresholds way too high
<bofh>
the other one being autovectorization of loops that are like
<bofh>
1 to n but in practise n is usually, like, 5
<bofh>
and these wind up getting not just vectorized but also unrolled and this leads to "hilarity", by which I mean pointless icache pressure.
<Fiora>
imo a classic problem in compiler optimization that I still see going on (as an llvm dev) is a focus on fairly tight benchmarks like SPEC that benefit enormously when you find The Important Code and Make It Faster
<Fiora>
so it's worth blowing 3x the icache to have higher odds of finding the good code
<Fiora>
but in say, chromium, you probably don't want to do that
<egg>
what about profile-guided optimization?
Wetmelon has quit [Ping timeout: 201 seconds]
<Fiora>
but because so much of the optimization is based on such benchmarks...
<Fiora>
PGO is evil. mainly because it's a cop-out. you can PGO the benchmark, guaranteeing you'll get everything right, and then fail miserably on real-world apps which nobody PGOs.
<Fiora>
i.e. you want to be very careful not to rely too much on PGO to save you from yourself.
<egg>
right, but what if your benchmark is from actual usage data
<bofh>
Also if you're building binaries that target many different cpu uarches, I can imagine PGO gets "fun" in that case.
<Fiora>
what does that mean, egg?
<Fiora>
like, what form does that take?
<bofh>
(The usual pathological case I'm thinking of involves someone (*cough*glibc*cough*, tho that was memcpy()) optimizing specifically for Atom at the expense of like, everything else)
<egg>
well in Principia we have journalling at the interface with the C#, so before releasing I play for a while ("normally") and PGO is done on the replay
<Fiora>
PGO is pretty much unusable for extremely large apps because there's no practical way to exercise every code path
<Fiora>
especially things like browsers or kernels
<Fiora>
and you need to be able to exercise it *automatically* on the build server
<bofh>
...that seems like a nonstarter for anything requiring user input to exercise a lot of the codepaths.
<bofh>
like a browser.
<Fiora>
eah.
<Fiora>
*yeah
<Fiora>
and like, if you screw up, you end up with random important paths being marked hyper-cold.
<Fiora>
and those get -Oz.
<bofh>
Is -Oz different from -O0?
<Fiora>
Entirely different
<Fiora>
-Os is optimize for size
<Fiora>
-Oz is optimize for size, even if it means fairly significant perf loss
<Fiora>
i.e. emit divisions instead of mul by constant if it's smaller
<Fiora>
and so on
<bofh>
Ahh, haven't heard of the latter. Prolly b/c very specific use cases.
<Fiora>
The compiler does it on its own.
<Fiora>
PGO is all about which things you optimize for size and how badly.
<bofh>
Apparently in some cases it can be optimized very very strongly for size, given how ungodly slow an actual div would be in those cases.
<egg>
MSVC doesn't seem to have such a distinction? it has Os vs. Ot for size vs. speed and Oi for inlining
<Fiora>
yeah, but that's MSVC
<Fiora>
MSVC is its own world
<bofh>
^
<Fiora>
there's "sane compilers that people actually use" and "MSVC"
<egg>
well it's what I use mostly :-p
<bofh>
my condolences
<Fiora>
and for bonus points, MSVC is dead
<Fiora>
and microsoft is actively working on replacing it with LLVM
<Fiora>
SO
<bofh>
wait really???
<egg>
(well not at work, but for Principia)
<Fiora>
they've also switched to LLVM from their HLSL compiler backend
<egg>
bofh: yeah you are getting clang too in Visual Studio these days, though it doesn't always work yet iirc
<bofh>
Huh, did not know that. Thought it was still CL.EXE or w/e it was called.
<egg>
yeah, that's still there, and that's what I use
<Fiora>
Their compiler consists of "C1" and "C2"
<egg>
but you also get clang now
<Fiora>
C1 is the frontend/midend (iirc)
<Fiora>
and C2 is the backend/codegen
<bofh>
egg: again, my condolences
<Fiora>
they've now added Clang to replace C1 (but C1 is iirc still available)
<Fiora>
so I don't think it's ~officially~ dead but i can't imagine they'll want to be maintaining such an ancient, half-broken codebase in 5 years
<Fiora>
oh right and it uses clang when compiling on all platforms other than windows (e.g. to compile for android)