Live data from Hacker News

Netscape and Sun Announce JavaScript (1995)

web.archive.org

431–440 of 476 posts

Re: Netscape and Sun Announce JavaScript (1995)

#431

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…

Server side JS had to write():

    
      Hello World  
     Hello World 
    

Your IP address is write(request.ip)

But client side JS had to write() too (there was no DOM), and so we have

    'foo'.link('http://example.com')
    // "foo"
    'bar'.bold()
    // "bar"
http://web.archive.org/web/19961115040956/http://developer.n...

Re: Netscape and Sun Announce JavaScript (1995)

#432

Not being on the web until the late 90s, the part I've never figured out is, what could you actually _do_ with JavaScript in the initial versions? The way I understand it, early JavaScript could only address HTML forms, links, and images. Can't modify HTML tags. Can't insert new elements. Can't update the page and re-render until DHTML in the version 4 browsers. Can't query the network until XHR. Ok, so now what? Do…

Check out JavaScript Guide by Netscape:

for Navigator 2.0 http://web.archive.org/web/19970613234917/http://home.netsca...

for Navigator 3.0 http://web.archive.org/web/19970614042441/http://home.netsca...

You have frameset and can document.write() — enough to implement ToDo MVC — dynamic list on Netscape 2.0:

Marcin Szczepanski: What's new in Netscape Navigator 2.0 | JSConf EU 2017 https://www.youtube.com/watch?v=Z-nXRZkge2U

Re: Netscape and Sun Announce JavaScript (1995)

#434

Earlier quoted context omitted.

I use JS every day; I would say I like it. I would even say that in 2020, if you know what you're doing, it's a pretty good language on the whole. But I don't think it's controversial to say that the following were objectively bad decisions (in hindsight, of course, but still): - Automatic casting behavior between the core types (you're the only person I've ever heard suggest that this might be a good thing) - Automa…

> Automatic casting behavior between the core types This is (mostly) awesome for quick/light glue scripting and a (almost entirely) a horrible pain for most other programming. As the scale of JS apps has gone up, this has gone from probably being a net win from the way JS was used early on on the web to being a net harm. > Distinction between undefined and null This existence of this distinction is, IMO, a very good…

Netscape 2.0:

    "foo" - 1
    //raises "is not a numeric literal"
    "" == false
    //raises "is not a numeric literal"

    "foo" + new Object()
    //"foonull"
    "foo" + new Array()
    //"foonull"

    0 + true
    //1
    0 + false
    //0

    1 + new Array()
    //raises "null is not a number"
    new Object + new Object
    //raises "null is not a number"

    true.foo
    //raises "true has no properties"
    1..foo
    //raises "1 has no properties"
Ten days language was not that silent.

Re: Netscape and Sun Announce JavaScript (1995)

#435

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…

Philip Greenspun has a great review of Netscape LiveWire from the time. https://philip.greenspun.com/wtr/livewire.html You can see that the current JavaScript tooling complains are nothing new under the sun: So what used to be a few keystrokes in Emacs or Netscape Gold now requires three steps: edit the .html file recompile the .web file restart the LiveWire app from the appmgr

Working with LiveWire was incredibly painful. Often the server would crash during the restart phase (this was under WinNT 4.0 back in 1997.)

Re: Netscape and Sun Announce JavaScript (1995)

#436
post #342

Earlier quoted context omitted.

This quote is adorable considering the size of most pages today: "This approach has several disadvantages, the first of which is speed. You are gratuitously transporting potentially many kilobytes of data back and forth across the network."

I was there, kB were an issue. We had 56 kb/s modems vs (let's say) 56 Mb/s fiber now. We gained a x1000 factor and we're dealing with many MB now instead of many kB back then. Page size grew x1000 too. But loading pages was really slow, mainly because browsers were slow. No parallel loading of images, no progressive rendering. Those were the first optimizations.

I think you underestimate the effects of high bandwidth. There was a sweet spot in the late 90's when some people had broadband (early cable modems, generally 3 megabits, or DSL.) I had an ISDN line from 1996 through 1998, then a cable modem after that. The web was fast because it was built for dial up. As broadband gained more and more market-share, the bloat increased.

Re: Netscape and Sun Announce JavaScript (1995)

#437

Earlier quoted context omitted.

I'm not surprised that the architecture isn't new, I'm surprised that web apps were already being talked about this way using JS specifically. JS's early design flaws are often written off as, "well it was never intended to be a real programming language like it is today". But from reading this, that doesn't sound to be the case.

I think JS' early design flaws were a result of being written in a day more than anything to do with a specific purpose (I exaggerate but not by much). Though it is true that most people at the time used JS (if they used it) for much simpler tasks than described in the article.

It was written in 9 days, which is astounding. I suspect that the project was given a week to complete and it came 2 days late. In any case it seems unlikely that it’s problems would go away if given another 5 days. A lot of the wired things in a scripting language only become obvious at scale.

Re: Netscape and Sun Announce JavaScript (1995)

#438
post #385

Earlier quoted context omitted.

I agree with your basic premise. However, in this particular instance, what would have been the historical equivalent ("already happened") of scripts sent by the server to the client during the request response cycle, which could perform layout and logic in the client? If you're simply referring to code that could run on both client and server, your point is clearer to me.

AJAX is part of the request response cycle? Let's face facts...AJAX is the real secret sauce with JS and what makes it truly useful.

Long before the term "AJAX" was coined, we used hidden iframes to do the same thing.

Re: Netscape and Sun Announce JavaScript (1995)

#439
post #416
post #373

Earlier quoted context omitted.

Well it's a pretty bad debate if people aren't agreeing on definitions. Hence this whole chain of comments.

Basing the definition on whether it's compiled or not doesn't help much. Python is actually compiled to bytecode, just like Java. Is it not a scripting language? Or is the distinction that the Python bytecode is interpreted whereas Java is JIT compiled to machine code? Well, Java didn't get the JIT compiler until version 1.3 - so was Java 1.2 a scripting language?

The distinction is the existence, from the developer’s perspective, of a separate step called “compilation,” which produces an executable artefact which can be distributed but not converted back to the source code. It’s about programming in practice, not fundamental computer science principles.

Re: Netscape and Sun Announce JavaScript (1995)

#440
post #424
post #388

Earlier quoted context omitted.

Sure. I was responding to this: “To me, if something acts logically like it is run from top to bottom, it's a scripting language.” I don’t see them as scripting languages, but that definition would include them.

And my point is that Haskell doesn't even look like it's run from top to bottom. Example, consider this mutually recursive definition at the top level: a = 1:b b = 2:a It doesn't, by any means logical or not, look like it runs from top to bottom. If so, the first line would have immediately been an error because `b` is an undefined name.

[deleted]
Post reply on HN