Better HN
topnewbestaskshowjobs
Log inSign up

FullyFunctional

3,566 karma · joined May 8, 2013 (13y ago) · 1,534 submissions

Submissions

comment 10y ago · link · parent

Tagged add, optionally with overflow trapping, see https://en.wikipedia.org/wiki/SPARC This was inspired by Smalltalk on a RISC and added explicitly for Lisp and Smalltalk. Also in support of this, trapping on unaligned loads.

comment 10y ago · link · parent

It's very easy. Personally, I find Reduceron [0,1] far more interesting.

[0] https://www.cs.york.ac.uk/fp/reduceron/

[1] https://github.com/reduceron/Reduceron

comment 10y ago · link · parent

Ha! I often find myself wishing I had an FPGA. It's very common that I have to control external devices that would be straight forward with logic but requires all soft of hacks and tricks using a microcontroller.

Here's just one simple example: controlling servos. Sure you can do that with most uC simply enough, say using timer interrupts, but what if I need to control 100 of them? In logic, I can just instantiate 100 very trivial pulse controllers where as this typically is impossible with a microcontroller or at the very least leaves no cycles free for any computation.

Another example: you want to implement a nice little crypto, like ChaCha20. Even though ChaCha20 is efficient, it's still a lot of cycles for a microprocessor, where as an FPGA can implement this is a nice pipeline, potentially reaching speeds like 800 MB/s, while still having ample resources left for other work.

I could go on.

comment 10y ago · link · parent

That has no basis in reality. Smalltalk is to implement that one implementation fits in the Smalltalk-80 book.

C got popular because it allowed low-level code to be implemented in something higher-level than assembler and moderately portably too (machines back then where as lot more dissimilar than today). It's hard to disassociate C from Unix, the former making the latter easy to port. A symbiotic relationship.

It's important to remember C was designed for the processors of the time, whereas processors of today (RISC-V included) are arguebly primarily machines to run C. C has brought a lot of good but also a lot of bad that we are still dealing with: unchecked integer overflows, buffer under- and overflow, and more general memory corruption. No ISA since the SPARC even tries to offer support for non-C semantics.

comment 10y ago · link · parent

OMG, verilator where have you been all my life? This makes a HUGE difference. Thanks for the pointer.

EDIT: I should point out that I just tested it on some heavy workloads. One simulation that took 93.8 s only took 1.4 s with verilator.

comment 10y ago · link · parent

Well, I have two (2012 & 2014) and let me tell you: the UI is great; all important touch screen buttons are near one edge of the frame, allowing blind muscle memory to actually work. I really don't care one iota what the color or gradient is. I also have many iDevices and frankly the Tesla UI wouldn't be improved by iOS/CarPlay-style UI.

comment 10y ago · link · parent

Other points:

* "clock-speed" adapts automatically to gate speed, rather than be dictated (which has to be set conservatively),

* allows power savings in multiple ways (no globally propagated screw sensitive clock, finer grained clock gating by construction, and for NCL: wider supply range adaptability)

* the absence of a global clock by definition means less simultaneous switching, which reduces strain on power supplies (decoupling) and gives much better EMI.

comment 10y ago · link · parent

A better link might be http://www.theseusresearch.com/NullConventionLogic.htm

Sutherlands micropipeline and most (all?) the other clock-less approaches, are fundamentally racy and depends on a difficult timing analysis to determine that the latch is slow enough. What makes NCL so interesting IOM is that it is guaranteed to work timing-wise by construction. This also means that it is tolerant to changes in logic time, which means it circuits can tolerate a wider range of voltage swings (= can save power). (The gate construction has to satisfy a trivial timing requirement, but it's local to the gate, not the complete circuit).

The obvious drawback of NCL is that it uses quite a few more transistors than the equivalent circuit in traditional clocked implementation and tooling is weak or non-existing.

Karl and his student Matthew presented "Aristotle – A Logically Determined (Clockless) RISC-V RV32I" at the 2nd RISC-V workshop. Slides & Video: http://riscv.org/2015/07/2nd-risc-v-workshop/ I'm not sure of the status of that.

comment 10y ago · link · parent

In addition to bpicolo's point below, things quickly break down if your commits have file removal or renames. I've gotten bitten more than once and now always resort to git rebase [-i] to avoid this.

comment 10y ago · link · parent

60 kWh was phased out long ago. Minimal is 70 kWh now with 90 kWh being the high end.

comment 10y ago · link · parent

It depends (d'oh) on how much charge you need to fill in and how much you pay for electricity (at time of charging). In my case I carge at work, so $0. Literally. However, my daily commute is about 50 mi. My avg. W/mi is 340, so 17 kWh @ $0.13/ kWh (PG&E, EV-rate), so $2.21 but increase by ? 10% for various efficiency losses.

I'll get solar (PV) eventually though.

comment 10y ago · link · parent

With the risk of going OT, I have an deal old monocrome monitor (Zenith ZVM-121) that died on me shortly after feeding it 220 V @ 60 Hz from a step-up transformer. How does one go about fixing such? Are there any place that will still repair them?

comment 10y ago · link · parent

That is awesome. I can't believe how simple and straight forward that is. I never know you could write TSRs in Turbo Pascal. Imagine for a second pulling off a similar trick today on, let's say, a Mac. Plain hopeless.

comment 10y ago · link · parent

TCP and UDP aren't the perfect solutions [for everything] and there's no shortage of proposed alternatives to TCP; Besides already mentioned QUIC, there's CurveCP (https://curvecp.org/), MinimaLT (https://www.ethos-os.org/), or even more extreme Named Data Networking (http://named-data.net).

For a background on why TCP is this way, look up "The Design Philosophy of the DARPA Internet Protocols", by David D. Clark, however knowing is little comfort.

comment 10y ago · link · parent

Exactly this. I have ~ 35 years of experience, but I'm always trying to keep up with advances in algorithms and data structures. Frameworks and languages is mostly just rearranging and renaming the deck chairs -- there's hardly anything _actually_ new. Taking a positive spin on it, if reintroducing good old concepts as new makes them more adopted, maybe that's a good thing. Most serious people will eventually recognize the precedence and make the link.

comment 10y ago · link · parent

This is the master plan, but replace x86 with RISC-V to make it more efficient. It's impractical for economical reasons to backdoor the FPGA (where's the IO? You don't know.) nor the compiler (Hey, all I see is a netlist, my AI isn't that clever).

comment 10y ago · link · parent

The is interesting and I hope it will get around to all of the modern implementation tweaks.

Hopefully not too off-topic but I would love to learn how we would have implemented a state-of-the-art global interconnect protocol today. There's of course efforts like http://named-data.net but what about the lower levels like about congestion control. Is dropping packages really the best paradigm?

EDIT: to be clear, I mean if starting from scratch in a world where IP never existed (and no backwards compatibility mattered).

comment 10y ago · link · parent

* YARVI https://github.com/tommythorn/yarvi (the oldest non-Berkeley implementation)

* https://github.com/VectorBlox/risc-v

PULPino is sure making a lot of noise, but it's far from the only option out there despite the impression they seem to want to create.

comment 10y ago · link · parent

"Curve25519 was designed to be as fast as possible, with no security compromise. This is both a strength and a potential weakness:

    a strength because it gives a valid argument that no trapdoor was introduced in the design,
    a potential weakness because Curve25519 uses a very specific prime field. As of now, no attack exploiting this specificity is known.
For applications where speed is paramount, Curve25519 is probably the best option. But for most applications, where losing a little on the efficiency side is "not a big deal", Million Dollar Curve is probably the safest choice."

Sorry, no. Many more eyeballs have been on Curve25519 and DJB reputation, both of which gives me _more_ confidence in that than any new alternative.

Secondly, the implementation is as important as the design. Again, Curve25519 have vetted implementations, something which takes time.

Finally, the notion that speed is a liability is ludicrous. The lack of speed is a major liability.

Move along, nothing to see here.

comment 10y ago · link · parent

One reason is that you generally perform scrubbing, thus you are potentially rewriting data which would otherwise be at rest. If your memory is bad, this could replace good data with bad. FS that doesn't scrub doesn't have this issue.

comment 10y ago · link · parent

The difference between hardware and software is getting fuzzy (Transmeta, NVIDIA Denver, ...), but there's at least one (admittedly terrible) FPGA implementation of a subset of MMIX large enough to execute small graphical demos: https://github.com/tommythorn/fpgammix

comment 10y ago · link · parent

Preserves the permission, user, group, time-stamps, and complete original name and path. Granted, there's a small overlap with what gzip also provides, but a tar file is as close to the original as you generally gets. Oh, and exotic: support for sparse files (if enabled).

comment 10y ago · link · parent

Lots of us Linux people don't like Zip, so?

To point out the obvious, Zip compresses files individually and then bundles them. A .tar.{Z,gz,bz2,xz,...} files bundles the files and then compresses them. The latter is better for entropy reduction, the former is better for random access. It all depends on your objectives.

comment 10y ago · link · parent

Factually false. I know people who lost money on ESP, granted it's rare. There is a non-zero delay between determining purchase price and when you can actually sell it. Stocks can and have fallen more than 15% in this window.

comment 10y ago · link · parent

Careful. Wars have been fought over this. The letter 'æ' in danish is a proper letter of the alphabet (in the 27th position) whereas the same symbol in French represents 'a' and 'e' joined together. Much fun.

comment 10y ago · link · parent

I've heard this unsubstantiated claim for years now. It certainly depends on your metric. LLVM still lacks behind in generated code quality on most mainstream platforms [my own unpublished benchmarks]. LLVM appears to attract more mind-share from people leveraging the infrastructure, including writing new front- and back-ends; I'm guessing the code is easier to understand and better documented.

A few years ago I had expected LLVM to have caught up to GCC by now, but I hadn't anticipated the accelerated pace of GCC improvements. I don't know if the competition from LLVM had anything to do with this, but GCC is showing no signs of slowing down.

comment 10y ago · link · parent

The iPhone and Android app has been out for many years. It currently relies on a password (1FA), but I haven't heard about it being exploited.

comment 10y ago · link · parent

This is getting off-topic, but ARMs success had nothing to do with RISC vs. CISC. It was that _Alpha_ engineers took their skill to the ARM ISA (which at the time had only very weak implementations). They created StrongARM which made people sit up and take notice. Intel ironically inherited the technology and continued developing it under the XScale name. So, yes, Intel in part created their own ARM problem.

I feel I have to repeat again that none of this had to do with RISC vs. CISC. It had to do with implementation and market muscle.

"Alphas relied primarily on clock frequency to achieve their performance, and were very power-hungry as a result"

So was the P4 and it failed, but Intel had enough capital to take a power efficiency clue from Transmeta and turn the ship 180 degrees.

What killed the Alpha was three things: delays in getting the new models out, the cost of staying in this game, and of course, the arrival of Itanic.

EDIT: An aside: the 64-bit extension of ARM is a completely new and different ISA called AArch64 which incidentally is a lot more RISC-like than the original ARM. IOW, it looks like the ARM designers disagree with you.

comment 10y ago · link · parent

"Eventually, your Tesla will be able to drive anywhere across the country to meet you, charging itself along the way."

In there lies perhaps a hint at a business opportunity/solution to the renter problem: Tesla charging garages and comes to pick you up when you are ready to go.

We certainly live in a Sci-fi movie.

comment 10y ago · link · parent

Market success != technical merit. However, if you're willing to consider ARM a RISC (well, almost) then there's your market success. Alpha completely dominated the performance segment for years, but they fell behind for reasons that has nothing to do with CISC vs. RISC. At the time, x86 compatibility mattered more than it does today.

For people designing their own cores for whatever reason (there can be many, research and commercial), RISC-V is very attractive because of all the reasons already given, but it's obviously not the only option.

RISC-V is carefully designed compromise; it scales down to extremely cheap cores and up to superscalar. Like Alpha before it, extreme attention has been paid to avoid features/choices that would be bad for OoOE implementations. Some examples:

- rs1, rs2, rd fields are always in the same location and all register sources and destinations are explicit (makes decoding faster and you can start fetching/renaming without having decoded)

- there are no branch delay slots

- instructions produce at most a single result

- no condition codes etc (dependencies are explicit)

- the sign-bit for all immediate fields is in a fixed location (cheaper sign-extension)

and so forth.

I'm also a big fan of the conditional branch instruction which unlike the Alpha can compare two registers.

1
474849
52