Kindle hacking and clocking…

There’s a super little Instructable on how to make a Literary clock using a Kindle. Well, I happened to have an old school original Kindle 3 about and dived it. Some observations….

  • The jailbreaking materials for the Kindle are functional but there’s so many images out there its easy to see why people can get confused.
  • The USB/Wifi Networking hack is pretty good to work with when you’re doing USB only, but I wasn’t sold on Wifi configuration, so I stuck with USB and the joy of self-assigning IPs.
  • The instructable’s own assets are easy enough to install and get running. It basically wakes up every minute and puts up the appropriate image as pre-rendered on the desktop with a Python script.
  • The time is wrong, even when set to BST and I can’t seem to correct it. Timezones seem to be odd inside the Kindle, TZ adjustments seem to only work in the negative. Still, proof of concept…
  • Swapping the display image sees the screen flash a few times which would be nice to reduce.
  • And it has to be a passive USB power supply to stop the USB disk mode kicking in.

But it is rather splendid and has set me on a course of looking at the Kindle and a slab of ePaper with a small Linux to hand and an ability to run Python. Now, thats interesting…

ESP32s and Python and more

An edifying weekend saw me looking at a whole load of ESP32 based boards – The WiPy 2.0, the Sparkfun ESP32 Thing and the Huzzah32… and in turn a whole set of MicroPython variants… MicroPython is a shrunk down Python 3 for embedded devices and it can fit in some pretty small spaces – there’s a version for the MicroBit even. Anyway, I wanted to find out if I could do a particular projects proof of concept using MicroPython. Let battle commence…

First up was – Pycom’s MicroPython for the WiPy 2.0 is well packaged and relatively complete; it includes RTC support and enough other drivers that I was able to build my proof of concept device. The VS Code integration was neatly done and so much more useful than previous attempts… But the board is literally just the processor. Supply power on the pins and bring your own USB or use their expansion boards. That was already bumping the costs up…. before I went further prototyping (as the rig was already syncing clocks, reading RFID cards and posting to REST endpoints) I thought I’d have a look around.

Next up was Adafruit’s Huzzah32 Feather.

It’s a lovely little Feather board – I do like the Feather form factor and with the new Express boards bringing CircuitPython into play things look interesting. CircuitPython is Adafruit’s fork which tries to simplify the whole thing with embedded hardware where lots of physical features turn into code for particular boards and stop things being portable. Great idea. Turns out the Huzzah32 doesn’t have a CircuitPython port yet though… CircuitPython is an interesting fork but it needs a target board with a bit of WiFi. The Huzzah32 does have the USB and LiPoly support so theoretically it could run MicroPython… let’s try straight MicroPython on an ESP32…

Specifically, lets go back to MicroPython and run from the fork for ESP32. This was to run on the Sparkfun ESP32 Thing, which is a super practical hacking board at a decent price and complete with USB and LiPo battery support. It’s not a small board, but it’s easy to shoehorn in. Then there’s the current MicroPython for ESP32 – like pretty much every API for the ESP32 it’s a work in progress, but this work in progress hurt hardest when I found no RTC clock support in MicroPython at the moment.

The weird part is… writing the Python code was pretty plain sailing for this embedded environment, so I’m guessing it can only get better.

Meanwhile for the proof of concept project…. Heading back to the Arduino framework was no less fruitful. Again, missing RTC support lead the problem set. So I’m back on the WiPy 2.0 to finish the PoC and wondering if I really want to get all C++y to use the Espressif native tool chain. At least there’s be no lack of drivers…

But, and I didn’t think I’d say this…. but I cant wait for Python to harden up in the embedded space.

Developer Catchup: Docker 1.1.0, Rust 0.11.0, Python 2.7.8 and Dropbox Go Libraries

developercatchupDocker 1.1.0: The first post 1.0 update for Docker is in and Docker 1.1.0 now has a .dockerignore mechanism for ignoring file changes, containers that now pause when a commit it happening (rather than messing them up), container log tailing, the ability to feed tar archives to docker build and other changes which should make life a bit easier and more predictable.

Rust 0.11.0: The latest Rust announcement for version 0.11.0 is about smoothing out the type system to allow for dynamically sized types and refactoring the standard libraries to allow for that. It means that language embedded elements like ~ and @ have become library types called Box and Gc that should make the language easier to understand. It all brings Rust 1.0 closer – by the end of the year is the current hope.

Python Updates: The start of July saw a Python update for various security issues – Python 2.7.8 updated the OpenSSL library, fixed mimetypes and UNC paths regressions and blocked an arbitrary code execution hole in CGIHTTPServer. There were also a number of core and library fixes detailed in the release notes. There was no corresponding update for Python 3.x though the CGIHTTPServer issue is scheduled to be fixed in Python 3.4.2 according to the in progress changelog.

Dropbox Go: Dropbox, a big Python user, has also been working with Go and has been moving its infrastructure to Go based code. In the process, they’ve written a lot of libraries to support that work and now they are open sourcing those Go libraries with a 3 clause BSD license. There’s code for caching, an improved error interface, a programmatic SQL statement builder, a memcahce client library, connection management and a space efficient hash library. And they will be doing it the right way – they’ve committed to using the public versions of the libraries inhouse (rather than maintain their own branch). You’ll find the documentation for all the libraries over at

Codescaling Catchup

CodescalingCatchupRegular readers may have noticed a bit of a slow down in postings as I’ve been rearranging the scheduling of things here at Codescaling to allow for other commitments. Hopefully, I’ll be doing a regular Sunday catchup of what would have been snippets and during the week I should, all going well, be looking at a particular thing, be it software or hardware, thats in scope that week. As some may know, I’m curating HackWimbledon and may cover some of the hands on stuff there. But enough of plans… What’s on the catchup this week…

I’ve been doing some work with Eclipse Orion, a web-centric IDE with some interesting attributes, so I was interested to see news of forthcoming language support enhancements coming in Orion 6.0. Lots of interesting bits like syntax highlighting that brings in Arduino files, new documentation generators, the ability to use all the tooling while the JavaScript is embedded in HTML, better tunable JavaScript validation with new rules and so on… worth checking out.

Google landed Go 1.3 this week and it does seem to feel quicker and slicker (I’m getting on with Go code myself and noticed the difference). The experimental support for DragonFly BSD, Plan 9 and Solaris is intriguing… Go on Plan 9 feels like a giant philosophical loop being closed. Also interesting is discussion of Go for Android from one of the Go team… it seems to be on course to start emerging in Go 1.4.

Big news in Python land where the PyPy team landed the first stable release of PyPy3. PyPy is a very compliant Python interpreter with a tracing JIT compiler built in. It had been stable only on Python 2.x but now there’s PyPy3 (libraries are at Python 3.2.5 level, unicode support from Python 3.3). At some point the Python 2.x->3.x transition logjam will be broken and this will be a big help.

Coin cells didn’t immediately strike one as a space for useful research but I was proved wrong on reading How much energy can you really get from a coin cell?, where different makes and models of cell were compared using an ARM controller which systematically loaded each battery. I’m more curious about this now as I just took delivery of PunchThrough’s Light Blue Beans, Arduino style controllers with Bluetooth and powered by a coin cell, but more about those in a future Codescaling post – till then check out the Surf Report Notifier.

The OpenSSL/Heartbleed fallout continues with Google’s latest move, BoringSSL, a bidirectional fork (the codebase’s separate but patches continue to flow in both directions – it needs a term, so bidifork) of the OpenSSL code. Google seem to be using bididforks to allow them to stay plugged into communities but retain control of their destiny; Webkit and Blink seems to be the first bidifork. Whether they work, we don’t know, but I suspect that its an area ripe for research and even formally recognising as an middle course for open source projects between fighting and forking.

On the Todo list – have a look at the Maynard/Wayland desktop on the Raspberry Pi, check out the OEM BeagleBoard Blacks, browse through the undocumented Swift standard library and now it’s a 1.0, checkout the WordPress REST API.

TypeScript 1.0, IPython 2.0.0 and Rust 0.10 – Snippets


TypeScript hits 1.0: Microsoft’s take on reworking JavaScript, TypeScript, has hit version 1.0 and is now accepting pull requests on the open source compiler (though it’s bug fixes only for now.). Meanwhile, Microsoft have embarked on an open source fest with the creation of the dotNet Foundation, now home to a .NET compiler, micro frameworks, Couchbase for .Net, various SDKs, ASP.NET modules and other stuff. And to top it all off there’s WinJS, a set of UI controls and scaffolding for making Windows applications. Microsoft may be changing, but how effective that change will be is the big question. In the meantime, TypeScript gets to fight it out in the crowded playground that is JavaScript complements/replacements with Dart, CoffeeScript and, lets not forget the next generation of JavaScript, ES6.

