HNHacker News
TopNewBestAskShowJobs

phpnode

7,416 karma · joined October 23, 2009

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

submissionscomments
phpnode··on SpaceX’s Falcon Heavy rocket sets up at Cape Canaveral ahead of launch
the Big Falcon Rocket - https://en.wikipedia.org/wiki/BFR_(rocket)
phpnode··on Opaque Types in Flow and TypeScript
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

phpnode··on SpaceX raises another $100M
Falcon 9 is the rocket, dragon is the capsule
phpnode··on Ask HN: Has anyone tried to debunk the myth that Facebook is listening?
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

phpnode··on Block Comments Are a Bad Idea
See also GOTO which is a wart 99.9% of the time but really useful for writing e.g. parsers.
phpnode··on Malicious crossenv package on npm
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.
phpnode··on Malicious crossenv package on npm
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

phpnode··on Slack using React Dev Build in Production
Surprising because it's probably the lowest hanging fruit possible
phpnode··on Slack using React Dev Build in Production
Surprising given that Slack's performance is something people regularly complain about
phpnode··on Rocket Propellant from Lunar Soil
At least there wouldn't be a crosswind
phpnode··on Pascal at Apple
Not just the 80s, until at least 2000 and probably a lot longer
phpnode··on Babel-preset-php: PHP7 to ES7 syntax translator
You did a great job with this, I started something really similar about 6 months ago because I wanted to port SabreDAV to js (I didn't quite get to the stage of self hosting PHP parser) but eventually came to the same conclusions, even with a good codebase idiomatic PHP does not map cleanly to idiomatic JS
phpnode··on Rebass – Functional React UI component library built with styled-components
Guessing you got downvoted because it's not really relevant - live editable code is nice for docs but doesn't explain why a property is poorly named.
phpnode··on Pattern Matching with TypeScript
Yeah probably, but it's just an example
phpnode··on Pattern Matching with TypeScript
It would be nice to be able to use the annotations directly, we support this in flow-runtime[0] but I think it would be fairly straightforward to support in TypeScript too,

It looks like this:

    import t from 'flow-runtime';

    const makeUpperCase = t.pattern(
      (input: string) => input.toUpperCase(),
      (input: number) => input
    );

    console.log(makeUpperCase("foo bar"));
    console.log(makeUpperCase(123));
    console.log(makeUpperCase(false)); // throws

[0] https://codemix.github.io/flow-runtime/#/docs/pattern-matchi...
phpnode··on 2bit Astrophotography with the Game Boy Camera
Is this the most Hacker News title of the year so far?
phpnode··on Searx – a privacy-respecting, hackable metasearch engine
Sometimes legitimate accounts trip a spam filter and get shadow banned, if you go directly to the comment's page (click the time link) there's a `vouch` link you can click to vouch for that person and restore their account.
phpnode··on Google Cloud Prediction API End of Life
This is one of those occasions where evidence and material facts are irrelevant, what actually matters is how people feel about using Google products. Is the average developer going to feel confident about recommending a Google service to their manager?
phpnode··on Google Cloud Prediction API End of Life
Marketing is all about confidence, regardless of the facts the public perception is that google shuts down services with wild abandon, that is a perception google needs to work to fix and your response merely confirms it
phpnode··on UglifyJS 3 Released
Nope, it's supported in the Harmony branch, which is still under development
phpnode··on Leaked document reveals UK plans for wider internet surveillance
The left has an unfortunate willingness to expend more energy on fighting each other than the people that they truly oppose.
phpnode··on Prepack helps make JavaScript code more efficient
(can't edit my post any more)

I made a plugin to do this here - https://github.com/codemix/flow-runtime/tree/master/packages...

phpnode··on Prepack helps make JavaScript code more efficient
Awesome work! Are there plans to incorporate Flow definitions as an alternative to the __assumeDataProperty helpers?

Edit: Looks like this is targeting compiler output, so Flow types would typically be gone by that stage. Integration with Flow could come via a babel plugin that emits `__assumeDataProperty()` when it encounters a convertible Flow type.

phpnode··on Prepack helps make JavaScript code more efficient
Yes, as of about 25 mins ago - https://github.com/gajus/prepack-webpack-plugin
phpnode··on Forall.js: Idris-like static types and invariant checks for JavaScript
There's a fair bit of work in this area that leverages Flow type syntax, e.g:

- https://github.com/gcanti/tcomb

- https://github.com/gcanti/io-ts (for typescript)

- https://github.com/codemix/flow-runtime (i wrote this)

And another alternative is to use Design by Contract, like Eiffel:

https://github.com/codemix/babel-plugin-contracts (also me)

phpnode··on Lego Macintosh Classic with e‑paper display
> No idea why my account would be shadowbanned.

3 years ago you committed the offence of punning on HN, https://news.ycombinator.com/item?id=5144413

phpnode··on Samsung's Tizen is riddled with security flaws, amateurishly written
I can't comment on the specific details, I've never used EFL, but in general, when encountering problems with open source software you can do one of two things:

1. Write a long and angry rant about how terrible the software is on a public forum.

2. File issues, participate in the community, ask questions on the mailing list, submit pull requests to improve the docs, try and understand the design decisions behind the software you're using - it's possible that the author knows more about the problem than you, and there are perfectly good reasons for why things are as they are.

One of these things is more productive than the other.

phpnode··on Samsung's Tizen is riddled with security flaws, amateurishly written
I can emphasise with his response, I don't know if I'd respond in that way myself.
phpnode··on Dolphins' elaborate octopus-hunting strategy
Perhaps it depends where you are, Oxford English Dictionary only mentions the shop meaning.
phpnode··on Dolphins' elaborate octopus-hunting strategy
Not in English as far as I'm aware.
← PreviousPage 20 of 34Next →