Live data from Hacker News

Netscape and Sun Announce JavaScript (1995)

web.archive.org

331–340 of 476 posts

Re: Netscape and Sun Announce JavaScript (1995)

#331
post #108

Earlier quoted context omitted.

Being limited but safe may be the reason that JavaScript has won out over Java. As I recall, applets turned out to be a security nightmare.

Nah, Java applets lost because of the deployment nightmare they had become after MS was blocked in their attempt to coopt the language (they were barred from shipping incompatible JVMs, so they stopped shipping JVMs and Java IDEs altogether). ActiveX was winning, but that really was a security nightmare. Eventually enough of the useful parts of ActiveX crept into JS enough to build real stuff with it.

20/20: Java applets needed better integration, access to the host browser's runtime. Like accessing the current page's DOM, being able to hook the event loop.

I didn't care at the time. I hated all things HTML, CSS, JS. Such a downgrade from state of the art. I regarded the browser as terrible means to deliver, bootstrap applets. Just like Flash.

One thing I didn't appreciate at the time was the genius of HTTP and URLs.

I'm still completely baffled by the "worse is better" thesis. I just can't understand why JavaScript was created, much less why it succeeded.

One can understand how mistakes like \0 terminated strings and SQL's NULL happen, become hard to undo. But JavaScript is the original sin that just keeps poisoning. Other platforms, ecosystems learn and grow and mature. JavaScript stubbornly refuses to acknowledge truth and goodness, and is all the more successful for it's belligerence.

Amazing.

Re: Netscape and Sun Announce JavaScript (1995)

#332
post #329
post #301

Earlier quoted context omitted.

Sorry I am not an expert in Java, but doesn’t the jvm execute the .class files like bash would execute the .sh scripts.

Class files contain compiled bytecode, not source code like shell scripts do. “Script” implies human-readable source code. Java bytecode is binary, a kind of portable machine language.

Of course, there's murky things like Python which make bytecode compiled forms behind the scene.

But there's a lot of magic involved in transforming Java to class files, and then there's a lot of further magic in resolving, loading, and eventually executing classes.

Re: Netscape and Sun Announce JavaScript (1995)

#333

I was just thinking the other day about how in late '95 I had just bought my first PC and was teaching myself web development and discovered JavaScript. I remember submitting bug reports to Sun. I hadn't realized until the other day, after calculating the timeline, just how new JavaScript really was at that point in time.

Correction: Submitting bug reports to Netscape.

Re: Netscape and Sun Announce JavaScript (1995)

#334
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…

> 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.

Sure, but that's not an argument against JavaScript having potentially been a planned part of the JVM ecosystem (or, at least, a language playing a role in the JVM ecosystem, without itself being hosted on the JVM, instead maybe interacting with the JVM through some kind of IPC or FFI bridge.)

Remember, Sun used to be trying to squeeze the JVM into web browsers as well, in the form of Java applets. But we never saw any real ability to script against these applets. "Java applet 'engines' under JavaScript control", could have been the portable equivalent to "ActiveX components under JavaScript control."

You know how modern games involve 1. a self-contained game engine written in C++ or C#, plus 2. the game itself being mostly Lua scripting? If Sun had pushed harder, we could have seen something like that in 1995, with web browsers running JavaScript-scripted games calling into Java game engines; long before we got equivalent HTML5 APIs like Canvas.

Probably, if the world had gone down that path, we would have seen JavaScript gradually moving "into" the JVM; and the JVM gradually coming to take the position that the JavaScript engine takes in modern web browsers.

Re: Netscape and Sun Announce JavaScript (1995)

#335
post #329
post #301

Earlier quoted context omitted.

Sorry I am not an expert in Java, but doesn’t the jvm execute the .class files like bash would execute the .sh scripts.

Class files contain compiled bytecode, not source code like shell scripts do. “Script” implies human-readable source code. Java bytecode is binary, a kind of portable machine language.

Does this mean java .class falls in the middle of scripts and native executables? Is this analogy correct? For example, I think of native executable as Microsoft Word where you can doubleclick and launch it. Whereas with .class you have to run it on top of a jvm.

Re: Netscape and Sun Announce JavaScript (1995)

#336

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 c…

Didn't visual basic support some kind of client side code?

IE (3? 4?) let you specify vbscript instead of JavaScript as the language in your script tags.

Edit: introduced in IE3 (1996) apparently. https://en.m.wikipedia.org/wiki/Internet_Explorer_3

Re: Netscape and Sun Announce JavaScript (1995)

#337
post #335
post #329

Earlier quoted context omitted.

Class files contain compiled bytecode, not source code like shell scripts do. “Script” implies human-readable source code. Java bytecode is binary, a kind of portable machine language.

Does this mean java .class falls in the middle of scripts and native executables? Is this analogy correct? For example, I think of native executable as Microsoft Word where you can doubleclick and launch it. Whereas with .class you have to run it on top of a jvm.

Often even a "native" executable is opened by something like the ELF interpreter, relocated, etc. Yes, a JVM is a lot more heavyweight than these services, but...

Re: Netscape and Sun Announce JavaScript (1995)

#338
post #296

Earlier quoted context omitted.

So implementing and pushing Java in Android was a torpedo against Sun? Interesting logic.

Android Java is not Java, and yes when I take someone's product and don't pay what the license specifies, while introducing an incomplete implementation, that is 100% ripping off. Thankfully we are going to have that settled in the near future, and then Android folks can party all night long with their Kotlin implementation and rename ART into KVM.

> Sun Microsystems, Inc. (SUN) hereby grants to you a fully-paid, nonexclusive, nontransferable, perpetual, worldwide limited license (without the right to sublicense) under SUN's intellectual property rights that are essential to practice this specification. This license allows and is limited to the creation and distribution of clean room implementations of this specification that...[list of requirements]

AFAICT the whole fight is over API's and not "don't pay what the license specifies" as they give you the ability to do a clean-room implementation without paying royalties.

Re: Netscape and Sun Announce JavaScript (1995)

#340
post #339

I'm glad they added all the individual contact information at the bottom -- I'm going call up Mark Benioff at Oracle (415) 506-7000 to ask him how to download the source!

That's just the main Oracle number I'm sure

I'm not sure, but I think he's no longer at Oracle.
Post reply on HN