Live data from Hacker News

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

github.com

21–30 of 47 posts

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

#21
post #16

Earlier quoted context omitted.

My personal opinion is that tagged template literals are the worst addition to Javascript [1] As HN user stevebmark said [2]: --- start quote --- …we’ve learned not to write code in strings. You’d think this would be a fundamental law of software engineering … Writing code, not strings, means you can do everything to it that you can do to code. You can type check code. You can lint it. You can optimize it, compile it…

I think your blog post misses an important aspect of tagged template literals, which is that the first argument is an immutable object that is unique to the source location of the template. That doesn’t necessarily invalidate the rest of your argument, but it is a very powerful feature that is not really equivalent to anything else in JavaScript.

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).

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

#22
post #2

I work in this space so I am curious how your library is different from its similar competitors. I read the docs, but I didn't find anything about the actual model for how it works, like whether the whole UI rerenders on any observable change or not. Maybe consider this paragraph a request for documentation. PS: A minor suggestion: the word "blazing" is so overused in the JS world at this point, when I see it I alway…

I've started learning Rust after many years of NodeJS. In the past 3 weeks I've seen more "blazing" in Rust library marketing than in all my years of NodeJS combined.

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

#23
post #21
post #16

Earlier quoted context omitted.

I think your blog post misses an important aspect of tagged template literals, which is that the first argument is an immutable object that is unique to the source location of the template. That doesn’t necessarily invalidate the rest of your argument, but it is a very powerful feature that is not really equivalent to anything else in JavaScript.

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 source. This has some interesting implications for meta programming and debugging.

I’m not sure that it matters so much to the discussion, but it is a completely unique feature, and really has to be mentioned when discussing what tagged template literals offer.

EDIT: Looked for a good reference - best detailed description I could find was here: https://exploringjs.com/es6/ch_template-literals.html#sec_im...

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

#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.

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

#26
post #2

I work in this space so I am curious how your library is different from its similar competitors. I read the docs, but I didn't find anything about the actual model for how it works, like whether the whole UI rerenders on any observable change or not. Maybe consider this paragraph a request for documentation. PS: A minor suggestion: the word "blazing" is so overused in the JS world at this point, when I see it I alway…

[deleted]

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

#27
post #22
post #2

I work in this space so I am curious how your library is different from its similar competitors. I read the docs, but I didn't find anything about the actual model for how it works, like whether the whole UI rerenders on any observable change or not. Maybe consider this paragraph a request for documentation. PS: A minor suggestion: the word "blazing" is so overused in the JS world at this point, when I see it I alway…

I've started learning Rust after many years of NodeJS. In the past 3 weeks I've seen more "blazing" in Rust library marketing than in all my years of NodeJS combined.

I've noticed it too. It drives me mad.

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

#28
post #7

Kind off-topic but related: sometimes I wonder how web development would be if Lisp had somehow won as standard, since we can use to do everything the stack HTML+CSS+JS+Backend-language does, in addition to standardized syntax and standard everything. Oh, standards. Standards.

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.

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

#29
post #13
post #7

Kind off-topic but related: sometimes I wonder how web development would be if Lisp had somehow won as standard, since we can use to do everything the stack HTML+CSS+JS+Backend-language does, in addition to standardized syntax and standard everything. Oh, standards. Standards.

From Racket [1]: #lang web-server/insta (define (start request) (response/xexpr '(html (head (title "My Blog")) (body (h1 "Under construction"))))) [1] - https://docs.racket-lang.org/continue/index.html

And given this site, I suppose a link to arc/anarki is relevant too:

https://github.com/arclanguage/anarki/blob/master/apps/news/...

Post reply on HN