Their job is to maximize shareholder value, and if attempting to capture the entire thing reduces shareholder value, which may occur in this case, they're not doing their job well.
217 karma · joined April 26, 2017
Their job is to maximize shareholder value, and if attempting to capture the entire thing reduces shareholder value, which may occur in this case, they're not doing their job well.
The map[2] is not mobile friendly and requires WebGL. I recorded a video that tours through the map to music.[3] It's the same experience as pressing "begin tour" on the map. The website version will have better visuals because of video compression.
The map is rendered with WebGL via PixiJS and the rest of the app is Svelte. The original DOM implementation was written in Svelte but it was too inefficient, the bottleneck being the DOM and not Svelte. You can test the difference yourself on the map by pressing `ctrl+backtick` to enter dev mode and clicking "webgl" to toggle over to the DOM version. On my machine, the Pixi version drops no frames in all browsers, and for the DOM version, Firefox drops about 1 in 10 frames and Chrome/Edge are sludge, seemingly because they're shy about using more GPU. The source code readme[4] has some technical notes discussing Svelte and Pixi[5], and it links to original DOM implementation with more comments if you're curious.
I'd be glad to answer questions. Not about the science though, I'm a web developer.
[1] https://visibleearth.nasa.gov/collection/1484/blue-marble
[2] https://www.cosmicplayground.org/#deep-breath
[3] https://www.youtube.com/watch?v=7xEPqg-Kyg4
[4] https://github.com/ryanatkn/cosmicplayground
[5] https://github.com/ryanatkn/cosmicplayground#technical-notes
One important difference with Svelte versus Elm is that Elm makes a clean break from web technologies, while Svelte is designed to work with future versions of the web's languages.
The article goes into this more, but Svelte's DSL is an extension of web languages - not much to learn really! Your existing knowledge of HTML, CSS, and JS transfers directly.
Elm is awesome! There's nothing quite like it that I know of in its design space to bring user-friendly functional programming to the web. Similar to Svelte, its design holistically packages up the web's languages. Compared to PureScript, it's focused on a small and beginner-friendly feature set, trading general power to optimize for the webapp use cases. Elm has also been influential to a lot of toolmakers!
On point 1, this issue is the one to watch. https://github.com/sveltejs/svelte/issues/4518 Language server support will work for both JavaScript and TypeScript and error/type checking and editor support should be pretty comprehensive when it's ready. Svelte 3 was written with TypeScript in mind, so the idioms are fairly compatible with type checking. (a nice pit of success for design!)
This should also fix reassigning to a const mentioned in point 2.
The template language's restrictions compared to JavaScript/JSX-built views are part of Svelte's performance story. It's able to optimize things ahead of time that are impossible with dynamic code because of the constraints. Here's a couple tweets from the author about that -
1 - https://twitter.com/Rich_Harris/status/1224414679021301761
2 - https://twitter.com/Rich_Harris/status/948231770725605377
The Svelte template language is quite small, and compositional features like slots and <svelte:component> are powerful. There are currently some unwanted edge-case restrictions as this comment points out - https://news.ycombinator.com/item?id=22541100
Like all surveys, there's a selection bias. For example where are the world's millions of jQuery developers?
There's also a lot of controversy around Angular's treatment in the survey and an alleged pro-React bias. This shouldn't affect the Svelte numbers much.
Thanks for bringing it up - I'll improve the text somehow.
1) Svelte gives you a solid foundation and lots of flexibility
2) difficulty scaling for large apps is mostly orthogonal to the component library
3) Svelte provides flexible and sugary integration points for these orthogonal concerns
For example, since we're talking large projects, the biggest concern is state management. Svelte is like React here, in that you could use MobX or Redux with a connector library, or RxJS with Redux, or other combinations. As long as your solution is compatible with stores like RxJS is, you benefit from Svelte's auto-subscriptions[1] and sugary store dereferencing[2] that's agnostic to your underlying state management solution.