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 Loop Invariants
I wrote a Babel plugin which brings a similar syntax to JavaScript, so you can write this:

    for (let i = 0; i < someVar; i++) {
       invariant: i < 10000; 
       console.log(i);
    }
along with other kinds of contract, like preconditions and postconditions - https://github.com/codemix/babel-plugin-contracts
phpnode··on Node 5.7.0 (stable) released
No I think those should work with async functions as it is literally just translating `async` -> `yield`, but worth investigating.
phpnode··on Ethereum: Rise of the World Computer
> Bitcoin is used by millions of people a day now.

Tangible example please. Bit Coin transaction volume is about 200k/day, so how are these millions of people using it?

phpnode··on Node 5.7.0 (stable) released
Babel can transform async functions into Bluebird coroutines, so the best of both worlds - https://www.npmjs.com/package/babel-plugin-transform-async-t...
phpnode··on Show HN: GDOM – GraphQL for DOM traversing
Don't worry, graphql isn't related to graphs.
phpnode··on An update on strong mode
In theory, the opposite, because a compiler knows that a constant binding never changes so the value it references can be inlined everywhere it is used without having to do runtime checks. But I think engines are not doing this yet.
phpnode··on GitHub lock-in?
Github jobs has existed for years and years but I agree that they are massively under-utilising their data. https://jobs.github.com/
phpnode··on How to Safely Store Your Users' Passwords in 2016
This one is truly async, it uses a libuv managed thread pool.
phpnode··on How to Safely Store Your Users' Passwords in 2016
It does it on the main thread, pseudo-async, so I agree with you, you should not use this library. Look for a native module instead.
phpnode··on SQLGraph: An Efficient Relational-Based Property Graph Store (2015) [pdf]
The array of pointers thing is standard/common but I'm not aware of any which use the features of the graph itself to avoid pointer indirection. Typically the edges are stored in some kind of tree structure anyway so I'd guess that the savings aren't worth the added complexity when the thing does a lot of pointer lookups besides the initial one. But I'm probably going to experiment with it in my own db project.
phpnode··on SQLGraph: An Efficient Relational-Based Property Graph Store (2015) [pdf]
> The problem with a "pointer" like this is that you then can't move stuff around as easily

You can, it just requires one further level of pointer indirection. Rather than pointing to the physical location of the data, you store a pointer to an offset in an array of pointers.

Alternatively you can point directly if you're prepared to update those pointers when you move things around. Luckily a graph database is ideally suited for this kind of operation because it makes discovering those pointers exceptionally simple and efficient.

phpnode··on The binary search of distributed programming
It certainly seems that way, but one of the fundamental rules here is that you can't ordinarily trust clocks to keep in sync, they drift, jump backwards and forwards etc. Google solve this problem using synchronized atomic clocks in their data centres, which is not an option for most systems running on commodity hardware.
phpnode··on Edward Snowden: The Whistleblower Fantasy
I was reacting to your assumption that I blindly accept the news as reported as truth, in order to "feel better about life" in your words. You don't know anything about me.
phpnode··on Edward Snowden: The Whistleblower Fantasy
The burden of knowlege must rest heavy on your shoulders, if only other people were as capable of critical thinking as you are the world would be a better place... Seriously though feel free to keep your ill-informed assumptions to yourself.
phpnode··on Edward Snowden: The Whistleblower Fantasy
Well, yes, to a large degree. A famous, reputable news source is generally going to provide better quality service than smaller media outlets.
phpnode··on Ask HN: Your Passive Income Suggestions?
In the nicest possible way, your post reads like "Passive income suggestions (2006)" - e.g. I can't really believe that stoozing still works when interest rates are so low, and getting new affiliate sites ranking is very difficult these days.
phpnode··on Preact, a fast 3k React alternative
Coming to the spec soonish and already supported in Babel - https://github.com/jeffmo/es-class-fields-and-static-propert...
phpnode··on Ask HN: How do you deal with 2000 line functions?
Absolutely this. Not only do assertions make it easier to validate your understanding, they capture and preserve that understanding for future developers (including yourself, 6 weeks from now).

Assertions are comments which can always be trusted and which never get out of date. It baffles me that there's so much reluctance to use them (especially in dynamic languages).

phpnode··on A rant about application configuration
* she
phpnode··on Twitter Considering 10,000-Character Limit for Tweets
I propose "figuratively".
phpnode··on Show HN: Really fast webserver for kdb
It's idiomatic style in the K community, e.g. here's a random source file from kdb itself - http://code.kx.com/wsvn/code/kx/kdb%2B/c/c/odbc.c

Some members of that community prefer this style because they find it more readable.

phpnode··on What the web platform can learn from Node.js: The Darwinism of small modules
> I'm not sure it's possible to move a project using Babel 5, async/await, generators and react to upgrade to Babel 6. I've spent hours on it.

Well, you're actually right. Babel 6 has had a lot of problems, particularly with async functions, but they are slowly being worked out. I think it's pretty clear at this point that it was released too early, and they really need smoke tests to prevent this kind of problem in future. If you've already built a significant project using Babel 5, definitely consider holding off the upgrade for another month or two.

phpnode··on The Saga of Craig Wright, the Latest “Inventor of Bitcoin”
This reddit thread offers some pretty interesting / convincing speculation on Craig Wright's scam - https://www.reddit.com/r/Buttcoin/comments/3web4s/some_more_...
phpnode··on V8 crankshaft vs. arguments object
Yes, true
phpnode··on V8 crankshaft vs. arguments object
Things regularly fail to make it due to web compat, e.g. Array.prototype.contains() was rejected.
phpnode··on V8 crankshaft vs. arguments object
IRHydra2 is pretty good for it but has a learning curve.

There is really no need for the arguments object in a world with default and rest parameters, and it has always been an obstacle to performance, so I'm glad arrow functions don't use it.

phpnode··on V8 crankshaft vs. arguments object
It would not be a web compatible change so will never happen. Too much code relies on them being different.
phpnode··on My Livecoding.tv account deletion saga
No one believes this, but even if it were true it would not excuse your behaviour. It is not a defence.
phpnode··on My Livecoding.tv account deletion saga
You just called the woman that you were harassing a coward.
phpnode··on My Livecoding.tv account deletion saga
No one is trashing YC here, plenty of people criticising you and your behaviour though. Maybe you should reflect on that.
← PreviousPage 25 of 34Next →