Better HN
topnewbestaskshowjobs
Log inSign up

devit

4,235 karma · joined Sep 10, 2015 (11y ago) · 1,525 submissions

Submissions

comment 6y ago · link · parent

IMHO it's usually better to write a WebExtension instead of using Selenium, since you have more control over the browser, can intercept and modify network requests, can access the DOM from JavaScript while being protected from the page altering the environment, and can ship the code as a browser add-on, while still being able to communicate with native apps.

Only downside is that you can't drive old IE and mobile browsers except for Firefox for Android.

comment 6y ago · link · parent

Ego gratification, acquisition of narcissistic supply.

comment 6y ago · link · parent

Seems like the solution is to wait for the requests to complete, at least up to the point where a "slot" is reserved in the sequence order of a single actor.

comment 6y ago · link · parent

Seems easy to define such a fork: disable JavaScript, and load all resources immediately and unconditionally to disable tracking based on what is visible.

To prevent custom UI, also disable CSS and use a decent default stylesheet (e.g. the reader mode one or a Markdown one).

comment 6y ago · link · parent

It seems it might be an issue with their development abilities or problem-solving motivation:

1. It seems that they write a ".d.ts" file manually in addition to using TypeScript for the code. This is dumb, since TypeScript generates the declarations automatically. However, for them "it was too much overhead and complexity when we attempted it before", which caused them to give up, a very dubious course of action.

2. They claim that changes take minutes to recompile, but TypeScript can compile incrementally, so this shouldn't happen assuming they are organizing their code properly. Also, you can just translate without type checking, which is no worse than using JavaScript instead.

3. They claim that "having two Body classes is obviously wrong" (?!). Of course having two classes with the same name in different namespaces/packages is perfectly fine in properly designed languages (including both JavaScript and TypeScript). Their "Header" shadowing problem also might be due to a lack of understanding of namespaces.

4. They seem to conflate JavaScript vs TypeScript with single file vs multiple files. Of course you can have a single TypeScript file or you can have multiple JavaScript files and bundle them with any JS bundler or just concatenate them.

Given that their codebase seems to be complex according to their compile time claims and that they don't seem particularly skilled given their claims, using a type-deficient language will most likely result in software full of bugs.

comment 6y ago · link · parent

Would this be solved by making it mandatory for all aircraft to have a HUD with an artificial horizon?

Also it seems like a level 5 autopilot should be possible, and obviously making that mandatory would be a perfect solution.

comment 6y ago · link · parent

That seems outright illegal misappropriation of funds, not just being "evil".

comment 6y ago · link · parent

Insurance is done to reduce risk, gambling to increase risk.

Betting on sports is insurance if and only if you bet against your own team for an amount not greater than the winnings.

comment 6y ago · link · parent

Stolon or an equivalent way of automatically deploying on Kubernetes with an Helm chart being officially blessed by the PostgreSQL team and made part of the official distribution.

Also, same for a multi-master solution.

comment 6y ago · link · parent

So if the hardware running the database is suddenly destroyed they try to start another instance really fast?

That seems inferior to having multiple sync replicas ready to take over without having to start a process and replay the WAL.

Also, such an HA block store seems very easy to replicate ( I'd guess there would be something open source already), not much of a competitive advantage.

comment 6y ago · link · parent

Apparently they have several benchmarks where they claim that decompression is faster than memcpy (!).

However, this is only the case because on several Intel x86_64 benchmarks they report memcpy performance between 5-10 GB/s, while even a basic DDR3 dual channel arch has 20 GB/s memory bandwidth, while a modern quad channel DDR4 can have 76.8 GB/s bandwidth, and of course there is no reason for memcpy to be substantially slower than memory bandwidth assuming it's properly implemented (AVX can separately read two and write one 256-bit per cycle = 128 GB/s memcpy at 4GHz).

Am I missing something or is this another case of "implausible claims = they screwed the benchmark = they are incompetent/malicious"?

comment 6y ago · link · parent

It's easy to make this non-contradictory by making the rules apply only to future contracts, or only when the decision maker wants them to apply.

comment 6y ago · link · parent

The advantage of GraphQL is that the code for each API endpoint, which depends on frontend design (e.g. how many comments should be visible by default on a collapsed Facebook story), is now part of the frontend codebase (as a GraphQL query, that is then automatically extracted and moved to the backend), and thus frontend and backend development are no longer entangled.

Without it or a similar system frontend developers have to ask backend developers to create or modify an API endpoint every time the website is redesigned.

Also, it allows to combine data fetching for components and subcomponents automatically without having to do that manually in backend code, and automatically supports fine-grained caching of items.

comment 6y ago · link · parent

The dependency is unavoidable due to the way addition works.

The approach in the article only works if you are adding a lot of numbers together, and then indeed doing carry propagation once at the end is obviously faster.

But of course there is no way that doing the carry propagation yourself on one addition can possibly be faster on a decent CPU that implements add-with-carry efficienly.

comment 6y ago · link · parent

You can use a[(i, j, k)], and also a[i][j][k] for some data layouts.

As for multidimensional array traits, you can use Index<(usize, usize, usize), Output = f32>.

comment 6y ago · link · parent

It's because not even the foundations are not properly engineered, mostly due to lack of funding (because they can't be sold, and anyway the market doesn't reward proper engineering beyond a basic level, and governments don't massively fund open source), as well as lack of accountability for broken and insecure software.

