Rob's Blog rss feed old livejournal twitter

2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2004 2002


March 26, 2018

I should deal with the chrt.c problem building toybox with musl, namely the big #warning "musl-libc intentionally broke sched_get_priority_min() and friends in commit 1e21e78bf7a5 because its maintainer didn't like those Linux system calls".

Unfortunately the warning is true, and the problem is exacerbated by Rich's refusal to provide a #define _MUSL_ symbol you can probe for at compile time to fix up his lunacy. He's broken a bunch of syscall wrappers to always return failure, which you can ONLY detect at runtime and not probe at compile time when cross compiling. This means if you're going to provide workarounds, the code must always be compiled in, in every instance. Unless you identify musl-libc by process of elimination (it's not glibc, it's not bionic, it must be musl).

And he does this a LOT. Musl provides a broken fork() on nommu systems that always returns failure, uClibc simply didn't provide fork() on nommu so it was a build break you could probe for and work around. Here he only provides thread apis to implement chrt, a command line utility that does processes implemented in a package that never uses threads and does not link against pthread.

Rich has very strong opinions on how other people should program, and is willing to punish other programmers for not doing it his way. Since I will _never_ do it his way, I've given up on trying to turn musl into something real and am instead trying to build toybox with the bionic ndk. But meanwhile, musl is in the cloud space, and it's what mkroot currently has working.


March 25, 2018

Tired. I need about two days of recovery time to switch back into proper open source development mode and clear all the little tangents that accumulated over the week, but that's all the downtime I _have_ before the week starts up again, so...

Didn't get a lot done yesterday, my tab closing hit "zcip.c", which should probably be called something else but that's the name the busybox version I used at work is called, and it's so HORRIBLY DESIGNED that I really wanted to write one that didn't require a shell script to just Do The Thing. And there's an RFC on it, so it's not hard to figure out what it should do. So I opened a tab...

I wanted mine to autodetect the first wired interface if you didn't specify the one you wanted, so I copied the code from ifconfig.c (maybe it needs to go in lib/net.c later but get it working first and see if there's still commonalities afterwards), and... it's not finding eth0. My netbook has eth0, lo, and wlan0, and it's only finding two of those. Why? The ifconfig code is finding all three and it's using the same ioctls against a socket opened with the same flags? What the...?

It's one of these "I wanna stick printfs in the kernel" things (to see why it's making the decisions it's making) and I can't on my host kernel (not easily anyway), and I'm not wasting effort on mkroot right now and I dunno if it would reproduce this anyway (I've never set up a virtual wireless interface in qemu? Or maybe it's always skipping the _first_ interface...?)

Anyway, that ate my programming time yesterday. That and the fact my netbook is REALLY SLOW right now because it's swapping its guts out with all the open thunderbird reply windows and chromium browser tabs. I should really close tabs. And/or get a new laptop, but every time I do that it's spin the dice on what subset is supported by Xubuntu. (I have good luck with ancient obsolete crap because Linux has had 5 years to reverse engineer it and get support upstream. The current shiny stuff has never been properly supported. Possibly the PC world is less of a moving target these days since all the effort went to phones. Or I could get a chromebook, but you can't stick a terabyte of storage and 16 gigs of ram in a chromebook...)


March 24, 2018

Ooh, guilt. Guilt. Somebody emailed me asking where mkroot went _and_ signed up at the $5 level on my patreon right afterwards. Ummm...

Hmmm. How do I say "it's dead" as nicely as possible?

(Rifling through my open email reply windows I found the "last chance to submit a talk proposal for tokyo automotive summit and open source conferences", which coincided with the evening I took down mkroot so didn't happen), and the Google Open Source Peer Bonus Award Thingy sending me a "gentle reminder" to update my payoneer info so they can send me the $250 that goes with the award. Both windows are over a week old. I should spend a day closing tabs again...)


March 23, 2018

End of the "sprint" at work, meaning deadlines. I worked extra hours to catch up from monday (contractor, paid for hours not accomplishments, no vacation or sick days; can't complain because the hourly rate's pretty good). So I've gotten very little open source stuff done this week.

Friday: time to catch up on open source stuff! Starting with design work.

After the mess on the mkroot list, renaming the project "hermetic" would be gratuitously picking a fight with a large corporation. But _not_ doing so would be backing down from my legal rights in the face of shadows that _might_ turn into empty threats that _might_ turn into a battle I could almost certainly win.

So I took the project down, because I don't like either option. Now it doesn't matter what it's called, and armchair lawyers can't empty chamberpots over it again.

I gave it a week to stew, and it turns out somebody did notice it was down. I should send him a tarball. (As with busybox, the work I did is out there open source, I'm just not continuing it as a separate project that would need a name. Yes, there are still scars from SCO and bruce. Work is assigning me to work on systemd configuration, my "this is not fun" bandwidth is accounted for these days, thanks. My open source work is either because I enjoy playing with it or because I'm trying to accomplish something specific.)

There were two near-term use cases for mkroot: 1) better toybox test suite, 2) natively compiling stuff. Making the second work without plugging the gaps with busybox is significantly more work than the first, but the biggest single blocker to either is the lack fo toysh. Then again I don't need every toysh corner case to get something that can run the init script and toybox's scripts/test.sh and so on...

Ok, if I'm going to merge a subset of mkroot.sh into toybox as scripts/mkroot.sh or similar, I should merge the modules/kernel and modules/native scripts into the main file (those are the only part that can't build natively under qemu with some control-image plumbing, even the dynamic libraries can be added by rebuilding libc natively). I no longer need it arbitrarily third-party extensible if it's not going to be its own project.

I also need to rip out the busybox build. (I've kept an air gap between toybox and busybox ever since I stopped maintaining busybox, originally because of Bruce contamination, then because license. I've contributed things like toybox patch _to_ busybox, but nothing comes back the other way except bug reports.)

Ripping busybox out of mkroot leaves a largeish hole, although all of those commands are also in "make install_airlock" so it's part of an existing todo list. That said, I can't bring networking up without a "route" command (toybox's is in pending), and it really needs a command shell to run (which can handle the init script). The rest is there for native builds (wget and tar most obviously).


March 19, 2018

Fade was sick yesterday, and I seem to have it. Remarkably short incubation time. Possibly something we ate? (Not really defined symptoms, just general aches and fatigue and blah.)

Taking the day off from work, hanging out at Starbucks and trying to apply pending toybox patches and such. (Haven't got the brain to do design work, but I can close some open tabs when somebody sent me a patch I just haven't gotten around to testing.)

I think I know what to do with mkroot: it's two scripts. I can put them in the toybox scripts directory. (Or maybe the kernel one goes in scripts/modules or something, dunno. Little more tweaking needed.)

The airlock step from aboriginal linux already went into toybox, I might as well put the build script in there. My short-term goal with this is to try to come up with a toybox test environment for commands that run as root and need a defined system environment to produce consistent testing results, so...

(The alternative is pretty much abandoning mkroot, because I'm not putting it back on github as its own project. Just no. I wouldn't even bother merging it into toybox, but I have work on system building as one of my patreon goals people are contributing to, so I should get unblocked on fixing the 4 kernel regressions since 4.14...)


March 18, 2018

Fade headed home on the bus, and I camped out at a coffee shop to try to get some programming done, but it closed like an hour later because sunday.

The guy who submitted bc clarified that not only should I not touch it, but I won't hear from him again until it's perfect. So I removed it from pending.

Ugh. Trademark crap on the mkroot list. I just don't want to step in that swamp. I don't want to back down from a fight and change my plans because of the _shadow_ of a threat either. Really, I don't want to work on mkroot anymore if it's going to have people nominally on its side dragging legal clouds over it. Why bother publishing the code, just do my own development and feed the results to the android guys. Except the Linux guys _already_ don't listen to me when I send them patches for issues other people in the embedded compunity poked _me_ about. (As their designated "willing to go into that sewer to meet with the morlocks" person.)

And then I was too depressed in the evening to submit any of the talk proposals. (Especially ones about mkroot, if I'm abandoning the project. But even the ones on other topics... I'm back to "don't want to travel, don't want to interact with the Linux community"...) I never heard back from Jeff anyway (despite multiple emails and a day and a half of waiting), and flying to tokyo's a long way for a conference if I can't hang out with the j-core guys. (About like my visit to LCA in Tasmania: it was nice, but I'm not going back because it's just too much travel.)

Going to bed early.


March 17, 2018

Tomorrow's the last day to submit talk proposals to the tokyo open source summit. A couple minutes of pondering came up with:

Beyond uClinux: nommu in 2020
  - Nommu processors are the single celled organisms of the computing world,
    which means we're surrounded by billions of them without noticing.
    - 256k ram in qemu? ROM kernel, nommu, xip romfs/cramfs.
    - j-core example
    - musl, toybox
Building the simplest possible Linux system.
Building Android under Android.
  - updated version of 2013 talk
  self-hosting hermetic system build
Hermetic Linux
Android on the Desktop

This year it's colocated with the automotive summit, because the linux foundation loves diluting the audience for external conferences it inherits and trying to erode their individuality. I think they got the idea from the way Ottawa Linux Symposium died when the kernel summit forked off and half the attendees stopped coming, this way they can kill conferences they inherit from outside and replace all the "Not Invented Here" conferences with ones they fully control. Hasn't quite worked yet, but they keep trying.

Anyway, I poked Jeff about doing a presentation together with him on designing a new GPS implementation from scratch. Might be of interest to the automotive half of the thing...


March 15, 2018

Fade's spring break was this week, so she's coming to visit this weekend.

Thinking about adding nm because this wandered by and reminded me it's not a big deal (we've already got file parsing ELF), and I'm wondering if there should be a "development" menu in the toybox menuconfig for this? I'm already adding ar, because ar is needed by dpkg. But the main use for ar is static libraries (ala libc.a). So... is it a development command or not?

There should be a name for "decisions that are hard because the stakes aren't large enough to clarify the issue". Sigh.

Let's see: nm -A = names, -a = all symbols (debugging syms), -D = dynamic, -f FORMAT? (-f posix), -g = exports ("external only"), -u imports ("undefined"), --defined-only (not -u), sorting: defaults alphabetic, -n numeric, -p unsorted, -r reverse. And the one I use all the time (as does make bloatcheck) is nm --size-sort.

Not a huge amount to implement, really...


March 14, 2018

Happy pi day! I have an alarm set for 1:59 so I can eat the tiny pie I got from the grocery store. (At 26 seconds after the minute. Update: did the thing.)

I've decided to rename my mkroot project to "hermetic", since the point is to do hermetic builds (specifically hermetic system builds). The phrase "hermetic build" appears to have originated within Google and mostly be used in there, but that just means it's not currently got a lot of collisions when you search for it outside the Google bubble.

I need to cut a release with the 4.14 kernel before tackling the pile of breakage in 4.15 and newer, and QEMU is barfing on arm64 because of a QEMU bug (VIRTIO is announcing itself strangely and confusing the 4.14 kernel), which has a fix, but it's not merged in the version I have built. So trying a QEMU 2.11.0 release build to see what works there...


March 13, 2018

Someone commented that 0BSD doesn't require preserving copyright statements in the code, and I typed up some reply text I should probably record here. (I need to do a proper licensing writeup. I've done like a bunch of partial ones over the years.)

Modern copyright law doesn't require notification, hasn't for decades. The internet's pretty good at finding plagiarism, regardless of copyright. And these days authorship info goes in source control, not inline in the source.

The bigger issue is the warantee disclaimer: it's a historical relic. People give medical and legal advice on blogs and youtube channels, but we still expect disclaimers on software because "we've always done it that way". (It's like the White Knight in Through the Looking Glass giving his horse anklets to keep sharks away: if Alice pointed out there are no sharks on this hillside, he'd take it as proof they're working.)

It's there because licensing for PC software started when mainframe developers ported their stuff to smaller machines. The only commercial software back in the mainframe/minicomputer days was written on commision, bought and paid for _before_ it was written. The shrinkwrap software market didn't exist before 1977 because the unit volume wasn't high enough.

The PDP-8 was the best selling computer each year from its introduction in 1965 until it was replaced by the Apple II, and in its entire production run the PDP-8 sold a grand total of about 50k machines. If you wrote PDP-8 software at the _end_ of its production run, there _might_ be about 50 thousand total customers for it in the whole world (if all those machines were still in use and in the market for new software). And it took over 10 years to accumulate that many, and it was _the_ biggest software market in existence.

The Apple II sold almost that many in its first two years. The first machine to sell a million units was the Commodore Vic-20 (introduced in 1980 and selling 600k units in 1982 alone), the commodore 64 was introduced in 1982 and immediately outsold the vic-20 (it did about 2 million units/year through retail outlets like Sears). The IBM PC took about a year to sell its first million units (1981-1982), and so on.

Microcomputer unit volume growing orders of manitude larger than mini or mainframes changed the _nature_ of the market. Suddenly you could make a piece of software and have a million customers waiting for it. You could write _then_ sell, which was new. (And so was the concept of piracy: if you wrote software for the PDP-6 there were a grand total of 23 built _ever_ and MIT owned most of them.)

That's why Apple got the law changed in 1983 extending copyright to cover binaries. (Bill Gates had been complaining about it since 1976 and even addressed congress in 1980 (yes there's audio), but he almost never managed to accomplish anything himself, he was all about capitalizing on other people's work.)

Back in the mainframe world software was custom tailored to each installation, and each machine cost millions of (inflation adjusted) dollars. If you caused an outage you were easily costing the customer five figures a day, and big companies that could afford a mainframe had lawyers on staff. So you BET you had huge legal boilerplate full of disclaimers and indemnification in that context. Plus, when it's custom software your customer is the first (and likely only) deployment: they _will_ find all the bugs.

