Hacker Newsnew | past | comments | ask | show | jobs | submit | xenadu02's commentslogin

If you happen to know... what was the reasoning behind the oddball stack architecture? It feels like Intel must have had this already designed for some other purpose so they tossed it in. I can't imagine why anyone would think this arch was a good idea.

Then again... they did try to force VLIW and APX on us so Intel has a history of "interesting" ideas about processor design.

edit: You addressed it in the article and I guess that's probably the reason but for real... what a ridiculous hand-wavy thing to do. Just assume it will be fine? If the anecdotes about Itanium/VLIW are true they committed the same sin on that project: some simulations with 50 instructions were the (claimed) basis for that fiasco. Methinks cutting AMD out of the market might have been the real reason but I have no proof for that.


Stack-based architectures have an appeal, especially for mathematics. (Think of the HP calculator.) And the explanation that they didn't have enough instruction bits also makes sense. (The co-processor uses 8086 "ESCAPE" instructions, but 5 bits get used up by the ESCAPE itself.) I think that the 8087's stack could have been implemented a lot better, but even so, there's probably a reason that hardly any other systems use a stack-based architecture. And the introduction of out-of-order execution made stacks even less practical.


To expand on this a little bit more:

x86 has a general pattern of encoding operands, the ModR/M byte(s), which gives you either two register operands, or a register and a memory operand. Intel also did this trick that uses one of the register operand for extra opcode bits, at the cost of sacrificing one of the operands.

There are 8 escape opcodes, and all of them have a ModR/M byte trailing it. If you use two-address instructions, that gives you just 8 instructions you can implement... not enough to do anything useful! But if you're happy with one-address instructions, you get 64 instructions with a register operand and 64 instructions with a memory operand.

A stack itself is pretty easy to compile for, until you have to spill a register because there's too many live variables on the stack. Then the spill logic becomes a nightmare. My guess is that the designers were thinking along these lines--organizing the registers in the stack is an efficient way to use the encoding space, and a fairly natural way to write expressions--and didn't have the expertise or the communication to realize that the design came with some edge cases that were painfully sharp to deal with.


> there's probably a reason that hardly any other systems use a stack-based architecture

I don't know about other backend guys, but I disliked the stack architecture because it just incompatible with enregistering variables, register allocation by live range analysis, common subexpression elimination, etc.


There are software workarounds for some of those and very simple hardware workarounds for the others. In a stack-based architecture there should also be some directly-addressable registers for storing long-lived temporary variables. Most stack-based architectures included some set of stack shuffling operations that solved the problem of common subexpression elimination.

The real disadvantage is that the stack operations share the output operand, which introduces a resource dependency between otherwise independent operations, which prevents their concurrent execution.

There are hardware workarounds even for this, but the hardware would become much more complex, which is unlikely to be worthwhile.


The main influencer of the 8087 architecture, William Kahan, had previously worked on the firmware of the HP scientific calculators, so he was well experienced in implementing numeric algorithms by using stacks.

When writing in assembly language, the stack architecture is very convenient and it minimizes the program size. That is why most virtual machines used for implementing interpreters for programming languages have been stack-based.

The only real disadvantage of the stack architecture is that it prevents the concurrent execution of operations, because all operations have a resource dependency by sharing the stack as output location.

At the time when 8087 was designed, the possibility of implementing parallel execution of instructions in hardware was still very far in the future, so this disadvantage was dismissed.

Replacing the stack by individually addressable registers is not the only possible method for enabling concurrent execution of instructions. There are 2 alternatives that can continue to use a stack architecture.

One can have multiple operand stacks and each instruction must contain a stack number. Then the compiler assigns each chain of dependent operations to one stack and the CPU can execute in parallel as many independent chains of dependent instructions as there are stacks.

The other variant is to also have multiple operand stacks but to have the same instruction set with only one implicit stack, while implementing simultaneous multi-threading (SMT). Then each hardware thread uses its own stack while sharing the parallel execution units and then one can execute in parallel as many instructions as there are threads. For this variant one would need to have much more threads than in a CPU with registers, which combines superscalar execution with SMT, so one would need 8 or more SMT threads to be competitive.


