skysight-inc/HackerNews huggingface dataset:
Most of the time when I have to think about what to do with a 0 divisor, I come to the conclusion that

if (foo == 0):
return MAX_FLOAT
else:
return bar / foo

is more sound for the given algorithm than "return 0" (still crappy, but more sound).

Then use MAX_FLOAT as an error flag instead of 0, which could have been the result of a legal operation (with bar==0).
Oops, I see, sorry, you're totally right.
I have lower level question about how Pony implements this behavior:

When a CPU is asked to divide by zero it generates an exception. This exception would cause the OS to jump to the interrupt handler in the IDT for divide by zero exceptions. This handler generally results in the OS terminating the process. Does the Pony runtime register its own signal handler with the OS for a divide by zero exception?
That might be accidentally true in some case, but not true in principle. There are states like Washington, which have zero income tax but which still contribute more in federal taxes (73.3B [1]) vs federal spending they receive (72.9B [2]). So it still doesn't make sense to deduct local taxes.

[1] https://en.wikipedia.org/wiki/Federal_tax_revenue_by_state

[2] https://en.wikipedia.org/wiki/Federal_taxation_and_spending_...
There is an extension to the original x86 instruction set called x87 which has an instruction called fsin. Unfortunately, it's very slow and somewhat inaccurate. On newer processors it's actually faster to call a function using SSE2 the normal way instead of emitting a single fsin instruction.
> Come to think of it, couldn't I define x/y as cotton candy

Yes. That's the thesis of the article. Make an arbitrary choice for 1 / 0 = ?, and if it helps you, use it. It's mathematically, rigorously fine.
At this point I've written a number of comments throughout this thread which explain why division by zero is not possible in a field - specifically, a field which contains nonzero elements. You are asking me to show you an axiom or theorem proving this, but I don't know how else to explain this to you since I've already explained it in a number of different ways. In a sibling comment I even write out the formal proof, and in others I've explained why the author's refutation is incorrect.

I'm not sure what else to say. The author is wrong - it is not at all controversial among mathematicians that the algebraic structure of a field cannot support division by zero. Perhaps I'm simply a poor teacher - in that case I would refer you to [1], [2] and [3] for a better explanation. As I've said elsewhere, you can make a coherent algebra by extending a field - then division by 0 or infinity is possible. But it stops being a field - just as it cannot be many other algebraic structures. Therefore I feel very confident stating that 1) the author is wrong, 2) I've sufficiently explained why in these comments and 3) the burden isn't really on anyone to disprove that division by 0 works at this point.

In any case, this entire discourse is ridiculous because the author should not be trying to defend programming language decisions using abstract mathematics. This kind of nuance and ambiguity is neither necessary nor relevant for justifying an implementation of defined behavior for division by zero. The whole exercise is a farcical distraction, to put it bluntly. Mathematics is pedantic by design, but this sort of definitional rigor is laughably unneeded and for defining integer and float-based arithmetic. The author does a disservice to what is an otherwise reasonable point by (incorrectly) justifying it with axiomatic field theory.

It's self-indulgent over-engineering to try to prove division by zero in fields "works, no really!" from first principles for a programming language blog post; especially when mathematics is essentially united in saying, "no actually, it doesn't."

__________________

1. https://www.reddit.com/r/math/comments/3b5i6p/can_you_divide....
2. http://mathworld.wolfram.com/DivisionbyZero.html

3. https://en.m.wikipedia.org/wiki/Division_by_zero
When played smart, the answer can be both - the country willing to pollute its environment and the country which is outsourcing the "pollution". For example, China and the USA.
It is a huge problem. I don't fully understand the causes myself but corruption is likely to be part of it. People just don't have what is necessary to do their jobs and this demoralizes them. They start neglecting the problems ("I'm not gonna risk my life for this salary just to arrest some robber who'll probably be released anyway because he's a child") or become corrupt as well ("I'm gonna make some money on the side overlooking criminal activity"). Instead of stopping crime, the authorities seem to develop a state of equilibrium with it.

So it comes down to this: do you trust your government? I don't trust mine. I'd rather they decentralized public security instead so that people can at least try to do what they haven't been doing in decades.
What's interesting is that generally nobody cared about these ROMs for a decade or two, and now that there has been a resurgence of retro gaming consoles and apps, suddenly the IP enforcers have started to arrive. I'd bet that many of these ROMs would have been completely lost if not for the emulation scene. I have no evidence for this, but I would make a conjecture that the copyright holders are probably using at least a few ROM dumps that they found online for their own "new" products...
Wallaby needs a new maintainer
Programming Poems
I closed on a condo in Seattle literally this morning. Did I buy at the exact worst possible time?
Also released today: IANA Registry Updates for TLS and DTLS (https://tools.ietf.org/html/rfc8447) and Record Size Limit Extension for TLS (https://tools.ietf.org/html/rfc8449).
Social Network Sharing for a Single Page Application
Inside Twitter's Debate about what it stays on its site
Monsanto ordered to pay $289M in world's first Roundup cancer trial
To somewhat clarify, x87 is the instruction set of the Intel 8087 and its successors, which were floating point coprocessors designed to work with x86 family processors. The coprocessor was eventually integrated into x86 chips. The design was, in retrospect, rather poor, and so SSE2 was designed with (mostly) replacing x87 in mind (along with narrow SIMD operations), and since then x87 instructions have largely been second-class.
"oil exporters would immediately switch to doing oil trade in Euros"

How does this affect the US any more than whether they measure oil volume in metric or not? It's not something that changes the real economy, it's just a matter of which ruler you're using. If the oil company has European employees, it still has to pay them in Euros. If the oil company has American employees, it still has to pay them in dollars. Likewise for customers. You have currency coming in, and if it's not what you need, you trade it for what you need.
Only if you're concerned about external validation of your purchase -- i.e., you might be moving and the market tanks.
You misunderstood me. I wasn’t implying academics write clean code, just exactly what you’re saying usually it’s small & dirty code.

However Dijkstra, of course, always wrote impeccable code.
Who said I live in Stockholm? I live in Malmö. The housing market is pretty dire in most of the westernised-European capitals.
If we believe, at a philosophical level, that interest payments should be tax deductible, ok, then make ALL interest paid tax deductible - credit card, personal loans, auto loans, etc.

Exactly. In fact all interest was deductible until the 1986 tax reform. Unfortunately the mortgage interest deduction survived due to lobbying from the real estate industry.

with the new tax bill, 90+% of both owners and renters will be taking the standard deduction this year. It is my opinion that's a good thing.

It's a very good thing for fairness, economic efficiency, and saving taxpayer time.
Anecdote, but my wife and I dropped out of the market recently and rented instead. The rent was 30-40% cheaper than a mortgage would have been on a similar place (including taxes, insurance, etc...). So we figured we would just put the after-tax difference into a 401k (because 401k is pre-tax, for every dollar we 'saved' in housing cost, we are putting ~1.4 dollars into 401k). I figure that building equity in a house has similar investment timeline to the 401k, so it doesn't really bother me whether my net worth comes from one or the other, and unlike a house I can diversify the 401k via different index funds. In terms of ROI, the buy vs rent calculators are all starting to lean towards renting[1], so unless we are going to be in the same house for 12-15 years (unlikely) renting seems to win (and this assumes fairly good/neutral economic outlook, if you turn some of the knobs on the calculator to assume negative growth, oh boy...) .

Add to the fact that most folks don't really know how the new tax laws will impact them until they do the calculations early next year, and the fact the rising interests rates should put downward pressure on the market, and the rather volatile political situation (who really knows where this tariff thing is going to go, and how it will impact the economy), and it just made more sense to wait it out.

[1] https://www.nytimes.com/interactive/2014/upshot/buy-rent-cal...
You just shot your own argument against his point in the foot. Thousands of people doesn't even make up a percentage point of the users of Android. Most people on Android use Google Play because it's sufficient against the threats that they need to it be sufficient against. Most people are okay with the risk/reward ratios that come with using commercial software because they then don't have to think about it. Signal provides a nearly turnkey level of protection above and beyond standard messaging in an easy enough format for most people to use.
What they found was sobering. In the geo-engineered world, maize yields did increase by 6.3 percent due to cooler temperatures (compared with the climate-changed world). But they decreased by 5.3 percent due to the reduction in light. When accounting for a few other side effects of geo engineering, there was essentially zero benefit.

I never thought of sulfate albedo enhancement as specifically about increasing agricultural yields. I always thought of it as a band-aid measure to jam a dangerous feedback loop of thawing tundra, ice cap loss, loss of stored carbon from soils => even lower albedo, even more GHGs in the atmosphere, even higher temperatures. Meanwhile humanity pokily gets its act together about cutting emissions and deploying slower-acting CO2 countermeasures like accelerated silicate weathering. I hope.

Knowing that crop yields don't get any worse with sulfate albedo enhancement is better news than I expected. (If you were expecting to lose a whole leg, hearing that the doctors just have to amputate the foot is good news. My bar for good news about climate change is set pretty low nowadays.)
The Fight for Purity from Corporate Influence
John McAfee's 'unhackable' Bitfi wallet has been hacked inside a week
There's windows that you have to put a property up in (e.g. 72 hours), but if your company can act as both buyer and seller you can double(ish) your commission, so you either:

1. Try and get an offer before that window is up.

or

2. Put the listing up with enough wrong information that you get 2-3 more days to try and sell the property.

Apart from that, there's a lot of minor lying when it comes to these listings. Maybe the lot was 2 acres before it was subdivided, so you say on the listing that it's 2 acres. Maybe you jiggle the handle on the listing for the first week or so so it shows up as new/updated every day. Maybe you say that the listing has "central window unit AC" to try and confuse people into showing up.

It's mostly a lot of light treason against buyers and sellers. Real estate is a bit of a dogfight and much of it falls into the "technically illegal but not worth suing" bucket.
Challenge accepted: 15-year-old plays Doom on 'unhackable' Bitfi
Having kids works. You experience the world all over again through them.

Having said that I wouldn't recommend that choice purely to solve your problem.
How can the high tax states push policy when they mostly elect Democrats and the Republicans control Congress? The tax law that just passed was very unfriendly to blue states.
I'm very curious as to where you got that statistic.

I understand that we programmers are often very resistant to change, but there's nothing inherently wrong with using something new. If someone feels the benefits are worth the learning costs, then they are free to go ahead and use "X" technology...
Emails and sitting in meetings (e.g. https://twitter.com/research_tim/status/1017506139137826819 ).
What better thing do you have in mind? I'm not aware of any general-purpose floating point math replacement that mature enough to be embedded in billions of processors.
Yeah it was pretty bad 5-10 years ago, but working with it as recently as Tuesday, I can say that the major benefit of sites like Zillow and Redfin is that MLS companies have had to adapt fast to stay competitive. The realtor I'm working with has changed MLS platforms three times in the last year alone.
As near as I can tell, he's just redefining what division means when the divisor is zero. That is, creating a special case. And yes, I get that it's a useful hack in programming.

So anyway, IANAM. What I learned was that 1/0 is infinity. And in software, that generally means a divide-by-zero error. But I also learned the utility of making approximations and exploring behavior at limits. And 1/x obviously increases exponentially as x approaches zero.

So how, then, can 1/x all of a sudden be zero when x is zero? It makes no sense to me. Call it undefined if you like. But it's obviously not zero.
From the url it looks like marketwatch.com site is using google's AMP thing to implement a lightweight site, then google is mirroring it / distributing it through some AMP CDN hosted from a google domain.

(this explanation is perhaps only 60% right, someone who actually knows about AMP may like to weigh in and correct me)
Another court case that proves a jury is far from scientific.
Things I learned from Donald Trump:

In most markets, rental properties are not profitable. Almost all of the profit comes when you sell the building, from appreciation. If you're breaking even on a rental, you're actually ahead of the game.
I get really wary of any "solution" provided or supported by google in this space, it's just a matter of time before they turn.
For what it's worth, I saw the same in a hot market in Iowa. I was taken aback, because generally speaking we saw a much less bad 2008-era than other places across the country. We have particularly low unemployment, which could be leading things to get stupid.
Aggressive flippers. If you have enough cash to fund N home flips, someone will lend you money and you can do N + X flips in the same time (if all goes well....)
Sadly my Xiaomi device doesn't..
> "there is an absolute notion of dysfunction, although I don't know how to define it"

Don't put words in my mouth and expect me to debate you.
Black cowboys
Usually, lots of people buy homes in a hot market. Definitely, not worst, if you plan to live in that condo and if your commute is 15 minutes.
I know some people think that. Personally, I hated both the programming model and the interfaces that resulted from it. It was much worse than the competitive HTML/CSS interfaces of the era to actually use in most cases.
Why wasn't the x87 instruction updated to use the implementation of the SSE2 instruction?
I'm a newcomer to Hacker News, but I have been a user of Stack Overflow and, more generally, Stack Exchange for some time. So perhaps I can still speak about the experience of a newcomer.

In my experience, neither site suffers fools gladly.

This morning I made a comment on a post on the first page of Hacker News. In it, I made reference to a project that I am working on independently.

A more senior user of Hacker News read my comment, considered it self-serving, and primarily a reference to my product. Then, he downvoted my comment (something I cannot do as a newcomer), looked at my other comments (something I didn't know how to do until later), and left a comment saying that nearly all of my comments on this site referenced my project and weren't substantively about the articles where they appeared.

As soon as I saw this comment I apologized, and said I wished that I could delete my comment about which that user was complaining.

Later in the day I learned how to see all of my comments by studying my profile. The comment I was criticized for was my second comment on Hacker News.

Whether the other user's criticism was appropriate or not, I got downvoted by at least a few other people after I apologized.

My sense of this situation, therefore, is that the progressive rights systems that give additional rights to users with previous contributions disadvantage new users.

The awarding of points to certain comments by other users and its connection to enhanced rights on Hacker News and other websites such as the Stack Exchange websites encourages certain behaviors that may not be entirely good for the culture of the sites themselves.
Stupid question, does anyone do this on purpose? (i.e. With the consent of the client side). In a way it seems like a good way to make income for content (say a blog post) rather than all the ad profiling nonsense that goes on now.
I tend to agree, tbh. I would prefer these tools to focus on making webpack examples and making themselves easy to use in webpack.

I hope that we can get away from the plethora of little CLIs at some point.
> Trying to remediate that by refuting the "proof" that it's undefined

He does not refute any proofs by citing that division by 0 is undefined. He refutes them by asserting that the multiplicative inverse doesn't exist. These are very different statements.

Neither the standard field nor his modified field use the zero inverse, 0⁻. The proofs he's criticizing do erroneously use 0⁻. That's what he's calling out, I believe.
Ask HN: Have my fears been confirmed?
I have always doubted whether I would be a successful programmer; in high school I excelled in history and politics. I pursued a BA, not a BS, in CS in college, and am doing reasonably well because of my effort. I have had some rough spots where I considered changing majors, but stuck with it, and learned some c,java,python, and sql in the process. I doubt my own skills not because two months ago I started my Internship, and I messed it up terribly. The first two weeks I was not given a lot of work because my team was already in the middle of a huge project. My mentor told me to read the code. I did, but was slow to start, because I did not know where to begin, and slow to understand. By 3 weeks, I understood some of what junit tests and what spring was, two concepts heavily used in the code base, but could not really contribute. However, I would volunteer for a few little tasks each week. I also had a horrible habit of sleeping late, so I would show up to work tired and unmotivated. I told myself that I was reading the code, but really I round be distracted on my phone, ensnared in theology and history books. My manager was so stressed that I could get away with this. So I was listless and useless for a few weeks. Towards the end, my manager gave me two small projects, and I did each, although I was not good with keeping tabs with him each day. When I finished each, I wanted to show him, but he was not interested. I learned today that during this weeks where I would lazily “read code,” he was expecting me to take initiative and come up with ideas. I also should have not kept sleeping late. I just blew a six figure job away. I feel stupid and entitled (why was I so sure I would get a return offer?), but now feel the need for personal discipline and to really start coding and reading coding books in my free time. I sort of dislike school thoug, and am afraid, with my BA, that I blew my lucky break
It depends why you were buying it. Were you buying to flip it as a short term investment, or a place to live in for the next 5-10-20+ years?

the market price only matters if you're forced to sell or forced to buy. if you dont need to sell or dont need to buy, you can ignore it
I think what he's really doing is downvoting you and being snarky toward you because you're a Google employee. Maybe what he's doing is immature, but a growing number of people feel that Google is bad for society and that aiding and abetting it is immoral. I know personally I wouldn't work for the Google of today.
> And yes, bureaucrats don't trust the researchers with their money. It's because a manager investing in research is like a bet with long odds, where you don't know what exactly you're betting on, and the bookie is a gambler himself. [...] The manager is happy if his investment was worth it in terms of time and money.

Wiener has an entire chapter on this. Research is a gamble by its nature and will rarely ever appear to be a good investment to a bureaucrat or manager. As I recall, Wiener seemed to want to move away from this model towards funding individual researchers with good track records, for this reason and also because management often does not understand what's important. While I do want to provide value to industry, I don't expect them to fund my research because they seem to be allergic to math in my field.

You also seem to be confusing research with development. If someone is asking for a manor, that's not research in my view. If someone is asking for a structure with certain properties and it's not obvious what the answer is immediately, that's research. Research often returns unexpected answers even when done intellectually honestly.

> Every one of my former colleagues learned to sell their knowledge in terms of benefits a manager understand. It's easier for you to understand their language than for them to understand yours.

I try, but it's frustrating when most industry folks lose interest you once you mention basically any math. As you've said, it's a learned skill, which I'm still learning. There are no guarantees, unfortunately.
Yes. Url changed from https://www.google.com/amp/s/www.marketwatch.com/amp/story/g....

Submitters: please don't post those! It's important that readers see what domain a story is coming from.
Most of the prisoner work programs are optional. Same with foreign labor, yes working conditions are not optimal and there are improvements that could be made.

However having an an alternative option is almost always better than not having that option. This problem may be best solved by actually making it easier for companies to participate in prisoner work-release programs, thereby increasing competition and driving up prisoner wages.