My polemic against svelte 5 continues

Reply to this note

Please Login to reply.

Discussion

Kinda makes me glad that when I went to go learn it, it didn't really vibe with me? So I didn't pursue it.

The actual reason being that I needed to import a wasm module and svelte couldn't do it. So I crawled back to react and my homespun webpack framework for it.

Tell us more.

This is so full of technical references I don't understand. Someone must get it out to the JavaScript developer bubble drama outside Nostr.

> This is so full of technical references I don't understand

I wonder this exact question but for prospective newcomer devs to nostr

Not gonna lie the Nips are like this, but once you start to see real events, things start to make sense.

Negentropy is a scary word at first.

Someday someone will write a book

Maybe when things settle down and you don't have to rewrite it every month.

nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 the pitch to new devs is nostr is very simple.

Yet the NIP rewrite frequency is once every X days.

Have you heard of this scaring off prospective new devs?

I would like to caveat that this doesn't bother me, but it may be overwhelming to some.

I think people over-react to the re-write factor. The NIPs repo is actually very stable, and mostly accretive. Breaking changes are relatively rare (and should be rarer, but still)

This is fine and dandy.

I am curious what are the hurdles, if any, to more prospective new to nostr devs joining.

Probably just knowing where to start, sorting what's important from what isn't. An introductory e-book is something I've been wanting to write for a while.

Just like you don't learn a programming language by reading the reference manual first

How would you answer “where do I start as a new to nostr dev” in a one-two sentences to one-two paragraphs?

You're trying to lure me into filling out your FAQ aren't you 😂 It's on my list, I just don't feel energized to do it because I did something similar last year and it was a lot of work and never got published. Also I don't think an FAQ with unedited responses will be much help to new developers.

But to answer your question:

Read nostr.com, read nip 01, install nostr-tools and work through the examples in the readme.

I wish there was a better answer

One thing Svelte got right is their interactive tutorial is pretty amazing for learning how things work, and you can play around with it and change things and see how changing one thing effects another thing. A nostr interactive client that shows the response from the relay and how that's parsed would be cool.

Something like

Lesson 1: This is how to set up your client tools

Lesson 2: this is how you generate an nsec and npub.

Lesson 3: This is how you connect to a relay.

Lesson 4: This is how you connect to multiple relays.

Lesson 5: This is how you fetch events from a relay.

Lesson 6: This is how to filter for specific events from a relay.

Lesson 7: This is how to sign an event.

Lesson 8: This is how to send the event to the relays.

But make the whole thing as interactive as the Svelte tutorials are.

That's a great idea, I like svelte's tutorial a lot

I also like Svelte's interactive tutorial, and this seems a cool idea.

Three years ago, when I started studying Nostr I had a similar idea and created https://github.com/dtonon/nostr-ruby-playground to guide myself (and maybe others) to learn the basics step by step.

It's not so fancy like an online interactive tutorial, but I think it's fine, and it is also easily scalable with more languages.

(then the code has been refactored and improved in https://github.com/dtonon/nostr-ruby)

In less than half the time you took up to type why you cant contribute to the FAQ you have already done so:

Thank you for answering 🤝

I'll blame decision fatigue

Abstractly speaking, in my view, what happened with React, and Vue is repeating again - Once it gets traction, it progressed to a full stack with many functions and abstractions despite getting traction for its simplicity and smallness, and dissatisfied users aspiring "simplicity" aligned with vanilla javascript move to newer framework that promoted "simple", and a generational change occurs again.

I don't know why the history repeats. But I have considered this from the perspective of the innovator's dilemma and the free market around web front-end space.

in japanese though : https://teatwo.hatenablog.com/entry/2023/12/31/164710

My feel is that svelte 5 is simpler and less cumbersome than 4.

It's (another) move in one right direction.

When i had some confusion migrating was that the previous way was done poorly (by me) and svelte5 made that work perfectly, basically with no code.

My whole app is using very little svelte code "over the hood". It just magically work. No server side rendering. Static adapter. Way to go.

Also their discord server is very helpful and organised.

i feel like you said "svelte5 is **easier** than 4". And it's still now **simpler** than react, surely.

Either way, that usage seems to be reasonable. Because I think SSR is one of the main reasons causing that "evolution".

This is interesting, nostr:npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn you shared an nevent1 link to the article with the ID b9f7484146715b9083004b0a353c914dd3f5c9f1e8a8cf93a5c9461898cda8e6 and plenty of relay hints

But since you updated the article and the old ID was replaced, my client wasn't able to find it

I've never seen a nostr: link break before, but I guess if you share nevent1 links for replaceable events they break 🤔

I think your referencing this article

nostr:naddr1qvzqqqr4gupzp978pfzrv6n9xhq5tvenl9e74pklmskh4xw6vxxyp3j8qkke3cezqy88wumn8ghj7mn0wvhxcmmv9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcqp5cnwvee8qenqdfkxgcn2wg38kw9m

Ah, this is a bug in my quote functionality I believe

what have you picked? why is vanilla javascript a no-no for pro devs?

I haven't picked an alternative yet. I'm stuck with svelte for the foreseeable future, since I have probably around 40k lines of code written using it.

Vanilla js is great for small things, but it's hard to reconcile state with the dom reliably. I like the idea of a very small framework supplemented with vanilla (which in a lot of ways is what svelte was).

Thanks, after much analysis paralysis to pick a framework, I took an advice from a golang dev (not a frontend dev) to just keep it with vanilla, and it just worked for me, but yes I only did simple things and haven't worked on real projects, still can't see what vanilla can't do.

been building a NIP-99 client, just the fact nobody is using vanilla makes me feel awkward and missing something very obvious that I will find out later.

I thought it may be good to share (do you agree?):

"I'm not really a frontend dev so take my opinions as Grandpa Simpson shouting at the clouds. Honestly, for most cases, plain HTML, CSS and JS is just fine for what you need. A lot of the tooling to "make things easier" (on the unfounded premise that vanilla is too hard) ends up making things harder. So instead of having a single HTML file with CSS and JS in it, you now have to contend with some framework concepts and conventions. Guess what? You're now divorced from the technology that underpins it and are now dealing with an abstraction. Something goes wrong, a version of one of the thousands of dependencies has a bug in it. Now you're hunting around forums trying to solve a problem for a tool that was supposed to make your life easier. Even worse, none of the knowledge you have is transferable to other frameworks so now you're in this technology echo chamber and instead of having frontend developers, you have "react" developers, who manage concepts like "react component lifecycles".

Plain HTML, CSS and JS are so well documented, you're only upskilling, not "trying to fix build issues".

No build times, instant reload, well documented, no weird concepts. What's not to love about Vanilla?"

I agree with the sentiment, but there's areason people always end up adding stuff. Also, I still have ptsd from my junior dev jquery days 😂

I'd be interested in looking at your project though, if only to see how you've arranged things

how can I DM? it is in a good state but I'm shy until I complete some features.

basically it's a single html file linked to a js hash router that renders html elements and js

Nostr dms work, or you can use my nip05 as an email address

is Coracle messages private?

sent from coracle either way. they private?

Yep, coracle uses nip 17 DMs