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.
<kmath>
<eggleroy> @bofh453 Note: a previous version of this tweet contained improper conjugation and unidiomatic sumerogram use, as p… https://t.co/xeoqGPcfnL
<bofh>
+ the radial part of the Hydrogen Atom wavefunctions is an expansion in terms of Laguerre Polynomials.
<bofh>
whereas the standard Hermite basis is the one you'd use when approximating things as Quantum Harmonic Oscillators.
<WitchingRaptor>
Ah
<bofh>
Which, amusingly, is magnificent as there are ludicrously many problems that can be approximated well via superposition of interacting quantum harmonic oscillators.
<bofh>
But the Lyman/Balmer series isn't one of them and moreover Laguerre Polynomials cannot be nively written in terms of Hermite Polynomials (they're different special cases of 1F1(a;n;x))
<bofh>
:P
<WitchingRaptor>
Special cases of special functions?
* egg|cell|egg
pokes sleep with a stick
<bofh>
1F1(n;a;x) actually
<bofh>
also yes, most special functions are special cases of the Confluent Hypergeometric Function.
<WitchingRaptor>
egg|cell|egg: sleep is fake, actually
* WitchingRaptor
does not understand the hypergeometric function. =\
<bofh>
it's a particular class of series solutions to a corresponding large class of second-order ODEs with a stationary point, basically.
<bofh>
sorry, two stationary points, one of them irregular.
<bofh>
this is for the confluent one. the full one (2F1(a;b;c;x) has three regular singularities/stationary points)
<UmbralRaptor>
Well, batch TV calculation works. Badly, but it works.
<kmath>
<Newpa_Hasai> Radial velocities can (poorly) be done en-mass! Also, I'm blaming @eggleroy for at least 2 features of this graph. https://t.co/xnLpqoCQ18
<kmath>
<ObservatoryCats> Hi! I have a very small, round, and spiky cat. This is him climbing a mountain to reach the peak for a night's obs… https://t.co/vM5dugPkic
ferram4 has quit [Ping timeout: 383 seconds]
<egg|zzz|egg>
!wpn rqou
* Qboid
gives rqou a gadolinium backwards-compatible pig
egg|cell|egg has quit [Read error: Connection reset by peer]
egg|phone|egg has quit [Ping timeout: 198 seconds]
<egg>
ETCSL?
<egg>
!acr -add:ETCSL Electronic Text Corpus of Sumerian Literature
<Qboid>
egg: I added the explanation for this acronym.
<APlayer>
egg: Are such obscure acronyms really worth adding? ;-)
<APlayer>
I think if you added a counter to see how many times a given acronym is queried via Qboid, about 50% of them would be at 0
<egg>
how is that a problem
<APlayer>
It is not a problem, it just seems weird
<APlayer>
Unnecessary, rather
<APlayer>
Also, I still have some sort of "optimization trauma" because I began programming first on a TI calculator with 150 kB of flash. So I tend to cut databases and such as much as possible
egg is now known as egg|tea|egg
<egg|tea|egg>
!wpn bofh
* Qboid
gives bofh a Green's comma
<egg|tea|egg>
!wpn UmbralRaptor
* Qboid
gives UmbralRaptor a charm terminal with an anticommutator attachment
<egg|tea|egg>
UmbralRaptor: okay I give up on trying to say anything resembling radial velocity in akkadian or sumerian
<egg|tea|egg>
!wpn rqou
* Qboid
gives rqou a cesium parsnip
<UmbralRaptor>
egg|tea|egg: D:
<egg|tea|egg>
UmbralRaptor: try asking Zethar (possibly via the intercession of bofh?) but I can't conjugate or decline akkadian to save my life, so unless I'm saying something that I can directly check against a tablet I'm screwed
<egg|tea|egg>
(e.g. praising dagon was actually fairly easy to check, I found something that praised marduk and substituted)
<UmbralRaptor>
hrn
<egg|tea|egg>
... is that some proto-semitic root
<egg|tea|egg>
aaaaaah I have found some ugaritic texts that are commented with "the worrds hrn and 'sbt have not been satisfactorily explained"
<bofh>
LOL
<bofh>
But iirc Ugaritic is still another mess, is it not?
<egg|tea|egg>
yes, and though at least it's not part of the sumero-akkadian unification in unicode, it has its own codepoints
<egg|tea|egg>
or something like that, I'm not very good at this
<egg|tea|egg>
maybe add Hans/Hant as a first stage?
<bofh>
well according to Wikipedia, Ugaritic script is unrelated to Sumero-Akkadian cunriform despite also being pressed into clay. That being said, [[Citation Needed]].
<kmath>
<Alex_Parker> My countertop burr grinder needs repair and I don’t have the patience for operating my manual coffee grinder by han… https://t.co/46FGjr3LyK
<egg>
ah wait but no the others are passed by copy
<Fiora>
um
<Fiora>
they're just numbers
<egg>
yeah nevermind
<Fiora>
I wrote it in LLVM IR anyways, this is just a C port
<Fiora>
I just mean neither major compiler has global reassociation, only straight-line
<egg>
(also I had to stare at it for a while before I remembered that this isn't floating-point arithmetic so it *is* safe to apply commutativity and associativity (modulo overflows) :-p)
<Fiora>
I mean, I mainlyw rote it for float.
<egg>
*screams*
<bofh>
egg: so IEEE754 multiplies *are* commutative.
<egg>
yes
<egg>
but associative they are not
<bofh>
(implementations, OTOH...)
<Fiora>
They're associative if you want them to be.
<Fiora>
i mean, that's why we run the reassociate pass twice
* egg
confused by the statement "<Fiora> They're associative if you want them to be."
<Fiora>
fast-math
<Fiora>
now it's associative!
<egg>
ah, they're not but you can pretend they are :_p
<Fiora>
they're totally associative! I never said it gave exactly the same result
<Fiora>
: P
<egg>
-ffast-math -fdamn-the-torpedoes
<egg>
Fiora: unrelated silliness, icymi while you were away, I plotted the distribution of cats along my street https://i.imgur.com/pg176y4.png (graduated in metres)
<egg>
UmbralRaptor pointed out that there appeared to be two distinct population, so we called them type I and type II cats \o/
<egg>
the type II cats are the ones furthest from me
<egg>
Fiora: conclusion: you're a type II cat
<egg>
(unless you happen to come within 300 m of here I guess)
<Fiora>
and so it wasn't surprising when, after I wrote the opt, the test harness said it was a global 1% gain
<bofh>
heck, constructs like that are so common even I've spotted them before, and I rarely encounter shaders.
<Fiora>
also the CPU folks are probably really bitter about how i can write a single patch to get 1% global gains
<Fiora>
given that they get paid to get ~2% a year on SPEC
<Fiora>
total, over their whole team's work
<Fiora>
also i do wonder if my algorithm is anywhere near optimal, it feels like a terrible hack though i suspect the optimal is (AS ALWAYS) NP
<bofh>
Well apparently shuffle lowering is NP-hard and this feels like something similar maybe? [I totally am making this statement with no citations for it, I have no idea].
<bofh>
Heh.
<Fiora>
I mean even subproblems of -simple- reassociation are NP-complete
<Fiora>
e.g. the shortest multiply chain for a series of multiplies?
<Fiora>
that's NP
<bofh>
Wait, *really*?!?
<bofh>
Fucking hell.
<Fiora>
lemme grab the comment it's good
<Fiora>
// Otherwise, grab a spare node from the original expression and use that as
<Fiora>
// the left-hand side. If there are no nodes left then the optimizers made
<Fiora>
// an expression with more nodes than the original! This usually means that
<Fiora>
// they did something stupid but it might mean that the problem was just too
<Fiora>
// hard (finding the mimimal number of multiplications needed to realize a
<Fiora>
// multiplication expression is NP-complete). Whatever the reason, smart or
<Fiora>
// stupid, create a new node if there are none left.
<bofh>
ROFL
<Fiora>
But anyways the alg works like this:
<Fiora>
1. Do normal reassociation. Each time you visit a linear chain, store (overwriting) the list of operands associated with a leaf node.
<egg>
I'm kind of confused as to how one gets (4*x)*a + (4*y)*a + (4*z)*a, it seems that if written as-is it's obviously simplifiable (even for readability), if wrapped in functions (4*v*a).Norm1WaitNoNotQuite() maybe?
<Fiora>
2. When you reach the end, count up all pairs of operands in linear chains. This means doing O(N^2) pairwise counts on 1), and then just the rest of the instructions that aren't part of linear chains.
<Fiora>
3. Do reassociate again, but when you get to emitting a linear chain, which looks like this: (((a*b)*c)*d)*e, find the pairwise operation which has the most duplicates throughout the program and make it the middle one (the a*b).
<Fiora>
4. That's basically it. Maybe I should have it CSE or something, or make it scoped so that it doesn't count duplicates from other parts of the function.
<Fiora>
egg: trivial. normalize(4*vec4*a)
<Fiora>
4a. (CSE is run after this so the duplicates get cleaned up, but maybe cleaning them up along the way would result in nicer results)
<egg>
right, via functions on vectors. makes sense
<Fiora>
egg: or just in general doing the same op to different values!
<Fiora>
Like, that feels fairly common to me in any mathematical expression
<Fiora>
in a large, generalized series of mathematical expressions I would expect it would be outright *difficult* to *not* have examples of that
<Fiora>
another example: x^3 + a * x * y^2 + b * x^2 * y + c * y^3
<egg>
(at least if they involve a division)
<Fiora>
that might be a familiar construct,
<egg>
hmm, is there some hornery thing that can be done to a polynomial in two variables
<Fiora>
plus. this is graphics code. graphics people aren't hyperoptimizing every recursively defined subexpression with functions and so on
<egg>
homogeneous even
<Fiora>
At least generally not :P
<Fiora>
especially when shaders vary a lot between instantiations
<Fiora>
due to #defines, ubershaders, etc
<Fiora>
plus there's also commonalities between expressions taken in different branches of the function
<Fiora>
though if they're too far apart we might not optimize them anyways in our compiler since we'd need to use GVN-Hoist for that
<egg>
yeah, I guess I have a strange background; SnoopJeDi mentioned being weirded out by some code Horner-evaluating a polynomial, whereas I tend to scream whenever I see it written in monomials
<Fiora>
like keep in mind mathy shader code often has hundreds of expressions
<Fiora>
i regularly work on shaders with 5000 instructions
<bofh>
egg: yeah I actually find polynomials *not* Horner-evaluated hard to read and weird.
<Fiora>
and the actual source code has at least 57 #defines in it
<Fiora>
or things morally equivallent to #defines
<egg>
bofh: huh, I don't think I'd go that far
<egg>
bofh: at least in a language that has a power operator, if you have to write the multiplications it explicitly looks like shit, true
<egg>
bofh: what about Casteljau-evaluated polynomials,
<bofh>
I actually rewrote some Bezier mesh splits in my local copy of mupdf from doing 3 levels of recursive Casteljau to just using the closed-form splitting sol'n for a cubic Bezier.
<bofh>
That was ""fun"".
<bofh>
(it paid off when rendering type 6/7 meshes a lot)
<kmath>
<sigfig> was there ever a time when it was actually easier to learn a field of math from introductory texts rather than from current research
<egg>
bofh: so recently we were replaying on windows a principia journal recorded on a mac, and we realized where the source of cross-platform floating-point discrepancy was (it's not fma contraction because we don't limit ourselves to an instruction set that has it, it's not ffast-math because we don't do that)
<egg>
bofh: libm :-p
<egg>
silly transcendental functions
<bofh>
yaaaaaaey.
<egg>
bofh: turns out the actual bug in that journal was reproducible once disabling the exact-replay checks
<egg>
but it's good to know why this differs at least :-p
APlayer has quit [Remote host closed the connection]
APlayer has joined #kspacademia
<egg>
bofh: I guess I could use libmcr :-p
<egg>
Fiora: thanks for pointing me to that btw, I'm still kind of stunned that this actually exists
<soundnfury>
(I mean, Niederegger sure ain't it. I love me some bitter dark chocolate, but a _bit_ of sugar would help)
<bofh>
(there's plenty of that in the, erm, marzipan part IME...)
<soundnfury>
(not in Niederegger. Their marzipan is bitter too, somehow.)
<soundnfury>
(I'm not saying it's _bad_, it's just... not nearly as nice as Ritter)
<egg>
bofh: okay so what's happening is *somehow* it decided that this was looking like german (in the middle of a french sentence), and then the german input method allows you to concatenate words at will without lifting the finger (this part is WAI really)
<bofh>
21:43 <@Iskierka> but "net neutrality isn't necessary because the markets will sort it out" tho
<bofh>
I can tell this person doesn't have to use the hell that is Comcast, b/c nobody on Comcast would say that. I hope.
<Iskierka>
clearly not as I was using comcast as the #1 example of the company that would just go "LOL fuck our competition pay us $400 if you want to access any of it for the next two days"
<SnoopJeDi>
Said he spoke to Asimov a few times bc he knew one of his higher-ups
<bofh>
SnoopJeDi: NICE. GODDAMN.
<SnoopJeDi>
wedding was awesome besides, but jeez...the interthreaduality of middle life is nuts
<egg>
bofh: is there an emoji for "I have no orthogonal basis and I must project"
<bofh>
sec, let me check math extended-B
<SnoopJeDi>
➕?➡?
<bofh>
U+29E4 clearly should be it :P
<bofh>
also the fuck is this shit
<bofh>
!u ⫡
<Qboid>
U+2AE1 PERPENDICULAR WITH S (⫡)
<bofh>
SnoopJeDi: "Mars lost its global magnetic field billions of years ago and now just has remnant “fossil” magnetic fields embedded in certain regions of its surface."
<bofh>
so literally giant magnetized chunks of Fe2O3 or shit.
<Ellied>
agh, why are emojis showing up as negative grayscale android blobs now
<Ellied>
the noto emoji font is a fickle beastie
<egg>
!u U+29E4
<Qboid>
U+29E4 EQUALS SIGN AND SLANTED PARALLEL WITH TILDE ABOVE (⧤)
<Ellied>
UmbralRaptor/SnoopJeDi: do either of you use TACs/TDCs at all? that is, things what tell you how much time elapsed between two electrical pulses?
<UmbralRaptor>
Effectively no. (Closest I did was some pulse timing settings on oscopes on undergrad)
<UmbralRaptor>
Poke bofh?
<egg>
or whitequark?
egg is now known as egg|zzz|egg
<Ellied>
Mostly wondering because I want to design an inexpensive one to go with my counter, and I'm not sure what a typical physics-lab TDC looks like, spec-wise
<egg|zzz|egg>
!wpn bofh, Ellied, Fiora, et al.
* Qboid
gives bofh, Ellied, Fiora, et al. an analemma
<Ellied>
My prof says rep rates of more than a MHz or so are uncommon, which surprises me because I think I might be fairly easily capable of that with the parts I have
<Ellied>
resolution's another story (I'm not likely to do better than 40 MHz) but it's something.
<bofh>
Ellied: haven't worked with them much, honestly.
<UmbralRaptor>
eigendunkletechne, or something?
<Ellied>
ah, alright
<bofh>
egg|zzz|egg: you jest, but I swear most of my academic career is learning linear algebra properly once in early undergrad and then just applying it in creative ways to a bunch of fields.
<kmath>
<ObservatoryCats> Setting up a telescope is extremely challenging when you lack opposable thumbs. Or toes. https://t.co/M1ftYkqOPn
<egg|zzz|egg>
bofh: yeah tbh, "learning it once properly" rather than "twenty five times confusingly" seems to be only doable through the maths bs curriculum, so I guess it makes it a dark art elsewhere >_>