News for hackers. Stuff that matters.
Re:I'm Betting on HTML by p-e-w on Wednesday August 02, 2023 @01:16AM (#36967199)
HTML is the solution to walled-garden lock-in? What? Those walled gardens already use HTML, including some of the semantic elements mentioned (plus ARIA semantic attributes, which are much more sophisticated).

> ChatGPT-like interfaces are likely the future of human data access.

And the whole point of artificial intelligence systems is that they don't require specialized "machine-readable" annotations in order to process input. ChatGPT (and its future offspring) can navigate regular websites the same way humans do. They don't need us to hold their hand. They know when a sequence of paragraphs constitutes a "list", without it having to be explicitly marked as such, etc.

What the author appears to be describing is simply an API mediated through HTML semantic elements. But if you have an API, you don't need a Large Language Model for automatic data access – a good old Python script using Beautiful Soup will do just fine. And it has the added benefit that it runs entirely locally.

Re:I'm Betting on HTML by mmahemoff on Wednesday August 02, 2023 @02:03AM (#36967494)
Valid point. Ironically the main benefit of semantic markup is now an abstraction to help the human developers effect styling and control.
Re:I'm Betting on HTML by jraph on Wednesday August 02, 2023 @03:18AM (#36967976)
Isn't the main benefit of semantic markup still accessibility?
Re:I'm Betting on HTML by mmahemoff on Wednesday August 02, 2023 @04:11AM (#36968300)
That’s one of the main benefits, but if the machine can make sense of the content, it can still present it however is clearest for the user.
Re:I'm Betting on HTML by oneeyedpigeon on Wednesday August 02, 2023 @10:30AM (#36971413)
But explicit, human-verified metadata is always going to beat inferred, fuzzily-extracted data, surely?
Re:I'm Betting on HTML by mmahemoff on Wednesday August 02, 2023 @08:56PM (#36979967)
Maybe in some cases, but that requires time and expertise. It may not be worth it in many cases.
Re:I'm Betting on HTML by theteapot on Wednesday August 02, 2023 @02:19AM (#36967612)
> ChatGPT (and its future offspring) can navigate regular websites the same way humans do. They don't need us to hold their hand.

It can?! It does that?

Re:I'm Betting on HTML by andai on Wednesday August 02, 2023 @02:36AM (#36967726)
ChatGPT had a Browser Plugin (via the Plus subscription) but last I checked it was removed, (possibly because it cannibalized Bing? Or just the reliability issues).
Re:I'm Betting on HTML by jack_pp on Wednesday August 02, 2023 @02:28AM (#36967670)
In its current form, not as far as I know. Even the OpenAI tutorial on this matter scrapes first and uses only normal text.

https://github.com/openai/openai-cookbook/blob/main/apps/web...

Re:I'm Betting on HTML by kennyloginz on Wednesday August 02, 2023 @02:21AM (#36967620)
You don’t need a good old Python script using Beautiful soup, you can use an LLM with the added benefit of not dealing with that cruft.
Re:I'm Betting on HTML by selfhoster11 on Wednesday August 02, 2023 @02:50AM (#36967814)
An LLM is much slower and requires more resources at runtime than Beautiful Soup (if you are hosting yourself), and could fail to retrieve data. It's a worse solution unless your HTML parser/scraper is broken by website changes.

This is only the case for now, however. I expect this to change in favour of LLMs as time goes on and they become easier to deploy and better at their job.

Re:I'm Betting on HTML by wruza on Wednesday August 02, 2023 @02:49AM (#36967812)
ChatGPT (and its future offspring) can navigate regular websites the same way humans do

It seems to be at least a not-yet-true claim, but let’s ignore that for now. It’s interesting if LLMs actually could do this. As I understand it, LLMs are trained on texts and source code among other things. But lacking… let’s name it a reasoning apparatus, can they really look at a DOM tree and tell what it is/does? It’s not a text, and barely can be a well-structured source code that was ever discussed (it’s a result of either bundling or componentization). This is almost on par with “LLMs will look at any .exe and be able to integrate with it immediately”.

Re:I'm Betting on HTML by kevinstubbs on Wednesday August 02, 2023 @03:28AM (#36968037)
> can they really look at a DOM tree and tell what it is/does

Yes, if you encode the DOM as a list of options for ChatGPT to choose from. In fact I developed a proof of concept of this for a client. https://jarvys.ai/ although they seem to have pivoted from automating just the browser to automating all software.

Re:I'm Betting on HTML by wruza on Wednesday August 02, 2023 @03:44AM (#36968126)
if you encode the DOM as a list of options for ChatGPT to choose from

Not sure if I understand this, does it mean you have to pre-cook DOM in a specific way? If yes, then isn’t the answer to my question “no”, like “no, it can’t take any site and use it as is”?

Re:I'm Betting on HTML by kevinstubbs on Wednesday August 02, 2023 @04:15AM (#36968339)
You have to give GPT an objective, like "find an apartment in Florida" and then say something like "given the following options, which one would you interact with to get closer to your objective."

So if you assume that you start on google.com, then your options are like 1.) Input with name "search", placeholder "search anything", value "" 2.) Button with label "I'm feeling lucky" 3.) Button with label "search"

Obviously, doing just one of these doesn't achieve the objective - it just needs to pick which one it thinks has the most "value" for completing the objective. If you repeat that enough times, then it can actually do what your overall goal of the session was.

I'm just giving a simplistic answer, and if you implemented only what I've written, then it's going to get stuck in a loop more often than not. But that's the gist of how you could encode the DOM into something that GPT can interpret and make decisions/take actions based on.

Re:I'm Betting on HTML by wruza on Wednesday August 02, 2023 @04:18AM (#36968362)
Got it, thanks!
Re:I'm Betting on HTML by TeMPOraL on Wednesday August 02, 2023 @07:23AM (#36969391)
Remember HATEOAS? I have a feeling LLMs would excel at navigating proper REST (not "RESTful") APIs - HATEOAS is, in principle, just what you did here: providing a list of possible/useful next steps along with the response.

In fact, the problem of HATEOAS is exactly what LLMs seem to be good at - inferring the interface at runtime, from dynamically received metadata. This should even be easy to try in practice today - HATEOAS can be trivially mapped to the "function calling" feature of OpenAI's GPT-3.5/GPT-4 APIs.

Re:I'm Betting on HTML by rezonant on Wednesday August 02, 2023 @04:34AM (#36968460)
Well if the DOM is all unstructured divs with no semantic information, can a human even tell what it means without applying the structural styling on the page?

A good example would be a misguided approach at making a bunch of labels with values that are aligned. Someone told this poor developer that <table> is bad, so they figure hey, let's use CSS to lay it out. They make a dictionary of the key/value pairs and iterate over all the keys in the first column into the first div and then output all the values in the second div.

div - label 1 - label 2

div - value 1 - value 2

If there's 100 key/values it's going to be hard for a human to figure out which value is for the 76th item, and LLMs have proven to be very bad at indexing problems like that so I wouldn't expect it to be a better story there.

(Not saying this wouldn't work in some cases, just couldn't be a general solution given the crap out there)

Re:I'm Betting on HTML by delusional on Wednesday August 02, 2023 @03:18AM (#36967980)
> “LLMs will look at any .exe and be able to integrate with it immediately”.

The LLM will looks at any .exe and determine if it halts.

Re:I'm Betting on HTML by KronisLV on Wednesday August 02, 2023 @03:31AM (#36968050)
> The LLM will look at any .exe and determine if it halts.

https://en.m.wikipedia.org/wiki/Halting_problem

> The halting problem is undecidable, meaning that no general algorithm exists that solves the halting problem for all possible program–input pairs.

It feels like at that point you need an AGI that's superior to humans and can figure out something we can't, rather than an LLM that more or less repeats human knowledge, not even necessarily reasoning about it.

Re:I'm Betting on HTML by kaba0 on Wednesday August 02, 2023 @03:41AM (#36968109)
I am 100% sure that parent poster was being sarcastic at the hype around LLMs and how many think they can solve everything, even if said thing is impossible to do, e.g. the halting problem.

