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 9y ago · link · parent

At least there wouldn't be a crosswind

comment 9y ago · link · parent

Not just the 80s, until at least 2000 and probably a lot longer

comment 9y ago · link · parent

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

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

Yeah probably, but it's just an example

comment 9y ago · link · parent

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...

comment 9y ago · link · parent

Is this the most Hacker News title of the year so far?

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

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?

comment 9y ago · link · parent

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

comment 9y ago · link · parent

Nope, it's supported in the Harmony branch, which is still under development

comment 9y ago · link · parent

The left has an unfortunate willingness to expend more energy on fighting each other than the people that they truly oppose.

comment 9y ago · link · parent

(can't edit my post any more)

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

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

Yes, as of about 25 mins ago - https://github.com/gajus/prepack-webpack-plugin

comment 9y ago · link · parent

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)

comment 9y ago · link · parent

> 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

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

I can emphasise with his response, I don't know if I'd respond in that way myself.

comment 9y ago · link · parent

Perhaps it depends where you are, Oxford English Dictionary only mentions the shop meaning.

comment 9y ago · link · parent

Not in English as far as I'm aware.

comment 9y ago · link · parent

delicacy - a delicatessen is somewhere you'd buy delicacies

comment 9y ago · link · parent

EFL is open source software, BSD licenced. The original author of the comment is not a customer. It's some uninformed person trashing the good work someone has made available to them for free. This attitude makes me want to stop writing open source, it's disgusting to see.

comment 9y ago · link · parent

The responses in that thread give me a headache, has the daily wtf forum always been such a wasteland? One of the replies is "someone posted your software to the daily wtf so there MUST be a problem with your software, you should just accept it and here's how you should respond". Maddening

comment 9y ago · link · parent

Your comments have all the empathy of someone who has zero understanding of schizophrenia.

comment 9y ago · link · parent

A sufferer of schizophrenia is not guilty of the way their condition manifests. They are the victim of an illness.

comment 9y ago · link · parent

BSDs typically have all their userspace tools in the same tree as the kernel, it's easier for them to make these breaking changes than it is for linux where the kernel live in one place and the rest of the code is scattered far and wide

comment 9y ago · link · parent

What a ridiculous comment, a gun's only purpose is to kill, and yes, incapacitated people should not be driving if they present a danger to other road users.

comment 9y ago · link · parent

* if it receives at least 4 upvotes before falling off the "new" page.

comment 9y ago · link · parent

I didn't flag it, but I'd imagine a lot of people don't trust the source (any more).

Edit: Why the downvotes? I didn't indicate my position, I pointed out that some people don't trust WikiLeaks any more, which is obvious - go and look at the responses they get on twitter.

1
212223
53