Live data from Hacker News

Netscape and Sun Announce JavaScript (1995)

web.archive.org

281–290 of 476 posts

Re: Netscape and Sun Announce JavaScript (1995)

#282

Earlier quoted context omitted.

The browser had an embedded JVM and applets ran right on the page. It was very similar to WebAssembly today, just a fair bit chuggier. Two things caused people to backpedal from the applet strategy: 1) Because there was a large hiring pool of millions of fresh grads leaving college with a little Java under their belts, it having displaced C++ and Pascal as an introductory language, companies began Java projects and J…

The death of Microsoft's JVM is when I lost most of my interest in Java. I understand why Sun didn't want Microsoft's JVM to exist. They could see Embrace, Extend, Extinguish coming for them but wow, did Microsoft's version ever work better. I did go on to create a good bit of Java code professionally but never touched it for hobby work. It really hurt Java in the browser when Microsoft refused to ship Sun's code wit…

It was a weird time.

Now, there's a straightforward business case and examples of the many strategic and financial benefits of owning development and guidance of an open platform.

Then... you either owned a platform completely (closed) or didn't (someone else owned it). Vis: all the bs machinations around proprietary Unix distributions.

Sun + Microsoft was likely seen more in the context of "ceding ownership to Microsoft" than "growing the platform, that we still have majority ownership of."

Ultimately, hardware vs platforms thinking. Or my-share-of-zero-sum vs growing-the-market. Unfortunate.

Re: Netscape and Sun Announce JavaScript (1995)

#283
post #105

Earlier quoted context omitted.

Partly marketing but the integration certainly existed. As I recall, public methods in the main applet class are exposed to JavaScript. It was a little slow and clunky but it worked. The idea was similar to how web components are used today. Your web page would contain custom applets for a fancy input field, a calendar control date picker, and whatever other controls html didn’t provide, all implemented as Applets. I…

Technically, why are / were Java applets so slow? I never dug into the ecosystem deeply enough to understand (plus a bit before my time). Was it JVM startup time, Java xfactory-begat-y-begat-z code init time, what? Also, applets run outside the browser, correct? I.e. on the browser's host system in a separate JVM process?

My memory of the time (as a Mac user) was that the JVM startup time was the big killer. It took like 30-60 seconds, during which it completely froze the (cooperatively-multitasked) OS. Of course it ate up a big chunk of memory at a time when our Mac had 16-24 MB of RAM total. And Netscape 3 was unstable enough that in a decent browsing session you'd have to relaunch it 2-3 times (each time unloading the JVM). Lowering the available memory of course worsened the stability.

The applets themselves performed alright. They took a few seconds to initialize but we were used to waiting for JPEGs and hover effects to load over a 14.4 modem so that wasn't too bad relatively.

Re: Netscape and Sun Announce JavaScript (1995)

#284
What stands out to me is how much more foresight they had than I'd thought about the ways JS would be used:

> With JavaScript, an HTML page might contain an intelligent form that performs loan payment or currency exchange calculations right on the client in response to user input. A multimedia weather forecast applet written in Java can be scripted by JavaScript to display appropriate images and sounds based on the current weather readings in a region. A server-side JavaScript script might pull data out of a relational database and format it in HTML on the fly. A page might contain JavaScript scripts that run on both the client and the server.

We tend to think of JS as having started out as just a way to dynamically show/hide elements, maybe add an animation or two, on top of fundamentally HTML-based web pages. But I see here described what we now think of as "web apps", and even web servers (!) written in JS. They even talk about code-sharing on the front and back ends, a la React in hybrid-mode. I had no idea those things were in people's minds at its inception.

Edit: Apparently they already ran JS on the server! I had no idea

> Netscape LiveWire enables JavaScript programs to be installed, run and managed on Netscape servers

Re: Netscape and Sun Announce JavaScript (1995)

#285

Earlier quoted context omitted.

Yes, but my point was, if you know about pointers, you are likely a better js dev than average as you have some background knowledge about the computer. And know what memory is and why it is not unlimited. And why some operations are expensive and others not. Also, it did help me recently, working with wasm. Not compiling it yet, but using a libary.

For that I have seen too much code from C hackers, who consider each abstraction bad and try to outsmart the compiler, while seeing great architectures in JavaScript from people who have no idea what a pointer might be. Being capable of two different languages (TS and JS doesn't count ;)) however is a useful indicator.

"while seeing great architectures in JavaScript from people who have no idea what a pointer might be."

Those people have to be naturals, though. Or really just focused on javascript and only javascript if they know about software architecture but nothing about compilers or pointers.

But sure, you definitely can write bad JS, if you are forced to use JS, when you wanted to use C (++) ... which probably happened to a lot of people, which is why we see the hate of JS in that intensity.

Re: Netscape and Sun Announce JavaScript (1995)

#286
post #35

Earlier quoted context omitted.

For what? Imagine a world without Javascript? You have mini extension in browser to just auto refresh gmail

Imagine a world without Javascript? What a dream.

Out of curiosity, what language would have replaced Javascript in you dream?

Re: Netscape and Sun Announce JavaScript (1995)

#287

Earlier quoted context omitted.

I wish they’d just used scheme

Exactly - rubyscript would have been just as hated as javascript; something like scheme or some other well designed language would have been better.

I think we would just have got more Java applets. The idea of a programming language accessible to everyone did contribute a lot to its success.

Re: Netscape and Sun Announce JavaScript (1995)

#288
post #189

Earlier quoted context omitted.

So, basically, JavaScript was originally annointed to serve the function within the JVM ecosystem, that ended up being served by Groovy? Why didn’t that happen? And why did it take so long before we got Groovy instead, if Sun wanted was imagining something like it way back in 1995?

No. JavaScript was a web language for web developers to be able to automate forms, etc, client-side. AFAIK, originally it was never intended to run on the JVM server-side like Groovy does. Netscape did try to position server-side JavaScript as part of its Enterprise Server package though, but it was not JVM-based. But the environment was proprietary and not compelling enough for a myriad of reasons. It ran server Jav…

[deleted]

Re: Netscape and Sun Announce JavaScript (1995)

#289

Earlier quoted context omitted.

I think if you combined the two "different" answers to why it's named JavaScript, you get the truth. Yes, it was promoted as a companion scripting language for Java, but that was in part because Java was so hot at the moment, so marketing had something to do with the decision to name it JavaScript.

Why "script" though? Aren't Java and JavaScript both script(ing languages)? Why not call it e-Java or Java XYZ or something?

I've never seen Java called a scripting language before, actually.
Post reply on HN