News for hackers. Stuff that matters.
Re:Jaspy – A Python VM written in JavaScript by thegigaraptor on Saturday April 16, 2016 @01:53PM (#11511552)
I wish people would take time to actually learn javascript. I used to see it as a shitty toy language up until 2012. It opened me up to a completely different style of programming.
Re:Jaspy – A Python VM written in JavaScript by awinter-py on Saturday April 16, 2016 @02:13PM (#11511635)
I saw it as a shitty language until I worked with it full time in 2016 after which I forgot all about clunky syntax and focused on the too-small standard library and web standards nuttiness.
Re:Jaspy – A Python VM written in JavaScript by gaze on Saturday April 16, 2016 @02:16PM (#11511646)
Don't forget the confusing ADHD garbage tooling!
Re:Jaspy – A Python VM written in JavaScript by rubber_duck on Saturday April 16, 2016 @03:51PM (#11511985)
I feel like TypeScript could make JS a decent language if Microsoft starts going more ambitious with it - they really need to do a Dart style integration - official package manager, build system, full es5 transpiler, std lib polyfill included.

So far they have been conservative and focused only on typing but they could offer insane value if they started offering a full language expirience like Dart

Re:Jaspy – A Python VM written in JavaScript by ludamad on Saturday April 16, 2016 @06:24PM (#11512545)
It's an excellent tool. It does make JS a decent language.

A package manager is not necessary, it can work with npm.

A build system is not necessary, existing build systems support it.

I believe they will eventually do full polyfill. However, the compiler is very high quality and that doesn't happen by accident. They have to make hard design decisions to keep releasing features so regularly (they release features faster than I can keep up with sometimes).

For now, you can target es6 and chain with babel.

Re:Jaspy – A Python VM written in JavaScript by mattmanser on Saturday April 16, 2016 @08:53PM (#11513005)
It's better than javascript but it's still poor. You still run into wierd this scoping issues, the JS it actually produces is pretty fugly, there's still no standard libraries like decent languages have, every property accessor has to be prefixed with 'this.', etc. etc.

And, ultimately, your code still ends up being a load of garbage boilerplate code like you're writing oldschool Java from the early 2000s.

It's a nasty language written on top of a nastier one, lipstick on a pig.

Re:Jaspy – A Python VM written in JavaScript by ludamad on Saturday April 16, 2016 @09:02PM (#11513022)
The extent to which all your points matter really depends, but I find myself able to use types just for some logic, and code in a functional style far removed from oldschool Java with lots of destructuring / structuring. I'm not denying it's a lipstick pig, but the improving-JavaScript situation is what it is, and it does a good job at doing it in an unopinionated way (which is why it's succeeding)
Re:Jaspy – A Python VM written in JavaScript by mattmanser on Sunday April 17, 2016 @08:26AM (#11514291)
It all matters a lot. There are great languages available today and typescript isn't one of them. Why should we be forced to choose sub par languages?

I don't see it as a long term solution. It's just the next coffeescript. It's part of the problem rather than a solution, the problem being the massive churn in the JS ecosystem as we desperately hunt for a way of writing JS code that isn't awful.

The actual solution is to give us other languages in the browser. We need Python or Ruby or Go or C# or PHP or whatever. We need real choice, not javascript 2.0.

If Firefox wanted to stay relevant today it could stop dogmatically promoting a broken language and that's what they'd be working on right now. They're too rigidly fixated on the past though.

Re:Jaspy – A Python VM written in JavaScript by gaze on Sunday April 17, 2016 @05:35PM (#11516430)
How did PHP end up in that list?
Re:Jaspy – A Python VM written in JavaScript by rubber_duck on Sunday April 17, 2016 @12:43PM (#11515158)
>A package manager is not necessary, it can work with npm.

It can work with NPM - but what about bower, JSPM, whatever else hipster package manager everyone else uses ?

It should specify TS supports NPM by default and it's the official package manager - you can use others at your own risk. Ditto for build system.

Saying you can target ES6 with babel is completely missing my point - Dart developer experience is much much better than TS simply because it does all of these things - out of the box and without any decisions/interventions/ridiculously complicated build setups and dependency chains

Re:Jaspy – A Python VM written in JavaScript by gedrap on Saturday April 16, 2016 @02:10PM (#11511620)
I totally agree about actually learning javascript. While the opinion about the language itself is arguable, it's not 2006 anymore. Plain simple JS can get a lot of stuff done nowadays and there's no point to include the whole jquery to hide a dom element or make an ajax request. In addition, understanding the underlying language opens up a lot of doors, compared to just gluing frameworks and jquery extensions together.
Re:Jaspy – A Python VM written in JavaScript by xaduha on Saturday April 16, 2016 @02:44PM (#11511747)
> It opened me up to a completely different style of programming.

What style would that be? JS is a dynamic language, but as dynamic languages go it isn't the first and it is certainly not the best. What is has going for it is near monopoly in browser space and a ton of optimization.

Re:Jaspy – A Python VM written in JavaScript by 9912831 on Saturday April 16, 2016 @03:21PM (#11511881)
I suspect functional programming. I don't like Javascript, but getting away from the typical OO garbage is a plus.

Of course I'd prefer Haskell, but if one can earn money with JS...

Re:Jaspy – A Python VM written in JavaScript by xaduha on Saturday April 16, 2016 @03:43PM (#11511950)
JS engines in browsers should evolve to more general VMs, for which you can implement/port other languages. Hopefully WebAssembly is a start of that. That is the proper way, not writing it in JS with caveats such as

> Speed is explicitly not a main goal of this project.

Re:Jaspy – A Python VM written in JavaScript by koehlma on Saturday April 16, 2016 @04:22PM (#11512109)
I totally agree with that. Actually that's the reason why speed is not a main goal and it is more about the style of programming and exploring new ways. The long term goal is to use new upcoming technologies to implement it in a faster way although.