3,566 karma · joined May 8, 2013 (13y ago) · 1,534 submissions
comment 6y ago · link · parent
- tail recursion elimination. There's a draft proposal but only one engine implements it at the moment which is blocking further progress.
- RISC-V backend for Cranelift (TBH, I'm sure someone will do it eventually).
comment 6y ago · link · parent
- RISC-V is a large family of ISAs, though Unix platform targets a much narrower definition, the RV64GC. The "Feature table" lists FP and SIMD as "in extension" but doesn't do the same for Memory layout and protection. It's seems inconceivable to me that you would use paging in a WASM-replacement context. Same for instruction length, two-byte instruction depends on the "C" extension.
- There is nothing that prevents RISC-V in the browser from denying the ability to generate code on the fly. Just like, say iOS, it could run in a "W^X" model, that is, writable memory cannot be executed from.
- atomics, again, are part of an extension, the "A" extension. They do not have to be included, and do not make sense IMO in a single-threaded WASM replacement context.
All that said, WASM is well designed. The structured control flow is a bit painful for some producers and the lack of tail recursion elimination is criminal, but running running/JITting RISC-V in the browser would almost certainly add more overhead.
comment 6y ago · link · parent
ADD: a few of the reasons:
- When JITing RISC-V you cannot tell which are the last use of registers without a very expensive whole-graph analysis. Without that, you will have to generate more code than necessary.
- WASM's representation is very close to what you want in the compiler. In particular, you can directly tell all incoming control-flow edges, which makes analysis much more precise, gives optimization opportunities you would otherwise miss. Recreating this information from a binary is either impossible (due to computed branches) or expensive both in terms of analysis and the guards you have to generate to protect your assumptions.
comment 6y ago · link · parent
Of note, if various online resources are to be believed, you can't just hack and extend the battery capacity for longer run-times as they likely aren't rated for the corresponding higher thermal load.
comment 6y ago · link · parent
I'm not sure what you mean by "most of these Tweets"; I'm reporting on my experience living in Silicon Valley, California, where power goes out a couple of times a month on avg.
I have all servers etc on UPSes but wish I could find bigger UPSes as most can only hold up about 1 hour which often isn't enough.
comment 6y ago · link · parent
Just reporting facts.
comment 6y ago · link · parent
EDIT: clarified that "it" is the logic approach, not the end product.
comment 6y ago · link · parent
Somewhat off topic, but you have written about four-phase logic and AL1 in particular (eg. http://www.righto.com/2015/05/the-texas-instruments-tmx-1795...) but I have yet to see a similar deep treatment of it. How did the technology compare and why didn't it get more attention?
comment 6y ago · link · parent
I'm puzzled about his Rust remark; if it's an RV32 then Rust already supports nostd on riscv32i-unknown-none-elf, riscv32imac-unknown-none-elf, and riscv32imc-unknown-none-elf.
comment 6y ago · link · parent
comment 6y ago · link · parent
EDIT: added slightly. For all the OS calls which are 100% native, it wouldn’t matter.
comment 6y ago · link · parent
In the case of my MIL, the biopsy first came back as a fungus which we _now_ know was an impossibility.
Like so many other commenters, I had my scheduled colonoscopy and it was a walk in the part except drinking that horribly disgusting prep liquid. That was gross, but I've probably had worse in my young and very stupid years.
803.
Atkinson Hyperlegible Font(brailleinstitute.org ↗)
1 points · by FullyFunctional · 6y ago · 3 comments
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
* discovering which instructions are executed (tracking control flow),
* mapping x86 code addresses to translated addresses,
* discovering the shape of the CFG and finding loops,
* purging translations that get invalidated by overwrites (like self-modifying code),
* sprinkling the translated code full of guards so we can make assumptions about the original code
etc. All this is unnecessary for WASM and you can in fact make a quick and dirty one-pass translation for the 1st gear. I don't know, but it seems reasonable that they would keep the same FP->Int semantics as JS, but you rarely do that in non-JS code.EDIT: fail to make bullets, oh well.
comment 6y ago · link · parent
I have mused about a related question since I got my first computer eons ago. It had only a machine code monitor (yes, a though start to learning what a computer was). It does seem some kind of Forth might have been the good first step on the path to high-level languages (like https://github.com/uho/preForth) but it's sure not the only way.