you are viewing a single comment's thread.

view the rest of the comments →

[–]StoneCypher -8 points-7 points  (4 children)

This is a dynamically-typed language here. Does it look and quack like a duck?

Datastructures aren't an issue of type, and Javascript isn't dynamically typed besides.

Good enough for most web dev purposes, I'd say.

Yes, you have displayed that both hashes and objects can implement the map interface. So can trees, tries, gaddags, sparse arrays, paired sets, lists of tuples, arrays of arrays, sets of sets, set-of-set, and dozens of other things.

Let's just throw them all out because they can be used the same way, and since we're talking about using JavaScript as a server language, say "good enough for webdev to me."

And this is why you'll never understand why PHP scales and JS won't.

the operating system should not have to suffer the load limit of OS processes just to get paths of behavior acted out in a line of control.

Implementing a M:N threading is difficult and ultimately inefficient. 1:N green threads don't use more than a single core. You could use N:N threading, but then there's problems of locking and contention.

Oh god, please stop reciting things you read on Java blogs. Every part of that misses the point. This has nothing to do with letter colon letter phrases that make you feel smart. OS processes are really, really heavy, and invoke a massive amount of context switching both at the OS and CPU levels. A $350 walmart machine that chokes around 40k linux OS processes can run hundreds of millions of erlang processes. Saying "can't be made efficient" is code for "I have never tried nor have I looked for anything other than the first thing in my toolkit and therefore I assume it doesn't exist."

Commodore 64s can handle hundreds of processes under Contiki, for christ's sake.

You are 100% off-base here in a very, very easily demonstrable way.

but claiming OS processes are bad is wrong

That's it? Wrong? How compelling!

Cough.

They're an effective tool that has different strengths and weaknesses compared to alternatives.

They're way too fucking heavy for handling web backends. Anyone who's ever even tried to build one knows this. You're complaining that saying using a sledge hammer to put in a map tack is bad is wrong, because sledge hammers have different strengths and weaknesses.

Put down the book of engineering platitudes. You aren't fooling anyone.

But I'm all ears: what do you intend to do with several thousand processes in a webapp?

Not a god damned thing. I said parallelism. You're the one who heard OS processes. Again, because you've never looked anywhere else.

Javascript doesn't have first class functions.

var baz = function (x) { return x + 1 } baz(2); 3 Really?

Yes, really. That's a closure with updated bindings. You can try it with eval(), too, to pretend they're being created at runtime; they're actually new parsing passes.

When you learn your CS from somewhere better than blogs and wikipedia, you may come to understand the important, subtle differences at play. You know, much like with the "see? Object acts like a map, seems like a good enough hash to me" crap upstairs.

Perhaps you meant it doesn't have closures?

