Live data from Hacker News

Rich Harris joins Vercel to work on Svelte full time

twitter.com

71–80 of 571 posts

Re: Rich Harris joins Vercel to work on Svelte full time

#71
post #47

Earlier quoted context omitted.

Vercel is built on cloudflare workers meaning vercel winning means cloudflare wins. Also I think building out the datacenters across the globe is a much harder problem than building out a framework.

Vercel's infrastructure is multi-cloud, primarily using AWS. We're currently using Workers specifically for Edge Functions ( https://vercel.com/edge ).

That animation in the background could use a little optimization. It's redrawing nonstop for no reason. Left the site open for a few mins and it got my humble Thinkpad's fans going hard (Vivaldi).

Re: Rich Harris joins Vercel to work on Svelte full time

#72
So I'm a backend engineering, but have experience with Vue.js and like it.

Why would I want to rethink that and try out Svelte?

Reading about svelte the main advantage seems to be everything building to raw JS making it faster.

Questions:

Is there typescript support? I would assume, but...

Does this end up with smaller bundles/js files?

Any other major advantages?

From some reading syntax seems pretty similar to Vue as well.

Re: Rich Harris joins Vercel to work on Svelte full time

#73

Cloudflare will regret not having a developer go-to framework for their advanced Worker stuff one day. I think they are waiting for someone else to build for it which is IMO the completely wrong approach for the dream of the serverless app. You got to own the full stack including software. I can easily see Vercel becoming the pretty much only go-to in this space just from the developer trust they have created with Ne…

Cloudflare currently markets successfully to a very different calibre of engineer. Meanwhile, Vercel don't even support 2FA login yet, and publish mandatory cache-busting query string parameters to the public Internet. Their "CDN" is a BYOIP range running on AWS Global Accelerator

Re: Rich Harris joins Vercel to work on Svelte full time

#75
post #64

Can someone teach me how Svelte does what it does? The front page is not telling me much? How does it "surgically" update the DOM? Why is it better than virtual DOM?

When your React component renders, it returns an object that describes the desired state of the component tree. Take this component:

    function MyComponent() {
     return Here's bold text
    }
At runtime, React calls your component function and then applies the returned data to the DOM imperatively. If your component has rendered before, React needs to _diff_ the virtual DOM your latest render returned against the VDOM React last applied to the real DOM. Very simplified idea of what happens on every render:

    function reactInternalRenderLoop(root) {
     const newVdom = MyComponent({})
     const diff = diffVdoms(root.prevVdom, newVdom)
     for (const change of diff) {
      change.applyToDOM(root.domNode)
     }
     root.prevVdom = newVdom
    }
React's runtime time complexity is fundamentally limited by this `diffVdoms` function, and React's memory usage is fundamentally limited by the size of the VDOM returned by components.

What Svelte does is entirely eliminate this whole process involving diffing and what-not. At compile time, Svelte analyzes the data dependencies between the rendered template and reactive values in the app, and generates self-contained components that know how to update their own DOMs. You can think of it as essentially moving the entire `reactInternalRenderLoop` function from _runtime_ to _compile time_. There is no more diffVdoms function call on your user's devices. There is no more big allocation of VDOM data structures.

Svelte might compile `MyComponent` to something that looks like this:

    const MyComponent = {
      mount(parent) {
        const element = document.createElement('div')
        div.innerHTML = "Here's bold text"
        parent.appendChild(div)
      },
      update() { /* no-op */ }
    }
And since the Svelte compiler knows the contents of MyComponent never change, the mount function will only be called once for the entire runtime of your app.

Re: Rich Harris joins Vercel to work on Svelte full time

#76

Cloudflare will regret not having a developer go-to framework for their advanced Worker stuff one day. I think they are waiting for someone else to build for it which is IMO the completely wrong approach for the dream of the serverless app. You got to own the full stack including software. I can easily see Vercel becoming the pretty much only go-to in this space just from the developer trust they have created with Ne…

They do have https://flareact.com/ and although it is still early, it is very promising. They have used patterns from Next.js so it is easy for developers to migrate.

Re: Rich Harris joins Vercel to work on Svelte full time

#77

Well, this is awesome -- but fuck me: Vue is the only major player not under the Vercel umbrella now, haha. Looks like I might have to phone in half a decade of experience. Svelte is close enough to Vue with "script setup" mode anyways, the major difference is whether your logic/keywords go INSIDE the HTML tags or OUTSIDE. Svelte doesn't support JSX/TSX though =(

If no one has managed to add JSX, I believe it would be feasible to implement. The Svelte compiler is pretty straight forward to interact with. However, I have little experience with the semi-standard build toolchain for Svelte that most people are using. You would of course need to import React.

Re: Rich Harris joins Vercel to work on Svelte full time

#78
post #20
post #13

Earlier quoted context omitted.

Catch up in terms of hirability/company usage.

Yeah, I stupidly started some projects with SvelteKit instead of NextJS and am having a very hard time finding people to work on them.

Consider trying to hire outside Svelte - Anyone that can write using the major frameworks will do just fine. If the problem is candidates uninterested in using it, that's a different problem.

Re: Rich Harris joins Vercel to work on Svelte full time

#79

Cloudflare will regret not having a developer go-to framework for their advanced Worker stuff one day. I think they are waiting for someone else to build for it which is IMO the completely wrong approach for the dream of the serverless app. You got to own the full stack including software. I can easily see Vercel becoming the pretty much only go-to in this space just from the developer trust they have created with Ne…

Denoflare (https://news.ycombinator.com/item?id=29142772) is compelling.

Re: Rich Harris joins Vercel to work on Svelte full time

#80
post #65
post #48

Earlier quoted context omitted.

I see your app is MacOS only at the moment. Are you re-writing it in Electron or what? Very curious

Yeah, rewriting it with Electron + Svelte + a Rust backend for the heavy lifting. I looked at alternatives to Electron because I wanted to avoid the bloat, but nothing felt like the right fit. Tauri ( https://tauri.studio/ ) is the most exciting, but I couldn't find a good way to get raw video frames into the UI without a bunch of expensive copies or serialization. I also looked at native toolkits like Qt (I've worke…

Did you look at .Net solutions like Maui, xamarin, uno platform, or AvaloniaUI?
Post reply on HN