BiteofanApple Archive About Code Twitter
by Brian Schrader
Archive About Code Twitter

How to stimulate the open web

Posted on Sun, 31 Aug 2014

Fantastic advice. We developers should provide a feature like this in our apps/services. I know I'd use it in heartbeat. A proactive dev could use this feature to allow their users to leave Twitter/Facebook and still use their favorite apps.

This also gives me an idea.

How to stimulate the open web →

-Thanks for reading,
      Brian Schrader

Numba: Compiling Python Using LLVM the way WebKit Compiles JavaScript

Posted on Sat, 30 Aug 2014

In May, Apple announced a new feature in WebKit that added a fourth tier of speed optimization for JavaScript in Safari. In this new tier, JavaScript would be compiled to machine code (specifics aside). This kind of optimization (called FTL JIT) gave Webkit a 35% performance boost when compared to the third tier of optimization, pretty impressive.

It seems someone thought that JavaScript was getting all the love when it came to speed optimizations and thought Python should benefit from this idea as well. That became Numba. Numba allows Python developers to annotate any given segment in their code, that segment will be just-in-time (JIT) compiled using LLVM giving it, potentially, a 2 orders of magnitude improvement in speed!

# Code from
from numba import jit
from numpy import arange

# jit decorator tells Numba to compile this function.
# The argument types will be inferred by Numba when function is called.
def sum2d(arr):
    M, N = arr.shape
    result = 0.0
    for i in range(M):
        for j in range(N):
            result += arr[i,j]
    return result

a = arange(9).reshape(3,3)

After talking to someone who'd actually used Numba in their code, they say their code saw anywhere from 2x to 500x speed improvements depending on what they were doing (using regular, old vanilla Python). That's really impressive. I can't wait to try out Numba, and I think I have some very interesting use cases coming up where this might be the solution I've been looking for.

-Thanks for reading,
      Brian Schrader

Waffle, Brent and Marco on Social Networks

Posted on Thu, 28 Aug 2014

I've been thinking about this a lot over the last few days. What would it mean to have a social network (like Dispora) that is decentralized, and independent of corporate ties? Could such a thing exist? Would it take off? Maybe. For now though Waffle, Brent and Marco are right. Social networks will rise and fall. Blogs, and RSS may never be as popular, but they don't have to be.

They're playing the long game.

Marco: Brent on the shifting sands of social platforms

-Thanks for reading,
      Brian Schrader


Subscribe to the RSS Feed. Check out my code on GitHub
Creative Commons License
BiteofanApple is licensed under a Creative Commons Attribution 4.0 International License.