Readit News logoReadit News

Deleted Comment

traderjane commented on 0.999...= 1   en.wikipedia.org/wiki/0.9... · Posted by u/yurisagalov
2OEH8eoCRo0 · 6 years ago
Ask for a number between .9 repeated and 1
traderjane · 6 years ago
It's the smallest number bigger than 0.
traderjane commented on 0.999...= 1   en.wikipedia.org/wiki/0.9... · Posted by u/yurisagalov
kangnkodos · 6 years ago
But on computers, you get things such as

console.log(0.1 + 0.2)

// 0.30000000000000004

A mathematician might say that this shows that you do not really have accurate floating point values and arithmetic in your computer, but instead something close to it.

traderjane · 6 years ago
That's a coincidence of the particular number system you use, and many programming languages have multiple number implementations.

Racket starts with arbitrary precision rationals.

Deleted Comment

traderjane commented on 0.999...= 1   en.wikipedia.org/wiki/0.9... · Posted by u/yurisagalov
undecisive · 6 years ago
There is no proof that will ever satisfy a person dead-set against this. Ever since I brought this home from school as a child, my whole family ribbed me mercilessly for it.

If you tell a person that 3/6 = 1/2, they'll believe you - because they have been taught from an early age that fractions can have multiple "representations" for the same underlying amount.

People mistakenly believe that decimal numbers don't have multiple representations - which, in a way is correct. The bar or dot or ... are there to plug a gap, allowing more values to be represented accurately than plain-old decimal numbers allow for. It has the side effect of introducing multiple representations - and even with this limitation, it doesn't cover everything - Pi can't be represented with an accurate number, for example.

But it also exposes a limitation in humans: We cannot imagine infinity. Some of us can abstract it away in useful ways, but for the rest of the world everything has an end.

I wonder if there's anything I can do with my children to prevent them from being bound by this mental limitation?

traderjane · 6 years ago
You must go up to something like limits to make ... meaningful.
traderjane commented on 0.999...= 1   en.wikipedia.org/wiki/0.9... · Posted by u/yurisagalov
traderjane · 6 years ago
Professor N.J. Wildberger is probably among the most well known "ultrafinitist" on YouTube.

https://www.youtube.com/watch?v=WabHm1QWVCA

I mention him because I would think he sympathizes with those who have concern over the meaning of this kind of notation.

traderjane commented on A Critique of React Hooks   dillonshook.com/a-critiqu... · Posted by u/vicarrion
dcre · 6 years ago
I don't see how generators would change anything here. "with effects", "stateful", and the integration between the two are all equally important in the statement.
traderjane · 6 years ago
What are generators for you?
traderjane commented on Why can't programmers design software?   qnoid.com/2011/02/23/Why-... · Posted by u/goranmoomin
traderjane · 6 years ago
Summary: 2011 OO FizzBuzz joke...
traderjane commented on A Critique of React Hooks   dillonshook.com/a-critiqu... · Posted by u/vicarrion
dcre · 6 years ago
An important point I don't see being made in the article or the comments is that hooks are meant as a more faithful (or at least less misleading) representation of what was going on under the hood in React already.

The problem with the JS class representation is that people already understand what classes and instances are, and that leads to incorrect inferences about how React is working. In addition to better-organized code, the hooks abstraction is partly aimed at preventing people from making those wrong inferences. This also explains why they are uncomfortable compared to classes and functions — the point is that was a false comfort because those representations are misleading.

Dan Abramov calls hooks a "missing primitive":

"Why are these models insufficient to describe React? “Pure function” model doesn’t describe local state which is an essential React feature. “Class” model doesn’t explain pure-ish render, disawoving inheritance, lack of direct instantiation, and “receiving” props.

What is a component? Why do you start writing it one way and then have to convert into another way? Why is it “like A but also like B”? Because it’s neither. It’s a thing of its own. A stateful function with effects. Your language just doesn’t have a primitive to express it.

That’s what Hooks are. Those missing primitives. They are library-level but conceptually they are part of the “React language”. Hence the language-like “rules”.

They could be syntax. They would be in Eff or Koka. But the benefits are not worth the friction it creates in JS."

https://twitter.com/dan_abramov/status/1093696560280596491

https://twitter.com/dan_abramov/status/1093697963350810624

https://twitter.com/dan_abramov/status/1093698629708251136

traderjane · 6 years ago
> A stateful function with effects. Your language just doesn’t have a primitive to express it.

I wonder what about generator functions?

traderjane commented on It’s Not Too Late to Go on Offense Against the Coronavirus   newyorker.com/science/med... · Posted by u/ISL
aphextron · 6 years ago
It's absolutely depressing knowing that this all stems from a complete utter lack of leadership at the federal level. That states are having to implement their own policies and plans of attack for this virus is a total travesty. Massachusetts is undoubtedly leading the way here. But this is a global pandemic, that can only begin to be approached at the national level. With our society's level of interconnectedness, state level interventions are completely meaningless.
traderjane · 6 years ago
I find it somewhat comical that the governor of Maryland had his wife pull South Korean connections to buy masks. So terribly ad hoc.

u/traderjane

KarmaCake day785October 24, 2018View Original