HNHacker News
TopNewBestAskShowJobs

an_ko

1,673 karma · joined May 4, 2015

https://github.com/anko
submissionscomments
an_ko··on Generals.io – Capture enemy generals to defeat them
Yes, approximately. In X11 at least, the hardware codes are called keycodes, and the human readable names are called keysyms. Example of the XkbKeycodeToKeysym function in use: https://github.com/anko/xkbcat/blob/8abc3402cb679027a3bd0313...

Keysyms don't necessarily strictly match "key location"; keyboards are allowed to output whatever codes they want for whatever key they want (see e.g. QMK firmware; often used in custom keyboards to do complex conditional key remapping), but they're in practice relatively consistent between common keys on most keyboards, and consistent on the same keyboard even if you switch keyboard layouts in software, unless you have some custom keyboard firmware which functionality is stateful.

an_ko··on He felt 'creatively dead', then harnessed the power of boredom
Fads come in waves because it's easier and safer to do or discuss something when it's already on the mind of people around you.

Perhaps the irritation comes from having seen enough media that you've started to see this meta-level pattern, which is stale and eternal.

[Snarky overused The Matrix movie reference goes here.]

an_ko··on NPMprune: Remove unnecessary files from node_modules to optimize storage
This is wildly unsafe.

- Some packages contain non-JS files for good reasons, and they may break in subtle unpredictable ways when you mess with the contents of their package.

- Node.js will happily run JavaScript files even if they're not "*.js": A file like "hello.alsdfhlshdfl" works just fine as long as its content parses. There is no guarantee that your dependencies (and their recursive dependencies) don't statically or dynamically load files with completely arbitrary filenames.

- If you distribute packages with license files stripped this way, you are violating licenses that require the license to be distributed along with the code.

If this is actually a major issue for you, consider instead sending PRs to upstream to tidy up their package. This will also benefit other users.

an_ko··on Can we deter tech monopolies through reformed open source software development?
What stops Amazon from establishing a separate company called Totally Not Amazon, which employs 1 person, and hosts your software for the rest of Amazon, and has revenue much less than 1M$ so they can use it for free?

If they need more capacity than 1M would plausibly buy them from themselves, just establish however many more identical companies are necessary, none of which exceed 1M$.

an_ko··on Lyrebird the Linux voice changer now supports PipeWire
From a quick read of the code, it seems like all this does is shift pitch; it doesn't change resonance or anything else that affects how your voice sounds. So it's great for sounding like a chipmunk or a demon, but not that useful for sounding like a different person.

Looks like it uses libsox internally. You can also use command-line SoX utilities to get the same effect. For example, this plays your microphone back at you, pitch shifted and with a delay:

  play '|rec -p pitch +400 40 delay 5 5'
