10 ms·
Show HN: Every Day Is Pi Day
- seszett 10y agoThe text is very blurry on my browser, I'm not sure if it's intended but it makes it hard to focus on what's written.
- teekert 10y agoThat is the "text-shadow: 0px 0px 1px;", indeed it has a blurring effect rather than an fancy shadow effect in this case, I agree.
- odonnellryan 10y agoFrom what I remember, that is actually supposed to "smooth" text in some browsers. Text used to look too sharp in Chrome (haven't had this problem in a while) sometimes. I believe that was one of the "fixes!"
- XaspR8d 10y agoI think that family of ClearType bugs persisted for like 5 years on Chrome for Windows (I only noticed it fixed last fall?) so I'm not surprised people were attempting extreme fixes. The text looked really bad. EDIT: Sibling post suggests it was fixed in 2014. I wonder what was wrong with my home laptop then, haha...
- nxc18 10y agoUntil about 2014, Chrome didn't support ClearType on Windows, which is why text looked so awful compared to other browsers. Mac's renderer happens to err on the side of drawing more pixels in case of ambiguity (e.g. calculation yields fractions of a pixel); this is why everything on a mac looks like its in bold with the default settings. Windows tends to err on the side of not rendering those pixels but this is configurable with ClearType. If you choose non-ClearType (what Google did in the early days), you have chosen to have ugly text that will not look good on anything other than a CRT in the 90s. Now, somewhat ironically, Google's text actually looks somewhat better than Edge's; Microsoft stopped using subpixel rendering (i.e. the best part of ClearType) in Metro/Windows Store Style/Modern/UWP apps years ago, while Chrome is still taking advantage of the feature.
- odonnellryan 10y agoWhat's the reason for this? Why wouldn't you just use ClearType all the time?
- nxc18 10y agoAs for why Chrome didn't implement it early on, they likely just hadn't bothered to use the newer APIs/use the APIs properly. The reason why subpixel rendering is disabled in modern/WinRT/UWP apps, as I understand it, is likely to do with rotation. Modern apps are designed for tablet use, where the display may be oriented in any particular direction. Subpixel rendering depends on knowing the layout of the pixel elements themselves (the position of the R, G, & B elements relative to the greater pixel). When rotated, the layout changes and subpixel rendering makes things look worse. In an ideal world, subpixel rendering would be turned off only in situations where the display is rotated. It appears that at least the rendering surface for Edge does use subpixel rendering, just not UI elements, which is an improvement over no use at all.
- trymas 10y agoI had the same question and I was perplexed why project maintainers thought it was a good idea to put a 1px blur effect on text. At first, I though they were showing badly compressed .jpg for text, which would be even more peculiar.
- flamtap 10y agoI thought the same thing, that there was some sort of image being displayed. Whcih had me really interested for a moment.
- torrent-of-ions 10y agoIn Firefox it shows it as an invalid rule, but you're not able to switch it off.
- maggit 10y agoFortunately, you can override it by adding, for example, `text-shadow: 0 0 0;` to <body>. I was unable to read the page before fixing this, I would strain my eyes trying to focus. (Perhaps this problem is exacerbated by "retina" screens?)
- beager 10y ago`text-shadow: 0 0 1px #bbb` looks slightly better, but nothing will look as good as letting the browser do its thing.
- tcfunk 10y agoI wonder if the intended effect was to create an artificial "bolding" of the text?
- theden 10y agoHey seszett good point, I removed the blur. For context, I wrote this project a while ago and never got around to cleaning it up.
- martin-adams 10y agoFor the curious, the source code takes a somewhat obvious approach: http://euler.party/pi.js http://euler.party/pi.js Yep, I think that is literally pi to 6 million decimal places then doing an indexof of the 6 digit year and 6 digit time of day.
- anfractuosity 10y agoI wonder if the 6 million digits cover all possible 6 digit year and time combinations, I guess it wouldn't be hard to bruteforce check. Edit: I just noticed for the time digits, it seemed to be reporting something like -2 a few minutes ago. '133343' doesn't seem to be part of the digits, which would represent 13:33:43. Unless I'm misunderstanding.
- ilogik 10y agoI wonder if it includes more digits than necessary :)
- tgb 10y agoThat's easy to check even with just ctrl+f: the last six digits are 422990 which occur 8 times throughout that string. Hence, we could remove at least the last digit without losing anything.
- oneeyedpigeon 10y agoIt also includes sequences that can never match such as "999". I wonder if overwriting those with a non-digit would allow indexOf to be infinitesimally faster?
- zulln 10y agoIt certainly does not, see this comment: https://news.ycombinator.com/item?id=13868201 https://news.ycombinator.com/item?id=13868201 You can remove some digits and get the same result as today (see https://news.ycombinator.com/item?id=13867324 https://news.ycombinator.com/item?id=13867324), but as it lack so many situations as it does I would not say so.
- onion2k 10y ago"Euler" is pronounced "Oiler", which makes the domain quite amusing if you share my childish sense of humour.
- topbanana 10y agoOiler party? I must be missing something
- gpvos 10y agoNo idea what the joke is; do you have to be a native speaker of English to understand it?
- ClassyJacket 10y agoI'm a native English speaker and I don't get it either.
- mod 10y agoNope, you have to be that guy to understand it. There's a few slang definitions for "Oiler" on Urban Dictionary, but I've never heard any of them except the hockey team mascot.
- bionsuba 10y agoIt's a joke about strippers.
- z3t4 10y agoI can foresee American obesity going up when every day is π day ...
- tgb 10y agoSeems rather funny that it doesn't do the MMDD interpretation, too, given the current date.
- someloll 10y agoI loved this: http://euler.party/pi.js http://euler.party/pi.js but it could have been done better by preallocating an array of size [86400] (all seconds in a day)
- martin-adams 10y agoBut it's also used for the date as well
- Jaruzel 10y agoFor most of us in the world, No Day is Pi Day. http://imgur.com/1r5QpQu http://imgur.com/1r5QpQu
- trcollinson 10y agoIt seems this Show HN proves you rather wrong. I understand the point, you use a different format for your dates than the US. But the point of this Show HN is that all number sequences can be found within the digits of pi quite easily. Very neat demonstration!
- Jaruzel 10y agoyou use a different format for your dates than the US 'I' use? I think you'll find everyone uses a different format than the US. ...the point of this Show HN is that all number sequences can be found within the digits of pi... Everyone already knows this. I'm just struggling with the wall-to-wall 'Pi Day' articles all over the tech web and Facebook right now. I make no apology.
- justusthane 10y agoeveryone uses a different format than the US. 'Everyone uses'? What about all the people in the U.S.?
- tossaway1 10y ago> 'I' use? I think you'll find everyone uses a different format than the US. The plural of "you" in English is"you"...
- atonse 10y agoIt's always fashionable to make fun of the US doing things its own way, when that's just seldom true. You're mostly right that nobody else uses MMDDYYYY (although many countries use it as a secondary format). But it's not like there's a consistent format that _everyone else_ uses. There are 2-3 different formats spread around the world, with no real consistency in why some pick a particular format.
- partycoder 10y agoAn approximation of Pi I put together just now var i, a = 1, s = false; var steps = 10000000000; for (i = 3; i < steps; i += 2) { a += s ? 1/i : -1/i; s = !s; } console.log(a * 4); That loop approximates arctan(1) with a Taylor series, only using basic arithmetic operations. pi = arctan(1) * 4 Outputs: 3.141592653388201 ^-- last correct digit
- zabed143 10y agoClipping Service India is an online outsourcing company. We provide service in the field of photo editing and graphic design, specialist in... Clipping Service India is an online offshore graphic design studio providing clipping path, Photoshop masking, image manipulation, image retouching, Color Correction, drop shadow, Reflection shadow, Multiple clipping path, raster to vector, Website image optimization, all types of photo editing service... Clipping Service India is established in order to provide image editing services through internet and this internet makes our life very easy and comfortable to communicate around the world's people within in a click on mouse. http://www.clippingserviceindia.com/index.php http://www.clippingserviceindia.com/index.php
- zabed143 10y agoNews for everything here http://www.clippingserviceindia.com/index.php http://www.clippingserviceindia.com/index.php
- spcelzrd 10y agoMy birthday is Pi Day. Now I don't feel so special anymore.
- deleted 10y ago[deleted]
- dwe3000 10y agoI [think I] understand the annoyance with indicating Pi Day based on the US order for month/day (though, I normally use ISO 8601 as my first choice, also), but I think some people may be missing the point. In the United States, with poor STEM performance, anything that increases awareness of math in the United States is beneficial, even if it is in an extremely arbitrary way.
- lutusp 10y agoI just performed an experiment with this 100 * 10^6 sequence of Pi and found out that a reasonable approximation of pi (31415926) is located at an arbitrary location within the sequence (apart from the obvious location): Test sequence found at location 0. Test sequence found at location 50366472. 2 instances of "31415926" within the first 100 million digits of pi.
- deleted 10y ago[deleted]