So when people started selling shrinkwrap PC software into the microcomputer market, they just copied existing practices, including giant disclaimers that made no SENSE in the new context. But if you ask a lawyer "are we safe from being sued" the answer is NEVER yes. (No lawyer will ever tell you NOT to CYA. They'll tell you to stay in the basement covered in bubble wrap: it's their _job_.) And the "two guys in a garage" operations starting up in the micro world (Gates, Kildall, Bushnell, Jobs, Gariott...) happily copied what the big boys did so they'd look grown up. Keep in mind they were writing "software licenses" _BEFORE_ Apple vs Franklin, when they were clearly unenforceable. But convincing people to go along with what the fancy words say is 90% of the law anyway, and it _looked_ convincing.

Apple v Franklin wasn't the end of software makers paying to change the law, of course. The phrase "shrinkwrap licenses" comes from 1980's license terms saying that by breaking the plastic shrinkwrap around the box you'd agreed to the license terms inside, except the license was printed on a paper _inside_ the box so you couldn't read it until after you'd opened the box. Back before the internet, "informed consent" (the basis of contract law) was literally impossible in the context of a retail purchase. Then software makers paid a lot of money to lobby for passage of the DMCA to retroactively make that legal around 2000, after doing it for years. (And then there's first sale doctrine, lots of software makers insisted the software was a _lease_ not a sale, until in 2011 they changed the law again to end first sale doctrine for software. Proprietary software's kind of a nightmare these days.)

The real reason 0BSD has the warantee disclaimer is its goal was to start with a large block of existing, approved license text, and make a single small change. The warantee disclaimer is established context that provides a security blanket for large corporations. Nothing in 0BSD requires you to copy that disclaimer into your own derived work: it's a disclaimer made by the _existing_ author(s). So if you lift a couple functions and use them in another context, that new thing can be under literally any license. That's the point of public domain equivalent licensing, frictionless relicensing so the license becomes irrelevant. (I.E. Universal donor.)

I remembered the Apple II figure because I wrote about it long ago. It was a lot easier to find my old Motley Fool articles before the database migration that labelled all the really old articles as written by "Motley Fool Staff". (They tend to still be signed -Oak at the bottom, since that was my login handle on the message boards, which is where they hired me from...)


March 12, 2018

Back from visiting Fade.

I merged bc. (More drama! Don't care.) Sooooo much cleanup to do.

Fiddling with the new ndk: -llog is only there for dynamic links (log.so exists, log.a doesn't), the library probe logic isn't using LDFLAGS right (that's my bug). A static hello world built with the NDK's clang segfaults. And I've confirmed it did the same with gcc: it's that hello world built with _bionic_ segfaults on my netbook. Illegal instruction before making it to main(). Great.


March 10, 2018

Hanging out in T-Rex Cookie with Fade, trying to catch up on the giant backlog of open source todo items, and on IRC there's bc drama. Of course. So graff posts in the #toybox channel to complain about what gdh has done ("have been kicked out of the project and my work replaced by someone who appears fraudulent" was said in a public channel), Thalheim pms me to try to give me context, and I haven't even reviewed this code yet.

Either way, they're submitting their bc to both toybox and busybox, but I'm likely to clean it up extensively whenever I get around to to looking at it again. Will they then marshall those changes over to busybox? Will busybox changes come back to toybox (along with license contanimation because they didn't clear it properly?) Sigh...

A few days ago Rich tweeted a link to Fabrice bellard's new arbitrary precision math library, which is available under an MIT license. That's not quite the toybox license, but close enough he might allow me to use it under 0BSD if I asked him? (Long ago he gave me permission to BSD license is tinycc code. I should ask if 0BSD counts, but I haven't had time to poke at qcc in ages...)

Meanwhile, the longer I put off dealing with the "gmail hates dreamhost" issues the worse it gets. The bounces turned into a mass unsubscribe when I let it time out, and I've been meaning to fix that but dreamhost has no https on mailing list administrative access (it's an unencrypted http page you log into with a password that lets anybody mess with your list), so I'm really reluctant to poke at it (kinda the same way I feel about entering my credit card info into any web site ever, I'll do it but with great reluctance and tongs at arms length, and then breathe a sigh of relief if it doesn't _immediately_ manifest as a disaster)...

But I've now waited long enough that 3-4 messages have posted to the list (and didn't go out to those subscribers), and I don't want to reply to them until I've dealt with it. Let's see... save the batch of unsubscribe notification mails into a directory, mass sed them to get the names out into a file, copy that to the clipboard, pull up the insecure admin web page's mass subscription thing, paste the list there, and subscribe.

Obviously a far easier interface than giving me command line access to the mailman server. Sigh.

One message was about the new android ndk. Back on Feb 14 I did an x86-64 api 26 build, but libc.a was old. I should see what fixes got updated. Since I can't build this from source myself yet out of their git repos, I basically test and send bug reports, then wait for the next -rc tarball to be posted. It's a slow process, especially since my context switch to respond to each new NDK, after at least weeks of not working on it, is "whenever it makes it that far up my todo list".

I want to work more closely with the Google developers on stuff like this, but not being a Google employee I honestly don't know how. They share a cafeteria. I don't.


March 9, 2018

On a bus to visit Fade in Minneapolis, trying to get some programming time in. Kinda bouncy, but otherwise...

Always weird little design issues. Doing ar, I sort of want to use copy_tempfile() out of lib.c except if the old file can't be opened I want permissions 664 on the new file (default permissions for a new archive in ubuntu's ar), and mktemp() does 600. And it's not really accessible, but setting up and calling mktemp() from the host myself and then doing lstat() and copying the permissions over is duplicating an uncomfortable amount of infrastructure for a tiny behavior change.

Sigh. Only 4 users of copy_tempfile() so far, I should add an argument and have it be "0" when you want to error_exit() if the stat() fails. (Which is fine for things like patch.)


March 8, 2018

And the GOP has destroyed another american institution. "The downfall of toys R Us can be traced back to a $7.5 billion leveraged buyout in 2005, when Bain Capital..." which was Mitt Romney's company "loaded the company with debt.... The company's massive interest payments also sucked up resources that could have gone toward technology and improving operations."

Meanwhile, on the "Capitalism is destructive" front...


March 7, 2018

Sigh. I'm sure I had more blog entries (several) but my netbook rebooted and the forest of .notes-2017.sw? files vi left behind were uninformative.

I spent some of the time on mkroot. Finally got the mailing list migrated (laboriously cutting and pasting the aboriginal list subscriber base to the new list one subscriber at a time) a few days ago, and I'm trying to get that to work.

My toybox "working on this" stack includes tftp, deflate compression side code, implementing ar (because dpkg is an archive.a containing a pair of tarballs)...


March 6, 2018

I should probably respond to the Linux kernel's new license enforcement statement but I'm not sure I have the energy. Intellectual property law needs to go away, it's something society has outgrown, and they know it, but Max Planck said "science advances one funeral at a time", and the same has been said about math in webcomic form. Unfortunately it's true of the law and society in general.

We have to work out what we want society to look like, then start describing it and how and why it should now work that way, and moving the overton window in that direction.

Capitalism creates scarcity. That's what "cornering the market" isn't the only way capitalism does that, but suing farmers over patented crops because pollen blew into a neighbor's fields is evil.

There are so many articles about extending IP law past expiration, from patenting minor variants on existing drugs to raining down lobbyist money to change the law. The open hardware clones of arm and x86 stopped at the last versions too old to be compatible with anything currently in use, and where then abandoned under legal threat if they took one step further despite the technology they'd be copying having shipped more than 20 years ago. (The only reason j-core exists is Jeff was willing to call Renesas' bluff, do his homework and win a lawsuit if necessary. Plus Renesas wasn't selling SuperH anymore due to politics, so didn't budget a large legal leg-breaking budget to defend it by bankrupting people regardless of the merits of the suit.) Here's a classic article on how big players shake down small players for patent royalties and proving you didn't infringe is no defense because they can simply bankrupt you with endless litigation if you don't play ball.

Then add in regulatory capture, submarine patents (where a patent application is eternally amended to defer issue, and then they decloak and start suing people when somebody else starts making money in this area, and the patent expiration clock only starts ticking when enforcement starts.

The USA's early success involved a significant lack of enforcable IP law until the 20th century, china's rapid growth was triggered in large part by completely ignoring foreign IP claims... NOT doing this turns out to be way better for the economy than doing it. Yes you have to work out how to pay creative types so they can afford to do it, but "basic income" is a way better solution than resticting distribution of the results in a whole lot of areas. Software wasn't copyrighted at all before 1976 (Berne Convention), and the copyrights didn't cover binaries until 1983 (Apple vs Franklin), by which point Unix was 15 years old.

The Baby Boom is dying soon, and there's no reason for the rest of us to continue their cultural assumptions. The top tax rate was 91% from World War II until 1964 (and even that only lowered it to 70% where it stayed until Ronald Reagan lowered it to 28% and started society's modern domination by the 1%). The 91% tax kicked in at just under $1 million/year in today's dollars and prevented billionaires from existing and thus being a problem; american's global dominance happened under that tax regime and going back to it would be a good thing. (High corporate taxes drive investment: they'll spend money on things like R&D and worker training if it would otherwise be taxed away. If they get to keep it, the owners pocket the money through stock buybacks and cut the actual business to the bone.)

We need instant runoff voting. We need universal basic income (Which almost passed under Nixon but the democrats killed it in the senate for not being _big_ enough, once again snatching defeat from the jaws of victory). With the green revolution, vertical farming, exponentially advancing solar+battery technology, self-driving electric vehicles becoming transporation as a service, container housing, and AI expected to automate away a lot of the remaining jobs, and many of the jobs we _do_ have being pointless social constructs...

The end of capitalism's a bit like the end of monarchy. It's something people living under it couldn't imagine doing without, but once it's gone it seems simultaneously silly and horrible...


March 2, 2018

Meanwhile, on the advancing solar power technology front, solar microdots.


March 1, 2018

So LWN had an article about a company's software license compliance training program, "including the GPL, Apache, BSD, and MIT licenses, in easy-to-honor checklist form", with "a decision tree for choosing a project license", and they ran 2 day workshops with "short lectures, lighting talks, and small-group breakout sessions".

Beyond complying with existing licenses, they got internal pushback to open sourcing this company's own software due to "Missed revenue generating opportunities", and I'm really, really, really looking forward to the end of capitalism.

Back when phone companies charged for domestic long distance calls, the metering was the most expensive part of providing the service. It cost more to measure and bill for it than it did to provide it. There's an old tension between making something "too cheap to meter" (as people thought nuclear power would make electricity back in the 1950's) vs "cornering the market" and charging money to a captive audience who hasn't got the choice _not_ to use your product or service.

We see this in the internet service providers perpetually wanting to de-commoditize the internet and charge per megabyte. AT&T most recently led the charge for this with their cell phone customers back when they had a monopoly on iPhone sales.

This article once again makes the mistake of referring to "the GPL", which hasn't existed since GPLv3 fractured copyleft into incompatible camps. "The GPL" was a response to capitalism, and the old problem "you become what you fight" is on full display. GPLv3 provides a restrictive license regime full of obligations and the promise of giant legal headaches if you screw up, because its proponents can't conceive of NOT doing that.

This is why I did Zero Clause BSD, a public domain equivalent license designed to be familiar and nonthreatening to large corporations and government entities, without burdening individual developers with strange obligations like 37 copies of the same concatenated license text they're not allowed to clean out. ("You are not meant to understand this, just do it.") I've been testing the Android NDK and the file android-ndk-r16b/sysroot/NOTICE is 63,075 lines of concatenated license text. The "stuttering problem" is on full display.

When the article talks about how BSD and Apache are GPL compatible I look at the stuttering problem and go "define compatible"...

So much wasted effort. Existing software should be too cheap to meter, it's development of _new_ stuff that costs. You amortize the development cost over a small number of years. Back in Charles Dickens' day copyright only lasted 20 years, he outlived many of his own copyrights but kept writing. (He didn't even have patreon.) It doesn't matter what the license is when the copyright has expired. I googled for "software asset depreciation schedule" and the first page of results had 4 marked ads at the top, 4 marked ads at the bottom, and the 10 hits in between were all ads. The point I was trying to make is companies that deprecate software as an asset probably aren't taking more than 20 years to do it, telling the IRS that it's worthless after that point.

If copyright did still last 20 years, and software development was fully amortized over the period and its asset value fully depreciated, then Windows XP would be out of copyright in 2021. It's still what most Windows users _want_ to use, if the ReactOS guys had the source they could fix the security issues. Netscape's long dead. Microsoft suing Linux devs over FAT patents recently provided no value to anybody. That sort of thing still _being_ under copyright is obscene. "How will I still own and control this after I'm dead" is a bad question.

Sigh. People are pushing in the wrong direction, as usual. Applying a licensing regime to something infinitely replicable is not what future generations should be doing at all. But society only frees itself of bad assumptions when people who've lost the ability to question their own assumptions die off.


February 28, 2018

The "80/20 rule" is important. Clay Shirky taked about it in one of his videos, but what I'm thinking about here is you should be able to get 80% of an operating system kernel for 20% of the effort (code/complexity).

I'm looking at xv6 and thinking it's maybe 5-10%, not 20%. To get a mkroot kernel that you can build Linux under, you need 2-4 times as much code as xv6.

I want a simple kernel, libc, compiler, and command line. Capable of rebuilding under itself and building Linux From Scratch under the result. So far I've been doing this _with_ Linux, but Linux added perl, libelf, yacc, and bison as new hard dependencies in a 3 month period.

Assuming you can get a tinycc+cfront capable of building gcc or llvm, they won't run under this because there's no mmap(). (I'm not entirely sure musl will run under it either, because it just uses sbrk() and Rich thinks that's terrible and he tends to remove support for interfaces he aesthetically disagrees with.)

A simple kernel would be single processor, use a simple "generate a software interrupt" system call method, and implement posix system calls. Alas there isn't a system call to get a process list or process data, so it probably needs /proc too. It should have mmu support.

Really, it probably looks a lot like linux 1.0 circa 1994...

I spoke to Jeff on the phone last night and he recommended I look at OpenBSD (which I'll never do, Theo and Stallman are in about the same bucket to me), and netbsd (which is hard to care about since its own developers keep declaring it dead. (Then microsoft puts money into it for a while to revive it, which is not really an argument in its favor.)


February 27, 2018

The linux kernel's going crazy enough that I'm pondering trying to put together a simple build environment with a different kernel, and then build Linux under the result?

That's kind of what I was thinking about with qcc, that it could be the bootstrap compiler you get up and running on a new system, and then natively build llvm or gcc or whatever your final optimizing compiler was with that. (And then rebuild the optimizing compiler with itself, etc.)

Which brought me back to xv6, and I'm finally properly reading the xv6 textbook rather than just skimming, and... it hasn't got mmap. That's kinda important.

I'm not sure what the minimal set of things a kernel needs to support a build environment _are_, but I don't think gcc can run without mmap? (I remember a broken mmap on arm in 2006 prevented gcc from working, back when wanting to natively run a compiler on arm was a crazy thing for me to want to do.)

If you can't build a bigger environment under your tiny/simple one, its not useful as a bootstrap, is it?

That said, I'm building the kernel with a stripped down miniconfig, so I'm in a better position to figure out "minimal" than almost anyone else. But there's an awful lot of stuff you can't configure out, allnoconfig has hundreds of syscalls...


February 25, 2018

Heading back from Fade's. This bus had outlets. Reading my deflate code, and rereading the rfc. I should separate out and promote gunzip, and finish the deflate compression side plumbing to do gzip. Then "zip" and hooking it to tar should be simple in comparison. Plus compressing the --help text.

Left my headphones behind. Can't get new ones because Fedex is evil and nothing else in walking distance of downtown milwaukee has yet revealed an offer of headphones.


February 24, 2018

Cut a toybox release at Fade's. Otherwise offline.


February 23, 2018

Heading to Fade's. The bus does not have an outlet, not online much.


February 22, 2018

Trying to test some stuff, I have "sleep" processes I can check with ps and pgrep and so on, but there could easily be legitimate "sleep" processes running on the system so what I wanna do is "ln -s sleep xiphoid" and then run ./xiphoid 30 so I'm pgrepping for a sufficiently unique name in my test script. The problem is if it's toybox, it doesn't know what "xiphoid" means and won't act like sleep.

So toybox_main() needs to follow symlinks to find a command it recognizes when basename(argv[0]) is unknown. I think one level should be enough?


February 20, 2018

Still trying to clean up toybox for a release (logger's being stroppy, turns out it won't build under musl for reasons Rich has acknowledged are a musl bug, but in the meantime I should inline the priority and facility name tables).

Which brings up an interesting question: how do you list the options? For "kill" there's the -l option, for ps they're listed in the help text (which makes that command's help text outright unwieldy).

The way qemu handles this is "qemu -M ?", which is cool and obvious (you see it once, it's easy to see what it means and easy to remember)... except ? is a shell wildcard. So 99% of the time it'll work, but every once in a while you'll have a single character file in the current directory and it'll get substituted in and break.


February 19, 2018

I read an article on founding a small start-up that _stays_ small that reminded me of an excellent earlier article comparing the growth strategies of Amazon vs ben and jerry's, which relates to something Eric Raymond said (back before he went crazy) about how open source software works like a dentist's office or a law firm: you have two or three professionals and some support staff, and that's your business. "The law offices of Dewey, Cheatam, and Howe, LLC." The kind of business where professionals sell their expertise does not naturally scale up and become a multi-billion dollar business. "The next Microsoft" doesn't work that way.

Capitalism likes cornering the market, and extracting revenue without doing work. Forced routing through a toll bridge is an obvious way, doing work once and charging for it a million times is a minor variant. When Intel required multi-billion dollars to build a fab and thousands of people to design the next processor, sure: amortizing the huge start-up costs over an enormous production run made sense, and was a natural moat around the business. But open hardware? In its entire history the j-core processor has had commits from a little over a dozen people, and most of them didn't work on it at the same time. And the reason they _could_ do it is the patents had all expired, so they could implement in the shadow of prior art. Doing that _again_ would be a question of sufficient individual expertise, not how much money you threw at it or what IP restrictions you could fence off.

What we need is financing tha can support a dozen people indefinitely, on of Brooks' "surgical teams" from the mythical man-month, so we can do the work. This is not something the market is set up to provide funding for. (Corporations used to, but not so much these days.)

Late-stage capitalism giving way to basic income would potentially cause a great increase in certain kinds of engineering productivity. We know this is true because open source, wikipedia, the blogosphere, youtube. Creative people WANT to make stuff, they earn money to afford to be able to do so. Take money out of it, production efficiency increases.


February 18, 2018

Walked to the Avalon Theater to see Black Panther. It was good. Along the way I found the closest McDonald's (about 20 minutes walk south of work, I.E. _away_ from my apartment).

And I found a gas station that stocks the Monster Muscle cans I've been trying to find since the convenience store near work ran out of them. (I bought 5. It also has the discontinued banana version, which implies it has a stock of them from a while back, who knows if it can still get more after that. The nearby convenience store says its distributor stopped carrying any of the monster muscle.)

I like them in part because while fasting, and caffeinating heavily as an appetite suppressant, it's a source of protein for only 200 calories. But it doesn't seem very popular in the wider world. (Given that the chocolate and strawberry flavors were terrible, I'm not that surprised. But the vanilla's good.)

Fuzzy posted a photo of Fade's banana bread recipe to slack, and I should write it down: 1 1/4 cups sugar, 1/2 cub butter, 2 eggs, 3 very ripe bananas, 1/2 cup buttermilk, 1 teaspoon vanilla, 2 1/2 cups flour, 1 tsp baking soda, 1 tsp salt. Heat oven to 350, grease 2 loaf pans, mix sugar/butter, add egs, add bananas buttermilk and vanilla, beat until smooth, stir in flour baking soda and salt until just moistened, bake for 1 hour.


February 17, 2018

Two's complement is the obvious way to do signed integers. The C++ guys are trying to standardize what posix basically already did. (Hint, if your compiler is _required_ to support two's complement behavior, that's how it's going to treat all signed integers. Implementing _two_ sets of signed integer behavior is deeply crazy.)

And yes, this means the compiler optimizer guys who have made integer overflow Undefined Behavior and intentionaly break it are crazy, and you have to work around their crazy by typecasting pointers to longs to compare them (typecast numbers to unsigned, do the math, and typecast them back). But you had to typecast to char * to get byte offsets anyway, so using long instead isn't as big a deal. (Yeah yeah unsigned long, but again if signed integer wrap is two's complement it works either way.)

And since this came up again, one reason you can't have one program linked against more than one libc is each libc instance maintains its own heap, so you malloc() from one and free() into the other and Bad Things Happen. Note that statically linking your program and then using dlopen() to pull in a library that links against a dynamic libc.so will _also_ usually do this.

This is why shared libraries load other shared libraries, and dynamic linking is recursive. If you try to statically link a dynamic library to eliminate external dependencies (my library doesn't need to pull in zlib, I created my .so with --static), subtle badness can happen.

(And this is entirely in C! Do not open the C++ can of worms. There lies madness. And very smug people with stockholm syndrome bragging that they have 20 years of experience soaking up punishment and believe they have learned where every sharp edge is and C++ isn't so bad as long as you don't make it angry or make direct eye contact or mention the existence of petunias, and it works very hard and is under a lot of pressure and always apologizes when you get out of the hospital and really given how it was raised it's doing the best it can and if they left it would only start drinking again and it's getting better, why the most recent stint in a standards group fixed all the problems for sure this time, it must have...)


February 16, 2018

Catching up on the Linux Kernel Mailing list, using my standard procedure: Go to a sane lkml archive (even when sitting down at a new machine, "lkml.iu.edu" is easy to remember and the archive is one link away from there), then pick a recent week I haven't read, search for "torvalds" in the thread view page, and read each message from Linus. (Right click open in new tab, because clicking on the link directly loses your place in the text search.)

Sometimes I read the message Linus was replying to, or the entire thread he participated in, and I sometimes read messages from other names I recognize or click through an interesting title I notice. But "I read all the posts Linus made that week" is my definition of "done".

I tend to do this in batches, because it's easiest to read completed weeks (you don't have to check back to see if new posts have shown up), although the browser highlighting will show you which ones you've already clicked through. (The advantage of reading the current week is you have the option of participating in the discussion, but I generally haven't got the bandwidth.)

This time there are a bunch of links to bookmark, such as an anecdote about why C+ is such a pain to compile. Here's an updated statement about 32-bit support. And the kernel developers seem to finally be ready to take llvm seriously.

Some of these I should reply to even if it's a few weeks late, such as this one about perl, which I should reply to with a perl removal patch for the new nonsense that showed up in the arm build. (Maybe with reference to my original perl removal series.)

And I should reply to the compiler version bump to 4.5 to say I was doing a 4.2 compiler but stopped, and it was about licensing issues, but llvm is feasableish now, so...? (Really musl-cross-make started providing something usable so I stopped doing the sisyphos/necromancy thing.)

Oh no. Flex and Bison. Have they really started requiring flex and bison to build the kernel? Yes they have. Sigh. Hopefully when that stabilizes they can do the _shipped trick they did to make menuconfig not need flex...


February 15, 2018

I wrote up Too Much Detail when responding to a mailing list message about whether or not getprop should be in toybox, and decided not to post it, so saving it here instead:

The original idea was hermetic system builds, and when I started that was defined as providing enough command line tools to build a development environment that could rebuild itself and then build linux from scratch under the result. (On the assumption that once you've built LFS, you have enough infrastructure to build any arbitrary additional package under the resulting system.)

So any command line utility needed to build the kernel, compiler, libc, or toybox itself (well, busybox back then), if it wasn't a tool provided _by_ the kernel, compiler, or libc, was therefore something toybox had to provide. Then LFS needed a few more things.

Except... glibc was providing getconf and iconv and uClibc/musl weren't, so toybox needed those to make a bootstrap circle with those libraries. And Linux From Scratch would often have to build its own version of a command which toybox already provided, but which turned out to have more features required by later package builds, so toybox grew those features so you could skip the otherwise redundant package builds. (You could still build them to regression test, but they shouldn't be _required_...)

And of course when you're at a shell prompt on a toybox system, if you haven't got "ps" you really miss it even if nothing in any of the builds ever used it, and you'll miss command line history and vi and less... most of the missing stuff was posix or LFS commands so a triage of those produced lists of stuff we should probably have. (Some of which was stuff like "cal" that was easy to do, even if it wasn't hugely useful.)

And then there's an actual automated build system itself: it's going to want to wget source packages, apply patches, extract tarballs in the three major formats... not being able to do that is noticeably limiting to _implementing_ an automated hermetic build.

And if you're building natively, the init script in the resulting system needs to be able to mount stuff...

All that fed into the current roadmap: list of posix commands, list of lfs commands, list of things needed to build LFS, and "requests" which are largely filtered by "easy to do given the infrastructure we've already got".

There have been two major changes this decade:

1) I used to assume I'd be bootstrapping Linux distributions (red hat, debian, gentoo) under LFS. Now I want to boot AOSP under a pure toybox system with no additional GPL packages required. (But if there's an existing non-gpl version that the toybox system can build, I don't necessarily need to provide one.)

2) the compilers rewrote themselves in C++ for some reason, and nobody's done a modern cfront in a while, so the toolchain needs C++ support not just C or you can't bootstrap llvm under the result. Figuring out whether this includes crap like the boost libraries (or they can be built natively on the target system) is a todo item.


February 14, 2018

Another attempt to build toybox with the Android NDK, I downloaded the current version which is -r16b, and ran the make standalone toolchain script for --arch x86_64 and --api 26 (which is the version in Android O).

Unfortunately, while toybox compiles with that it doesn't link. Doing CROSS_COMPILE=/opt/android/x86_64/bin/x86_64-linux-android- CFLAGS="--static" make 2>&1 | sed -n "s/.*undefined reference to '\(.*\)'/\1/p" | sort -u | xargs (as you do) yielded:

__android_log_write facilitynames getgrgid_r iconv iconv_open prioritynames sethostname stderr stdin stdout

Which is rather a lot of missing stuff. The annoying part is all that stuff was found in the headers, or else the compile never would have made it to the link stage. So the NDK's headers are providing stuff the bionic static library isn't.


February 12, 2018

Capitalism is a mechanism for regulating scarcity, and in the absence of sufficient scarcity capitalism will create it.

That's why I'm worried about what capitalism's going to do to solar power. They're trying to turn "buy solar panels once and have electricity for 40 years" back into a rental model with unnecessary middlemen charging you a monthly fee. Not just a mortgage to buy the panels, but "we install panels on your roof and then charge you for the electricity". It's stupid and stuck in the past, but there's a lot of money (and entrenched assumptions of powerful people) behind it.

The internet promised freedom and equality and a lack of scarcity. You could endlessly copy digital information so paying for copies was nonsensical. But then capitalism cornered the market so you have to put your video on youtube if you want t-mobile not to count it against your monthly streaming data cap, and youtube has automated DMCA takedown requests. And yes I wrote about it at the time, but didn't expect people falling for facebook's ring-fenced private property a _second_ time (after AOL did it the first time), or the political damage that would do when capitalists learned to leverage the flaws in their business model to defend the next interation of "Leaded Gas", "Tobacco Industry" from the end-stage lawsuits as we figure out how many people fossil fuels are killing each year and reality threatens a profitable business model.

Capitalism works like linear algebra trying to maximize income and minimize cost, and plugging a zero into any of the numbers breaks the model. They'll use up all the free air and water and chop down the forests and slaughter the buffalo until it becomes scarce enough the price of obtaining one more goes up above zero. Wasting a million gallons of water to save a penny is the "right answer" according to capitalism. This is a problem, and an increasing problem as time goes on.

