Live data from Hacker News

ARM chips have an instruction with JavaScript in the name

stackoverflow.com

241–250 of 312 posts

Re: ARM chips have an instruction with JavaScript in the name

#241
post #209
post #177

Earlier quoted context omitted.

Would you say the same if the language was c or c++? Yes this is necessitated by some of JS's big warts, but the sheer amount of javascript in existence weights heavily when considering the trade-offs. You cannot ignore HTML/JS if you're targeting UI applications - it is table stakes.

Yeah, but isn't the whole point of ARM to be a reduced instruction set? How reduced are we, really, if we're dedicating transistors to the quirks of a single language?

Yeah, the problem is not that it's javascript per se, it's that it's a quirk. FCVTZS would have been just fine.

Re: ARM chips have an instruction with JavaScript in the name

#242

Earlier quoted context omitted.

Normally JS devs don't really encounter these notorious problems, for many years now.

You sound like a complete novice, funboy or the one who knows only JS. There are many issues, it is possible not to touch or to work around them, TS and flow helps. JS solved just a few — 'use strict', strict comparison, arrow functions, string literals. Core problems still there — implicit types, prototype declarations, number is float, toString/inspect division, typeof null. Every javascript programmer has to walk…

Lol.

I've been programming for a decade in many languages including assembly, C#, Rust, Lisp, Prolog, F# and more, focusing on JS in the last 5 years.

Virtually no one writes plain JavaScript, most people including me write TypeScript, but Babel with extensions is normally used. Your reply exhibits your ignorance of the JS world.

Re: ARM chips have an instruction with JavaScript in the name

#243

Earlier quoted context omitted.

You sound like a complete novice, funboy or the one who knows only JS. There are many issues, it is possible not to touch or to work around them, TS and flow helps. JS solved just a few — 'use strict', strict comparison, arrow functions, string literals. Core problems still there — implicit types, prototype declarations, number is float, toString/inspect division, typeof null. Every javascript programmer has to walk…

Lol. I've been programming for a decade in many languages including assembly, C#, Rust, Lisp, Prolog, F# and more, focusing on JS in the last 5 years. Virtually no one writes plain JavaScript, most people including me write TypeScript, but Babel with extensions is normally used. Your reply exhibits your ignorance of the JS world.

I occasionally write JavaScript since 2007, experiment a lot last 5 years, red through ES5 specification several times. I've worked as C++, PHP, Python, Ruby developer. Experimented with a few languages.

"JS" instead of "TypeScript" brings confusion. TS solves some issues and I've mentioned it, still

    typeof null
    //"object"
Template literals interpolation helps but if string (not literal string) slips by it is a mess

    1 - "2"
    //-1
    1 + "2"
    //"12"
Check out another comment [1], Object, Function, etc defined as constructor. It is not solved by "class", it is still a function with a bit of sugar:

    class Foo {}
    Foo instanceof Function
    //true
Globals with a few exceptions defined as constructors, DOM elements defined as constructors, inheritance defined as constructors

    class Bar extends Foo {}
You can internalize how it works and there are some good explanations [2] but design is error prone and terrible.

[1] https://news.ycombinator.com/item?id=24815922

[2] https://yehudakatz.com/2011/08/12/understanding-prototypes-i...

Re: ARM chips have an instruction with JavaScript in the name

#244

Earlier quoted context omitted.

Lol. I've been programming for a decade in many languages including assembly, C#, Rust, Lisp, Prolog, F# and more, focusing on JS in the last 5 years. Virtually no one writes plain JavaScript, most people including me write TypeScript, but Babel with extensions is normally used. Your reply exhibits your ignorance of the JS world.

I occasionally write JavaScript since 2007, experiment a lot last 5 years, red through ES5 specification several times. I've worked as C++, PHP, Python, Ruby developer. Experimented with a few languages. "JS" instead of "TypeScript" brings confusion. TS solves some issues and I've mentioned it, still typeof null //"object" Template literals interpolation helps but if string (not literal string) slips by it is a mess…

The same thing. I work in the JS world, and interact with it nonstop.

Re: ARM chips have an instruction with JavaScript in the name

#245

Earlier quoted context omitted.

I occasionally write JavaScript since 2007, experiment a lot last 5 years, red through ES5 specification several times. I've worked as C++, PHP, Python, Ruby developer. Experimented with a few languages. "JS" instead of "TypeScript" brings confusion. TS solves some issues and I've mentioned it, still typeof null //"object" Template literals interpolation helps but if string (not literal string) slips by it is a mess…

The same thing. I work in the JS world, and interact with it nonstop.

Oh, JS has no issues, solved by ClojureScript, PureScript, Elm.

Re: ARM chips have an instruction with JavaScript in the name

#246

Earlier quoted context omitted.

RISC is a misleading name, the concepts of its design are not really based around the idea of a "Reduced Instruction Set" as in "small" per se, nor are CISC machines necessarily a large size instruction set. It is much more about the design of the instructions, generally RISC instructions take a small, fixed amount of time and conceptually are based on a sort of minimum unit of processing, with a weak to very weak me…

when the concerned ARM instruction is doing something perfectly capable by the software to just score 1-2% performance improvements, it is definitely CISC based on the definitions you listed above.

This Javascript related instruction is complex in terms of a bitwise operator on a single value, however complex it is still a simple operation; CISC-ness generally relates more to accessing memory or interacting with the hardware in complex ways.

From the definition given:

CISC designs on the other hand happily encode large, arbitrarily complex operations that take unbounded amounts of time, and have very strong memory models

Re: ARM chips have an instruction with JavaScript in the name

#247

Earlier quoted context omitted.

The same thing. I work in the JS world, and interact with it nonstop.

Oh, JS has no issues, solved by ClojureScript, PureScript, Elm.

These languages are not used by virtually all JS programmers. Babel and TS is.

The other issues you mention are solved by using ESLint which flags code like this.

I do not encounter these issues in my life as a professional JS programmer, neither do my colleagues; and I'm not on my first project, don't worry. For all practical purposes they are non-existent.

anyways, we are all happy for wasm, it's not that we love JS so much.

Re: ARM chips have an instruction with JavaScript in the name

#248

Earlier quoted context omitted.

maybe this will lead to the revival of Transmeta-like architectures? I always had a soft spot for reprogrammable microcode.

WASM is _designed_ to be easily jitted, without the expensive machinery we had to put in place to do this for x86, so the whole point is not require a new architecture. Because of this I find WASM to be the best direction yet for a "universal ISA" as it's very feasible to translate to most strange new radical architecture (like EDGE, Prodigy, etc). (Introducing a new ISA is almost impossible due to the cost of portin…

"WASM is _designed_ to be easily jitted, without the expensive machinery we had to put in place to do this for x86"

I'm not sure this is actually true, given that the original intent was for WASM to be easy to compile using existing JS infrastructure, not in general. So given that, it would make sense to carry over JS fp->int semantics into WASM. WASM is in effect a successor to asm.js.

It's certainly also not too hard to compile/jit for new architectures, but that was not the initial intent or what guided the early/mid-stage design process.

If you examine the current WASM spec, it doesn't appear to specify semantics at all for trunc. I would expect it inherits the exact behavior from JS.

Re: ARM chips have an instruction with JavaScript in the name

#249

Earlier quoted context omitted.

Oh, JS has no issues, solved by ClojureScript, PureScript, Elm.

These languages are not used by virtually all JS programmers. Babel and TS is. The other issues you mention are solved by using ESLint which flags code like this. I do not encounter these issues in my life as a professional JS programmer, neither do my colleagues; and I'm not on my first project, don't worry. For all practical purposes they are non-existent. anyways, we are all happy for wasm, it's not that we love J…

I actually like JavaScript, with a few changes it can become a good language, safe for a novice programmer.

Re: ARM chips have an instruction with JavaScript in the name

#250
post #2

Unless I misread the current arm docs, I don't think this is still present in the ISA as of 2020? The whole RISC/CISC thing is long dead anyway, so I don't really mind having something like this on my CPU. Bring on the mill (I don't think it'll set the world on fire if they ever make it to real silicon but it's truly different)

What does it mean for the RISC/CISC thing to be dead? The distinction between them is more blurred than it used to be?

You can't understand the RISC/CISC "debate" until you spend a few minutes skimming through the IBM 360 mainframe instruction set.

:)

Post reply on HN