Better HN
topnewbestaskshowjobs
Log inSign up

tynorf

96 karma · joined Oct 3, 2017 (9y ago) · 52 submissions

[ my public key: https://keybase.io/tynor; my proof: https://keybase.io/tynor/sigs/cDld0ea8BUMbX4Blb2Hs-zUV9Cp9rGQDSu7I4SGZXeI ]
Submissions

comment 3w ago · link · parent

While I was expressing an ideal setup, it isn’t all or nothing. A single backup is still better than none at all.

I suppose I didn’t specify exactly what I would recommend to someone who thinks it’s too hard, so here is that:

1. Install Backblaze. This is basically fire and forget. 2. (1) is enough for most people, but if interested (and on a Mac, which is what I’m familiar with), plug in an external SSD once a week or so for Time Machine. Setup involves clicking on the drive in the setup wizard and specifying an encryption password.

I don’t know about “ultra” robust, but this gives you protection from accidental deletions, natural disasters happening to your computer, hardware failures, and corruption from software bugs. The ongoing maintenance is plugging in a hard drive once a week.

If that is too much effort, just (1) provides natural disaster and hardware failure protection. It helps somewhat with the others but Backblaze only saves versions for 60 days and that’s a tight window to notice subtle corruption of e.g. your photos.

comment 4w ago · link · parent

> PSA to make sure devices with non-removable storage are backed up!

Really this should be devices full stop. Also, "backed up" should include no fewer than two backups on different media and in different physical locations e.g. Time Machine to an external SSD _plus_ continuous cloud backup.

comment 3mo ago · link · parent

They still need to buy said RAM from all the same players.

comment 3mo ago · link · parent

FWIW, if you aren’t interleaving other allocations (which includes on other threads), the ArenaAllocator in Zig doesn’t have this problem. If you attempt to resize the most recent allocation, it will do so in place if possible.

https://ziglang.org/documentation/0.16.0/std/#std.heap.Arena...

comment 4mo ago · link · parent

IIRC: it is to leverage the OS page cache rather than having a separate buffer pool in user land. By default lmdb uses normal pwrite/fsync for the write path, but can optionally use a writable mapping and (presumably) msync.

However, some people think there are problems with this usage: (pdf warning) https://www.cidrdb.org/cidr2022/papers/p13-crotty.pdf

comment 10mo ago · link · parent

The computer has 18GB of total RAM so I would hope that it’s already trying to conserve memory.

It’s kind of humorous that everyone interpreted the comment as complaining about Chrome. For all I know, it’s justified in using that much memory, or it’s the crappy websites I’m required to use for work with absurdly large heaps.

I really just meant that at least for work I need more than 8GB of RAM.

comment 10mo ago · link · parent

Chrome on my work laptop sits around 20-30GB all day every day.

comment 2y ago · link · parent

Perhaps a small nit, but the “design space tree” looks more like a directed graph.

comment 2y ago · link · parent

You can try setting `export PYTHONWARNINGS="ignore"` to suppress warnings.

comment 2y ago · link · parent

Anecdotally, I fly round trip out of SEA ~3 times a year and experience very bad turbulence on about half the flights. Earlier this year it was bad enough to suspend drink service.

comment 3y ago · link · parent

> At Amazon you can't even open the building next door without approval.

This is not true.

comment 3y ago · link · parent

This is a very important point.

I'd argue all these "publish your DB schema as a GraphQL endpoint" frameworks that seem to proliferate have done a lot of damage to GraphQL's reputation. Strongly coupling data to presentation seems like such an obvious anti pattern, yet tools doing just that seem to be very popular for some reason.

comment 3y ago · link · parent

You might be interested in this: https://brandur.org/idempotency-keys

comment 3y ago · link · parent

The objects directory stores every file (and tree, commit, etc). Pack files are an optimization storing diffs.

comment 3y ago · link · parent

Cassandra does not make you immune to database issues: https://monzo.com/blog/2019/09/08/why-monzo-wasnt-working-on...

comment 3y ago · link · parent

The interior has been aluminum, but the band around the outside has been stainless steel.

> Ceramic Shield front, Textured matte glass back and stainless steel design

https://support.apple.com/kb/SP875?viewlocale=en_US&locale=e...

comment 3y ago · link · parent

Yes, that would be a different reason to prefer worktrees (that I mostly agree with). I was responding to the specific storage space claim.

comment 3y ago · link · parent

FWIW, local git clones use hard links for object files, so share a lot of their data.

https://www.git-scm.com/docs/git-clone#Documentation/git-clo...

comment 3y ago · link · parent

I'm pretty sure part of the contract with gzip (and compression in general) is that applying it N times is undone by decompressing N times.

The size definitely gets bigger with each iteration:

  $ echo text >0.txt
  $ for i in {0..9}; do                             
  gzip <$i.txt >$((i + 1)).txt
  done
  $ ls | sort -n | xargs -n1 wc -c
       5 0.txt
      25 1.txt
      46 2.txt
      69 3.txt
      82 4.txt
     105 5.txt
     120 6.txt
     143 7.txt
     161 8.txt
     184 9.txt
     207 10.txt

comment 4y ago · link · parent

Something like this? https://stop.lying.cloud/

comment 5y ago · link · parent

I believe orf is talking about the read(2) syscall, which is blocking.

comment 5y ago · link · parent

OWASP is a good resource for web security related topics. i.e. https://cheatsheetseries.owasp.org/cheatsheets/Authenticatio...

comment 5y ago · link · parent

I think the classic example is article list with author details. You load the articles (one query), then for each article you load its author (N queries). Naive use of an ORM causes this:

  articles = Article.load(limit=10)
  for article in articles:
    # .author implicitly runs a query
    author_name = article.author.name
This can be avoided in ORMs providing prefetching (e.g. `Article.load(eager_load='author')`).

comment 6y ago · link · parent

I believe being lenient in accepting input is what leads to SSRF attacks (HTTP request smuggling via disagreeing `transfer-encoding` and `content-length` headers).

comment 6y ago · link · parent

Probably either via a third party service (such as AWS secrets manager), or mounted as files scoped to the user your process is running as (which is not root, right? :) ).

comment 6y ago · link · parent

Just a point of clarification: native app notifications on iOS are absolutely opt-in. If the app wants to send notifications it requires a dialogue and user confirmation.

Disappointingly, Apple makes an exception for their first party apps.

comment 6y ago · link · parent

Out of curiosity, how many windows/tabs? I routinely launch FF with dozens of windows/hundreds of tabs and I've never had macOS kernel panic in that case.

comment 6y ago · link · parent

Curious: what is your definition of strongly typed, contrasted with weakly typed? How about static vs dynamic?

comment 6y ago · link · parent

I haven't actually watched it in a while, but are you referencing this talk by Chandler Carruth? https://youtu.be/yG1OZ69H_-o

comment 6y ago · link · parent

Unfortunately:

  E183: User defined commands must start with an uppercase letter
12