For instance, look at programming languages: to write provably correct code you need dependent types, but none of the dependently typed languages produce optimal code or have a viable ecosystem. This problem has been unsolved for more than 30 years. We also didn't even have a barely decent production language until Rust in 2015.

Or databases: the best database is PostgreSQL and it doesn't even have things as basic as unsigned integers in core (!!!) and doesn't support multi-master in core (and of course, written in an horrible language, which is C). Again, problem unsolved for more than 30 years.

Or operating systems: all OSes are fundamentally insecure, because they are not written in a proper programming language, and at least the desktop ones don't generally use a hierarchical architecture, but rather have a single gigantic kernel-user boundary (plus they have horrible APIs, written in horrible languages, etc.).

Most other programs have no chance of even being provably correct to a given spec since the foundations are missing, and thus much less of provably correctly implementing the provably optimal solution to a problem. They are not even engineered properly with reasonable expectation of correctness, because there is no liability if you release an incorrect program.

Of course it's not clear if this is fixable without developing a general purpose AI to write the software or massive societal changes.

comment 6y ago · link · parent

More relevant version: https://www.youtube.com/watch?v=ILYwXmUpuWE&t=0m7s

comment 6y ago · link · parent

Having expiring certificates/key rotation might be a net negative: if you keep the private key secure, there is no need to rotate it, and it avoids a lot of hassle. Also, if you have a revocation mechanism, then rotation doesn't add that much for keys that are only used for signing and not for encryption (like the CA keys).

Of course in some cases like domains it's necessary since the domain can be transferred, but this is solvable by DNSSEC+DANE.

comment 6y ago · link · parent

Appending "reddit" to the query or doing it on Reddit directly can often return usable information.

comment 6y ago · link · parent

Google should ban all sites with Amazon affiliate links from its search engine.

comment 6y ago · link · parent

The title is misleading: the vulnerabilities are already fixed in the most recent version according to the article.

comment 6y ago · link · parent

How do they know whether a restaurant is "black-owned"?

comment 6y ago · link · parent

It's the only production-ready language that is both memory safe and has zero-cost abstractions (i.e. for any C code you have Rust code that compiles to equivalent assembly, and using more abstractions in Rust does not make the assembly less efficient unless the abstraction can't be implemented otherwise).

Also as long as you accept not having dependent types (at least for the short and mid-term) and several currently unimplemented features, Rust is the optimal way a programming language can be designed other than assorted minor warts.

comment 6y ago · link · parent

Bash has perfectly functional if, while and for constructs.

comment 6y ago · link · parent

Seems dubious, since the cultural difference between people in the same country is huge and can be much larger than the difference between countries.

The average programmer at Instagram in California probably doesn't have much more in common with the average Instagram influencer or feed-scroller than the average programmer in India (both programmers tend to spend most of their time thinking about computing and abstract math/CS concepts, while the influencer spends it thinking about marketing, social relationships, travelling, etc. and the feed-scroller is all about instant gratification and pop culture).

comment 6y ago · link · parent

So they suspect that Surgisphere has manufactured or falsified the data?

comment 6y ago · link · parent

I meant time consuming in developer time, sorry.

comment 6y ago · link · parent

Because it's impossible to do this automatically in the general case.

In particular, types may not be sendable to other threads, or may have side effects on dropping, and in those cases you would need to rearchitect the code before you can apply this technique.

Also this technique adds overhead, so it should never be used (including not doing it conditionally) if you don't care about latency or if the objects are always small, and the compiler cannot know whether that is the case.

1
242526
51