Do note that the halting problem is fundamentally true, no AGI will realize some new way around, unless are mathematics are flawed to the core.

Re:I'm Betting on HTML by mythhabit on Wednesday August 02, 2023 @05:49AM (#36968853)
There is some nuances here. While the general halting problem for a general Turing machine is undecidable, and with a fairly easy to understand proof as well, the computers we run today are not a general Turing machine. They are of a weaker class called Linear Bounded Automatons and for the programs they can run, the halting problem is fact decidable, on a theoretical level due to their finite nature.

So we will probably never practically solve the halting for LBAs due to the fact, the quest for this AGI that should be able to solve this, is not just day dreaming, it's rooted in the theory.

Re:I'm Betting on HTML by kaba0 on Wednesday August 02, 2023 @07:45AM (#36969540)
I have to admit my knowledge of complexity theory doesn’t extend too far, but isn’t the solution to LBAs just.. brute forcing? Also, is it even decidable a priori whether a program is LBA vs requiring a tape that is not only linear function of its input?
Re:I'm Betting on HTML by vidarh on Wednesday August 02, 2023 @07:59AM (#36969657)
The worst case solution is just brute forcing, yes.

An LBA is effectively "just" a Turing machine that has a finite tape.

A typical current computer is an LBA only if you disallow all IO of any sort or bound that IO and include it as part of the system you analyse and so fix the values which will be provided as IO, which of course is a very unusual situation, and so that constraint does not really make the halting problem more tractable in situations we usually care about.

Re:I'm Betting on HTML by mythhabit on Friday August 04, 2023 @03:11AM (#36996496)
The naive way of deciding it it halts is executing it and keep track of all state between steps. If the machine halts, you're done, if it repeats a state, it's looping.

If you can represent a program with an LBA, it is by definition a context sensitive language and decidable. You could also show it by making a equivalent gramma for the language, that accepts the same input as the program. This gramma must be constructed in a certain way, and then you know it is a context sensitive language.

Re:I'm Betting on HTML by vidarh on Wednesday August 02, 2023 @07:46AM (#36969545)
A machine we have to today in isolation with no form of IO are not general Turing machines, but almost all of them do have that and so if you consider them in isolation rather than the full system (which would include all sources of inputs) the halting problem applies. E.g. code to the effect of "while gets() {}" will either halt or not halt depending on the input, but which isn't decidable without knowing or constraining that input.

We can certainly look for AGI that can do better at deciding the halting of decidable programs, but even for current computers the general halting problem is undecidable without adding artificial constraints.

Re:I'm Betting on HTML by mythhabit on Friday August 04, 2023 @03:14AM (#36996516)
IO is just state and can be represented on the tape. You can construct a machine for every conceivable input at every time during the execution and reason about them.
Re:I'm Betting on HTML by vidarh on Friday August 04, 2023 @04:16AM (#36996981)
"while (gets()) {}" is undecidable because the "tape" is conceptually infinite.

So, no, you can not construct a machine for every conceivable input without imposing an artificial constraint on the input size.

Put another way: For every tape you construct and analyse, there is a tape one segment longer that might contain a symbol that can alter the outcome.

Re:I'm Betting on HTML by mythhabit on Monday August 07, 2023 @08:24AM (#37033458)
You can, theoretically, keep constructing machines for every input you need. Yes you are bounded, but you can say "this machine will halt for every input it can receive in the next 100 years", because you need to quantify the input in blocks of time.
Re:I'm Betting on HTML by odyssey7 on Wednesday August 02, 2023 @11:36AM (#36972350)
It’s fun to think about. What about the Collatz conjecture? If we run it for arbitrary n, on a computer that represents numbers up to n_max, we could know if it will halt within n_max steps. Since only n_max numbers are representable, we could track all visited numbers to detect any cycle that might occur. If on the other hand any iteration would exceed n_max, then the program would halt by crashing.

  hailstone :: Integer -> Integer
  hailstone n
    | n `mod` 2 == 0 = n `div` 2
    | otherwise      = 3 * n + 1
  
  collatz :: Integer -> Bool
  collatz n
    | hailstone n == 1 = True
    | otherwise        = collatz (hailstone n)
