HNHacker News
TopNewBestAskShowJobs

porkbrain

200 karma · joined October 22, 2018

git at porkbrain.com
submissionscomments
porkbrain··on De-dollarization: Is the US dollar losing its dominance? (2025)
He quotes Václav Havel: https://en.wikipedia.org/wiki/The_Power_of_the_Powerless
porkbrain··on Are we stuck with the same Desktop UX forever? [video]
Unfortunately, some apps don't support text selection and on some websites the text selection is unpredictable.

I'd actually compare screen OCR to screenshots. Instead of every app and every website implementing their own screenshot functionality, the system provides one for you.

Same goes for text selection. Instead of every context having to agree on tagging the text and directions, your phone has a quick way of letting you scan the screen for text.

To be fair, I still use the "hold the text to select it" approach when I want to continue with the "select all" action and have some confidence that is going to do what I want.

porkbrain··on Are we stuck with the same Desktop UX forever? [video]
Fair point, it does not on my device
porkbrain··on Are we stuck with the same Desktop UX forever? [video]
Text selection used to be frustrating on mobile for me too until Google fixed it with OCR. I get to just hold a button briefly and then can immediately select an area of the screen to scan text from, with a consistent UX. Like a screenshot but for text.
porkbrain··on Pawn is a simple, typeless, 32-bit extension language with a C-like syntax
Used for example to write GTA SAMP modes. I remember writing them in Pawno IDE. The scripts would get large as I'd export positions of many objects and paste them into the scripts to spawn in game. Makes for an okey "how I started programming" story.
porkbrain··on Is pawn promotion to rook or bishop something that is seen in play? (2012)
Exactly. In my region there are multiple tournaments a month (in season) where players from no ELO to 2300 play. Swiss system means you're going to be paired up/down.

I'm ~1900 which means first two rounds are typically beginners.

porkbrain··on Is pawn promotion to rook or bishop something that is seen in play? (2012)
I've promoted to rook several times in over-the-board tournaments.

It's easier and quieter than stopping the clock and searching for a free queen piece if your position is decisive and your opponent stubborn. Or your piece to be captured immediately. So not necessarily "cocky" as the answers suggest but rather "mindful to other players".

porkbrain··on Fire destroys S. Korean government's cloud storage system, no backups available
If you stacked them they would be about fifty thousand Popocatépetls high, give or take a few zeroes.

UPDATE: as sibling pointed out indirectly, it's eight thousand Popocatépetls [0].

[0]: https://www.wolframalpha.com/input?i=449.5+*10%5E9+*+%28thic...

porkbrain··on Is 4chan the perfect Pirate Bay poster child to justify wider UK site-blocking?
I imagine they would counterargument your proposal along the lines of: "the most endangered children cannot rely on their families to protect them online"
porkbrain··on Possible new dwarf planet found in our solar system
No, according to Wikipedia Planet Nine is expected to have about 5 earth masses.
porkbrain··on Ask HN: What engineering trivia earned you the most cred
You can cascade the deletes in db layer rather than in app layer
porkbrain··on Why do we need modules at all? (2011)
1. Have a global append-only function key-value store.

2. A key of a function is something like `keccak256(function's signature + docstring)`

3. A value is a list of the function's implementation (index being the implementation's version) and some other useful metadata such as the contributor's signature and preferred function name. (Compiler emits a warning that needs to be explicitly silenced if preferred name is not used.)

4. IDE hints and the developer confirms to auto import the function from the global KV store.

5. Import hash can be prepended with a signers name that's defined in some config file. This makes it obvious in git diffs if a function changes its author. Additionally, the compiler only accepts a short hash in import statements if used with a signer.

package.toml

  [signers]
  mojmir = "mojmir's pubkey"
  radislava = "radislava's pubkey"

source.file

  // use publisher and short hash
  import "mojmir@51973ec9d4c1929b@1" as log_v1;
  // or full hash
  import "51973ec9d4c1929bdd5b149c064d46aee47e92a7e2bb5f7a20c7b9cfb0d13b39" as log_latest;
  import "radislava@c81915ad12f36c33" as ln;

  log_v1("Hello");
  log_latest(ln(0));
porkbrain··on Edgar Allan Poe's life was a mess. But his work was in his command
He was also into cryptography: https://www.cs.trincoll.edu/~crypto/historical/poe.html
porkbrain··on Bybit loses $1.5B in hack but can cover loss, CEO confirms
But the space of their effects on the Blockchain state is vast. You need software to translate those effects to a form human can interpret as "what I want"/"not what I want".

Ie. engineering work needs to happen in the UI they used to confirm the tx

porkbrain··on Undergraduate shows that searches within hash tables can be much faster
Viewed through the lens of personal development I suppose one could make an argument that there wasn't much difference between rediscovering an existing valid or invalid solution. Both lead to internalisation of a domain's constraints.
porkbrain··on “The Traitors”, a reality TV show, offers a useful economics lesson
on average the "cleverer" ones get the degrees easier, hence there's a higher chance to pick a "cleverer" candidate if selecting by this criterion than when selecting at random
porkbrain··on Just: Just a Command Runner
Many reasons are already mentioned in other comments. I'd add the following nice-to-have. Sometimes you'd find it easier/preferable to run some scripts with some other shell.