IPython 2.0.0: The interactive Python environment IPython, has been updated to version 2.0 and adds interactive widgets, directory naviagation, persistent URLs, a modal UI and security model to its idea of Notebooks as a container for projects. Under the hood, the codebase is now native for Python 2.7 and 3.3 which are also the minimum required versions. There’s lots more changes listed in the release notes or you can just go install it and get into the tutorial which gets you going with the rather clever world of Python powered notebooks.

Rust 0.10 oxidises: Away from the controversies at Mozilla, the Rust developers have rolled out a new Rust release, version 0.10, which continues the steady development of the systems programming language. Changes include the libextra package being broken down (‘misc’/’extras’ libraries are always a bad sign so good to see it go), cross package (crates in Rust terminology) syntax extensions, better smart pointers and I/O handling. As things kick up a notch towards a final version, there’s now a RFC process for changes and nightly releases of binary installers. It’s all still alpha but progress is good – it was recently reported that Servo, the web engine being built on Rust, has passed the Acid 2 test.

Python 3.4 lands, Bootstrap flattened, USB2go-on-a-phone and Doge2048 – Snippets

Python 3.4 is here: After many months of development, no changes to the language but lots of enhancements in the CPython implentation and standard library improvements, Python 3.4 has arrived. Before you dash off to the Python 3.4 download page, reflect for a moment that now Python now has pip as its bundled installer and should always be available or that there’s an OO API to filesystems (pathlib), a new async I/O API, support for enumeration types, fresh pickle and more and then go to the What’s new in Python 3.4 page to deeply meditate on all these and all the other changes. So far, it looks like a good solid update.

Bootflat: Like Bootstrap but wish the UI was flatter? Check out Bootflat and its flat UI reworking of Bootstrap 3.1. It’s on my list for making the UI stand out (or not, what with it being flat…)

USB2Go: Want to make Arduino-like gadgets that plug into your Android phone directly? USB2Go’s Kickkstarter may be of interest. A tiny Cortex-M3 ARM based board is at the heart of this project which hopes to deliver both the boards, Arduino shield adapters and more in October.

Doge vs 2048: Number matching games that slide are in since the appearance of Threes, then Fives, then came 2048 or let an AI play 2048 for you and finally… as memes do, it collides with another meme and we get Doge2048.

Python upped, Persona non grata, Markdown marked and more – Snippets

Python 3.3.5 released: The latest update to Python 3.3 fixes two regressions, in zipimport and executing scripts and alleviates a potential denial of service. Mac users should pay specific attention as this 3.3.5 version now fully support OS X 10.9 fixing a bug which could cause “previous versions of Python to crash when typing in interactive mode”.

Persona (non grata): Mozilla’s Persona is being “transferred to community ownership”. As yet another project is cut adrift from Mozilla in a fuzzy, vaguely friendly way, its worth making a note that you shouldn’t bet on Mozilla projects for the long term, unless they are called Firefox or run on a phone. Mozilla’s habit of creating projects which don’t fulfill one of their needs seems to have created this problem but at least on the plus side, they are not decommissioning it so they aren’t pulling a Google Reader. Which is good given folks like use Persona for login.

Markdown editing for the web: Markdown is everywhere there days and whats been missing is a good editor for Markdown formatted plain text which can be embedded in the browser as a replacement for the WYSYWIGto-no-particular-format editors. And here it could well be in the form of EpicEditor, complete with import, export, in-place preview, full screen (with 50/50 edit/preview), custom parsers, extensions, event hooks and theming and more and all invokable from a single line of JavaScript.

Loose bits: Ivan Ristic shows you how to roll your own Apple ‘goto fail’ TLS bug test server though the process is worth noting for future SSL/TLS tests – Or, post GNUtls’s ‘goto cleanup’ fail, you can get your head down and help audit GNUtls with this handy list of “places to look” where unchecked data comes into the library – Or you can kick back with the 6809, a great CPU, and now being emulated in JavaScript.

ElasticSearch 1.0, TokuMX 1.4, Plan 9 GPLv2’d and Python 3.4RC1 – Snippets


ElasticSearch 1.0 springs out: The search-oriented NoSQL database, built upon Lucene, ElasticSearch has hit version 1.0. It’s a big release with a lot of changes and a lot of new features – an API for selective snapshot/restore, federated search, aggregation, distributed percolation and software “circuit breakers” to stop some more dangerous actions from overwhelming the system. An interesting post from on ElasticSearch sums up the pros and cons (like no authentication or authorisation) places ElasticSearch in the domain of “secondary store” to be used alongside a primary database.