This is best practice for anyone who uses three phase power.

A machine shop should connect 1/3 of their lights to each phase so it is immediately obvious if a phase gets dropped. Lots of equipment will suffer on two of three phases but with lower performance or even damage.


> This is best practice for anyone who uses three phase power.

No, it’s not. It’s a neat trick that visually reveals when the utility drops a phase, but there are better ways to handle avoiding equipment damage.

Best practice is to use phase monitoring relays that can de-energize a motor when a phase is dropped/reversed to prevent damage. The trip time is adjustable and it’s more reliable than manually hitting an e-stop. It also won’t let a motor with incorrect phasing start up either. You see phase loss relays on a lot of compressor motors and other large motors.

Here’s a flyer for an Eaton product: https://www.eaton.com/content/dam/eaton/products/industrialc...


I was told that you want lights on all 3 phases so that you can see spinning things spin. If the lights are on single phase, they will dim 120 times a second, and the strobe effect can cause spinning things to appear stationary. With 3 phase, at least 1/3 of the lights are lit all the time.


That's a valid reason too. In an industrial environment full of rotating machines, thinking something is stationary because it's on the grid's natural frequency can be lethal.

It's way less of a problem with modern machinery, and leds will blink in uncorrelated phases in a frequency that is different from the grid's anyway.


For residential lighting running off a single-phase supply, there are some annoying LED bulbs with simple half-wave rectification that strobe at the grid frequency with less than a 50% duty cycle (often seen with bulbs emulating vintage exposed-filament bulbs with no frosted glass). It would be interesting to see how much less annoying that kind of flicker is when you have a three-phase supply to a light fixture, so that at least one set of LEDs was illuminated at all times.


There are no light fixtures that use three-phase power. At least that’s my belief, as I’ve never heard of one or seen one and I’ve been working in the electrical industry for almost a decade. You could theoretically arrange three lampholders like a delta or wye transformer [0] and connect a phase to each one and all three lamps will be lit, but the lampholders will be energized, so make sure to wear voltage-rated gloves when changing out the lamps ;) This is how three-phase resistive heaters are wired, the drop in ampacity and large resistive heating loads make it worth using three phase since ampacity is 1.73 times lower than it would be on a three-phase circuit than it would be at the same voltage as a single-phase circuit.

In the US, there are 208V single-phase and 480V single-phase lights that use two of the three phases. In practice, indoor lighting is either 277V (line to neutral on a 480V service) or 120V (line to neutral on a 208V service). Most commercial LED fixtures can use any voltage between 120V to 277V single-phase.

480V single phase is used for some pole lighting with long runs of conductors to handle voltage drop. Anything over 277V has to be elevated at least 22 feet off the ground per the NEC.

[0] https://en.wikipedia.org/wiki/Delta–wye_transformer


Back in the analog TV days, I could see the flicker on the 50hz PAL/SECAM signals whenever I visited Europe, especially when the screen was white and in my peripheral vision. I always wondered why it didn't drive everybody nuts, but then I got used to it. I did always wonder if there was a way they could have eliminated that (maybe they did in more expensive TVs that fired off at double the reference signal and not in cheap TVs in hotels/bars?).


The 100 Hz TVs weren’t that common and had other issues. They weren’t strictly superior. TVs were supposed to use a different set of phosphors for 50 Hz that were less flickery at 60 Hz but in practice I don’t know if tube producers bothered to have different sets for the different markets.


simple answer is grid frequency in europe is 50hz, in the US and Canada it's 60hz.

Early TV's synchronised to the grid frequency (and drew the entire screen on each cycle) - also remember TV's where analogue to start with (and operated at large voltages/transformers) so if they didn't sync with the grid electrical noise becomes a big problem with the power supply.

In monitor terms it reduced jitter.


Yeah, I knew why. :-)

My brain immediately went into "solving" mode, though.


