Live data from Hacker News

Svelte 5 Released

npmjs.com

61–70 of 254 posts

Re: Svelte 5 Released

#61
Been using Svelte for about 8 months and have fallen in love with it, using it in production for both personal and company projects.

My only gripe is it doesn't support tags or class list arrays out the box, meaning I've had to use preprocessors instead, the latter for me makes it far nicer to mentally visualise components when using dynamic tailwind classes.

Re: Svelte 5 Released

#62
post #6

Earlier quoted context omitted.

nit: >React, Svelte is an integrated framework You're talking about Svelte Kit . Svelte does not have a router.

Good point.

https://adonisjs.com/ can be an alternative for SvelteKit if you want a more all guns blazing framework to use with Svelte.

Re: Svelte 5 Released

#63
post #15

Where would one even start learning more about front-end development in today's world? Ignoring the dizzying amount of frameworks, how could I become knowledgeable enough to connect my back-end experience to design the "full stack?"

The minimum to be a broadly employable frontend dev is to have knowledge HTML + CSS + JavaScript/TypeScript + React/Vue.

Svelte is pretty niche. I'm not saying you shouldn't learn it, but that you should focus on the common tools first. This is just like you might tell a friend learning programming to learn Java/Python/Go etc. before getting into Lisp/Haskell/Prolog.

All are useful and have their place, but one set of languages is definitely more likely to be used in a workplace (unless you're lucky!).

If you want my opinion on a cool/trendy framework to use, I really like Astro [0], but, again, I doubt anyone will hire you unless you also have experience in React/similar.

[0]: https://astro.build/

Re: Svelte 5 Released

#65

Good work! I’m not really sold on the runes stuff though (tldr: https://svelte.dev/blog/runes ) The old way is a bit “magical” in a sense that it does some stuff under the hood to implement the intention behind your code, but it reads really straightforward: let counter = 0; // ... {counter} `let` in a .svelte compoment makes a variable reactive. If your state is outside a component, you use stores. With the `$store`…

Same... It's just not ergonomic. I much preferred the simplicity as someone who loves Python for that same reason. I love code that looks like this:

  import whisper

  model = whisper.load_model("turbo")

  result = model.transcribe("audio.mp3")

  print(result["text"])
Or this (although this is slightly 'dirtier'):

  import eng_to_ipa as ipa
  def get_homophones(word):

      words_that_sound_the_same = []
      the_way_this_word_looks = word
      the_way_this_word_sounds = ipa.convert(word)
      words_that_contain_that_sound = 
  ipa.contains(the_way_this_word_sounds)
      for every_word in words_that_contain_that_sound:
          the_way_that_word_looks = every_word[0]
          the_way_that_word_sounds = every_word[1]
          
          if the_way_this_word_sounds == the_way_that_word_sounds:
              if the_way_that_word_looks != the_way_this_word_looks:
                  words_that_sound_the_same.append(every_word)

      return words_that_sound_the_same
                   
  get_homophones('their') #[['there', 'ðɛr'], ["they're", 'ðɛr']]

Or Raymond Hettinger style.

Chef's kiss. I hate code that overcomplicates.

Blah blah 'making stuff explicit'... I don't think that it's impossible to make things explicit while also making it ergonomic, and humane to use.

Anyway, programming as a whole is an old paradigm, sigh, might as well make the new thing myself.

Re: Svelte 5 Released

#67
post #58

Svelte 5 has been very nice to work with over the past few months. Yes, runes require you to think more carefully about lifecycles and updates. And you may end up writing a little more code initially than with svelte 4. But it serves you better in the long run with complex apps. I found a process for gradually turning a simple app into a more complex one that works for me. I iteratively move $state() runes out of .sv…

Do you know of any large OSS software built with Svelte? I'd like to see how it turns out in the long run, because I'm reticent of all frontend frameworks nowadays through what I perceive as gateways to uncontrollable accidental complexity and abstractions.

Ofcoz hypest and ml opensource software frontend are build with svelte and they're very successful

huggingface https://huggingface.co/pydio https://huggingface.co/docs/chat-ui Ollma webui https://github.com/open-webui

These are just a few of them that I quickly search and look at their popularity .

Re: Svelte 5 Released

#68

An interesting datapoint: I made my first website a few months ago (I'm an ML engineer). I tried in both Svelte and React. I used Sonnet as a copilot the whole time and expected Svelte to be more difficult because there are orders of magnitude less training data on it. To the contrary! The LLM tied itself in knots very quickly with React but mostly did ok with Svelte/Sveltekit. Also, the Svelte stuff it makes is usua…

Another interesting datapoint:

Every time I try out something other than React (Vue, Svelte, etc), I have to learn some new syntax, understand the runtime magic, and add a syntax/LSP to my editor. But React is just JS/TS, which is straightforward.

Being disappointed by a library/framework because your LLM of choice can't produce decent code doesn't really tell me very much about the library, other than it's usage is varied.

Re: Svelte 5 Released

#69
post #49
post #7

We use Svelte 4.0 in production and it performs beautifully; it rarely is the cause of our frustrations. Excited to try the new version. Lately I’ve also been wondering about the relationship and correlation between software writing skills and writing skills.

Besides a mathematical inclination, an exceptionally good mastery of one's native tongue is the most vital asset of a competent programmer. -- Edsger W.Dijkstra https://www.cs.utexas.edu/~EWD/transcriptions/EWD04xx/EWD498...

If your native tongue isn't English, I don't think that's necessarily true any more.

Re: Svelte 5 Released

#70
Doesn't the philosophy behind Svelte justify a broader scope than just Web apps?

Shouldn't this be a more general programming language, not tied to the web?

Post reply on HN