Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
shazow
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
73 ms
·
631.
▲
by
shazow
16y ago
The biggest barrier for me going to sleep at a reasonable hour is the required ritual just before going to bed. Brushing my teeth, flossing, taking a shower, changing into bed clothes. From now on, I'm going to try this: - Brush my teeth, f
632.
▲
by
shazow
16y ago
Make that first two spots.
633.
▲
by
shazow
16y ago
Please please please do not make the API dependent on HTTP method verbs. This completely breaks JavaScript apps[1] and it's an arbitrary constraint that does not benefit anything except REST zealotry. [1] For example, cross-domain JavaScrip
634.
▲
by
shazow
16y ago
I liked this one more: “Zuck [...] went ahead and built Facebook, and just to prove how useless everything we teach about efficiency and careful software design in CS161 really is, he implemented it in PHP.”
635.
▲
by
shazow
16y ago
Able to do the same things as before, but in a week instead of a year.
636.
▲
by
shazow
16y ago
As far as I can tell, isogenicengine is not published. There's a beta signup, that's about it.
637.
▲
by
shazow
16y ago
True story. Wasn't aware of Benchmark.js, looks good! Anyone want to fork n' port? :)
638.
▲
by
shazow
16y ago
You're right, I should be running each test at least a few times and taking the average. I found that the results vary a few percent here and there, but the drastic difference between the different datastructures is always consistent and vi
639.
▲
by
shazow
16y ago
Almost all of those methods use approximately the same amount of memory, though the performance varies drastically. The key is that few people know what's actually going on underneath the JavaScript interpreter engine. In some cases it coul
640.
▲
by
shazow
16y ago
I was trying to benchmark the actual speed of updating the canvas, in hopes that it was doing something clever behind the scenes. I can see that it's not a fair comparison, but a fair comparison is completely redundant with grid_array_1d (e
641.
▲
by
shazow
16y ago
Ah, you're right about that! I'll fix it when I have a chance, though it wont affect the performance. You're welcome to clone the repo, make changes, and run the tests yourself (just open index.html in a browser). I was surprised too, but m
642.
▲
by
shazow
16y ago
The loop is from w-1 to 0 and h-1 to 0. https://github.com/shazow/grid-benchmark.js/blob/master/inde...
643.
▲
by
shazow
16y ago
getImageData returns an array equivalent to grid_1d_array. The computation required to translate the 2d position (in this case 3d position as there's 4 slots per index) is what killed the performance of grid_1d_array. Also I don't see how i
644.
▲
by
shazow
16y ago
I've been meaning to try WebGL. Any interest in contributing an example into structs.js? Edit: Or I guess it would need to go into a separate <script> block, could make a structs_webgl.js one.
645.
▲
by
shazow
16y ago
That's one of the ones I tried, but I needed some tests to create new objects, and others to reuse the same object which was already created previously, and I wanted to compare the numbers together rather than in isolation. To use jsperf, I
646.
▲
by
shazow
16y ago
I considered this but there weren't any existing services that did this and allowed me to make the type of tests I needed to make (and I didn't want to spend unnecessary time building one). I also ran the benchmarks on Firefox and though th
647.
▲
I benchmarked 8 different ways of representing a 2d grid in JavaScript
(github.com)
60 points
by
shazow
16y ago
|
33 comments
648.
▲
by
shazow
16y ago
Fantastic. Signed in using Twitter OAuth, imported my Delicious backup, completely painless. Now if you release an API and people make awesome Chrome/Firefox extensions, you're on your way to sell this beauty to Yahoo! :P Edit: Looks like t
649.
▲
by
shazow
16y ago
A rounding error that causes a fast-paced Javascript game to crawl to a laggy stutter when repeated all over the place. Regardless, the Closure Compiler (that the Closure Library is made to be used for) fixes this common case. Another examp
650.
▲
by
shazow
16y ago
Finally, a hackernews I can keep up with.
651.
▲
by
shazow
16y ago
That sounds amazing. Side note as someone who grew up in Toronto and lived in the downtown core for several years: A studio would go for under $1200/mo. You can get a pretty swanky 1bdrm for under $1400/mo. Though I have no doubt one could
652.
▲
by
shazow
16y ago
Very cool! Incredibly slow on my MBP + Chrome though. :( I wrote my first version of it in 2006 in Pygame: https://gist.github.com/728623
653.
▲
by
shazow
16y ago
Speaking of Tron and HTML5, wrote this a couple of days ago: http://shazow.net/linerage (most fun with 2+ players).
654.
▲
by
shazow
16y ago
I'm not convinced that great designers do things completely instinctively as they go along but fact of the matter is it does take a lot of time (especially if you're spending 90% of your time learning how to do everything), and I have no
655.
▲
by
shazow
16y ago
The cliff is incentive to stay that first full year. The gradual vesting of the rest of the equity is incentive to stay past it. If people are leaving immediately after the first cliff, then the proportions might need to be adjusted. Perhap
656.
▲
by
shazow
16y ago
+1 to Linode.
657.
▲
by
shazow
16y ago
Pylons is still a great framework, and will be for the foreseeable future (a few years?). Just because it matured and reached its end-of-enhancements life, doesn't mean it's not useful. It will take a while for Pyramid to mature to this lev
658.
▲
by
shazow
16y ago
Eh, it's a good market to take those kinds of risks right now. Everyone is hiring, no one wants to be hired as they're doing their own startup, it's ridiculously easy to get a job—especially at startups.
659.
▲
by
shazow
16y ago
Ah, counting profanity in source code, a favourite pastime: http://www.vidarholen.net/contents/wordcount/
660.
▲
by
shazow
16y ago
You're in Toronto? Let's grab lunch! I'm in town until the 16th. Hit me up, shazow at gmail.
More ›