Earlier quoted context omitted.
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.
ARM chips have an instruction with JavaScript in the name
251–260 of 312 posts
Re: ARM chips have an instruction with JavaScript in the name
#252Earlier quoted context omitted.
Are you saying you'd like to have specific int32, int64, float32, float64 types?
Strong typing and static typing - yes please.
It has the advantage that it is possible to give a reasonable type to most functions without a rewrite (even if the types would be terribly long to accommodate the weak underlying type system)
Re: ARM chips have an instruction with JavaScript in the name
#253Earlier quoted context omitted.
Not surprising to me to see CPU instructions being added for widely used use cases. Basically, a CPU instruction set maker's job is to perform clustering of the tasks that the CPUs do and accelerate commonly used tasks. If people do a lot of AES, the instruction set maker adds AES extensions. If people do a lot of CRC, they add CRC instructions. If people convert doubles to integers all day in a very JS specific way,…
Can you name any other instructions with the name of a programming language in the actual instruction name? No? Then it seems way more specific than the other examples you listed. So specific that it’s only applicable to a single language and that language is in the instruction name. That’s surprising, like finding an instruction called “python GIL release”.
The Javascript spec decided to standardize float operations and (in part) opted for whatever x86 did. ARM had different floating point profiles so ARM processors had to emulate in software intel's operations. Thus ARM decided to simply implement intel's operation as an instruction and called it by the relevant use case.
Re: ARM chips have an instruction with JavaScript in the name
#254Earlier quoted context omitted.
According to this bug it was shipped six months after the bug was created and they didn't seem super familiar with it.
It was public knowledge that Apple had a shipped implementation using this instruction before that patch was merged. https://news.ycombinator.com/item?id=18163433 I also don't really see any indication that the project maintainers don't know about the instruction. Looks like an example of JSC not being developed in the open more than anything else.
Re: ARM chips have an instruction with JavaScript in the name
#255Earlier quoted context omitted.
> in Itanium's case at least partially because it was hard to write compilers good enough to exploit its VLIW design This is half true. The other half is that OOO execution does all the pipelining a "good enough" compiler would do, except that dynamically at runtime, benefiting from just in time profiling information. Way back in the day OOO was considered too expensive, nowadays everybody uses it.
AIUI it's not pipelining but executing out of order is where the big win comes from, it allows some hiding of eg. memory fetch latency. Since data may or may not be in cache, it's apparently impossible for the compiler to know this so it has to be done dynamically (but I disclaim being any kind of expert in this).
Re: ARM chips have an instruction with JavaScript in the name
#256Earlier quoted context omitted.
> Interesting. So it's as much an x86 legacy issue as JS and presumably JS followed x86 because it was more efficient to do so (or maybe by default). Most languages don't start with a spec, so the semantics of a lot of these get later specced as "uhhhhh whatever the C compiler did by default on the systems we initially built this on".
Your comment made me realize this is true now. Through the 80s it was the other way around. You counted as having a language with a spec, even if there was no implementation, but an implementation without a spec was a "toy"
Not to my recollection. I don’t recall anyone at uni discussing a C standard until 1989, and even by 2000 few compilers were fully compliant with that C89 spec.
There were so many incompatible dialects of FORTRAN 77 that most code had to be modified at least a bit for a new compiler or hardware platform.
All of the BASIC and Pascal variants were incompatible with each other. They were defined by “what this implementation does” and not a formal specification.
Re: ARM chips have an instruction with JavaScript in the name
#257Earlier 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?
It was the point at, say, the original ARMv1.
Re: ARM chips have an instruction with JavaScript in the name
#258Unless 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)
To understand RISC, ignore the acronym it stands for, instead just think fixed-instruction, load-store architecture. That's what RISC really means today. No variable-length instructions. No arithmetic instructions that can take memory operands, shift them, and update their address at the same time.
> No variable-length instructions.
So, ARM is not a RISC instruction set, because T32 (Thumb-2) instruction can be 2 or 4 bytes long.
Similarly, RISC-V has variable-length instructions for extensibility. See p. 8ff of https://github.com/riscv/riscv-isa-manual/releases/download/... (section "Expanded Instruction-Length Encoding").
Re: ARM chips have an instruction with JavaScript in the name
#259Earlier quoted context omitted.
Many of the gotchas wouldn't ever show up if only people committed to writing JS as sensibly as they write their programs in other languages when they're being forced to do things a certain way. But when it comes to JS and even other dynamic languages, people for some reason absolutely lose their minds, like a teenager whose parents are going out of town and are leaving them home by themselves overnight for the first…
That is simply not true, io language is prototype based yet it is simple to reason about, fix for JavaScript: Object = Object.prototype Function = Function.prototype That's how most dynamic languages work, no need for explanations, obvious assertions: Object.__proto__ === null Function.__proto__ === Object object = new Object.constructor object.__proto__ === Object object.constructor === Object.constructor object.toS…
None of this crazy reflective, meta-level programming belongs in the LOB application logic of any program. Save it for your programmer workspace/REPL environment--which is something that 90+% of JS programmers aren't using anyway. They're all editing "dead" files in Visual Studio Code and SublimeText.
> Object.constructor.__proto__.constructor === Function.constructor // Object instanceof Object
... and that's not even what instanceof means.
Re: ARM chips have an instruction with JavaScript in the name
#260Earlier quoted context omitted.
It was public knowledge that Apple had a shipped implementation using this instruction before that patch was merged. https://news.ycombinator.com/item?id=18163433 I also don't really see any indication that the project maintainers don't know about the instruction. Looks like an example of JSC not being developed in the open more than anything else.
are you referring to the tweet linked there? That tweet is wrong in a lot of ways, because that instruction gives you a 1-2% boost, not a 30% boost like they claimed.
Can you give an example of something the maintainers said that made them seem "not super familiar with it"?