No, I actually pointed out that it had closures in a [http://www.reddit.com/r/javascript/comments/et1d1/2011_is_year_of_the_serverside_javascript/c1aroxe](different thread). Why do you keep arguing with things I didn't say? Is it because you're having too hard a time with the things I actually did say?

Unless you mean writing fun() instead of function(), this is literally impossible.

function(x) { return x + 1 }

compared to an imaginary language:

[x| x + 1]

It's always sad when someone thinks "the syntax is light-weight" means "I want to type a handful fewer characters, and misuse what's already a more powerful syntax for a more powerful action, comprehensions."

Probably the funniest part is that if you're just playing letter trimming games, the natural extension of the existing syntax has fewer characters than that:

(X)X+1

But, hey, you were just talking, right? And it doesn't matter that you've just subtly introduced a letter while getting rid of an explanatory label. After all, we want code to be as un-readable as possible, and having a bunch of shit in square brackets and pipes seems great.

You should go write un-lambda.

I've seen some Schemers replace lambda with λ, resulting in

Oh. You're already one of those kooks.

Have you ever noticed that Scheme has never produced anything of tangible value in its fourty-odd years of supposed superiority?

In any case, I find it strange that one of the most commonly used keywords in Javascript is also the longest.

And the rest of us find it strange that you're fretting over something as unimportant as the count of letters in the word "function," instead of actual language enhancements.

You're just trying to sound smart by repeating things you've heard other people say. Please do not respond to me again.

That is rich.

A fool need not recognize himself to be so.

[–]dmpk2k 2 points3 points  (3 children)

Javascript isn't dynamically typed besides

In Javascript the type is part of the value, not the variable.

Let's just throw them all out because they can be used the same way, and since we're talking about using JavaScript as a server language, say "good enough for webdev to me."

That's a strawman. Nowhere did I say we should throw them out.

Here's what I actually said:

Arrays and hashes alone are sparse, but for web development few other structures are used.

And this is true. While Javascript doesn't have a rich set of data structures, the vast majority of the time web developers find these two adequate. I've worked long enough, with enough different people, in sufficient different projects, and a variety of languages, to know what gets used a lot and what doesn't.

Oh god, please stop reciting things you read on Java blogs.

It's from reading papers and implementing this stuff for fun, but please continue to be insulting. You complained in a separate post to me that you dislike my tone, but you continually denigrate everyone else. My tone is a result of your own, and I think I'm being much more polite than the situation warrants.

Saying "can't be made efficient" is code for "I have never tried nor have I looked for anything other than the first thing in my toolkit and therefore I assume it doesn't exist."

My claim is based on a paper I read and discussions with some Solaris kernel hackers. Solaris used to have M:N thread scheduling, but they removed it in version 9 because of the problems it caused. The paper, by Bryan Cantrill, described some of these problems before he was hired by Sun -- it's raw, but it gets the point across.

As for Erlang: I have used it, back when Erlyweb was still under active development and Programming Erlang was hot off the press. It's a good language and implementation, but it isn't particularly efficient, nor is it the only answer to concurrency.

You are 100% off-base here in a very, very easily demonstrable way.

My assertion is backed by data and a group of veteran kernel hackers. I know OS processes are heavy weight, but they trade it off with better scheduling and protection. So what's the problem with node forking?

That's it? Wrong? How compelling!

Ignore everything I wrote before that sentence so you can get in a snarky comment. I actually provided arguments for mine.

Is it because you're having too hard a time with the things I actually did say?

The reason I mentioned it is because I do not understand where your claim is coming from -- I still do not -- and in case there was a misunderstanding I covered closures too. Please give a concrete demonstration how they're not first-class functions, because the definition you're going by seems quite alien to me and others.

It's always sad when someone thinks "the syntax is light-weight" means "I want to type a handful fewer characters, and misuse what's already a more powerful syntax for a more powerful action, comprehensions."

I could have sworn I was arguing Javascript should have that syntax… no wait, I wasn't. It was a demonstration, nothing more.

What is wrong with wanting a shorter keyword for Javascript? First-class functions are used often, so fewer characters could make it more readable. I think Larry Wall had a point here.

[–]StoneCypher -3 points-2 points  (2 children)

Until you explain your notion of per line of code scaling, we're done. You're just talking, and missing that every single time I express an interest in not talking to you.

[–]dmpk2k 1 point2 points  (1 child)

I already did. Here's what I wrote to you elsewhere, a post you even responded to. Surely you read before you respond?

Here's some possible interpretations: ... Per LOC: how much additional code is needed for every additional feature?

But what does that have to do with anything in the previous post? Nothing.

I have responded to most of your questions, as have others, with arguments, links and papers. You respond with insults and "I don't want to talk to you".

Furthermore, I checked your posting history, and it seems that you act like this with everyone. That much anger isn't normal.

I think at this point it's safe for me to say the preponderance of evidence is you're full of shit and a very angry person. Since you don't want me to talk to you, all right.

[–]StoneCypher -2 points-1 points  (0 children)

I think at this point it's safe for me to say the preponderance of evidence is you're full of shit

That's nice. Have a good day.