News for hackers. Stuff that matters.
Re:WebContainers: Run Node.js natively in the browser by uncomputation on Thursday May 20, 2021 @06:56PM (#27228471)
> the direction I'd like to see web development move is having a statically typed language that compiles to VM bytecode.

Java… you want Java. And so the cycle continues!

Re:WebContainers: Run Node.js natively in the browser by naruhodo on Thursday May 20, 2021 @07:13PM (#27228626)
You could add some kind of security manager to sand box it and have little apps running in the browser. Maybe call them "applets".
Re:WebContainers: Run Node.js natively in the browser by chmod775 on Thursday May 20, 2021 @11:01PM (#27230030)
That sounds amazing! What if they came with some kind of built-in canvas?
Re:WebContainers: Run Node.js natively in the browser by pjmlp on Friday May 21, 2021 @02:11AM (#27231019)
Re:WebContainers: Run Node.js natively in the browser by jrockway on Thursday May 20, 2021 @07:59PM (#27228979)
That's a really good point. What we wanted all along was the JVM with a DOM API.

We started with Java. It didn't gain any traction for browser scripting. They took "Java" out and called it JavaScript. Now we take the "script" out and call it WebAssembly. If someone in 1995 made Java a DOM-editing thing instead of an applet thing, we could have saved 25 years of running around in circles :)

(Going back even further, we all connected to a mainframe with a dumb terminal. The desktop revolution happened... and now we're back to dumb terminals attached to a mainframe. But we call it "The Cloud" instead, and the dumb terminal fits in your pocket.)

Maybe the past wasn't as dumb as we think it was. We just weren't smart enough to understand it at the time.

Re:WebContainers: Run Node.js natively in the browser by ludamad on Thursday May 20, 2021 @09:57PM (#27229701)
Hey applets could manipulate JavaScript data/the DOM. There is a bit of bark to the 'Java script' bite. It was very slow, though, sending through the JVM process and to the browser process each time you read or wrote a value (and the plugin that did this I think was in its own process - memory is hazy there).

Overall it's hard to say how Sun could have won here, perhaps acquiring macromedia and using Flash technology to make a browser that ran those cool portals out of the box, and hey scripted first-class in Java too btw ;-)

Re:WebContainers: Run Node.js natively in the browser by seanp2k2 on Friday May 21, 2021 @12:10AM (#27230410)
And we’ve increased latency an order of magnitude each time. We have computers that are orders of magnitude faster, yet using a spreadsheet in a browser today is less responsive than it was in DOS decades ago. But the developer experience is so much better now, so it’s worth it?
Re:WebContainers: Run Node.js natively in the browser by fiddlerwoaroof on Thursday May 20, 2021 @11:55PM (#27230332)
What I’ve always wanted is scheme in the browser.
Re:WebContainers: Run Node.js natively in the browser by lioeters on Friday May 21, 2021 @12:12AM (#27230420)
There was a fork in the road of history, where that could have been the future we live in..

> In 1995, Netscape hired Brendan Eich with the promise of letting him implement Scheme (a Lisp dialect) in the browser.

How JavaScript Was Created - http://speakingjs.com/es5/ch04.html

---

> Whether that language should be Scheme was an open question, but Scheme was the bait I went for in joining Netscape. Previously, at SGI, Nick Thompson had turned me on to SICP.

> ..The diktat from upper engineering management was that the language must “look like Java”. That ruled out Perl, Python, and Tcl, along with Scheme.

https://brendaneich.com/2008/04/popularity/

Re:WebContainers: Run Node.js natively in the browser by fiddlerwoaroof on Friday May 21, 2021 @01:12AM (#27230727)
Yeah, I know this history well.
Re:WebContainers: Run Node.js natively in the browser by joekim on Friday May 21, 2021 @12:53AM (#27230642)
Re:WebContainers: Run Node.js natively in the browser by fiddlerwoaroof on Friday May 21, 2021 @01:13AM (#27230731)
No, like

    <script type=“text/scheme”>
I also wish browsers had built out the ability to plug-in interpreters for processing script tags.
Re:WebContainers: Run Node.js natively in the browser by pjmlp on Friday May 21, 2021 @02:11AM (#27231021)
Re:WebContainers: Run Node.js natively in the browser by atatatat on Friday May 21, 2021 @12:55AM (#27230653)
The past was pretty dumb, because it wasn't an open standard based on interoperability.
Re:WebContainers: Run Node.js natively in the browser by christophilus on Thursday May 20, 2021 @07:06PM (#27228562)
Or preferably, F#.