Better HN
topnewbestaskshowjobs
Log inSign up

phpnode

7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions

Founder of https://codemix.com/ - authoritative product context which makes sure coding agents build the right thing and humans stay in control.

Email: charles@codemix.com

Submissions

comment 8y ago · link · parent

> It's a bit like Amway but everyone is going to be in on it.

Is this supposed to be an endorsement?

comment 8y ago · link · parent

Not a no-op, it wraps the awaited value in `Promise.resolve()`:

   async function foo() {
      const a = await {then(resolve) { resolve(123); }};
      console.log(a);
    }
    foo();

comment 8y ago · link · parent

I see this argument about censorship resistance a lot but I don't really understand it. If the main purpose of the technology is to evade law enforcement is this not a massive reason for governments to ban cryptocurrencies? The user of the technology is presumably committing a crime.

comment 8y ago · link · parent

It doesn't sound like the OP is claiming that at all, Coverity and tools like it use a technique called Symbolic Execution [0]

[0]. https://en.wikipedia.org/wiki/Symbolic_execution

comment 8y ago · link · parent

from the blog post:

> the integrity of these 106 packages were never jeopardized.

are we operating with different definitions of jeopardy here? 106 packages were absolutely at risk of harm during this window. The fact that some community members stepped up is irrelevant, a bad actor could have done a lot of damage here. I think this blog post is completely disingenuous, and doesn't make me trust npm.

comment 8y ago · link · parent

A relatively tiny number of people will ever download the blockchain, a relatively tiny number of people use Tor, how many bits of information does a state level adversary need to deanonymize someone?

comment 8y ago · link · parent

Where does this "bitcoin is a store of value, not a medium for exchange" nonsense come from? Literally the first line of the white paper:

> A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution.

comment 8y ago · link · parent

Which planet is that? This will either explode on launch or orbit the sun for a billion years before burning up

comment 8y ago · link · parent

It will orbit the sun for hundreds of millions of years

comment 8y ago · link · parent

The cost of the second hand Tesla is nothing compared to the PR value of doing this.

comment 8y ago · link · parent

Or a wheel of cheese[0]

[1] https://en.wikipedia.org/wiki/SpaceX_COTS_Demo_Flight_1#Addi...

612.

Elon Musk's Tesla Roadster mounted on Falcon Heavy Payload Adapter(i.imgur.com ↗)

59 points · by phpnode · 8y ago · 43 comments

comment 8y ago · link · parent

The tesla sadly lacks the ability to do a propulsive landing on mars, they'd need a sky crane like Curiosity had - https://en.wikipedia.org/wiki/Mars_Science_Laboratory#Sky_cr...

comment 8y ago · link · parent

The grid fins on the outer cores are aluminium, the centre core is titanium. Newer Falcons will have titanium grid fins (the outer cores have already flown once before)

Edit. Looking closer I'm wrong - the titanium grid fins are on the side boosters and the the centre core is aluminium

comment 8y ago · link · parent

They haven't taken the legs off because they're going to attempt to land all 3 cores, probably 2 at the launch site and 1 on the drone ship

comment 8y ago · link · parent

Not to mention that BFR can carry approx 3x the payload of Falcon Heavy to LEO

comment 8y ago · link · parent

They will launch Musk's Tesla Roadster into orbit around the sun, where it will continue orbiting for hundreds of millions of years.

comment 8y ago · link · parent

the Big Falcon Rocket - https://en.wikipedia.org/wiki/BFR_(rocket)

comment 8y ago · link · parent

Perhaps I should have chosen a better example, argument order is just an illustration.

In 1998 the Mars Climate Orbiter[0] failed because of a fairly simple software error - an imperial value was treated as metric causing the spacecraft to calculate an invalid trajectory and burn up on entry to Mars orbit. This bug was not detected in testing.

With opaque types this could never have happened, it would have produced a compiler error long before the bug ever made it into production. They eliminate an entire category of bugs.

[0] https://en.wikipedia.org/wiki/Mars_Climate_Orbiter

620.

Opaque Types in Flow and TypeScript(codemix.com ↗)

51 points · by phpnode · 8y ago · 9 comments

621.

Stronger, Faster, Better JavaScript with Opaque Types(codemix.com ↗)

3 points · by phpnode · 8y ago · discuss

comment 8y ago · link · parent

Falcon 9 is the rocket, dragon is the capsule

comment 9y ago · link · parent

Is this repeatable though? It seems like this could be explained by a combination of the Frequency Illusion / Baader-Meinhof Phenomenon[0] and the Birthday Problem[1].

That is - it is possible that the reason you were discussing the topic is the same reason that advertisers were targeting that particular phrase at that time. The Frequency Illusion could explain why you noticed that particular ad and why you were surprised. Also you presumably discuss topics all the time that you don't see ads for, but the probability of seeing an ad for any of those topics is quite high (the birthday problem).

[0] https://english.stackexchange.com/questions/153166/what-is-t...

[1] https://en.wikipedia.org/wiki/Birthday_problem

comment 9y ago · link · parent

See also GOTO which is a wart 99.9% of the time but really useful for writing e.g. parsers.

comment 9y ago · link · parent

point is that npm are encouraging you to use npx, which is bundled with npm 5.2+ as a general tool for executing adhoc commands from the terminal. It just massively increases the chance of typos.

comment 9y ago · link · parent

NPM themselves recently launched a new package called npx [0] which will download and execute packages directly from the registry if you don't already have them installed. So if you make a simple typo like this:

    npx crossenv foo
instead of

    npx cross-env foo
you'd have got the malicious version.

[0] https://www.npmjs.com/package/npx

627.

Malicious crossenv package on npm(twitter.com ↗)

578 points · by phpnode · 9y ago · 228 comments

comment 9y ago · link · parent

Surprising because it's probably the lowest hanging fruit possible

comment 9y ago · link · parent

Surprising given that Slack's performance is something people regularly complain about
1
202122
53