News for hackers. Stuff that matters.
Re:Concise algorithms written in Julia by contravariant on Friday July 09, 2021 @12:00PM (#27785077)
Though it's worth keeping in mind that the mathematics is usually accompanied by an article that at a minimum (tersely) tells you what the symbols are.
Re:Concise algorithms written in Julia by counters on Friday July 09, 2021 @01:04PM (#27785867)
Bingo. And it goes vice-versa; because software engineering standards are so lax (read: non-existent) in most academic disciplines and domains, on the rare occasion where you get accompanying code to an academic work it may be impossible to actually much of the source to the original work itself.

During my dissertation I had to collect implementations of about a dozen parameterizations of a process I was studying, with the intent of coupling them/incorporating them into a set of climate modeling experiments. All of the implementations were in Fortran (which in and of itself wasn't a problem, albeit it was annoying re-writing or re-factoring some F77 code to play more nicely with the more modern Fortran codebase in which our climate model was written). Of these codes I collected, the majority of them had bugs which restricted my ability to reproduce the reported results from the original work they accompanied. One or two of them had significant flaws in them - answer-changing bugs which, when corrected, potentially would yield different results from those reported in their original papers, and might actually lead to different conclusions.

One of the nice things about the Jupyter ecosystem of tools and Julia is the ability to more closely replicate equations from the original paper. It seems dumb, but in my anecdotal experience I've noticed fewer significant bugs when colleagues have used these features. I've also noticed a propensity for scientists and researchers to write clearer, better-documented code - if your next line of code is going to directly mimic Equation 13 in your paper, why wouldn't you go ahead and write a comment saying so?

Re:Concise algorithms written in Julia by res0nat0r on Friday July 09, 2021 @01:27PM (#27786158)
Do folks normally write code using the Greek alphabet? I totally understand reading/writing math papers in latex, or on paper using the traditional mathematical symbols, but does anyone really want to edit their Julia code in vim and type \scrA<tab> for a variable name? Seems extremely annoying and convoluted vs naming your variables alpha or sigma, etc.
Re:Concise algorithms written in Julia by mbauman on Friday July 09, 2021 @02:09PM (#27786649)
All the time. Incidentally, I got these unicode α and σ by copy-pasting from tab completion in an open Julia REPL.

https://juliahub.com/ui/Search?q=α&type=code&w=true

https://juliahub.com/ui/Search?q=σ&type=code&w=true

Re:Concise algorithms written in Julia by leephillips on Friday July 09, 2021 @02:38PM (#27786952)
But I can type α with two keystrokes. “alpha” is five.
Re:Concise algorithms written in Julia by res0nat0r on Friday July 09, 2021 @03:22PM (#27787514)
Looking up escape codes or cutting and pasting non ascii characters takes much longer than typing 5 letters.
Re:Concise algorithms written in Julia by leephillips on Friday July 09, 2021 @03:33PM (#27787616)
> But I can type α with two keystrokes.
Re:Concise algorithms written in Julia by res0nat0r on Friday July 09, 2021 @05:30PM (#27788768)
Learning that for all the mathematical symbols, still too time consuming.
Re:Concise algorithms written in Julia by ModernMech on Friday July 09, 2021 @12:19PM (#27785311)
Exactly, this is the thing people always seem to forget. When I write a paper with mathematical symbols like this, I always include a glossary for the reader. It's even required in some venues.

People like to pretend that mathematical notations are standardized and obvious to practitioners, but they're just not. In my physics undergrad days we made a joke shirt with all the usages of the symbol "k" as it appeared in our physics texts. Is it the constant in Coulomb’s law? Is it a spring constant? The Boltzman proportionality factor? Is it kinetic energy? Is it a kilo? A kelvin? I think we were able to cover the front and back of the shirt with the overloaded usages.

Re:Concise algorithms written in Julia by contravariant on Friday July 09, 2021 @01:20PM (#27786064)
Yeah things can get a little wild sometimes with all possible interpretations. I'm pretty sure there are a few equations that use 'i' as both the imaginary unit and an index at the same time.

I've noticed physicists can be a bit fast and loose with their definitions, somehow you're assumed to be up to do date on what concept is given the symbol "R" in that particular context. Though they do tend to agree with each other which concept should have which symbol.

Re:Concise algorithms written in Julia by spywaregorilla on Friday July 09, 2021 @01:03PM (#27785860)
Sounds like something one could expect from a docstring