Live data from Hacker News

Show HN: Sinuous – Small, fast, reactive UI library

github.com

31–40 of 47 posts

Re: Show HN: Sinuous – Small, fast, reactive UI library

#31

I kinda don't get the whole "put html in template literals". Wouldn't there be no syntax highlighting? And the framework is either putting the string into the DOM with some regex manipulations, which would lead to some very confusing error messages, or it's parsing the string into a tree, which means it needs to implement what's essentially XML parsing, which would come with an overhead. And for what? Avoiding JSX? I…

> Wouldn't there be no syntax highlighting?

Are there major IDEs that don't support language injections?

Re: Show HN: Sinuous – Small, fast, reactive UI library

#32

Earlier quoted context omitted.

We were so close. Twice, JavaScript had a chance to be Scheme; both times marketing reasons prevailed (first, to capitalize on the marketing spending of Java; later, to compete against Microsoft's JScript). If Scheme was the language of the web, then HTML and CSS being represented as s-expressions would be the most obvious next steps, and we'd be like 15 years ahead in terms of progress.

Marketing and popularity aren’t unrelated.

Popularity can be faked through marketing.

Re: Show HN: Sinuous – Small, fast, reactive UI library

#33
post #23
post #21

Earlier quoted context omitted.

What do you mean by 'source location'? Why does this matter? I'm intrigued (and also suffering from conjunctivitis so excuse me if I'm being a bit dense and totally missed your point).

If you put a tagged template literal on line 42 in foo.js, every time the tagging function is called from there, the array of strings passed as the first argument is the same object . It’s unique for the source location of the template literal, so even if you paste the exact same code into bar.js, it will have a different object. So, the function can recognize that it is being called from the same location in the sou…

Never knew about this, and completely missed it when reading about them on exploringjs.

Thank you for the explanation!

Re: Show HN: Sinuous – Small, fast, reactive UI library

#34

Earlier quoted context omitted.

Marketing and popularity aren’t unrelated.

Popularity can be faked through marketing.

Popularity can only be faked via shills and poll rigging. Perhaps you mean something else?

Re: Show HN: Sinuous – Small, fast, reactive UI library

#35

Earlier quoted context omitted.

Popularity can be faked through marketing.

Popularity can only be faked via shills and poll rigging. Perhaps you mean something else?

You say that like marketing and shilling are two wholly distinct activities. Have you heard of Instagram?

Re: Show HN: Sinuous – Small, fast, reactive UI library

#36

Earlier quoted context omitted.

Popularity can only be faked via shills and poll rigging. Perhaps you mean something else?

You say that like marketing and shilling are two wholly distinct activities. Have you heard of Instagram?

One is people pretending to like something or wrongly saying people like something. The other is people liking something for the wrong reasons. These are completely two different concepts.

Re: Show HN: Sinuous – Small, fast, reactive UI library

#37

> import { o, h } from 'sinuous'; really recommend you to use proper names instead of single letter variables.

Thanks for the feedback!

`o` is an alias for `observable`. `observable` can be used as well.

`h` is the pragma, comes from hyperscript. it's used by a lot of libraries as the createElement function name so I didn't think this needed a more descriptive name.

Re: Show HN: Sinuous – Small, fast, reactive UI library

#38

All "top ranked" libraries that use fine-grained observables graph in this benchmark are actually "broken"[1]. 1. https://github.com/ryansolid/solid/issues/46

@localvoid thanks for the investigation, Sinuous can get around this with the template module I believe.

Also Sinuous doesn't use the same library as Solid or S.js for tracking dependencies. I'll do some investigating if it has the same issue that you posted.

Re: Show HN: Sinuous – Small, fast, reactive UI library

#39
post #25

I took it for a super simple test run and behavior seems very… weird and incorrect: https://codesandbox.io/s/7o92r . Perhaps I'm just using it wrong, but it's not very clear why this example's state fails to update as you would expect. And I found a few examples of rendering that don't behave as expected.

thanks for reporting, seems to be a bug. added to GH issues and will fix asap

Re: Show HN: Sinuous – Small, fast, reactive UI library

#40

I've toyed around with the template-strings-to-markup approach before, but couldn't quite figure out how using `map` to generate dynamic lists avoided doing a full O(n) loop upon each update without some kind of diffing engine (other than the browser's own markup diffing).

it's indeed not possible, that's why there is a `map` module for rendering lists.
Post reply on HN