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

The fact that on the summary page there isn't a number showing the significance is very worrying. As the whole reason for it is to make a binary choice, there could be a 2 line chuck of js that just says "B might be better (60% probablity)".


Running their numbers:

Assuming the usual sqrt(n+1) error on a count, as n is low. Combining the uncertainties from 83/66 [0] gives 1.258 +- 0.231 (1sd). It's only just likely that it is an actual improvement, but there is about a 30% chance that the orignal was better.

[0] (((1+66^0.5)/66)^2+((1+83^0.5)/83)^2)^0.5x83.0/66

EDIT

If we also include the errors on the total counts and use the fraction 83.0/66/6362x6392, then the error is:

(((1+66^0.5)/66)^2+((1+83^0.5)/83)^2+((1+6362^0.5)/6362)^2+((1+6392^0.5)/6392)^2)^0.5x83.0/66/6362x6392

which shows an improvement of 1.264+-0.234. Stastically nout.


HN protects itself quite well from very long URLs. But reddit[0] will happily host 20kB.

https://www.reddit.com/r/programming/comments/47gjbv/experim...


I like YYYY-MM-DD as it is also sortable and doesn't require any escaping as a file name on windows or Linux. It's part of ISO8601.


slashes or dashes makes no difference to me, still the most readable formats, since we are used to the biggest number first, from our numbering system :)


I remember someone built it, they abused self posts for storage. My google-fu is failing and I can't find it.


I think RedditStorage was what you were looking for: https://github.com/Rossem/RedditStorage

(I also found redditfs, which is for browsing reddit: https://github.com/ianpreston/redditfs)


Go for it!


If you know what you are doing it's fine, but it might cause incompatibility issues from namespace collisions.

You can rearrange the code to accept a context as the first argument if you are worried.


Yes, but this is as simple. It's not really my maths, it's quite standard stuff.

I'm more excited about Path2D[0] becoming adopted by more browsers.

[0] https://developer.mozilla.org/en-US/docs/Web/API/Path2D


I wrote this for a small game I'm updating, which has about 30 objects colliding. However in my situation because it has so few objects the overhead is greater than the time saved. This system works really well when there are many objects.

See if you can use a regular quadTree if you can find a way to do it. It'll be faster than this.

I don't know about the _most_ efficient method. That is a field of research bigger than my weekend project.

Good luck.


I'm also working on a 2D game. I end up with hundreds of objects so maybe this solution will make more sense in my case. I have to run benchmarks...

I like the approach of finite-size objects since I'm mostly working with creatures that collide or not based on their radius. I also have some polygons, but I can easily simplify them into circles (https://en.wikipedia.org/wiki/Smallest-circle_problem).


If anyone want to use it, I've put it out under the MIT License (available now in the updated source).

However I think most people will look at the ideas involved and implement it in there own way as I've made a few assumptions about the structure of the objects being put in the tree.


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

Search: