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

I stopped reading because the letters kept "unlocking" and rotating in an annoying way. There are other less user-hostile Clojure guides.



The idea is to sell the book. It's not free contents


This quine is covered briefly in Yusuke Endoh's talk from RubyConf 2017 https://youtu.be/6K7EmeptEHo?t=1500

The whole talk is awesome if you're interested in this kind of thing in Ruby.


Unless you scramble the cube using more than 20 moves. http://www.cube20.org/


The comment you're replying to mentioned the shortest implementation, as in the size of the program written to solve the problem.

I believe you're talking about the the optimal shortest path to the solution, which while true, relevant and interesting, isn't contrary to the point.


Great article, lots of technical details. A simple answer to the 'Why' can be found in the middle under the 'Off Grid Without Batteries' headline.

> If you have a typical grid tied system (microinverters or normal string inverters, so easily 95+% of installed rooftop solar), the system is technically incapable of running off grid (without additional hardware). There's no waveform to sync with,


I agree that there are a lot of good technical details. However, I wish the article had started off by saying, "It's Not Power Companies Being Evilly Evil - It's Homeowners Being Cheap" instead of waiting more than half way through it.


"there's no waveform to sync with" is technically correct and a very poor excuse

A residential no-break has no waveform to sync with as well.

Something capable of syncing to the grid and then more or less keeping pace even if the main grid goes down should cost very little today. (And when the grid goes back it shouldn't have drifted too much unless something ridiculously big happened)


It might be worth reading the rest of the article. Which points at that the big reason why you can run off grid is because solar panels without a battery store are effectively incapable of usefully powering variable loads without:

Only running at a fraction of their max available output allow enough headroom for high peak startup draw from loads, and headroom for clouds and planes passing overhead.

Frequently cutting in and out as the load regularly exceeds available supply.

Keeping the frequency sync is the easiest problem to solve, the article even covers what would happen if you tried to use a little generator to produce a sync signal.


I think that points to a bigger problem with solar and that is that it is a horribly mis-sold concept.

Most solar dealers have a one-size-fits-all product that they fit to nearly all homes without much modification. The homeowner thinks they are buying something that will save them a fortune and eliminate their need for grid power. In reality they discoverer that solar is persnickety and they will get nowhere near eliminating their grid reliance. And when you do the math you realise that it might take 10+ years to recoup the high cost of installation and by that point your batteries will need to be replaced and your solar panels will have lost some of their efficiency.

I know people who have gone fully off-grid in Ireland, but they don't just rely on solar. They supplement with wind turbines and in some case hydro power from streams.


I think you have it wrong. You make it sound like homeowners are tricked into thinking they will be grid-independent, which I don't think is a fair depiction of how the product is sold (at least in Australia, that is.) The value proposition isn't getting entirely off the grid, it's just saving a bit of cash and doing some good for the planet.

Rooftop solar is popular because the payback period is short enough for homeowners - well under 10 years here for a system that is built to last at least 20. Modules built now degrade about 0.25% per year. Solar farms built now are typically financed as 25-30 year projects.

Source: I am a data analyst at a solar engineering firm.


"Doing some good for the planet" really must take into account the toxic metals leaching from the cheap Chinese panels that took over the market in the past decade. (There are no significant US/EU PV panel mfrs left.) I've seen mid-scale arrays (30-50 KW) with 1/4 of the panels delaminating and thus leaking heavy metals (lead, cadmium, etc.) directly into the environment - or worse, into rainwater recovery systems!


I am considering solar and a big plus would be a battery as well.

Do you have any suggestions or recommendations on things to read or companies to look at? i.e. Tesla power?


And do your calculations include subsidies? In that case it's not necessarily "saving cash" but "taking a transfer payment from taxpayers."


Fossil fuels are heavily subsidized, so your point is moot.


They're not only not heavily subsidized by consumers, but one of the most taxed consumer goods you can buy (besides cigarettes).


Coal power power for example does not need to cover the deaths directly caused by it's pollution. That's a vast subsidy. Roads revive rather large subsidies from the general funds outside of gas taxes which is another large subsidy, though electric cars revive even larger subsides by not needing to pay for their use.

PS: Look at taxes for Farm use vehicles fuel to get a better picture of the actual 'subsidy' vs 'tax'. The tipping point is very much a subsidy. https://www.irs.gov/businesses/small-businesses-self-employe...


Surely the reasonable behavior would be to NOT subsidize any of these things. Your point tho is (sadly) correct.


I agree with what you wrote there, so they should justify by it not by just saying "it's a frequency issue"

As you said:

> Keeping the frequency sync is the easiest problem to solve


The grid isn't a fixed frequency. While on average the grid doesn't change phase, the reality is that the grid may be out of phase by several seconds most of the time.

When the grid comes back from a blackout, chances are that it browned out beforehand so your sync is to a low frequency and coming back it'll be high frequency because the grid wants to compensate for loads jumping back on.

Additionally the components to generate your own waveform are cheap, yes, but not that cheap, adding them to the microinverter would increase cost quite a bit.

And you'd still need a transfer switch because if you happen to be 180 degrees out of phase, which CAN HAPPEN then your panel will behave like a dead short at double grid voltage. The current flow will definitely exceed the maximum tolerances and the magic smoke goes out.

You will absolutely need a transfer switch just so you don't fry all your devices the moment the grid comes back. Even then, syncing to the grid is a rather delicate maneuver since the grid will be constantly changing phase and it'll be simpler to shut down all inverters, connect back and have it all run back up on the grid itself.


This sounds awfully complicated, near impossible. You'd need a circuit that disconnects from the grid once it detects a brown out or black out, then produces a near sine wave all by itself, then re-syncs with the grid once it comes back up and transfers back. And all that has to happen cleanly enough that even a computer connected to it doesn't glitch, truly a "delicate maneuver". No way this can be produced for less than a couple thousands of dollars!

It's called a line-interactive UPS. You can buy it for $200.


Line-interactive gets around it by simply using a inverter for both grid power and battery power, thusly being able to produce it's own sine wave inside the house. You can also use an VFI those convert grid to DC and then plug the battery in there, then convert back. Same effect.

A line interactive UPS does not sync necessarily sync you to the grid, though the electronic will usually try to keep it in sync. It's not necessary here.


You don't really need a transfer switch, just a big relay to connect the grid and your internal wiring. Disconnect as soon as the grid drops out, and sync to the grid before re-engaging. It's not a full transfer switch you require, and should be in the price range of an resettable fuse of the same amperage rating. Just add a small solenoid to trigger the spring-loaded mechanism to disengage the switch, and use a slow-ish geared DC motor to re-load the spring and re-engage the connection. It should not be hard to enable the inverter to sync that way, and these fuses aren't expensive either. And if you cut the inverter along with only some of the circuits in your house from the rest, which are still connected to the grid, you can easily ensure that no high-power devices draw power and cause the inverter to either go into overload or have insufficient input power (solar/battery) to keep the output voltage on target.


> When the grid comes back from a blackout, chances are that it browned out beforehand

Not really, but depends on the state of the infrastructure, if it was really because of a power overload, yes, but most likely "your circuit" (which could be your street or your neighborhood) got shut off, in this case there shouldn't be much difference

Yes, a phase difference of 180 can definitely happen but I guess most electronics can survive a 1/60s (I'd say even 1/10) switching time, which is probably enough to have the grid take over.

(Or of course you could have the grid and solar charging batteries then your own high power inverter for your house but that of course would mean $$$$$$)


A 1/10th switching time would be fine though if you change phase too much and suddenly some equipment might not like it.

And you'd still have to sync the inverter, having the inverter simply continue to run until it's back in sync with the grid, then just reconnect (as a previous comment wanted) is likely not an option for most consumers.

For that it would likely be cheaper to have a full DC stage as you mentioned.


It's knowledge that people in question are lacking


Most computers can't handle 100 ms power loss, unless you actively throttle power consumption as soon as you sense the loss, in order for the filter capacitors in the PSU to last that long.


Most computers are laptops today.


Or you have your inverters run a phase locked loop. When the grid is there it'll keep perfect sync, when it's not there it'll keep running. Switching back to grid power should be as easy as waiting to reconnect until your inverters are back in sync, which depending on the PLL design shouldn't take long.


Waiting to be back in sync could take forever, plus you need a Sync Check Relay. Price of those is usually "contact sales team" and they don't work reliably if you don't need more than a couple dozen kW of power. (They're intended for 1MW+ installations).

Just shut it down, flip the switch and restart. Everything else will just be prohibitively expensive because it needs to be very safe.

If you get the phase wrong then you'll either reduce the lifetime of your components or the components explode after the nearest power plant tries to pump all available power into your poor inverter.


> Waiting to be back in sync could take forever

Only if you design it to. The phase locked loop would "listen" to the mains frequency and slew to match. Slew speed is simply a design parameter you can set to any value.


A phase-locked loop would fairly quickly come back into sync with the reference frequency - that’s exactly what they’re designed to do.

I’m pretty sure companies like Victron Energy already make these kinds of systems - combination solar inverters and battery chargers that have transfer switches to be able to seamlessly switch to UPS mode when the grid drops out but can still export excess energy when it’s up.


Of course these systems are made but they're just very expensive and usually for customers of theirs that don't play around with a couple 100W panels because they want to save a buck or two in the summer.


The relay you need is a normal breaker with a solenoid to trigger the spring and a small geared DC motor to re-engage/reset the breaker.

And that's for what you need to allow your inverter to handle this automatically (you might need another voltage sensing channel to sense the grid-side of this breaker).


If this is such a hard problem, how does the $150 UPS hooked up to my home computers pull it off???


Your UPS doesn't save money by discharging its battery back to the grid when it's not in use.

Your UPS handles an order of magnitude (or more) less power than a whole-home solar installation.

None of these problems are intractable of course, but you are oversimplifying the problem a little.


I'd be willing to accept not discharging my solar system's battery to the grid when not in use, I can use it at night.

One can get a UPS affordably that will power 1500 watts of continuous power. Being able to supply just that much, or twice that much, from solar panels in a grid-down scenario would be tremendously useful, even if it's not enough power to fire up my welder.


When the grid goes back up the system would check the grid frequency and phase, and slowly match that waveform over a few minutes by making light changes.

When the two are aligned within a good-enough tolerance the system will switch back to it's regular state of mains + solar ( + batteries + wind + generator + etc / whatever).

These are all solved problems with commercial off the shelf components.


Are these commercial off the shelf components as cheap as a microinverter?


I just typed microinverter in to Google and clicked on shopping.

It looks to me like microinverters are a commercial off the shelf product?

Will a microinverter do all of the things a multi-component phase-syncing system with automatic transfer switches do? I don't see why a microinverter can't be built with these components integrated. I can't tell you if such a unit exists as I'm not well versed in the product range.

As far as a price comparison goes, I guess it only makes sense to compare a like-for-like system?


From what I know, you will need a sync check relay, ie a relay that only closes when you're synced up. Those are generally available for 1MW and upwards (one manual notes a minimum constant load on the internal grid of 500 kW or it won't work), look like about the size of half of a car battery, at a price of "contact our sales team".

Could it be made cheaper? Probably. If you get it wrong, the grid probably doesn't care but you'll briefly pump about 500W into the device that is supposed to have 500W going out of it. The reason these are big and expensive is that it requires significant safety gear so nothing explodes even in the worst case. And that safety gear is expensive. So you sell it to people who not only can afford it but also really really need it (ie, 1MW and upwards where you enter the domain of "can fry small section of grid")


Any old IGBT or even just a highly spec’d MOSFET paired with an optoisolator (a couple of dollars of parts) could do that for a small system, based on input from the inverter’s existing controller.

The specialist devices for large installations you’re talking about are only expensive because you need more expensive parts for the far larger amounts of current you’re handling (and probably because they’re made in lower volumes than commodity inverters), not because they’re doing anything particularly difficult.


I used to work with a few (16 odd) Siemens 200kVA UPS that did the syncing.

There’s no technical reason the requisite electronics can’t be built on a much smaller scale.

Home grid-tie solar inverters are clearly capable of syncing, so the electronics are already present.


grid-tie inverters are capable of syncing to a present signal, what they can't do is provide their own waveform and sync that to the grid when it comes back online.


Providing a 60Hz waveform and syncing it to the grid the easy part. You could make a standalone device that does it out of a twenty cent microcontroller.


And then you'd still have to switch over and you'd need a sync check relay for safety (if you don't and the microcontroller is off because you forgot a comma somewhere, your inverter explodes).

Additionally producing the clean sinewave that you'd need for this is not that easy, atleast not at the quality levels you want for this (if your DAC that produces the wave is off by 1% then at a 2kW load you're going to burn up 20W somewhere that doesn't like 20W being burned up)


Redundancy and fail-safes are important but can also be inexpensive. Most of the expense comes from being a niche product right now.

How is being off by 1% going to hurt anything? I'm quite sure my mains voltage is already more than 1% off.

If I get solar it had better not explode every time my air conditioner kicks on.


Your mains voltage cannot be 1% off it's own phase since it's the primary phase here and in terms of voltage a 1% difference doesn't matter.

However, if you have your own generator it matters a lot.

If your phase is off by 1 degree then that 1 degree will burn roughly .2% of the incoming power of the grid at the inverter (which is unlikely designed to handle this). If you're off by 1% you burn 20 Watts on a device not designed for it.

If your voltage is off relative to the grid by 1% then you burn the difference, at 2kW that's about 20 Watts. And that's per volt. You'd be burning somewhere around 300 W if you happen to have the grid on the higher end of the tolerance and yours on the lower.

A grid-tie inverter gets around this by simply following along the sine wave of the grid, this can be done relatively cheaply and safely with analog components so the error can be much smaller than 1% and deep into random noise territory.

If you generate your own sine wave and compare it to an existing one it's much more difficult since you have to match amplitude and phase almost perfectly.

So with grid-tie nothing will explode. With an autotransfer nothing explodes either. Wanting to seamlessly couple back in requires a lot of care and expensive components.


Oh, you're talking about when it syncs back up. I don't really see the problem.

Next to your offline-capable sine wave generator, put a copy of that cheap safe analog circuit.

Once you get almost in sync, crossfade over to the analog circuit. (If that's even necessary. It might be just fine to swap to it at a zero-crossing.)

Now you're completely in sync. Reconnect to the mains.


I'm no electronics engineer, but don't regular home UPS units already do all of this? I'm talking about the type of units sold by computer and office supply shops to provide backup power for home / SOHO IT devices.


Generally there are three types of UPS on the market.

The cheapest is VFD which is basically a battery parellel to the mains which in case of a power failure interrupts mains and inserts it's own voltage. Usually labelled as "offline" or "standby" UPS since they're not active most of the time. The output frequency and voltage is the mains output and voltage until switched over, something to keep in mind if devices are sensitive to that.

These can simply switch back to mains when it's back since they usually use a simple transfer relay.

VI (Line interactive, Delta Conversion) uses the mains frequency as orientation. They don't have a transfer and can basically just compensate whatever the mains is doing to output a 230V signal. Internally they have a inverter with AC input and AC ouput which means they measure if mains is coming back from there and adapt the signal on the internal inverter for the battery.

If mains comes back on a VI they usually change frequency very abruptly which is not ideal from some devices.

VDI is completely independent of both voltage and frequency as it first converts mains AC to internal DC, simply plugs in the battery into the DC and then converts DC to AC. They don't need to synchronize at all and are the more common for datacenters since they isolate the input fairly well from output and don't have to switch anything to go from mains to backup, DC voltage is fairly good for dealing with this. They are also most expensive.

If mains comes back on a VDI they don#t do anything of notable interest other than switching the battery charger on.


Thank you for the detailed explanation, much appreciated.


Yes. It's all pretty much the same hardware with different firmware.

Manufacturers of solar hardware love to charge you an extra $1000 for that extra firmware though...


You need more hardware when you want to sync to grid after being off grid. You need one on the inverter and a seperated output, most grid-tie inverters simply have one port for everything. If you use one port for everything you can hardly sync the house grid to the external grid since you can't both provide power and try to sync the phase.


Err, you can provide the power, you do need another voltage sensing connection to the grid though, and might want an automated breaker to not have to attend the device and re-connect inverter and grid once sync is complete. If the inverter is properly fused, you should even get away with a LED or a small display that shows you whether it's safe to reconnect or even how long until sync is complete.


Why is this tagged as 2003?



But then, why is it called "twenty years of speedcubing", if he started in 1981?


> Later in 1982, I changed my F2L system to the current system. [..] By 1983, I was consistently averaging 17 seconds. I knew three more cubers capable of achieving sub-20 averages consistently. We practiced together. As the cube rage cooled down, I stopped working on my system.

Maybe she considers 1983 as the year speedcubing was born? Maybe she just meant round about 20 years. Maybe she wrote it in 2001 and published it in 2003?


I put it there because, to the best of my knowledge, this is the date it was first published.


That hourglass is really annoying.

It does have a hide button, but you have to click the hourglass first, something that years of annoying ads have trained me NOT to do.


While a nice story, I have been unable to find any citations that would indicate that this was ever an actual study.



It appears in the book "Art & Fear: Observations On the Perils (and Rewards) of Artmaking" by David Bayles and Ted Orland.

PROTIP: Google will often tell you these things!


And where in that book are the references to an actual study?

PROTIP: Books are often filled with creative writing.


Fine, OK. I checked it out and there are no citations in the book at all (1993 edition), so yes it's a just-so story.


I may be mis-remembering the level of rigor, it may have just been a thing a professor tried because they were curious.


> Actually. You know what? Just this week I shipped ten new boxes of these pens to Elon Musk’s office.

An example of sales people having no issue with casually slipping in outright lies?


Elon Musk sells luxury cars to people who are aware of climate change and also love technology. He uses that money to build more and cheaper cars, moving towards mainstream, because existing car manufacturers didn't really move toward electric. Elon Musk solves a problem for his buyers. It's frustrating to see his name used in a sales pitch that is driven by a "Vitamins" approach rather than a "Painkiller" approach. Fighting climate change isn't optional.


There's also http://exercism.io/ where you can solve problems and get/give feedback on the solutions.

The platform is all open source on Github.


If you want to teach without leaving the house or standing in front of a group of people, try http://exercism.io/ (Open Source and free).

Solve simple coding problems, review the submissions of others and help them become better coders. Trying to clearly explain concepts to others is the best way to make sure you really know them yourself.

This is also something that you can do for 10-15 min every day, which will add up over time. Ask for feedback on your own solutions and find out ways others think you could improve things.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: