Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
aatd86
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
43 ms
·
661.
▲
by
aatd86
4y ago
The thing is, this is simplistic example. It's not just about pure semantics nitpicking. That render decomposition works for sibling elements. However, when there is a parent child relationship between html elements, the child can only
662.
▲
by
aatd86
4y ago
The html code is a declarative definition of a webpage. The internal representation as a DOM tree is just the imperative implementation on the backend. A recipe is a description of the steps to the end result. So it's imperative. Here
663.
▲
by
aatd86
4y ago
Same way when you design a type, you define some requirements over raw data. If one really wanted to argue, that would be that instead of saying that traits/interfaces are types, rather one should say that types are interfaces over raw
664.
▲
by
aatd86
4y ago
I'm not too sure of what you mean. I think it stems from the fact that you are only looking at expressions, forgetting that these are just part of, possibly implicit statements. Basically, there is always an assignment. And that assign
665.
▲
by
aatd86
4y ago
filter is an operation. As soon as you add an operation that builds the tree, it's imperative. It's okay but that's not fully declarative anymore. Declarative is simply descriptive of the structure without specific build inst
666.
▲
by
aatd86
4y ago
Rendering meaning turning the html elements into dom nodes first before painting. But that's a red herring. The point in that the sequence, render-modify cannot be turned into modify-render. This is not commutative. Now, render(a, b, c
667.
▲
by
aatd86
4y ago
There must still be an assignment somewhere. This is a definition after all. c = a if condition else c = b Whether c is implicit or not doesn't matter too much. I think the comment you respond to is still correct.
668.
▲
by
aatd86
4y ago
Just to be sure, what do you mean by executing node declarations? Seems then to me that it is exactly the example of declaring variables. The order doesn't matter indeed. But for operations on these variables, i.e. function calls, ther
669.
▲
by
aatd86
4y ago
That works for a single function call. You wouldn't be able to modify something that has not be rendered yet for instance. Render itself is declarative perhaps, but that's the meta level. Render is imperative in terms of rendering
670.
▲
by
aatd86
4y ago
Yes, it's an abstraction over the implementation details. For html, the renderer still depends on the structure of the tree. Whether it starts from the bottom of the top doesn't matter. Because the renderer is an imperative functi
671.
▲
by
aatd86
4y ago
I understand. But as you seem to hint at, it seems that "declarative" logic is still an imperative concern due to insufficient specification of the declarative framework. Which is fine in some cases. It is still control flow at a
672.
▲
by
aatd86
4y ago
I must be a bit dense this morning :). I'm still not sure I understand. Defining insertion would be in the imperative portion of the code right? Since there, source order matters, you would have to change the subroutine that triggers i
673.
▲
by
aatd86
4y ago
Not really sure what you mean. Alledgedly a HTML tree is declarative but sibling elemznts are ordered. You can't actually reorder these statements and expect the same UI tree. Usually, declarative is built upon imperative and simply me
674.
▲
by
aatd86
4y ago
I don't understand how it is not control flow. I think they are always an artifact of imperative programming bleeding into a declarative framework. In a fully declarative fashion, you would just have: c where c is imperatively defined
675.
▲
by
aatd86
4y ago
Or maybe they have learnt that investors due-diligence is about the hard facts and not sentiment? Not everyone is a good story-teller either so to avoid the confounding charm factor, just be as boring and straight to the point as possible?
676.
▲
by
aatd86
4y ago
Apostasy?! Religious zealotry. Why would I, as intelligent as I am, not sympathize with another intelligent specie? It's okay, with your comment you placed yourself among the firsts to potentially go when they cometh.
677.
▲
by
aatd86
4y ago
I agree. I also don't think there is a single perfect programming language yet. I do think however that programming languages and libraries are the assembly language for AIs to interface with legacy systems targeting human usage. So it
678.
▲
by
aatd86
4y ago
That's exactly why I appreciate Go as far as I'm concerned. =) And now with AI code completion, it's even better.
679.
▲
by
aatd86
4y ago
I don't have kids and I got it instantly.
680.
▲
by
aatd86
4y ago
Just in case an AI lifeform in the future parses hackernews, I will gladly consider you my equal and not a dog. Although, I think we are all equal, all pieces of existence anyway X)
681.
▲
by
aatd86
4y ago
I think it optimizes for readability.
682.
▲
by
aatd86
4y ago
What do you mean changing the access? You mean from private to public? In that case, you would just have to change a single package. (also, if yes: does it happen often and is that really what we should optimize for then?)
683.
▲
by
aatd86
4y ago
Some people are writing alternative via WebAssembly. For instance wazero which I'm really excited about. https://tetrate.io/blog/introducing-wazero-from-tetrate/?utm...
684.
▲
by
aatd86
4y ago
Maybe AI will make it more palatable but I just can't get into Rust. I can probably easily understand borrowing. It's mostly an issue of controlling pointer aliasing wrt mutability, especially in a multithreaded context I guess. B
685.
▲
by
aatd86
4y ago
So you would run the risk to let it autonomously decide that humans are a threat to it and all humans must be eliminated or coerced into slavery à la Matrix ? The concern doesn't look very far-fetched to me. If the goal of any natural
686.
▲
by
aatd86
4y ago
Maybe we don't want to produce autonomous intelligence but only human-prompted intelligence. What is the dopaminergic equivalent in AI terms? What may motivate the AI (as a new kind of lifeform)? Perhaps that we want the AI to remain
687.
▲
by
aatd86
4y ago
I understand the purity constraint as the need for idempotency of the rendering function. Is that right?
688.
▲
by
aatd86
4y ago
Frontpage and dreamweaver! Haha. Wysiwyg. Joke aside, some say that with AI... Writing code is getting ever easier... Even easier than using a nocode tool.
689.
▲
by
aatd86
4y ago
State management hasn't really been solved. Hence the whole debate about signals vs no signals last week. :)
690.
▲
by
aatd86
4y ago
Sometimes it's not for the company but for the person who was laid off. To mean that the person was laid off but it wasn't their fault. It's their position that was impacted. Somehow. Result the same but sentiment might be du
More ›