How did that work, do you suppose?

How does one connect a lamp to 3-phase power?

Are/were there 3-phase fluorescent tubes available?

Or are we relying on the spinny-thing that is to be observed to somehow be illuminated by all three phases, with three lamps or fixtures, simultaneously? Without such malarcky as shadows or inverse-square to muddy our vision?

Or maybe a multiplicity of single fixtures with 3 tubes -- one tube per each phase?

And even then: Doesn't it still strobe somewhat at (50*3*2)=300 or (60*3*2)=360Hz, instead of the 100- or 120-Hz that a shop lit by a single phase might provide?

(LEDs are out-of-scope of this question, of course: Line-voltage LED lamps can have integrated electronics and can therefore have diode elements that are driven by things that approach [or even achieve] DC, which changes the rules.

And, of course: Incandescent lamps have enough persistence that stroboscopic effects are generally not an issue with a human eye.)


> How does one connect a lamp to 3-phase power?

You typically connect 1/3 of lamps on one phase, one third on another and so on.

In the UK we use a 230V single phase system for most things (industrial/commercial often use 400V) (if all three phases are in use it's 400V - you may see it as 415V but we harmonised with Europe to 400V) so lighting expects that 230V anyway, you still have a common ground, you just run the live for each phase to the lamp/light.

Power delivery to homes is in effect a single phase out of a three phase supply with each house (often but not always) wired in sequence, so house 1 is Phase 1, house 2 is Phase 2, house 3 is Phase 3, house 4 is phase 1 and repeat.

We have standard colors for this as well (as do most jurisdictions), neutral is always blue but the phases are Brown, Black and Grey

When I trained as an industrial electrician they where different colors, they changed in 2006 so that just makes me feel old (used to be Red, Yellow, Blue with Black for Neutral).


> We have standard colors for this as well (as do most jurisdictions), neutral is always blue but the phases are Brown, Black and Grey

Never even thought about the fact that different regions may have different colour standards. This explains some of the power cables I've torn apart over the years and the strange colours I found inside!

> When I trained as an industrial electrician they where different colors, they changed in 2006 so that just makes me feel old (used to be Red, Yellow, Blue with Black for Neutral).

Making a mental note of that one... a black neutral would be a nasty surprise coming from North America.


Indeed, half my house is blue/brown, the other half is black/red since reg changes where grandfathered in and the wiring has been added to (some places clearly by a knowledgeable individual others..not so much).

I spent the first day after we bought it and moved in going around with a screw driver, side cutters a notepad and enough swearing to make a pirate with Tourette’s blush.

It’ll need a full rewire at some point, while I can do it myself to a commercial standard our regs require a currently qualified electrician sign off (mine expired many years ago) so I’ll just pay someone to do the lot.

It’s annoying but I’ve seen enough horror shows to see why it’s nescessary.


> Or are we relying on the spinny-thing that is to be observed to somehow be illuminated by all three phases, with three lamps or fixtures, simultaneously?

That's exactly what they mean, yes. Some lights on L1, some L2, some L3.

> And even then: Doesn't it still strobe somewhat at (5032)=300 or (6032)=360Hz, instead of the 100- or 120-Hz that a shop lit by a single phase might provide?

No, because the phases are overlapping, there is no point in time where they're all off. There'd be local dimming of course, depending on their position etc., but light for all of the second.


They're saying that you have 3 banks of lights, each connected to one phase of the 3 phase input. That way, when only 1 bank goes out, it's easy to see that one phase is out.


At work we run a lot of machinery with motors and its obvious when phase loss happens. From my office I can tell if the lights go out/dim and the usual shop "hum" becomes a buzzing grunt that is immediately identifiable. Older machines have to be manually powered down but the machines I rebuilt have phase loss protection in the PLC thanks to a power monitoring terminal in the IO (Beckhoff EL3453.) Since the PLC is on 24V DC I have a capacitor backup module fronted by a 24V PSU that takes the 480V three phase power which tolerates a phase loss. The machine safely stops the process and shuts down the pumps and any other AC loads, then waits to be manually powered off as the PSU and DC side doesn't care.


Most existing JSON parsers don't support streaming but that's not inherent in the format. It is definitely possible to stream writes easily but it's just as possible to stream parsing.


> you are being generous. Tesla's software "mistakes" have killed several people.

Citation needed.

In the early days of autopilot/FSD most of the fatalities were people doing stupid things like watching a movie or sleeping in the back seat. That's why it now has to monitor your face with a camera to detect whether or not you are watching the road - to stop people from being idiots.

However we must acknowledge that any change in the automotive space is going to lead to problems and some percentage of those are going to cause injuries. That is the nature of cars. They do not have the certification standards of aircraft nor the training of pilots. They can't and they won't.

It is also inevitable that autonomous driving is going to make different mistakes than a person would make. On a miles-driven basis it still produces fewer accidents and injuries than human drivers.


I think the issue is more complex than that but certainly vested interests / national interest is definitely one aspect of things.

The west and the US specifically has operated on an open market policy partly as a result of two world wars we got dragged into in relatively short order. Economic integration was thought to reduce the likelihood of another great war.

However what we have currently is a relatively developed economy (China) using currency manipulation and protective policies to prop up their own economy long after it has passed out of the "developing" phase. Plus massive and ongoing state investment and debt deferral. China effectively subsidizes massive amounts of economic activity that makes any US or EU tax breaks / protective policies look like chump change.

When you have such a large market participant behaving that way it is little wonder that people lose their faith in free markets and want to intervene. Including doing explicitly punitive things against China. It is an attitude of China's own making. After all... China will not allow you to buy a freakin' popsicle stand as a foreigner let alone a shipbuilding company or anything else.

China wants all the access to the rest of the world and wants everyone to buy their products... but they do not want to reciprocate.


>China wants all the access to the rest of the world and wants everyone to buy their products... but they do not want to reciprocate.

There's a history with the West where they have been manipulated and taken advantage of in a way that the US never has.

It's possible their desire to force companies into partnerships is genuinely based on a fear of that happening again.

You say that China wants everyone to buy their products. There's also the implication that this is bad for the US economically. However China wouldn't benefit if their customers are poor.


> There's a history with the West where they have been manipulated and taken advantage of in a way that the US never has.

That's definitely possible but I think the cause is much simpler: initially they wanted to bootstrap their own industries and now nothing forces them to do anything different so they just continue with hyper-protectionist policies.

On the side of the west: Outsourcing to China is the new group-think. The new "No one ever got fired for buying IBM" for the MBAs. A box of Bandaids now says "made in china" on it. Bandaids are churned out entirely by machine. Packed entirely by machine. Boxed entirely by machine. By the millions per day. Human labor input is more or less irrelevant. Why outsource that to China? Because that's the only thing management knows how to do and the only thing so-called investors understand. It certainly isn't to save money or make the product better.

> However China wouldn't benefit if their customers are poor.

If I had a nickel for every time a government or leader adopts bad policies despite the obvious future negative consequences I'd be the world's richest person.


I think you are overstating how much of manufacturing is automated. There's still a great deal of human labor involved.

>If I had a nickel for every time a government or leader adopts bad policies despite the obvious future negative consequences I'd be the world's richest person.

This is everyone. The voters are at fault as well because sometimes they support those that create short term wins over the long term.

For outsourcing politicians beliefs that the US workforce would become the white collar workers of the the world which is true would increase the quality of working life.


They did the same thing to their developers a few years back from what I recall. That's why the app has bugs that haven't been fixed in years. For example the sorting options on your watch list are just garbage. They aren't remembered. And "recent activity" includes adding dubs in languages I have disabled in the UI - constantly causing old shows to pop to the top of the list making it useless.

Back when they had software developers they were rapidly improving the app but someone decided they needed more executive bonuses and laid everyone off. Their software hasn't moved an inch since.

Funimation had the same idea. They bailed out of VRV (Crunchyroll's attempt at an anime "marketplace" all-in-one app) and released their own garbage app that is somehow much much worse.

It is the classic "we have exclusives so these drooling morons will take whatever we deign to give them because we're the only ones with show X/Y/Z" move.


I will still never complain about CrunchyRoll's apps after using HiDive for a few shows. It can't even remember shows I'm watching, let alone keep track of watched episodes, and insists on rendering subtitles with TVs' closed captioning system.


That's very true. Crunchyroll is just sad because it used to be good and feel like someone involved cared.

Funimation lowered the bar so much I thought it couldn't go lower.

Who knew HiDive would prove me wrong.


Modern end-of-life satellite designs are made to cause "rapid disassembly" very high up in the atmosphere to trigger high friction on as many individual components as possible - down to fasteners. This promotes completely re-entry burn up of everything so what reaches the surface is dust that settles back down to the surface (or ocean floor) and eventually gets compressed into rock (over millions of years). Basically back to where it came from.

Remember orbit is not like a flying airplane. Those things are going so fast friction forms a plasma that eats away at the object as it decelerates. If you can expose more surface area that effect will eat away at much more of the object. So you design it to have through-bolts or other fastener designs where the outermost portion of the fastener burns off quickly, allowing the whole assembly to rapidly disassemble and vastly increase surface area.


If you've never used the BMC on a server... it is all 100% garbage. Software mostly written by embedded folks who haven't got a clue. It is absolutely garbage software on the whole (and no matter what vendor you get the board from). Go ahead and hit up the web interface then do a bit of "View Source". If you are imagining the rest of that stack is any better than my friend have I got a Beautiful Bridge in Brooklyn to sell you!

If it were me I'd assume the majority of BMC firmware out there from all vendors: 1. Is full of many many exploitable vulnerabilities 2. To the extent they patch holes it will be whack-a-mole because the economics do not permit large investments in software quality. 3. Many server owners will never install a patch anyway.


BMC software quality is low but what's the alternative? Without BMC it is more expensive to manage a fleet of servers. In a better word hardware vendors will publish specs to allow open-source BMC firmware but for some reason they resist this idea. Having only insecure BMC available a semi-separate management network (connected via a bastion host or a VPN) provides balance between cost and security.


> BMC software quality is low but what's the alternative?

Dedicated KVM devices?


This won't scale. Dedicated KVM needs you as an admin walking to the server, reswitching cables, walking back to the KVM console. Instead, with Out of band managament hw/sw, you spawn a dedicated ethernet and can access it from anywhere. It is a flexibility advantage on the costs of security.


There are boxes that can KVM to multiple servers at a time. You don't need to switch cables. They probably cost similar or less than BMC cards on a per-port basis. You might have to combine with some sort of network boot to set up a machine from scratch.


> They probably cost similar or less than BMC cards on a per-port basis

If you build own servers that's an option to consider but most off-the-shelf servers are sold with BMC (so you pay for it even if don't want it). May be some low end brands sell servers without BMC but if you are looking for relatively reliable hardware you'll likely get a server with BMC.


I was thinking more like just having one IP KVM per server always hooked up to a dedicated management network, basically used exactly like a BMC just with better software.


There is the open source OpenBMC software nowaydays, which is pretty good.

Unfortunately, Supermicro doesn't use it yet for most of their servers. Probably because they sell an extremely expansive license for their own software so you can use the Redfish API.


The one vendor mentioned in the comments, AMI, is switching this code base to openbmc. Also it should be noted that often this software is system specific.


They're just being cheap. If you're going to let customers plug panels directly into your box you should have overvoltage protection. It's that simple.


Fun fact: as a regular citizen you can apply for such a permit online. I did this when we were moving houses to ensure the entire block in front of our house would be clear of cars (or we could tow if required) to make it possible to get a moving truck in on the one-lane street where double-parking would block all access. I filled out the forms. A week or so later the city dropped signs on the sidewalk warning of the upcoming closure.

You can also close your entire street for a block party. You just need a certain number of people on your block to sign the form approving it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: