News for hackers. Stuff that matters.
Re:Alan Kay on “Should web browsers have stuck to being docu... by calvinmorrison on Sunday January 08, 2023 @07:09PM (#34304917)
Web browsers achieved all the dreams of Java developers. In fact, declaring to a newly wed college graduate that - back in olden days of yore - software had to not only be downloaded, but it had to be hand built against each operating system, until a magic wonder called Java came around and abstracted those things. Then better browsers came and brought the Java into the browser, then finally javascript and rendering had reached enough maturity to implement essentially an entire operating system / virtual machine AS the browser, that java applets were gone.

truly incredible in a sense

Re:Alan Kay on “Should web browsers have stuck to being docu... by zelphirkalt on Sunday January 08, 2023 @07:19PM (#34305010)
Incredible, but also incredibly wasteful. Often websites send our CPU fans spinning for stuff, that should not even wake up a CPU fan. In that regard the browser ecosystem needs to seriously lose weight. We have more powerful machines than ever, but we are wasting their potential to no end with fat bloated web apps.
Re:Alan Kay on “Should web browsers have stuck to being docu... by agumonkey on Sunday January 08, 2023 @07:23PM (#34305049)
Maybe there will be a W3C spec for perf profiles. No js, no dynamic css, PDF life interactions. Maybe that is stupid, but with that information your browser can go into a different, near zero power, mode.
Re:Alan Kay on “Should web browsers have stuck to being docu... by KronisLV on Sunday January 08, 2023 @07:31PM (#34305131)
Didn't Google's AMP project set out to achieve something similar? https://en.m.wikipedia.org/wiki/Accelerated_Mobile_Pages (albeit as a bit of a walled garden)

Personally I almost wish that the majority of sites out there didn't pretend like they need to be highly dynamic, interactive and inevitably wasteful experiences.

Re:Alan Kay on “Should web browsers have stuck to being docu... by dmitriid on Monday January 09, 2023 @04:31AM (#34308462)
Google's AMP project was Google's weapon against Facebook's instant news or whatever it was called.

It had nothing to do with a quest for better performance. It had everything to do with ad impressions.

Re:Alan Kay on “Should web browsers have stuck to being docu... by 1vuio0pswjnm7 on Monday January 09, 2023 @05:54AM (#34308987)
As it happens, AMP pages look great in the text-only browser I use and are also an easy solution to many "paywalls". (The text-only browser does not autoload resources, run JS or process CSS.) Even without a browser, it is easy to request AMP pages using a command line utility, extract strings enclosed with "<p></p>" and produce an even smaller, readable web page with no ads.
Re:Alan Kay on “Should web browsers have stuck to being docu... by KronisLV on Monday January 09, 2023 @07:35AM (#34309630)
> It had nothing to do with a quest for better performance. It had everything to do with ad impressions.

Why not both? Even if the former was the "public justification", AMP pages still performed better than bloatware-ridden websites that otherwise took 2-10 MB to load, not even mentioning the amounts of JS and the impact of it on performance, especially on mobile devices (as well as batter usage on those).

Re:Alan Kay on “Should web browsers have stuck to being docu... by dmitriid on Monday January 09, 2023 @11:00AM (#34311803)
> not even mentioning the amounts of JS and the impact of it on performance

The only reason it performed better is because Google would preload over 1MB of Javascript needed to run AMP on its search page.

A cold start for AMP was barely better than most of the top sites that used it.

It was cheating, pure and simple.

Edit: IIRC it was also preloading the entirety of the search carousel, too. And you could get into the carousel only if you had an AMP page.

Re:Alan Kay on “Should web browsers have stuck to being docu... by KronisLV on Tuesday January 10, 2023 @02:37AM (#34321677)
> The only reason it performed better is because Google would preload over 1MB of Javascript needed to run AMP on its search page.

I wonder what he actual metrics are for how often that was used, what % of people chose one of the AMP results, because those were at the top of the list. That preloaded data might be common for most of AMP pages, which is much better than the mess of each site having different React/Angular/Vue bundle versions or even jQuery versions back in the day.

As a thought experiment, I wonder how much we could save on bandwidth, if all of the "popular" frameworks/libraries split their base code from each individual application's code (we already have code bundling, after all) and browsers included all of those packages of base code, preloaded.

Maybe even follow SEMVER as close as possible, so the browser can always ship the latest minor/patch release for a given major release, to cut down on space needed in the browser.

Something along the lines of:

  <script src="/browser/react@18"></script>
  <script src="/js/my-app-react-bundle.js"></script>
Whereas another app that needs an older version could use:

  <script src="/browser/react@17"></script>
  <script src="/js/my-older-react-bundle.js"></script>
And if you don't want to participate in such an initiative (or really want a custom version), you could always make sure that your web server serves the "/browser" directory itself.

After all, browser install sizes are already horribly bloated, a few dozen MB will hardly matter at this point, whereas each site needing 1-5 MB of JS is absurd, especially because those are re-downloaded for each of them, despite the fact that most sites out there use one of like 3-5 popular solutions.

Re:Alan Kay on “Should web browsers have stuck to being docu... by CyberDildonics on Sunday January 08, 2023 @07:29PM (#34305104)
That's not the fault of the browser ecosystem. Give people a real programming language and they will create terrible bloated software with it.
Re:Alan Kay on “Should web browsers have stuck to being docu... by layer8 on Sunday January 08, 2023 @07:56PM (#34305350)
There could be a standardized execution speed. Similar to the home computers of old, and video game consoles, developers would then have to make do with the fixed performance afforded by the platform.
Re:Alan Kay on “Should web browsers have stuck to being docu... by scarface74 on Sunday January 08, 2023 @07:50PM (#34305304)
Speak for yourself. I run a very battery efficient browser - running on a very efficient processor architecture that gets 10+ hour battery life that I don’t think I’ve ever heard the fan once - an M1 based MacBook Pro 16 inch.

My wife has a MacBook Air that doesn’t even have a fan.

Re:Alan Kay on “Should web browsers have stuck to being docu... by seagreen on Sunday January 08, 2023 @07:24PM (#34305060)
That's the glory of web browsers: 1-click sandboxed installation of programs on demand.

This is incredible!

> enough maturity to implement essentially an entire operating system / virtual machine AS the browser

Yes, an operating system-- but one without user-facing persistence! Only per-application, networked, silo'd persistence, where the user sees a rendered form of data but not the data itself.

IMHO these two facts, that

a) Web browsers are BETTER than Linux, Windows, etc as an OS in a very important way, package management

and

b) They're missing one of the primary features of an OS, persistence

overshadow any other facts about them. What a strange tool they are.

Re:Alan Kay on “Should web browsers have stuck to being docu... by jayjader on Monday January 09, 2023 @06:04AM (#34309057)
I would temper your message with the caveat that the data is still accessible to the user; one click to open devtools, and another to switch to the "Storage" tab, and you have all your persisted data visible to the user.

You can copy and/or edit said data from that view as well!

Albeit the convention is clearly to not presume your browser app user will be interacting with their data at _all_ through the devtools, which I find regrettable but unavoidable with the current state of "computer literacy" and the state of "devtools-as-an-interface" (obviously the ergonomics aren't great for the average user today).

Re:Alan Kay on “Should web browsers have stuck to being docu... by seagreen on Monday January 09, 2023 @12:08PM (#34312667)
That's likely just a keyhole view into your data though.

Eg take web forums (not this one since there's weird lisp stuff down there and I don't know how it works, but the average web forum).

On the app (server) side they have access to everything, all of your posts in nice beautiful structured SQL.

On the user side you have access to none of that, just HTML soup and maybe some cached stuff in the "Storage" tab, or maybe not.

> Albeit the convention is clearly to not presume your browser app user will be interacting with their data at _all_ through the devtools, which I find regrettable but unavoidable with the current state of "computer literacy" and the state of "devtools-as-an-interface" (obviously the ergonomics aren't great for the average user today).

I really like your use of "convention" and "presume" here, because I think that's the essential lens to view these things through. It's absolutely possible for an app to provide all of a user's data in a nice structured form in IndexedDB, that will just be rare because it's not the convention.

Re:Alan Kay on “Should web browsers have stuck to being docu... by goatlover on Sunday January 08, 2023 @07:18PM (#34304998)
Couldn't Java (the JVM) or .Net have technically accomplished the same thing earlier if web browsers didn't already exist? Java was much bigger than applets. Bill Gates recognized the threat of both Netscape and Sun to the windows dominance, because of the possibility of running apps over the internet.

Maybe even Smalltalk in the 80s if Kay and company had foreseen the rise of the global internet back in the 70s.

Re:Alan Kay on “Should web browsers have stuck to being docu... by rektide on Sunday January 08, 2023 @10:12PM (#34306258)
Java applets versus HTML DOM is a debatably parallel competition, but the web was also a connected & online medium, with it's own protocol, and that begat interoperability & connectivity to a degree that applications never came anywhere close to.

Ironically, for all the fragmented wild ecosystem of webdev today, with a million different libraries & toolchains & frameworks, the web has maintained & iterated on a very consistent & coherent underpinning that is fundamentally cross-computer, that is globally connected via the url. Applications were always a lesser beast, damned by lower horizons, and if they dared to try to do more, were on their own with no other applications to interoperate across & on their own with their protocols. The web grew many UI development options atop consistent DOM and protocols, but the application had consistent UI development options across scattered connectivity protocols, if any (and often none).

Looking at the internet as an application delivery platform ignores that the web grew because it was both an application and content delivery system, interwoven, together, and infinitely remixable & extensible.

Re:Alan Kay on “Should web browsers have stuck to being docu... by goatlover on Monday January 09, 2023 @12:38PM (#34313106)
Applets relied on the browser. I’m talking about using Java or languages targeting the JVM outside of the browser as applications communicating over network protocols to deliver content and communicate. Java was designed with networking in mind. Applets were added to Netscape because the browser and web had become popular. But Java itself was positioned to be an application delivery platform over the internet.
Re:Alan Kay on “Should web browsers have stuck to being docu... by rektide on Monday January 09, 2023 @04:21PM (#34316255)
And Im saying that is a much much smaller dream/ambition than what the web went after.
Re:Alan Kay on “Should web browsers have stuck to being docu... by rektide on Monday January 09, 2023 @09:16PM (#34319502)
Apologies for saying applets. I meant the entire Java apps world. That was misleading, you were right to be confused.
Re:Alan Kay on “Should web browsers have stuck to being docu... by colechristensen on Sunday January 08, 2023 @07:15PM (#34304971)
But I also want just a document viewer. Great job building all that, developers of the world, now how can I read a news article or an email in a modern sense without a complicated machine executing code that’s not at all for my benefit.

I do very little on the web where I actually want there to be code running on my document.

Re:Alan Kay on “Should web browsers have stuck to being docu... by RajT88 on Sunday January 08, 2023 @07:17PM (#34304992)
More news orgs should offer up something like lite.cnn.io.
Re:Alan Kay on “Should web browsers have stuck to being docu... by throwaway09432 on Sunday January 08, 2023 @07:22PM (#34305042)
>I do very little on the web where I actually want there to be code running on my document.

Just some random examples, but how do you do your tax, pay your bills, buy/sell stuff online, make appointments etc?

Re:Alan Kay on “Should web browsers have stuck to being docu... by colechristensen on Sunday January 08, 2023 @07:37PM (#34305180)
None of those things require client side code other than an HTTP POST.

Some things yes client side code makes sense, like an appointment finder, and that’s fine, but such things make up a tiny amount of my internet activity.

Re:Alan Kay on “Should web browsers have stuck to being docu... by throwaway09432 on Sunday January 08, 2023 @07:59PM (#34305383)
Sure, but you are talking about a complete minimalist implementation, one that before all of this Javascript explosion, made people pull their hair out. For example you need javascript for dropdowns or form validation to begin with. I think there is a lot of stuff done by front end developers these days that people take for granted.
Re:Alan Kay on “Should web browsers have stuck to being docu... by giantrobot on Monday January 09, 2023 @12:52AM (#34307260)
Drop downs do not require JavaScript. HTML has basic form validation and your POST endpoint needs to validate the form anyways, sending the form back to the user for corrections is not very difficult.
Re:Alan Kay on “Should web browsers have stuck to being docu... by throwaway09432 on Monday January 09, 2023 @01:00AM (#34307304)
This is just the same argument as the comments upthread rehashed. In the absolute most minimalist, hair pullingly annoying implementation, that is correct. However the polish you are used to on dropdowns plus countless other controls you interact with every day require javascript.
Re:Alan Kay on “Should web browsers have stuck to being docu... by still_grokking on Monday January 09, 2023 @01:13AM (#34307377)
> However the polish you are used to on dropdowns plus countless other controls you interact with every day require javascript.

Or just a proper GUI framework not based on HTML.

Re:Alan Kay on “Should web browsers have stuck to being docu... by dmitriid on Monday January 09, 2023 @04:34AM (#34308475)
> However the polish you are used to on dropdowns

Emphatically no. The absolute vast majority of those "polished dropdowns" are horrible to use, and break all possible platform conventions (for example, not accessible or usable with a keyboard)

> countless other controls you interact with every day require javascript.

Very few, if any, "polished controls" used on the absolute vast majority of web sites require javascript.

Re:Alan Kay on “Should web browsers have stuck to being docu... by throwaway09432 on Monday January 09, 2023 @08:42AM (#34310189)
Emphatically yes. The most popular UI framework's dropdown component, documentation reads as follows:

"Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They’re made interactive with the included Bootstrap dropdown JavaScript plugin"

Re:Alan Kay on “Should web browsers have stuck to being docu... by dmitriid on Monday January 09, 2023 @10:57AM (#34311774)
Bootstrap dropdowns:

- don't follow platform conventions (don't trigger the actual system dropdowns with actual expected behavior)

- get cutoff by browser chrome when page is zoomed in (because you can't control that behavior from JS)

- default implementation's touch targets are too small

And that's for a framework which has had over a decade to make this work.

This is not to throw undue shade: they've done a very good job. But that's about as far as you can get.

Re:Alan Kay on “Should web browsers have stuck to being docu... by giantrobot on Monday January 09, 2023 @10:24AM (#34311309)
> However the polish you are used to on dropdowns plus countless other controls you interact with every day require javascript.

I got one can do without the "polish I am used to". I'm generally fine with HTML form controls.

My problem with JavaScript frameworks is they are huge beasts that build their components out of non-semantic block elements. A button or text field is just a giant mass of divs and spans with events attached everywhere with one-off CSS. The browser is stuck doing tons of work in its single-threaded JavaScript engine to build and manage these components.

It's a lot of wasted memory and clock cycles to recreate a text field the browser already provides. It makes for a worse user experience, wastes my battery, and eats up my bandwidth. To me it's not polish but waste.

Re:Alan Kay on “Should web browsers have stuck to being docu... by throwaway09432 on Tuesday January 10, 2023 @10:02PM (#34334548)
Ok, so when registering on a new site you don't mind waiting back to hear from the server after clicking submit, to find out your passwords don't match, or don't meet the required policy? That's fine. But the majority of impatient and perhaps spoilt users do. In fact I hear people these days complain violently about the most trivial UX issues on websites they visit. User's expectations are sky high.

Regarding the massive nestings of divs. Well this is computer generated HTML. It is ugly as hell, but browsers are well geared up to deal with it, it doesn't create any serious performance issues unless taken to stupid levels. The other side of the coin, with this rather ugly generated HTML, is you get a human benefit, a time saving efficiency. You can spin up a web page with React/Bootstrap in a fraction of the time it took you in the 1990s.

Re:Alan Kay on “Should web browsers have stuck to being docu... by wtetzner on Sunday January 08, 2023 @08:16PM (#34305510)
Can’t all of that be done with simple form submissions?
Re:Alan Kay on “Should web browsers have stuck to being docu... by still_grokking on Sunday January 08, 2023 @11:11PM (#34306657)
How did the people do all of that without the modern web? How could humanity actually survive so long without web browsers?

If you think about that maybe you come also to some conclusions regarding the questions you just asked.

Re:Alan Kay on “Should web browsers have stuck to being docu... by throwaway09432 on Monday January 09, 2023 @12:07AM (#34306989)
I know you think your answer here is really thought provoking, but you could pose the question "How could humanity actually survive so long without X" about any technology really.
Re:Alan Kay on “Should web browsers have stuck to being docu... by still_grokking on Monday January 09, 2023 @01:07AM (#34307340)
Which just strengthens my point.
Re:Alan Kay on “Should web browsers have stuck to being docu... by vba616 on Sunday January 08, 2023 @08:23PM (#34305550)
>software had to not only be downloaded, but it had to be hand built against each operating system

Back in the day, we didn't even have modems or compilers, let alone internet - so we would go to Ye Olde Computer Store and copy the disks of Fred Fish. That was how I got my first experience of Hack, which was great, and Emacs, which has always been a WTF for me.

I wonder if for some reason computer hardware had stopped getting faster and more complex at the stage of, say, a 25 MHz 486, how much different the world would be, or whether it would just force software to be consistently purged of cruft.

Re:Alan Kay on “Should web browsers have stuck to being docu... by pjmlp on Monday January 09, 2023 @01:56AM (#34307585)
I surely did not dream with Web browsers, additionally plenty of bytecode languages predate Java, with Pascal's P-Code being the most well known one.

Back in the day there were several P-Code aware platforms.