You can set the shell for some commands, for example:

```

set shell := [ "python3", "-c"]

# I can run python!

[no-cd]

foo-bar:

    @import sys; major, minor = sys.version_info[:2];

    assert (major, minor) >= (3, 7), "This script requires at least Python 3.7. Please link \"python3\" to Python 3.7 or higher and try again."
```

And the API for your commands stays consistent for a very little effort. Of course you can achieve all this with just bash scripts but I find it faster and easier to provide a good devex this way.

porkbrain··on Helsing at Eurorust and the Oxidation of Defense
While I did not visit to the conference, I did attend the workshop the blogpost author mentioned.

It was an excuse for a train trip to beautiful Vienna. Also, I met Jon Gjengset for whom I hold a lot of respect, especially his ability to think and talk and explain.

porkbrain··on Steam games will need to disclose kernel-level anti-cheat on store pages
Equating cheaters to energy vampires is great comedy, I'm stealing that.

I'd love to see Colin Robinson play CS 1.6 with wallhack in his basement.

porkbrain··on Fable at 20: a uniquely British video game with a complex legacy
Looks fantastic indeed. I tried running it on Steam deck but I wouldn't call it supported. The default layout configuration is not working, only touchscreen.
porkbrain··on Compressing chess moves for fun and profit
As for promotion: in a valid chess position you could promote a single pawn at three files simultaneously. One by moving forward and then left and right capture. Additionally, you could have two pawns promoting on the same square, again with capture. And you can have a combination of both.

Encode a white's move exd8=N with white pawns on e7 and c7 and three black queens on f8, d8 and b8.

porkbrain··on Architecture.md (2021)
I'd like to see something like [dep-tree](https://github.com/gabotechs/dep-tree) 's visualization augmented with a keyword or LLM vector search. Your query would highlight relevant files and clusters.
porkbrain··on Ask HN: What are the big/important problems to work on?
Your ego should slightly overshoot your ability.
porkbrain··on Things that surprised me while running SQLite in production
If you're staring a Rust project then make sure to check that your SQLite dependency supports txs. Without txs, inserts can take a ~15ms. The `rusqlite` crate supports txs, with `sqlite` I didn't find an ergonomic solution.
porkbrain··on Aztec monks with 1/55 HP no longer die when picking up or dropping a relic
A related discussion about number types:

The Great Debate @ARITH23: John Gustafson and William Kahan

https://www.youtube.com/watch?v=LZAeZBVAzVw

Kahan points out disadvantages of interval maths.

porkbrain··on Italian government seeks to penalize the use of English words
Perhaps this is going to be the first step in Italy becoming real world Anathem.

Jokes aside, I understand the fear of your own language erroding in front of you. I see how this plays into the sentiment of "these goddamn young people, polluting the language of my youth with words I don't understand!"

Yet, after calming down my own emotions, I realise that I cherish the Polish and German words in my own accent of Czech. I value immensely the work of Czech intellectuals fighting for my language against German "overlords" in the 19th century. However, I wouldn't want to give up the trace influence of German on own language. I hope future Italians feel the same way.

I think about this general problematic often. My girlfriend and I are both Czech. Yet, considerable chunk of our conversation happens in English. We both intellectually grew and continue to grow with English, making it typically a more effective modus of discussion. But Czech has its unassailable place in our relationship. The fact that we use both languages and associated idioms, cultural baggage, ..., makes for a richer life.

Good luck to other non native speakers who have to ponder and navigate the same concerns about their identity.

porkbrain··on The $8 Linux Computer
> That's a nice watch you got there, want me to turn it into a webserver?

https://youtube.com/watch?v=lE4UXdJSJM4

porkbrain··on Is America Stealing TSMC?
Seems like a well sourced video. Here are some notes of what's discussed:

- The factories are not joint ventures, they are fully owned by Taiwan.

- Build-outs in US are not going to be the most cutting edge technology.

- TSMC has ~$36bn in capital expenditures in 2022. The Arizona fab is ~$9bn a year. Majority of TSMC investment remains in Taiwan.

- TSMC produces ~15m waifers a year, ~80% produced in Taiwan. Arizona fab will produce ~250k waifers a year from 2024, ~500k from 2026.

- TSMC has at least 5 other build outs in Taiwan.

- The notion that US is going to be self sufficient in terms of chips thanks to the Arizona fab is flawed: 1. By volume, most chips are not what this fab is going to ship. 2. There are other chip foundries with specialty processes in Taiwan. 3. Taiwan leads the rest of the pipeline: assembly, packaging and testing.

porkbrain··on Fast midpoint between two integers without overflow
Related: https://news.ycombinator.com/item?id=30252263
porkbrain··on Audible cheesecake?: How to become a better listener
This could be a line in Alan Parker's "Urban Warrior" bit. Some watchwords strung together, inadequate for the situation they are being posed in.
Page 1 of 3Next →