Recent submissions

Comment · 11 months ago
Yep, I think in Taka the most confusing case is lists - writing

    list [
     1
     2
     3
    ]
creates the list [3 2 1]. (When indexing, the first item of the list is the one on top of the stack.) This has tripped me up several times.
Comment · 11 months ago
PN makes it appear more like a traditional programming language on the surface, even if it's still read in a kind of strange way. So it might help spread the joy of stack languages by seeming more easily approachable. For me personally, RPN is still unfamiliar enough that this kind of PN feels more comfortable.
Comment · 1 year ago
For Torch, I have come across Named Tensors, which should work in a similar way: https://docs.pytorch.org/docs/stable/named_tensor.html

The docs say that it's a prototype feature, and I think it has been that way for a few years now, so no idea how production-ready it is.

Comment · 1 year ago
Seconded. Xarray has mostly replaced bare NumPy for me and it makes me so much more productive.
Comment · 2 years ago
I want to second the idea of broadcasting based on named axes/dimensions. I think it's a logical next step in the evolution of the array programming paradigm.

I particularly recommend checking out xarray. It has made my numpy-ish code like 90% shorter and it makes it trivial to juggle six+ dimensional arrays. If your data is on a grid (not shaped like a table/dataframe), I see no downsides to using xarray instead of bare numpy.

Comment · 2 years ago
The pro version of Overleaf supports offline work with a simple trick: every Overleaf document can be accessed as a git repo. It's a bit limited (there's no branches or tags, and it breaks the "track changes" feature) and trying to convince the average researcher to learn git is a challenge, but if you know git it works quite well.
Comment · 3 years ago
Looks very similar to my tool, tere: https://github.com/mgunyho/tere. The main difference seems to be that I don't do any file manipulation, while walk has the option to delete files/folders. In my implementation, you don't need to type '/' for fuzzy search, just typing searches and jumps by default.

I also have a list of similar projects at the end of the README, I'll add this as well! edit: Oh I already had it in my list, the project has just been renamed from llama to walk.

Comment · 3 years ago
Hmm, this indeed seems to be the case! I think I was confused by ln(1), since 1 is a real number, but the multi-valued complex logarithm of 1 is indeed k 2pi (and now I see the appropriate notation should be "log" instead of "ln"). Perhaps the whole thing could indeed be reduced to "1^x" with an asterisk that 1^x means complex exponentiation. I'll have to update this section in the post.
Comment · 3 years ago
But note how right above this span there is the <span class="katex-mathml">, which is not aria-hidden, and which contains the MathML representation of the equations. I would have assumed that a screen reader would look at that, since it contains the semantical information.
Comment · 3 years ago
Yes, I manually put 2π in the html <title>, while the <h1> has the KaTeX rendered math in it :)
Comment · 3 years ago
Not a coincidence :)
Comment · 3 years ago
> sin(x) is the sinus function with the angle implicitly divided by 1 radian

This to me sounds like the most natural explanation. For example, in a sibling comment someone mentioned that "you can calculate e^(-t)", but I disagree: in physics it's always e^(-t / T), where T is some time constant, so that the argument of the exponential is dimensionless. Same applies to sin(x): usually we write something like sin(2pi f t), where the units of f and t cancel out, and the 2pi is there to cancel out the invisible implicit 1 radian. sin(ft) would be wrong, at t = 1 / f you wouldn't have advanced by a full cycle.

Comment · 3 years ago
I think parent is referring here to the fact that math used to be written without symbols (other than numbers) up to the 1300s according to Wikipedia: https://en.wikipedia.org/wiki/History_of_mathematical_notati... (very interesting article!) However, I would say that there is a reason why notation tends towards terse symbols: it's much more efficient and unambiguous.
Comment · 3 years ago
From what I can tell it's the opposite (on Firefox): the math is in the source HTML twice, once in <span class="katex-mathml">, which is hidden using CSS in the non-reader mode but is rendered in the reader mode, and <span class="katex-html" aria-hidden="true">, which is what FF displays normally, and it's missing from the source when I inspect it in reader mode. Having two spans like this comes directly from KaTeX, whose authors I'm sure have thought about accessibility. I imagined that MathML would be somewhat standard and screen readers would understand it.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton