HNHacker News
TopNewBestAskShowJobs

ilyagr

1,069 karma · joined December 15, 2012

submissionscomments
ilyagr··on Far – Sublime Inspired Find and Replace
Depending on the interface you prefer, there are also

https://github.com/ms-jpq/sad https://github.com/chmln/sd

that haven't been mentioned yet

ilyagr··on Far – Sublime Inspired Find and Replace
Far manager now exists on Linux and Mac: https://github.com/elfmz/far2l

I got it from nixpkgs, not sure if it's easy to install otherwise.

ilyagr··on Show HN: SQL-tString a t-string SQL builder in Python
Ah, apparently with real t-strings, `t"SELECT {a-1}"` should be allowed while `t"SELECT {}"` is not.

Here is Python master branch:

    Python 3.15.0a0 (heads/main:ea2d707bd5, May 16 2025, 12:20:56) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> t"Hello {a}"
    Traceback (most recent call last):
      File "<python-input-1>", line 1, in <module>
        t"Hello {a}"
                 ^
    NameError: name 'a' is not defined
    >>> a=3
    >>> t"Hello {a+5}"
    Template(strings=('Hello ', ''), interpolations=(Interpolation(8, 'a+5', None, ''),))
    >>> t"Hello {}"
      File "<python-input-6>", line 1
        t"Hello {}"
                 ^
    SyntaxError: t-string: valid expression required before '}'
ilyagr··on Show HN: SQL-tString a t-string SQL builder in Python
I think that, since you don't allow `sql(t"SELECT {a-1}")`, you should allow `sql(t"SELECT {}", a - 1)`, as long as that is possible with t-strings. This would be similar to Rust's `format!` then.
ilyagr··on TPSV, an Alternative to TSV (and CSV)
> Both already possible, they have official symbols representing them.

I'm not sure what you mean. For an illustration, my terminal does not print anything for them.

    $ printf "qq\36\37text\n"
    qqtext
*Update/Aside:* "My terminal", in this case, was `tmux`. Ghostty, OTOH, prints spaces instead of RS or US.

Unicode does have some symbols for every non-printable ASCII character, which you can see as follows with https://github.com/sharkdp/bat (assuming your font has the right characters, which it probably does):

    $ printf "qq\36\37text\n" | bat -A --decorations never
    qq␞␟text␊
Here, `␞` is https://www.compart.com/en/unicode/U+241E, one of the symbols for non-printable characters that Unicode has; different fonts display it differently. See also https://www.compart.com/en/unicode/block/U+2400.

Is there some better representation it has?

ilyagr··on TPSV, an Alternative to TSV (and CSV)
It's a clever format, especially if the focus is on machines generating it and humans or machines reading it. It might even work for humans occasionally making minor edits without having to load the file in the spreadsheet.

I think it can encode anything except for something matching the regex `(\t+\|)+` at the end of cells (*Update:* Maybe `\n?(\t+\|)+`, but that doesn't change my point much) including newlines and even newlines followed by `\` (with the newline extension, of course).

For a cell containing `cell<newline>\`, you'd have:

    |cell<tab>|
    \\<tab   >|
(where `<tab >` represents a single tab character regardless of the number of spaces)

Moreover, if you really needed it, you could add another extension to specify tabs or pipes at the end of cells. For a POC, two cells with contents `a<tab>|` and `b<tab>|` could be represented as:

    |a<tab  ><tab>|b
    ~tab pipe<tab>|tab pipe
(with literal words "tab" and "pipe"). Something nicer might also be possible.

*Update:* Though, if the focus is on humans reading it, it might also make sense to allow a single row of the table to wrap and span multiple lines in the file, perhaps as another extension.

ilyagr··on TPSV, an Alternative to TSV (and CSV)
I don't think popularizing these ASCII characters would solve the problem in its entirety.

If RS and US were in common use, there would be a need to have a visible representation for them in the terminal, and a way to enter RS on the keyboard. Pretty soon, strings that contain RS would become much more common in the wild.

Then, one day somebody would need to store one of those strings in a table, and there would be no way to do so without escaping.

I do think that having RS display in the terminal (like a newline followed by some graphic?) and using it would be an improvement over TSV's use of newline for this purpose, but considering that it's not a perfect solution, I can understand why people are not overly motivated to make this happen. The time for this may have been 40+ years ago when a standard for how to display or type it would be feasible to agree upon.

ilyagr··on fd: A simple, fast and user-friendly alternative to 'find'
I got used to https://github.com/tavianator/bfs instead. Breath-first ordering is nice.

Interestingly, the author is listed as one of the maintainers of `fd` as well.

ilyagr··on Violence alters human genes for generations, researchers discover
Perhaps what the grandparent meant is that we have little clue to how exactly any particular change in non-coding DNA actually affects the functioning of our minds and bodies, we have few tools to study that beyond the seemingly obvious fact that it does have to encode the structure of all the organs of our body and the fundamental structure of our brains somehow.
ilyagr··on Violence alters human genes for generations, researchers discover
I'm my mind, gene expression is at least as important as the coding genome.

AFAIU, the later mostly encodes the structure of proteins, which naively are the factory machines of or cells (enzymes, that is) and some of its building blocks. The gene expression tells the factory what to produce (a tail or an ear, say), when to produce it, and how much. More relevant to the topic of this article, the gene expression would determine which structures and pathways of the brains (or adrenal glands, or any other organs) to suppress, and which to reinforce and build up in a new generation of humans.

The building blocks are important, but once they are good enough, it matters more what you choose to build with them.

ilyagr··on Introducing a terms of use and updated privacy notice for Firefox
Sibling discussion (might be worth unifying): https://news.ycombinator.com/item?id=43194536
ilyagr··on Mozilla's new terms of use are out of step with Firefox's direct competition
Sibling discussion (might be worth unifying): https://news.ycombinator.com/item?id=43187423
ilyagr··on Mozilla's new terms of use are out of step with Firefox's direct competition
Nice, thank you again!
ilyagr··on Mozilla's new terms of use are out of step with Firefox's direct competition
Good to know, thanks!

I'd be mildly surprised if the current version remains unchanged for a long time. It raises the question of "how do I determine whether I'm one of the 'most people' who wouldn't think of you as selling my data", and I doubt they'll want to answer that.

I wish there was a way to tell the Wayback Machine to do a snapshot for historical preservation.

ilyagr··on Mozilla's new terms of use are out of step with Firefox's direct competition
I'm curious whether it changed in the last two hours, but now it sounds a lot less clear. Also, it sheds some light of how people at Mozilla currently think about it (so much so that I'm guessing the text will change again):

> Mozilla doesn’t sell data about you (in the way that most people think about “selling data“), and we don’t buy data about you. Since we strive for transparency, and the LEGAL definition of “sale of data“ is extremely broad in some places, we’ve had to step back from making the definitive statements you know and love. We still put a lot of work into making sure that the data that we share with our partners (which we need to do to make Firefox commercially viable) is stripped of any identifying information, or shared only in the aggregate, or is put through our privacy preserving technologies (like OHTTP).

*Update:* Here's the version from Feb 6 that says exactly what the parent comment posted: https://web.archive.org/web/20250206184553/https://www.mozil...

ilyagr··on Cross Views
Thank you! I have not, to this day, have been able to see any Magic Eye/Cross Eyed or similar images. A wigglegram is immediately trivial.

I'd probably most appreciate a layout with one frame on the left, the wigglegram in the middle, and the other frame on the right, so that I can get a sense of both the distances and the detail.

ilyagr··on How core Git developers configure Git
+1 on zdiff3. It makes little sense to me; it seems like it can describe different conflicts in the same way. I think diff3 is the only sane choice (the default 2-sided presentation is also somewhat sane, though questionable. It loses important information but is simpler).

zdiff3 is described here: < https://git-scm.com/docs/git-merge#_how_conflicts_are_presen...>. The example in there makes zdiff3 look quite confusing, since it makes it look as though a line was deleted on both sides. For a while, I thought including the identical line in the base it must be a typo, but apparently that's how it's supposed to work.

See also https://lore.kernel.org/git/CAO_smVg=1gFBudrd70V2_AXSPOUTFz=...

ilyagr··on NASA Downgrades the Risk of 2024 YR4 to Below 1%
I'm principle, if we knew the asteroid is going to hit a populated area (which we would in 2026), we could seriously consider deflecting it to either miss earth or hit the ocean.

Here's Scott Manley from two weeks ago.

https://youtu.be/Esk1hg2knno

There's nothing to do now or for the layman, though, as you said. Also, this opens the fun possibility that people could redirect an asteroid into a city, but unless they can do it secretly or deniably, nuclear weapons are probably easier.

ilyagr··on FFmpeg School of Assembly Language
As a user of an ARM Mac, I wonder: how much effort does it take to get such optimized code to work the same in all platforms? I guess you must have very thorough tests and fallback algorithms?

If it's so heavy in assembly, the fact that ffmpeg works on my Mac seems like a miracle. Is it ported by hand?

ilyagr··on A year of uv: pros, cons, and should you migrate
Rye is softly being sunset in favor of `uv` (though still officially supported, and I haven't heard of any plans to change that). As it says on https://rye.astral.sh/,

> If you're getting started with Rye, consider uv, the successor project from the same maintainers.

> While Rye is actively maintained, uv offers a more stable and feature-complete experience, and is the recommended choice for new projects.

It also links to https://github.com/astral-sh/rye/discussions/1342.

ilyagr··on JJ Cheat Sheet
https://www.visualjj.com/

Better link: https://marketplace.visualstudio.com/items?itemName=visualjj...

ilyagr··on Jujutsu VCS: Introduction and patterns
Each release comes with a file with all the help, for example:

https://github.com/jj-vcs/jj/releases/download/v0.25.0/jj-v0...

In theory, packagers could put these docs somewhere. I'm not sure what the best way is to make it convenient to use.

Also, I'm not sure about jj v0.25, but in the upcoming (probably tomorrow) 0.26, you can get a lot of docs by doing e.g. `jj help -k config`. Ironically, this fact is currently somewhat under-documented. `jj help` just says at the end:

`'jj help --help' lists available keywords. Use 'jj help -k' to show help for one of these keywords.`

ilyagr··on Stats – macOS system monitor in your menu bar
I haven't heard about Hidden Bar before, but https://github.com/jordanbaird/Ice is quite nice.
ilyagr··on Seagate: 'new' hard drives used for tens of thousands of hours
If you have an ARM Mac and a USB enclosure for the drive, I had some success with smartmontools running in ARM Linux under VmWare. I also tried UTM (pretty much QEMU), but UTM's USB passthrough was not good enough.
ilyagr··on Dwarf Fortress Adventure Mode – Out Now – Official Release Trailer [video]
Yeah, Whisky is probably the better path.
ilyagr··on Dwarf Fortress Adventure Mode – Out Now – Official Release Trailer [video]
Stream says it's "playable" on Steam OS, which might mean it works under Wine. So, you could try running the windows version in https://github.com/Whisky-App/Whisky . It often works wonders, even on ARM Macs.

You can also try to set up a Linux vm with hardware-accelerated graphics with UTM or VmWare or Parallels, but I'm less familiar with this route for games. It might be hard since you need either x64 Linux or Rosetta, and hardware acceleration at the same time. (It might be easier if you have an Intel Mac)

ilyagr··on IRC Driven – modern IRC indexing site and search engine
The soju bouncer world is quite nice. It is nicely integrated with 3 clients: gamja (web), goguma (Android) and senpai (golang terminal client). They are basic in some ways, but are configured for storing history and behaving like you'd expect a chat app to behave or of the box. I found it a very easy way to get started with IRC without having to keep my computer on all the time.

Soju works with other clients as well, but then requires some configuration. See https://git.sr.ht/~emersion/soju/tree/master/item/contrib/cl... for some possibilities.

I find manually configuring clients for use with a bouncers not very intuitive. The quality of integration depends on which protocols each client supports. So, I'd recommend trying the clients I lists above first.

There are two hosted soju services I'm aware of, both about $20/yr (both are a part of a larger service, but the price is good even if you just use the bouncer). Both include gamja, so installing your own IRC client is not required.

https://man.sr.ht/chat.sr.ht

https://pico.sh/bouncer (also accessible as an ssh app)

You can also self-host soju/gamja, but that takes a bit of work.

ilyagr··on Show HN: An SSH based utility to transfer pipes across machines – beam
I have used https://pipe.pico.sh/ for this. pico.sh also has a bunch of other SSH-accessible services, e.g. pastes, and paid (or free if self-hosted) port tunneling.
ilyagr··on Why OpenAI's Structure Must Evolve to Advance Our Mission
They are trying to convince themselves that is not the reason, because they'd like to think of themselves as above such trivial concerns as greed, and hunger for power, and fear of somebody else beating them to it and having power over them. So, they want to call their feelings as something else, something noble.

And then, as others point out, they are also interested in other people believing this, whether for employees or lawsuits. But I think that would not justify saying these same things again and again, when by now they have nothing new to say and people have mostly made up their mind.

ilyagr··on Show HN: Keypub.sh – OAuth for the terminal using SSH keys
Another interesting set of ssh apps is https://pico.sh/ . These focus on networking and lightweight hosting (pastes, simple blog), all via ssh or rsync.
← PreviousPage 2 of 11Next →