HNHacker News
TopNewBestAskShowJobs

KolenCh

350 karma · joined September 18, 2021

submissionscomments
KolenCh··on Okay, I Like WezTerm
The first two top results:

https://sw.kovidgoyal.net/kitty/faq/#i-get-errors-about-the-...

https://github.com/kovidgoyal/kitty/discussions/3873

Basically it is how it presents itself as xterm-kitty and then how to make others recognize that. Installing terminfo on the remote is an option, lying and claim it to be xterm-256color is another (with caveats.)

As in other issues with kitty, the author is probably right. But for many people that they have many different kinds of remotes to log into where they don’t have control over, getting around with these issues is tedious.

Making kitty works is possible, and I learnt how to deal with these issues one by one, but hearing comments here on HN points me to wezterm and once I migrated I never looked back. For the simple stuffs wezterm gets out of the way. And there’s some interesting advanced stuffs to pick up, such as multiplexing with ssh: https://wezfurlong.org/wezterm/multiplexing.html?h=ssh#ssh-d...

KolenCh··on Okay, I Like WezTerm
I concur, a few problems leading me to migrate from kitty to wezterm are related to tmux, color, and ssh.
KolenCh··on Apple. Apple Please
Oh, wow. Glad I asked. I thought you mean port but while they are related it is something I’ve never heard of.

Brew has transitioned into primarily bottled (pre-compiled binary). Compiling with the local march sounds great and it is quite difficult to find one consistently do that. On top of that, I’m trying to look for one that can be installed on arbitrary prefix too and recently I’ve been eyeing on pkgsrc, gentoo prefix, and spack.

KolenCh··on PEP 750: Tag Strings for Writing Domain-Specific Languages
A perfect use case for chatbots to answer them instead.
KolenCh··on Apple. Apple Please
Portmaster?
KolenCh··on Zotero 7: Zotero, Redesigned
My favorite feature is the ability to search collections (ie type collection name on the left and filter collections matching that). I installed the beta just for this (because I have too many nested collections after decades of building up and is getting a bit out of hand…)
KolenCh··on Recent Performance Improvements in Function Calls in CPython
First, no sane mind will think one single example will be representative to anything.

Second, if you want to focus on 3rd party or not, sure. But you could also think Numba jit vs C++ and in this case it puts them on a more equal footing to compare them.

As far as Numba is concerned, numpy is in its stdlib as it aren’t calling Numpy but jit compile it.

You may say Numba is not Python, true, but you could consider Numba an implementation of a subset of Python.

We can argue about the details but the example is not that long to read. My summary and your summary are both at best distilled through our own point of view a.k.a. biases. Anyone can read the diff itself to judge. That’s why I link to it.

KolenCh··on Recent Performance Improvements in Function Calls in CPython
Technically right, but the original code only optionally depends on Numba, and Numpy is ubiquitous in scientific Python.

The problem I was trying to solve in all those boilerplates is basically that Numpy still has overhead and dropping it to lower level is trivial if Numba is used, but the package maintainers doesn’t want to introduce Numba dependency for various reasons. And the diff is showing that change from Numpy/Numba to C++ with pybind11.

KolenCh··on Using alternative browser engines in the European Union
> … or features that improve memory safety within other languages

So it is not based on language only.

KolenCh··on Recent Performance Improvements in Function Calls in CPython
I have an example to support: https://github.com/hpc4cmb/toast/pull/380/commits/a38d1d6dbc...

A one-liner in Python is replaced by hundreds of lines of changes to implement in C++. (The one-liner has some boilerplates around it too, but the C++ function itself is longer and the boilerplates around is even more.)

Edit: 230 additions and 36 deletions in 14 files.

KolenCh··on Google loses antitrust suit over search deals on phones
Sorry, I was on mobile and I got that link from the “share” sheet. I probably know that it is not portable, as I shared Apple News links and found that out before.

Here’s the part of the transcript:

> It is not necessarily illegal to be a monopoly. It is illegal to abuse your monopoly power. This court is examining both of those questions. (1) Is Microsoft a monopoly? (2) Are they abusing their power?

KolenCh··on Google loses antitrust suit over search deals on phones
I was just listening to this episode: https://podcasts.apple.com/us/podcast/acquired/id1050462261?...

They pointed out that a monopoly is not the sin, the sin is to abuse that market position for unfair advantage.

So your summary of their verdict in a way is what the US view of antitrust is.

KolenCh··on RustPython: A Python Interpreter Written in Rust
I wonder why you stops there midway in a sentence and only after reading the other comments I get what you mean … What problems you are referring to exactly, and how would they be fixed as an implementation but not at the language level?
KolenCh··on RustPython: A Python Interpreter Written in Rust
Regarding import cost, as it’s doing heavy IO traversing the file system, the cost heavily depends on how fast you can do IO in the hardware, and also the file system (and the OS).

So a fast SSD will help, and somewhat surprisingly putting it inside docker helps (in an HPC context, not so sure it’s implications here as we’re talking about a short scripts.)

But the context here is to port shell scripts to Python, I’m not sure how huge amounts of imports matters.

And it is probably an intrinsic problem of the language, unless we start talking about compiling (and somehow statically) not interpreting the Python program, whichever implementation of the language probably won’t help the situation.

Lastly, if high startup costs of the script becomes relevant, perhaps it is orchestrating wrong. This is an infamous problem of Julia, and their practice is then just keep the Julia instance alive and use it as “the shell”. Similarly, you can do so in Python. Ie rather than calling a script from the shell acting on millions of things, write a wrapper script that start the Python instance once. Memory leak could be a problem if it or its dependencies are not well written but even in that case you have ways to deal with that.

KolenCh··on Our audit of Homebrew
This a not a unique problem to homebrew. Any pre-built binaries potentially shares this problem unless the build system the software use is intentionally written to avoid this problems.

Any package managers that is designed to not hard code the prefix, ie you can choose where the binaries go into, needs to handle this problem and have their own ways to deal with it. Conda for example has a long string of …placehold_placehold_… to facilitate editing the hardcoded path…

Source distribution is more robust against this problem comparing to binary distribution. (But sometimes the authors of the software did not package them well and would have hardcoded some paths somewhere.)

That’s why when you change the homebrew prefix, they will built from source instead, and it (using a different prefix) might not work.

KolenCh··on Our audit of Homebrew
You might say devbox gives nix a brew-like interface and ergonomic.

More accurately, when you use a package manager, you use the “ecosystem” including the package index and pre-built binaries, and the cli. There aren’t many alternatives to homebrew as an ecosystem, especially including cask. Macports isn’t a homebrew replacement in the sense that it doesn’t have “cask”. Nix has something similar, although not as many packages. This makes nix probably the only viable alternative to homebrew with cask.

But nix is very hard to onboard. Devbox just makes it much easier to start using in say the first 30 min.

KolenCh··on Our audit of Homebrew
But the problem is that /usr/local/bin is in the default PATH. They defended this discussion to take over until Apple silicon came and they “silently” fixed it avoiding admitting anything wrong in the beginning
KolenCh··on Ask HN: What are some unusual but useful Python libraries you've discovered?
Defopt generates cli from function interface: https://defopt.readthedocs.io/en/stable/features.html

The alternative is either you maintain two interfaces with boilerplate, or write a cli only if that’s the first priority.

Similar solutions exist, like fire. But fire’s cli is like an afterthought, in the sense it gives people a way to run things in command line where they already know how to run it from Python.

KolenCh··on Workbrew
Try interacting with them and you’ll know. If you just use it, (and your OS isn’t too old) then you wouldn’t feel it. And also good luck if they make some changes that affect you.

A better way to describe it might be contributor-hostile than user hostile. In a typical open source project, opening an issue is considered to be a contribution, a pull request is even better. Try doing any of these and be prepared to be harassed.

It is a very toxic open source project. Sadly homebrew cask is irreplaceable.

KolenCh··on Switching from Arch to NixOS
Thanks. Interesting to know!

The thing I worried most is not the kind of problems fixable by rolling back, but (potentially silent) data corruption. Do you know how exactly is OpenZFS on nixOS supported? For example, currently both the Arch Linux and nixOS guide in the OpenZFS documentation said people should mention @ne9z in filing issues on those platforms, but @ne9z no longer exists.

I have seen how maintainers can screw up and causes data corruption (Ubuntu specifically) so I worry about that aspect as well.

KolenCh··on Switching from Arch to NixOS
Right. I'd like to hear your experience with running OpenZFS on nixOS. E.g. how long have you tried it and your update cadence and robustness etc.

I'm in my quest to find the "best supported" way to run ZFS on Linux and I've tried Ubuntu, Arch, RHEL, OpenSUSE. (I also tried FreeNAS (i.e. FreeBSD) in the past.)

Ubuntu has knowingly made a version of OpenZFS with (with their own patch causing) data corruption bug in the stable release. So since then I lost trust in them.

Arch Linux never officially supports it, and Arch's rolling release model with OpenZFS as kernel modules are not a good match for UX.

RHEL with kABI tracking kmod maintained by upstream seems to be a great, robust support combination, but later I found out that the kABI is not fully covered so it working relies on a bit of luck. AFAIK, it is still not completely resolved.

OpenSUSE with the "filesystem" project seems to be a semi-official support of seamless integration of OpenZFS with OpenSUSE. So far so good but I'm still evaluating.

In principle, nix and nixOS should be quite robust from its design (practically reproducible build). But I am not trusting nix that much yet and prefer something more battle tested. Coincidentally, I like the documentation of all the previous OSes I mentioned above (where Ubuntu falls a bit shorter among the crowd.) And from my limited experience, nix and friends are quite poorly documented.

KolenCh··on Switching from Arch to NixOS
Depends on what support means. If support means root on ZFS can be installed effortlessly, then yes. But if support means if things failed and you can get support to fix it, then no.
KolenCh··on 'Sensational' Proof Delivers New Insights into Prime Numbers
Dup: 'Sensational' Proof Delivers New Insights into Prime Numbers https://news.ycombinator.com/item?id=40968164
KolenCh··on A free tool to quickly detect counterfeit flash (2017)
I got a few new USB drives at work for testing data centre hardwares. I normally would run f3 on new flash drives but this time the deadline is so rushed so I skipped that. Then I wasted an hour diagnosing a mysterious problem, and eventually I found out the usb drive is faulty after testing it using f3.

I then tested all of them and found out 4 out of 8 of them aren’t faulty, some of them died and disappeared.

So test your hardwares, test your hardwares that’s used to test hardwares. You will never know you can trust them unless proven.

Edit: badblocks, SMART test, memtest86 and memtest86+, prime95, Intel burn test, OCCT, iperf3, etc are equally useful.

KolenCh··on Show HN: Convert HTML DOM to semantic markdown for use in LLMs
Does anyone compare the performance between HTML input and other formats? I did an informal comparison and from a few tests it seems the HTML input is better. I thought having markdown input would be more efficient too but I’d like to see more systematic comparison to see it is the case.
KolenCh··on Show HN: Convert HTML DOM to semantic markdown for use in LLMs
I am curious how it would compare to using pandoc with readability algorithm for example.
KolenCh··on Playing guitar tablatures in Rust
It is not about counting harmonics or not, but what should be counted "the same".

We could have gone all formal here, musical theory and physics and all that. But I claimed that you can just tell by ears and use common sense.

What I was going for is accuracy. Someone made a quick comment that one could have played "the same note" on all 6 different strings, which aren't correct under closer inspection and reasonable assumption to define the context.

Similarly, if you include harmonics in the definition of "note" (while still hold the distinction that harmonics are different from normal notes), then still you cannot play "the same note" on all 6 strings, and in fact even lesser (for the same harmonics to be played on different strings) due to the constraints.

Interestingly, if you also include artificial harmonics, (again, while still hold the distinction between normal notes, harmonics, and artificial harmonics), then yes, you finally will be able to play the same note on all 6 strings, theoretically. One could argue whether we should consider harmonics and artificial harmonics the same, as they share different notations, and requires different techniques, but sounds the same to the ear. But either way there exists artificial harmonics that you can play on all 6 strings.

QED

KolenCh··on Playing guitar tablatures in Rust
If you have an ear then a harmonics should not be counted as the same note. To a layman, they probably can’t tell the difference between the same note from a different string. But it will be very obvious to even a layman a harmonics has a different quality.

That’s the reason they have a different notation. The notation is there to convey what we mean, not a nitpicking. To claim it is still the “same” even when the notation isn’t are really pushing what “the same” is. We might as well start to count the way one scratch on the string to be the same note if they gives the same fundamental.

KolenCh··on Playing guitar tablatures in Rust
The comment I replied to mention sheet notation, last I check we only use that with classical guitar.

(But even “classically”, there are other guitars with many more strings or other tuning systems, etc.)

Lastly, “standard” can be perceived as the most common guitar you can think of. It is very likely if you tell a random Joe go buy a guitar for their nephew, it will be 6 strings 19 frets with EADGBE tuning.

KolenCh··on Playing guitar tablatures in Rust
Harmonics should be denoted differently. For such notes, you can only play the same note on at most 3 different strings.
← PreviousPage 4 of 13Next →