really recommend you to use proper names instead of single letter variables.
Show HN: Sinuous – Small, fast, reactive UI library
11–20 of 47 posts
Re: Show HN: Sinuous – Small, fast, reactive UI library
#12I 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…
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, validate it, syntax highlight it, format it with tools like Prettier, tree shake it…
--- end quote ---
[1] https://dmitriid.com/blog/2019/03/tagged-template-literals/
Re: Show HN: Sinuous – Small, fast, reactive UI library
#13Kind 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.
#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.htmlRe: Show HN: Sinuous – Small, fast, reactive UI library
#14Kind 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.
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.
Re: Show HN: Sinuous – Small, fast, reactive UI library
#15Kind 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 would probably just treat the html as data, that is normal lisp. So no syntax changes. Same for css I guess. Maybe in twenty years.
Re: Show HN: Sinuous – Small, fast, reactive UI library
#16I 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…
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…
Re: Show HN: Sinuous – Small, fast, reactive UI library
#17I 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…
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…
Agreed, but not for the reasons you quoted.
It should be a law of software engineering because when you're writing code, you aren't writing strings, you're writing a serialized and prettified form of a tree. So when you have two pieces of code you want to join together, you should join trees, not strings.
Breaking this law is precisely why things like SQL Injection even exist in the first place.
Re: Show HN: Sinuous – Small, fast, reactive UI library
#18Kind 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.
Re: Show HN: Sinuous – Small, fast, reactive UI library
#19Re: Show HN: Sinuous – Small, fast, reactive UI library
#20I 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…