Better HN
topnewbestaskshowjobs
Log inSign up

zeroimpl

621 karma · joined Jan 11, 2018 (8y ago) · 450 submissions

Submissions

comment 3y ago · link · parent

Which is what’s great about these languages - best of both worlds.

I also think this discussion shouldn’t be about languages at all, you can have objects of some form in any imperative language including C. It’s more about what design patterns make sense for specific problems, and sometimes the answer is OO-style (eg with class hierarchies) and sometimes not.

comment 3y ago · link · parent

It’s pretty common for most SQL queries to be reading data that is entirely cached in memory. In these cases, the performance limitations often come from sorts or hash joins.

comment 3y ago · link · parent

This is why you need a lawyer familiar with the local regulations, which clarify these things. Thus this test is invalid because there should be an “there is not enough information to answer” answer.

comment 3y ago · link · parent

However, it's already the case that if a postgres process crashes, the whole cluster gets restarted. I've occasionally seen this message:

    WARNING: terminating connection because of crash of another server process
    DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
    HINT: In a moment you should be able to reconnect to the database and repeat your command.
    LOG: all server processes terminated; reinitializing

comment 3y ago · link · parent

Agreed. I'm still using 2.0. I don't write the JSON directly (except for the JSON Schema part), nor do I look at it directly. These major backwards-incompatible changes don't seem like the right move to me, they fragment the tooling and make it difficult for a given library to support multiple versions.

This is almost like calling JSON as XML 2.0.

comment 3y ago · link · parent

I think you’d have to have a fairly awkward API design in order for this to be an issue. For example, if “POST /posts” does something else, like flags a post for a moderator to review.

That being said, I don’t see this feature being particularly beneficial either. Only the caches which observed the request could know to purge the cache. So you can’t actually rely on it for cache invalidation.

comment 3y ago · link · parent

TIL sending a POST request to a URL invalidates the cache for GET requests of the same URL.

Going to have to review my REST APIs to make sure that’s not a problem.

comment 3y ago · link · parent

Authy also supports their own auth system that isn’t TOTP but rather a server-push model which requires your device to be online to receive the token.

comment 3y ago · link · parent

Comments can also be accessed at runtime :)

comment 3y ago · link · parent

Might as well just use bash

    sleep $((RANDOM % 600)) && fetch-tcl-logs

comment 3y ago · link · parent

Am I charged less for that data transfer when it’s 5G? To me the important consideration is the cost of the data. 1Gbps seems pointless if the cost is still $10+/GB.

comment 3y ago · link · parent

> Oracle and MySQL do not have this problem in their MVCC implementation because their secondary indexes do not store the physical addresses of new versions. Instead, they store a logical identifier (e.g., tuple id, primary key) that the DBMS then uses to look up the current version’s physical address.

This doesn’t have anything to do with MVCC. I’m sure PostgreSQL could implement an index format that piggybacks on another index rather than pointing at the physical page directly, without overhauling MVCC.

comment 3y ago · link · parent

I’m fully against using triggers to implement business logic, but find stored procedures can be great for encapsulating some elements of application/business logic. I’ve got several applications that access the same databases, and putting logic in the database avoids needing to duplicate it in clients.

Most comments about debugability are nonsense. It’s just different, with some pros and cons. One simple example - if you have a bug in production, you’re not going to attach a debugger to your production application. But you can absolutely open a readonly connection to the database and start running queries, invoking functions, etc. It helps if you can architect your functions to distinguish pure readonly functions from those with side effects, but you can still debug even if that’s not the case.

comment 3y ago · link · parent

I know it sometimes feels easier to just implement something than file a JIRA ticket with enough detail to describe what needs to be done.

comment 3y ago · link · parent

Ah I thought they meant flipping the finality of the final state, but I guess they said "states" so your interpretation makes more sense.

comment 3y ago · link · parent

That example doesn’t really fit since one easily could compute the negation of “a|(aa)+” in linear time by simply returning the opposite of the top-level node in the tree.

