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

Right, iterating through pixels is better. The tricky part about iterating the angle is that you need to choose the step size correctly or else you could skip pixels. Like if you iterate in 1-degree increments, you'll plot 360 pixels total, but the size of the circle on your canvas might be more than 360 pixels wide. I'm sure there's a way to choose the angle iteration step size to guarantee not skipping pixels, but you'd often duplicate work and re-plot the same pixel twice.

So yes, start at (R, 0), increment the y-coordinate each time and possibly decrement the x-coordinate, until x=y which will be at 45°. If the circle's center is an integer on the pixel grid, you can reflect/translate each pixel in that first octant to all eight as you go. If the center is fractionally positioned, you'd have to calculate it all the way around, iterating primarily on y or x depending on the location.


> The tricky part about iterating the angle is that you need to choose the step size correctly or else you could skip pixels

Yes, although the problem statement doesn't say if they care. In this case they are only giving a draw_pixel() primitive, but if you had draw_line() then you could use that to avoid gaps.

The other thing is that this is 90's era, with a CGA display (640x200) being mentioned in the previous question, so I'm not sure there's enough resolution to draw a real circle without gaps unless you do resort to some hack to ensure there aren't any!


Yes, this is broadly correct. The free market will (roughly) arbitrage out any differences between owning and renting. The hidden factor is that whatever money you have in house equity represents opportunity cost that it isn't in investments. If you have 400k in a house and the stock market returns 6% over inflation, then the opportunity cost is 2k per month in interest, which is comparable to what you'd pay in rent.

There are tax advantages that favor owning (in the US), for a primary resident and not an arbitrageur - mortgage interest and capital gains when you sell are not taxed, while capital gains in a non-retirement account are.

You can gain by appreciation and leverage, of course - but you can just as easily not, you don't know if your city is going to be the next high-flying Austin or Boulder, or run-down Detroit. My own house has been flat in estimated value for four years in an area that I thought would continue to rise.


There's significant personal financial benefits to renting, too, in that many local areas are dominated by one firm or industry as a major employer, so your employment prospects can be highly correlated with the local housing market. You do not want your investments to be correlated with your employment if at all reasonable. Detroit in particular was hard hit by this in the '08 financial crisis, iirc - the automotive industry had huge layoffs and a simultaneous residential real estate market collapse, and many newly laid-off workers were underwater on their home and practically unable to sell to move for better job prospects.

This is something that is hard for people to factor in when decision making. Optimism will blind us from considering such a tragedy since not only was there buy-in on the home, there was buy-in on the future trajectory of the company you decided to work for.

The liquidity problem with homeownership as well is that it's a lump sum.

If you own $400k of stocks, you can sell any increment of dollars you want over time. You can take profit, you can take money out to cover needs, etc.

With a house, sure you can "take out home equity" but its just a loan against your home you have to eventually sell to cover or pay back.

It's like having a $400k position in your companies stock that you can only sell all at once with a 10% round trip transaction fee.


> With a house, sure you can "take out home equity" but its just a loan against your home you have to eventually sell to cover or pay back.

Do you expect to be able to take out a loan on your house and not have to pay it back? Want to have your cake and eat it too, literally?


But the same argument applies to landlords too. Why are they willingly losing money?

I’m a landlord. I’m losing money because the Seattle market went to shit and nobody will buy this place.

I bought for $850k in 2017. Selling now asking $899k and no-one’s buying. Think of my ARR with inflation and opportunity cost here. I sold Facebook shares to get this. I have made zero return from rents overall. I’d likely have earned $1M if I hadn’t sold those shares.


That's pretty contingent. If you had Snapchat shares instead you'd be ahead.

Even selling up and putting the money into the S&P500 would've done a lot better than that[0], so I think it's a reasonable claim.

[0] https://investment-estimator.com/s&p-500-calculator says $850k in 2017 would be $2.8M by 2026.


Can I ask why you're selling?

Do you happen to be a young person looking to move for better prospects (economic migrant)?


A landlord is unlikely to have the same cost basis as someone buying on a new mortgage. I know many landlords that own their rentals outright. The ability to make a profit renting for less than you'd pay in interest charges alone changes the financial calculation.

That said, landlords don't always have a choice to not lose money. These are investments, there is inherent risk.


A lot of small mom-and-pop landlords are certainly losing money. Especially when they buy properties as their own residence but later converted to a rental. The majority of the Bay Area housing market has basically zero properties that would make a landlord profitable; you only need to compare the market value of a house against the market rent.

And this is really no different from the majority of stock pickers or day traders. They just lose money.


I get what you’re saying, but the housing market is actually a really subtle issue in my opinion.

Just one example, owning a home protects you against price shocks. As others have pointed out, this can sometimes be a bad thing, because when prices decrease you are also leveraged.

But it’s pretty important to a lot of middle class people that they are protected against forced relocation due to 5x housing price increases.

Of course, there’s other reasons to not own a home.

My point is that localized housing markets have all sorts of factors that are perfectly explainable by economic theory but aren’t just “Econ 101, run the supply and demand” curve.


Any angle within 23º of east-west will have henging at some time of year. You'd have to have the entire street grid be aligned diagonal rather than cardinal.

Love that "land for turn", although I think it might shift the balance a little too much, in that you can make a deck with too much land and high cost spells and know you can cast them reliably. There needs to be a risk factor in building up to high mana to make low mana spells matter.

Possible tweaks, maybe it has a cost (all lands have cycling 1 or 2 mana or life.) Or delay that draw until end of turn, which feels like about the right power level, but does have memory and execution issues.


My thinking is that there's a tradeoff, that you slow your ramping in exchange for cycling (replacing your land for turn). You trade your acceleration towards big spells for more consistency (or just fewer dead draws).

I think this reason is dependency. Anything I'm doing where the action of one hand depends on the other has to go left-to-right. I can only finger frets with the left and then pick with the right. Can't go the other way, can't have the right hand act before the left, even if the left has the more complex task.

It's like Super Mario Bros. With a 4-way d-pad and 2 action buttons, why is the more complex 4-way on the left? Because most of the time you're holding a direction first with less requirement for precise timing, and then pressing the button at the correct instant depending on the movement. (We're talking general platformer play, not hyper precise d-pad moves for something like Super Metroid speedrunning.)

Even typing on a keyboard, I never hold a right-side shift or other modifier key, it's always left-shift then the target key.


On MacOS (at least my older version on a 2015 MBP), Cmd-~ switches between app windows. Totally undiscoverable but knowing that restores a lot of usability.


It helps, but is still fundamentally different behavior. It's now two key strokes Cmd-Tab to Chrome, then Cmd-~ to switch between chrome windows (with no switcher UI).

The windows-y alt-tab at least shows a preview of all windows, and so its one key stroke to tab through everything.


I've always thought he just kind of slurred over the "a", like you'd do in casual speech, it came out like "f'r'a man". In the recording there's a tiny slight bit of a vowel after the "r" sound. I don't think he blew the line, just didn't speak it clearly.


Several real pinball tables do this, keep a hidden ball staged to make it seem to instantly reappear. The Rick & Morty machine in particular does this - you can shoot into a portal, and the ball (actually a different hidden one) reappears instantly some distance away.


And the version from Full Tilt is a significantly enhanced version of the game. It has multiball, where the Windows bundled version doesn't.


i've gotten multiball in the Windows version of SpaceCadet, pretty sure I wasn't the victim of the Full Tilt version supply chain attack because while I knew about other tables I've never seen any of them.


Most likely that pricing rule was/is at a more local level. The national level in the US doesn't have anything like that, but there are some states or cities or counties that can and do.


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

Search: