Better HN
topnewbestaskshowjobs
Log inSign up

wirahx

58 karma · joined Sep 7, 2018 (8y ago) · 38 submissions

Submissions

comment 1y ago · link · parent

I wanted this workflow but we absolutely share the same problems. However it took a few minutes on their site to see that the workflow involves explicitly assigning tickets to cheepcode in order for it to work on them.

That being said, I tried to sign up, and it broke horribly, and it looks like it was knocked out in 5 minutes, so my desire to give it access to my production codebase is fairly minimal.

comment 2y ago · link · parent

The only reason React et all need an ecosystem is because they're hard to integrate vanilla libraries with, or harder to develop components for.

Vue suffers less from this issue, as you'll well know, and Svelte doesn't suffer at all.

The same can be said for people being skilled in it. It takes longer to skill up on React, less on Vue, and the least on Svelte.

A lot of people end up using React because of these invented scenarios, when in reality, building something rapidly like a start-up is significantly quicker with Svelte. Trust me, I've done it, and we're post Series A, and now reaching profitability.

comment 3y ago · link · parent

I'll be the first to mourn the (future) loss of $: but the video clearly shows that the changes are a pretty enticing way to make your code that little bit cleaner, and solve all of the "but Redux!" style questions.

Svelte for Apps. Svelte for Sites.

comment 3y ago · link · parent

> I don’t follow… in what sense is this JavaScript? > <button on:click={incrementCount}>

it's not. it's html. incrementCount is a pointer to a javascript function.

> Or what about this… is this JavaScript? > $: doubled = count * 2;

Yes. $: is a javascript label. We use it to indicate that a function should be reactive - if the count variable changes, the right hand will be rerun and double updated.

> <button on:click|once={handleClick}> Click me </button>

html again. the |once is a modifier to click which detaches the handler after a single use. It's a directive in the html markup (still valid html) which the compiler picks up and converts into node.removeEventHandler.

comment 3y ago · link · parent

it's not. `toggle` is a pointer to a function name and "toggle()" appears to be an expression which is parsed and then executed (scary).

you can on on:click={() => toggle()} in svelte which is more similar, but it isn't parsed and executed, it is a pointer to an anonymous function which is directly executed.

on:click={toggle()} in svelte would run the function immediately (probably not what you want) and return the result as the handler for the on:click

so quite different, really.

comment 3y ago · link · parent

not everybody was excited about the virtual dom. people who looked closely at it weren't particularly excited.

comment 3y ago · link · parent

you're equating it to string interpolation. It isn't. It's a compiler directive which disappears when compiled, which is why it is expressed as a brace expression rather than a tag.

comment 3y ago · link · parent

Yep, but slowly converting it all over to SvelteKit. Saves me having to maintain servers, watch setups, build processes, deployment processes, routing, bundling, and so on.

comment 3y ago · link · parent

That's the tutorial - which uses WebContainers, which are indeed an experimental technology. It has nothing to do with the production readiness of SvelteKit the framework.

comment 3y ago · link · parent

don't forget to watch the livestream!

comment 5y ago · link · parent

There is only Safari on iOS. It's just called "chrome" or "Firefox". It's not a very good browser and struggles with a lot of things.

comment 5y ago · link · parent

It's vastly simpler. You should try something before you write it off.

comment 5y ago · link · parent

ElderJS is a very specific use-case, which is mass static generation, designed for SEO heavy sites. It's a very narrow usecase.

SvelteKit is designed to let you build anything at all with Svelte.

ElderJS, JungleJS, Primo etc, are all specialisms.

comment 5y ago · link · parent

I think there is a faster TSC, I forget what it's called, but it's significantly faster. It just isn't as fully fledged as TSC.

comment 5y ago · link · parent

The banned user is a person who intentionally trolls comment sections, chats, and other forms of feedback. It's genuinely their goal to get banned.

comment 5y ago · link · parent

FWIW this person is also banned from the Svelte github and the Svelte discord for similar behaviour.

comment 5y ago · link · parent

There's a link right next to the main headline - "What's the deal with SvelteKit"

comment 5y ago · link · parent

From an outsiders perspective, that's fair enough. However, Rich's time and focus as well as a number of other maintainers is currently on Svelte-Kit, which gets a commit around every 6 minutes at its peak, and at least every hour otherwise. Rich is ridiculously active.

Your comments are fair, but misguided.

comment 5y ago · link · parent

can confirm that dragula works well. If you don't need all the crazy browser support though, doing it like this is much more lightweight.

comment 5y ago · link · parent

the code is readable enough that you can just change the animation delay ;)

comment 6y ago · link · parent

Easier, due to the language-server Svelte uses to support TypeScript. It should be relatively trivial for somebody to implement now.

comment 6y ago · link · parent

https://beyonk.com

Everything we do is written in Svelte + Sapper, not just our site, but all the backend apps as well that we use for admin + providers.

comment 6y ago · link · parent

Svelte will never have JSX, not natively anyway. It's completely against the philosophy.

Not all of us think JSX is a great thing. The "templating" language in Svelte isn't really a templating language at all, it's just Javascript with some (unavoidable) helpers. It takes about 2 minutes to learn since there are really only maybe 5 helpers.

comment 6y ago · link · parent

I feel like the author would benefit from writing some tests or isolating his code better. It doesn't feel like a language or framework problem.

comment 6y ago · link · parent

So your overarching point is that compiled languages are unappealing. Obviously, this isn't correct.

If a fresh user were to spend a few minutes learning React (or Preact), Svelte, Vue, or Angular, they'd almost definitely pick the terse and simple API of Svelte, or Vue, over the others. I've in fact tested this with a number of Junior and Senior developers.

Every language has downsides and upsides, some people find interpreted languages easier to hack around with than compiled ones, but the sheer speed of Svelte's complilation (especially when you try out the new HMR stuff) really excludes Svelte from this anyway.

Your other point is about every component having it's own runtime. This also isn't correct. Have a look at the code outputted from the REPL to see the "runtime" (which is just a set of shared functions in pure javascript) being declared. These are global to your entire Svelte app. It's as close as Svelte gets to a runtime, and it's shared.

As for changing data somewhere and looking how it all renders differently, that's what the Store is for. It's a cross-component store of data, and if you change it, dependends will render differently.

It's not that there's no merit to your article, it's just that a lot of it applies to most development languages, and it would be silly to call them all unappealing. Upsides and downsides, that's all. And my personal feeling about interpreted frameworks like React or Preact is that they offload the downsides to the user, which is unnacceptable.

comment 6y ago · link · parent

Hey - Svelte Calendar actually has an open PR for a date-range picker which just needs a bit of testing to get it over the line. Feel free to take a look

https://github.com/6eDesign/svelte-calendar

As for the other components, as the ecosystem grows, these things start to appear. The advantage to Svelte is that it's super-easy to integrate any vanilla component into, much more so than other frameworks. You can totally do away with nonsense wrapping projects, and just add the component verbatim.

comment 7y ago · link · parent

As somebody who doesn't want typescript support, at all, I relish the lack of typescript support!

Also the component model isn't "hacky". It's logical, unopinionated and straight-forward. I don't know how much you know about Rich Harris but he's not one for producing "hacky" public APIs.

comment 7y ago · link · parent

That's sort of the beauty of Svelte. The surface area is minimal, and as such - though there are gotchas, you can almost count them on one hand.

I learned to use Svelte (granted, v1), in 45 minutes, and build something using it. I guarantee that a developer won't need 2 weeks to become comfortable in it.

12