(To be clear, I don't mean to beat down anybody's pet project. Just spreading related information. There's very little accessible documentation of Linux audio stuff.)
an_ko··on Mistakes with Rust smart pointers: when Deref goes wrong
Yep. The docs for Deref also dedicate a whole paragraph, with a conclusion in bold, near the start of the page, to why it's a bad idea. https://doc.rust-lang.org/std/ops/trait.Deref.html
an_ko··on Making Games
Based on their blog, I think they mean this: https://store.steampowered.com/app/2318420/Glypha_Vintage/
an_ko··on Ask HN: I have 176 logins/accounts. How many do you have?
What's the point of 2FA if you store it in the same place as the first auth factor?

Or maybe I've misunderstood. Are they behind different master passwords or something?

an_ko··on Japan’s population drops by half a million in 2022
I checked. They will, for some reasons, sometimes: https://en.wikipedia.org/wiki/Category:Riots_and_civil_disor...
an_ko··on Don’t record your social life on an append-only social network (2022)
To my understanding, it allows messages on the network to have a total order, even when fully decentralised. Without a hash chain, clients could not tell what order events happened in, and might display them ordered differently, which would change a conversation's meaning.

The traditional alternative is logical clocks, but a malicious participant could forge those, so they're not suitable for a fully distributed system run by random users.

an_ko··on Ever-expanding animation of the life of the 796th floor of a space station
There were many such projects way back when. I remember participating in the emoticon tower: https://www.deviantart.com/leoleonardo/art/The-Re-opened-Tow...
an_ko··on Alexa, what is my wifi password?
Is this that big of a deal? Surely by the time someone has hardware access, the game is over. The keys need to be decrypted into memory to use them, and nothing stops someone with hardware access from dumping that memory. No amount of encryption beats a soldering iron.
an_ko··on Shoshikantetsu
Shisa kanko (指差喚呼) translates directly as "finger pointing verbal check".

Dictionary entry: https://jisho.org/word/%E6%8C%87%E5%B7%AE%E5%96%9A%E5%91%BC

an_ko··on Honestly, It's Probably the Phones
Beware of the "appeal to nature" fallacy [1]. You are right that exercising and going outside have been experimentally demonstrated to improve mood, but there is no such thing as "your natural state", and even if you arbitrarily pick some definition, there is nothing inherently good about it. Is agriculture "unnatural"?

The "we're not designed for the current speed of change" argument has also been made many times 2 centuries ago, for example with claims that the unnatural speed of train travel drives people insane. [2] Such claims are hilarious in retrospect. In 200 years, what will people think of your comment?

[1]: https://en.wikipedia.org/wiki/Appeal_to_nature [2]: https://www.atlasobscura.com/articles/railway-madness-victor...

an_ko··on Unicode 15.0 Slide Show
Wikipedia has some rationale: https://en.m.wikipedia.org/wiki/Chess_symbols_in_Unicode

Probably the most notable:

> Use figurine algebraic notation, which replaces the letter that stands for a piece by its symbol, e.g. ♘c6 instead of Nc6. This enables the moves to be read independent of language (the letter abbreviations of pieces in algebraic notation vary from language to language).

an_ko··on What does copyright say about generative models?
Damien Riehl and Noah Rubin have all the melodies on a hard drive. (More info in this Adam Neely video: https://www.youtube.com/watch?v=sfXn_ecH5Rw and the TED talk linked in a nearby comment.) So depending on a court's kinda arbitrary definition of creativity on any given day, all of them may or may not be copyrighted already.

An infringement being accidental also doesn't seem to stop copyright holders from successfully suing people. I think this means you could technically be successfully sued for dropping some bricks on a piano, since no matter where they land, the action constitutes a public performance of a copyrighted work. Fun stuff.

an_ko··on Artist feeds childhood diary into GPT-3 to have a chat with herself
I'm pretty sure if I look closely enough, I'm nothing but numbers myself. My feelings don't exist, they're just side effects of evolved processes that made my ancestors survive, generated by a neural network too complex to debug. Compared to GPT-3 though, I'm better at pretending to be a person.

(The above was generated by GPT-3.)

(No it wasn't.)

an_ko··on Use this kernel parameter in your kiosk
It's a matter of degrees. The title here still gives less information than it could have in the same amount of space, forcing more people to read the article to find out, than would otherwise have.
an_ko··on Write better error messages
I don't want to have to hunt for documentation if it breaks. It may have been 30 years and everything but the binary has been lost, and the vendor is out of business. If in that situation all I get is an error code and a link to documentation that doesn't exist, I'd have to start reverse-engineering. And while doing so I'd definitely be cursing the coder who decided that saving a couple hundred bytes of space in a log file in the event of an "abort the program"-severity event was worth dumping this in my lap.
an_ko··on Ask HN: Which mailing lists would you recommend to subscribe to?
It would be ethical to mention your affiliation when advertising your own product.
an_ko··on Goal: Pass all 4259065 tests in sqllogictest in 1 week
> their complier often runs code inside if(false) blocks (in certain positions)

Do you have an example? Sounds like a catastrophic edge case.

an_ko··on You can watch how much I rewrite here
If you mean recorded commands, those are stored in registers, which from a quick look at the source [1] seem to just contain strings. So I would imagine their length is only bounded by memory.

So I suppose you could just qq, write your entire thing, then "qp to get the whole history. I wonder if there's a tool that replays commands in slow motion, or some neat way to add sleeps to a command sequence.

[1]: https://github.com/vim/vim/blob/master/src/register.c

an_ko··on Ladybird: A new cross-platform browser project
You are of course correct. I should not try to think about software at 4am! :)
an_ko··on Ladybird: A new cross-platform browser project
Most rendering oddities are not directly detectable by JS on the page, with the notable exception of the <canvas> element.

Though I suppose rendering differences that affect z-order or visibility could be detected indirectly, by listening for pointer events on elements that are "supposed to be" visible/hidden.

an_ko··on Atkinson Hyperlegible Font
I imagine the "backslash" in the zero is intended to make it more distinct from Ø and ø.
an_ko··on Revisiting the design approach to Zig
This article praises everything Zig does and lists no negatives of its design. I'd recommend a different article for a balanced take, particularly regarding comparisons with Rust: https://www.scattered-thoughts.net/writing/assorted-thoughts...
an_ko··on SDN in the stratosphere: Loon's aerospace mesh network
I'm only guessing, but perhaps because balloons have fewer moving parts? They're the lowest-tech aircraft. Minimise aerospace engineering, focus on networks for now.
an_ko··on Timing Attacks
In any actual field of engineering, building everything on systems that fail-open this way would be unacceptable. Universally relying on CPUs that leak side channel everywhere because It Go Fast is like building with asbestos and cardboard. Meaning completely safe in a controlled environment, and often accidentally safe outside of it, but dangerous as a factory default, because humans' factory-default is to make questionable decisions without reading the manual.

I can't wait for whatever cock-up finally takes down the internet and kills enough people that, once the smoke clears, "move slowly and don't break anything" becomes a normal career path, rather than a prayer recited by jaded security professionals dual-wielding rolls of duct tape.

an_ko··on Writing one sentence per line
HN does not use Markdown. Compare HN formatting options https://news.ycombinator.com/formatdoc to Markdown https://daringfireball.net/projects/markdown/syntax
an_ko··on Nostr Protocol
> [Regarding SSB:] It insists on having a chain of updates from a single user, which feels unnecessary to me and something that adds bloat and rigidity to the thing — each server/user needs to store all the chain of posts to be sure the new one is valid. Why? (Maybe they have a good reason)

I think the reason for the chaining is that it creates a causal ordering of posts. You will never see the n+1th post without also seeing the nth post.

Not having this means posts being dropped by a peer for some reason may change the meaning of the sequence of posts in the eyes of the readers. Imagine for example sending "The previous post is a joke." If posts aren't chained cryptographically, there's no way to know that you have a complete sequence of previous posts, or if some are missing.

← PreviousPage 2 of 9Next →