Archive for November 5, 2016

Saturday, November 5, 2016

PaintCode 3 Leaves the Mac App Store

PixelCut (via Erica Sadun, Marco Arment):

PaintCode 3 adds support for Swift 3.0 and Swift 2.3, fully compatible with Xcode 8, iOS 10, and macOS Sierra.

By carefully analyzing the Swift compiler and tailoring the generated code to it, we were able to improve the compilation speed by more than 150x in many common cases.


With PaintCode 3, you can now export JavaScript code that can be used to draw into <canvas> elements.


With PaintCode and Telekinesis, you can. Changes you make to your app’s design in PaintCode are propagated in real time into your running app. Works like magic.

Fantastical 2.3 for Mac


If you use Fantastical on a small-screen Mac, you’re going to love this feature. You can now completely hide the sidebar in the main calendar window, allowing your main calendar view to take up the entire window. Just drag to resize, select View > Hide Sidebar from the Menu, or press option-command-S.


Calendar sets are even better in 2.3, as you can set a default calendar and reminder list for each calendar set.


You can now press control-shift and hover over overlapping events in the Day or Week view to quickly view more details. Or press control and an arrow key to reschedule a selected event or reminder instantly. We also added support for traditional mouse scroll wheels in the Day, Week, Month, and Year views (classic mouse enthusiasts rejoice!)

Great stuff, although unfortunately the Control-arrow rescheduling doesn’t work from the mini window.

Pornhub Bypasses Ad Blockers With WebSockets

BugReplay (via Hacker News):

Initially, the risks to ad blockers seemed theoretical; the examples of sites that were employing this technique were very obscure. Then in August 2016, an employee of the company that owns (MindGeek) started arguing against adding the WebSocket blocking capabilities to the Chrome API. Pornhub is the 63rd most visited site on the Internet according to Alexa. I checked out a few of MindGeek’s sites and sure enough, I could see ads coming through even though I had Adblock Plus on. The ads on Pornhub are marked ‘By Traffic Junky,’ which is an ad network owned by MindGeek.


When the WebSocket loads, the browser sends a frame with a JSON encoded payload for each of the spots it has available for ads.


Since I started looking into this, AdBlock Plus and uBlock Origin have shipped workarounds to block this technique. AdBlock and others still do not.

H.264 Is Magic

Sid Bala (via Gus Mueller, Hacker News):

Because now, you can take that frequency domain image and then mask out the edges - discard information which will contain the information with high frequency components. Now if you convert back to your regular x-y coordinates, you'll find that the resulting image looks similar to the original but has lost some of the fine details. But now, the image only occupies a fraction of the space. By controlling how big your mask is, you can now tune precisely how detailed you want your output images to be.


The Y is the luminance (essentially black and white brightness) and the Cb and Cr are the chrominance (color) components. RGB and YCbCr are equivalent in terms of information entropy. […] But check out the trick: the Y component gets encoded at full resolution. The C components only at a quarter resolution. Since the eye/brain is terrible at detecting color variations, you can get away with this. By doing this, you reduce total bandwidth by one half, with very little visual difference.


H.264 splits up the image into macro-blocks - typically 16x16 pixel blocks that it will use for motion estimation. It encodes one static image - typically called an I-frame(Intra frame). This is a full frame - containing all the bits it required to construct that frame. And then subsequent frames are either P-frames(predicted) or B-frames(bi-directionally predicted). P-frames are frames that will encode a motion vector for each of the macro blocks from the previous frame.


I was hoping the author would write about H.264 specifically, for instance, how it was basically the “dumping ground” of all the little tweaks and improvements that were pulled out of MPEG-4 for one reason or another (usually because they were too computationally expensive), and why, as a result, it has thousands of different combinations of features that are extremely complicated to support, which is why it had to be grouped into “profiles” (e.g., Baseline, Main, High).

I was also hoping that he would at least touch on the features that make H.264 unique from previous MPEG standards, like in-loop deblocking, CABAC Entropy Coding, etc..