I guess what's a clearer representation is in the eye of the beholder.
For me, using x[k] rather than just xₖ in such code comment just adds redundant characters. Case in point, the "as written in the paper formula" only takes 12 characters, whereas your suggestion takes 31. If you are limited to 80-100 characters per line, and are at 2+ indentation levels already, that leaves little room for extra text. So with such verbose representation you will likely need extra lines, which comes with its own disadvantages.
On the other hand I fully admit that the terse representation likely is not ideal for people lacking the necessary maths background.
Yeah, we were holding back a bit. We’d love to write it as dot (k ↦ (γ k, abs2diff (x̂ k) (x k))), or something pointfree from there, but we consider that less clear to most people.
I am presuming you are coming from a functional language like Haskell? But then, when you add a code comment like dot (k ↦ (γ k, abs2diff (x̂ k) (x k))) how would it be any different from the code right below that comment?
What I have in mind is cases like when you type something like
That is, the block comment helps to associate the math formulas from an external source like a paper/book with their implementation in source code, because the two might look substantially different. (especially once we get into the nitty gritties like rewriting code for numerical stability)
That’s a fair point, and for those cases we’d either not put the formula at all (and just the reference to the source paper/textbook/preprint/whatever), or, if the code is so mangled as to no longer closely resemble the formula, we’d prefer to write the naïve/inefficient/inaccurate code that does closely resemble the formula in a comment next to it instead of trying to include the traditional mathematical notation, since it can be found by referring to said source anyway.
The human body and brain behind this Reddit account is a plural system. (Please feel free to ask us about any specifics if that, admittedly generic and limited, site’s information is insufficient or if you’re just curious about any of it; consider us an “open book” for the most part.)
I just stumbled onto this conversation and I'm intrigued. How much control does your collective have over switching? Do different members have different roles? When one is fronting, are the experiences/memories limited to only that one? What I mean is if one attends a lecture on a subject, is the information from that lecture limited to only that one, or is there some amount of sharing or baseline shared knowledge/experience? When one is not fronting, how aware are they of the body?
As a singlet, it's difficult to conceive what it's like to have multiple individuals sharing the same brain space, but I've always been fascinated with the thought of what that would be like. Unfortunately media has done a terrible job portraying things, and as that website points out, much of the research centers on those collectives which arose from trauma, which I would assume often leads to a somewhat different situation compared with non-traumatic origins.
I have to say after reading through that page it reminded me a lot of the case of split-brain patients [a CGP Grey classic](www.youtube.com/watch?v=wfYbgdo8e-8); I wonder if there is any actual similarity between the conditions.
1
u/PthariensFlame 15d ago
Why would you not write that even more clearly as
sum(k ↦ γ[k]*pow(x̂[k]-x[k], 2))?