Better HN
topnewbestaskshowjobs
Log inSign up

ComputerGuru

32,405 karma · joined Jan 3, 2008 (18y ago) · 8,297 submissions

mqudsi on most sites.
Submissions

comment 4y ago · link · parent

In the world of the glue that holds the web together, A is a DNS record that maps a domain name to an IPv4 address. AAAA is a DNS record that maps a domain name to an IPv6 address. A website without an AAAA can only be used over IPv4. (The opposite is also true, a website like http://ip6only.me/ that has only an IPv6 AAAA DNS record cannot be reached over IPv4.)

A user noticed that Reddit recently turned off its AAAA records, and posted asking why it was now an IPv4-only site.

comment 4y ago · link · parent

@dang could we make this the submission url? It seems to be the same info, by the same individual.

comment 4y ago · link · parent

> my personal guideline is to always allocate reasonable capacity on construction rather than on first insertion.

That works until probabilistically there is a decent chance the capacity will always be zero.

comment 4y ago · link · parent

The format/spec doesn’t change, the implementation does. “This field can be variably sized” vs “but in practice since this is a strict table it will always be exactly n bytes”

comment 4y ago · link · parent

Yup. Most newcomers to SQLite are bitten hard by the fake datetime support.

comment 5y ago · link · parent

> but I can't see those being huge wins.

I agree from an algorithmic perspective but in the real world, it really depends. The size of a non-text/binary cell within a column is now fixed, meaning guaranteed to never need to resize/reallocate when streaming results. That could translate to non-negligible improvements (multiple percentage point speed up) if it’s implemented separately from the existing code path.

comment 5y ago · link · parent

If anything, this behavior is far simpler than trying to automagically coerce types and marshal differing types to/from one column.

comment 5y ago · link · parent

It’s actually really important in some edge cases. For instance, I have a column that is declared as text but I read and write to it via the blob api (because the source is utf8 bytes I don’t want to parse client-side for allocation reasons). The flexible typing ended up - silently - storing the fields as blobs, but comparisons with strings continued to work (“foo” == table.col) until I tried changing that to a pattern (table.col like “%foo”) at which point there were runtime exceptions (iirc). I had to update all existing data to cast the columns to the correct type, whereas the original insertion query should have been doing that from the start, but SQLite was too flexible for my own good.

comment 5y ago · link · parent

The existing check syntax would cover inserts but wouldn’t have supported the behavior of the new “any” type in a strict table.

What would be nice is if SQLite had separate “compatible with” and “read-only compatible with” fields, since the read-only behavior should not have changed at all (although I suppose describing the table would fail depending on how the presence of the STRICT modifier is codified).

comment 5y ago · link · parent

It says “if it doesn’t change the semantics of the query” and not “if it isn’t guaranteed by the spec,” which means it actually should only happen in cases where it doesn’t break anything, eg “foo in (… only now without an implicit order)” but not “foo == (select foo from (… now without implicit order) limit 1))” - at least, presumably.

comment 5y ago · link · parent

It’s really no more than an additional (hyper optimized) check constraint on the type; with branch prediction it’s probably ~free.

comment 5y ago · link · parent

The biggest news, of course, is the addition of the long-awaited STRICT mode which fixes SQLite's biggest shortcoming (at least from a particular perspective) by turning into a proper, strongly-typed datastore.

https://www.sqlite.org/stricttables.html

comment 5y ago · link · parent

GitHub status is still showing green, but the site is down and most links to uncached content within repositories are either taking forever to resolve, returning a 404, or returning a 500 error.

https://www.githubstatus.com/

comment 5y ago · link · parent

Non linearly. It’s like saying $5 off anything from a turkey wrap to a Lamborghini.

comment 5y ago · link · parent

Wouldn’t it be a huge risk in some ways? People don’t know site xyz is Shopify until they’re on xyz and therefore probably have no qualms with Shopify hosting xyz. If it were a marketplace, someone “just browsing” would find something that offends their oh-so-delicate sensibilities and the next day some grotesque exaggeration like “Shopify supports terrorists” or “Shopify is pro/anti-abortion” leads the headline news.

