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 Show HN: Fast.js – faster reimplementations of native JavaScript functions
you're right in that it's important to consider inputs of different sizes. I did this for the indexOf() functions, I'll do the same here, thanks!
phpnode··on Show HN: Fast.js – faster reimplementations of native JavaScript functions
this library does not overwrite any native functions or manipulate any prototypes, you have to call the fast.js versions explictly - it's opt in.
phpnode··on Show HN: Fast.js – faster reimplementations of native JavaScript functions
An alternative interpretation might be - JavaScript, the high level language language that's so awesome that it can out perform native code*

* as long as you make it do less work

phpnode··on Show HN: Fast.js – faster reimplementations of native JavaScript functions
As well as the example of "sparse arrays" shown in the README, there are some additional slight gotchas around `.bind()`, e.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

These fall outside of the common uses of these methods, and most people don't even know they exist.

phpnode··on Show HN: Fast.js – faster reimplementations of native JavaScript functions
author of the library here. The native implementations have to follow the spec exactly, which means that they have to guard against specific edge cases. The reimplementations in fast.js do not follow the spec exactly, they optimise for 99.9% of use cases and totally ignore the 0.1%. This, combined with the fact that the JS is JITed straight into machine code anyway gives fast.js a significant advantage - it does less work and so is faster.
phpnode··on DreamObjects is down
I think he meant that he had no affiliation himself
phpnode··on A Nice Cup of Tea by George Orwell (1946)
This is a religious matter and as such no tactics are off limits. Tea first is wrong.
phpnode··on A Nice Cup of Tea by George Orwell (1946)
Yes, I read it - I was rather hoping no one else would, it seemed just about plausible enough to be convincing.
phpnode··on A Nice Cup of Tea by George Orwell (1946)
The milk in a latte is typically gradually heated to its temperature, whereas when cold milk is added to hot tea, it changes temperature rapidly. This causes the Maillard Reaction, fundamentally changing its flavour. This is like the difference between cooking a steak at immediately high temperature vs gradually increasing temperature. Same resulting temperature but one is delicious and the other is brown and floppy.

0. http://en.wikipedia.org/wiki/Maillard_reaction

phpnode··on A Nice Cup of Tea by George Orwell (1946)
it's a shame for such a distinguished person to make such an amateur mistake - point 10 is indeed answerable:

1. people who put the milk in first have become adept at adding exactly the right amount of milk to a cup of any size. It's a ubiquitous skill, learnt virtually as soon as the person begins drinking tea in this (proper) way. Orwell was clearly inexperienced.

2. adding the milk last requires simultaneous stirring to correctly assess the tea's consistency. This wasteful and complicated activity is not required when the milk is added first, as the milk is evenly mixed with the tea by the pouring process itself. This saves considerable time.

3. adding the milk to an already boiling cup of tea burns the milk, ruining the flavour of the tea.

However, a true tea lover would never soil their tea by adding milk in the first place.

← PreviousPage 34 of 34