429 karma · joined Dec 12, 2021 (4y ago) · 42 submissions
comment 11mo ago · link · parent
3.
Show HN: The Taka Programming Language(codeberg.org ↗)
12 points · by mgunyho · 12mo ago · 4 comments
comment 1y ago · link · parent
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 2y ago · link · parent
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 3y ago · link · parent
comment 3y ago · link · parent
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 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
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 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
In the post I propose doing that for Gauss' theorem and Cauchy's formula, because there it's convenient, heh. But to me it feels better to use Θ^ix than a scale factor in front, since the 2pi is always present in the exponential, while the prefactor can be avoided in Fourier transforms if you keep the 2pi in the exponential (or hide it inside Θ). Does this not apply also to the elementary formulas you mention?
comment 3y ago · link · parent
I just define a new derivative operator, like so: dxđ f(x)≡2π1 ⋅dxd f(x). That’s all.
while Chrome's reader mode just fails to recognize the content entirely, even though it's the most basic <body><div id="content"><p> ... structure possible. I have basically zero web dev experience so I don't know how to fix this, maybe I need to tweak the KaTeX settings.I think it's quite sad that math is so difficult on the web. While setting up the blog, I looked around and it seemed like FF is the only browser with proper MathML support, but I think that was also being phased out because it's apparently buggy and hard to maintain. IMO, the screen reader version should just basically be the LaTeX source, which is probably kind of awful when read out loud, but at least it would be unambiguous.
18.
A trick to eliminate 2π (sometimes)(marci.gunyho.com ↗)
195 points · by mgunyho · 3y ago · 172 comments
comment 4y ago · link · parent
I don't think it's an inherent feature of scripting languages that they are hard to distribute. I'm pretty sure it's possible to package up a tiny Lua interpreter (or e.g. QuickJS) and all necessary scripts into a standalone file.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
To me, there really is a significant difference in friction when navigating in vim vs tere. Maybe it's because I need to use shift to type '/' on my keyboard layout. But I also have to press enter twice to cd after searching.
The point about opening the files within vim is valid, and I have been considering adding the option to call xdg-open on highlighted files, like many such tools do. I haven't decided yet if that's within the scope of tere.
> It's just a common problem so you'll probably find a lot of people have already solved this with other tools
I agree, and indeed there are a lot of existing alternatives as mentioned in the README. The main motivation for me was to make something that works just the way I want, and secondarily, to write something fun in Rust.
comment 4y ago · link · parent