comment 5y ago · link · parent

My lab scale shows me grams to the thousandth (the accuracy is only to the hundredths). Would you have it show me 7000mg instead? What about 17000mg?

I think it’s much better to pick a unit that makes the most sense for the bulk of your readings and abuse it instead of changing units on me. Imagine if it went from 999mg to 1g, now imagine it trying to settle between them. Or you are weighing a dozen items that are all expected to have a weight of about 1g and need to log the results - think of the unnecessary cognitive overhead the changing units would cause.

comment 5y ago · link · parent

There are two different Blu-ray dye technologies, LTH and HTL. HTL is the original and uses more expensive inorganic materials (germanium, bismuth, or palladium) and then there's the cheaper LTH that came later and uses an organic dye that's more susceptible to light, breaks down rather quickly over time, and has more burning/reading issues. You don't want to use the latter.

Typically if the surface of the disc is gold and darkens with writing, it's an LTH disc.

comment 5y ago · link · parent

No problem. I was loose with my lingo earlier; it’s not called a multi-region bucket but rather a multi-region S3 access point (hence the behavior described). More here: https://aws.amazon.com/s3/features/multi-region-access-point...

comment 5y ago · link · parent

S3 offers multi-region buckets that automatically read/write from one of n buckets in n regions. Cross-region replication rules give you eventual consistency (without conflict resolution) across all buckets, which is good enough for backup systems with unique file names/paths.

comment 5y ago · link · parent

This may or may not be the case here, but generally speaking…

Pretty high for any parity-based multi-disk system. The remaining disks get stress tested when a disk fails and you need to copy everything over to the replacement. It’s why RAID5 is no longer sufficient with today’s disk sizes and why a RAID10 (which can only lose any one disk plus a specific other disk) is actually real-world safer than RAID6 (which can lose _any_ two disks).

comment 5y ago · link · parent

We’ve come a long way since CD-R; I said this earlier but I guess it’s worth copy-and-pasting here:

> There are Blu-ray Discs specifically engineered for long-term archiving and have BER guarantees (anomalous bit read per gb of data stored per year archived or something).

Now these are obviously simulated numbers (the tech isn’t even old enough to test) but it’s a start: it means people are at least considering the right questions.

I wouldn’t write sensitive to a Blu-ray directly unless it was the kind of data where a bit-flip is not a huge deal (eg a backup of users’ profile images where there are many small files, a bit flip affects the content but doesn’t compromise the overall data, errors aren’t cascading, etc). There’s already bit error correction baked into the analog <-> digital transition layer but it’s not great - but fortunately efficient bit error correction at the file level has been a thing since before binaries on Usenet. Stick some PAR2 files on the Blu-ray or even serve your backup as a Blu-ray Disc plus a DVD-R stuffed to the brim with PAR2 data for the former (I prefer the first approach).

comment 5y ago · link · parent

There are Blu-ray Discs specifically engineered for long-term archiving and have BER guarantees (anomalous bit read per gb of data stored per year archived or something).

comment 5y ago · link · parent

This lets you build against the MSVCRT that ships with all versions of Windows: https://github.com/neosmart/msvcrt.lib

comment 5y ago · link · parent

I was going to say three days, but it doesn’t matter. That’s 7% then turn it into a birthday problem (the world’s full of people having unprotected sex for the first time with someone at any given time) and there you go. Deduct points for bad form or bad sperm and it’s still a crazy number. It’s only a talking point when it’s the case, so it’s bound to sound like it’s happening to everyone.

comment 5y ago · link · parent

Yes, with configure-via-code being an option.

comment 5y ago · link · parent

> Another common and ridiculous meme is the "pregnancy after having sex once" idea.

Are you suggesting the odds of that are so low that they’re laughable? Because they’re not..

comment 5y ago · link · parent

The only client-side rendered webapp I enjoy using is GitHub’s and that’s because it’s indistinguishable from a regular server-side website (until a page fails to load or takes forever to load, but I’ll give them a pass on that).

comment 5y ago · link · parent

The 9560/5520 battery was perfectly removable. I didn’t know they did away with that the next year.
1
888990
277