People who chant "There's no such thing as a free lunch" as an article of faith don't believe in them and don't trust them when presented with them. And truly devout capitalists poison free lunches to make you buy lunch from them.

Star Trek didn't just predict flip-phones and voice recognition, it predicted post-scarcity society that had done away with capitalism. You can't HAVE post-scarcity without capitalism, CAPITALISM CREATES SCARCITY. It's called cornering the market and it's how you get rich.


February 11, 2018

Made it home just in time to park the car, hug fuzzy and pet the cats, then head out to the airport for my flight back to Milwaukee.

Well, that ate a weekend.


February 10, 2018

Driving back to Austin to drop off the car.


February 8, 2018

Google testers keep bringing up code purity issues I mistake for real problems.

This week it's "address sanitizer complains about a read from malloc(0) return value which is never used", and I thought that meant bionic was returning NULL instead of glibc-style zero sized heap allocations, and that the code was following a NULL poiner when it shouldn't.

So I added an extra NULL test to the variable initialization... But bionic _isn't_ returning 0, it's doing the same thing glibc and musl are doing, returning a valid pointer into the heap that's a zero-sized allocation, which is safe to read from (even at the end of heap it's followed by at least sizeof(pointer) internal heap data) but the results are meaningless. And we already weren't using the results when the count was zero: so the code worked in practice, but not in theory.

I.E. I fixed it wrong because I thought they were complaining about a real issue rather than a theoretical one, and then had to do a seperate fix to mollify their bug dowsing rod. But what they were complaining about was reading uninitialized memory, which _isn't_a_thing_. The kernel gives us initialized mappings, always. Program may not properly track what's happened to it since but if we're not saving the result it doesn't MATTER.

The high water mark of this is still the ls valgrind thing where I had a for loop adding numbers from two arrays and saving the total in a third array, and then conditionally using the entries in the resulting arrray. I didn't care whether or not the fields in the first two arrays had been initialized because the code that used the _output_ did that, and valgrind freaked at reading uninitialized data (to do addition, then never using the result), so I had to add a useless memset to make them happy. (I could have tested whether each field was used in the calculation loop as well as the display code, but it would have quadrupled the size of the code for zero ultimate behavior change. It was faster to just do integer addition on the cache lines we'd already faulted for the adjacent fields we were using, then decide what was needed at display time.)

The ONLY way that change could ever affect the behavior of the code is if an out of control optimizer decided to damage code to punish access to "undefined" (but correctly mapped) memory. If it does what the code SAYS it would always be right.

There are plenty of things that work fine in practice but not in theory. That generally means your theory is wrong.

I suspect thinking that C++ and C are the same thing leads to treating C as toxic waste only to be handled with full hazmat protocol, rather than "think it through down to what the hardware is actually doing". (Because in C++ you CAN'T think through to what the hardware is doing, it's got layers of gratuitous abstraction that change behavior annually without you ever changing your code.)


February 7, 2018

Decided to drive the car back to austin this weekend rather than next weekend (of course more snow is coming), and Southwest screwed up so badly I've cancelled my "Rapid Rewards" account.

I tried to use my $144 flight credit from cancelling my return trip from ELC last year (since Jeff flew me straight to Tokyo from the west coast), and the site barfed because it expires tomorrow. Called customer service and it turns out you have to _complete_ travel by the expiration date, not just book it. (That would have been good to know.)

They suggested I call another customer service to see if they could make an exception (since I'm trying to book travel for sunday to fly back from Austin to Milwaukee, it's an extension of 3 days). And after half an hour on hold the customer service drone tried to charge me $100 to _not_ help me. ("All I can do" was buy a six month extension, and then they started into a long explanation about how this wouldn't let me apply credit to the Sunday flight, but instead I would be mailed a new voucher. So why bring it up?.)

Meanwhile Expedia found a flight that's cheaper than Southwest would have been _with_ the $144 applied, so it's not actually a loss. But I am "this company needs to die" levels of disappointed in them right now.

Maybe I'll forgive them after six years. (Historically when my vindictive streak is triggered it tends to last an even decade, but... I don't really care about southwest enough to hold a grudge? They're just useless and incompetent. They lost the "most airlines suck but this one is good at getting a plane full of people from point A to point B for an obvious price" special regard I held them in, and since they _don't_ sell through the same site others do, why bother to go look at them specially anymore?

Hmmm, way back when I read articles on the history of the company and how they felt they were competing with ground travel rather than other airlines, so had to keep improving even when they already had a huge competitive advantage. (This is why I described them as proof you could get the contents of a greyhound bus airborne.) Ah-ha! Their founder retired in 2008. Add ten years for his residual influence to attenuate and all their policies to be replaced by corporate drone du jour industry average BS, and yes. Southwest is Just Another Airline now.

(Same thing happened to IBM after Lou Gerstner left. Sam Palmisano followed the roadmap Gerstner left for 5 years, then stepped down at the end of it, and handed off to a clueless corporate drone. Neutron Jack Welch at GE leaving has been bad for that company too. Corporations try very very hard to treat humans as fungible (any unique individual is a liability, you must break up with them before they can dump you and find an appropriately bland beige robot), and it's a total lie. Steve Ballmer was a boring punch-clock villain, not an Evil Mad Scientist like Gates. Apple with and without Steve Jobs is a totally different company, I'm aware that Ives is doing the Plamisano thing of running out the clock of residual inspiration Jobs left but it doesn't change the "10 years later you're kinda screwed" timeline. A conglomerate without a good CEO steering is in for a hard time.

It's a pity my 3 waves talk at Flourish never got the recording published (despite me poking them about it repeatedly for over a year). I should try again...


February 6, 2018

I didn't get to write the initmpfs patch over the weekend, or the new perl removal thing for arm, or something to fix the ORC dependency, or updated initmpfs stuff, or nearly as much toybox stuff as I wanted.

This weekend Fade was visiting. Last weekend I moved into a new apartment. Next weekend I drive to visit fade so she can use the car. The weekend after that I drive the car back to austin so it's not getting a $40 ticket every time it snows (on street parking isn't valid during DPS operations, I need to move the car... to _where_?)

And at the end of the day, after two 20-minute trudges through snow to do 8 hours of porting legacy code in a cubicle (Ubuntu in a vmware window on a windows machine with outlook) I'm too tired to do much. And I can't do the "get up early and program before work" thing because they schedule 8am or 9am meetings 4 times a week, setting the alarm for 6 is barely enough time to make the 8am meeting.

I'm hoping that _next_ month I actually get a weekend to myself.

Oh well, at least there are no cats. So I'm getting a _little_ done.


February 5, 2018

Politics makes me angry because there's a lot of "that's not the real fix" going around right now.

Any time you have a "two party system" your politics are broken. First past the post voting needs to be replaced with instant runoff and more of a parlaimentary system.

Capitalism served its purpose: it regulates scarcity we no longer _have_. Most of the scarcity we wrestle with these days is _artificial_, created by cornering the market and protecting entrenched (outdated) interests. An economy where 60% of the population is full-time farmers is very different from 2% farmers, and we have not adjusted. We still threaten people with starving and freezing to death, while 1% of the population collects 90% of the output.

Between solar power with battery walls, self driving cars, the green revolution, vertical farming, container homes, internet on everybody's cell phone... most scarcity is pretty darn _optional_ for first world populations right now. Yeah the future is "unevenly distributed" but a "moon-shot" style deployment (ala FDR's Tennesee Valley Authority) could get new insfrastructure everywhere in under 10 years. We've done it before, more than once! But instead we subsidize oil companies by billions of dollars each year so they can turn around and spend it on lobbying to keep the subsidies going. We spend more on defense than the next dozen countries combined, decades _after_ winning the cold war. The third world is likely to leapfrog the first in things like rooftop photovoltaic and TAAS ("transportation as a service") because they haven't got existing infrastructure to replace, so they're not throwing good money after bad maintaining expensive legacy infrastructure. (They already did this with cell phones.)

Bullshit jobs. Universal Basic Income. Billionaires cornering the market, the 1% at Davros... These are radical positions the same way that abolition and women's suffrage were radical a century ago. They are major societal changes whose time has come. (Even a lot of racism is economic scar tissue that continues once the original reasons are long forgotten. See also african slavery and the demand for malaria-resistant plantation labor 300 years ago...)

Unfortunately the old geezers on top of the current pyramid are terrified of change and will attack anything that challenges the status quo. Society advances when old people die. I am _so_ looking forward to the end of the Baby Boom. But then I'm generation X, waiting for Boomers to get out of the way is _our_ defining shared experience...


February 4, 2018

Dropping Fade off back at the Greyhound station, we walked to the Stone Creek coffee shop across the street from the bus place to hang out with laptops for a bit.

In theory the greyhound station is as far from work as my apartment, just in a different direction (west instead of north). That's part of the reason greyhound might be a better option than driving, I could go there friday after work and get on a bus to Minneapolis, then back sunday night.

In practice, work isn't open on sunday, and neither is the Pita Pit we were navigating to as halfway point. Milwaukee, outside in February, is really really really really cold, and a half hour walk in it is a lot less pleasant than a fifteen minute walk. Even with a break in the middle (which turned out to be at potbelly subs, which was open and warm). Fade may be used to this, but I'm not.

Finally got some time to poke at pending toybox issues. I noticed the crc32 command in ubuntu (in both the new ubuntu 16.04 I set up for work and in my netbook's 14.04, "dpkg-query -S $(which crc32)" says it's in the libarchive-zip-perl package which is disgusting but apparently commonly installed. My crc32 logic can spit that out, it's "toybox cksum -HNLP", so a simple NEWTOY(crc32) with NULL arguments and crc32_main() that sets toys.optflags |= FLAG_H|FLAG_N|FLAG_L|FLAG_P; before calling cksum_main()... and it doesn't work... because I forgot FORCE_FLAGS. (Using cksum's flags when cksum is disabled, they get zeroed unless forced.) Ok, now it works.

So I can trivially provide this as a new toybox command with just a couple new lines, except A) if there's no file ubuntu's crc32 exits immediately instead of reading from stdin (I'm gonna call that "their bug"), and B) it only prints the filename when there's more than one argument. That's a design decision: grep works that way, sha1sum doesn't. What's _inconsistent_ is that cksum always prints the filename.

I already added -N to cksum (the ubuntu one has no arguments, mine lets you select endianness, pre/post inversion, and whether to include file length in the crc). Teaking -N not display the length either makes sense. having -N also only print the filename if there's more than one argument is less obvious, but adding a seprate option just to disable that is kinda silly... (It's another one of those "the difference is too small to have an obvious right answer" things.)

Oh, another difference is that crc32 always outputs 8 bytes of hex data where mine won't include leading zeroes. I think mine is wrong, and I should fix that.

Hmmm, the "print name or not" logic is actually a little more subtle: cksum doesn't print the filename when there is no filename (zero args, reading from stdin). The ubuntu one does, toybox doesn't yet but should. So if crc32 decrements argc by one, then the logic matches up... EXCEPT then we depend on optc being signed (because optc == 0 becomes -1) and while it _is_ I'm uncomfortable with leaving open the possibility of optc changign to unsigned at some point in the future and breaking this. (Well, test suite entry should check it and regression test should catch it, but in the meantime it can be if (toys.optc) toys.optc-- which would also work with unsigned.


February 3, 2018

Hanging out in Tiny Apartment with Fade. Introduced her to the nearby grocery store, which is pretty much all I'd found in the area. Finally tried the Gyro place around the corner, which is pretty good.

I've been caffeinating pretty heavily during the week, and not having any during the weekend, so there were some unexpected Attack Naps on the new air mattress.


February 2, 2018

Fade's come to visit, trying out the Greyhound bus from Minneapolis to Milwaukee. Given the security theatre at the airports, the bus takes about as long as planes do, and it's got more legroom, wireless, and an outlet to charge a laptop. So we thought we'd give it a try.

My plan was to pick up my car after work, drive to the greyhound station, get a little programming done at the coffee shop across the street until her bus came in, then drive her to Target to get an inflatable mattress for The Tiniest Apartment. (I've been sleeping on the two stacked sleeping bags I brought with me in the car, and given how hard the floor is it's still noticeably unpleasant, so I needed to do that anyway.)

Problem 1: Milwaukee may be a very walkable city but _driving_ through it, in the snow and slush and a layer of salt congealed on the windshield and covering all the road signs and lane markings, is No Fun At All. I managed to turn the wrong way on a one way street _three_times_. (Also, half the streets are two way and half are multi-lane one way and the lane markings are identical even when you _can_ see them.)

Problem 2: her bus was delayed by 2 hours leaving minneapolis, for reasons I'm still unclear on (they had to find a new pilot).

Problem 3: The coffee shop across the street closes at 7 and I got there at 6, with Fade now expected to arrive at 10. Not worth setting up, really.

Wound up going to Target myself, then going on a Quest For A Food Place That's Still Open to bring her a dinner-like item. Downtown kinda switches off after work. (Luckily the McDonald's near the Target is 24 hours, and grilled chicken snack wraps are almost like food.)

Got zero programming done, though.


February 1, 2018

Stopped at a second starbucks to redeem my Free Birthday Thing, and they don't do it either. Something about corporate vs franchise stores. Gave up and uninstalled the starbucks app.


January 31, 2018

A message on lkml fiddling with initmpfs wondered why it checks that you don't set root= (I.E. "as there must be a valid reason for this check...).

Backstory time!

I didn't want to switch rootfs to tmpfs all the time because it uses very slightly more resources, and if you're overmounting it with a fallback root= filesystem anyway those are wasted. It's a tiny waste, but it would be there on every system, so the check.

The _proper_ check would be that you have an archive to extract into initramfs: if you're extracting an archive into initramfs then you're using initramfs as your root filesystem, and thus making it a tmpfs instead makes sense.

