Javascript as a "serious" development language?
category: general [glöplog]
sweet poly trick http://www.uselesspickles.com/triangles/demo.html
As Joghut said, JS is a prototype based language with loose typing. It can be confusing for some people.
Weyland Yutani : That's the oldschool way of drawing triangles. People should really use SVG or Canvas for that.
Weyland Yutani : That's the oldschool way of drawing triangles. People should really use SVG or Canvas for that.
Let's hope no one linked this: http://www.joelonsoftware.com/items/2006/08/01.html
"MochiKit makes JavaScript suck less", or so they say. The interesting screencast video also covers the broken comparators as pointed out by Joghurt.
noname, unfortunately, the sucking only starts there...
Code:
var js = "sucks";
new function () {
alert(js);
// guess what's alerted if you uncomment the next line
// var js = "omg";
}();
does javascript have printf?
A coworker of mine is a total JavaScript fanboy. He codes everything in JavaScript, including servers.
He's the author of Joose, a framework which is supposed to make object-oriented programming in JavaScript a lot easier. According to him, it pretty much fixes everything that normally annoys you about JavaScript. I don't really have any experience with it, so I don't know if that's true.
He's the author of Joose, a framework which is supposed to make object-oriented programming in JavaScript a lot easier. According to him, it pretty much fixes everything that normally annoys you about JavaScript. I don't really have any experience with it, so I don't know if that's true.
Javascript is not a serious coding language because you can't save or load files with it :(
Code:
function reduce(fn, a, init)
{
var s = init;
for (i = 0; i < a.length; i++)
s = fn( s, a[i] );
return s;
}
function sum(a)
{
return reduce( function(a, b){ return a + b; },
a, 0 );
}
function join(a)
{
return reduce( function(a, b){ return a + b; },
a, "" );
}
Quote:
Many older languages simply had no way to do this kind of stuff. Other languages let you do it, but it's hard (for example, C has function pointers, but you have to declare and define the function somewhere else). Object-oriented programming languages aren't completely convinced that you should be allowed to do anything with functions.
Right. So that's an article praising Javascript by comparing it to languages older than C (and only SOME of the languages older than C, mind), downplaying the fact that you CAN do it in C, C++, Java, C#, and just about any other language, too, with the only difference being the inline functions. I guess the example is a ridiculously simple one because anything more complicated would illustrate how messy inline function declarations can become.
He even runs into the problems of loose typing in his example and brushes it aside because he wants to show that Javascript rules, not that it sucks. What it boils down to, it seems, is that abstraction is good, because then you can optimise a core set of shared functionality and many other parts of the system benefit from that. Well duh.
But I agree with him that CS students would be better off if they learned just JS instead of just Java.
Not that learning only one language is good, but nowadays it seems to be the case that you can get a CS major without ever touching anything else but Java in an IDE. There are people out there that can't even compile their fucking programs using just the console.
Worse even, most former CS students I know never even heard of Coroutines... I did, and I never studies CS; I just looked at other languages than C(++)
</rant>
Not that learning only one language is good, but nowadays it seems to be the case that you can get a CS major without ever touching anything else but Java in an IDE. There are people out there that can't even compile their fucking programs using just the console.
Worse even, most former CS students I know never even heard of Coroutines... I did, and I never studies CS; I just looked at other languages than C(++)
</rant>
C++ should adopt the way js handles classes... For real...
Wow the price of crack really dropped this year, wich is a good thing for me...
Wow the price of crack really dropped this year, wich is a good thing for me...
Well, coroutines produce neater code in certain situations, but so does goto. Neither is strictly necessary, though, and both require some discipline and understanding to do less harm than good. I think the basic problem is that there isn't enough time in a CS degree to teach a useful amount of CS to complete newcomers, yet the educations tend to be aimed at people who've never written a line of code before.
If the students all had prior experience you probably could go through a whole lot of programming paradigms and techniques, as well as a bunch of different languages, but since you can't make that assumption about the students, you end up looking for the single "best" paradigm to teach, which is inevitably OOP, and the one language that most clearly expresses that paradigm while being somewhat industry-standard, which is Java.
If the students all had prior experience you probably could go through a whole lot of programming paradigms and techniques, as well as a bunch of different languages, but since you can't make that assumption about the students, you end up looking for the single "best" paradigm to teach, which is inevitably OOP, and the one language that most clearly expresses that paradigm while being somewhat industry-standard, which is Java.
6502 compatible assembler and emulator in javascript: http://www.6502asm.com/
I took a CS course in two years here in france, and i learnt assembly (RISC, on a java simulator), ADA, Java, C++, C, and Scheme, that is imperative/procedural, object, and functionnal programming. Starting from "how to use a mouse" (or almost that).
that joose thing is pretty cool. i think i'm going to use it.
would the lively kernel be considered serious use?
http://livelykernel.sunlabs.com/legacy/0.8.5/index.xhtml
i'd like to see a demo done on top of this
http://livelykernel.sunlabs.com/legacy/0.8.5/index.xhtml
i'd like to see a demo done on top of this
chanman: I guess not :) 100% cpu load and still only 10fps max on my 2,8Ghz Intel
hermes: i can't argue that though the "big guys" (apple, google) are making webkit's js engine faster
chanman: The day they manage to get it running with almost idle CPU usage I'll stop complaining :)
(and I'm using Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6, btw)
what hermes said.
That lively thing was painfully slow and eventually it completely b0rked my firefox :(
so lively isn't so lively in firefox : /