1,788 karma · joined Mar 13, 2025 (1y ago) · 921 submissions
301.
HMR natively in Node.js(immaculata.dev ↗)
1 points · by 90s_dev · 1y ago · discuss
comment 1y ago · link · parent
const el = document.createElement(tag)
for (const [k, v] of Object.entries(attrs)) {
if (v instanceof Ref) {
el [k] = v.val
v.watch(val => el[k] = val)
}
else {
el[k] = v
}
}comment 1y ago · link · parent
comment 1y ago · link · parent
I think this might be true short term, but long term it means Svelte has more room to evolve with the web and with JavaScript itself, since fewer users means more room to move fast and break things, like Zig can and does. And Zig isn't dead.
This gives me a little encouragement for my personal web reactivity project. I'm confident I came up with a reactivity model that's technically innovative, which does and is what I always wanted React to do and be. But being so late to the game, my hypothetical framework has no chance to gain traction. I say hypothetical because I haven't even started making it yet. It would be built on the Ref class[1] that came out of my experimental work on os.90s.dev, but only last night did I finally get around to experimenting with using it with HTML[2].
The concept is to have JSX transform to allowing attributes to be given MaybeRefs and if its a ref then watch it and set the attr to the value, and just return the HTMLElement itself. This should be a good enough foundation to build an entire reactive framework around.
Having almost no users is a blessing, because it gives me the complete freedom to experiment with this relatively slowly. The time between creating refs and stabilizing them was a few months. The time between stabilizing them and using them in that experiment was another month. It'll probably be another month before I get a functioning non-trivial app working with it. And another few months before it's cleaned up enough to be both generic and convenient.
Maybe this should have been a blog post. I never know.
[1]: https://90s.dev/guides/refs.html
[2]: https://github.com/sdegutis/bubbles/commit/cde2bea973b22538f...
307.
Implementing native Node.js hot modules (technical write up)(immaculata.dev ↗)
11 points · by 90s_dev · 1y ago · 1 comment
309.
Text Formatting in Notepad begin rolling out to Windows Insiders(blogs.windows.com ↗)
3 points · by 90s_dev · 1y ago · 1 comment
comment 1y ago · link · parent
comment 1y ago · link · parent
It must have been released around 1995 or so. It used Mosaic browser throughout all the examples, which looked so different than the IE3 that I was using. There was a heavy focus on forms and controls. And it was hundreds of pages. Familiar to anyone?
comment 1y ago · link · parent
[1] https://c3-lang.org/implementation-details/specification/#fo...
comment 1y ago · link · parent
Because it's not. The whole point of C is that you know exactly what's going on and it's relatively clear in the code itself. C++ hides logic in abstractions for the sake of convenience. This is a C++ thing. How does it know how to iterate? Is it moving pointers or indexing them or what? Not only is it hiding logic but it also prevents me from modifying the logic. I could easily change a C for loop to use i += 2 instead of i++ if I wanted, that's the beauty of it. With this, I have to read some docs first to see how their abstraction works, and then hope it allows me to modify how it's used to how I need.
comment 1y ago · link · parent
Not at all. He's famous for helping create the initial version of JavaScript, which was a fairly even mixture of great and terrible. Which means his initial contributions to software were not extremely noteworthy, and he just happened to be in the right time and right place, since something like JavaScript was apparently inevitable. Plus, I can't think of any of his major contributions to software in the decades since. So no, I don't even think that's really an appeal to authority.
comment 1y ago · link · parent
comment 1y ago · link · parent
Half the time people are suggested a better way, it's because they're actually doing it wrong, they've gotten the solution's requirements all wrong in the first place, and this perspective helps.