Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rich_harris
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
rich_harris
6y ago
There's no such thing as 'multi-threaded React'. JavaScript runs in a single thread unless you use web workers, which React doesn't (this was a popular idea a few years ago, but people have since come to accept that it a
62.
▲
by
rich_harris
6y ago
> According to this article we should accept Well, I wrote the article, so I can say with some authority that you've badly misinterpreted it! Somehow I manage to build sites with exceptional performance that are snappier than the eq
63.
▲
by
rich_harris
6y ago
Update: since posting this it looks like the site is being hugged to death — might need to upgrade something in GCP :) Either that or it's a coincidental problem with https://api.hnpwa.com/v0/
64.
▲
by
rich_harris
6y ago
> Show me the crazy-fast link-click-predicting website that does this and loads faster than, say, HackerNews. https://hn.svelte.dev/ is a Sapper implementation of Hacker News. It uses the preload-on-hover/touch tech
65.
▲
by
rich_harris
6y ago
Why do any of those things need to be native apps, rather than instantly-accessible, no-install-required URLs that come with all the protections of the web's security model?
66.
▲
by
rich_harris
6y ago
> without re-hydrating tens of megabytes of JS for each tab you load You'll be taken more seriously if you don't engage in meaningless hyberbole. You could recreate the open-the-reply-page-in-a-new-tab behaviour of HN (with the
67.
▲
by
rich_harris
6y ago
> your 10k npm dependencies Believe me, you're preaching to the choir. Nor am I advocating for every website to have an API. But unfortunately we part ways here: > The web is a success The web is not a success. It's dying.
68.
▲
by
rich_harris
6y ago
Or when I click the 'reply' button to post this very comment, which does result in a jarring full-page refresh — and one that instantly robs me of the fuller context in which I'm replying.
69.
▲
by
rich_harris
7y ago
Sure, it's easy: don't serve sourcemaps. This isn't specific to Svelte though. In fact your code is much more obfuscated with Svelte than with most comparable tools, since you're not serving the code you actually wrote
70.
▲
by
rich_harris
7y ago
That code appears nowhere in the documentation. Regardless, you appear to be confused about the meaning of the word 'mutable'.
71.
▲
by
rich_harris
7y ago
Honestly, the biggest blocker to us having a 'blessed' story around testing isn't figuring out how to test (which is relatively straightforward), it's figuring out what to test. Do you really need to test that `<p
72.
▲
by
rich_harris
7y ago
Svelte author here. There's a couple of things to note: - as Glench mentioned, it's not destroying and recreating stuff unnecessarily. By default it will create or destroy blocks at the end of the `each`, if the length of the ar
73.
▲
by
rich_harris
7y ago
Svelte author here. That post overlooks a number of important points; I've responded here https://www.reddit.com/r/javascript/comments/ckpdxk/long_liv...
74.
▲
by
rich_harris
7y ago
It can't 'compile' to HTML, because it doesn't know at compile time what data you're going to give the component. Instead, if you compile with `ssr: true`, the JavaScript it generates is a module that generates HTML
75.
▲
by
rich_harris
7y ago
Yep — I added our details to it. I mentioned the problems we were having on Twitter and a Cloud Run PM came to help immediately! So I'm hopeful we'll get a resolution before long. (Aside from this glitch, Cloud Run has been great
76.
▲
by
rich_harris
7y ago
> But I also don't see why they couldn't have submitted a PR to react/angular/ember/meteor/vue. I see this sentiment a lot in open source. When I made Rollup — which is now used to build the most popular lib
77.
▲
by
rich_harris
7y ago
Yep, having some problems this week with Google Cloud Run (which hosts the site). I guess that's what happens when you use a platform that's still in beta...
78.
▲
by
rich_harris
7y ago
The site is hosted on Google Cloud Run, which seems to have been having some intermittent problems for the last couple of days. EDIT: some other people have had the same issue and the Cloud Run team are investigating
79.
▲
by
rich_harris
7y ago
Our vision for how to build large apps with Svelte is best represented by Sapper — https://sapper.svelte.technology — which is a Next.js-style framework. Right now it's a bit out of date, we need to spend some time bringing
80.
▲
by
rich_harris
7y ago
> more characters typed does not necessarily directly result in more bugs, as far as I know Most of the discussions I could find on the topic before writing that post suggested that the error rate per thousand lines of code is surprising
81.
▲
by
rich_harris
7y ago
Yes! (Longer answer: what sort of bugs? Was there an issue on GitHub?)
82.
▲
by
rich_harris
7y ago
It's only the documentation that's a TODO, you can use them currently. Just pass `customElements: true` to the compiler and specify a tag, either as `tag: 'my-tag'` or in the component itself with `<svelte:options tag
83.
▲
by
rich_harris
7y ago
Thank you, that means a lot!
84.
▲
by
rich_harris
7y ago
Bringing Sapper up to date is the next big task. In some ways yes, it's a bit like create-svelte-app, though a closer reference point if you're versed in the React world would be Next.js. We've also mulled creating a React Ro
85.
▲
by
rich_harris
7y ago
See here for a discussion of WASM https://youtu.be/AdNJ3fydeao?t=1410
86.
▲
by
rich_harris
7y ago
You're both right — it's intended to be a slightly ambiguous low-key pun :)
87.
▲
by
rich_harris
7y ago
Allow me to try and convince you of its importance :) https://svelte.dev/blog/write-less-code
88.
▲
by
rich_harris
7y ago
My view on this is that complexity, like energy, can only really be converted from one form into another. Normally the distinction is between runtime complexity and cognitive complexity — the result of hand-optimised imperative code. In o
89.
▲
by
rich_harris
7y ago
Authoring less code is definitely an explicit goal: https://svelte.dev/blog/write-less-code
90.
▲
by
rich_harris
7y ago
It was all built in-house by me and other members of the Svelte community. The playground widget is technically a standalone thing, but it wasn't totally designed to be used outside https://svelte.dev so may be a bit warty!
More ›