But we see that you've noticed and I think the folks working on HHVM internally will get that corrected soon!
213 karma · joined January 26, 2011
But we see that you've noticed and I think the folks working on HHVM internally will get that corrected soon!
I think if we had to do it again (and get to keep the knowledge of the last few years), we'd probably skip mixins. We'd surely do some other things differently too though :)
I worked on that 4 years ago :) <http://zpao.com/posts/about-that-hybrid-v8monkey-engine/>. The Node community at the time wasn't a huge fan, though it's effectively the same thing that MS just did (build a minimal V8 API shim on top of another JS engine). I guess everybody is ok with a little fragmentation now. Our intention was also to try to get this upstreamed, however with low interest and other things to do, we didn't follow through.
I'm excited to see this, and especially to have the MS folks involved with the TC. I'd love to see an engine-agnostic API but realistically I don't think it'll happen, at least not anytime soon. Right now Node itself definitely relies pretty heavily on the V8 APIs. Those APIs can be abstracted for the most part (even if each engine is just shimming those parts of the V8 API) but the other problem is the longer tail of binary npm modules. Right now they have the full V8 API to work with. If they do a shim layer then it will come at cost for every vendor except V8. And then maintaining that layer as V8 changes APIs. If you go the engine-agnostic API route, then you will need coordination between engine vendors. That opens the doors to a multitude of problems.
After that you're only taxed on gains. If you sold on the day of reception, then your gains/losses are likely minimal. Eg, receive at 50 sell at 50 = 0 gains/losses. Sell at 51 and you have $1*N gains. Those gains are taxed at a higher rate until a year after the stock appeared in your account. I think the difference is ~10% (35 vs 25 or so).
So there are definite tradeoffs between holding for the year vs selling immediately. This part is no different than buying/selling on the stock market.
tldr; yes, but not exactly
```js / @jsx m.dom */
function m(type, props, children) { // assuming m() looks something like this. return { type: type, props: props, children: children}; } m.render = function(lwDOM){ console.log(lwDOM)}; m.dom = {};
// React hard codes this array so we can do something like this to build the mapping ['a', 'span'].forEach((el) => { m.dom[el] = function(props, ...args) { return m.call(null, el, props, args); } });
m.render( <a href={"google.com"}> <span>hello</span> <span>world</span> </a> ); ```
If you're interested in using jQuery with React, we have an example: https://github.com/facebook/react/tree/master/examples/jquer.... It doesn't use XHR but it should give you some idea of how the 2 can play nicely together.
From the article: > The data returned from render is neither a string nor a DOM node -- it's a lightweight description of what the DOM should look like.
Like @thezilch said, the syntax is JSX, which is pre-processed into runnable JS.
When we've showed the site internally at FB & Instagram we got a lot of the same feedback you're giving now, that we need more examples. We have some more in the repo and more we'd like to write. Coming soon!
You're right. One of our goals in the coming months is to try to make some language files for editors. Vim actually does a pretty good job of this already thanks to the similarity to E4X.
JSHint is another thing we'd like to improve upon. At Facebook & Instagram, we actually lint against the transformed code. Right now the transforms don't modify line numbers so it's been easy to match up. We'd like to build some tooling around this for people who make use of React and JSX.
> I think Web Components is landing soon, and this seems like it could leverage that.
I like the way you think! We've started thinking about that already.
(I'm a former Mozilla employee who added Lion Full Screen support and did some other OS X integration work. If you know somebody who cares about Firefox and wants to work on OS X related work let me know and I'll git in touch with the right people to make that happen.)