Live data from Hacker News

The Birth and Death of JavaScript [video]

destroyallsoftware.com

181–190 of 236 posts

Re: The Birth and Death of JavaScript [video]

#181
post #21
post #4

I'm missing some obvious joke...but why is he pronouncing it yava-script.

He's in character of it being 2035 and the pronunciation was lost/changed.

I was hoping he'd drop in some reference that would explain it, like the take over of world government by Norway after the war (sort of like Poul Anderson's Tau Zero http://en.wikipedia.org/wiki/Tau_Zero). But I guess he just wanted it to be inscrutable.

Re: The Birth and Death of JavaScript [video]

#182

Earlier quoted context omitted.

It sounds so natural that I immediately started thinking I had actually been saying it wrong all these years.

I think I'm going to adopt this new pronounciation.

pronunciation*

(it's one of few weird words that change spelling when you add a suffix, such as fridge/refrigerator)

Re: The Birth and Death of JavaScript [video]

#183
post #168

Earlier quoted context omitted.

On the contrary. We should strive to correct all the "wats" that obviously exist in all these languages, but most of what I see is just complaints, most of them ignoring the amazing things that can be done with these technologies. Over 30 year I've been programming in more languages than I care to count, and I don't remember at any point having a specific language stop me from achieving my goal because it has some tr…

"I don't remember at any point having a specific language stop me from achieving my goal because it has some traps or design flaws." I have to admit, a language has never stopped me personally . But it most assuredly has hurt me when trying to program with other people, who do not have a direct psychic hotline into my brain that tells them what preconditions must hold before my code will work properly, and what thing…

> But it most assuredly has hurt me when trying to program with other people, who do not have a direct psychic hotline into my brain that tells them what preconditions must hold before my code will work properly, and what things they can and can not do with a certain library, and most importantly, why they can and can not do those things

Programming is hard. It's an ongoing process of mastery. This is true with any programming language. There is no silver bullet.

> Languages that allow me to encode more of those things into the program itself

There are plenty of tools that almost every language provides for you. It's an architectural concern to ensure that there is as little mapping between the domain and the code.

I personally find Javascript to be flexible, which allows me to architect my software in a way that is communicative of the domain, without many restrictions.

> I become one of those people who don't have a direct hotline to my-brain-in-the-past

A story is a great way to communicate information. Automated functional (black box) testing is also good. Also, try to reduce the mapping between the domain and the software. Ideally, the software (naming) should have a 1-1 map to the domain.

Also, keep the structures flat, as this idiom tends to reduce complexity.

Keep consistent & iterate on architectural idioms between projects.

These are some ways to improve communicability of the codebase & to have insight into the business domain logic.

Re: The Birth and Death of JavaScript [video]

#184
post #136

Earlier quoted context omitted.

> Javascript is a bad choice Javascript is great once used in a "good" way. It's flexible & it's almost everywhere. Spending all your time complaining about how "bad" Javascript is kindof pointless. If you use Javascript, learn how to use it well. Master sushi chefs don't sit there complaining how bad knives are because the knives need to be constantly sharpened. If you are cooking spaghetti, learn how to strain the…

The fact that something is "almost everywhere" doesn't make it good. It makes it useful at most. And your examples make sense, javascript doesn't (in some cases) so it's very appropriate to complain.

> so it's very appropriate to complain

In that case, it's appropriate to complain about gravity & being restricted to the speed of light?

No, it's better to learn about and use these properties to your advantage.

Re: The Birth and Death of JavaScript [video]

#185
post #61

The reason why metal doesn't exist now is because you can't turn the memory protection stuff off in modern CPU's. For some weird reason (I'm not an OS/CPU developer) switching to long mode on an x86 cpu also turns on the mmu stuff. You just can't have one without the other. There's a whole bunch of research done on VM software managed operating systems, back when the VM's started becoming really good. Microsoft's Sin…

In a way that is no different from the older Xerox PARC systems or the Oberon based ones at ETHZ.

All of them are based on the concept of using memory safe languages for coding while leaving the runtime the OS role.

Except for C and C++, language standard libraries tend to be very rich and to certain extent also offer the same features one would expect from OS services.

As such, bypassing what we know as standard OS with direct hardware integration, coupled with language memory safety, could be an interesting design as well.

That is why I follow the Mirage, Erlang on Xen and HaLVM research.

Re: The Birth and Death of JavaScript [video]

#186
I guess I don't really get the point here. This video walks a line between comedy and fact where I'm not really satisfied in either.

I can't always tell what's a joke, does he actually believe people would write software to compile to ASM instead of javascript because there are a few WTFs on js's "hashmaps." Much likely a newer version will come out before 2035? Or was that a joke?

I also feel like poking fun at "yavascript" at a python conference is cheap and plays to an audience's basest desires.

Really I see a mixture of the following: - Predictions about the future, some of which are just cleary jokes (e.g. 5 year war) - Insulting javascript preferring clojure - Talking about weird shit you could, but never would do with ASM js - Talking about a library that allegedly runs native code 4% faster in some benchmarks, with a simplistic explanation about overhead from ring0 to ring3 overhead.

Re: The Birth and Death of JavaScript [video]

#187
post #168

Earlier quoted context omitted.

"I don't remember at any point having a specific language stop me from achieving my goal because it has some traps or design flaws." I have to admit, a language has never stopped me personally . But it most assuredly has hurt me when trying to program with other people, who do not have a direct psychic hotline into my brain that tells them what preconditions must hold before my code will work properly, and what thing…

> But it most assuredly has hurt me when trying to program with other people, who do not have a direct psychic hotline into my brain that tells them what preconditions must hold before my code will work properly, and what things they can and can not do with a certain library, and most importantly, why they can and can not do those things Programming is hard. It's an ongoing process of mastery. This is true with any p…

"business domain logic"

Ah, you see, there's the problem... this wasn't business logic. To put it in Haskell terms, I had code that was not in IO, but I couldn't actually encode that restriction in the language.

Most of your post amounts to "program better", which is vacuous advice. We've spent decades telling each other to "program better". We've proved to my satisfaction that's not enough. Have you used languages not from the same tradition as Javascript? It is possible, even likely, that you are not aware of the options that are available out there, even today.

Re: The Birth and Death of JavaScript [video]

#188
post #90

Earlier quoted context omitted.

"int" doesn't imply anything about the base.

It does for human beings. We use base-10 for basically everything. This is true even for most programmers in most situations. Human beings aren't computers, and we aren't abstract math processing units who by default consider numbers abstracted (e.g. as elements of Rings). This goes double for string representations of numbers--in the majority of cases a number represented by a string is a number meant for human cons…

I agree with your conclusions. However, the poster I was responding to was suggesting that the category of "int" necessarily excludes non-decimal representations in the same sense that the category of "stone" excludes "paper".

I think in this case it's not parseInt that's at fault, it's the fact that map optionally passes additional arguments.

Re: The Birth and Death of JavaScript [video]

#189
post #144

Earlier quoted context omitted.

It's only WTF because it's not the same as other implementations of map. Once you can internalize the map implementation, it's no longer WTF & actually makes sense.

That's the weird part. Why does array provide three arguments? But I agree, that's something you can learn. I guess. But it's WTF anyway. I have a function that takes either one or two arguments, I provide three, and everyone seems to be OK with that.

Well that decision is pretty necessary when you realize that JS has no syntax to indicate a function is variadic (we use the arguments magic variable, but use of it does not necessarily indicate that a function is variadic) and that implementation supplied functions are not required to have their arity exposed via Function.prototype.length (http://es5.github.io/#x15.3.5.1).

There's no way to know, even at run-time, whether a function is being called with too few or too many arguments, since that's equivalent to the halting problem. So the sensible alternative is just to default everything to undefined, and silently ignore extraneous arguments.

But yes, if JS was strict with how it handled argument definition lists and had support for indicating infinite arity, I'd agree, this would be a WTF, or at least strange. But I think it makes a lot of sense, all things considered.

Re: The Birth and Death of JavaScript [video]

#190
post #108

For those unfamiliar, Gary Bernhardt is the same guy who did the famous "Wat" talk on JavaScript: https://www.destroyallsoftware.com/talks/wat

Brendan Eich covered this subject at O'Reilly Fluent conference in 2012: http://youtu.be/Rj49rmc01Hs?t=5m7s

Brendan Eich is a homophobe and whoever links to his videos are complicit in his bigotry.

All his opinions should be discarded.

Post reply on HN