Better HN
topnewbestaskshowjobs
Log inSign up

90s_dev

1,788 karma · joined Mar 13, 2025 (1y ago) · 921 submissions

Submissions

301.

HMR natively in Node.js(immaculata.dev ↗)

1 points · by 90s_dev · 1y ago · discuss

comment 1y ago · link · parent

I am surrounded by geniuses.

So I will stop trying to be like them. I can't.

I'll just keep my head down and write my little apps for fun.

comment 1y ago · link · parent

Man I don't even know why I write any code anymore. Everyone's already done everything.

comment 1y ago · link · parent

I remember Backbone using two-way bindings, which I think is more complicted than what my experiment does:

    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

Never heard of Signals[1] until now, thanks. But it makes me nervous with how much influence it has from React and Vue, and the way React and Vue do things. These are not the be all end all methods of reactivity, and I can't help but think if there's going to be an official language feature implemented for this, there needs to be room for other voices to be heard that have zero influence from React/Vue. Maybe there's still time since it's Stage 1.

[1] https://github.com/tc39/proposal-signals

comment 1y ago · link · parent

According to a resonating reddit comment, Svelte isn't more popular because it's simply too late; React and Vue got there early and got good enough, so Svelte can't really get as big as them.

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

comment 1y ago · link · parent

I will be using this to learn both Rust and C++ and see which one I like better.

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

> Memory leaks were probably the most difficult thing to reason about. Object lifecycles are already pretty tricky without the hosted language on top.

I thought the whole point of these high level langs was that you don't have to worry about that?

comment 1y ago · link · parent

Are are all the ideal warnings?

comment 1y ago · link · parent

About a year ago I bought the official C++ book and read through it fully (including most of the reference part) after finding out that Animal Well was written in it. It honestly seems like a very good and interesting langauge, if carefully used, especially for games where memory can be allocated at startup and held forever. Kinda wish I had an excuse to write some C++.

comment 1y ago · link · parent

Why don't we just use shared_ptr most of the time? Is it really that inefficient?

comment 1y ago · link · parent

Network effect.

comment 1y ago · link · parent

Does this mean 2d physics simulators are about to get N times faster? Because that'd be cool if N is big enough.

comment 1y ago · link · parent

Votes on HN are fairly random.

comment 1y ago · link · parent

Can anyone help me find a specific HTML book? It was the first one I ever read, I've been looking for it on Amazon every few years and haven't found it yet.

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

Maybe he will?

comment 1y ago · link · parent

Ah that makes sense, as long as the length doesn't change during iteration, which like you said is the 90% case. As long as I also can use for(), then that's fine.

comment 1y ago · link · parent

Give me some sane subset of TypeScript with native support and I'll use it everywhere. But C# is far from as convenient as TypeScript so far. Just a few more years of convenience language features and APIs added, and I think it'll be set.

comment 1y ago · link · parent

With Java allowing void main() {} like C,

and now shebang C# scripts,

is everything converging into one meta language?

comment 1y ago · link · parent

Because it is.

comment 1y ago · link · parent

I just skimmed the C3 spec[1] on foreach and foreach_r, and I'm still confused as to how to move elements by anything other than 1, if it's even possible.

[1] https://c3-lang.org/implementation-details/specification/#fo...

comment 1y ago · link · parent

> Don't misunderstand me - I love using foreach in other languages; the added syntax better expresses your intent, reducing logic errors. It did jump out at me as "this isn't C" though.

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

I'm on the fence about function contracts like this. I've seen them for a decade in other languages, but never really used them, so I can't say how I feel about them.

But having them be inside comments is just weird.

comment 1y ago · link · parent

> it's also the opinion of Tim Berners-Lee, which I would hope carries at least some weight

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

Magit was the last thing I had to let go of before deleting Emacs, and it took a while, too, before I could delete it altogether. Magit is really powerful. But after a decade of not using it, I struggle to remember whatever it was that was more convenient than just using VS Code's built in git committer and git tree viewer. Honestly, I don't think anything anymore, except slightly more convenient keyboard shortcuts. I can't help but wonder how much software has that kind of grip on me, where I think it's indispensable until I get used to the alternatives.

comment 1y ago · link · parent

I find this site very useful for when you need to tell Conan O'Brien your favorite pizza toppings quickly and easily, for example from a cell phone browser.

comment 1y ago · link · parent

Not always. I love it when people offer me a much simpler solution to a problem I overengineered, so I can throw away my solution and use the simpler one.

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.

1
101112
31