• (cs) in reply to ammoQ

    Javascript allows responsive web fronts.

    But then in the end you still have to submit or redirect and the responsiveness is negated somewhat.

    So they invented XMLHTTPRequest.

    Among the funny things on JS there is the reserved but unsupported class keyword, and a function keyword that doubles as, um, a class constructor.

    Among the most annoying annoyances of JS/ECMA is the fact that linebreaks CAN be statement terminators, IN CERTAIN CONTEXT. This renders true multiline strings impossible, but if the interpreter detects continuation of the statement on the next line, eg. via

    +
    'str'
    etc, it ignores the linebreak. You could speed it up by making the ; required at all times.

  • pissed off by ammoQ (unregistered) in reply to ammoQ

    ammoQ:

    a) It's an extremely cheap clone of an already poor language.

    Which language would that be?  Certainly not Java - Javascript has nothing to do with that apart from the name.

    ammoQ:

    b) It grew in an unhealthy way and lacks a proper concept.

    Lacks a proper concept?  What's wrong with prototype-based OO, other than the fact that you're clearly not smart enough to understand it?

    ammoQ:

    c) It's used for things it shouldn't be used.

    Like any language, then. Like using C to write desktop applications, PHP to write command-line utilities, Ruby to write web apps, and Perl to write anything apart from obfuscated one-liners.

    ammoQ:

    d) It's used by people who shouldn't use it.

    Like 100% of all other programming languages?  So what's different?

    ammoQ:

    e) Real programmers might actually be forced to use it.

    Worse, they might actually be forced to open their minds. OH NOES!!! We can't have that!

  • (cs) in reply to pissed off by ammoQ
    Anonymous:

    ammoQ:

    a) It's an extremely cheap clone of an already poor language.

    Which language would that be?  Certainly not Java - Javascript has nothing to do with that apart from the name.

    ammoQ:

    b) It grew in an unhealthy way and lacks a proper concept.

    Lacks a proper concept?  What's wrong with prototype-based OO, other than the fact that you're clearly not smart enough to understand it?

    ammoQ:

    c) It's used for things it shouldn't be used.

    Like any language, then. Like using C to write desktop applications, PHP to write command-line utilities, Ruby to write web apps, and Perl to write anything apart from obfuscated one-liners.

    ammoQ:

    d) It's used by people who shouldn't use it.

    Like 100% of all other programming languages?  So what's different?

    ammoQ:

    e) Real programmers might actually be forced to use it.

    Worse, they might actually be forced to open their minds. OH NOES!!! We can't have that!



    If you want a serious discussion about that topic, mind your tone.
  • Nick (unregistered) in reply to ammoQ
    ammoQ:
    Florian:
    ammoQ:
    Anonymous:
    Why does everyone hate on JavaScript so much here?

    Several possibilities...
    a) It's an extremely cheap clone of an already poor language.

    Common Lisp is poor in what respect, again?

    JavaScript a clone of ((common) (lisp))? (((Hard) to) (believe) - (((something) (is)) missing)) ;-)


    The syntax doesn't come into it. For example, Dylan is a superset of Scheme while having the usual boring syntax.

    http://www.crockford.com/javascript/little.html

    ammoQ:



    b) It grew in an unhealthy way and lacks a proper concept.

    It is one of the few languages that do in fact have a formal semantics, so it is among the healthiest languages out there (that does not imply that the implementations are healthy, too).

    Having formal semantics is enough to qualify as "healthy"? That's so sad...


    It's better than most languages manage...
  • (cs) in reply to ammoQ
    ammoQ:
    Anonymous:

    ammoQ:

    a) It's an extremely cheap clone of an already poor language.

    Which language would that be?  Certainly not Java - Javascript has nothing to do with that apart from the name.

    ammoQ:

    b) It grew in an unhealthy way and lacks a proper concept.

    Lacks a proper concept?  What's wrong with prototype-based OO, other than the fact that you're clearly not smart enough to understand it?

    ammoQ:

    c) It's used for things it shouldn't be used.

    Like any language, then. Like using C to write desktop applications, PHP to write command-line utilities, Ruby to write web apps, and Perl to write anything apart from obfuscated one-liners.

    ammoQ:

    d) It's used by people who shouldn't use it.

    Like 100% of all other programming languages?  So what's different?

    ammoQ:

    e) Real programmers might actually be forced to use it.

    Worse, they might actually be forced to open their minds. OH NOES!!! We can't have that!



    If you want a serious discussion about that topic, mind your tone.


    Your tone doesn't appear to be any different.

    Sincerely,

    Richard Nixon
  • Dark (unregistered) in reply to ammoQ
    ammoQ:

    If you want a serious discussion about that topic, mind your tone.


    Hmmm, first you say that JavaScript is "an extremely cheap clone of an already poor language", then you resort to bashing other peoples (not mine) replies to your post instead of contributing to any kind of useful discussion. I for one would be very interested to hear why you think that JavaScript is an extremely cheap clone of an already poor language, and what language you think that JavaScript is a clone of. Do YOU want a serious discussion? If so, go right ahead!
  • (cs) in reply to Nick
    Nick:


    The syntax doesn't come into it. For example, Dylan is a superset of Scheme while having the usual boring syntax.

    http://www.crockford.com/javascript/little.html


    From a quick glance, the lambda calculus thingy seems to be the only extraordinary similarity between Lisp and JavaScript.
    I doubt many programmers use that in it's full awfull power.


    It is one of the few languages that do in fact have a formal semantics, so it is among the healthiest languages out there (that does not imply that the implementations are healthy, too).

    It's better than most languages manage...

    What's the use of a perfect formalized semantic when in real live there are several different javascript interpreters (aka "web browsers"), each behaving slightly different?
  • (cs) in reply to ammoQ
    ammoQ:

    It is one of the few languages that do in fact have a formal semantics, so it is among the healthiest languages out there (that does not imply that the implementations are healthy, too).

    It's better than most languages manage...

    What's the use of a perfect formalized semantic when in real live there are several different javascript interpreters (aka "web browsers"), each behaving slightly different?


    AFAIK there are hardly any problems with the language implementations themselves. What differs are the object models for the HTML documents and the browser environment.
  • (cs) in reply to ammoQ
    ammoQ:
    Nick:


    The syntax doesn't come into it. For example, Dylan is a superset of Scheme while having the usual boring syntax.

    http://www.crockford.com/javascript/little.html


    From a quick glance, the lambda calculus thingy seems to be the only extraordinary similarity between Lisp and JavaScript.
    I doubt many programmers use that in it's full awfull power.


    It is one of the few languages that do in fact have a formal semantics, so it is among the healthiest languages out there (that does not imply that the implementations are healthy, too).

    It's better than most languages manage...

    What's the use of a perfect formalized semantic when in real live there are several different javascript interpreters (aka "web browsers"), each behaving slightly different?


    I use both prototype-based OO and closures all the time. A handy example use of  lambdas is to add a Ruby-style .each (and .collect, and .map...) method to arrays, so that you can do things like this, in place of for loops:

    var total = 0;
    [1,1,2,3,5,8].each(function(n){total += n;});
    var squares = [1,11,134,156].map(function(n){ return n * n; });

    In general, when you say, "It is the only extraordinary similarity," you are pointing out the similarity between all functional programming languages; and you seem to be saying that they are all equally useless to non-geniuses, which is not really true.

    And, I won't comment on the usefulness or non-usefulness of 'formal' semantics, but I have yet to see any particular point on which the Internet Explorer or Mozilla implementations stray from the ECMAScript specification. If you are referring to the DOM as the differing behavior, that's legitimate, but it is an API that is not directly part of the language.
  • (cs) in reply to Dark
    Anonymous:
    ammoQ:

    If you want a serious discussion about that topic, mind your tone.


    Hmmm, first you say that JavaScript is "an extremely cheap clone of an already poor language", then you resort to bashing other peoples (not mine) replies to your post instead of contributing to any kind of useful discussion. I for one would be very interested to hear why you think that JavaScript is an extremely cheap clone of an already poor language, and what language you think that JavaScript is a clone of. Do YOU want a serious discussion? If so, go right ahead!


    It's one thing to bash abstract thinks like a language and it's another thing bash people.
    Which language is JavaScript a clone of? JavaScript combines the basic syntax of Java with semantics found in other languages like Lua, Perl, Python, LISP.

  • (cs) in reply to quamaretto
    quamaretto:

    In general, when you say, "It is the only extraordinary similarity," you are pointing out the similarity between all functional programming languages; and you seem to be saying that they are all equally useless to non-geniuses, which is not really true.

    I'm not at all saying that it's useless, but I think it's not often fully utilized .

    And, I won't comment on the usefulness or non-usefulness of 'formal' semantics, but I have yet to see any particular point on which the Internet Explorer or Mozilla implementations stray from the ECMAScript specification. If you are referring to the DOM as the differing behavior, that's legitimate, but it is an API that is not directly part of the language.

    There are other browsers, like Safari, Opera; there are older browsers.

  • (cs) in reply to ammoQ
    ammoQ:

    I'm not at all saying that it's useless, but I think it's not often fully utilized .

    That is principally a problem with educating programmers. If programmers were not spoon fed object-orientation, they wouldn't understand that either. Functional programming is not as difficult or complicated as it is made to sound.


    There are other browsers, like Safari, Opera; there are older browsers.


    My cheat sheet here (Webmaster in a Nutshell) claims that I.E. 4 and Netscape 4.5 were both compliant with the spec. (I would interpret that as "Compliant or really close".) As for Safari and Konqueror; Opera; and IE/Mac, I'm not really worried. I can't say that I have exhaustively tested them, but they are all correct or close. Older and more obscure browsers are in too little use to mention unless you are specifically targeting users of embedded devices.


  • Nick (unregistered) in reply to ammoQ
    ammoQ:
    Nick:


    The syntax doesn't come into it. For example, Dylan is a superset of Scheme while having the usual boring syntax.

    http://www.crockford.com/javascript/little.html


    From a quick glance, the lambda calculus thingy seems to be the only extraordinary similarity between Lisp and JavaScript.
    I doubt many programmers use that in it's full awfull power.


    The "lambda calculus thingy" *is* Scheme, almost. It's incredibly powerful. If you're interested, read the lambda: the ultimate... papers (http://library.readscheme.org/page1.html) which describe some of Scheme's ideas (don't like to link in case the forum software buggers it up).

    ammoQ:


    It is one of the few languages that do in fact have a formal semantics, so it is among the healthiest languages out there (that does not imply that the implementations are healthy, too).

    It's better than most languages manage...

    What's the use of a perfect formalized semantic when in real live there are several different javascript interpreters (aka "web browsers"), each behaving slightly different?


    If they behave differently with respect to semantics, where those are defined, they don't interpret JavaScript correctly. Different functions being available in different web browsers is a shame, but as a programming language JavaScript is really quite good (and nothing like Java).
  • (cs) in reply to clockwise
    clockwise:
    It's fast, it's on the client side, and it's pretty easy to maintain..


    No, it is O(nm), which can generalize to O(N^2).   It is only fast because n and m are small.   If you indexed all the pages that technical support should have indexed, it would be slow, and hard to maintain.   Not to mention how slow it would be because of the load time if the user is still on a modem.

    This is only easy to maintain because the people maintaining it are too lazy to type all the keywords.  If they had all the keywords required, for each page, this would be slow and hard to maintain.
  • (cs) in reply to ammoQ
    ammoQ:


    It's one thing to bash abstract thinks like a language and it's another thing bash people.
    Which language is JavaScript a clone of? JavaScript combines the basic syntax of Java with semantics found in other languages like Lua, Perl, Python, LISP.



    A more accurate history of Javascript is that it is descended from an interpreted dialect of C called CEnvi. (I cannot a reliable reference to confirm this.) In fact, it was called Livescript until it was renamed Javascript under some marketing pretense. Modern versions have more in common with Self than any of the above languages, other than the  C-descended appearance of the language and the presence of C-style loops and branches, rather than Smalltalk-style messages.

    (Correction to my code example above, s/.map/.collect)
  • (cs) in reply to ItsAllGeekToMe
    ItsAllGeekToMe:
     

    Because.  It sucks more than anything's ever sucked before.



    You forgot about lotus notes.
  • (cs) in reply to Casiotone
    Casiotone:
    Saving bandwidth is a WTF?


    Would downloading the Google databases save bandwith too?

  • (cs) in reply to Casiotone
    Casiotone:
    Gah, that was supposed to be quoting this:


    Message to self: RBYP.

  • (cs) in reply to ItsAllGeekToMe
    ItsAllGeekToMe:

    Because.  It sucks more than anything's ever sucked before.



    What about witch burning?

  • (cs) in reply to Alexis de Torquemada
    Alexis de Torquemada:
    ItsAllGeekToMe:

    Because.  It sucks more than anything's ever sucked before.



    What about witch burning?


    Well, that sucked for the witches. JavaScript sucks for programmers AND end users.

    I think a better metric is the amount of hot air produced. The amount of hot air produced by burning witches, even allowing for extreme cases such as Agnes Nutter, is rather negligible when compared to, say, a forest fire. But neither hold a candle to the amount of hot air produced by modern, industry-grade marketing departments, such as that of Netscape when it introduced and named JavaScript.

  • (cs) in reply to hank miller
    hank miller:
    clockwise:
    It's fast, it's on the client side, and it's pretty easy to maintain..


    No, it is O(nm), which can generalize to O(N^2).


    O(n²) is a special case of O(nm) (where m is O(n)), not a generalization. Also, there's three nested loops with not necessarily constant iterations in the given code snippet, so I'd rather say it's O(nmo).

  • Kitsune818 (unregistered) in reply to Monday

    Anonymous:
    It has it's place.

    -Form validation without reloading a age.
    -ummm....
    -ummmmmmmm.......
    -Form vali...oh wait. Crap.

    -Dynamic forms. Yes! I knew I had one more!

    Actually, I write JavaScript form validations all day, every day, and it does an excellent job of it (and keeps me employed). I don't understand the concept of bashing languages, because all of them may fit a particular job or task, but not *all* jobs and tasks. In my opinion if you tried to design a truly "everything" language it would be extremely cumbersome in most situations. Just like I wouldn't write a spreadsheet app in JS, I wouldn't want to use some other client side like Java just to check that someone entered a number less than ten in a text box for a medical form. I wouldn't try to rebuild your car engine using just one wrench, either.

  • (cs) in reply to Kitsune818
    Anonymous:

     Just like I wouldn't write a spreadsheet app in JS, I wouldn't want to use some other client side like Java just to check that someone entered a number less than ten in a text box for a medical form. I wouldn't try to rebuild your car engine using just one wrench, either.

    Great point.

  • (cs) in reply to Anonymous
    Anonymous:
    Why does everyone hate on JavaScript so much here?

    Because it's been even more misused than Visual Basic, which is quite a lot of misuse.

    ammoQ:
    Anonymous:
    Why does everyone hate on JavaScript so much here?

    Several possibilities...
    a) It's an extremely cheap clone of an already poor language.

    Uh?

    You're not referring to Javascript as a "java clone" are you ?

    ammoQ:
    b) It grew in an unhealthy way and lacks a proper concept.

    Not really, even though the ECMA specs suck hairy balls, the language itself is fairly clean and E4X has quite cool additions to JS 1.5.

    It's lacking some kinds of modules and namespaces, but that's just requests of a pythonista.

    ammoQ:
    c) It's used for things it shouldn't be used.
    d) It's used by people who shouldn't use it.
    These are very true
    ammoQ:
    e) Real programmers might actually be forced to use it.

    JS is not a bad language at all.

    Most of it's implementations (browsers) on the other hand are full of holes and inconsistant, that's the real quirk.

    foxyshadis:
    ItsAllGeekToMe:

    Anonymous:
    Why does everyone hate on JavaScript so much here?

     

    Because.  It sucks more than anything's ever sucked before.


    XSLT gives it a good run for its money though. Someone needs to come up with a XSLJScript fusion language that requires constant use of eval() and dynamic:evaluate() (the xslt version) and transitions between the interpreters several layers deep.

    Well, both Internet Explorer and Firefox give you Javascript accessors to their XSLT engines...

    Use it to build a custom SQL-like database.

    You should be a bit more careful with your wishes... behold the Simple Javascript Database!

  • (cs) in reply to masklinn
    masklinn:

    It's lacking some kinds of modules and namespaces, but that's just requests of a pythonista.



    Object literals and global variables are a perfect recipe for modules. (Prototype uses this to extreme; it has a function Try.These(f1, f2...) as the only thing in the object Try.)

    MyModule = {
        my_function1: function(args){ body; },
        my_function2: function(args){ body; },
        my_global: value,
        my_inner_module = {
             inner_crap: function(args){ body: }
        }};

    If you are using prototype-based inheritance, you would just need some helper functions to store prototypes in modules (and use modules to build useful prototypes).

    I have my own sets of functions for this crap, but see prototype.js for the basic idea.
    (And I don't actually namespace anything yet, my projects aren't that big.)
  • (cs) in reply to masklinn
    masklinn:

    You're not referring to Javascript as a "java clone" are you ?



    It has been discussed before, but let's roll back the discussion. The original question was: Why does everyone hate JavaScript so much?

    During the discussion, I've learned that JavaScript is related to functional languages, especially Lisp. But this is not at all obvious, since Netscape and Sun decided to call it JavaScript, not LispWithCStyledSyntax.
    On the other hand, in many cases, HTML pages containing JavaScript are created on the server by a Java program (JSP, Servlet, JSF, Struts...). There was a time when Java Applets were regulary used on web pages. So I think it's fair to assume that many programmers doing web programming are familar with the Java language. It's also fair to assume that many programmers are not familar with Lisp or functional programming. For that reason, they do not appreciate or utilitze the power of functional programming given in JavaScript. All they see is a scripting language that tries to look like Java, but lacks many of the concepts given in Java and seems to use some keywords ("function", "var") in rather strange ways. That plus the problems with different APIs (DOM) in different browsers and other browser-related problems make some people (including myself, I admit) more-or-less hate JavaScript.
  • (cs) in reply to ammoQ
    ammoQ:

    During the discussion, I've learned that JavaScript is related to functional languages, especially Lisp. But this is not at all obvious, since Netscape and Sun decided to call it JavaScript, not LispWithCStyledSyntax.


    And legions of programmers have cursed them for that marketing ploy. Especially all regular contributors to Java-related newsgroups.

    ammoQ:
    All they see is a scripting language that tries to look like Java, but lacks many of the concepts given in Java


    It pretty much lacks ALL of the key concepts of Java. Hardly anyone would think that it "tries to look like Java", were it not for the name.

  • (cs) in reply to quamaretto
    quamaretto:
    masklinn:

    It's lacking some kinds of modules and namespaces, but that's just requests of a pythonista.



    Object literals and global variables are a perfect recipe for modules. (Prototype uses this to extreme; it has a function Try.These(f1, f2...) as the only thing in the object Try.)

    MyModule = {
        my_function1: function(args){ body; },
        my_function2: function(args){ body; },
        my_global: value,
        my_inner_module = {
             inner_crap: function(args){ body: }
        }};

    If you are using prototype-based inheritance, you would just need some helper functions to store prototypes in modules (and use modules to build useful prototypes).

    I have my own sets of functions for this crap, but see prototype.js for the basic idea.
    (And I don't actually namespace anything yet, my projects aren't that big.)

    That's not modules, that's namespace emulation.

    By "modules", i meant having import-ish statements in JS files instead of having to link all your JS from your HTML and getting a whole damn mess in your global namespace.

  • (cs) in reply to brazzy
    brazzy:

    It pretty much lacks ALL of the key concepts of Java. Hardly anyone would think that it "tries to look like Java", were it not for the name.


    It didn't make that much of a difference for the small programs that have been written in  the early times of JavaScript, since the DOM was not evolved then and browser support was lacking.
  • (cs) in reply to masklinn

    Use it to build a custom SQL-like database.

    You should be a bit more careful with your wishes... behold the Simple Javascript Database!


    ...You wound me.

    I perl'd up 2 megs of data to be pathological and came up with a fairly complex query, just to watch it take forever to crash horribly. =D

    The only thing I don't understand is why the guy discusses AJAX, yet refuses to store the data in XML strings. Obviously there's a lot of room for major feature refinement here. I'm going to modify the backend and sell the code to Alex's XML-crazy company for millions. Score!
  • Alan Shutko (unregistered) in reply to Florian
    Anonymous:
    ammoQ:
    Anonymous:
    Why does everyone hate on JavaScript so much here?

    Several possibilities...
    a) It's an extremely cheap clone of an already poor language.

    Common Lisp is poor in what respect, again?


    Right... have you ever used CL?

    Where in JS are macros?  Where's the normal map/reduce suite?  Where's the native code compilation?  Where are the full set of handy iterative operations?  Where's CLOS with generic functions?  (No, prototype-based OO doesn't count.)  For that matter, where's LET?!  JS's scoping rules (function and global) piss me off.

    JS is not derived from CL.  Maybe it's Scheme?  No, where are the continuations.  If anything, you might say that JS comes from Lisp 1.5, with lexical scoping thrown in, but without most of the improvements that came since then.

    JS has closures.  CL and Scheme have closures.  That's about the full extent of the semblance.
  • (cs) in reply to Richard Nixon
    Richard Nixon:
    ammoQ:
    Anonymous:

    ammoQ:

    a) It's an extremely cheap clone of an already poor language.

    Which language would that be?  Certainly not Java - Javascript has nothing to do with that apart from the name.

    ammoQ:

    b) It grew in an unhealthy way and lacks a proper concept.

    Lacks a proper concept?  What's wrong with prototype-based OO, other than the fact that you're clearly not smart enough to understand it?

    ammoQ:

    c) It's used for things it shouldn't be used.

    Like any language, then. Like using C to write desktop applications, PHP to write command-line utilities, Ruby to write web apps, and Perl to write anything apart from obfuscated one-liners.

    ammoQ:

    d) It's used by people who shouldn't use it.

    Like 100% of all other programming languages?  So what's different?

    ammoQ:

    e) Real programmers might actually be forced to use it.

    Worse, they might actually be forced to open their minds. OH NOES!!! We can't have that!



    If you want a serious discussion about that topic, mind your tone.


    Your tone doesn't appear to be any different.

    Sincerely,

    Richard Nixon

    Whereas Richard's Tone is always rosy.  ( :p)

  • (cs) in reply to masklinn
    masklinn:

    That's not modules, that's namespace emulation.

    By "modules", i meant having import-ish statements in JS files instead of having to link all your JS from your HTML and getting a whole damn mess in your global namespace.



    In Internet Explorer (at least), that can be accomplished by dynamially inserting a script element with the appropriate attributes. A similar method probably works in Mozilla. More generally, in all other browsers that support XmlHttpRequest (or alternative methods) in some form, you could fetch the source and run "eval(request.responseText)". That's hackish, but it should work. (I'll try it at work tomorrow.)

    In fact, I'm glad you pressed me to think of this; the application I'm developing uses a lot of Javascript that should not all be exposed to the world before the user logs in.

  • nick chan (unregistered)

    good results for the end user not really wtf

  • (cs) in reply to nick chan
    You should be a bit more careful with your wishes... behold the Simple Javascript Database!


    Firefox gives an error. Somethingorother isn't a function.
    So there you are.

    And writing an SQL interpreted for JS is just plain nutty. I've written the usual handy things to pick up elements, like elemsByClass() and elemsByTag(), but I wouldn't dream of implementing a full CSS-selector function "elemsBySelector()". Just think of the magnificent overhead and function overload!

    I agree with ammoQ that js is still far from being a reliable programming platform, but that's not JS's fault, that's just because all these browser makers do things their own way. IE5/Mac doesn't even support array.push() !

    But one notable difference in implementation is the rounding of floats to ints. I'm not sure which is which anymore, but IE rounds up and Gecko rounds down. I was calculating something recursively down to a single pixel, and one of the two browsers fell in an infinite loop, while the other stopped just 1 pixel short.

    I don't know if that's 'quirky' or in violation of the spec.

    Another thing about JS is that it's inherently slow due to it being interpeted in an engine that runs inside a browser instead of being a standalone program. The same thing plagues heavier Actionscripts. The objects it typically manipulates (element nodes) are relatively heavy. A loop that produces only a few hundred elements will keep your browser busy for a second or two.

    But all in all, I love JS, because I love how I can juggle around the graphical things called HTML elements and enhance the browsing experience*. :)

    *) that does not include trails of stars that follow your cursor, but rather, areas that switch colour when you click a radio, layout stretching etc. True interface enhancements.
  • keuleJ (unregistered) in reply to xenoputtss
    xenoputtss:
    This is fantastic!  The only problem that I see with this is that the person viewing the website didn't know what they should search for.  This is clearly not a WTF on the developer end, but more of user error.   Jeesshh.  :-)


    Of course you could display the searc items if the result is empty. "You would better type something like searchitem1, searchitem2..."
  • (cs) in reply to dhromed
    dhromed:

    Firefox gives an error. Somethingorother isn't a function.
    So there you are.

    Strange... it works with my Firefox. (1.0.7 on Linux)

    And writing an SQL interpreted for JS is just plain nutty.

    Well, if it worked on the Windows CE Internet Explorer, I would immediately know a good use for it. Unfortunately, it doesn't.

    I agree with ammoQ that js is still far from being a reliable programming platform, but that's not JS's fault, that's just because all these browser makers do things their own way. IE5/Mac doesn't even support array.push() !

    For intranet applications, where the IT department has control over the browsers in use, it's acceptable. For the WWW, there is
    always the need to fall back to support other/older/script-disabled browsers, which limits usability.

    Another thing about JS is that it's inherently slow due to it being interpeted in an engine that runs inside a browser instead of being a standalone program.

    I don't aggree. Interpreted languages are also often used outside the browser, e.g. PHP scripts; in many cases, they are fast enough.
  • Not Sam (unregistered) in reply to ammoQ
    ammoQ:
    What's the use of a perfect formalized semantic when in real live there are several different javascript interpreters (aka "web browsers"), each behaving slightly different?


    That's got more to do with Microsoft. They tried to implement a language before they knew how. It was the first time they had ever tried to do even POSIX-level regular expressions. Add to that their blatant disregard for standards, with an eye on resetting standards according to their defacto standards.

    I know that "bashing" Microsoft is a no-no here. But Microsoft's inability to implement an existing standard is really the culprit here, don't blame the language that they scuttled.
  • (cs) in reply to Alf

    Anonymous:
    Otto, thats called AJAX... google it (heh) so you can realise that the wtf here, is you thinking that ajax is a wtf....
    Welcome to 2005....

    Thank you, but I know what AJAX is. However, even with AJAX, hitting a server every time a letter is typed is a WTF simply because you have to throw massive amounts of server and bandwidth at the problem to make it work on a large basis. Google can do it because they have massive amounts of server and bandwidth.

    The use of AJAX is not the WTF I was talking about, it's doing a complete HTTP request on every keypress that is the WTF.

  • BadMammerJammer (unregistered) in reply to Alf

    I really hope you're kidding (or that I never have to work with you).  Roundtrip to server for every character typed ... that's why broadband was developed, right?

  • (cs) in reply to BadMammerJammer
    Anonymous:
    I really hope you're kidding (or that I never have to work with you).  Roundtrip to server for every character typed ... that's why broadband was developed, right?


    I don't know what you're saying. You seem to be using mild flames and dense sarcasm at the same time and that's hard to distill.

    Please answer the following with a non-sarcastic Yes or No:

    Is it a WTF to send a request to the server very time a character is typed?

    I say, Yes.

    You say?


    We've developed a system that would benefit greatly from AJAX updating specific parts of the application page in a second, instead of doing a full form submit and basically having the entire system reload after applying a simple change.

    Would you accept it if Photoshop restarted every time you added a layer?
  • (cs) in reply to Kitsune818
    Anonymous:

    I wouldn't want to use some other client side like Java just to check that someone entered a number less than ten in a text box for a medical form. I wouldn't try to rebuild your car engine using just one wrench, either.




    I hope you're checking input on the server side as well....
    Rob
  • (cs) in reply to ammoQ
    ammoQ:

    During the discussion, I've learned that JavaScript is related to functional languages, especially Lisp. But this is not at all obvious, since Netscape and Sun decided to call it JavaScript, not LispWithCStyledSyntax.



    In other news, Macromedia ColdFusion should now be considered a nuclear proliferation hazard :)
  • (cs) in reply to Otto
    Otto:

    Thank you, but I know what AJAX is. However, even with AJAX, hitting a server every time a letter is typed is a WTF simply because you have to throw massive amounts of server and bandwidth at the problem to make it work on a large basis.



    Er, that's what happens when you use an ssh session or similar, you know :) Of course, google's one does a search each time as well, but they're good at that, and no doubt cache. And IIRC they're not strictly using AJAX, rather something lighter-weight of their own devising.
  • (cs) in reply to rsynnott
    rsynnott:

    Er, that's what happens when you use an ssh session or similar, you know :) Of course, google's one does a search each time as well, but they're good at that, and no doubt cache. And IIRC they're not strictly using AJAX, rather something lighter-weight of their own devising.


    AJAX is the name given afterward to the entire scope of techniques that use XmlHttpRequest (or similar methods) to fetch data asynchronously and avoid postbacks. "Lightweight" has nothing to do with it. (The name 'AJAX' has been discussed into the ground, so I'm not keen to talk about it again.)
  • David (unregistered)

    I'm horrified that nobody mentionned the obvious references in the search "results".


    TPS.  Inetech.  C'mon - you guys saw "Office Space", right?  RIGHT?

    No?  Go do so now, with 20 of your best techie friends.  Then read this script and laugh rather than scratch your head.

    David.

  • (cs) in reply to dhromed
    dhromed:

    Is it a WTF to send a request to the server very time a character is typed?

    I say, Yes.


    So, in your opinion, the following network protocols are WTFs:
    Telnet (actually it is, but that's a different story)
    SSH
    RDP
    ICA
    VNC
    X (actually it is, but that's a different story)
    NX


  • TheZeusJuice (unregistered)

    My biggest beef with javascript is its complete and utter lack of any sane form of type-ing.
    This makes writing plugins, and debugging other peoples complex code a pain in the ass.
    I once tryed to modify a pluggin for Firefox (the Chatzilla irc client, if I remember correctly), and gave up after about a week of trying to understand what was going on where and being sent to which.

  • travis poeples (unregistered) in reply to robbak
    Anonymous:
    Anonymoose:
    Xepol:

    (oh, the site searchs I have seen, and how useless they were when all I wanted to do was search titles...)



    That reminds me of searching MSDN for... anything. What a friggin' useless piece of crap search engine.  I almost always end up back at Google, and enter site:msdn.microsoft.com as a search term.

    Can't wait for Microsoft to try and compete with Google, on the search front!

    Which reminds me that the local host of "Who Wants to be a Millionare" is always referring to "ninmsn search" if he gets the idea that a phone-a-friend was searching the internet. I'm waiting for someone to tell him that he'd be glad to, if he gave them 30 minutes to come up with something!
  • travis poeples (unregistered) in reply to phuture

    why don't you get fucked

Leave a comment on “The JavaScript Search Engine”

Log In or post as a guest

Replying to comment #:

« Return to Article