Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Polio Vax Scene
Apr 5, 2009



Pavlov posted:

If only browsers supported something that wasn't javascript. Maybe we could program in something good instead.

If you are unironically suggesting we use Java instead I think you're in for some hurt

Adbot
ADBOT LOVES YOU

Space Kablooey
May 6, 2009


Not sure why you are getting Java from "something good".

xzzy
Mar 5, 2009

I'm pretty sure javascript continues to thrive as a punishment for developers collectively producing poo poo code day in and day out.

I mean even if there was some theoretical perfect language all set to replace javascript, someone somewhere would still find a way to write poo poo code. Javascript just forces us all to wallow in that reality.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
Honestly, the biggest problem with Javascript is the culture surrounding it.

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Pavlov posted:

If only browsers supported something that wasn't javascript. Maybe we could program in something good instead.

Haste and WebSharper are all quite interesting to me, working towards breaking down the barrier between client-side and server-side code.

omeg
Sep 3, 2012

Sinestro posted:

Haste and WebSharper are all quite interesting to me, working towards breaking down the barrier between client-side and server-side code.

Sounds like an excellent idea.

nielsm
Jun 1, 2009



Pavlov posted:

If only browsers supported something that wasn't javascript. Maybe we could program in something good instead.

VBScript.

canis minor
May 4, 2011

Sinestro posted:

Haste and WebSharper are all quite interesting to me, working towards breaking down the barrier between client-side and server-side code.

node.js

:v:

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

Wheany posted:

Honestly, the biggest problem with Javascript is the culture surrounding it.

I've written some browser based games in JS and I honestly didn't find it that bad. However, I was working by myself and I wasn't interacting with the DOM in any serious way. I can see how it could be more annoying if neither of those were the case.

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that
I would love to meet with the people who think compiling everything to javascript is a good idea so I can sell them my idea for a new Lisp Machine.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?
Didn't someone already try to do that? I recall the documentation stating that you should remove comments and use short variable names to increase performance...

kitten smoothie
Dec 29, 2001

HappyHippo posted:

Didn't someone already try to do that? I recall the documentation stating that you should remove comments and use short variable names to increase performance...

Wasn't that some arduino-like device with its own js interpreter that evaluated comments? Google is failing me now to find it and I'm pretty sure it's been posted like 150 pages back in this thread.

Polio Vax Scene
Apr 5, 2009



There's always emscripten.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

kitten smoothie posted:

Wasn't that some arduino-like device with its own js interpreter that evaluated comments? Google is failing me now to find it and I'm pretty sure it's been posted like 150 pages back in this thread.

Yeah I think it was something like that. Certainly belongs in this thread for sure.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



I actually don't hate JS as a language :o: but I'm guessing a lot of that is Stockholm Syndrome

kitten smoothie posted:

Wasn't that some arduino-like device with its own js interpreter that evaluated comments? Google is failing me now to find it and I'm pretty sure it's been posted like 150 pages back in this thread.

http://www.espruino.com/

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Pavlov posted:

I would love to meet with the people who think compiling everything to javascript is a good idea so I can sell them my idea for a new Lisp Machine.
http://asmjs.org/

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Munkeymon posted:

I actually don't hate JS as a language :o: but I'm guessing a lot of that is Stockholm Syndrome

It's definitely stockholm syndrome. I think programming in MUMPS is pretty fun! Mostly because I'm in a contest with myself to make my code as obtuse and unreadable as possible.

Not in production of course. There I'm overjoyed that using comments no longer causes performance problems on the more popular M implementations.

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that

Oh good, I get all the joy of javascript as a compilation target, with the added benefit of getting to do manual memory management.

Pavlov fucked around with this message at 22:37 on Apr 2, 2015

Wreckfest
Apr 1, 2015

Pavlov posted:

Oh good, I get all the joy of javascript as a compilation target, with the added benefit of getting to do manual memory management.

Skynet must have a weakness.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Pavlov posted:

Oh good, I get all the joy of javascript as a compilation target, with the added benefit of getting to do manual memory management.
If manual memory management isn't a benefit then asm.js is probably not the correct compilation target.

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that

Plorkyeran posted:

If manual memory management isn't a benefit then asm.js is probably not the correct compilation target.

Half the point of asm seems to be that it will run on current browser javascript engines. If you're not running the code in someone's browser, you're not forcefully tied to javascript at all. What are you sticking in people's browsers that you need the efficiency of manual memory management over the ease of garbage collection?

shodanjr_gr
Nov 20, 2007

Pavlov posted:

What are you sticking in people's browsers that you need the efficiency of manual memory management over the ease of garbage collection?

Anything that uses WebGL to draw stuff on the screen.

e: Meaning game engines, VR apps, etc.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Pavlov posted:

Half the point of asm seems to be that it will run on current browser javascript engines. If you're not running the code in someone's browser, you're not forcefully tied to javascript at all. What are you sticking in people's browsers that you need the efficiency of manual memory management over the ease of garbage collection?

asm.js is a compilation target for un-JS-like languages which have their own memory management with semantics that do not exactly match JS's. Integrating with a platform's automatic memory management is generally far more difficult than just doing your own manual management. Any efficiency gains are merely a nice bonus; asm.js's memory management is basically just a formalization of what emscriptem was already doing.

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that

Plorkyeran posted:

asm.js is a compilation target for un-JS-like languages which have their own memory management with semantics that do not exactly match JS's. Integrating with a platform's automatic memory management is generally far more difficult than just doing your own manual management. Any efficiency gains are merely a nice bonus; asm.js's memory management is basically just a formalization of what emscriptem was already doing.

Right. But the point I was half-heatedly making is that when you find yourself desperately trying to avoid the memory model of the system you're designing for, you have to ask yourself why you have to design for that system. Javascript was fundamentally not designed to perform all the tasks people want it to, but instead of trying to promote a new technology, there are a lot of people who insist on shoving everything in the world through a javascript engine kicking a screaming.

Bongo Bill
Jan 17, 2012

Being able to port existing code to a browser is valuable, apparently.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Pavlov posted:

Right. But the point I was half-heatedly making is that when you find yourself desperately trying to avoid the memory model of the system you're designing for, you have to ask yourself why you have to design for that system. Javascript was fundamentally not designed to perform all the tasks people want it to, but instead of trying to promote a new technology, there are a lot of people who insist on shoving everything in the world through a javascript engine kicking a screaming.

Even when we try to promote a new technology, nothing happens because it means an obscene adoption cliff given that most of your users don't know what their browser is, let alone JavaScript, let alone patching their browser to a version that would run another VM.

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that

Volmarias posted:

Even when we try to promote a new technology, nothing happens because it means an obscene adoption cliff given that most of your users don't know what their browser is, let alone JavaScript, let alone patching their browser to a version that would run another VM.

Yeah, I know about Dart and NaCl and the like. I'm mostly just howling at the wind. It's just strange that we can get half of the world to download Flash, but we can't use a scripting engine that isn't purely javascript.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?
Flash offered something to the user, not just the programmer. Now that you can do what it did in javascript its basically dead.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
JavaScript isn't really that worse compared to other programming languages. Every language has its warts.

I've written large-scale JS projects and I don't see it as a giant pain, nor do I think it's Stockholm Syndrome. It's being realistic about technology choices.

Compared to Python, Perl or Ruby, I think JS is a lot less wart-y.

VikingofRock
Aug 24, 2008




Suspicious Dish posted:

JavaScript isn't really that worse compared to other programming languages. Every language has its warts.

I've written large-scale JS projects and I don't see it as a giant pain, nor do I think it's Stockholm Syndrome. It's being realistic about technology choices.

Compared to Python, Perl or Ruby, I think JS is a lot less wart-y.

I'm curious if people think Python 3 is still warty--I haven't had much exposure to it but most of my favorite Python 2 warts are gone in Python 3. Is Python 3 as big an improvement as its fans say it is?

Jewel
May 2, 2009

VikingofRock posted:

I'm curious if people think Python 3 is still warty--I haven't had much exposure to it but most of my favorite Python 2 warts are gone in Python 3. Is Python 3 as big an improvement as its fans say it is?

I grabbed python 3 at work to do quick scripts with and Python 3's print operator forces you to use brackets, which kinda bugs me for some reason! Especially because I don't use many features in most basic scripts other than string and data manipulation, so losing my muscle memory sucks. Otherwise I doubt there's going to be many major changes in the language itself, and if a lot of your problems are gone then you should probably just upgrade.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Jewel posted:

I grabbed python 3 at work to do quick scripts with and Python 3's print operator forces you to use brackets, which kinda bugs me for some reason!

Because it's not an operator any more, it's a function, which definitely is more convenient for some stuff. And it is a removed wart, because in order to understand how print works you need only understand how functions work, as opposed to it being another statement type with its own syntax you have to know about.

Soricidus
Oct 21, 2010
freedom-hating statist shill

Suspicious Dish posted:

JavaScript isn't really that worse compared to other programming languages. Every language has its warts.

I've written large-scale JS projects and I don't see it as a giant pain, nor do I think it's Stockholm Syndrome. It's being realistic about technology choices.

Compared to Python, Perl or Ruby, I think JS is a lot less wart-y.

well, yes, compared to three extremely warty languages, it's not surprising you can make a case for js being ok

and it's also true to say that js is getting better with time. es6 looks like it will be pretty tolerable once browsers support all the basic features it is finally adding to the language!

Nippashish
Nov 2, 2005

Let me see you dance!

VikingofRock posted:

I'm curious if people think Python 3 is still warty--I haven't had much exposure to it but most of my favorite Python 2 warts are gone in Python 3. Is Python 3 as big an improvement as its fans say it is?

Threading is still broken in python 3 and python 3 is still very slow. (I'm aware of multiprocessing and pypy but these aren't actually solutions).

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Pavlov posted:

Yeah, I know about Dart and NaCl and the like. I'm mostly just howling at the wind. It's just strange that we can get half of the world to download Flash, but we can't use a scripting engine that isn't purely javascript.
Flash pretty much took off because it could install and update itself with little user input, so Flash content "just worked" off the bat.
Now you can't get anything on the web unless it's widely supported by 6 browsers and approved by 13 standards committees and functions in 28 devices, or it'll just get criticized for competing and fragmenting and proprietarizing and closing and unbalancing and ruining the purity of the internet.

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

SupSuper posted:

Flash pretty much took off because it could install and update itself with little user input, so Flash content "just worked" off the bat.

Uh, no? Even to this day only Chrome automatically bundles and updates Flash.

Flash got traction because it supported a load of visual stuff before HTML did, and even years later it was the only reliable way to get H264 and game audio delivered.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Soricidus posted:

well, yes, compared to three extremely warty languages, it's not surprising you can make a case for js being ok

Yet those are the languages people use most and might want in the web. Please suggest a language you would prefer.

DARPA Dad
Dec 9, 2008

Suspicious Dish posted:

Yet those are the languages people use most and might want in the web. Please suggest a language you would prefer.

matlab

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

SupSuper posted:

Flash pretty much took off because it could install and update itself with little user input, so Flash content "just worked" off the bat.

Flash took off long before it was self-updating. It was adding capabilities to the web that IE wasn't, during the Pax Microsoftica, and for a while was bundled with both Windows and OS X. It also had authoring tools successfully targeted at designers, which the "open web" still largely lacks. (Do ask those designers how much they liked dealing with Flash versions, though.)

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

Suspicious Dish posted:

Yet those are the languages people use most and might want in the web. Please suggest a language you would prefer.

Me personally? I'd prefer Python, because I'm familiar with its warts whereas Javascript still strikes me as bizarre and horrible every time I touch it. But I'm aware that that's a personal preference rather than an argument in favour of rewriting the world's browsers. ES6 looks like it will improve things a lot, particularly if it's really going to introduce an actual language-level concept of libraries you can import.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply