Skip to main content

Posts

Showing posts from June, 2009

ASE 0.8 Alpha Released

I just finished releasing version 0.8 alpha. The most significant changes in this release are: À la carte interpreter installation. which drops the installation size from 4.3MB to 900kB. With all interpreters installed, ASE now takes 7.9MB. User scripts are now stored on the SD card and persisted across reinstallations of ASE. This should also make it easier to copy scripts to the device from a host computer or the web. Visit the ASE project page to download the new APK. To install interpreters, click Menu, Help, then follow the directions under the InstallingInterpreters wiki page.
Read more

Solving Car Talk Puzzlers with Python

If you're not familiar with Car Talk , it's a horrible talk radio show hosted by Tom and Ray Magliozzi (aka Click and Clack the Tappet brothers). Every week there is a new puzzler and every so often it's math oriented. After hearing this week's mathy puzzler, I thought it would be fun to dig into the archives ( 2009 and 2008 ) and try solving a few of them in Python. Here's what I came up with: # 2008-10-20 The Perfect Square Dance! import itertools, math for numbers in itertools.permutations(range(1, 19)): for a, b in zip(numbers[::2], numbers[1::2]): sqrt = math.sqrt(a + b) if not str(sqrt).endswith('.0'): break if a == 1: sallys_partner = b elif b == 1: sallys_partner = a else: print 'Sally danced with %d' % sallys_partner break # 2008-10-27 One is the Magic Number print ''.join(str(n) for n in xrange(0, 1000000)).count('1') # 2008-12-08 It's Math Time! for ab in xrange(10, 100):
Read more

Scripting on Android

Today I released a project I've been working on for some time. You may remember a couple earlier posts where I got Python and Lua working on Android. I've wrapped up those hacks into a nice Android application called Android Scripting Environment (ASE). But wait, there's more! See the official blog post on the Google Open Source Blog and the project page for details. Further updates will be publish here with the "ase" tag.
Read more