Weblogs


Generators redux: UnYield

2014-03-10 20:21:39

While the new and upcoming ES6 specification will bring the yield keyword to the JavaScript landscape, this new feature doesn't actually enable something that can't already be done. After speculating about how I would do make the transla...


Deferred document.write

2014-03-08 22:07:52

The most difficult client-side problem to fix at Surfly is without doubt syncing document.write. There are so many idiosyncracies regarding docwrite that it should come as no surprise that use of it is highly discouraged. However, for Su...


Translating yield to ES5

2014-02-16 17:52:19

The next version of JS, ES6, will ship with a couple of new gimmicks. One of them is the yield keyword. It's basically a tool you can use to pause a function mid-way, only to continue it at some later point. If you're thinking promises n...


JS1k 2014 behind the scenes

2014-02-13 23:29:32

In hindsight I probably should have delayed the JS1k contest until I finished the backend. I just needed to updated it to the current state of affairs and use it. But instead, I decide to do something fancy with Bootstrap and AngularJS. For a backend...


Vertical alignment in css

2014-02-13 21:34:37

And while HTML will celebrate its 23rd anniversity this year, it's still a big pain to center something vertically. Oh yes, I went there. I had to. I find it hard to believe that over all this time nobody that could figure "hey, people need this, let...


External style tag

2014-02-13 20:49:53

I don't write much html these days. I'm a JS guy. So when I do and I have to include an external style sheet I always have to lookup the actual link syntax from another project or google. So annoying. Legacy is nice, but forward thinking might be ...


Fuzzing a parser

2014-01-22 03:14:54

The single biggest performance bottleneck of my JS parser is the tokenizer. And by far the most expensive problem in there is determining what to parse next. Imagine this; you're in a random city. You have no idea where to go next. No google maps ...


Heatfiler v2

2014-01-05 20:00:30

Recently I've spent some off-and-on time to improve Heatfiler, my heatmap profiler. I was using it to optimize ZeParser2 and ran into a few minor things that were bugging me. Besides that I've received some feedback that the UI was slightly confusing...


Finding memory leaks with JS

2013-12-11 01:09:17

When you code in JS you generally don't have to worry about memory so much. Certainly not as much as the lower level languages have to. However, that doesn't dismiss you from catching memory leaks. Yes, there's a garbage collection system that's smar...


The problems of JIT

2013-11-10 14:46:32

JIT is great. Don't get me wrong. It's what makes current JS run as fast as it does. But when you're trying to reach for super micro optimizations, it's a blessing but very much also a curse. The problem is that it is a black box and you're reaching ...