Unfortunately, for years the default output of gen_initramfs_list.sh was three lines or so that created a /dev directory and a /dev/console entry. It was meant as example code, but when you didn't specify initrams contents it wound up getting called with no arguments and the build would create a tiny (150-ish byte?) cpio archive with /dev/console, and gzip it up. So initramfs would have a /dev/console in it, and then get overmounted and ignored.

And then the init/main.c logic grew a _dependency_ on this /dev/console. When opening stdin/stdout/stderr for pid 1, it basically called the open() syscall in the new process context with /dev/console, before pivoting out of initramfs. It worked because it was there, and then when it STOPPED being there (because I pointed out the default output and they fixed it) your initramfs wouldn't have stdin/stdout/stderr so they added a gratuitous mknod in initramfs context.

This feeds into the devtmpfs_mount patches, where right now there's a kernel config option to automagicaly mount devtmpfs when the system comes up, which ONLY applies to the fallback root= and not to initramfs. So I have a patch to add support, which is necessary if you create an initramfs by pointing the kernel souce to a directory of the initramfs contents as a normal user: It's the simple straightforward thing to do, but doesn't automatically add /dev/console and you can't create the device node as a normal user.

While I was there I cleaned up the kernel config stuff so you can tell it all the curent user's files should belong to root in the initramfs. Why nobody did that before I couldn't tell you, you had to specify which uid to map meaning your config had to know gratuitous details about your build system.

Anyway, I remember how somebody had a problem because their cpio.gz filled up more than half their ram and it failed with initmpfs but worked with initramfs. (Due to 50% of total memory being the default tmpfs size limit, so it filled up during the extract and stopped extracting.) I don't remember if lkml was copied on the email exchange but it resulted in this blog entry from the affected party.

Meaning I need to be able to specify "no really, rootfs should be ramfs" unless I can pass through size= to tmpfs options, or otherwise there are real world failure cases that hit existing people.

Unfortunately, some people clearly still don't get it. (Those are instructions for copying your initramfs into a tmpfs mount and then doing switch_root. My patches to let rootfs _be_ a tmpfs were merged in 2013.)


January 29, 2018

I wrote a thing on hermetic builds. It's related to the shared library part of the toybox design page which came up when the bc guys want an external lib.bc file to implement bc -l and I said might as well make it a big string constant in its own file (or with some #include magic).


January 28, 2018

I should probably have a page somewhere of "classic links", on topics that I should remember to introduce people to. (I have a links page but it's old and doesn't have summaries. I tried to put a few on the kernel docs page I used to maintain but lot access to update that in 2011.

One is the "Resource Curse", which is the problem that if most of a country's income comes from something like oil revenue, the country's government doesn't need 99% of its people. If you can't strike for better conditions because your labor is neither the source of income nor the thing that income is buying (everything, including cheap labor, can be imported), you have no natural leverage over those in power.

This is why you get "oil oligarchies". Countries like Russia and Saudi Arabia that earn the majority of their income from oil tend to have zero respect for human rights because if a plague wiped out 99% of their population the ruling elite wouldn't necessarily lose any income or amenities.

This is one of the reasons people are fighting for basic income as we automate away entire sectors of the economy: a century ago more than half the population worked as farmers, now it's less than 1%. The service and transportation industries that replaced them are also being automated away. This isn't a new problem: the Luddite movement protesting textile factories automating away weaving jobs happened over 200 years ago. But the erosion of the bargaining power of labor during the lifetime of the Baby Boomers has led to a real possibility of a technology-driven Resource Curse where the government doesn't need the people because we've got solar powered factories delivering 3D-printed goods via self-driving drone, and less than 1% of the population has any work you'd notice stopping if they went on strike. The Boomers won't live to see this, but the rest of us might.

I'd love to set up a conversation between David Graeber and Clay Shirky where they talked about this sort of thing for an hour. I really want to hear what they'd have to say, because I've got nothin'. (Shirky's Looking For the Mouse talk and Graeber's Bullshit Jobs essay play off each other quite interestingly.)

A persistent problem is that rich people are insulated from the consequences of their actions by a cushion of wealth, so they can be DAMN STUPID. (Hence the libertarian fish tank filter issue.)

And the anti-global-warming people are the tobacco institute are the leaded gas defenders, there are some good writeups about how those are literally the same people moving from one think tank to another as the funding sources change over the years.

And writeups on how capitalism is all about cornering the market and creating scarcity...

Sigh. I do my own writeups sometimes, with links to other people's stuff, but they get buried and lost in this blog. Dunno where else to put them. I haven't had a regular column with an externally imposed deadline since The Motley Fool days. (And those old archives are buried too, even things that made quite a splash at the time...)

But really, there's stuff out there that people should already know. Most of them _don't_, and I should have a place to point them for backstory.


January 27, 2018

Packed out of my hotel room by the noon checkout, although my car's still in their parking lot at the moment. I meet the apartment manager at the new place at 6pm to move in there. (No furniture but I brought two sleeping bags and a tray table to put my netbook on. I should buy a folding chair, I wonder where would sell that if there's no Target around here?

I looked for a clean quiet room, in walking distance of work (about 15 minute walk) with a shower/stove/refrigerator (pity it's gas, but oh well) with controllable temperature, outlets and a lockable door. (Well, it was quiet when I was there, we'll see how it is long term but I have earbuds and can get earplugs.) This fits those critera, and is quite reasonably priced.

And it has NO CATS IN IT. I might actually be able to get through the rest of the toybox roadmap in a finite amount of time. We'll see.

I type this from a starbucks. Well, a sort of starbucks. It's a corner of the grocery store I found (Metro Market, 2 blocks from the new apartment and more or less on the way to work from there) that has INSTALLED a starbucks, which opens on the 31st. Until then it's a seating area. I'm all for it. (No outlets, phone battery's already dead, netbook's at 38%. The replacement battery Fade ordered is regular size, not the jumbo size ones which last a long time but stick out awkwardly in a way that means I've now broken two of them.)

I've mostly been reading and closing browser tabs. So much backlog...


January 26, 2018

End of my first week at Johnson Controls. It's nice, for a Fortune 500 corporation that's put me in a cubicle. I don't see a problem doing 7 months of this.

I found a broom closet for $575/month with most bills included (you can get really SMALL efficiencies if you try), signed all the apartment paperwork, and today got a cashier's check for the proprated first month. They say I can move in tomorrow at 6pm.

Heart still beating way too fast this evening. I gave up and bought some chicken and one of the steaks the grocery store had on sale. My hotel room has a kitchenette in it (it's a lovely place, which has apartments on the top two floors. I found this apartment by talking to their apartment people, and they got me something in another building they manage the next block over). A week of fasting seems long enough for now, maybe I can atkins for a bit.

I've read organized, detailed diet plans with Intermittent Fasting and Keto Protein Loads and really, I'm not good with this. I can manage "do this" vs "not do this at all" distinctions. I suck at exerting consistent willpower over regulation of amounts over long periods of time, I have other things to DO. So "not eating today", "not eating carbohydrates"... That's about the level of granularity I can manage.

Hmmm, maybe I should find a gym. These tend not to work for me, but I'm still establishing a routine here. Walking to work and back builds a little exercise into my day, so that's nice.


January 25, 2018

I've been more or less fasting for a week now (I'm 80 pounds over what I weighed in college, that's like 1/3 of my current body weight), but something's going weird this time. My resting heartbeat lying on the bed at night is over 100 bpm, that doesn't seem right.

I've been using caffeine as an appetite suppressant, which amounts to a diet monster energy drink and a 1.5 ounce piece of "driving chocolate" per day this week (which is like _two_ energy drinks worth of caffeine, and I eat it in small chunks through the day). But if I stop having caffeine arond 4pm and it's 9pm, shouldn't it have worn off by now? Hmmm...

Last time I did this I leaned heavily on McDonald's Side Salads (15 calories by themselves, still less than 50 with half a pack of vinagrette dressing), which was fine for the drive here but the closest McDonald's is like an hour walk from my hotel room.

On tuesday I found a can of "monster muscle vanilla" and had my 200 calories all at once (with actual protein), but it was that convenience store's last can, they haven't restocked, the grocery store I found doesn't carry it, and google is unhelpful. (Hipstercart claims they can get it from kroger, but the nearest kroger is halfway to Chicago so I'm not sure what they mean by that.) There isn't a Target downtown either.

Of course another thing that does this to my heart rate is food poisoning, and without the salads my digestive systems seems to have entirely shut down this time. I wonder if that's related...

Broke down and bought two scoops of the "chicken and gravy" stuff the grocery store had. Absolutely delicious, and let's see if that settles my system...


January 24, 2018

I've been fasting on this trip, by which I mean eating 15 calorie McDonald's "side salad" with 40 calorie vinagrette dressing (using half a packet). but at one stop I failed my saving throw vs free pie because if you ordered through the kiosk, you got a free apple pie. McDonald's is trying to turn itself into a giant vending machine with no humans working there, as predicted by the expanded version of my old three waves talk, where stage zero is an idea you haven't acted on and stage 4 is fully automated with nobody working there anymore. Neither is a "business" so I didn't write about them for The Fool way back when, but it's kind of the full life cycle. "Computer" used to be a job title people did. Telephone operators used to connect every call. Elevators had operators before they had buttons. Further back, every household used to spin and weave and sew its own clothing, grow and preserve its own food...

There was a display of farm statistics at the last rest stop heading out of Texas, neatly explaining why "basic income" is now possible: a century ago we had 60% of the population working on farms (and a century before that it was 80%), now it's 2%. It was an Oil! Oil! Oil! display touting Tractors! and Chemical fertilizers!, but along the way we had the "green revolution" with dwarf wheat quadruple food production with better plants, so either way a smaller fraction of the populace is now producing way more food. (Most corn isn't for humans, see also the circle of rice.)

This means, strictly speaking, we don't _need_ the work over 90% of the population does, as in we're not going to starve without it. (But housing! The construction industry employs 10 million people, that's about 1/4 of 1% of the population of the country, 2% to <10% is a lot of slush factor for "ok, maybe necessary". And yes, I'm glossing over the can of worms that is healthcare, given how utterly screwed up it is in the USA, but most of "healthcare" is a giant bloated insurance industry and about half the rest is an administrative bureaucracy engaging with said insurance industry. Googling for per capita statistics, between europe and the US I get 3 doctors, 10 nurses, 2 pharmacists, and 1 dentist per 1000 people. Altogether that's 1.6%, still plenty of slack in the <10% actually assumed necessary above.)

Add in the revolution in transportation brought about by containerization starting in the 1950's, internet and smartphones, and the ongoing advances in solar power and self-driving vehicles, and meeting the basic survival needs of people is likely to take a _very_ small part of a modern economy a decade or so from now. Our big growth industries are things like entertainment. (Most people would rather hang out with friends, but who has time or energy when life revolves around sitting in a cubicle pretending to work most of each day?)

The knee-jerk argument against basic income is we can't afford to feed and house people for free, but exploding prison population? No problem! QE/bank bailout? Of course! If 2008 made one thing clear, it's that modern money is completely made up, it's numbers in a computer that the rich and powerful can edit on demand by _trillions_ of dollars, their only constraint is making sure the rest of us keep believing in it, respecting it, and chasing it.

The theoretical problem with printing money is inflation, so you tax the excess money away. The actual problem with adding money to the system is it pools in the pockets of rich people, so you have to tax _them_, and they complain loudly, with entire think tanks tasked with lying ot make them look indispensably important.

Rich people claim they're job creators but they're not: supply comes from workers and demand comes from everybody buying stuff they want or need. Billionaires are gatekeeping middlemen. But even assuming they were correct, the "incentives" argument gets cut out by real world research showing Say's Law doesn't kick in below a 70% tax rate. And what's another billion to a billionaire except a way of keeping score? Compound interest says they can spend millions of dollars every day for rest of their lives and end up with more money than they started with. It _doesn't_ run out. Techie co-founders like Paul Allen and Steve Wozniak (or founders like Jim Manzi of Lotus 1-2-3 fame) quit at $100 million because at that point more doesn't MATTER, the interest buys you a new house each week. They never have to do anything _useful_ again in their lives.

The people who continue to actively accumulate wealth into the billions are either driven by something other than money, or think they're bidding on the Titanic's Lifeboats and can never be "rich enough" to sleep soundly. (This is a self-fulfillig prophecy when their own asshole behavior in pursuit of wealth is the disaster they expect to be sending torches and pitchforks after them someday.)

David Graeber wrote about BS Jobs, which are useless jobs that produce or accomplish nothing. Many other jobs are only mostly useless, a 40 hour work week with 4 hours of actual work is fairly normal. They're created to satisfy a capitalist society's need for people to be employed in order for the people to be valued members of society (I.E. "Productive members of society"_ without producing anything anyone needs. Then there's entire industries like Tax Preparation that defend themselves via lobbying or similar, but are completely unnecessary. (Your information's already been reported to the IRS, in sane countries there's a website or similar you go to that has all the forms already filled out. You don't have to pay hundreds of dollars to pointless middlemen bureaucrats.) I'm also reading about how underemployment of lawyers is the new normal. There are no "safe" jobs, and many of the ones with good salaries tend to involve a modern guild like the American Medical Association that restricts membership.

But automating away all the jobs isn't a _bad_ thing if you kill enough billionaire middlemen intentional bottlenecks to clear the way to provide basic income, with which people can find new things to do. Creativity is _helped_ by having free time/energy/flexibility to play. Steve Jobs and Bill Gates didn't start new businesses because their survival depended on it, both were supported by their parents well into their 20's. They wanted to move up and have an impact on the world. As Graeber said, 99% of people not doing anything useful with their time is no different than 99% working retail jobs at Sears before Amazon mail orders came from a robotic warehouse to your door by delivery drones.

This is the kind of stuff I muse about on long cross-country drives. We're waiting for the Baby Boomers to die off so we can reach the kind of post-capitalism future Star Trek predicated half a century ago, but which they're too old and set in their ways to ever believe could be real even with solar power and self-driving cars and smartphones. Our problem isn't famine, it's obesity. There's a _distribution_ problem, since 2008 we have a simultaneous problem of abandoned houses and homeless people, that says the way we choose to organize society _sucks_. "We've always done it that way" isn't helpful when the rules change.

I do worry about the resource curse: a government that doesn't need its people tends to suck for those people, who can't strike for better conditions. But staying with capitalism isn't going to fix that. Again, the real problems are political, not technological.


January 23, 2018

Had to set up a new xubuntu system, 16.04 this time (if work is _paying_ me to use something with systemd...) and the procedure is always changing. This time the way to get the scroll bars back is to edit /usr/share/themes/*/gtk-2.0/gtkrc (where in this case the * is Adwaita, that's the theme selected in settings->appearance->style) and switch "GtkScrollbar-has-*-stepper" from 0 to 1, and also to change the GtkRange-stepper-size to 13 (from 0). (In theory you can set it globally but in practice every xubuntu theme manually sets these, overriding the global setting).

Without scrollbar arrows, scrolling the display up or down a fixed number of lines requires fiddly litle movements with the mouse and isn't always possible at low screen resolutions. With the arrow, click once to go up one line. So naturally, ubuntu disables them.

The SH4 VoD system has shown up in Austin! In a way that required a signature to accept delivery. I am in Milwaukee. I'd have them forward it to Fade in Minneapolis so I can pick it up when I visit (only 5 hours away, longish but reasonable weekend drive)... except for the requiring signature for delivery part. Hmmm...


January 22, 2018

Made it to milwaukee, first day of the new contract. Reading printouts, waiting for IT to drop off a computer, listening to long "this is the project" lectures from multiple coworkers. Pretty standard so far.

Quiet time in hotel room afterwards, cat-free. Luxury. (I napped, due to all the fog I was up driving last night until 2am.)

I just did "diff -u <(git diff toys/*/fmt.c) <(diff -u fmt.c fmt2.c) | less" with malice of forethought, because I saw this and went:

$ git am 0001-Un-default-fmt-1-while-it-s-in-pending.patch
Applying: Un-default fmt(1) while it's in pending.
error: toys/pending/fmt.c: does not match index
...
$ git diff toys/pending/fmt.c tests/fmt.test | diffstat
 tests/fmt.test     |    7 ++++
 toys/pending/fmt.c |   76 ++++++++++++++++++++-------------------------
 2 files changed, 42 insertions(+), 41 deletions(-)

I should really finish that. I wonder if I left myself a blog entry talking about what I was doing... No I didn't. Gotta read the diff.

A failure mode when I get _really_ overwhelmed is having a half-dozen tabs in a console window somewhere recording the state of an ongoing cleanup, where the backscroll shows tests I'm running that need fixing, experiments I did against multiple versions, and so on. If my netbook reboots before I get to a good stopping point and write it down or turn it into proper tests that TEST_HOST passes, and then I don't get back to that particular command for a month, I often wind up just "git resetting" the file and losing days of work that it would be easier to just redo.

This is why I call it "swap thrashing". I realy hope to be able to flush some cache on this expidition, as well as becoming flush with cache. (Sorry, couldn't resist.)

Elsewhere, the debian sh4 maintainer is being very nice and sending Rich Felker and myself a pair of cheap taiwanese Video On Demand boxes that (can be made to) run sh4 debian, and when Rich was talking about tracking down the right adapter to hook up the serial console, I asked to be kept in the loop. This led to the following exchange which I record here so I don't have to type it again if it comes up in another context. :)

> As I said, it’s already pre-installed with Debian Wheezy. I tested both boxes.

I was talking about Rich's attempt to get a serial console.

Without console output the box provides an all-or-nothing canned distro that has to bring up a large chunk of userspace before you have any output. So if I upgrade the kernel from -rc1 to -rc2 and it has a problem with some driver halfway through, I never get to see how far the boot got. If I tweak musl and sshd didn't come up, all I know is sshd didn't come up. I can't rdinit=/bin/sh or rdinit=/bin/helloworld-static to see what _does_ work. If device tree version skew can't find the interrupt controller because they changed something and the real problem is I need to upgrade dtc now, I have no trail of breadcrumbs to track that down.

> Connect power, ethernet, wait a few minutes until the LED is solid blue.
> Then check your router/DHCP server which address the box received, then just:
>
> ssh root@$IP
> Password: root

Which means that if the kernel doesn't boot all the way through, successfully extract its root filesystem, get through its init scripts far enough to successfully configure the network, and launch a daemon against a working C library, all I know is "it didn't work".

I've fed cpio.gz to kernels that only had cpio.xz support configured in. I've seen upgrades introduce a kconfig guard symbol that switched off BINFMT_ELF. I've accidentally dynamically linked something I meant to statically link that the init script depended on. I've seen binutils version upgrades make it write an inappropriate instruction because now it needs --no-really-stop-it-with-the-vector-extensions in ./configure, if I can't see the illegal instruction printk during the kernel boot that would really not be fun to track down.

I've worked on enough "If I change anything, it either works or it doesn't with no diagnostic information in between" systems over the years to know I probably wouldn't poke at anything that brittle in a hobbyist context. It would go back on the todo heap and stay there because I'd be afraid to touch it.

Possibly I could try getting a netconsole working on a static address (although that's still pretty iffy about early boot messages, many moons ago there was some work to create interruptless network driver stubs ala the early_printk serial drivers, but I think Alan Cox shot that idea down? Don't recall and the pages google's finding say netconsole just doesn't do early boot messages before interrupts are enabled, which is basically when it's about to launch PID 1 (interrupts = we can drive the scheduler now)...)

> Check /dev/sda1 if you want to see the uboot config.

With a serial console I could use u-boot interactively, and set up tftpboot and all that fun if I really wanted to (without even persistently changing the uboot config).

Some kernel developers won't touch a box without a jtag, but I'm the "stick printfs in everything" kind. With serial console you can get it down to two lines right at the start of "it's running code":

This example is missing the real-world "spin checking the ready for output bit in the status register" part, but you can usually track down the appropriate uboot serial output driver and figure out what your two lines are. Or break down and read the spec sheet. :)

Quiet hotel room without cats. I get so much more done here, even if at the moment it's still mostly just catching up on email...


January 21, 2018

So much fog approaching wisconsin. Stopped at a McDonalds for a couple hours to see if it would clear up, and it got worse instead. Oh well, got to catch up on some email, anyway.

I've recently noticed that "I've publicly said this 5 times" doesn't mean other people have heard it, so here goes again.

Speaking of which, it's possible the "minimal" system will grow a fifth required-ish package: cryptography. (Largely thanks to out-of-control state surveilance bureaucracies trying to endlessly expand their budgets.) If public key signing is required to verify package downloads (not just checkign a hash), or https:// downloading becomes necessary for the base OS build (we're flirting with that already), then that doesn't really belong in any of the above because "not leaking data through crypto side-channels" is its own area of expertise needing its own set of experts doing their own package.

Except... ktls is half a solution exported by the kernel already. It's possible some crypto is in scope for toybox (such as https) using ktls. Right now it's just half the plumbing and you need a big wrapper around a member of the openssl family to use the ktls plumbing the kernel provides, but maybe that's doable and/or less of an issue in future?

Encryption is not within scope for toybox because of the same zlib/curses problem: external libraries _must_ be optional so we'd need to provide a simple built-in version of their functionality, and I ain't rolling my own cryptography. (Hence wanting an stunnel style solution for wget and httpd forever, without which neither command is hugely worth doing...)


January 20, 2018

I stopped at a McDonald's in Texarcana to recharge my phone on the drive up to wisconsin, and I saw email from the manager from back when Large Phone Manufacturer That Still Wishes To Remain Anonymous sponsored some toybox work a few years back, and I accepted the link because for once it's somebody I actually know. (Well, we never met in person, but I sent her a lot of email.)

This opened linkedin, and one of the links on there was an incredibly vague position at... Google Austin. Which I found greatly amusing, and I almost tweeted "I really, _really_ shouldn't apply to this..." with a link, but it would require too much context to explain.

But "too much context for twitter" is what blogs are for. So:

Yes I just signed up for a 6 month contract in wisconsin (which I am driving to, so I'd have the car up with me), but last time I applied to google it took 8 months to work through their hiring process, so I wouldn't expect them to conflict. (Besides, given my previous experience with Google I wouldn't expect to _get_ the job, I'm mostly just amused.)

The _first_ time a Google recruiter called up and tried to hire me was over 15 years ago. (I took the phone call in the apartment I had when I worked at WebOffice, so 2001 or 2002.) I think I was on Google's radar because way back in 1999 when I wrote stock market investment columns the portfolio I covered included Yahoo, and I wrote an article mentioning I preferred Google's technology. And google sent me a t-shirt and a bunch of stickers, because they said it was their first stock market coverage. (This was 5 years before their IPO, they were still a "linux search" site in beta, I think I heard about 'em though slashdot. That's how long ago it was.) Or maybe the recruiter called me because of my posts to lkml, who knows?

I've never particularly wanted to move to California, although my reasons why (expensive and earthquakes) don't seem to apply to Tokyo for some reason. Huh. (At this point I suspect it's inertia.) But Google recruiters kept calling like clockwork every 6 months for the next few years.

Then ten years ago ChromeOS came out, which sounded like fun (this was _after_ I co-authored a paper on why Desktop Linux hadn't happened, so yay new approach with a hardware vendor behind it who could get preinstalls). So I followed Google's "apply to work on ChromeOS" link but selected the Dublin Office from the site selection pulldown because I'd never lived in Ireland and that also sounded like fun. This confused Google's hiring process (seriously, I break everything), so they didn't get back to me for a few months, but I was in the downtime between contracts and didn't mind. (Consulting meant I earned enough I could take time off between contracts, which is when I got most of my open source programming done. This is back before marriage led to big house and other people to support, or at least reassure that I know where the money is coming from next month).

Google's version of a cat's "when in doubt wash" seems to be "Site Reliability Engineer", which they could do in Dublin, and it sounded worth a try, setting off an odyssey of endless phone interviews, culminating in an all expenses paid trip to the Googleplex (my first time in Silicon Valley proper), and then deculminating in some sort of telepresence interview _after_ that in Google's Austin office (next door to Qualcomm, northwest corner of I35 and Mopac, and deserted except for a receptionist when I arrived) where somebody on the other end of a camera wanted me to write code in chalk on a blackboard. As I said, I confused them, and they spent a long time making up their mind...

Except they didn't. A full 8 months after I'd applied, when my bank account was getting kind of thin waiting for a decision (I'd have gone to work somewhere else months earlier but I was waiting to see what Google thought), they said I'd passed all the interview hurdles, my resume was sitting on the desk of whichever cofounder it was who personaly approved all hires, but the position I'd applied for had been filled and I needed to restart the process from scratch.

I thanked them for their time and got on with my life.

The next google recruiter to call me 6 months later was confused about my status in their HR system. I explained my Interview Odyssey and resulting reluctance to reopen that can of worms, she put a note in my file, and they stopped calling for a while.

Shortly after I did my 2013 toybox talk about hijacking android for my own purposes to steer the computer industry, I got a call from another google recruiter (no, he hadn't seen my talk) and went "ok, why not" and went through the thing again, except I'd just finished up my 6 month contract at Cray in Minnesota an was spending a week with my sister and her 4 children before returning to Austin, and hanging out with small children exposes you to every stomach bug they pick up at school, so I had to cut the interview short to urgently visit the bathroom, and the Google guys decided _not_ to continue, an I went "ok" and got on with my life. Haven't heard from a google recruiter since.

Google merged toybox in 2015 and has been using it since, but toybox development's stalled badly as SEI struggled to stay afloat. As the company lost staff instead of staffing _up_ we all wound up doing 4 jobs apiece (the corollary to Brooks' Law I learned at timesys remains true, removing people from a project is as big a delay as adding them, you spend all your time on "knowledge transfers" and then the remaining people have to come up to speed on tasks the departed used to do) and the stress started affecting my health.

At the start of the year I went "this is the _second_ set of taxes I'm going to have to check my bank statements to see which paychecks they managed to make, _after_ dropping us to half pay", and when a recruiter offered me twice what SEI had paid back when we were full-time (so 4 times now even if they _did_ make every scheduled paycheck) I took it. (The email I got from Elliott talking about "the thing that replaces toybox" helped with my decision to sign the contract. The advantage of a 9-5 job in an office is you know when you're _not_ working, and can do open source stuff without guilt...)

I was tempted to apply to the linkedin thing in part because the idea of using Google's "20% time" to work on toybox was just too ironic. Google's never paid me a dime for toybox. Elliott bought me lunch once. And they gave me an "open source award" (along with a dozen other people) that came with a $250 gift card, but I had to go to payoneer's website to activate the card and the login credentials they sent me didn't work. I even poked the Google open source award coordinator to confirm the credentials, but never could log in and after enough failed tries it disables itself. (I still have the card in my wallet, probably expired by now.)

And yes, I'm aware 20% time no longer really exists, that's a whole 'nother rant (that links to December 1 but the topic continues through december 2, 4, 5, and 6, I should collate old blog entries into proper writeups someday. My todo list runneth over. I prepared and presented a proper talk on that topic at Flourish last year, but they never posted the recording.)

Anyway, the bit about the google job is moot because when I clicked through it went to an application page on careers.google.com (with the same info), and when I clicked on "apply" there Chrome gave an error page because the site "redirected me too many times". (I repeated this 3 times to be sure it wasn't transent, then got on with my life.)

I break everything. And I continue to confuse Google's recruity-bits.

Anyway, back on the road to Milwaukee.


January 19, 2018

Finally finished flushing the lkml and qemu-devel folders into "2017" sub-folders so thunderbird doesn't choke on the giant mboxes bigger than it can handle (making email download sit there and twiddle its thumbs for a couple minutes when the filters try to move the first message into that folder, sometimes making the smtp server time out).

And this meant I started reading qemu-devel at the start of january, and noticed Laurient Vivier pushing his m68k support patches again. Looks like seriously this time. (Yay!)

So I wander to my qemu directory, make sure it isn't locally patched (git diff), do a git pull, start to ./configure, kill it and do a make clean just in case, and...

$ make clean
./configure
  GEN     aarch64-softmmu/config-devices.mak.tmp
  GEN     aarch64-softmmu/config-devices.mak
  GEN     arm-softmmu/config-devices.mak.tmp
  GEN     arm-softmmu/config-devices.mak
  GEN     i386-softmmu/config-devices.mak.tmp
  GEN     i386-softmmu/config-devices.mak
  GEN     ppcemb-softmmu/config-devices.mak.tmp
  GEN     ppcemb-softmmu/config-devices.mak
  GEN     x86_64-softmmu/config-devices.mak.tmp
  GEN     x86_64-softmmu/config-devices.mak
  GEN     config-all-devices.mak
config-host.mak is out-of-date, running configure

And so on and so forth. It generated dozens and dozens of config-target.h and blah-commands.h files just so it could delete them!

Meanwhile, "git clean -fdx" took like 2 seconds. Except for the part where .gitinfo can tell it to ignore files which don't get deleted, and I'm reluctant to try to add options to override that because qemu uses subtrees for dtc and stuff and I don't want to delete them.

Projects seem to have a natural lifecycle where they get so complicated fewer new developers come on board, and eventually they starve for resources when the existing batch ages out. The average age of linux developers is Linus's age, and he's something like 47 now...


January 18, 2018

I have a failure mode during software development, which is naming stuff strangely. I had to do a cleanup pass removing the "9 princes in amber" references (a book series by Roger Zelazny) because after enough repetitions of the variable "pattern" I threw a "logrus" in there in self-defense and it spiraled from there.

Now I'm cleaning up ps, which has -o fields living in "struct strawberry" with the variable length char array at the end of course called "forever". This doesn't help anyone understand the code.

I'm banging on gzip right now and resisting calling the --rsyncable option --titanic during development.

All this should have been cleaned up and properly explained long ago, I've just been so drained trying to keep SEI afloat. And now I'm packing to move to Wisconsin for half a year.


January 17, 2018

The reason "sudo echo 0 9999999 > /proc/sys/net/ipv4/ping_group_range" doesn't work is the shell opens the redirect file before calling sudo, which means it does so as your normal user. Alas putting quotes around the sudo arguments doesn't work because it doesn't re-parse the command line so tries to run a single command with spaces and a > character in it.

This is why I wind up doing sudo /bin/bash a lot.


January 16, 2018

Youtube cut off monetization of channels with less than 1000 subscribers. It's the hobbyist->employee->bureaucrat progression again. I should really give a proper _recorded_ version of that talk somewhere.

I gave it at Flourish. I was prepared, reasonably well rested, and gave a version I was proud of. They recorded it. The recording never went up. There is very little a conference an do to annoy me more than _promise_ to post a recording of a talk and then _not_ do it. Sadly common problem: Flourish screwed up the recordings both times I went there, LinuxCon Tokyo 2015 had a video camera that apparently wasn't on, Ohio LinuxFest pointed a video camera at me and then only posted audio....

Penguicon failing to record Neil Gaiman's "crazy hair" reading after which I got him to say "By Grabthar's Hammer, You Shall Be Avenged" into the microphone with NO TAPE IN THE MACHINE was the Science Fiction Oral History Society's fault, but it was at a conference I co-founded so that makes it my fault. I added a "new thing" to each year of Penguicon (year 4 was LN2 ice cream, we dumped the extra LN2 into the swimming pool sunday afternoon), and year 3 (I think?) I bought 5 MP3 lecture recorders with a promised 12 hour battery life and taped them down to the tables in each panel room. No idea what's happened to that since Matt Arnold drove away all the people who used to run it, I haven't been back in 10 years...


January 15, 2018

Ok, fixing ps -T. If I go "ps -AT" I get 13 hits for chrome (pid 1401 and 12 threads). But if I go "ps -T 1401" I get just one hit (pid 1401, no threads).

And done. The /proc layout repeats the thread under the pid, so /proc/123 will have all hte process information for the parent, and then there's a /proc/123/task/123 that _also_ has it. There's a check to notice that and skip it when we're parsing threads, which was supposed to copy the parent pid into the child's PID slot when it doesn't skip it.

I.E. if the parent->PID and my->TID were equal, return. Else my->PID = parent->PID; The else bit was missing.


January 12, 2018

Signed the contract for the new job. I need to be in Milwaukee by the 22nd.

My next choice is do I drive up or fly up? I have southwest credit from cancelling my return flight from ELC last year (work flew me from LA straight to Tokyo instead, yes those trips were always on that short notice), and if I don't use that it expires soon. But if I drive up I'd have the car with me and can drive to see Fade on weekends. (It's a little under 5 hours drive each way, reasonable to drive up friday after work and drive back sunday evening. Flying each way probably takes _longer_ if you add in getting to the airport, through security theatre, and then public transit through minneapolis.)

Decisions, decisions...


January 11, 2018

I tried -rc7 in mkroot. The arm build grew a perl dependency again. The x86-64 build died because it couldn't find an ORC unwinder. Wheee!

New battery arrived! It's 6 cell rather than 9 cell but hopefully that means it's less fragile. (I ordered 2 9 cell batteries and wound up breaking both, they stick out awkwardly as a sort of footrest leaving the keyboard at an angle and only letting the screen fully open if everything aligns exactly. The 6 cell ones I've never broken (just worn out) and I can almost lay the screen flat back.)

Downloading email is _so_ much faster now I've cleaned out LKML. I'm still shoveling out qemu-devel, and then buildroot's got over 100k messages in it that should probably get moved out of the folder my mail filters are dumping new messages into. (You can have an enormous mbox that doesn't get USED during download and it won't slow down email downloading.)

Yes, this is related to the "I have to download from gmail via pop because imap is far more broken".


January 10, 2018

Met with the recruiters for the new job, picked up the pile of paperwork to sign. Feeling kind of morose, like I'm letting SEI down.

I've spent 3 years working for Jeff, which I think is longer than I've been at any other job. (Even beat out my first job at IBM by a few months.) I believe in what SEI's trying to do, and stayed a year and a half longer than they could reliably pay me, and I'd happily go _back_ there after this contract... if there's anything left. Jeff insists that there's a new contract coming soon that gives us a change of direction and fresh funding, except the fix for everything has been Real Soon Now for 2 years. This is the THIRD set of investors that have deliberated at length about giving us money. The stress is killing me, I need a break.

Alas, you can't fund from operations targeting utilities without bootstrapping to a large size and going through standards compliance nonsense. To get around that Jeff parnered with a big company that screwed us over for internal big company political reasons, and then he tried to put together a funding round based on another big company that was once _again_ paralyzed by big company internal politics. Disruptive technology 101: a large existing corporation cannot commercialize anything new in-house, it can only buy it once it's already proven.

This is not on the tech side of the house, I dunno how to fix it. Make a product and sell a product to people who will use the product I understand, navigate corporate status/dominance games where everything is some shade of affinity fraud and nobody involved in the decision making will be personally affected by the outcome except politically... that's not a domain I've spent a lot of time building skills in, because I sympathize with the people polishing guillotines every time it comes up. During the entire "postwar booom" period the top tax rate in the USA was 91%. (In 1963 they lowered it to 70%. Reagan lowered it to 28%, at which point our deficit exploded and corporations stopped investing in anything. Taxing profits makes companies spend money on research and training and all sorts of things that won't impact next quarter's numbers but are better than seeing the money confiscated by the feds. Lowering taxes makes them stop making any long-term investments in their business, their fig leaf being they can pile up cash and buy some other company that did all the right things later, the reality being they legally embezzle it all. Why is this hard to understand? This guilded age royal court nonsense is a _sickness_. It is symptomatic of an unhealthy economy, these are parasites feasting.)

Sigh. Happier thoughts.

My sad little netbook is plugged into wall current. It'll run without a battery, but isn't happy about it.

Thunderbird's terrible at dealing with large mbox folders, where large" is "a year of linux-kernel or qemu-devel". So I've created "lkml-2017" and "qemu-2017" subfolders and am once again copying all the year's messages into them and compacting stuff. It's REALLY slow.

You click on the first message, scroll down to the end of the range you'd like to copy (too much and it triggers the OOM killer, I can get away with maybe 20k each pass), shift-click on the ending message, then wait multiple minutes for the highlight to happen, then right click on any of the highlighted messages and wait the same amount again for the pop-up menu to appear, then navigate to the folder you want under "copy to->", click, and go to lunch.

If you've highlighted more than about 25,000 messages the copy will complete (and it deletes them as it goes), but afterwards thunderbird does some insane processing that exhausts all memory, drives the system into swap, and eventually triggers the OOM killer to kill thunderbird. (That's assuming you don't think the system is hung because your mouse cursor takes 3 minutes to respond to attempts to move it.)

If it's less than 25k messages it just takes forever to complete. As in I went to the grocery store and it wasn't done when I got back. Did I mention 25k messages is maybe 2 months of lkml traffic? It's something like 350 messages a day, plus bursts of ignorable bot-generated nonsense. (Your patch failed to build against the -tip tree! Why are you mailing the list? The giant backports against -stable patch series need their own list, but nobody would read it, so...)

Mostly I read the web archive, but I need the messages to reply to.


January 9, 2018

Dropped Fade and Adverb off at the airport. New semester starting, she's going back to her dorm in Minneapolis.

Sigh. LWN's is it time for open processors article (in response to meltdown and spectre) doesn't even mention of j-core. It mentions openrisc, and clones of powerpc and sparc, and links to riscy's press release. I guess we look too dead to matter.

(I _cannot_ get excited about RISC-V, it strikes me as Open Itanium. They promised everything to everyone and are cashing very large checks, and I see no obvious reason for it to displace x86 or arm? And that's _with_ meltdown and spectre. Maybe china will standardize on it by fiat, but didn't they already try that with a mips fork?)

Of course j-core's still a nommu processor, so you don't _need_ a memory protection bypass because there's no protection to bypass, but... Rich hasn't posted to the linux-sh list in months, and it has an outstanding futex bug for how many releases? QEMU's sh4 serial console's been broken for ages and still not fixed? Our last VHDL code release tarball was 2016 (did that support SMP? I don't remember). We never got even _part_ of the VHDL code up on github...

Jen says that Jeff had a good meeting with the new investors yesterday, but they didn't sign a check at the meeting. Just like we didn't get actual money from the december meeting, or the november meeting, or the october meeting. Not even the money for the "statement of work" that was supposed to tide us over until the end of last year. (I.E. it's a quarter's worth of money we've already spent a quarter trying to get.)

I can't make this happen by myself.

Heard back from the recruiter about the Milwaukee gig. They want me, but the recruiter was trying to talk down my quoted hourly rate at the last minute? Confused.

I had my netbook closed on a bench, it fell off about a foot onto a tile floor, and the battery case cracked in 3 places. Wheee. The screen no longer opened because it was hitting a piece of cracked battery case, and pulling it off took off about half the plastic.

Running it without a battery right now. Fade's ordered me a new one. (Did I mention I know too much about how the sausage is made to be comfortable typing my credit card info in to a website _ever_? I'm aware having someone else on a joint bank account do it does not improve matters, and yet.)


January 8, 2018

And my netbook finally rebooted. I tried to reproduce a mkroot issue which meant a script ran oneit as root, which couldn't attach to the requested console, and on the way out it rebooted the system.

Todo item: fix that.


January 7, 2018

I've found the jpop group responsible for Miss Kobayashi's Maid Dragon's opening and closing music. It is All The Bouncy.

Appending it to my normal music playlist put it right after Demi Lovato's cover of "Take me to Church" and the switch between the two has gears grinding.

Listening to colorado video about demand charges being one of the big drivers for pairing battery walls with solar and going for "complete curtailment". I.E. collect extra solar in your battery wall, and when your batteries are full just switch off the solar panels. Never try to feed anything upstream into the electrical grid. Apparently getting to 80% of this is easy, getting to 100% is hard.


January 6, 2018

Fade took me to Dead Lobster, by which I mean I drove and she paid. Took the hybrid loaner car, which remains deeply shiny. I looked up its price (they're so clearly letting my use this thing as a form of advertising) and it's $29k. That's for last year's model, not the new one. It's not outside what I could afford, but it's outside my comfort zone.

When I was 7 years old I got all excited about the idea of compound interest, and was pretty sure I could retire at 30 (or at least get to the point where I earned more in interest than in paycheck), and I was on course to do that circa 1999 or so (earning $50/hour and offered $75/hour to stay, plus owned two condos that went up $20k each in price while I owned them, not bad for a 27 year old), but over the years instead of saving and investing I gave time and money to friends and family in need. I'm doing ok, but I'm not close to retired.

Take SEI: I've been on half pay there for a year and a half, and they haven't even made those reliably. They're making about 2 out of 3 paychecks these days, which means I'm down to 1/2*2/3 = 2/6 = 1/3 pay which is not sustainable with this house even without the flooding. And that's on TOP of the fact I could make twice that fulltime hourly rate if I went back to consulting, so I'm choosing to earn 1/6 my market rate. I don't care about money, but I do care about a _lack_ of money, and things like social security and medicare won't survive the GOP, so I need to provide for my own retirement. After ten years of marriage Fade's never had kids so I'm pretty sure that's not happening at this point, and she's up in Minnesota, so I might as well go back to the Lucrative Nomad lifestyle before age discrimination kicks in too hard. (It's easy to find work if you go where the work is and do what they pay you to do. I've worked from home on stuff I find interesting, but the stress is getting to me.)

At the start of the new year I decided to look around. I did a phone interview for a gig in Milwaukee on Thursday, and I'm told I'll hear back on that Monday. I very much want to see SEI succeed but I can't make customers pay their bills or investors follow through on their promises, and they're not really sponsoring toybox development anymore...

I got a reminder about the CELF deadline (which has been extended to tuesday). Do I want to commit to travel at this point? Hmmm...

Where did I leave off... ping.c! (Although if I'm to make proper use of that cortex-m board before innoflight asks for it back again, I should do tftp/tftpd since that tftpboots.)

I need to check timestamps in fractions of a second, and I vaguely recall I created a millitime() function which returns current time in milliseconds (for the pun if no other reason: it's millitime). But it's not in lib, it's in ps.c, which means I have a second file wanting to use it so I should move it to lib/lib,c, and looking at that I trivially cleaned up the last function there, environ_bytes(). Except that function should really take environ as its argument, and thus be able to iterate over argv[] too. But I shouldn't go down that tangent just _now_...

Hmmm, this implies that xparsetime() from yesterday should probably return milliseconds too. (When launching command line binaries, that's about the resolution you can expect. You need nanosecond accuracy for things like filesystem timestamps where you're reproducing a previous reading exactly, but not delta-from-current with pages faulted in from storage and a potential call to the dynamic linker in there before any of your code runs. Again, todo item for later.

Sigh. It would be nice if posix made proper use of C's object orientation. Specifically, in struct sockaddr and friends, wouldn't it be nice if:

struct sockaddr {
  short family;
  // whatever else
}

struct sockaddr_in {
  struct sockaddr sa;
  blah blah blah;
}

struct sockaddr_in6 {
  struct sockaddr sa;
  blah blah blah;
}

Right now you can typecast either to struct sockaddr and works fine, but it's not obvious what portion of that you can use. With the above you could &(sockaddr_in->sa) and not even have to typecast. (You'd still have to typecast it back once you knew what the type was, the pointers will be the same because a pointer to a struct is a pointer to the first member of the struct, there can be no padding or alignment space at the beginning. But right now it's implicit, not explicit, and if I declare a function to accept "struct sockaddr *" you have to typecast to call it with sockaddr_in or sockaddr_in6. At which point it might as well just be a void *, because that's what I'm going to typecast it TO to make the compiler shut up.)

There are ways to declare your data so "I know what I'm doing, let me do it" does not require hitting the compiler with a rock, but the network stack doesn't do it that way.

(But no, people think you need C++ for that kind of thing. You very much don't. C++ only makes things worse. Because they don't teach how to do it right, and the berkeley guys especially spent their first decade doing CRAZY THINGS. Everything's a file... except network interfaces, those aren't. Ken and Dennis were very good at finding the "sweet spot" between not enough capability and too much complexity, and I greatly admire what they accomplished. Many of their successors in BSD and AT&T, not so much...)


January 5, 2018

Cycled back around to ping. Specifying time between ping instances means you do fractions of a second, but I'm trying to restrict the use of floating point in the code and keep it under #ifdefs (to work on really tiny systems). So my infrastructure for that is xparsetime() (originally for sleep) which returns seconds and fractional seconds in two longs, and only uses floating point when the ifdefs are defined.

I want to add -i, which needs fractional seconds, and at the moment that means I need to turn its optargs from a number to a string (# to :) and call xparsetime() on the string myself. That raises the question of whether I should do the same for -s and -W, so the time parsing is consistent. But neither of those particularly care about fractional seconds, and the OTHER thing the optargs number parsing does is range checking and default value assignment. Having to do that manually raises the expense a bit.

Speaking of range checking, if you _do_ feed a negative time to xparsetime() the non-float path errors, and the float path returns the negative value, except if it's -0.5 then you have to check the seconds and fractions seperately to catch that it's a negative value, and really I should just check it in the strtod path. Alas, then it needs another error message which seems wasteful. Also strtod() can skip arbitrary spaces and allows a + at the front so checking for - at the start is more complicated than it seems... (So many corner cases.)

I could add an xparsetime() type to lib/args.c but there aren't realy enough users to justify it? The other big one is sleep, but there it's an optarg, not a flag argument, so sleep_main() has to parse it anyway, and in GLOBALS it would still have a sizeof(long) slot needing to fit 2 fields, and a struct that fits in 32 bits on 32 bit systems would have to be 2 short ints so it couldn't do nanoseconds, which eliminates about half the other uses.

Ah, I see: if you go "sleep -1" it says 1 is an unknown option, that's probably why I didn't care at the time. Of course you can do "sleep ' -1'" and strtod() eats the leading space and then parses it and returns a negative number, although sleep then returns immediately so it doesn't hurt anything...

Sigh, ok. Keep -w and -W doing the optargs # integer parsing, and have -i do something different.


January 4, 2018

All the bugs in the world. I updated my offline backups.

Wouldn't it be nice if we had an organization like the NSA that was supposed to find and publish the sort of vulnerabilities that make Hardison from Leverage or Finch from Person of Interest's ability to hack into any computer anywhere NOT FICTION? Instead of hoarding them so it can keep their budgets unlimited in perpetuity by blackmailing future politicians with the porn they browsed as teenagers, and treating any other possible use of the data (such as law enforcement) as compromising their sources? Wouldn't that have been nice.

I know it sounds crazy blaming those sorts of guys for vulnerabilities that go back before September 11, 2001. But we know they're _trying_, the counter-argument is they're not as _effective_ as they'd like to be.


January 3, 2018

The Call For Papers deadlines for both ELC and TXLF are coming up. I'm still sort of "too tired, dowanna travel, I should just podcast", but at the same time I should show the flag and I do have various things I should probably talk about: 0BSD and licensing stuff, mkroot, making android self-hosting... Heck, I could do a panel of just war stories. Haven't bothered to write up any proposals yet though.

Dropped the car off at Howdy Honda. In addition to the crunchy noises from the suspension when it hits uneven road (cv joint?), it's now making growling noises when it's cold and you turn the wheel. (Power steering pump?) It's a 2002 car, about 16 years old now (we bought it used). I've been waiting for app-summonable self driving car services, but that's like 2 more years for early adopters and maybe 5 to be ubiquitous in urban centers. (And in about 7 gasoline volume declines enough that the profit marging for refining, distributing, and selling it with the current infrastructure and transportation network goes negative, at which point a car running on gasoline isn't quite so useful. And yes the auto industry knows this so resale value's likely to decline well before then, but "when does the herd break and run" is always a hard financial question. All the manufacturers are switching over to electric cars now, but the first generation models are still too expensive for my tastes and when the self-driving subscription fleets show up why own your own? Don't sink a well when city water's 5 years away from reaching your neighborhood...)

So yeah, waiting out the awkward adolescence of yet another industry. I rememer the days of "when can I get an ISP instead of dialing in to my university or work", "when can I get broadband instead of dialup", "when is my cell phone good enough to stop paying for a landline", "should I just have a laptop and not bother having a desktop", "when can we switch from netflix mailing us DVDs to just the streaming", "hard drive or ssd"...

These days there's "when to get rooftop solar and a battery wall", "when can I get a development environment on my phone/tablet so I don't need a PC anymore"... There's usually some case where :I know where it's GOING but is it quite HERE yet", and a car is a large purchase that kind of imposes itself upon you at times...


January 2, 2018

Jeff just asked me to work on an 8-bit chip design with him, but I'm already stretched too thin on the stuff I'm already doing. The Big Push in november involved GPS, helping arrange investor meetings, trying to track todo items for the whole company, turtle manufacturing stuff, and of course the endless uncertainty. (During investor prep Jeff kept gaming out how the bloq guys might screw us over or flake, so we'd be prepared. About half the time I didn't know where I'd be sleeping the next day.)

Jen not showing up wasn't Jeff's fault but it meant plans changed and I had to try to figure out what Jen does and maybe try to come up to speed on the existing customer phone calls (maintaining their trickle of R&D funding) and see if Weekly Engineering Call With Jeff could replace Daily Engineering Call With Jen if she flaked completely. That's a management job I got sucked into a vacuum for.

Jeff tried to sit me down and teach me enough VHDL to help with the ASIC tapeout, despite niishi and arakawa with years of experience in it _not_ being up to help with the tapeout. He tried very hard to get me to track what RiscV was doing and I _cannot_ bring myself to care, it smells too much like an open source version of Itanium made from hype and overcommitted promises and absorbing all the funding in the world to be less interesting than x86, let alone arm. We met with a nice lady at a university who's doing a toy processor. We sat down to try to sort the instruction bit patterns of j-core so we could redo the front end more efficiently, but didn't have time to finish that. We started to triage the build system for a github release, but didn't have time to finish that. We talked about hooking up the GPS-stabilized nanosecond accurate clock to the userspace signal monitoring package, but didn't have time to finish that...

All this has put me way over mental budget on my normal ecosystem (which used to be aboriginal linux+busybox and is now toybox+mkroot/aosp). Trying to turn android into a self-hosting development environment is STALLED HARD. (Politics: the pixel 7 tablet is discontinued so all the google in-house testing systems are now chromebooks; chromeos runs android apps but what does this mean for testing android base layers? How is development shifting inside google? I haven't had a chance to ask. Whatever it is is happening without me and I'll find out 6 months later when it's too late to provide feedback that might influence any of the decisions. Oh well.)

I haven't done half of what I need to on SEI's Board Support Package because that hasn't really been my job in forever. The j-core.org website is in pieces and the mailing list is silent because I'm not sure what I'm allowed to _say_. The nommu.org website needs to turn into kernel Documentation/ files. The arch/sh and linux-sh stuff is badly stale upstream and in _theory_ that's Rich's task but in practice he hasn't got cycles for it (and he only cares about testing on real hardware, even though QEMU is what the upstream kernel guys can actually regression test against; the serial console's been broken for most of a year and we never fixed it translates to a perception that "this platform is dead"). I haven't kept up with new kernel developments in general for the quarterly releases, and I've had patches I've wanted to push upstream for a year, but haven't.

I have a significant issue that that my own projects look dead to other people. I haven't posted to the mkroot list since October. I spent some time getting mkroot closer to parity with aboriginal in terms of supported targets (the reboot was required by swapping out the toolchain for musl-cross-make) but I still haven't got the native toolchains working, let alone the distcc trick or the build control image automation layer. The last mkroot release was in June, using a 4.11 kernel (which is over a year old now).

I spent part of this vacation getting my technical development blog caught up closer to current, which means I've gotten it up to mid-september. (I have daily-ish rough draft notes-to-self in a text file but it needs significant editing and expansion to make sense to anyone else. Plus html tags and links and proofreading.)

I've spent the rest of this vacation trying to do enough toybox work the project doesn't look dead to the android guys. I got the smallest two commands promoted out of pending and I'm trying to deal with the new submission of fmt.c (from the android guys).

I'm sitting on the west coast Embedded Linux Conference call for papers and haven't submitted anything yet because I'm _tired_. It would be really good to show the flag there but my talk there last year and the one before that at linuxconf.au were incoherent because I was too exhausted to prepare and give good talk. (And given my baseline fatigue and redeye flights one day was NOT enough to recover from jeglag in either case.) It hasn't gotten better since.

It looks like I can either stop doing open source development, or I can get a day job doing something less taxing which I can stop thinking about when I leave the office.

Sigh. Jeff talked about how great sitting down and grinding is, and I WANT to do that but I CAN'T because it's a constant stream of interruptions swap-thrashing between too many projects that never produce output and idle for so long between bursts that when you go back to them you spend all your time trying to figure out where you left off and why because you've forgotten all the context and have to reverse engineer your own code. This has been the failure mode of toybox development for the past couple years, now it's becoming the failure mode of EVERYTHING, because I can't focus and when I do carve out time I'm too exhausted to make good use of it.

Random example: waiting at the airport for the flight back from tokyo, I caught up another couple weeks on the j-core news page. Triaged, edited, and uploaded. Haven't touched it since, so of course it's now further behind than it was when I did that. And of course there's no https on that website even though doing so is like half a day's work. (Well, for Rich. Probably about 3 days for me, the update scripts are fiddly and there's a dozen implementations with no obvious winner because the one Let's Encrypt provided/recommends is overcomplicated crap so many people have made their own but _because_ there's an "official" one none of the others has coalesced a big community around it yet and become the obvious one to use.)

I remember when Jeff and I talked about moving all the servers to tokyo. A year or so back, we bought a USB drive to do backups to, and he had me install ubuntu on an old 32-bit machine he had lying around. Might have been the end of the trip with Tokyo Big Sight?) Out of curiosity I just ssh'd into j-core.org and did a sudo aptitude update and it has 58 packages it wants to upgrade. I'm afraid to do the corresponding upgrade because if it breaks, what do I do? The person Jen tried to transfer wale's sysadmin responsibilities to was... me. The servers are in the back of an office in canada, I'm in texas.

I'm not sure I'm still making a difference here.


January 1, 2018

Happy new year.

Next low hanging fruit pending command to clean up, sorting by source file size, is logger.c. The main reason it's in pending is it depends on CONFIG_SYSLOGD. That kind of cross-command dependency is unpleasant, I try to either merge them into the same .c file (ala ps/top/pgrep) or move whatever they share to lib.

Since the actual function logger wanted out of syslogd was only a few lines long, I just inlined it in the two calls in logger, did the other obvious cleanups, and tried a test build... at which point I noticed the next problem.

The function I inlined is iterating through two arrays, facilitynames and prioritynames, which are defined in sys/syslog.h. But you have to #define SYSLOG_NAMES before #including that in order to get them. Why? Because #ifdef in the header is instantiating the array, which means if you #include it from two places you get two copies of the array.

The really STUPID part is I can't #include it from one file and then extern reference it elsewhere because the TYPE is defined in the same #ifdef.

One of Rich Felker's coworkers complained about this before, and clearly this was a case of glibc being stupid, but it's one of those things that shipped and now fixing it would break existing programs.


Back to 2017