Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
leontrolski
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
91.
▲
by
leontrolski
6y ago
Hi, author here. I talked about this in more length here https://leontrolski.github.io/dom-syntax.html and to some extent here https://leontrolski.github.io/33-line-react-thoughts.html . There was also some
92.
▲
by
leontrolski
6y ago
To clarify, the non-trivial thing I'm building is more for exploring the "unified templating language for backend and frontend" bit. I want to be able to use the same code to: - render entire pages from a Python backend - use
93.
▲
by
leontrolski
6y ago
Author here, thanks for the feedback. This is v. much a work-in-progress, I'm in the process of trying to build something non-trivial with it. Just a couple of things to address in general from the comments so far: - I'm aware o
94.
▲
Make Python-style classes from not much JavaScript
(leontrolski.github.io)
2 points
by
leontrolski
6y ago
|
0 comments
95.
▲
Jump Is Joining Lime
(help.uber.com)
1 points
by
leontrolski
6y ago
|
0 comments
96.
▲
Developer's Summary of Consciousness and the Social Brain
(leontrolski.github.io)
5 points
by
leontrolski
6y ago
|
0 comments
97.
▲
by
leontrolski
7y ago
Original discussion - https://news.ycombinator.com/item?id=22776753
98.
▲
by
leontrolski
7y ago
Further musings here - https://news.ycombinator.com/item?id=22791473
99.
▲
React in 33 lines – further musings
(leontrolski.github.io)
2 points
by
leontrolski
7y ago
|
2 comments
100.
▲
by
leontrolski
7y ago
thanks!
101.
▲
by
leontrolski
7y ago
Author here, nice to see this got some interest! As a very small benchmark (uh-oh!), in a console on the linked page, I tried to make/recreate 10,000 divs: const root = document.getElementById('noughts') m.render(root,
102.
▲
by
leontrolski
7y ago
Using m or h as VDOM constructors are mithril/hyperscript-isms, I guess that's not obvious if you not worked with those or similar libraries, sorry!
103.
▲
by
leontrolski
7y ago
Author here - I did put a warning in guys :-) Lots of the code looks pretty code-golfy - I promise I don't do stuff like this at work, neither should you Happy to s/g/grid/ - writing the whole exercise felt a bit
104.
▲
by
leontrolski
7y ago
Mithril's approach (as robertakarobin refers to) is that diffing VDOMs is cheap (where as updating the DOM itself is expensive), the "library" in this post takes the same approach. It's interesting, there's a lot of
105.
▲
by
leontrolski
7y ago
My feeling is that if html and js had syntactically shared data structures at their conception, we wouldn't have quite so much frontend mess as we do now and declarative UI would have been the norm for a while. Having said that, I&#x
106.
▲
by
leontrolski
7y ago
Yeah, it's very mithril influenced (I love that library) - I namecheck them in the article at the top.
107.
▲
by
leontrolski
7y ago
Great answer, thanks! Embarrasingly, I didn't even know about className :-)
108.
▲
by
leontrolski
7y ago
In what way would you say the event binding here differs from React's? (Genuinely interested). The main difference from where I'm sitting is that React has a concept of "Component state" - updates to which trigger local
109.
▲
by
leontrolski
7y ago
Agreed, let me know if you find a better way! I feel if the browser APIs were slightly more declaratively inclined, this article could be "10 line React".
110.
▲
by
leontrolski
7y ago
I'm not sure if any of their content is still relevant, but mithril makes some bold claims for >React performance: https://mithril.js.org/framework-comparison.html#react "Generally speaking, React's approa
111.
▲
by
leontrolski
7y ago
I'm not sure I can quite express what I'm thinking, but do you think this could be achieved orthoganally to the rendering library itself? (Just by "normal" js).
112.
▲
by
leontrolski
7y ago
Author here, this was written as a way for me to explore the core idea of react in a minimal setting. Things it's missing - jsx - routing - performance (maybe?) - component state management stuff What else would you include?
113.
▲
Show HN: 33 line React
(leontrolski.github.io)
418 points
by
leontrolski
7y ago
|
156 comments
114.
▲
Show HN: Immerframe – immutable Python deep updates
(github.com)
2 points
by
leontrolski
8y ago
|
0 comments