Re:I'm Betting on HTML by kaba0 on Wednesday August 02, 2023 @11:58AM (#36972676)
We have actually done something like that up to the 32bit n_max for sure (but maybe even 64bit?), without any number that would contradict the conjecture.

But yeah, it is not even trivial to say whether it has a bounded max memory, so in case of an arbitrary precision int type, it may not be LBA, but Turing?

Re:I'm Betting on HTML by odyssey7 on Wednesday August 02, 2023 @12:20PM (#36973006)
I guess I was thinking about indexing the visited numbers from a graph-traversal-algorithm-interview perspective instead of a CS theory one.

We can actually do it in O(1) space complexity in exchange for higher time complexity.

For i in range 1..n, compute n_i, the ith number in the hailstone iteration, and then continue the hailstone iteration n_(i+1)..n_n to see if n_i is equal to any of them. This takes us to quadratic time complexity, O(n^2), but only requires storing a single n_i at a time for cycle detection.

But then again, if you actually loop for n_max iterations without crashing, you had to reuse a number somewhere, so the explicit cycle detection isn’t really important.

Re:I'm Betting on HTML by treprinum on Wednesday August 02, 2023 @06:30AM (#36969059)
Halting problem is one of the problems that arise from precise mathematical definition and its outskirts. LLMs are all about making sense from unstructured text, i.e. lying on the opposite end of the spectrum where math has no direct way to do anything. So while the poster was sarcastic, they also missed the mark.
Re:I'm Betting on HTML by kaba0 on Wednesday August 02, 2023 @07:48AM (#36969559)
The halting theory is analogous to Gödel’s incompleteness theorems and these are fundamental truths to any system. That matrix multiplication that deep learning does is hardly immune to that.
Re:I'm Betting on HTML by treprinum on Wednesday August 02, 2023 @09:41AM (#36970757)
They are fundamental truths to systems based on certain assumptions we are taking for granted, e.g. binary logic (and not e.g. anisotropic or quantum logic), Turing-like computing model etc. Not that deep learning has anything to do with those, but it excels in human-like properties where simple formula-derived math descriptions fail all the time.
Re:I'm Betting on HTML by kaba0 on Wednesday August 02, 2023 @11:23AM (#36972159)
Is a NN a computable function? Yes, as we calculate them on Turing machines. Then it is prone to every limitation of computable functions.

Humans are also limited by the Turing model’s limits, we can only ever determine computable functions as well. With all due respect, it is stupid to assign more capabilities to ML than what we know is fundamentally the limit..

Re:I'm Betting on HTML by treprinum on Wednesday August 02, 2023 @11:46AM (#36972488)
While that's true, halting problem is completely useless in the real world (nobody designs user-facing apps while thinking about whether the program halts), whereas picking data from speech is a much more useful one that was long unreachable for "clean" closed-formula math.
Re:I'm Betting on HTML by kaba0 on Wednesday August 02, 2023 @11:52AM (#36972585)
Ok, and it is completely irrelevant. Besides, guess what enables the training of those neural networks? I’m fairly sure gradient descent has a bit to do with mathematics’ closed-formulas.

Of course ML has use cases where traditional tools are less fit, my gripe is the hype-based anti intellectual nonsense that often surrounds it. They are no magic tools, the fundamental limits these giants of math/CS discovered still apply to them and we can save ourselves from a lot of pain if we don’t bother solving unsolvable problems.