Perhaps something like “X|!Y” or similar might be impossible?

comment 3y ago · link · parent

My point is mostly that the article implies Apple, Microsoft and Linux (or at least Linus) agree on using the term arm64, but the agreement doesn't seem to be too deep given that uname reports different values.

Btw in updating a Docker image to support multi-arch, I sometimes had to download binaries named with arm64 in the name, and sometimes with aarch64 in the name. But the previous version had the same issue with amd64 vs x86_64, so it's not a new issue.

comment 3y ago · link · parent

So when I run “uname -m” on Mac it says “arm64”, but running it in a docker container on the Mac it says “aarch64”. Doesn’t seem like everybody is in agreement.

comment 3y ago · link · parent

You likely made the same incorrect assumption from the title that I did. Replace “backup server” with “backup appliance” and it will be more clear.

comment 3y ago · link · parent

Ha I had a need for this yesterday. Just added a timestamptz column and text column. In my use case the text column preserves the input value for display to the user while the timestamp itself is used programmatically. But a “TIMESTAMP WITH TIME ZONE PRESERVING TIME ZONE” data type would be cool.

comment 3y ago · link · parent

I believe the metadata about them is still written to various system catalog tables. Creating lots of temp tables will cause autovacuum activity on tables like pg_attr, for example.

comment 3y ago · link · parent

Is this from experience? From a quick google search it seems that’s not automatic, and they also have a documented process for how this works for 3rd-party sellers too, giving them the option to dispute or accept it.

comment 3y ago · link · parent

I dunno, if you “echo foo > /dev/null” then “cat /dev/null” you won’t get foo back. Plenty of assumptions about filesystem behaviour don’t work in all cases.

That being said, I’d prefer if the symlink actually worked and sent the packet.

comment 3y ago · link · parent

While they are probably overpriced, if you buy from Dyson you know you are getting pretty good quality. My prior vacuums were from Shark and Hoover and they sucked in the wrong way. While I probably could have gotten a decent vacuum from one of those well-known generic vacuum companies, going with Dyson assured I'd get something much better than I previously had. If I saw a Miele vacuum on the shelf, I'd have no idea what to expect, given have never heard of the brand before.

comment 3y ago · link · parent

That’s called a self-encrypting drive (SED) and is pretty common. It just costs more and/or is slower.

comment 3y ago · link · parent

I didn’t even know <input type="date"> was a thing, I rely on JS datepicker libraries in various places. However there’s usually plenty of configuration that goes along with that, so I’m not surprised it isn’t optimal in all cases.

comment 3y ago · link · parent

I recall this being annoying for me as an app developer trying to perfect the app icon. You upload the app icon as a square image, and Apple applies the round corners when they distribute it. I wanted to preview how it’d look on the App Store (back when every app submission would take weeks to get approved), but found the rounded corners from GIMP just didn’t match. At least they had stopped applying gloss effects by then which totally ruined the colors.

comment 3y ago · link · parent

I know it’s referred to as film grain, but digital cameras also have grain, and the amount of grain will vary from shot to shot depending on lighting, shutter speed etc.

Adding extra fake noise to the movie solves a few problems such as ensuring a consistent look from scene to scene, as well as avoiding video artifacts like banding.

It’s also an artistic choice just like the choice to use telephoto lenses that blur backgrounds into fuzzy balls of light.

comment 3y ago · link · parent

Also is it timeoutMs, timeoutMS, or timeoutMillis?

comment 3y ago · link · parent

I’m confused because this is how it already worked. Unlike regular purchases, subscription pricing was always managed by choosing a price in one territory, letting it recommend prices for all the other territories (based on the exchange rate at that date) and giving you the option to make final adjustments. The prices never adjust for exchange rates afterwards unless you re-run the process manually. This was required because fluctuating prices are bad for subscriptions as customers get locked in.

So I don’t understand what’s different here.

12345
15