TokuMX 1.4: Tokutek’s “MongoDB-with-Toku-engine”, TokuMX, has hit version 1.4 and is addressing the performance of sharding and replication. Toku’s engine is reputed to be very good for particular use cases and it’s interesting to see alternative storage engines under the MongoDB infrastructure.

Plan 9 goes GPL2: It’s been a long time under a open source (but unblessed-by-the-FSF) licence, but the venerable and inspiring Plan 9 has not been relicensed (mostly) under the GPLv2. In an announcement. It can be downloaded from the Akaros project (or cloned from the GitHub repo) which seems to be breeding Inferno/Plan 9 with their own many-core large-smp research.

Python 3.4 on final approach: Out of beta and hitting release candidate a few days ago, Python 3.4 is now imminent. It’s expected to land just over a month from now on March 16. Check back to our coverage of the last beta for more details of what’s coming.

Python 3.4 Betas and 3.3.4 RCs, UEFI bootsplaining and Bro pages – Snippets


Python 3.4’s last beta: Over the weekend, the last beta of Python 3.4 arrived. With two more release candidates and a final date of March 16, those interested should be testing now. The time scale was bumped by three weeks to allow last minute changes to the Argument Clinic, a DSL for parsing arguments, to settle in.

What’s also in 3.4? A new pathlib module, standardised enums, better object finalisation semantics, a C API for custom memory allocators, non-inheriting subprocess file descriptors, new statistics, asyncio and tracemalloc modules, a new hash algorithm for strings and binary data and better pickling. And of course, standardised use up “pip” as the package manager.

At this point, 5 Python Enhancement Proposals didn’t make the 3.4 cut – improved time zone database support and zip application support, the locallookup metaclass method, more unpacking generalisations and a key transforming dictionary are all pushed to after 3.4. For more details on whats in and out, check out the release schedule and the download page for 3.4 beta 3.

Python 3.3.4’s RC: There’s also a release candidate now available for Python 3.3.4 – details of fixes in the change log for that. Thats due for a final release on February 9, so not much time for final testing of the large wedge of fixes.

All About UEFI: There’s a lot of controversy, mostly unecessary or ill-informed, about UEFI’s boot process mainly down to it being confused with the optional SecureBoot element of UEFI that Microsoft lean on for validation. Adam Williamson, by day Red Hat Fedora QA, by night massive essay writer, has produced a huge and useful essay on what and how UEFI does its thing and the things it enables called UEFI Boot: How does that actually work then. Well worth a read.

Good idea, bad name: A shortened man page which just gives you examples? Sounds like a great idea. With a central repository for new pages? Excellent. And cross platform and packaged like a ‘gem’? Still with you. And you’re calling them “bro” pages. Oh, ah… this won’t end well. But good idea.

Python 3.4 beta, Neo4J 2.0 RC1 and Redis 2.8.0 released – Snippets


  • Python 3.4’s beta days: The first beta of Python 3.4 has arrived and it has got the good stuff. Pathlib lets coders work with pure paths or filesystem dependent paths with the selection of the latter taken care of for them. There’s a standardised enum module along with new statistics, asyncio and tracemalloc modules. Throw in a new pickling protocol, new string and binary hashing algorithms, a C API for custom memory allocators and standardise on pip as a packaging format and you are talking a tasty new Python due to land at the end of February 2014.

  • Neo4J 2.0 goes RC: The Neo4J graph database is heading into the home straight with a 2.0.0 release candidate and a warning that if you’ve been tracking their version 2.0 milestones you will need to perform a manual update on your database before using 2.0.0RC1. Now tagged as feature complete, the new RC will be bringing matching with properties, optional matches, relationship merges and more simplified syntax to Neo4J’s Cypher query language. That’s in addition to the Neo4J browser and other changes made over the five other milestones (5, 4,3, 2, 1).

  • Redis 2.8.0: Salvatore Sanfilippo has announced that, after almost a year of development, Redis 2.8.0 is done. If you don’t know it, Redis is a key/value store which can also handle hashes, lists and sets. The new version include a partial resync for slaves option, iterable collections, a rewritten config system, IPv6 suppport, pub/sub keyspace notifications and better consistency support and key expiration. Actually 2.8.1 is out for download too – see the release notes for more on the BSD licensed key/value store.