Re:I'm Betting on HTML by treprinum on Wednesday August 02, 2023 @12:47PM (#36973388)
Yeah, hype is driven by business and marketing who want to sell more of a new thing pointing out what was not possible before using all kinds of silly arguments. Still, there is some noticeable progress there (compared to e.g. crypto that outside logistics and large-scale fraud didn't bring much despite being based on super solid number theory concepts).
Re:I'm Betting on HTML by thanatropism on Wednesday August 02, 2023 @09:48AM (#36970874)
What. There are no proofs of convergence for many of the most popular NN optimization algos. IIRC Adam is known not to converge in some cases.

The bitter lesson is that Messy AI is better able to cope with Messy World Problems than Neat AI (by light-years at this point), not that it can hack Neat Problems.

Re:I'm Betting on HTML by kybernetikos on Wednesday August 02, 2023 @07:26AM (#36969405)
The halting problem is absolutely solvable in some cases, it's just the general case in which it is unsolvable. If LLMs were able to decode web pages and executables in a high proportion of the interesting cases, that would already be extremely useful. Humans can't do this in the general case either, but we still hire them to do jobs like this.
Re:I'm Betting on HTML by kaba0 on Wednesday August 02, 2023 @08:00AM (#36969666)
> If LLMs were able to decode web pages and executables in a high proportion of the interesting cases

Why would it be extremely useful?

Re:I'm Betting on HTML by thanatropism on Wednesday August 02, 2023 @09:45AM (#36970812)
I remember the hype around XGBoost and Kaggle contests asking to solve problems in prime number theory.
Re:I'm Betting on HTML by wruza on Wednesday August 02, 2023 @03:38AM (#36968084)
I believe it was a positive sarcasm in gp.
Re:I'm Betting on HTML by reichstein on Wednesday August 02, 2023 @03:49AM (#36968166)
I think KronisLV's point, presented ironically, is that not even an AI superior to human reasoning, which can figure out things we cannot, can decide the undecidable.

Being undecidable is a hard limit, not something that requires better algorithms. Another phrasing of it could be: No finite program can decide it. (And what even is an infinite program? Not something we can run on any current computer.)

If an AI is itself a finite-sized program, something we run on computers, it cannot possibly solve the halting problem.

And _any_ non-trivial property of programs is undecidable, so an AI "integrating with any .exe file" isn't really meaningful. It's just words.

Re:I'm Betting on HTML by vidarh on Wednesday August 02, 2023 @08:37AM (#36970043)
> Another phrasing of it could be: No finite program can decide it. (And what even is an infinite program? Not something we can run on any current computer.)

The complexity of the program trying to decide is not really the issue. An "infinite program" could add an infinite number of extra rules to try to cut down on the time taken to determine if a decidable program halts, but the issue with the halting problem is that there is an infinite set of undecidable programs where the size of your detector will make no difference to your ability to decide them.

E.g. "while next_symbol() == some_arbitrary_symbol {}" is undecidable unless you add constraints on the length or contents of the input.

Even if you haven infinite-sized program you can't decide whether or not the unconstrained version of that halts, because deciding it is equivalent to being able to determine if an infinite tape contains a given symbol, and no matter how long you scan the tape the symbol can always be the next one on the tape after the last symbol you scan.

> And _any_ non-trivial property of programs is undecidable

I don't think I agree with this without adding the qualifier "in general". There are a whole lot of useful properties we can decide, but often the properties will have constraints. E.g. for a whole lot of programs where we can't decide whether or not they will halt, we can still decide whether or not they will halt assuming certain properties of their inputs. E.g. we can decide the property of my pseudo-code above that it will halt IF "some_arbitrary_symbol" is in the input. We can also decide the property that whether or not it will halt in general is undecidable, and that is itself useful to know, because for many programs knowing what makes them undecidable is useful in order to suggest e.g. adding timeouts, or ensuring there are ways to bail early from certain actions without restarting the machine or killing the program.

For a whole lot of problems we also do not really care whether or not a given property is decidable. We care whether they're decidable often enough within certain time constraints, and that's a very different ballgame.

Re:I'm Betting on HTML by wruza on Wednesday August 02, 2023 @03:18PM (#36975741)
It has meaning. By looking at a table in e.g. getopt() call and an output of --help I can often infer modes of a program that I probably need, to do my job when someone asks me to. Whether this getopt() gets called or if a program does what it claims in usage() is not my concern. I was commanded to guess the usage and I do it without burying into the halting problem. And so does that hypothetical AI.

Decidable or undecidable is about maths, not practice.

Re:I'm Betting on HTML by abwizz on Wednesday August 02, 2023 @04:19AM (#36968368)
i suspect this is because they can divide by zero
Re:I'm Betting on HTML by chromoblob on Wednesday August 02, 2023 @05:34AM (#36968785)
.exe's (for the usual architectures) run on finite-state machines, not Turing machines. So, indeed, that is possible.
Re:I'm Betting on HTML by kaba0 on Wednesday August 02, 2023 @05:44AM (#36968830)
That’s still a stupid pedantry, and is even false.

A Turing machine only makes use of at most n cells of its tape after n steps - so running it for a finite number of steps is possible even in finite memory. Especially that modern computers can do arbitrary side effects, having access to the whole universe as tape, which is still finite, but so is time.

There is no way to differentiate between a magical Turing machine with infinite tape and a “fake” one that has n-sized memory under any program that takes n steps, so for all practical purposes they are identical.

Re:I'm Betting on HTML by chromoblob on Wednesday August 02, 2023 @05:53AM (#36968869)
Why are they identical? A program may use more steps than memory.
Re:I'm Betting on HTML by kaba0 on Wednesday August 02, 2023 @06:23AM (#36969020)
A Turing machine can either go left or right on its tape (some versions have a stay step as well, doesn’t matter). If all your program does is step right forever, than it will use the maximum amount of memory, but only ever a finite amount, that is equal to the number of steps taken.

So if you don’t have infinite time (you don’t have), and you have big enough memory for the particular use case so that you don’t get OOMKiller involved, then you have a Turing machine for all complexity theoretical and practical purposes, especially that RAM is not analogous to the Turing machine tape - your computer has much more state than only its memory, if it has network access, you can basically make use of a cloud vendors whole army of servers as storage, just as an example.

Re:I'm Betting on HTML by chromoblob on Wednesday August 02, 2023 @06:32AM (#36969071)
The reason for undecidability of halting is that a program's state may grow without bound. If a program's memory usage is bounded, its halting can be determined. So the computer is not like a Turing machine since its programs don't use Turing machine's key feature - infinite tape.
Re:I'm Betting on HTML by 3cats-in-a-coat on Wednesday August 02, 2023 @05:05AM (#36968654)
LLM would find it easier to browse through a browser. Like us. Implying image model linked.
Re:I'm Betting on HTML by tyingq on Wednesday August 02, 2023 @06:45AM (#36969161)
"ChatGPT (and its future offspring) can navigate regular websites the same way humans do"

I don't know how much deeper it goes, but it does have some context:

  Prompt: Given this html, what does an end user see?
  <div style="display:none">hello</div><div>you</div>

  ChatGPT:
  An end user would see only the text "you" on the webpage.

  The first <div> element has the inline style display:none, which means it is set to be hidden, and its content "hello" will not be visible to the user. On the other hand, the second <div> element has no specific display style, so it will be visible, and its content "you" will be displayed on the webpage.
Re:I'm Betting on HTML by datagram on Wednesday August 02, 2023 @04:04PM (#36976505)
There's already companies working on this: https://axiom.ai/

I would guess that it's just a matter of converting the DOM accessibility tree into text descriptions, e.g. "There is a button that says 'Start'" And then converting text like "Click the Start button" back into an actual action on the page.

Re:I'm Betting on HTML by fauigerzigerk on Wednesday August 02, 2023 @03:00AM (#36967867)
AI in general could "see" a website like we see it. But LLMs specialise in text. They will find it much easier to figure out the correct semantic interpretation of tag soup than deriving the same information from the rendered output like we do.

Also, the big question is cost. I think semi structured text will forever be far cheaper for an AI to process than a completely unstructured data stream representing visual information.

Re:I'm Betting on HTML by abwizz on Wednesday August 02, 2023 @04:20AM (#36968371)
> They know when a sequence of paragraphs constitutes a "list", without it having to be explicitly marked as such, etc.

that's the thing; they don't know - they guess

Re:I'm Betting on HTML by circuit10 on Wednesday August 02, 2023 @05:36AM (#36968794)
Humans do the same, it’s usually obvious from the context
Re:I'm Betting on HTML by abwizz on Thursday August 03, 2023 @05:14AM (#36983313)
i guess there is something to be said in favor of humans and computers meeting half way
Re:I'm Betting on HTML by rezonant on Wednesday August 02, 2023 @04:26AM (#36968409)
I got the sense that the article was advocating for using good semantic machine readable content over HTTP instead of (or at least in addition to) JS-only div soup so that automated agents like the new wave of LLMs can easily pull out the important details without spinning up a headless browser and rendering the page first.

I have the same interest but for the purpose of crawling and upstart search engines. If indexing every page required running the page in a headless browser first, the barrier to entry for new search engines is a lot higher.

Re:I'm Betting on HTML by bob1029 on Wednesday August 02, 2023 @04:35AM (#36968471)
This seems reductive to me.

There's "HTML" and then there's the kind of website where the final DOM isn't known until the user has already been attempting to read it for 10 seconds. There is a substantial difference in the % of browser capabilities that need to be exercised between the extremes of use.

Complexity of implementation is what ultimately separates the good from the bad. Any tool can be operated skillfully or poorly. An apprentice with a circular saw and a fully charged battery can do a hell of a lot of damage. A master may elect to use no tool at all and simply bang on the side of the thing (I.e. push back on the business).

The latest websites I have built are some of my most compatible ever. I don't use web sockets anymore. I don't depend on JavaScript to have piecemeal conversation with the server. You can actually use ~80% of the product with JavaScript entirely disabled. How are the engineering choices demonstrated here not exactly the solution for walled garden lock-in?

Re:I'm Betting on HTML by feitingen on Wednesday August 02, 2023 @04:49AM (#36968563)
Lots of websites already present a machine friendly site to google-bot and some other spiders.

I don't see why they can't offer the same to other bots and only serve the Javascript-heavy pages to humans.

Re:I'm Betting on HTML by MrDresden on Wednesday August 02, 2023 @05:01AM (#36968640)
The point is that a lot can be done without the need for Javascript. Also in pages served to humans.
Re:I'm Betting on HTML by flagrant_taco on Wednesday August 02, 2023 @07:14AM (#36969342)
The idea of maintaining two entirely different versions of the same side gives me flashbacks to the days when they sir had a separate "m." codebase for mobile. There's a reason we found better solutions there, building and maintaining the same site twice is almost never worth it.
Re:I'm Betting on HTML by oneeyedpigeon on Wednesday August 02, 2023 @10:33AM (#36971452)
This is why you wouldn't build "two entirely different versions of the same site", you'd build one version and toggle the <script> tag on and off.
Re:I'm Betting on HTML by flagrant_taco on Wednesday August 02, 2023 @10:39AM (#36971547)
That may not work for a lot of sites that depend on client rendering and don't server-render the full page content

Its really easy for this to break and go unnoticed for a while as well. You could run tests against the static version, but I wouldn't be surprised at all to see them "temporarily" disabled because a new feature needs to go live and something is the breaking in the static tests

Re:I'm Betting on HTML by oneeyedpigeon on Wednesday August 02, 2023 @10:48AM (#36971671)
Sure; I guess it depends if we're talking about a web site or a web app.
Re:I'm Betting on HTML by bob1029 on Wednesday August 02, 2023 @10:57AM (#36971779)
> That may not work for a lot of sites that depend on client rendering

Products that depend on client-side rendering don't deserve to have regression-free experiences. You are literally doing layout with javascript and wondering why things get funny on edge case clients.

The web is fucked until it becomes truly popular to build vanilla, SSR applications again. I feel like we are almost at the end of the tunnel of client-side hell, but perhaps some aggressive final pushes could help ship the narrative.

The server is fast. Stop doing your layout on the client. Use media queries to address the wide range of viewport dimensions. You can have a responsive website, installable as a PWA on home screen of any mobile device and also as a 4k detailed desktop layout with 0 lines of JS required. All you have to do is stop outsourcing your independence to framework vendors and pick up the MDN bible.

Re:I'm Betting on HTML by sublinear on Wednesday August 02, 2023 @11:54AM (#36972612)
This sounds regressive and the battle has been over for almost a decade now. Server-side rendering is silly and client-side rendering should not be used for the entire page. Even for complex web apps, the majority of the HTML is static.

The best web experiences are static HTML with client-side rendering only used for the dynamic sections of the page. It's not even a choice to do it any other way anymore if you care about a11y and SEO.

Re:I'm Betting on HTML by sodapopcan on Wednesday August 02, 2023 @12:41PM (#36973304)
> It's not even a choice to do it any other way anymore if you care about a11y and SEO.

Can you explain this?

Re:I'm Betting on HTML by bob1029 on Wednesday August 02, 2023 @12:32PM (#36973183)
> This sounds regressive and the battle has been over for almost a decade now

This sounds like what google would like for everyone on HN to believe.

Using "a11y" and "SEO" to push bad technology abstractions is tantamount to petty bullying in my view.

Genuinely, I don't understand the position that SSR somehow makes accessibility worse. Can you walk me through how adding more javascript on top somehow solves the problem of making a website compatible with a screen reader?

Re:I'm Betting on HTML by sublinear on Wednesday August 02, 2023 @02:28PM (#36974906)
> Can you walk me through how adding more javascript on top somehow solves the problem of making a website compatible with a screen reader?

I didn't say to add javascript to make the page more accessible. I said that a static HTML page is most accessible and should be strongly preferred over any dynamic content regardless of how it's rendered. Screen readers can misannounce dynamic elements and leave the user confused about the state of the page.

But when dynamic elements do need to be reannounced due to an event, refreshing the page would be a terrible experience since the screen reader loses focus and starts back from the top of the page. Aria alerts also require javascript. It makes perfect sense that if you're pushing out an aria alert with js already that all that rendering logic should also go on the client side.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/A...

As for SEO, I'm specifically talking about good metadata in the head tag, a static page that's comprehensible, and a sitemap. Static pages are better than SSR for this because SSR doesn't always respond with the same page for the same URL.

Re:I'm Betting on HTML by _jal on Wednesday August 02, 2023 @10:47AM (#36971659)
I don't see why they can't offer the same to humans, at least as an option.

There are a few sites I impersonate Googlebot to, they're much more usable that way.

Re:I'm Betting on HTML by yellowapple on Wednesday August 02, 2023 @11:30AM (#36972259)
> And the whole point of artificial intelligence systems is that they don't require specialized "machine-readable" annotations in order to process input.

I don't require a cup to hold my drink. That doesn't make cups useless or undesirable.

Point being: if a machine can make sense of the veritable clusterfuck that is the "pile of infinitely-nested divs" status quo, then surely it'd have a much easier time making sense of pages that actually use HTML properly. If you're an AI trying to figure out how far along something is, which is gonna be a more obvious indicator?

    <div id="reactElement420" class="wangularClass69"><div class="25-long red" visibility="hidden"/><div class="50-long yellow" visibility="hidden"/><div class="75-long green"/></div>

    <progress max="100" value="69">69%</progress>
The first example is hyperbolic, sure, but only slightly.
Re:I'm Betting on HTML by fennecfoxy on Thursday August 03, 2023 @09:37AM (#36985714)
Completely agree with you. The magic of LLMs is being able to chuck it an unstructured mess of data and have it parse and interpret this data in some semblance of the way that a hooman would.

LLMs will only get smarter, and we can only guess what comes after the transformer model anyway. LLMs atm have the very obvious problem of appearing smart but not quite getting all the way there; I think this is pretty much down to it simply trying to predict the next token at its core. Perhaps we'll see something smarter when figure out that an LLM should only be used for output of semantic natural language and not ideation/conceptualisation (which should be handled by a separate model that deals in abstract concepts).

Re:I'm Betting on HTML by ric2b on Friday August 04, 2023 @03:17PM (#37004543)
But if they first need a browser to chew through the usual tens of megabytes of javascript so that they can finally get the 100KB DOM to parse through, they'll be way less efficient (and often run into the token limits) than if the page has some nice semantic HTML with some optional JS for interactivity (that the AI doesn't need).