HNHacker News
TopNewBestAskShowJobs

aidenyb

253 karma · joined April 13, 2020

submissionscomments
aidenyb··on Ghostty compiled to WASM with xterm.js API compatibility
This is great. I've been using code-server to embed VSCode into the browser and been missing the terminal functionality. Excited to try this out.
aidenyb··on Show HN: Million 3 – Optimizing compiler for React
Holy crap you're right, that was a VERY large image, fixed: 18.5MB -> 21KB
aidenyb··on Show HN: Million 3 – Optimizing compiler for React
hi, this is aiden

around 2 yrs ago, i messed up benchmarks in the past with million v1. i'm sorry about putting out false information. once the reddit post came out i stopped working/advertising million entirely. i then spent 3 months redesigning the entire library. i tried my best to make it as fast as possible and accurate. benchmarks are real now, see here: https://krausest.github.io/js-framework-benchmark/current.ht...

aidenyb··on Million: less than 1kb virtual DOM that is fast
Million was originally created as a Virtual DOM -- and still ships as a Virtual DOM. More recently, Million added an optional react compat library in order to make it easier for users to learn about Million.

I'm open to different ways to market Million if there is a specific tagline you have in mind

aidenyb··on Million: less than 1kb virtual DOM that is fast
Thanks! We're planning on adding a benchmark soon: https://github.com/aidenybai/million/issues/37
aidenyb··on Million: less than 1kb virtual DOM that is fast
Thanks for the feedback, Million has a React compat layer https://millionjs.org/docs/start-here too
aidenyb··on Million: less than 1kb virtual DOM that is fast
That's a fair point, seems like the current issue owner is inactive on the task, I'll go in myself and start work on a benchmark. Million started out as only a virtual dom (and therefore was never added to the js-framework-benchmark). Only recent was the React compat added, which is when we were comfortable to start working on benches.

My intention wasn't to dismiss your point at all btw. My intention was if there wasn't any 3rd party benchmark for a library (like js-framework-benchmark), you shouldn't take claims at face value unless you've done due diligence. It's great to hear that you're keeping yourself accountable, hopefully Million will also sometime soon :)

aidenyb··on Million: less than 1kb virtual DOM that is fast
Author of Million here -- Don't trust my benchmarks at face value! Always run your own benchmarks
aidenyb··on Show HN: I made React with a faster Virtual DOM
This sounds like a websocket version of Astro (https://astro.build)! Very cool stuff.
aidenyb··on Show HN: I made React with a faster Virtual DOM
I have yet to explore this area, I'll check out S.js!
aidenyb··on Show HN: I made React with a faster Virtual DOM
Check the value prop: https://github.com/aidenybai/million#what-is-million
aidenyb··on Show HN: I made React with a faster Virtual DOM
I'm aware! AFAIK it's just a auto memoizer for React currently
aidenyb··on Show HN: I made React with a faster Virtual DOM
Hey, author here of this Show HN post. I appreciate all the comments on the post, but I would appreciate if content you post is on topic. I love the discussion about HN culture but I don't think it's relevant to this post, and it's quite overwhelming to read so many comments. If you'd like, you can start your own discussion on HN about this rule (as long as it is along the HN guidelines).

Other than that, thank you so much for all the awesome feedback, it's really appreciated :)

aidenyb··on Show HN: I made React with a faster Virtual DOM
Million's docs uses https://github.com/shuding/nextra, which uses React + Next.js for underlying code
aidenyb··on Show HN: I made React with a faster Virtual DOM
Not sure why that's happening, looking into it
aidenyb··on Show HN: I made React with a faster Virtual DOM
Not similar to SolidJS in internals (fine grained rendering), but same idea of compiling JSX and optimizing it beforehand
aidenyb··on Show HN: I made React with a faster Virtual DOM
Just to add on here, the Preact author made a generalized utility for tagged template => vnode conversions: https://github.com/developit/htm
aidenyb··on Show HN: I made React with a faster Virtual DOM
I made some adjustments to the README [1], thanks again for the helpful feedback.

[1] https://github.com/aidenybai/million#readme

aidenyb··on Show HN: I made React with a faster Virtual DOM
Thanks!
aidenyb··on Show HN: I made React with a faster Virtual DOM
I love the work done by the Lit team (I assume you're a contributor?). It's really fantastically designed, as you mentioned with bundle size/rendering speed/etc. I'm sure that Lit's implementation is very efficient and ranks high in benchmarks.

This isn't to say virtual DOM isn't fast Experimental libraries that use virtual DOM's like blockdom and ivi (see https://krausest.github.io/js-framework-benchmark/2022/table...) are very, very fast.

At the end of the day, the way libraries render UI is a set of tradeoffs. No one method is objectively better. While lit works great for a lot of web developers, so do virtual DOM based libraries

Totally agree on native DOM diffing, I'll check out Apple's proposal :)

aidenyb··on Show HN: I made React with a faster Virtual DOM
I appreciate the feedback. Will be adding to the readme!
aidenyb··on Show HN: I made React with a faster Virtual DOM
Definitely going to check Riot out. I've tried it while it was in the initial release, seems really cool they're trending towards compiled!
aidenyb··on Show HN: I made Million – It's a Virtual DOM made for the future
thank u ishan!!
aidenyb··on Show HN: I made Million – It's a Virtual DOM made for the future
> the building of the underlying structure as a separate list of nodes from what is displayed

This is how the Virtual Node tree is constructed. One case could be a React.createElement call that creates a virtual div node. You can visualize it by going to this page (Scroll down to the REPL section): https://millionjs.org/docs/api/basics/m

> a sort of buffered visual rendering on the (presumably more powerful) server that was used to determine exactly which elements needed to be rendered for the given view, then passing the associated DOM tree nodes to the browser for actual rendering

This is called hydration: https://en.wikipedia.org/wiki/Hydration_(web_development)

aidenyb··on Show HN: I made Million – It's a Virtual DOM made for the future
Yep, this is very possible. If you want to get a feel for it, check out the quick start page: https://millionjs.org/docs/start-here
aidenyb··on Show HN: I made Million – It's a Virtual DOM made for the future
Thanks! Appreciate the feedback
aidenyb··on Ask HN: Share your personal site
Here's my attempt at a personal site: https://aidenybai.com

Nothing too flashy, just simple and straight to the point

aidenyb··on Show HN: I made Million – It's a Virtual DOM made for the future
A Virtual DOM is an algorithm (often packaged as or into a JavaScript library) that allows you to "declare" what your user interface looks like.

This is in contrast to the DOM, or the native rendering method for JavaScript, which requires developers to specify imperative steps to "construct" the user interface.

Virtual DOM is useful because it makes it much easier to create user interfaces, but comes at the cost of rendering performance. Million aims to make close the gap between DOM (native) and Virtual DOM performance through compilation, or optimizing certain "predefined routes" to native code, allowing for optimal rendering speed.

You can read more about virtual DOM here: https://millionjs.org/blog/virtual-dom

aidenyb··on Show HN: Muse, a simple language for making music
imagine beepbox but in code
aidenyb··on Show HN: Tiny-vdom – Smallest possible virtual DOM implementation
Sure! I don't recommend any of the React-based virtual DOM articles yet, often they're pretty complicated and will confuse you. I wrote an article here with an even simpler implementation of the virtual DOM: https://dev.to/aidenybai/how-does-virtual-dom-work-b74.

Basically anything that guides you in building a virtual DOM is a good article

Page 1 of 2Next →