Tagged: computing

Mobile computing (draft)

I've spent a few days doing a deep dive into setting up the Raspberry Pi Zero W to use with my iPad. I haven't owned a laptop for a few years, and I want a mobile console environment to program in. My 6th gen iPad is too locked down for some things, but will work fine as a terminal with a bluetooth keyboard.

Things I want to be able to do

Desiderata

I installed Raspberry Pi OS Lite (bookworm) on the pi without any fuss, but then had to spend a few days getting up to speed with the differences from other distributions I'm more familiar with, and the changes from previous versions: systemd, Network Manager, changes to boot filesystem.

There's no shortage of online information. Unfortunately, most of it is outdated, and much of it is of the quick fix -- "Here run this script and you don't have to understand anything" variety. That's fine for an appliance, but not when I want a flexible computing setup.

I successfully set it up as an ethernet gadget, following this info. I liked the idea of a single cable connection. But I couldn't get it to work unless I was powering my (6th gen) iPad through the CCK. It probably works better with newer iPads with their USB C connectors. And using the pi as an ethernet gadget prevents me using the USB port for anything else, so although this is cool, I've abandoned it.

I've setup network manager to try to connect to one of my two home wifi networks (they used to be bridged, but are now separate), and if that fails, to start up an adhoc network.

I found this excellent writeup, which uses Bluetooth PAN to connect the pi to the ipad. This is great; I can power the pi with a slim battery, and the usb port is free. But so far I haven't found out how to set it up to work with Network Manager, so it uses separate systemd startup files. Connecting over pan means I can use the internet from the pi (ie to download some missing software). Apparently this is quite insecure. Oh, well.

Software

On the Pi, mosh (like ssh), tmux and Vim (which I've been using Vim for years), rclone (dropbox syncing)

Mosh is recommended because the iPad will aggressively suspend background apps. Mosh allows it to reconnect where it left off so that this isn't noticeable.

Tmux is great, allowing multiple virtual terminals over a single connection. Particularly useful to split the window between Vim and a shell prompt.

Vim is my text environment. I have over a thousand pages of notes in VimWiki.

rclone is a handy utility for on demand dropbox folder syncing. When I have an internet connection I can pull and push any folders from/to Dropbox.

On the iPad, Termius is the terminal I'm using. It supports mosh. There is a paid version, but the free version meets my needs.

Blink is recommended by some, but I don't do subscription software. It's open source, so I might try to compile it myself -- though that's a different project.

Tags: computing, rpi

Date created: 2024-11-21

Minecraft

My son wanted a Minecraft server to play on with a friend from school. We're going into a 5 day "hard lockdown" in Melbourne, so why not?

We already have a Realms server. I've spent a surprising amount of time exploring, making a few holiday houses and running track undeground. I want to keep that around. Minecraft is a recurring obsession with me and my kids. We've been playing it since they were quite little. I got it when it went onto iPad and was immediately obsessed. It's got that computer thing happening, just a little tweak here, and another there, and six hours have passed.

So my initial thought was to put a server on the raspberry pi. We have a couple of pi 3's kicking around, and with the NBN giving decent upload speeds it would be easy to attach it to the router and open a port.

Bedrock edition is just for Ubuntu, so I did an ubuntu server install and stuffed around configuring wifi and finding a USB power adapter with enough juice to power the pi. Lots of flipping between sources on my monitor to look things up. Overall, an enjoyable task if you like the linux command line and enjoy the "Adventure" like nature of this sort of thing.

Get the bedrock server onto the pi. Wifi's not installed. Get it on my mac and scp to the pi. Ubuntu isn't allowing the connection. Fine, scp from Ubuntu and source it from the mac.

Really it's the same thing as get the bird cage. Too far away. Fine, fetch the ladder to get the cage. etc...

Anyway, wrong executable format. Oh no, maybe I need 64 bit ubuntu. Reimage the card. Same error? Oh.... The Bedrock edition is x86 only. Raspberry Pi is ARM. Right. There's a blog entry where someone emulates it but it's slow...

In the meantime, the java edition works (after getting java from oracle) -- but it can't be used by iPad clients.

So we have an old pc from about 2004. No wifi of course. Dusty.

I could probably do a USB install of Ubuntu, and set it up like I was going with the raspberry pi. But it's much bigger. There will be fan noise. In the middle of trying to find a place on my desk where it could be attached to power, the network and a keyboard I realised the machine didn't even have HDMI out. Just VGA. So my monitor probably has a VGA input and I do keep every possible cable for just in case, but...

This blog is running on a cloud server hosted by Binary Lane. It only costs $4/month for 1Gb memory, and 20Gb disk. A few minutes later I had a working internet connected cloud server with it's own subdomain. And a few minutes after that, the x86 Ubuntu Minecraft bedrock server was working. It's fine so far.

Tags: computing

Date created: 2021-02-13

Conversations with the computer

I've been thinking about the article by Steven Ramsay, The Mythical Man-Finger and The Mythical Man-Finger Aftermath since I read them a few weeks ago. It keeps resonating.

I remember being impressed by Dbase III+ , which allowed me to type stuff like

next 3 to print

I used to use fluency as my judge of competence-- a linguistic metaphor. At work some people talk to people, some of us can talk to the machines, and some to both. Generally people that talk to machines can also talk to people.

Do people always resent their translators? There's Lots of power there. I get mad when something prevents the conversation-- hardware stuff ups. Crap OS.

You can't delegate or make a pace for conversation, it's back and forth. It's because lots is unknown and only discovered during the conversation.

Maybe this is why I like vim? Even though there's still a lot of baby talk, it's on the right path.

Programming is like teaching the computer some new words. Indeed an early language, Forth, was conceived that way. Programmers would create the languages that allow them to have the sorts of conversations they wanted to have. Interactive systems were designed as sets of words.

Tags: computing

Date created: 2014-02-15

Alan Kay interviewed

So Alan Kay has given an interview to David Greelish, published in Time, and excerpted by Forbes.

Alan Kay is always worth my time. He does say the same things a lot, but they're good things, and people clearly haven't listened well, so that's fair enough. Some of them:

He probably subscribes to Sturgeon's Law (90% of everything is crap). He certainly comes across as curmudgeonly, though I think he tries not to. I find his thinking immensely refreshing, the fresh air of sanity, blowing away the foetid miasma of "what everyone knows".

I have a google alert feed for mentions of Alan Kay (along with Ted Nelson, and Doug Englebart). With that one interview, there's been about 20 different excerpts, showing either this image

dynabook

or this one

Alan Kay

and repeating the same few lines from the interview (which to be fair, isn't all that long).

Most seem to have the tone of "Here's this guy, who seems to be important, though we're not sure why, saying the iPad is crappy, and that Jobs, maybe even corporate America, is not all that great. How odd".

Sigh.

Tags: computing

Date created: 2013-04-05

RIP Google Reader

So the sun's going down on Google Reader.

After reading lots of different takes on this, I'm in general agreement with:

I'd like to make my own. In the meantime I've gone with Fever a self-hosted php/mysql thing with a decent front end, including on IOS where I actually read feeds the most, what looks like some good extensibility (and if not, hey, php/mysql!), and the well respected Reeder app on IOS supports it.

Initial install of Fever was totally painless, as was import of my OPML file from Google Reader. Reeder on iPhone looks ok.

Initial thoughts

Reeder for IOS grabs the stuff ok. The interface is alright, gesture friendly, but I'd like some way to send to launch pro, so I can do fun things with adding tags to pinboard. just bookmarking isn't enough.

I was really used to the google reader views, nice and compact.

Tags: computing

Date created: 2013-03-15

Viz

I'm working on a new little web app called viz. It's a javascript version of the Turtle Graphics from Seymour Papert's Logo.

The idea is that there's basic blocks which can have inputs and can be dragged around the screen-- probably like Etoys or Scratch, though I haven't spent time with those. They will start off being 2 types -- move and turn. Clicking a go button will run them as a program.

I'm building this for a few reasons:

The really wonderful thing about it is how it scaffolds basic concepts in math and in programming. The basic move and turn are good for solidifying ideas about number, and giving a notation for angles. Sequencing them is basic programming. Putting them into a repeat block is another important concept. At some point using variables rather than constants will be useful. Putting blocks into a howto block is abstraction, and is the important concept; because it's easy to abstract the abstractions.

New functions come about very naturally. Starting off with move, turn, penup,pendown I quickly need a way of changing color, of coming back to where I started, of clearing the screen.

Tags: computing

Date created: 2013-03-10

My best programming story

When I was 16 (in 1980), I got a ZX-80 for christmas. It was my first computer. I'd been reading about computers for years, from the Popular Science accounts of the Altair and MITS8080, and the Apple I and II. I'd seen an Apple II at a science fair once, part of someone's project -- I remember wondering where his parents had got the $1700 they cost. It wasn't even jealousy-- that sort of money was just unattainable. The TRS-80 was coming out, my best friend would later get an Atari 400, and in second semester that year I was part of the first computer class at our high school.

It was a year 11 enriched math class (I was in year 12). We got a Commodore PET for a month. It was being shared among a number of schools. After that, we used FORTRAN on coding sheets that got sent in to the education office, where keypunchers would turn them into punch cards and run them through their mainframe. It would take about three days from submitting sheets to get the program run and the result (or, just as often, the error report) back, on those old large format printer sheets.

Anyway, I was very keen, and I got a ZX-80 for christmas. We attached it to an old black and white TV screen, and although something was on the screen, it wasn't working properly. I remember that peak of excitement, and that feeling of it all about to be dashed. We persevered, and with some mucking about with the horizontal and vertical controls got the screen mostly readable. I would later get a newer small B&W TV which worked much better. I was glued to the machine over the Xmas holidays and taught myself to program in ZX-80 Basic. Time passed.

I'd subscribed to Sync the ZX-80 magazine, and learned about peeking and poking to screen memory.

The ZX-80 had but 1K of RAM-- this held the program you typed in using it's clever membrane keyboard, as well as the memory needed to drive the screen. When calculations were taking place, the screen would flicker, and fuzz out for the length of time it took to get a response.

Much fun was had.

I had ambitions of making a little racing car game. The magazines had showed me a trick, where when you saved the program (onto cassette tape, of course) it saved the state of it's memory as part of that. So it was possible to write a program to dray a racetrack to the screen (peeking and poking to screen memory), and save that state to cassette, then restore it to change the program to add the racing car bit, given the existing race track -- because I couldn't have both in my 1K.

The track itself was just made of the block characters the ZX-80 had above the low ASCII. The magazines had also explained how screen memory worked-- and demystified peeking and poking directly to memory, enabling an image to stay on the screen while the program was running.

So that worked. I'd drawn this roughly oval track with walls 3 blocks thick, and I had this little block representing the car which would drive around. You could tap different keys to get the car to turn and accelerate up to 4 squares/tick, and I was poking the car into its new position in screen memory. I had some routine to test to make sure you didn't hit the wall-- I forget what was supposed to happen.

Anyway, I'd typed all this in, and was testing it. Sure enough, I could drive my little car around, the screen wasn't flickering because I wasn't doing any output, just changing it directly by pokeing into screen memory. Then I made my mistake. I moved to maximum acceleration-- 4 squares and jumped through my 3 square thick wall.

To simplify things, the car was just jumping from square to square, without passing through the intermediate squares. So the wall might as well not have been there. The screen memory and my program memory were contiguous, so after jumping the wall the car proceeded to drive through my program, until the program, and with it, the car, crashed.

I was briefly able to look at my listing; lodged in a line was the block representing the car, but I couldn't edit it, couldn't really do anything.

I never got around to trying it again.

Tags: computing

Date created: 2012-08-19

Programming:using computers= writing:reading

Computer literacy is programming. Being able to use a computer and not program is like being able to read and not write.

There's lots of different types of writing: * planning * shopping lists * journals * ad copy * captions * essays * novels * plays

One distinction is writing for yourself vs writing for others. Writing for others is a different level of skill. Writing a shopping list is not the same as writing a novel.

Writing gets reviewed. Software gets, marketed???

Software Needs a decent review. Needs a commonly understood body of work.

Alan Kay talks about computing as "pop culture" -- no sense of the past.

Tags: computing

Date created: 2010-05-20

iPad and computing history

(a response to Cory Doctorow's Why I won't buy an iPad and you shouldn't either)

Cory Doctorow's parents bought an Apple ii. Luxury! At $1700 in the late 70s, there was no way.

The iPad is not alone, it's part of the infrastructure. It does suggest a scary vision of the future when no one can tinker, but guess what; practically no one does.

The browser has Javascript, which is much more capable than the Basic my ZX80 had. It didn't even have memory mapped graphics.

When was the last time you tinkered with a laptop? My surface mount skills aren't there.

There's a nice bit in Vernor Vinge's Fast Times at Ridgemont High (iirc) on the frustration of not knowing how anything works.

It's fear-- fear that cool computing is getting even more marginalized.

But it's not computing. People don't want computers.

Why couldn't HyperCard be on the iPad? It's not a full interpreter. HyperCard in JavaScript. The web.

Mark Bernstein's The iPad is not a Computer gets it right, I think.

Tags: computing

Date created: 2010-04-03