Tuesday, February 22, 2011

tablets, et al

The nookcolor is absolutely the best budget tablet for tinkerers on the market. For $250 you get a 7" tablet with a 1024x600 multitouch IPS screen, wifi, and (eventually) bluetooth.

In the current units (I expect them to change this) it is very hackable and totally unbrickable - it can boot totally off the microSD slot (or even a USB debugging program)

- deeper-blue took that and ran with it... I'm using his honeycomb image and it runs quite well... however, honeycomb is not the iOS killer. The design simply isn't as good/utlitarian.

- As someone who followed the sad decline of Borders (LJ comm: iworkatborders) B&N putting "The Middle Place" top and center on the nook-in-the-box-pic is a (possibly unintentional) Take That. (Basically, the then-CEO made employees push that book on [i]everybody[/i] coming in...)


So where do things go from here?

- The tablet gui model is inherently spatial. I would coin this as SUI but it's already trademarket. Bleh.

- There's an odd anti-intellectualism to tablets so far. There's no great way to get data [i]into[/i] them yet - while the physical keyboard has it's flaws I don't see anything taking it's place.

- That said, there are [i]different[/i] input models. There will definitely be apps that inspire creativity (think Hypercard) and stuff nobody's thought of yet (as usual!)

- I think Apple will do fine for a few years post-Jobs. The fall will be obvious when Apple interfaces become more complex... when it looks like Android does today, it'll be over... aside from intertia.

- Android is flawed at a very basic level (not nearly as much as Symbian, tho!) There are many questionable design decisions (Dalvik/Java being the largest) from when it was intended to be a Blackberry killer. That said, it's the best open solution 'we' have.

- A tablet's killer app is it's own app ecosystem.

- Web design will have to change. While your average tablet is, in fact, 1024px wide, desktop pages need to be zoomed up for a comfortable reading experience

Sunday, December 12, 2010

/* it's very easy to do a forthlike system in JS. here it is */

var words = [];
var stack = [];
var state = "interp";
var cword = "";

words["+"] = function(stack) {
stack.push(stack.shift() + stack.shift());

function run_compile1(stack, word)
if (word == ";") {
state = "interp";

cword = word;
words[cword] = new Object();
words[cword].type = "func";
words[cword].cmds = [];
state = "compile2";

function run_compile2(stack, word)
if (word == ";") {
state = "interp";

function run_interp(stack, word)
// if (typeof(words[word]) == "undefined") return; // todo: throw

if (word == ":") {
state = "compile1";

if (typeof(words[word]) == "object") {
for (i in words[word].cmds) {
// print(words[word].cmds[i]);
run_interp(stack, words[word].cmds[i]);
} else if (typeof(words[word]) == "function") {
} else {
var v = parseFloat(word);
if (v != NaN) {
} else {

function run(stack, word)
eval("run_" + state + "(stack, word)");

run(stack, ":");
run(stack, "test");
run(stack, "3");
run(stack, "4");
run(stack, "+");
run(stack, ";");
run(stack, "test");
run(stack, "2");
run(stack, "+");

Tuesday, July 06, 2010

Seagate Dockstar notes...

(or: Chad writes a practical post for once!)

The Seagate Dockstar's a variation of the Pogoplug, in turn Sheevaplug. woot.com recently had them for $20+5/ea ($65 for 3!) and buy.com has them for $25+0.

The Dockstar has reduced specs (128mb ram, 256mb flash, no RTC) from the original Sheevaplug, but multiple USB ports. Combined with a Gigabit Ethernet port it's a far more powerful version of the once-famous Linksys NSLU2 (aka Slug)

The first challenge is getting the conventional firmware out of the way so we can do truly useful things with it. It turns out that the default firmware only uses 32MB flash, leaving a nice 224MB jffs2 partition for a better Linux distro! there's a build of Debian Lenny here

My steps (largely cribbed from http://ahsoftware.de/dockstar/)

- Log in via ssh (root pw: sgxadmin)

- mount / -o remount,rw

- disable hbmgr in /etc/init.d/rcS. edit: this is very important, the dockstar firmware may auto-update and cut off ssh!

- mkdir /tmp/mnt

- mount /dev/mtdblock3 /tmp/mnt

Now I can extract the Lenny tarball - I put it on another machine and used netcat (nc -l -p5000 | tar -xvjf -) to put it into /tmp/mnt

After this there are two paths:

- run debian in a chroot with a ssh server on an alternate port. This means keeping the init from the original system running, but it's not too bad.

- Put a pivot_root/exec debian's /sbin/init and have the Debian system totally take over.

Debian Lenny notes:

- /var/cache/apt[/archives][/partial] must be a tmpfs since jffs2 is not mmap-able.

- debian/usr/sbin/chroot is static, so you don't need a chroot binary in the main system.

- By changing the sshd port to 2222 in /etc/ssh/sshd_config, you can ssh directly into debian

- you need these mounts:

tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /tmp type tmpfs (rw)
none on /dev/shm type tmpfs (rw)
none on /dev/pts type devpts (rw)
none on /lib/init/rw type tmpfs (rw)
none on /var/cache/apt type tmpfs (rw)

- run "export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"" if chrooting in.

- After removing /var/cache/apt there's still 40MB (+ compression gain) in the large filesystem. Not bad.

update: here's an autostart script that gets the debian chroot+sshd up and running (assuming you change the ssh server port)

mount /dev/mtdblock3 /debian
mount none -t proc /debian/proc
mount none -t tmpfs /debian/tmp
mount none -t tmpfs /debian/dev/shm
mount none -t tmpfs /debian/var/cache/apt
mkdir /debian/var/cache/apt/archives
mkdir /debian/var/cache/apt/archives/partial
mount none -t sysfs /debian/sys
mount /dev /debian/dev -o bind
mount none -t devpts /debian/dev/pts
/debian/usr/sbin/chroot /debian /usr/sbin/sshd

The Debian chroot will start sometime after the stock distro's sshd, since mounting the jffs2 partition takes a while. There's plenty of free memory afterwards:

Pogoplug:~# free
total used free shared buffers cached
Mem: 126064 27040 99024 0 0 10792
-/+ buffers/cache: 16248 109816
Swap: 0 0 0


Saturday, July 03, 2010

A poor/slow man's FPGA? It might be closer than you think.

Got a paperback copy of "Designing Logic Systems Using State Machines" today off Amazon... the bit about ROM-based logic (a precursor to CPLD's?) got me thinking that one could translate a logic circuit design into assembly code for a microcontroller. It could use a mixture of ROM and direct assembly operations, tuning it according to the target CPU in question.

Such a program would be slow by logic standards (at least if you wanted more than the simplest functions!) but with non-pin-related interrupts off and non-branching code, the timing could be completely predictable.

Friday, July 02, 2010

Another idea...

(yes, I'm very ADD this week!)

A CUPS-based virtual print server for rooted nook wi-fi. Turn it on, print *anything* to it (hopefully even via Windows...?) and take it with you. That should be pretty awesome for printing out web pages, eh?

(or alternatively, netcat listening on port 9100 wired up to ghostscript in a PDF conversion mode... that might only work with Linux tho.)

MSP430 Launchpad first impressions

Just plugged in my MSP430 Launchpad. Not able to actually do much with it yet, but you actually get four microcontrollers... on the programming side there's:

- A TUSB3410 USB/8051 UART microcontroller

- And a MSP430F1612 - with considerably more RAM+ROM than the parts you're meant to develop for. (Why hasn't the code for this been rolled into the 3410 yet?)

There's a "modem" UART interface to the serial port on the target chip, and a HCI-based Debug interface. Oddly the 'modem' interface appears to be the one used for target programming.

To properly load the 5310 driver, you must modify the USB driver for the 5310 to add device 0x451:0xf432. Sadly I don't actually have a build tree on this laptop so I'll have to get back to this one in a while. *sigh*

State Machine Language notes (WIP)

The HP 9100A desktop calculator was an incredible piece of engineering. It basically implemented a VLIW processor without any digital IC logic - it had a 4K ROM carved into a 12-layer circuit board (needless to say the yields sucked!) It used a CRT as a 3-line 8-segment display!

Tom Osbourne's initial work on ASM sounds quite interesting, although I haven't found all the details yet. http://www.hp9825.com/html/osborne_s_story.html - I'd figure a lot of this got into current design, hopefully!

Doing some more reading - Woz used these techniques on Apple Integer Basic and the Disk II. (Makes sense, since he *did* work for HP)


programming ideas:

- *actually* passing a variable/object along, so it only has one "owner" at a time.

- making a state machine language that gets 'compiled' into straight C. already thinking of doing this for register definitions etc...