Rob's Blog rss feed old livejournal twitter

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


April 8, 2021

After multiple days of being too depressed by the OSI mess to get any programming done, I am intentionally ignoring it and focusing on real work.

Fixed the $IFS thing (cache value needs to move into the function structure) and the bare assignments not persisting thing (wrong test: old pout variable's "unused" value was -1, new pipe variable's "unused" value is 0: switched variable name but not what I was testing for).

And now I've got... memory corruption! Which is always tedious to track down. But in this case it was just that the new variable assignment logic was blanking the VAR_NOFREE flag so when it temporarily inserted the "abc=def" argument string into the function variable context without making a copy, it would free it when popping the function context, and then the same string would get freed again as a command line argument in the exit path becuse it was still in the arg.v[] array.

That order of operations issue is back: either redirects are done first, or leading assignments are done first, and my code as-is really isn't designed to split them. I need the command line expanded with the OLD variable context so "abc=def; abc=ghi echo $abc" shows def not ghi, but if the echo was instead "env | grep ^abc=" it needs to show ghi...

I have tests where I force an error with ${a?b} to see what it has and hasn't done yet, and my test for "did redirections create files yet" is failing now...

Oh, I have disgusting solution. Ow that's ugly. I can create the new function (variable) context first, pop the function context off the stack but retain it, resolve the command line options, then put the context BACK where it was. For no other reason than to match bash's order of operations. (Ew. But reasonably small, done, and checked in.)

The main downside of not having an active twitter account is I can't favorite this.


April 7, 2021

So OSI has reversed itself AGAIN, and now insists that a memorial to its old mistake must remain in perpetuity or else the world won't know OSI had made a mistake. And the reason their 0BSD web page had a regression is OSI bureaucrats cycled out with no continuity of experience between them, and the new one tried to be ignorantly Helpful. (OSI is not only clueless about the history of the licenses it claims to manage, it also regularly forgets its OWN history. Bravo.) Said helpful new bureaucrat is, of course, tone policing me. I was spending a lot of effort attempting to be polite (and then just shut up when their discussion became 100% bikeshedding again). I am no longer attempting to be polite, but instead be bluntly truthful... except I see no benefit in further communication with them on their list until the NEXT time they screw this up again (every 3 years, like clockwork).

All I want OSI to do is stop. All I've EVER wanted them to do is just STOP. I've been very up front about this from day 1. I didn't submit 0BSD to OSI because OSI was irrelevant (after the falling out between Eric Raymond and Bruce Perens, then the disastrous handoff to Rick Moen, and then their announcement they were retiring from the license approval business). But sadly, it was just remission not a cure: as with the FSF they still have the ability to mislead, spread misinformation, do damage, insert themselves as a roadblock into other people's productive flow, and take credit for stuff they didn't do. (Completely unrelated, here's an interesting walkthrough of the mechanism by which committees filter out anything good leaving only the blandest and least interesting mediocrity, "an emergent property of group decisionmaking" which will "crop up whenever it's not compensated for in some way".)

It seems to me that I need to update my toybox license page with the history of the 0BSD license, and then point people at that timeline (and its links to primary sources) to update the Wikipedia page. Which is luckily all easily documented with primary sources with dates attached. (Kirk McKusick wasn't just a speaker at Ohio LinuxFest 2013, he was in the front row of the audience for my Rise and Fall of Copyleft talk, which is how I met him right afterwards to ask him about calling the toybox license 0BSD. That talk was me explaining the context in which I felt the need to come up with a new license. My talk made more sense if you could see the dozens of browser tabs I'd queued up in lieu of slides, which I didn't record because they pointed a video camera at me during the talk... and then published audio only a month later. Oh well, still better than Flourish in Chicago managed either time I spoke there.)


April 6, 2021

Right, license-review isn't a read-only announcement list, and it _is_ where the whole "please stop misnaming 0BSD" discussion was last time. But they've had some "trolling problems" and moderated all new users to both lists, which my resubscribe counted as. I didn't get bounce messages from license-discuss because it counted the license-review bounce message as my one (daily?) notification.

Anyway, I got email from the moderator early monday morning that he'd let my first message to each list through (so my fifth and sixth editing passes to make it sound less frustrated, respectively), and it's there now. Since then I got a couple responses, and have done my usual Pascal's Apology essay-style reply to both. (Here's the first, and here's the second.) Once again my bandwidth was taken up with Remaining Calm Despite Everything And Now THIS (for the THIRD TIME), which was... difficult. (I don't even want them to do anything, exactly, I just want them to stop. Which they'd previously agreed to do, but it didn't stick.)

In the course of replying I did basic research to answer the question "how many repositories on github are currently licensed 0BSD", and the answer (excluding forks) is currently twenty five thousand, one hundred ninety eight. The results are sorted by star count, with toybox coming in sixth, and the seventh being from Microsoft. I was not prepared for this answer. Um... yay? (So... so why am _I_ the only one speaking up in its defense on the OSI mailing list? Everybody keeps thinking this stuff Just Happens, and it doesn't Just Happen, and I would LOVE if it Just Happened so I didn't have to do it. David Graeber's observation that you make a cup once but wash it a thousand times remains true. So much janitorial work.)

Meanwhile, Lawrence Rosen said that Google just won against Oratroll in the supreme court, and can presumably go back to using its own Java implementation. (Two replies pointed out it's not a clean win, but it's 2021: take the win. Accept yes for an answer.)

Tried to get some toybox work done but there was a more immediate demand on my time. And my "edit this to not sound like I'm blaming the recipient" facility is a bit threadbare by this point. (It's a personal failing, I know. Maintainers need endless patience, and the ability to guide enthusiastic contributors into productive community members. I mostly just like to crouch in my corner and make stuff, which is not what I _should_ be doing.)

Alright, I moved TT.ifs to TT.ff->ifs and it still doesn't work and the reason is "IFS=123" is actling like it's in a pipeline when it's not (creating a temporary function context and discarding it again immediately), which the new cache plumbing I just made is dilligently mirroring. Great.

Alas, the night's over and the sun's coming up, someone's sat down at the table 20 feet away so I put my mask back on and my glasses are fogging up. Once again I walk home resolving to work some more on it from under a cat in the kitchen, but I hardly ever do...


April 5, 2021

The campaign against Astrazeneca has now leveraged J&J's manufacturing problems to kick them out of their US factory. And it's the one of the four that still hasn't been approved for use in the USA, despite our stockpile of it. Seriously? Capitalism is THAT pissed that they were going to waive their patent for the third world during a humanitarian crisis (until Bill Gates convinced them not to)?

Covid spreads by aerosol transmission. It does not noticeably spread by surface contact, which makes hand washing, surface cleaning, and "quarrantining" items irrelevant. We've got a LOT of good science on this now, which makes the early advice against masks even more tragic.

Christianity has disappeared into the GOP, which is still all-in on voter suppression as its only remaining option.

I have never had a Faceboot account, and do not intend to get one, and there are so many reasons for this. (I would happily come back to twitter, but will not give them a phone number and will not stop posting "Guillotine the Billionaries" as my comment on most links Janet Yellen is pushing for a Global Minimum Tax to fight against tax havens, but I still think inheritance taxes and legislating the hoarding of a billion dollars to be a capital offence are the best way for the government to get the money.)

As fossil fuel companies cling on by their fingernails, the "think tanks" that went seamlessly from leaded gasoline to tobacco to big oil are coming up with a constant stream of new talking points. It's a holding action they know they'll lose, but a global energy industry earning $1.4 trillion per year means every extra DAY they can hold out is worth around forty billion dollars. With a B.


April 4, 2021

Oh goddess, not again. The "Free Free All Hail Stallman Public 1.0.0" license misnaming of 0BSD is back. And it's because the OSI page has changed, which is NOT what it looked like back when they fixed the name (which was a decision to CHANGE not ADD ANOTHER with the explicit rationale that multiple conflicting names for the same thing was BAD).

Ok, that last link to the email announcing the name change was from license-review. Resubscribed to that list, wrote an email... Rewrite it 4 times to be less... frustrated. (I probably shouldn't title it "Please stop deadnaming 0BSD", among other things I doubt anybody there is young enough to know that word. Eh, maybe they have kids.) Sent it. Held in moderation because the list is moderated? (Probably by the dude responsible for the problem, who has not exactly shown himself to perform a Sam Vimes style "yes I will arrest my friends when necessary" impartial job to the best of his ability even when he doesn't like the outcome. At least not when being closely watched. (As much as I've disagreed with Bruce Perens over the years, _he_ turned out to have professionalism.)

Ok, that's an ANNOUNCEMENT list. Right, subscribe to license-discuss, cut and paste email into a new composer window, do yet ANOTHER editing pass to remove THE REST OF THE YELLING, sent email there, and... 40 minutes later there's still no April entry in the web archive? Are they running mailman as a cron job instead of an incoming message trigger, or did the message not go through, or...? I didn't get a bounce message...

Sigh. I WANTED to spend tonight on toysh development insead but wasted hours trying to figure out how much damage OSI's done to 0BSD again and how to mitigate it. (What is this strange fixation? Seriously nobody else has ever called it that. Nobody else CARES about this issue, or wouldn't if they didn't keep bringing it up and causing a problem.) Yes, maintaining a license involves surprisingly regular effort but this is just gratuitous.

Ahem. Ok, trying to get a LITTLE real work done: The NEXT toysh test failing is assigning to $IFS (Irritating Field Separator) and the assignment isn't changing the word separation rules. And THAT is probably because the variable list has layers of local variables now, but the TT.ifs cache (so we're not looking up a variable every character to see if this splits a word) is a single global instance? Hmmm. Except that implies the assignment would stick when it shouldn't, and instead it's being ignored. Gotta spray the code down with printfs to understand the behavior, bog standard debugging session but the sun's already coming up...


April 3, 2021

In a traditional sign of spring, half a billion Faceboot users just got their personal data stolen yet again, with the traditional terrible response from the relevant billionaires' mouthpieces. (Aren't we all happy about Faceboot's real name policy?) Meanwhile, other billionaires continue to suck. (The reason Nasa does launches over water from coastal cities like Houston and Cape Canaveral is so bits falling down don't hit anybody. How is this NOT OBVIOUS to certain rich white guys named after a strong smell).

Defunding the police is widely popular, but people who can't stop this one with means testing insist it isn't, even though reality undercuts them on a daily basis. (Oddly enough "male chauvinism" was NOT named after the minneapolis policeman on trial for the murder of George Floyd. You'd think, but no. Just a coincidence apparently.) The ex-british colonies continue to create the majority of their own problems. Georgia voter suppression is just one symptom of GOP hypocrisy, but then Jim Crow was always about plausible deniability. During the blizzard Texas oil and gas regulators were lying about renewable energy in realtime.

Boomers are a problem everywhere. Even Good Cop sucks at any issue Boomers care about, because they cower before Boomers intead of opposing them (hence running a 78 year old geezer to seem "adult" to 74 year old Boomers). Intellectual propertly law needs to die with them.

Christianity is now a wholly owned subsidiary of capitalist fascism, which keeps buying sock puppets to burn through established credibility: wall street journal, forbes, newsweek... now Rolling Stone has succumbed.

Of course capitalism always tries to do that with the output of creatives, owning and profiting off stuff it didn't create. Paul Simon just sold his catalogue, like the Beatles, and Michael Jackson did. The music industry is especially bad at this: Prince changed his name to a symbol and wrote "slave" on his face in public but ultimately admitted defeat Taylor Swift is re-recording all the songs she lost control of, Keisha lost in court against the producer she caimed raped her, Britney Spears has been her father's legal property for over a decade (at least Gary Coleman got away when he turned 18)... the classic Courtney Love Does the Math is a good intro to that sort of thing...)

But the music industry is by no means unique here. The Muppets belong to Disney, who fired Jim Henson's successor for trying to exert creative control. At least Neil Gaiman could walk away from the producer who wanted to insert a Giant Mechanical Spider into every movie he touched. As Neil explained in that interview:

And the other thing is Hollywood executives really love the smell of their own urine and what they really like doing is urinating on things. And then going, "Hmm, now this smells really good" and being really puzzled when the rest of the world goes "No, actually it smells like pee." A gorgeous example of that, Ted Elliot and Terry Rossio, who wrote "Pirates of the Caribbean" and "Shrek" and some lovely movies, were brought in by Jon Peters to write the first draft of the Sandman movie. He hadn't actually read any "Sandman" because he had people to do that kind of stuff for him, but he had figured out that what the movie needed to be successful was a giant mechanical spider. He wanted a giant mechanical spider because that would make any film a hit. Elliot and Rossio, who had read "Sandman," who went in with their pitch and looking forward to it and going, "But there's no room for a giant mechanical spider."

I was thrilled on going to see "Wild Wild West" to see that he had finally put this giant mechanical spider that I'd been hearing about from Elliot and Rossio for five years into a film with no ideas of any kind. I really think a lot of it is [executives] are wedded to their giant mechanical spiders and they're also convinced they know best, because obviously they're Hollywood executives.

Of course corporate "creativity" is generally laughably obvious, such as Amazon's anti-union astroturf campaign.

Oh look, another thing Trump did as part of his official duties as president was a fundraising scam stealing money from his supporters. (This is an instance of a common class of scam mostly targeting elderly boomers, what distinguishes this one is scale. At its peak over 1% of ALL credit card fraud complaints in the USA were Trump donors disputing auto-enrolled recurring payments, and they refunded an average of over $700,000 per _day_ in december.) And of course this scam has become standard practice across GOP fundraising now, because they're desperate, rapacious, utterly shameless, and out of ideas.

Dear Pfizer and Moderna investors: stop FUD-ing Astrazeneca please? They waived their patent rights so anyone anywhere can manufacture their vaccine royalty free, and capitalism CANNOT allow this to be seen to succeed so has launched an organized campaign to discredit them, and it's just SAD. Whipping up a panic about blood clots when the obvious question is how many people died of the exact same thing in the control group? If 150k people die each day on a planet with 8 billion people, that's roughly .002% of the population dying each day, and way MORE when your sample skews elderly and pre-existing-condition (because that's why the vaccinate first) but even ignoring that, you can EXPECT 20 people per million dying each day. So if you vaccinate a million people, yes some of them are going to immediately die, because THEY WOULD HAVE ANYWAY. Seriously, heart attacks and strokes are two of the leading causes of death, and THAT'S BLOOD CLOTS. The birth control pill is WAY more dangerous than any of the current batch of vaccines, and nobody minds because doctors consistently ignore women's symptoms.


April 2, 2021

Google Voice just transcribed "zero clothes BSD" and I can't blame it for trying. (July 14th, Skynet.)

I am getting sooooooo many robots emailing me that I mentioned some old website (always linking to the history mirror) and wondering if I'd link to THEIR website. Or else saying they "love my blog and want to write guest articles" for it, which... what? Yes, there's an rss feed containing the word "blog", thanks for noticing, automated web spider emailing with the name of someone whose twitter account last posted in 2017 and obviously stock photo profile picture. I'm 95% certain this is a google rank thing where spiders are trying to create links to pages that then get replaced a week later with... I dunno, phishing sites? Clickbait ads? There's a scam going on here (ahem: "trendy capitalist business model") but I don't know what it is, and am not hugely interested in finding out...

I'm overdue for a toybox release again, and trying to get toysh passing all of its tests (at least the ones that aren't gated by unimplemented features, like the $((1+2)) stuff) before cutting a release. Whether or not I finish implementing function support first is as of yet undecided. (It's close, but not quite there yet. Declaring functions involves lifetime rules where I'm taking a parsed pipeline _out_ of the source lifetime context and into a separate list where it lasts as long as the function name is live, except the source context ALSO has to still have that data because:

$ for i in 1 2 3; do a() { echo one $i; }; a; a() { echo two $i; }; a; done
one 1
two 1
one 2
two 2
one 3
two 3

Which means pipelines need to be reference counted, but right now each pipeline is just a linked list of identical structures and I don't want to reference each member; it's eash to stick the reference count in the function structure but input parsing isn't attached to a function structure, when I run stuff from the command line I'm not in a function, it discards each thingy after it's executed (thingy = contiguous set of line continuations parsed as a group until it goes back to promting "$" instead of prompting ">") and it's IMPORTANT that this freeing happens or just typing at a command prompt would leak memory. The same logic goes for shell scripts, which are basically "bash < <(zcat filename.gz)" and CANNOT require the file to be seekable.

My main blocker for starting to implement toysh for so many years is I very much WANTED to mmap the shell script and have the string data only exist ONCE, which meant MAP_PRIVATE and inserting null terminators into the file, and the lifetime tracking just didn't work. The speculative design always wound up reference counting individual WORDS once you dug deep enough, and a 4 or 8 byte pointer to the start of each individual word string wasn't actually saving noticeable space when the words were "for", "if", and "ls", but using 16 bit offsets made everything unreadable and introduced arbitrary limitations. And anyway, it didn't work for the command line where I'm reading from a filehandle I can't mmap so I'd need two codepaths anyway...

I started making progress when I gave up on that and just implemented a conventional "I'm copying this data multiple times" approach. Which I REALLY don't want to do AGAIN for function pipelines. Which is why I have the "run function" plumbing just about implemented, but the "declare function" plumbing consists of a TODO statement on a printf.


April 1, 2021

I refuse to do news compilations on April Intentional Lying For Some Reason Day. (Is it supposed to be funny? It never has been, but they keep doing it for some reason.)

Instead of doing development work today, I wound up editing blog entries for posting. I did the 17th to the 22nd and I took me 4 hours, which I did not expect. That's about half a day of editing effort per week of blogging: there's a reason I keep falling behind, and made keeping up a patreon goal.

I'd _like_ to get to the point where that effort went into editing essays like my old computer history threads, or renewables technology, or how GPS works, or the impact of china's 5 year plans on the finances of the energy industry...

I'm aware blog entries are not the best format for this. Long and long ago I wrote Motley Fool columns because it was an outlet that had a publisher. I've been offered writing positions in various startup websites over the years, but never access to a wider audience than just posting it to mailing lists (where things I write tend to go randomly viral anyway).

I keep saying I should do youtube videos but those are even MORE editing work, of a type I dunno how to do yet. I can just about poke at Audacity, and have a video editor on my phone that actually works, because android doesn't have the LINK UI problem that Linux does... but it's still a tiny fiddly screen on a device I have to import huge files into and out of. Still, I should sit down and give it a go sometime, except that's the same kind of energy that goes into carefully stepping through japanese text and so on. "Ah yes, when I have spare focus I should do THIS" has no shortage of consumers.


March 31, 2021

Fascinating article on how churches have changed:

"Gone are the days of a choir, suited up pastor and random people sitting in velvet chairs onstage... Now it’s a U2 incarnate worship band, perfectly placed LED wash lights and a pastor... motivating, edgy and might even let a cuss word slip if you’re lucky."

In his book, Kirby writes that these pastors who have enormous social media followings aren’t simply pastors anymore, he writes. Often they are motivational speakers, corporate coaches and leadership consultants. Kirby said he has heard of churches where a volunteer was designated solely for the purpose of carrying the pastor’s Bible. Often, he writes, these pastors have private entrances, reserved parking spaces, security details and a gaggle of personal assistants or handlers.

Plus, of course, $10,000 outfits, and "selling merch" in the name of the guy who was literally violently against selling merch in church.

And of course churches are tax-free, but Boomer Biden will not tax the billionaires. This is why I lobby for guillotines, not taxes: hoarding a billion dollars is self-evidently a capital offense, and should be legally classified as such. The "winners" of capitalism never voluntarily compensate the "losers" (but will happily pay professionals to lie to you about it). But no billionaire ever cares about "externalities" (which is a technical term for anything they can sweep under the rug). If they cared about anyone but themselves even a LITTLE, they would be a billionaire.

Following through on the math, if sending $1000/month to each of 330 million US residents multiplies out to just under $4 trillion/year, and the government is already spending $61 trillion over the next 10 years, it would have $21 trillion left in its EXISTING budget without raising taxes to cover more spending. We've already got $1 trillion/year going to social security, and if it's "that or basic income" then this is only _half_ the existing federal budget. We spend at least twice what we need to on defense (our largest make-work program, paying corporations to create stuff we then blow up so they can make a new one), and paying "interest" to ourselves to disguise printing money is silly (and mostly goes to billionaires and corporations that _have_ large pools of money that should have been taxed away decades ago), which is at least another $10 trillion that could be "retired" if we wanted, bringing the "extra taxes" down to $2 trillion/year we'd need to guillotine out of billionaires and corporations. That's entirely doable once the Boomers die.

Sigh. The point of the bitcoin money laundering protocol is to steal money. That's what it's for, that's what it does. I dunno why somebody would blame Apple for their own choice to put their life savings in bitcoin.

The Boomer extinction burst has gone full Queen Victoria pearl clutch. I look forward to the end of crazy things like homeowners associations, and take comfort that there are demonstrably fewer Boomers now than there were during the George W Bush administration. (They're crazier, but smaller in number.)

The black woman elected to the georgia state legislature who was arrested for knocking on the closed door behind which the Georgia voter suppression bill she'd voted against was being signed has been charged with a felony for said knock.

Remember how the moral of all those Tony Seba solar/batteries talks was that humans suck at emotionally understanding exponential curves? (You can explain it all you like, they won't _believe_ it.) That problem is hitting home again during the pandemic as lockdowns end too fast before enough of the population is vaccinated, and hospitals are collapsing again. Remember, the hospital system getting knocked out means an allergic reaction or broken collarbone can be fatal, let alone heart attack, appendicitis, needing a blood transfusion... You don't necessarily die of covid, you die of an infected kidney stone or a fairly minor car crash because the hospital can't take you.

To slightly paraphrase Gandhi, American democracy "would be a good idea".

Defund the police.


March 30, 2021

Stallman's destroying the FSF. Given that I've considered the FSF a net negative for 15-20 years now, I'm ok with this.

There's a reason I never pull from github into projects I uploaded there, and that was true before the Law Offices of Small and Limp esq merged it with Linkedin. (When I apply a pull request from github I copy and paste the URL to wget, manually adding ".patch" to the end, and then examine the resulting text file. On more than one occasion I've edited them slightly, although mostly to Elliott's patches because he knows me and it saves a cleanup commit. :)

Oh hey, Austin's getting a chance to do ranked choice voting. I need to go vote for that when early voting opens up.

In theory Austin allows everyone over 16 to get vaccinated now, in practice nobody's got J&J yet and the closest HEB pharmacy with vaccine slots (pfizer) is 80 miles away.

Still grinding away debugging my latest changes to toysh. Redo infrastructure, fix regressions, rinse repeat. I'm well into the part of the project where I'm spending more time reverse engineering my own code ("What does this bit do? Why did I do that?") than writing new stuff, but that happens in big projects. It's one of the main scalability limits. You've gotta work out how to modularize it to chop it into "I only have to understand what's going on between data coming into this bit and data going back out again through these interfaces, and then maybe audit the users of those interfaces". Which I mostly have but changing the infrastructure changes the data representation and interfaces, and the _sequencing_ is the tricky bit...

I keep writing chunks of code like:

void xfdump()
{
  int x = 0, fd = open("/proc/self/fd", O_RDONLY);
  DIR *X = fdopendir(fd);
  struct dirent *DE;
  char *s, *ss = 0, buf[4096], *sss = buf;

  for (; (DE = readdir(X));) {
    if (atoi(DE->d_name) == fd) continue;
    s = xreadlink(ss = xmprintf("/proc/self/fd/%s", DE->d_name));
    if (s && *s != '.')
      sss += sprintf(sss, ", %s=%s"+2*!x++, DE->d_name, s);
    free(s); free(ss);
  }
  *sss = 0;
  dprintf(2, "%d fd:%s\n", getpid(), buf);
  closedir(X);
}

And then discarding them again. (That shows all the filehandles a process currently has open, and what they point to.) On the one hand, there's nothing as USELESS as other people's debug code, checking that in only ever helps the author of the code. On the other hand, this is still in pending and I keep having to debug it so having a few stategic debug readouts is nice... but they really shouldn't be checked in... Grrr. I waffle on this one.)


March 29, 2021

A good article on how "Noble Lies" (such as Fauci denying the effectiveness of cloth masks early in the pandemic when he knew they helped but wanted to prevent a run on N95 masks to reserve as many as possible for healthcare workers) are the worst kinds of lies, doing the most long-term damage.

Hands up everybody who's surprised that the J&J vaccine is preferred by people with any choice in the matter? They're producing 11 million doses per week and the country currently has 331 million people, which 1/30th of the population each week. But we've already vaccinated some, there are 2 other vaccines (3 if oxford is ever approved), and the rate of production is increasing...

Speaking of which, the USA has millions of doses of the oxford vaccine sitting in warehouses, without regulatory approval to use them, and we're exporting zero doses of vaccine to our allies. India, China, and the EU are all exporting at 1/3 to 1/2 of what they produce, but the USA and Brexit are still hoarding it all for themselves, EVEN THE STUFF THEY CAN'T USE, and won't even send it to places like canada. (In response to universal "wow, that's stupid" coverage they announced plans to eventually export vaccine, but so far it's just lip service and they still aren't actually doing it yet.)

Speaking of "wow, that's stupid", transportation secretary Buttigieg is being amazingly stupid by trying to neutralize any advantage of electric cars with punitive taxes. The gas tax is to DISCOURAGE BEHAVIOR, not to pay for stuff. You pay for infrastructure the same way you pay for defense spending. When is the last time we couldn't 'afford' a war? FDR did the New Deal in the middle of the Great Depression. This idiot white male's proposal would also prevent app summonable self-driving cars from offering "all you can eat" plans with flat monthly rates no matter how far you go. The COST of putting extra miles on a vehicle that goes one million miles in its lifetime and is recharged by solar power is just "rotating the tires and cleaning the interior", but if you add a per-mile tax you make sure every OTHER country in the world does that but NOT us because SOME IDIOT dunning-krugered up an 'idea'.

Chevron was ordered to pay $10 billion in damages for polluting the amazon, and the company seems to have responded by getting the US lawyer who beat them disbarred and placed under house arrest in manhattan for the past 2 years.

You can sing "Britain is falling to fascism" to "my bonnie lies over the ocean".

Turns out a lot of crime is created by enforcement actions. (Just like when our army goes to a foreign country and opens fire into a crowd, suddly there's a lot more people on the opposing side who want to kill us).

Good analysis of a capitalist PR psy-op.

Fascists dogpile. It's one of their primary tactics, and why punching the condensation nuclei is so effective. (They're cowards individually, merciless and pitiless in large numbers.)

I still advocate for guillotines rather than taxes. There are less than 1000 billionaires. We outlawed slavery, we can change the law to make hoarding a billion dollars a capital offence. But we're all waiting for the Boomers to die first.


March 28, 2021

Big Boat Still Stuck. You can put those four words in any order and they adequately describe the situation.

I am disappointed by execveat because I want to add an option to chroot to run a binary from OUTSIDE the chroot, and it seems like execveat with a CLOEXEC dirfd would do the trick nicely... but it's ignored for absolute paths. If I "int fd=open("/", O_RDONLY|O_CLOEXEC)", then chroot(), then execveat(fd, "/bin/ls") I want it to run the /bin/ls OUTSIDE the chroot, not inside it. (Yeah, I can chop off just the filename and open the path part myself, but DUDE. Why did the syscall designers not already think of this?)

The bigger problem is this has to be a static binary: even exporting LD_BIND_NOW doesn't help the dynamic linker find its libraries _after_ we've chrooted. While I could LD_PRELOAD a stub intercepting the _start symbol and _then_ calling chroot, A) toybox is one executable and this would require shipping a second file, B) that would be the old chroot() syscall; the new one doesn't help there, C) how do I then find the real _start out of the executable to hand off to? (What, borrow the pending/readelf.c code to walk the ELF tables? Bit more intrusive than I'm looking for here and I worry about different targets with different link syntax with RELA and such. I'm not using a dlmopen() gnu/dammit extension, and it would be EASIER to walk the elf tables myself than understand that thing's arguments. I'd hoped dlmopen() was like fmemopen() and I could maybe find/load the libraries that way, but no...)


March 27, 2021

Since 2021 is _less_ of a trash fire than 2020 was (not an endorsement), I kinda of want to do "three technical days, one political day". But stuff just keeps coming. I suppose I could break down and keep two blogs, but... there's just one of me?

I very much want the world to go back to a point where I have the luxury of ignoring politics. But first I'd have to stop feeling like I'm living in 1930s Germany. (Yes, we're in the "hitler went to jail and is writing Mein Kampf" stage. That... wasn't actually a permanent solution to the problem last time around? We had surgery without chemotherapy. The far-white billionaires behind Fox News have purchased the Wall Street Journal, Newsweek, Forbes... literally buying credibility until they burn out each new sock puppet, while they build new propaganda networks.)

Not the sort of thing you just ignore and hope it goes away.


March 26, 2021

Sigh, why is j-core.org down? Poked Wale and Jeff about it but it's not quite yet 5am on a saturday, may take a while. Yes, I'm writing this entry early in the morning on the 27th, backfilling what happened on the 26th because even day = technical stuff, to make it easier on followers who just want the computer geekery and not Boomerdammerung (the "prophesied war among various beings and gods that ultimately results in the burning, immersion in water, and renewal of the world"). But at least we can all rally behind the simple clarity of Big Boat Stuck. It's the news version of a palette cleanser. It's big. it's a boat. it's stuck. It's probably gonna be there a while. (Now available in "chibi", and it's a pity Clarke and Dawe can't cover it.)

Instead of working on toysh, I spent the evening cleaning up chsh.c, which I had an open window for from yesterday, plus a little analysis of somebody's mkroot problem. I _was_ also planning to continue down the "turtle board help desk" rabbit hole, but I haven't gotten any reply email to yesterday's threads, which implies the j-core.org lists's mail server is down as well as the websites. (Wheee.)

I gave in and started redoing toysh to always have a block in the block list at each function level, fixing the off-by-one push/cache design to just have TT.ff-*gt;blk->pout and TT.ff->blk->urd always be current.

That urd entry is a bit odd because pp->urd has the undo list for each command's redirects. The blk urd is for undoing pipe redirects and the redirects after a block ala "{ echo; } > potato". And it's still SLIGHTLY off by one because when you hit something like that the redirect undo list should be BEFORE this block, so that the | lifetime and and > lifetime match and get undone in the same unredirect() call operating on the same urd list.

And THAT means that the first block's redirect list is in the "zero block" that just got added, so you unredirect() _after_ you pop. And when you have "echo | tar | gzip | ssh" all at the same level, you save the pipe into the current block's redirect list (which should be empty) and then undo (clearing the list) before running the next command, because you've overwritten stdout (and maybe stderr) for _this_ command, and may have inherited a pout that overwrote stdin, but as soon as the command is run we undo all that. The only thing that remains is the pout which the NEXT command will replace its stdin with, which is not in the unredirect list yet because it hasn't displaced anything.

It's a fiddly design to keep track of. We're juggling filehandles and at least one of them has to remain airborne between each command. I got this right last year, and THEN added functions. I keep WANTING to have the pipe unredirect list be a local variable, but it has to be at the block level because block unredirects happen AFTER pipes into and out of the block, so they stack on top of it for the unredirect logic. The < and > get moved back where they were first, THEN the filehandle the pipe displaced gets moved back, so the pipe unredirect has to be retained LONGER than the others. We traverse the urd list in reverse order when we undo it, so the pipe entry has to be added first. Not hard to understand, it makes SENSE, it's just something I have to keep reminding myself of because every time I walk away for a day or two and then come back, I keep trying to collapse it down to the next design level and that's the crossing that says it has to go at THAT level.

Hopefully now that I've written it down, I'll remember it. I should totally add a comment, but have to get the code working first to know where to put it.


March 25, 2021

China is trying hard to become the new North Korea. This is a bit concerning because at $DAYJOB all our electronics manufacturing supply chains run through Shenzen, and they're REALLY trying to get themselves sprayed down with punitive tariffs. (Some sort of ego-driven chest beating exercise as far as I can tell? I hope it's not Hitler's "we need breathing room" (as quoted in Star Trek 6: the Undiscovered Money).)

Over the past 30 years manufacturing, especially rare earth metal mining, was outsourced to China because they were willing to poison their citizens and run slave labor camps for money. But the environmental "advantages" are tailing off and the slave labor isn't plausibly deniable anymore, so the REASONS for shipping everything to the other side of the planet no longer hold true and the supply chains are largely held in place via inertia. Even China's state media admits their school system completely kills creativity, which is why they needed Hong Kong and Taiwan to provide all their inventors for the robots to slavishly implement/duplicate. But they've already killed the Hong Kong that laid the golden eggs (Shenzen was just a suburb of Hong Kong, it turned into a tech hub entirely because of its proximity to the british protectorate), and are eyeing Taiwan...

This is the manufacturing version of the 1980-2010 fad of outsourcing all your IT work to India, where their college students would intern for 18 months at an outsourcing firm as training, and then once US firms had paid to train them they'd go do REAL work at one of the firms servicing customers in places like Korea and Vietnam for 3 times the money. The companies that did this got deliveries of mediocre code from junior programmers, and then any follow up was done by different people with no continuity of institutional knowledge because the people your contracts had trained, who had learned everything you had to teach them, were now working for your competitors. (Or at least precluding your expansion into those markets.) Having China manufacture your products is exactly like having India write your code. Except China's government regularly pulls crap like Tianamen Square and the occupation of Tibet, is run by a dictator for life, is built on censorship (the "great firewall"), disappears people to concentration camps, and those statements aren't even particularly in DISPUTE.

P.S. Yeah yeah the GOP continues to suck but it also continues to be fundamentally a financial scam on its own base (scroll up, that's an informative thread) and there's other stuff to pay attention to (such as how terrible facebook is, or how terrible amazon is, or how terrible the boomers were, or police everywhere, or guns, or religion, or plutocracy, or real estate hoarding or this thread where a retired Navy veteran reacts bemusedly to the ship blocking the Suez canal).

Meanwhile, the pandemic isn't over yet. You know how we have a new flu strain every year? Well it's been a year and we're getting new covid strains because when it thrives and mutates in a worldwide population that's what happens.


March 24, 2021

Sigh. Gmail's spam filter going feral is a regular occurrence, I need to check it every few days and fish the not-spam out or it spirals into "this is similar to other spam" and becomes 90% false positives. I forgot to do it for 3 weeks and one of the FIRST false positives it got was the j-core thread about the boards I sent out asking me follow-up questions about them. (I only found out when I emailed THEM to make sure they'd arrived, and got pointed at the unanswered thread. Oops. Jeff probably didn't reply because he expected me to.)

Bit more traffic on the list now about turtle boards. I've sent out 3 turtle boards to people outside $DAYJOB, and have addresses to send out 2 more (which leaves me with 2, and I kinda need those), and if they post about what they're doing with it (and I collect the "here's how you do that" bits I'm writing up and stick them on the the web page), that's reasonable momentum to try again at the Crowd Supply stuff.

The main hiccup for me with Turtle is that Jeff Garzik, one of our larger investors and on the board of directors, absolutely hates the name "turtle" and has wanted us to call it everything from "arrow" to "jx" instead. So if I make a j-core.org/turtle page I invite trouble. As with rewriting the bootloader, which would NOT use the ELF toolchain if I did it but instead be based on the hello world kernel built with the Linux toolchain (which Jeff 100% will not merge into the project because it's more important to him that it use that toolchain than have any specific feature set), the objection is enough to keep me from starting the work. There's always other things to do instead.

Toysh: the way bash segfaults when you "echo source input > input; source input" (stack overflow) is less alarming than "meep() { meep; }; meep" being a cpu-eating loop that not only ignores ctrl-C but ignores closing the tab it's in (keeps going until "kill -9" of the PID). Again, behavior I do NOT intend to reproduce in my version. I suspect I should add another counter check and error_msg("tilt") to my code...

Anyway, working through what function contexts mean for pipe lifetimes. Each function() body is a compound command which must contain at least one executable statement (with ((math)) being sort of an edge case there but manageable for this) which means my pipe handoff logic is guaranteed to have a statement to consume pout, so "echo blah | func" can't leak the "pout" file descriptor if I move it from TT.ff->pout back to TT.pout? (I moved it into function context when adding function support, but it just bridges a filehandle between one executable statement and the next.)

The thing is the filehandles created by pipe() need to be closed, but "pout" is the filehandle that BECOMES stdin of the next process. I can't make it stdin earlier because redirects override pipes ("echo hello > file | cat <(echo potato)" writes hello to file and "potato" to stdout) so the pipe has to replace stdout before processing the first command's redirects, and then replace stdin AFTER the first command runs but before launching the second command's redirects. Sequence is important, so it has to be a high filehandle for a bit we can dup() down later. We use the existing save_redirect() and unredirect() logic because we're displacing stdin/stdout (and stderr for |&) which need to be restored later, and that needs an int *urd to save the unredirect information into.

MOST of this stuff is based on flow control blocks, if I "echo | if true; then echo | cat; fi" I have nested pipes and redirects. But there isn't a "block zero" the way there is for function calls. I made TT.ff never be empty so I can always just dereference it for things like TT.ff->arg, but I didn't do that for TT.blk (now TT.ff->blk) where empty means we're not in a block, which is sometimes nice to know. (It's nice to know for functions too but I just check TT.ff->prev == TT.ff there; circular list.). This "blk can be null" decision means stuff like blk->pout and blk->urd need somewhere to live when we're not in a block, and what I did is just have that top level copy ALWAYS be the one that got used, and had block entry/exit swap the contents in/out of the most recent blk version.

Outside of flow control blocks, a pipe is only ever from the stdout of one process to the stdin of the NEXT process, and things like function calls MUST have a command in them (can't be empty) so that does get consumed. so I just need the one and TT.pout gets consumed when set and then unredirect() cleans up later. The fiddly bit is:

$ echo -e 'one\ntwo\nthree' | if read i; then cat; fi
two
three

The "replace stdin" has to happen BEFORE block entry, and then that pipe becomes the default input of every command in the block. I _think_ I'm getting that right? That's what the switch from blk->pout and TT.pout is doing.

This still leaves "alias" being weird, but:

$ alias potato=;
$ potato
$ echo hello | potato
> ^C
$ alias potato=";"
$ potato
bash: syntax error near unexpected token `;'

Alias expansion happens at _parse_ time (BEFORE line continuation), not runtime. Like #include in C, it's over and done with long before this part of the code runs...

No, that's wrong... when I pipe into "source" or into a function every command in that new context needs the piped data as its stdin and what it's writing going to a pipe if its stdout was piped. It's essentially a new flow control block, but I haven't ADDED an ff->blk to the one I just left. That's why I had ff->pout and ff->urd at the function level, because it's "block zero" for that function. The problem was I wasn't doing the block style handoff when calling the function, but the "handoff" is just "perform the action before calling and cache the data at the previous level".

Grrr. The blk->pout stuff is conceptually off by one (due to the missing zero blk). The reason TT.pout is a global is so when you pop_block() it can assign the one cached in exiting block to the "active" one, whereas if you always had a blk then blk->pout would always be active. And it has to close the old TT.pout rather than relying on it to already BE closed because things like "break" or ${a?b} can pop you back up multiple levels. (Break shouldn't be able to do so from a pipe, echo hello | break is essentially a NOP, but ${a?b} smashes back to the command prompt and shouldn't leak resources doing so.

Urgh, fiddly corner cases...


March 23, 2021

Walking out to the table tonight I got caught in a rainstorm and sat under an awning just south of HEB for 20 minutes while it worked its way thorough. There was a white-ish van parked in the middle of the road with its lights on, and a screaming argument coming from it loud enough to cut through my headphones, so when the rain let up a little I went over to the van (which was dented all along the left side, thought maybe they'd driven away from an accident) to ask if they were ok. The woman in the passenger seat said "no I am not", and the white dude got out through the driver's door and went around to the back of the vehicle. I held out my phone and asked if she needed to make a phone call and the man said "Are you calling the cops?" and the woman screamed "give me back my phone" at him, and then went "yes, call the cops".

I'm reluctant to get the police involved in anything, but 911 won't send out social workers, and he was a white dude and she wasn't black so they probably wouldn't shoot either of them without asking? (Between rain on my glasses, mask fog, and general poor lighting I couldn't see all that clearly, but she had long bleached blonde hair. English was clearly not her first language, either spanish or portugese? But she's the one who asked me to call, so...) I walked to the sidewalk past the front of the van noting the license plate, then stood on the sidewalk and called 911. The white dude got back in the van, turned off the headlights, and TORE out of there while I relayed the plate number and what I'd seen to the dispatcher. They headed east on 43rd street, ran the red light under I-35, and then turned off their tail lights.

I would give that action less than a 5% chance of actually having done any good. Austin PD is better than some but... (Yeah, I should have hidden somewhere and made the call without quite so obviously alerting the white dude, but I didn't want to forget the plate.)

Oh good grief, Stallman's back on the FSF board? Ah, he's tone-deaf and self-appointed as always, and is being opposed.

Global warming still a thing, doo dah doo dah. Remember those Australian guys rehabilitating land because british ranchers created a bunch of desert once they'd slaughtered the natives, and it's possible to UNDO the damage if you acknowledge the cause? Yeah, dead ground can't absorb water so it all runs off as floods. This is a manmade problem on the RECEIVING end as well as the "we heated up the atmosphere so it holds more water and dumps it in bigger lumps" end. Unfortunately Australia's government was recently taken over by a center-right party with a misleading name, and as with all right wing loons they turn out to be both horrible people and surprisingly incompetent. (Re: the name thing, the right wing is constantly trying to rebrand itself because policies that steal from the 99% to give to the 1% turn out to be profoundly unpopular, so when not trashing liberals plutocrats and fascists pretend to BE them, ala "neoliberal" and "libertarian".)

From 1889 to 1890 republicans had a scheme to pack the senate by adding six new states in nine months, which resulted in things like the battle of wounded knee to kill off the new territory's existing native occupants. They have not improved in the century and change since.

That's numberwang.: the "united" kingdom seems unlikely too remain so for long.

Defund the police, break up Amazon.


March 22, 2021

Went down a bit of a rathole making $() work in the same process (because $((echo hello) | tr) has a pipeline IN it so it seems like there's an extra fork in there?) until I realized that the REASON it has to be asynchronous is so the pipe buffer doesn't fill up and block. (Otherise the output of $() blocks before it returns to get read into a string.) Added a comment to that effect.

This is also why "echo hello | cat" needs the echo to be in its own process, not in the shell process. Even though it's a builtin and can run in shell context, the output pipe will fill up and block if _we_ are the consumer (or have not yet _started_ the consumer)... I suppose I could make it run in the shell process if I did it in two passes (launch child processes, then go back and do builtins) but the reason that won't work is "echo $BIGLONGTHING | read i" has a builtin talking to a builtin. Nope, needs to happen in separate processes asynchronously draining pipe buffers. (Ok, the rule could be that a builtin consuming the output of another builtin has to be a child process. I already made "abc=def | echo" fail to persist by another mechanism, but that was just performing the assignment into a temporary function context that immediately got discarded.)

The hang in the test case is because the tr process has its OUTPUT redirected, not its input, but the fiddly bit debugging it has been it's one of FOUR processes, which seems excessive. But the parent shell is a process, $() is a process because output pipe, (echo) is a process because subshell but the echo WITHIN that can run builtin because it's not (locally) piped, and tr is a process: that's the four. So figuring out where the redirect went off the rails is a little more awkward than it seems, and making them not exit and discard data (ls -l /proc/12345/fds saying no such file or directory) is crotchety. Not blocking debugging progress, but time consuming to work through it.

Ok, it's not INSTEAD, the tr process should have both input and output attached to pipes. There should be a pipe between the echo process and the tr process. And the problem is connecting the input uses TT.ff->pout not being -1 to indicate that the previous process piped data into us, but... it's not a per-function thing? It's a per flow control block thing. A function is KIND of like a flow control block but not exactly, so I have a list of flow control blocks within each list of functions, but right now each function starts with ff->pout = -1 (which is wrong). Hmmm. You can pipe output into a function, and you can pipe the output of "source filename.sh", so both of those need to inherit pipe context from their caller.


March 21, 2021

Saying the quiet part out loud, the GOP warns it has literally nothing left but voter suppression. Their entire remaining strategy is voter suppression. Of course voter suppression isn't Russia's only trick to help the GOP, they're innovating things like ghost candidates. And the GOP is leveraging deep strains of racism and sexism built into the whole country from its founding, even liberal california apologized in 2018 to the Latino women it forcibly sterilized, a practice finally outlawed in 1979, and an apology which was just lip service with no money or anything attached. And when that white asshole performed gun violence du jour in Atlanta, the husband of one of the victims was arrested and detained until his wife died because he was brown and thus a suspect rather than a victim. The british colonizers used racism to steal the natives' land, the confederate plantation owners used racism to become rich, the northern factory owners provoked everything from the homestead massacre to the triangle shirtwaist fire in the name of unbridled capitalism... We have some serious cleanup to do when the Boomers die, starting with teaching "humanities" again. But the GOP itself has decided the only way it has to retain power a little bit longer is to spend everything that's left on the holding action of voter suppression. That helps it ride down the Boomers, the rest of us need to plan for what to do AFTER the Boomers.

Dear clueless Boomer Media, the surging price of used cars isn't because people are buying them with stimulus checks, it's because of catalytic converters (as I blogged about last month). The surging price of the rare metals in catalytic converters has driven their price up over $2000 each, meaning you can fence a STOLEN catalytic converter for $1000, which has led to widespread theft (and not just in big cities). This adds $2000 to the price of every car because even used ones can be junked and this ONE PART sold for $2000 with proper title paperwork (and then it drives your car INSURANCE through the roof).

Meanwhile, electric cars don't have/need catalytic converters, which is not only a $2000 discount on the manufacturing/repair costs but means your car isn't an obvious theft target for any random yahoo with a hacksaw. (P.S. while walking to the table late at night, I've noticed a whole lot more REALLY LOUD cars driving by with essentially no muffler. The car still runs if a thief cut off the fuel exhaust system, it's just smelly and loud and can't pass even Texas' lax vehicle inspection...)

This is a very good thread about the asian-amercian experience, the downsides of being a "model minority", and how white people culturally appropriate at outright "vore fetish" levels. (I tend to link to twitter threads in the middle these days because the thread tends to stop with a tiny "click here to expand the second half" link that's easy to miss in the flood of reply tweets. When I link to the start people don't always notice half the thread, they think there's just a short little bit and then a bunch of replies. Twitter is bad at being twitter.) It's not just culture they appropriate, white gentry crave victimhood. What really scares them isn't mobs coming for them with torches and pitchforks, it's change happening without being forced, just because people learn better and decide to do better. They know, deep down, that they are obsolete people, and THAT scares them.


March 20, 2021

Darn it, I've been treating FD_CLOEXEC as if it closed file descriptors on fork(), which it does not. It closes them on exec(). Which means if you run a child shell which doesn't exec(), or run a builtin toybox command that doesn't exec either, the new PID is polluted with a bunch of leftover fds. And there doesn't seem an obvious trigger_cloexec() outside of the exec system call(s). Maintaining my own list instead of annotating with the fcntl raises lifetime issues for said list because there isn't just _one_ unredirect list, there's one in each flow control block level, and THOSE nest with function calls now; how do I track when one of the marked-for-death filehandles gets closed in the parent naturally, wrap close() and check my TT.clofork list? It's not just "go through and close all the fds that unredirect would close" either because unraveling 2>&1 cares about sequencing, because you're also MOVING file descriptors back into place, and sometimes you move-then-close when redirects get stacked... The cloexec annotations were a side channel to that which triggered in the child without needing to be cleaned up by the parent. Hmmm.

There's multiple ways I can make it work, it's just an intrusive pain. The current design's based on a slightly wrong assumption, and now I'm wondering if it matters enough to do big changes to clean up something that... maybe doesn't hugely matter? ACTUAL child processes aren't polluted, and parent processes do eventually close all the fds, and none of the builtins should _care_ about the extra fds, and filehandle exhaustion isn't a common problem... The systemwide fd limit is like a million, and I dunno if many dup() of the same kernel file struct really counts as multiple open files? I guess if it has its own file position indicator it would. (Does lseek() on one move the rest? I really don't want to have to care right now...)

Anyway, I'm trying to debug the sh -c 'echo ab$((echo hello) | tr e x)cd' test, ala "$(()) isn't ALWAYS math" (which the Defective Annoying SHell gets wrong, by the way). The test is doing $() as a subshell and then (echo hello) is another subshell, and then within the second subshell echo is a builtin, hence all those unclosed fds because it's two forks deep and still hasn't done an exec, and dumping out the filehandles to see why the pipe isn't lining up is where I noticed all the extras.

The problem I'm trying to fix is the fds aren't lining up: the output of echo isn't going into tr (thus it hangs), and echo exits basically immediately (which it's supposed to, it put data into the pipe buffer and exited), but if I throw a pause() in before its exit the pipeline doesn't continue to _launch_ the tr, which... either there's a vfork() missing or I'm putting the pause() in the wrong place?

Ah, there's another design issue: running echo as a shell builtin (because it's MAYFORK) is problematic because if the echo output blocks (pipe output longer than 64k, write to a FIFO...) the shell won't continue assembling the pipeline. Output to stdout is probably ok because | should stomp that even if it's redirected? Hmmm... no, it doesn't:

$ echo hello > potato | cat
$ cat potato
hello

The | redirects occur before > redirects (gotta add a test for that and make sure I've got that order right, I think I did) which means the echo can DEFINITELY be redirected to blocking output, and echo blocking should not prevent the rest of the pipeline from spawning (especially if the rest of the pipeline is reading from a FIFO that would unblock it).

So mayfork doesn't count in a pipeline, only nofork. Right...


March 19, 2021

You know how the coasts are getting pummeled by global warming and housing there is destroyed every couple years but they have federally subsidized insurance so they just keep rebuilding and getting big insurance payouts? (Last Week Tonight did a great piece on it a few years back.) Well that was scheduled to be fixed until Chuck "Boomer" Schumer derailed it. The GOP cannot disappoint me, but the Boomercrats INTENSELY disappoint me. (Yeah yeah, I know, they're Good Cop.) Can we give the septuagenarian senators a gold watch and a boot out the door already? Yes I'm aware this would disqualify Bernie and Warren but I'm happy to accept that collateral damage. This is not a new concept, it's a thing we ALREADY DO. If you can't be a senator YOUNGER than 30, you shouldn't be able to be one OLDER than 70.

Sigh, I guess the $300/month child credit is a START towards basic income. (The same way the $1400 tax credit could have been mailed out as $116/month over the course of the year and ALSO been a start towards basic income?) Raising children is basically a full time job, and expecting parents to work and raise kids means working multiple full-time jobs. (And then having to work two jobs because the first doesn't pay a living wage means it's THREE jobs.)

The Boomercrats can't imagine NOT means testing it, of course, even though it's SUCH an old and obvious idea that the guy Buckminster Fullerines are named after had lovely things to say about both basic income and bullshit jobs, and he died in 1983! Just give it to everybody already, and tax the rich. You get it back in taxes, not by forcing everyone to jump through hoops to prove worthiness for basic services. Means testing is just a way of NOT DOING it. When you call the fire department you don't have to spend half an hour confirming how worthy you are of assistance. Your kids get to go to school no matter who you are. When the rich refuse to be taxed, legislate guillotines until the objectors run out.

Not that funding UBI is the only reason to guillotine the billionaires. For reference, Mackenzie Scott is an excellent example of how to billionaire: "this is how fast someone with a soul can reasonably be expected to get rid of excess money". She's finding good homes for a billion dollars per month, at which rate she'll work through the $60 billion she got in her divorce in 5 years, and STILL have enough hundreds of millions of dollars left to live in ridiculous luxury for the rest of her life. 5% annual interest on $900 million is $45 million dollars per year, which is enough to provide a six figure income for an entourage of over 400 people working full time to make her happy. Heck, she could run a small college on that amount. There's a difference between "wealthy" and "obscene", and "Billionaire" is over it.

Late Stage capitalism really is the 99% vs a tiny fraction of 1%. People who SEEM like they're doing well, such as franchise owners, turn out to be micromanaged, deep in debt, and living from paycheck to paycheck just like everyone else. Most of the time your boss isn't the 1%, and neither is his boss. The whole precarious edifice is kept in place by having each exploited layer cling to its place in the hierachy and outsourcing the opporession. It's a giant Boomer scam. (Speaking of "follow the money", a thread about prosecuting Trump's money laundering. And speaking of specific Billionaire passion projects: Tesla continues to set self-driving back every year: they didn't invent anything, they're just buying competitors and badly copying things in a dangerous slipshod way. And twitter remains bad at being twitter.)

Still watching Boomers across the pond drag down the UK. Even europe's safety net is stretched thin these days. Of course the Boomers are literally starving students. Civilization in the hands of Boomers is terrible to everyone except their greedy selfish selves. Meanwhile, Esquire Magazine has written off the GOP as "white noise" with "nothing left to offer".

In britain and its ex-colonies "first they came for" starts with brown people (the designated scapegoats) and continues with sex workers, transsexuals, homeless.... The point is to establish precedents for "people can be treated like this" on the vulnerable, and then use that precedent elsewhere escalating until it covers everybody except your new kings. Racism is about systemic bias, brainwashing people to have knee-jerk reactions just greases the way for things like "civil forfeiture" and "qualified immunity". Defund the police.


March 18, 2021

I considered emailing Elliott to point him at this comment in case he felt like explaining, but decided against it. Arguing about the differences between public domain equivalent licenses is somehow META-useless. The whole reason to use them instead of public domain ADJACENT licenses like Apache is so they collapse together and you don't have to do exactly this sort of thing. (He says having posted to the thread twice, although in my defense I was asked to comment by another developer.)

That said, I noticed the recent Android license text change independently, and admit to curiosity about the three bugs mentioned in the linked commit, enough to follow my own advice and try to view said bugs on google's website. Ordinarily I don't bother because the link is a google account login page, but this time I broke down and logged into my work google account (which $DAYJOB pays for!) and got "access denied" instead. So that's nice.

Darn it, toysh has an order of operations issue vs bash. I have a test:

sh -c 'a=${a?b} > walrus'; ls walrus

Which is supposed to NOT find walrus because expanding the prefix assignments hits the ${a?b} which aborts the shell before performing the redirects, so it never creates the file. But I have ANOTHER test:

a=a${} b${}

Which complains about b${} not a${} proving it evaluates the body variables before the prefix assignment variables.

The problem is expand_redir() does both the variable expansions AND the redirects, because the granularity and liveness analysis are funky otherwise (<$X takes the FIRST chunk of $X if it expands into multiple words, but if $X expands to start with < it isn't special: <$X "<$X" and <"$X" mean 3 different things). That's CONCEPTUALLY hard to split up because my design deals with information as it's generated rather than encoding and preserving it for later passes to deal with. Not having multiple redundant passes makes it smaller and simpler... and means it conflicts with what bash is doing here, which wants to do stuff "between" two steps that are only one step in my implementation.

Of the two cases, I prefer to get "a=a${} b${}" wrong (barf because the prefix assignment had an error before barfing on the body) because that's just the error message and I've never promised to match those exactly. (It catches all the things that are wrong, the question is what it notices is wrong _first_.) And that's what the code WAS doing... until about a week ago. In the recent giant hairball I refactored run_command() rather a lot to make it work the other way (to match the SECOND test), and now I have to undo it again because it caused regressions in my existing tests. Grrr. It's always the error recovery paths that are fiddly to test and full of corner cases and sequencing issues:

$ readonly abc; abc=123 echo hello && echo ran=$_
bash: abc: readonly variable
hello
ran=hello
$ xyz=${} echo hello; echo nope
bash: ${}: bad substitution
$ echo ran=$_
ran=ran=hello

I still need to get all the REST of that right. (Which I mostly have, for prefix assignments we ignore errors from setvar but not expand, except ${} is a syntax error that aborts back to source context and ${a?b} aborts back to global context and I don't have a way to distinguish those yet. Working on it...)

P.S. Of course the test I've now decided not to try to pass is the one I added regex support to the expect implementation in the test suite for. That's good infrastructure and I expect to use it in future so it stays, but in the meantime it makes it infrastructure in search of a user, which is bad. My recent commit adding the first ~80% of shell function and local variable logic also reverted the only user of the zero prefix argument support and THAT I'm not as sure should stay. Yeah it works fine, but infrastructure in search of a user will bit rot before finding one. This got tested and _was_ load bearing, but is not currently being regression tested and code will change around it...


March 17, 2021

Oh good, enough people shouted at Biden until the old geezer finally acknowledged the fillibuster needs fixing (in this case to make it work like it did in "Mr. Smith Goes to Washington" again, a movie that came out 3 years before Biden was born). A big difference between this septuagenarian and the previous septuagenarian is this one's surrounded himself with less-terrible people to "remind" him of what he was in the middle of when he forgets. I still think that if you can have a minimum age of 35 to be president, you can have a rule that says you can't be on the ballot after you turn 65. (Serve out your term, but you can't RUN anymore.) This would have knocked out Biden, Trump, Reagan, William Henry Harrison, and James Buchanan, and would have denied Eisenhower and Andrew Jackson their second terms. Harrison died 31 days into office, Buchanan was a disaster mitigated only by how ineffective he was, Jackson was the most ignorant racist ever to be president until recently, Reagan dismantled half of FDR's New Deal, buried the country in debt, and got Altzheimers in office, and Eisenhower did ok but grew increasingly ineffective as time went on.

Solar got 90% cheaper over the past decade while nuclear got 30% more expensive. Meanwhile demolishing a nuclear reactor that HASN'T melted down costs a billion dollars each, and the decades of nuclear waste they create is currently still stored on site in each reactor building because it's too dangerous to transport. Please don't build more of them.

A good thread on how how hilariously bad this NFT thing is. Blockchain automates the functions of a notary public, except it's got a "garbage in garbage out" problem. NFT reinvents "pedigree papers" with the exact same garbage in garbage out problem. And both are based on wasting CPU cycles to prove your worthiness, in a collective dick measuring contest that constantly eats more electricity than most countries. (There are 195 countries and if bitcoin was a country it would rank 30th in energy consumption, between norway and argentina. Energy literally wasted because that's what the protocol is DESIGNED to do.)

Native americans are better people than europeans. This is nothing new, 300 years ago native culture was so attractive european settlers left en masse to "go native" (resulting in a lot of restrictive laws, posted guards, and military attacks on native settlements to drive them too far away for colonists to easily reach). European diseases were what destroyed native culture, we only "won" by being fundamentally filthier than the american natives. (Diseases very much plural: smallpox, malaria, tuberculosis, cholera, typhoid, rubella, scarlet fever, yellow fever, pertussis, measles, bubonic plague, anthrax, diptheria, polio, dengue, staph, strep, syphilis... this is not a complete list and even stuff like "chicken pox" and "influenza" were killer pandemics among people who'd never encountered them before, plus we introduced invasive earthworms, tetanus, and botulism to the soil and a chestnut blight that killed billions of nut-producing trees, slaughtered millions of buffalo and left them to rot in the fields...) These days those things would be considered obvious war crimes. Especially what the british did, who were nazis centuries before germany got there (and are currently returning to their roots).

I am deeply disturbed by our failure to teach "humanities" in schools anymore, and go "Stem Stem Uber Alles" instead so we can all be Werhrner von Braun. Those who don't know history are doomed to repeat it: our ancestors did things we need to unpack. The foundation of "conservatism" is denial. It's an IMAGINED past they wish to return to, and the insistance that everything they can't cope with since Mommy stopped cleaning their rooms and Daddy stopped paying all the bills must be a RECENT development meaning the whole world changed for the worse around them and nobody else noticed, because clearly there can't be anything wrong with THEM. American "conservative" prudishness has been standing astride history screaming "no" for a century. (I wonder which of those old films are available streaming?)

Here is an excellent article titled "how the childish masculinity of aging men took over America in 2018". And here's a thread about how the US Border Patrol engineered a fake crisis in 2000 to elect Bush, and then compared it to what they did in 2016, "intentionally slow-walking the process to create a backlog" making immigration look bigger when it was down in real terms.

As outrage mounted against the Sacklers, who made made billions by causing the Opiod crisis, they decalred bankruptcy to shield their assets from lawsuits. Now they've asked to be let off with a fine, gradually paying out some of the interest their billions accumulate each year so they get to stay rich and their victims get to stay dead. While admitting no wrongdoing and keeping control of their overseas subsidiary companies. Oh and only half the settlement is cash, the rest is discounts on the drugs they'd continue to sell. They first admitted illegally marketing opiods to addict people in a 2007 plea deal, and 14 years later they're still evading justice.

The vatican just confirmed it's still too backwards to accept gay marriage, despite New Pope. Plutocracy corrodes democracy and is built on greed. Boomers are trying to psych gen-x into doing what Boomers want them to. Seems profoundly unlikely to work: we wanted them dead _before_ it was cool.

The carceral state reaches its fullest expression in North Carolina, where state law allows it to press criminal charges against a 6 year old for picking one flower from a neighbor's yard (presumably as long as the child is brown).

Defund the police, UK edition today. Still plenty of reasons to defund them here in the states, of course, such as a skinhead sheriff talking about how understandable he finds the Atlanta shooter going on his murder rampage. Even the Onion has trouble parodying their profound incompetence and/or willful ignorance. Of COURSE that perpetrator is a white male christian described as "big into religion", which clearly helped drive him murderously crazy and full of racism and sexism. The fact they see this as a feature rather than a bug is why christianity is imploding.

Oh hey, the dust bowl's back, both in Austin and in China. You notice how the natives happily kept their land intact for tens of thousands of years, then european capitalism comes in and creates deserts within a few decades. Yes that applies to china too: Mao The Dong pushed out the original government of china, which fled to Taiwan, and did his "great leap forward" killing millions. (He did this in the wake of Britain selling Opium to china for years and filled his head with western education to fight back against it, did you think he'd independently invented "communism"?) The current guy is Mao's successor, ruling via arrests and censorship and concentration camps. The west has a nasty tendency to export fascism, but usually pretends it isn't. Calling fascism "communism" is just like the modern rebranding "neoliberal": nazis always pretend to be the exact opposite of what they really are (to blame their failures on their opponents), all the way back to right wing goose steppers spouting racism under the banner of "national socialism" when it was the exact _opposite_ of socialism. This technique is called "The Big Lie".

Tesla continues to set back the cause of self-driving cars. It's not enough that a thing exist, the rich white male manbaby must take credit for it. If he can't be seen to be solely responsible for its success, he will tear it down to delay it until such time as he can take credit.

Perpetually incompetent failsons are like middle school students making a show of rummaging in their backpack for homework they didn't do. These parasites hurt their own supporters the most, but see The Big Lie above. Fascism tends to interlock (the way hitler and mussolini supported each other's Big Lies), these days the GOP is propped up by Russian propaganda, and as always the trick is to follow the money.


March 16, 2021

And today I forgot to bring my charger cord to the table. I'm good! (Luckily, battery was more or less fully charged when I got here, so...)

The $PWD in pwd.c problem turned out to be a non-problem, it's exported by default and only gets to the other command when exported. Redid the run_command() logic to use a function context for prefix assignments.

But "$_" is... really annoying. It's getting set _twice_:

$ x() { local _; declare -p _;}; x; echo $_
declare -- _="_"
x
$ env | grep '^_='
_=/usr/bin/env

After a call's been made "$_" points to the name that was called, but the exported variable set to the child process has the full path of the resolved executable. BUT it turns out I already implemented the second part of that in sh_exec() and forgot, so I just need to have run_command handle the other part of it and we're good. (A lot of this is just becaue I've been away from parts of the code for long enough I have to re-familiarize myself with the near-fractal level of detail this stuff needs to match what bash is doing.)

I was asking Chet another question, and answered it for myself while typing it up:

> > But I've taken up way too much of your time already...
>
> I don't mind.

Thanks for your patience. In that case, could you explain why "${1: -1}" only SOMETIMES gives me the last character of "$1"?

If you clone the github.com/landley/toybox repo and add this patch to my test scripts (yes, I've implemented "expect" in bash):

diff --git a/scripts/runtest.sh b/scripts/runtest.sh
index 6aad9ff1..87ce44ad 100644
--- a/scripts/runtest.sh
+++ b/scripts/runtest.sh
@@ -215,6 +215,7 @@ txpect()
       [OE])
         [ $LEN == 0 ] && LARG="" || LARG="-rN $LEN"
         O=$OUT
+echo 1=$1 slice=${1: -1} and=$1
         [ ${1::1} == 'E' ] && O=$ERR
         A=
         read -t2 $LARG A <&$O

and then "TEST_HOST=1 make test_sh | grep '^1=' " the slice is empty unless $1 is one character long. It's not doing that from the command line, but it is from the middle of this script, and I do not understand why. (This is using devuan ascii's bash, 4.4.12, yes I need to upgrade...)

I hit this trying to add regex matches to scripts/sh.test. I have bunches of tests I need regex support for because my error message strings do not match yours exactly, but some tests are on stdout and stderr, which right now is E$'string' or O$'string' and I wanted to add RE$'regex' and RO$'regex'...

Which is the point at which I realized most of my test strings have \n at the end of the $'string' block which means the "last char of string" is giving me \n which is whitespace and looks like nothing if you're not paying attention. (Especially given shell variable resolution's tendency to strip trailing newlines from results, and yes I already implemented that.) I.E. the payload is still attached to the prefix so I'm getting the end of the PAYLOAD not the end of the PREFIX. Oops.


March 15, 2021

Didn't make it out to the table last night, did a fresh full backup instead, then got an hour call from Jeff, then talked to fuzzy and lost an hour to daylight savings time until I'd basically be heading right back when I got there (and we wanted to go to the farmer's market when it opened, it's open air and neither of us has been there since early last year due to the pandemic, but time to plant tomatoes again and they've got some nice varieties).

Today, I opened my laptop at the table to another dead battery. (It was fine when I left. It either failing to suspend, or waking up in my backpack and draining itself on the walk.) Didn't lose much this time (couple half-finished emails), but it's kind of annoying... huh, except the charging says the battery is near 100% shortly after being plugged in. Maybe the battery's loose in its socket? Hmmm... (Also, it's COLD tonight. Two days ago it was warm enough I needed bug spray for the mosquitoes, and today I need gloves which I didn't bring because it had been so warm. I'm told colorado is having another blizzard...)

If you mentioned "memphis" on twitter today, your account got banned. No really. Twitter remains REMARKABLY bad at being twitter, and I expect the streisand effect to kick in on whatever they were trying to hide.

And the first google result for companies like Cricut should be people complaining about them.


March 14, 2021

Plants have seeds for a reason. A million plants that are all cuttings from the same plant will all die from the same disease, generally all at once like the Gros Michel banana did (and cavendish is doing). When it's something like apples or avacadoes that don't breed true, you resign yourself to losing varieties. But when the plant DOES breed true from seed and commercial growers don't bother, that's a self-inflicted wound (well, capitalism-inflicted). Sometimes you get a disease that essentially wipes out a species, like north american chestnut blight or dutch elm disease, but giving it a billion identical plants to breed in first is just asking for trouble.

Sigh. My laptop had a dead battery when I opened it. Lost all my open windows, including rather a lot of shell tests I'd run on the command line but not turned into proper tests yet. (Command history in a tab.) Oh well, that makes upgrading to the next devuan release easier, but I should do a full USB backup first.

Speaking of "interesting vs lucrative", defining "interesting" is a can of worms. It's not _exactly_ "useful", because lots of things are useful in a busywork way. Carrying buckets of water from a stream was useful, inventing plumbing was interesting. Working as a telephone switchboard operator was useful, inventing rotary dialing was interesting (then touch-tone, then cell phones, then smartphones, and now it's all VOIP and Zoom). Working as a stevedore was useful, shipping containers were interesting. Driving a truck is highly useful today, self-driving vehicles integrated with rail/ship containerization on one end and delivery drones at the other is very interesting.

Treating symptoms vs curing a disease. Solving a problem means it's not a problem anymore: if somebody else has to do the job after me, then the job's not done. But this is antithetical to capitalism, which invents busywork, creates scarcity, and inserts middleman parasites with perpetual ongoing relationships where they don't belong (software as a service, for example). A system that defines "a shortage of work" as a CRISIS rather than letting people live in idle luxury and find their own meaning (such as tackling problems never previously addressed because we were too busy just surviving) is a broken system that has BECOME the problem and needs replacing.)

I've personally never been in danger of running out of things to do, quite the opposite in fact. I keep bumping into areas that are impossible at the time which get addressed years later but often just to the "it's black magic only a cabal can do", not "you can make your own from scratch as a middle school project". And even when I more or less beg people to steal my todo items, many remain undone a decade later.

C and Unix are still the basis of the modern world 50 years later because they were simple and correct: they basically solved a certain class of problem. Writing your own posix OS from scratch has been done by dozens of people, and is a common college project (and college course). Writing your own (non-optimizing) C compiler isn't that hard either (although fewer people do that these days because C++ has spread so much FUD about C over the years, and writing a C++ compiler is NOT a reasonably scoped student/hobboy project).

For years I've had my own corrollary to Moore's Law, that 50% of what you know is obsolete every 18 months, and the corrollary to THAT is "with Unix it's mostly the same 50% cycling out over and over", so it was manageable. Unfortunately there's maintenance work to defend that base from people who think systemd is a good idea, and there's a lot of adjacent "python 2 -> python 3 breaking all installed programs" nonsense that tries to intrude into the base (hence my perl removal patches to linux-kernel). "Mostly" doesn't mean the base is entirely static: there's some inevitable a.out -> ELF, 32 bit -> 64 bit churn over the yars. It's only MOSTLY the same 50% cycling out, we do add openat() and friends to the base, large file support, y2038 problem, SMP, utf8...

In theory defining that base would be Posix' job, if the Posix committee didn't suck at it. LSB tried but got eaten by the Linux Foundation. Linux From Scratch is a pragmatic implementation, but it's sadly full of GNU bloat.


March 13, 2021

Booyah. Maybe not a first choice, but all you need is an attourney general to make the machinery functional again and attack the rump of the successor to the whigs and federalists until it's time for party #4. (Or instant runoff voting so we're not forced into a 2-sizes-fit-none party system, but the Boomers have to die first.) All biden has to do is enforce the existing laws, but of course the GOP knows it's in a death spiral and is doing the wounded bear thing to prop up plutocracy just a little longer.

This analysis of the covid stimulus bill says less than 1/4 of it is those $1400 checks, meaning we _could_ have had $700 checks every month for the rest of the year but Boomercrats decided to do something else instead (and means test everything). Some of it they did as childcare checks, but "you're a citizen, you get basic income too, it just goes to your parents until you're emancipated" is not a complicated concept if you're not a Boomer? The easy way to deal with debt fearmongering is to repeal the Rump tax cut for billionaires. That's the obvious immediate response to every mention of that issue.

Remember the ten year gap between Hurricane Andrew pummeling Miami, Katrina flooding New Orleans, and Harvey flooding Houston? Tropical storm Beta flooded houston again last year (as Weird Al said, "Hurricanes past the letter Z"), the same year year Minnesota had its worst heat wave on record and a Derecho flattened houses from Cedar Rapids to Chicago. This year Texas was shut down by the blizzard, LA is getting thunderstorms, Hawaii is currently flooding, and it's only MARCH. The weather isn't just getting worse, the RATE the weather is getting worse is increasing.

Microsoft continues to suck. It punished its userbase for not using internet explorer, it punished them for not using msn.net, now it's punishing them for not sending all your documents to microsoft's cloud. (Alternate headline, "Using microsoft software kills 1500 people". That's how the #2 and #6 richest billionaires in the USA made their money. The #3 richest billionaire made his money from Faceboot, here's a good article about how it's so broken the people who did it say it can't be fixed (fundamentally the same problem as Boomer Media, except entrenched in both the tech infrastructure and business model).

Boomer Media sucks even more than you'd expect, its "both sides matter" reflex is outright pathological.

Disney literally just assigned two white men named bob to head its diversity initiatives. (Of course both are Boomers, why do you ask?)

Every accusation a confession: snowflake edition. The GOP serves plutocrats and ONLY plutocrats. Of COURSE the GOP's pandemic loans from a year ago funded the Capitol rioters, often disguised as " charities". Their racist misogynist culture scrapes together enough votes for each decade's Billionaire Bailout.) The Squad opposes this but the Boomercrats... also serve plutocracy, and are thus conflicted. Good Cop is on the same side as Bad Cop, only their methods differ. As the GOP collapses in a cloud of voter suppression, the Boomercrats yearn for a more plausible Good Cop to stand next to in service of plutocracy.

Plutocracy bleeds people dry under penalty of death. Plutocracy is the inevitable result of capitalism, hence the "late stage" part. Capitalism recreates feudalism with corporations as kingdoms and employees as serfs, the divine right of billionaires. Of course the largest billionaires profited the most from the pandemic, highlighting the need for guillotines. And as oil companies unravel all SORTS of stuff is coming to light.

Defund the profoundly useless police, here and in the UK.

Christianity is fascist, which is why they've merged with the GOP to form Voltron Captain Planet "White evangelical racism".


March 12, 2021

Ha! I was answering a question for Elliott which led me to try to find out what I was so distracted by on June 22, 2019 that I'd let in a patch with at least 3 obvious problems. (Mostly likely I left a tab open to remind myself to do a follow-up fix patch, and then my battery died or something...)

My blog jumps from the economics of rooftop solar+batteries on the 20th and 21st to mentioning a toysh checkin on the 25th, so I dug into my twitter archive and wouldn't you know it, the next day had the recipe for fixing the sound from a previous time Linux decided it should just arbitrarily stop working. Ha! (My sound's been broken for weeks, I keep meaning to clear enough windows to reboot, but that's for upgrading from Devuan Ascii to current more than fixing audio. Still, yay audio. I dodn't have the right headphones with me today to use it, this laptop still hasn't got working bluetooth, but I can try to dig some up at home.)

At the moment I'm out at the table, still working on toysh almost 2 years later, ripping out the live xsetenv() global variable management and replacing it with "create a new env array at exec time" which is yet another "pull the thread and the sweater unravels".

My todo list runneth over because working through my todo list spins off more todo items faster than I implement them, but usually I can fling them on the list rather than have to close a can of worms before i can check it in again. (Because it doesn't RUN otherwise. What's currently there sort of works, what's there now does not because the design assumptions don't line up so there's handoffs to nowhere.)

Wince. Just just got email from a recruiter with a job I could easily do offering $180-220k/year. That's hard to turn down, although I almost certainly will. (Work did finally pay me on tuesday. Not even half that. Not even a third of that. But I can afford to keep doing what I'm doing one more month.) I really want to see this technology succeed, but it would also be nice to pay off the house and even retire someday. Elliott did eventually get back to me to with a pointer to Google's Open Source Funding page and the advice that I join an existing corporate entity that's already approved by the Google bureaucracy. I haven't done anything about that yet. Nor have have I cleaned out the spare room to rent it out on AirBNB, which my household has discussed. Nor have I tried to advertise my patreon (or updated it, which I REALLY should do but I'm trying to get a toybox release out). And unfortunately the notes from my conversation with Stephanie Hulburt were in my twitter DMs, which are inaccessable as the rest of my account. Sigh, I know how to fix this but keep just doing the work that's in front of me as long as the lights stay on, and as with upgrading my laptop tend to only address this sort of "laundry and dishes" side issue when it's either hard to ignore or becomes a problem for somebody other than me.

My entire career I've chosen to go for "interesting work" over "lucrative", but sometimes David Graeber's observations about late stage capitalism literally PENALIZING work that's good for society by insisting it can only be done in poverty (or as a volunteer sideline from your REAL day job as a member of some billionaire's entourage accomplishing nothing except to make them feel more important) rings true. (Graeber offered real, convincing fixes for what was wrong with America, and was starting to gather quite a following. Then he married a Russian and was suddenly and mysteriously dead within a year.)

Meanwhile Fade, up in grad school with good healthcare, got properly diagnosed with ADHD and is on meds for it now. (I was diagnosed as "hyperactive" and "gifted but unfocused" as a child, and was told I'd grow out of it and needed to try harder.) They just introduced her to Aderall. One of the first things she did on the new pills was put away the accumulated pile of clean laundry on the couch (her roommate went home over summer break and has been "returning next month" ever since). I am aware of the parallels.

And I found another bash bug (in devuan ascii, so who knows what current is doing):

$ exec could_not_find 2>/dev/null || echo yes
yes

Does not give your prompt back, does not respond to anything else you type, ignores ctrl-c, but but does exit if you ctrl-d. Broke down and emailed Chet because "bug report" is a reasonable reason to do so.

Sigh:

$ git diff toys/*/sh.c | diffstat
 sh.c |  946 +++++++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 559 insertions(+), 387 deletions(-)

I REALLY need to get to the point I can check this in, but sh_exec() was using run_subshell for stuff it can't execve() (I.E. when you tell it to run a shell script that DOESN'T start with #!/bin/bash so the kernel doesn't know what to do with it), and I converted it to instead use xexec() with the command line rewritten to start with "sh" and "--" as the first two entries. Because A) it shouldn't fork an extra time, B) it's NOT a subshell, which would inherit the local variables and function stack visible with ${FUNCNAME[@]} which this doesn't. (And yes $() and <() both _do_ inherit those, and yes I should add tests for all of this...)

Ah, Chet replied to my email and pointed out that exec's redirects persist in the parent shell, even when it tries and fails to run something. (I didn't know that characters you type are echoed back on _stderr_ not stdin. Huh. I should add a test for that.)

Going through I also hit my code not looking up each existing variable before performing prefix assignment exports, meaning "readonly abc; abc=123 env" wouldn't error out. (Need to add a test for that.) And there's other flags I need to implement to force the contents to uppercase or integer only and such, which should also be honored here (all the declare stuff). Hmmm... I think what I need to do is create a new temporary function call context, look up each variable and create a whiteout with the same flags if found, and then do the assignment through the normal assignment mechanism. Which seems awkward (allocating a "name=" stub and then freeing it and replacing it immediately), but I want to reuse the sh_exec() infrastructure that's converting the sh_var array visible_vars() returns into an environ[] array execve() can consume... Ah, duh. Of course: have the whiteout stub added to the new function context be the full new string with VAR_NOFREE in the flags. Then the set function can pass the same string back in, and abuse it as necessary with toupper and such having forgotten the previous reference to it but not freed it.

Next problem: if toysh isn't keeping environ "live" (exports putting stuff into it immediately) but instead assembling a new environment variable list before calling exec, shell builtins aren't getting an updated environ list. Right now the only shell builtin that cares is pwd (which check $PWD). I suppose I could special case that variable the same way I have $IFS (to update TT.ifs), so when it's updated it goes into environ[] immediately?

SOMEDAY I WOULD LIKE TO CHECK IN THIS COMMIT. It has to stop spinning off TANGENTS for me to do this.


March 11, 2021

Slavish devotion to the GPL has turned Linux into a giant unmanageable hairball the exact same way it it did for GCC. The Linux kernel refused to have a stable internal APIs (allowing modules to be portable from one version to the next) the exact same way GCC's explicit refusal to have a stable internal API turned THAT codebase into a giant unmanageable hairball. In both cases, the explicit motivation was licensing (to allow the GPL to contaminate as much code as possible) which saw an API barrier to copyright (my code isn't a derivative work of yours if there's a stable documented interface between us) as a threat to their licensing model. The developers did something FOR THE LICENSE that was bad FOR THE CODE, with bad long-term results.

Sigh, I could write a long thing about how code being modular is an important part of maintainability (and scalability, whether to large line counts or long maintenance times or many different deployment environments, all surprisingly similar scalability issues), but I have too much else to do. IETF used to demand two independent interoperable implementations before calling something standardized, and many years ago I contributed material to a chapter about that in a book on unix design. (Back before Eric Raymond went the way of all libertarians, he and I had a productive working relationship.)

The tl;dr is gcc is being replaced by llvm and I expect Linux to undergo a similar fate at some point for similar reasons, but they're a number of years behind on the ossify-into-a-loon curve. Quite how many is unclear: Stallman was born in March 1953, Linus was born in December 1969, about a 16.5 year gap. GCC started to go off the rails in 2007 (port to C++, switch to GPLv3, launch of LLVM) and Stallman resigned in 2019. That implies Linux might start going off the rails in 2023 or 2024, with Linus' retirement around 2035... but RMS was already demonstrably nuts back in the 90's? Hmmm... Linus is historically pragmatic and technically driven, and seems more likely to age like Ken and Dennis than like Bill Joy. The thing is, it's really Greg KH who's the license nut turning the project into an unmanageable hairball, and I dunno how old he is or how long he'll remain in Linus's shadow?

This is why I do 0BSD. I should really try to promote that more, but my todo list runneth over and every time I've submitted a talk proposal about it to a linux conference it was never a topic they selected.


March 10, 2021

Yesterday I got the variable stack installed and got most of the code converted over to use it, which cleared up a number of TODO labels I had lying around, and now...

There are times I need to list all currently visible variables, WITHOUT DUPLICATES. I think I need to make an array and perform an insertion sort. This kind of raises the question of whether the variable arrays should always be kept sorted (reuse the plumbing), but... not right now. This commit is a can of worms at a _design_ level.

I leave a bunch of little notes-to-self in the code and then delete them again as I go. A current one is "TODO VAR_NOFREE whiteout x= truncate lifetime" which means NOTHING to anybody else, without a lot of backstory. The explanation is: I don't want to unnecessarily duplicate the environment variable string data inherited from exec, but having it in the same array as malloc() data is awkward because it's not part of the heap so I shouldn't free() it when a value is replaced or unset. The lib/env.c plumbing has a counter of "number of variables at the start of the array still pointing into the heap", but that wasn't flexible enough for the shell variable stuff which needs flags (readonly, integer, convert to uppercase, etc). So I have struct sh_vars array with a flags member, and added a "VAR_GLOBAL" bit to indicate that this variable was part of the environ[] array, but I kept the environ[] globals updated each assignment so the setup for exec() had less work to do. (The globals were _already_ exported, thus running commands was fast.)

And THEN I started implementing functions, which included local variables, and you can have GLOBAL LOCAL VARIABLES and there are whiteouts* too (there can be a global you CAN'T SEE right now because a local was unset, but when we return from this function it becomes live again; I have yet to find an "unlocal" command that restores access to the non-local version of the variable without returning from the function, and I should poke Chet about that but I don't want to bother him).

And THIS means that the old VAR_GLOBAL updating environ[] live isn't good enough, it's easiest to create a new environ[] array each function call with what's visible NOW and feed it to execve() as argument 3. (Or just swap the environ pointer and put it back afterwards. I'm not copying the string data, just the pointer array, and I have to do that anyway to modify it in a non-persistent way.)

If I still want to avoid calling strdup() on every global variable inherited from the environment each time you start the shell, I need a VAR_NOFREE flag indicating it's from somewhere else, but right now when you unset a local (turning it into a whiteout) it'll truncate the variable right after the 0 and realloc() it to free the memory. (Well it could be really long, I don't want to leave potentially kilobytes or megabytes of gorp inaccessable but still allocated.) And I can't do either to a NOFREE because it's not my memory. And that was the note, reminding me to fix that up before checking this in. (I.E. add a NOFREE test on the truncate in unsetvar(). Which I have now done while typing this up by the way, so the TODO got removed. But that's what it meant at the time.)

Back when I was first writing a proper tar for toybox I left a bunch of these todo notes-to-self in the code rather than stripping them out before checkin, and people started arguing with me about my own TODO notes (and submitting patches removing them because they THOUGHT it had been addressed because they didn't understand what it meant), so I yanked them and have mostly kept that sort of stuff private ever since. Which is unfortunately a large pain in the pending directory because I need to snapshot the file, delete the TODO entries, make a diff, check in the clean version, and then apply the patch from the diff to get my working copy back. But it's far LESS time than arguing with people who don't know what my note-to-self meant. It's unhygenic to check stuff into the public repo that I don't expect other people to interact with, the famous "you are not expected to understand this" comment circa Unix v6 is not something to emulate.

(I mean, I can still be annoyed when someone won't take no for an answer for a full year. But mostly the burden is on me to explain what I'm doing and make the code readable. Which is part of the reason I do so much cleanup. It may be CONCISE, but should not be difficult to understand if you stare at it long enough. All the answers need to be there, and when they aren't it needs comments or git commit messages or sections in code.html and design.html and the faq and such.)

*One slight problem with having a VAR_WHITEOUT is every time I read the macro the Surfaris song** starts going through my head. But that's just an idiosycrasy of my brain. My pathetic superpower is telling you the song just about any short phrase can be sung to. Forex: "My pathetic superpower" can be sung to "hit me baby one more time".

** Usually Honoka and Azita's ukelele version.


March 9, 2021

Welcome to 2021. The FBI is officially investigating which members of congress aided the insurrection, and it's being reported on by Vanity Fair. (Not that it's a big secret which ones were involved, but proving it requires legwork.)

The low birth rate is because capitalism. Late stage capitalism is a death cult that isn't just killing people, it's preventing them from being born en masse.

A few days ago John Rogers linked to an amusing thread about somebody breaking into unsecured online security cameras. (Something my friend Mark used to do back at the University of Texas ~10 years ago, for a definition of "breaking in" back then that was "completely unsecured, just point your web browser at this IP and it shows you a live feed of the classroom".) Well it looks like it's escalated to the point there are news articles about it. Rule 17 strikes again (any data retained long enough will leak).

Texas has jumped straight from "blizzard emergency" to wildfire season. Don't forget the house-flooding monsoons. Welcome to climate change, this isn't the new normal yet, it's going to get far worse.

Oh hey, facebook found a new way to be creepy. Must be tuesday. Let's see... white supremacists are organizing fundraisers for GOP candidates so they can suppress black voters. Yup, tuesday. (Today's thing you didn't know was ALSO racist: property tax assessments. And here's an informative write up the GOP history of evil.)

Microsoft's been under a security attack for a few days now, but I tend to dismiss this as a constant thing? (You gave data to microsoft and expected it to stay secure? Why?)

The USA could replace 3/4 of defense spending with UBI and still have the highest defense spending of any nation.

Hands up everybody who's surprised the british monarchy is just as racist as the british empire was.

Remember how the DCCC was blacklisting anyone who helped primary a Boomercrat? They just quietly let that policy expire. (Personally, I'm still holding a grudge.)

Billionaire philanthropy is a scam, video interview edition.

Citizens United has allowed the GOP to hire Russian troll farms to post misinformation. No, they're literally doing that. Not really trying to hide it.


March 8, 2021

Sigh. Toysh is approaching 4000 lines. That's just too darn long, I should try a cleanup pass once I get everything working. (Yeah yeah, forward looking statements...)

I broke down and am redoing the variable plumbing to implement local vars (I.E. moving TT.vars into TT.ff->vars so it's part of the function stack). I wanted that to be in a separate pass to keep this patch less unmanageable but it just doesn't make sense to have it NOT be part of this change. I once again hit the "magic variables are resolved at export time" issue I had a long thread with Chet about last year, but... it's wrong? $SECONDS and $LINENO both will produce the WRONG ANSWER if you do that. (And $RANDOM will be frozen.) Sigh, but that's what bash does...

Darn it, I hate hitting all these tangents. I'm implementing the "local" shell builtin command, and the obvious next question was when you "local abc" without assigning it a value does it count as "null value" or "unset" ala:

$ x=
$ echo -n ${x?fail}
$ echo -n ${x:?fail}
bash: x: fail

And as it turns out, it counts as unset:

$ func() { local potato; echo ${potato?bang}; }; func
bash: potato: bang

Which means it's creating a whiteout. Ok, easy enough to implement in the design I've worked out, but I want to add a TEST for this, which is slightly awkward because I don't want to try to match an exact error message (for one thing toysh isn't necessarily identifying itself as "bash" at the start of said error message), so something like: testing 'local creates a whiteout' 'func() { local potato; echo ${potato?bang}; }; func 2>/dev/null || echo yes' 'yes\n' '' ''

Except that fails, and the REASON it fails is that ${x?y} erroring counts as a syntax error which aborts execution so the "echo yes" never happens. But I recently worked out that those won't cross a "source" boundary, so I changed the func to "source input" and put the body in test argument 4, problem solved right? No, it isn't:

$ echo 'local potato; echo ${potato?bang};' > input
$ bash -c 'func() { source input; }; func; echo $?'
input: line 1: potato: bang
$ bash -c $'func() { source input; }; func\necho $?'
input: line 1: potato: bang

Now the error exit IS crossing a source boundary, and I don't understand what changed from last time. Which means what I'm implementing isn't necessarily right?

Ok, an ACTUAL syntax error ends at a source boundary, but ${x?y} is exiting any non-interactive shell. I don't actually have a control flow path for that. Hmmm... Add a TODO.

You can readonly a whiteout, at which point it doesn't count as a unset for ${var+value} but does for ${var?value}. You can export a whiteout, which means if it's LATER assigned to it's exported.

This is a can of CANS of worms.

Sigh, I suspect I should use a variable string that doesn't end in = (I.E. a bare name) in the list to indicate whiteout rather than having it be one of the flag values. But I have to change an unknown amount of plumbing to make that happen, and it's the auditing that's the hard part. If I was going through the code as a single pass changing just THAT I wouldn't worry so much, but the problem is my stack depth on change-suggests-change is so deep I don't have a good handle on what all the changes I'm making ARE. At the end I can examine a diff and audit m own code, but at what point do I get to check this IN? It's already been a month since I checked in "start of function call logic", which was itself a delta off of implementing $((math)) for some reason I forget. (I have an unfinished diff starting that which I might as well declare abandoned at this point, gotta redo it when I get back to that. I really wanted to merge the "expr" command in with the shell $(( )) plumbing, but... SEPARATE can of worms.

Right, I was looking at the flag list because export is inherited by local vars, and I wanted to see what other flags might be. (VAR_MAGIC isn't. -i and -u aren't. Looks like it's just export and readonly I have to check for. Sigh, "local" and "export" smell like they should share code, but I need to implement first and then see if the collapse together. Too tangled.)


March 7, 2021

Interesting thread about how Faceboot and Google's tend to collect mediocre white men. (I'm well aware I'm also a mediocre white man, I just try to find interesting things to do. I keep telling people I'm not particularly smart or talented, I'm just persistent.)

A basic thread about the history of copyright. On the one hand, authors are all arguing that if copyright goes back to "28 years with ability to renew for another 28", they will starve to death and their children die in poverty. On the other hand, capitalism is extending intellectual property law to the point the system is widely ignored with random draconian punishments meted out randomly, which is not a recipe for longevity.

John Scalzi also points out that universal basic income, rent reform, and medicare for all (or as england in the 1970's called it back when they HAD it before Thatcher tore it down: "the dole, sqatting, and NHS"), has to come _before_ tearing down intellectual property law. Because a lot of people currently depend on the broken system to survive. Of course artists and writers and actors, even including hollywood and video games, is only a small part of the money in IP law.

Some people refer to Boomercrats as "Vichy Dems", but the GOP remains self-defeating to the point even keystone Good Cop can occasionally beat them. The republicans insisted the stimulus bill be read alout for ~20 hours, and left for the night. In the absence of republicans, but with the Senate still in session, a few things were passed by unanimous consent. That'll do, Dems. That'll do. (Conservatives resent being adults, largely because they're so bad at it.)

Voter suppression isn't new but it is intensifying because that, gerrymandering, and racism are literally all the GOP has left.

Boomer media is going off the deep end.

March 6, 2021

Oh hey, is THAT how warp drives work? (I mean, assuming space is fluid.)

Toysh: I need to create the primary function call context (with the globals and the shell command line arguments) from sh_main(), then have "source" create another one but with a NULL (skipped) local variable context, and have actual function calls create a third with non-null locals.

Hmmm, I still have to deal with whiteouts:

$ x=a
$ one() { local x=b; echo $x; unset x; x=c; echo $x;}
$ one; echo $x
b
c
a

Once a local variable is created it seems to persist even if unset, I didn't spot a "local -d" or "unset -l" or an "unlocal" builtin or anything like that... Is there a way to get a local variable to STOP being a local? Other than returning from the function and ending the variable context...

There's a "declare -g" but it doesn't actually seem to work:

$ x=a
$ one() { local x=b; echo $x; declare -g x; echo $x;}
$ one; echo $x
b
b
a

It doesn't let me access the global x's value and it doesn't push the local's value into the global context. PLUS there isn't just ONE local/global context, EACH layer of function has its own variable context and the global one is just the last one you wind up in after searching all the others. So if you had one() call two() and each had its own local $x should a "declare -g" from two() give you one()'s context or smash all the way to the end of the stack?

I'm going to have to ask Chet again, aren't I? I kind of don't want to bother the poor man with all my weird corner case poking, I feel I should be done with this by now...

Oh lovely:

$ x=123
$ func() { local x=456; readonly x; echo $x; }
$ func; x=789; echo $x
456
789

You can have a local readonly variable. Of course you can. (But what you CAN'T do is turn an existing readonly variable local. Makes sense, I suppose...)


March 5, 2021

Another good explanation of why the Boomers can't adapt.

Here's an amazing graph showing the percentage of white and black voters registered to vote from the civil war through today. It went from near 100% in the 1886 election down to 10% with the grandfauther cloause of 1898, near zero with the poll tax of 1901, only started going back up in 1944 (as black GIs returned from World War II to confront Jim Crow) and has been faught against ever since. (Also, "I don't see race" is like saying "I don't see rape". It means they don't believe you were harmed, and will not help you. They're claiming the existence of people who were not harmed in the way you were harmed invalidates your complaint: some people were NOT run over by drunk drivers, have you tried being like them?)

The white supremacists (I.E. The GOP) have decied that asians are no longer white and are murdering them. The circle ever-tightens around a few billionaires and their immediate servants, using voter suppression to try to make women property again and reinstitute slavery with a murderous occupying police force serving only plutocrats.

The GOP remains self-defeating but can waste 100x the funding of their opposition due to inherited power and wealth.

Boomercrats are the Washington Generals of politics. Good Cop is a keystone cop. Their job is to always fail while saying "if only you gave me more, THEN maybe I could help. No, more than that. More than that. More than that..." Xeno's political party. They serve a useful purpose keeping GOP out of office, the same way electing a dog as mayor would, and right now we have to elect them since the GOP's entire goal is to hurt people to the point they're actively trying to drive humanity extinct. Considering that only 46% of the the people voting "for" a candidate in 2020 (but 68% of the people voting AGAINST) voted for Biden, he's serving his job as a potted plant clogging up the chair for 4 years (until AOC is old enough for Zombie Pelosi and Kamala Harris to block her if enough Boomers haven't died by then).

I still favor guillotines but if you wanna try taxes too... sure? I don't think it's enough, they'd still have the resources to overrule both democracy and market forces, and they're literally profiting from death. When 500 people control more than half of all money, market forces produce what those 500 people want, not what the other 7 billion want. And those 500 got that rich by not caring what happens to everyone else.

Speaking of leveraging inherited power and wealth to faceplant repeatedly, the best self-driving news is regularly NOT from Tesla. Also, modern AI really isn't, and a whole lot of technology is backdoored these days.

Meanwhile it's being argued that we can't get rid of intellectual property law until we institute basic income (which the GOP and billionaires assure us will only happen over their dead bodies). But the arguments people are making supposedly in favor of IP law tend to be a little more complicated if you know the actual history. (IP law is best viewed as an addiction. Needing it doesn't make it NOT bad for you.)

One of the points Sarah Taber has repeatedly made is that collecting food from properly managed wilderness produces far more food than agriculture does. A big political act european colonists do is destroy natural ecosystems so they stop producing food to compete with agriculture. This is so people must buy from stores with money, and are thus prevented from opting out of your political system on penalty of starvation. That's why they had to destroy the new york oysters, northwestern salmon runs, buffalo herds, passenger pigeons... The cowboy cattle drives were modeled on open ecosystems (learned from the natives), and stopped when we fenced in the land. This was a REDUCTION in efficiency and production capacity, traded off for political control.


March 4, 2021

Interesting developments in EV battery manufacturing. A mature industry is not "xerox/univac/kleenex", it's commoditized with multiple producers offering fungible products. The PC and Android are mature, the Macintosh and iPhone are not. Tesla needs to be buried by commodity manufacturers, and a trillion or so distributed through DARPA or similar to make it happen would help.

Toysh: when expanding $PS4 for "set -x" traces and duplicating the first character to indicate "levels of indirection"... that does not include function calls, that's only "source file" statements. Why?

You can call "source" within function calls, and it's live every time you do it:

$ for i in one two three; do echo "echo $i" > input; source input; done
one
two
three
$ func() { source input; }
$ for i in one two three; do echo echo $i > input; func; done
one
two
three

This also means that "source" is not an #include, it's a statement executed each time the function runs. BUT source blocks must be self-contained: flow control blocks can't cross source bounaries. So your curly brackets and if/else blocks have to be entirely within a "source".

The problem is, what happens when you have a syntax err? You exit the current "source" block but not the function call?

$ func() { source input; echo hello; }; echo } > input; func
bash: input: line 1: syntax error near unexpected token `}'
bash: input: line 1: `}'
hello

Yes, you do. Ok, sh_main() needs to create an initial function call context (with the initial command line arguments and global variables). Which means do_source() does NOT create a function call context, but instead switches out TT.LINENO with local variable context, and has a recursion cap using the same counter that's repeating the first character of $PS4...

No, the problem is do_source() changes the command line arguments. Right now function call has local variables _and_ command line arguments (you can pass arguments to source). I think source ALSO needs to create a function call context, but I need the local varable list to be a null pointer in that case and teach the logic to skip over it.


March 3, 2021

Never forget how cartoonishly evil the GOP are. These are literal Captain Planet villains. The republicans are literally testifying before the supreme court that preventing non-white people from voting is the only way they can be elected now. They're not trying to hide it anymore. But then saying the quiet part out loud is what rallied the base last time around. These guys are self-defeating clowns, except they've inherited power and privilege and money in a broken system where compound interest means you earn twice as much each year by sitting on one million dollars (coca-cola stock's annual dividend yield 3.2% = $32k) than working full time at minimum wage ($7.50*52*40 = $15.6k), so these clowns can drag people down with them basically forever because their endless uselessness and failure doesn't stop them. And that's before you get into the good-ole-boy network.

The utterly predictable Boomercrat cycle continues: Boomer Biden decided to alienate the middle class and repudiate the concept of basic income by means testing the stimulus even harder. That's the big lesson the Boomercrats learned from FDR's new deal: the way to make your plans more popular is to water them down and make them do less. Who said a 78 year old blue dog can't learn new tricks? Next up is he going to disqualify families earning more than $150k from sending their kids to public school, receiving social security, being able to call the fire department, or drive on non-toll roads? Means testing for all!

Boomer Media continues to suck: victim blaming servants of plutocracy. Here's an entertaining thread about how no one ever made a billion dollars honestly.

Speaking truth to power is always dangerous (and usually ineffective), it's much easier to strike at weakness. That's why victims come out of the woodwork once there are two or more public accusers.

Boomer Disposal has started but it's a capitalist ponzi scheme: the kind of "conservatorship" Britney Spears' father used to steal her money and force her to perform is being used to declare Boomers senile and stick them in nursing homes to sell their house and steal their retirement savings. It's dangerous and wrong and should not be allowed to spread, but Boomers are trying very hard to make sure the country collapses as they die so they make it hard to defend them even to prevent evil precedents from being set. (Late stage capitalism, the carceral state, and intellectual property law turning on and devouring Boomers isn't poetic justice if those things get stronger and turn against everyone else next. And elder abuse is bad even when grandpa's a senile racist hitting everybody who comes near with a stick, it's not their fault they grew up lead poisoned and were fed consumerist propaganda to prevent the great depression from returning after capitalism came to its natural conclusion during the Gilded Age. The _real_ tragedy of the commons is externalities, all of us suffer the poison produced by some of us, we can't wall republicans in with their own farts until they die.)

The federal judiciary needs to expand 40% to keep up with population growth since 1990 (which was 31 years ago now). Of course if Boomer Biden appoints them they'll all have sided with the government instead of challenging it.

Christianity and white nationalism are basically synonymous now.

Bill Gates remains an evil bastard trying to kill us all, and needs to watch Last Week Tonight's episode on nuclear waste and read the threads describing what happened to fukushima reactors one, two, and three.

Facebook is horrifying. Nazi recruitment is central to their business model.


March 2, 2021

Finally broke down and just checked in the simple cpio -u support I WANTED to do in the first place, which was like a 3 line patch: if -u unlink() each new file/dir up front and then open(O_EXCL) and let it fail if the unlink didn't work.

I spent a WEEK trying to get the google guy to explain WHY he wanted -u so I could figure out if the simple fix was or wasn't sufficient, and eventually gave up when (as far as I could tell) his entire motivation for submitting the patch was "a coworker noticed a difference from gnu". (Toybox patch does not print "patching file" when it sees a "diff" line without any +++ or --- lines, is that difference also a bug in toybox?)

I'm apparently still a bit stressed from the blizzard. But I'm making it to the table slightly more regularly now, which is good. I REALLY need the exercise...


March 1, 2021

I keep seeing reminders of why we can afford basic income now, such as how a single modern container ship has 3 times the carrying capacity of the entire 16th century english merchant fleet while requiring less than 1% of the manpower. Meanwhile the stimulus checks the house (but not senate) just passed are means tested to $75k, because nobody who lives in San Francisco or New York City where rent is $3k/month for a studio apartment has been hurt by the pandemic.

Another good thread on why we need to guillotine the billionaires. Which we can't until the Boomers die. (Meanwhile the damage will continue to accumulate.)

And here's a good thread from a british tax accountant explaining how government debt isn't a real problem... expressed in a somewhat frustrating way: he's an academic who can't produce a pithy sound bite to save his life. My attempt at rephrasing would be something like:

Last decade the UK government printed billions of pounds of new money and bought back government debt with it, which was called "quantitative easing".

That debt no longer exists: it's already been paid off just like paying off a mortgage early. Conservatives still CLAIM that debt exists to justify torturing poors until billionaires can buy harems and hunt peasants for sport because the 99% are too desperate to say no, but making interest payments on paid-off debt is literally the government paying interest to ITSELF.

The government sets the interest rate anyway because every auction the Bank of England offers to buy the government's newly printed bonds with newly printed money, and other bidders can only get any bonds by offering BETTER terms than that floor, which means interest rates CAN'T rise out of control. (P.S. interest paid on any remaining debt is taxable income, so a chunk comes right back in taxes. P.P.S. the UK has been doing this for over 300 years and the runaway interest rate spiral Tories clutch their pearls about has literally never happened.)


February 28, 2021

The endless argument about cpio -u once again ate the cycles I'd hoped to devote to toysh, and I admit I vented a bit at the end about being stressed. (Not exactly professional, but I've recently conformed this is strictly hobby, so...)

Well, not entirely. $DAYJOB has a list of commands they're currently using from busybox, which they don't want to deploy in the shipping version: ash, dd, stty, route, udhcpc, udhcpd, tr, flashcp, httpd, and ntpd. It would be nice to get toybox versions of for the shippable software image with IP due dilligence. But that's not our only option, and it's still a ways out. (Martin is still assembling the first round of dedicated hardware prototypes.)


February 27, 2021

Self-driving car subscription services (where you can commute every day to work/groceries/haircuts/lunch for a flat monthly fee) would be an enormous benefit to poor and middle class people. If losing the ability to drive means you lose your job and access to the grocery store, public transportation involving a 2 hour round trip bus ride returning with 6 bags of frozen food doesn't work work so well, especially while providing child care.... just doesn't cut it.

The progressives are pushing back against the Boomercrats (who are intentionally failing in obvious and pathetic ways), but the Boomers will preserve the fillibuster until they die. So the question is when enough of them finally die, and how bad things get before then, and what's necessary to shovel out the mess they leave behind (which will get worse every day until their death grip on power breaks).

Meanwhile, 78 year old President Biden has officially confirmed that MBS personally ordered Kashoggi's murder (which we already knew back in 2018), and then explicitly decided to let him get away with it because doing nothing about a problem is what the OTHER half of the Boomers want: "Don't rock the boat, let us die in peace!" Meanwhile, Biden has intervened in Syria's civil war, for some reason supporting Russia's puppet government against Iran's mercenaries?

The GOP is literally meeting to whorship a golden idol at CPAC. You can't make this stuff up. Every accusation a confession. They're not even trying to hide it anymore. Broadcasters covering CPAC are cutting away to legal disclaimers. And even then, Ted Cruz manages to stand out as especially dickish. The Attourney General of South Dakota who killed someone in a hit and run and said he thought he'd hit a deer even though his victim's glasses were inside his car comes a close second. When you hear about that sort of thing they don't SAY republican but do you really need to look him up to know? And no, his hit-a-deer excuse isn't fooling anyone.

Boomers did not lead the global effort to wipe out smallpox. The Greatest Generation did; the same people who fought World War II went on to found the World health Organization and NASA, both of which collapsed when their founders got too old to run them and had to hand control over to Boomers. That's why the WHO hasn't managed to wipe out Polio or Tuberculosis or Guinea Worm, and why NASA hasn't been back to the moon since 1974. The WWII vets could accomplish great things and the Boomers were fundamentally incompetent even back then, the Boomers just told self-aggrandizing lies about themselves a lot.

Now the Boomers are collapsing into a whirlpool of sexism, class warfare, and racism (not only against brown people, but also against asians, native americans, jewish people, muslims... pretty much 90% of the planet by this point). They hate everyone and everything, but don't want to roll the clock back to anything actually in their lifetimes, they want a wholly imagined past.

A nice thread explaining what a moral panic is, the white upper class pearl-clutching that gave us the Comics Code Authority and the Motion Picture Association of America's ratings board. It's a specifically christian phenomena, like the spanish inquisiton. But then christianity has been used to persecute people ever since Emperor Constantine used it to win the battle that made him Roman Emperor. Turning the other cheek by the sword is how it became Rome's state religion, and the catholic church was just the roman bureaucracy using religion to enforce its edicts when the legions were no longer up to the task.

Dear BBC: Thomas Edison did not invent the "Edison battery", Waldemar Jungner did. Saying Edison "invented" anything is like saying Bill Gates or Elon Musk did: no, they either copied someone else's invention or bought some smaller company that had invented it. This is a very common pattern where rich people use their money to buy credit for other people's work. (As compared to the history of men using sexism to steal credit for women's work, white people using racism to steal credit for brown people's work...) Thomas Edison didn't even invent the light bulb (Heinrich Goebel did).

My work is security-adjacent, and I keep bumping into people doing this sort of thing which only attracts attention. You're not Nalvany or Snowden, you're not INTERESTING. Your main protection from state level actors is being boring, and tedious to follow. Thirty years ago state level actors could already point an infrared laser at your window from down the block to read the vibrations as a microphone and listen in, and point a yagi antenna at your room from outside the building to listen to the EM interference and reconstruct your screen video. And that's BEFORE everyone started carrying a GPS tracking audio recorder around 24/7. But the professionals are almost entirely concerned with keeping their budgets unlimited so they're blackmailing the politicians, not you. (The "almost" is because there's also a lot of sexual voyeurism, it's not JUST the TSA porno-scanner operators passing around nudes taken without consent.) They mostly don't use their information for law enforcement purposes because it might compromise their sources. (Revealing to the world how Putin enabled Trump didn't increase the black budget, and if they wouldn't act on THAT they'll never act on ANYTHING.) Most people installing keyloggers are criminals stealing credit cards and banking info, or corporate espionage.

Defund the police. (The capitol rioter charged with beating a DC police officer with a metal flagpole was... a NYC police officer.)

Even full time authors are noticing that intellectual property law is broken. IP law allows corporations to steal from individuals, and is another reason to guillotine the billionaires.

The online advertising-driven economy is also entirely fraudulent. (People are making documentaries about this.) Just do basic income already.


February 26, 2021

Elliott sent me a patch to add tar --transform. Fundamentally, it's trying to do a subset of sed, and I keep wanting to pass it off to sed rather than reimplement the sed plumbing (which has a zillion corner cases like escaping delimiters and the substituting only the Nth match and so on), but it's hard to do that without allowing it to run other sed commands like "w FILE" which introduce security holes, or re-parsing the sed logic including curly brackets and /prefixes/ and such to filter them out (bigger than reimplenting s///) or adding some sort of sed --restrict which wouldn't work on a system using busybox sed instead of toybox sed (the commands MUST be individually selectable and replacable with other implementations, that's a design goal for toybox that it be modular that way)...

So probably what I need to do is figure out what subset of the sed plumbing tar needs and move that into lib/ which is a can of worms. Sigh, throw it on the todo list...


February 25, 2021

The CEO who took a pay cut to pay all his employees $70k/year points out that the poorest 90% pay $550 billion/year in taxes and the rich owe but DON'T pay $574 billion/year in taxes, but we spend $5 billion/year on the IRS and $115 billion/year on police. This is why I think addressing plutocracy with taxes is less realistic than addressing it with guillotines, and I lobby for the realistic approach.

There is no GOP civil war. They're the Party of No and of voter suppression, just like last time. When in power they embezzle, persecute, and scapegoat. When out of power, they obstruct. They lie and suppress constantly. Blue dog Boomercrat Joe Manchin is basically a republican. You've got the nepotism, price gouging, profiting from the sick, lying about reasons why...

The surviving Boomers tend to be stupid and vicious in part because the residue of boomerdom is full of survivorship bias. (The same pressure also explains why more recent cultural shifts come as such as surprise; modern people aren't that different, just less repressed.) It's easy to dismiss what the Boomercrats are doing as learned helplessness (a behavior of abuse victims), for example why is lying under oath to congress not grounds for firing the postmaster general? But that's not it: the Boomercrats are Good Cop to the GOP's Bad Cop. Hillary Clinton wasn't giving quarter million dollar speeches to Goldman Sachs because she was _bullied_, and Biden wasn't raking in tens of millions in campaign contributions from from hedge fund managers because he's helpless. The Boomercrats are bought and paid for servants of plutocracy.

An actual example of learned helplessness might be the US relationship with Saudi Arabia, which we've been placating ever since they intentionally engineered the 1970's oil crisis, and we're still letting MBS get away with literal murder (of Kashoggi and the relatives who conveniently died so MBS could ascend to the throne). Blood diamonds are a rounding error compared to the oil industry when it comes to funding evil.

Good thread about how just about every hate group is a "divide an conquer" strategy on the part of the rich white men trying to stay on top, and it always flares up again any time the persecuted minorites start seriously comparing notes. (Faceboot is basically a dedicated nazi organization at this point, while twitter remains bad at being twitter.)


February 24, 2021

Very low brain today. I meant to get out to the table tonight and analyze the cpio -u patch, but wound up falling asleep instead.

But hey, the city lifted the boil water notice! Progress! Half the grocery store's shelves are still empty (ironically, the frozen food aises are bare) and has signs up everywhere with "limit 2 per customer" on the remaining items and apologies about the supply issues. I can understand the complete lack of canned soup and ramen, but WHY did people respond to the blizzard by hoarding toilet paper? (Is that what we do now? Respond to any stressor event by buying all the toilet paper?)

But half the shelves ARE stocked, and their selection is... eclectic, but manageable. Oddly enough they've restocked the cans of milk tea in the international foods aisle (whoever else buys it all before I get to it hasn't been in), and we got a big pack of those v8 energy blueberry juice things (caffeine restocked: check), and we got a gallon of milk and some of the most disreputable bananas I've seen for sale in years (I was amazed that they _had_ them, but upon getting them home I'm not sure they're food and I don't feel like making banana bread right now), and a container of beef broth and the last container of the fancy parmesan Fuzzy needs to make risoto again (very tasty thing to do with rice), and Fuzzy baked a very nice no-knead loaf of bread from the flour we stocked up on back when that became available again mid-pandemic (four ingredients: flour, yeast, water, salt), and we dug all SORTS of stuff out of our chest freezer (we had several pounds of chicken quarters from a sale at Fiesta a couple months back, chicken sandwiches and Fuzzy is making soup). We've been eating fine, but I think we've destroyed our water filter pitcher. (It's full of white gunk because I was filtering _and_ boiling the water. VERY glad that's over, I was unsure of proper tooth brushing procedure, it was a hassle refilling ice cube trays from the kettle because the plastic isn't really boiling water safe...)

Yeah, a rounding error compared to the suffering around us. Can't really complain. But I'm very, very tired now that it's... over-ish? Less imminent? Back to our regularly scheduled pandemic tinged with insurrection tinged with not being 100% sure my startup can afford my paycheck at the start of each month? (They've managed it so far, but it's plus-or-minus a week and it's 1/4 what I was making at JCI so the uncertain timing is extra worrying because missing a paycheck would hurt more at this job than others, and I got stressed enough to email Elliott back on the 17th "If I were to ask google guys about getting a job actually working on toybox, where would I start?" but he never replied. Probably just as well. I don't want to leave Jeff and company in the lurch, I'm just stretched really thin in a way that isn't serving toybox or j-core well. If I can make it back to Japan I'm likely to focus on j-core to the complete exclusion of toybox for months at a time again, but having ASKED Google and gotten a "Linus's no" (I.E. being ignored), I don't have to feel remotely guilty about ignoring the next round of bug reports from them if it comes to that.

I'd like to get a release out before mothballing it though, and I've got a twisty MESS of shell changes to add function support I want to tie off before shelving it. Which I haven't been able to work on because my toybox cycles have been taken up with bug reports...


February 23, 2021

I forget, what's it called when a woman is promoted to take the blame for an unavoidable upcoming failure? (It happens regularly, there's a phrase for it.)

I'm aware that Biden is technically 4 years too old to be a Boomer, but that doesn't make him less old and out of touch, as evidenced by his student loan forgiveness cap. Not only does he still love means testing but his brain is too inflexible to wrap around inflation (a standard failing among Boomers). He was born in 1942 and leaded gas was introduced in 1923 so he didn't breathe as MUCH of it growing up but he's still a 78 year old man who spent 50 years breathing lead and bathed in postwar propaganda that tried to keep the great depression from coming back after the New Deal and War Bonds via endless consumerism. Capitalism turned into plutocracy and was already engineering scarcity back under the the Railroad Robber Barons of the 1870s (Carnegie and so on). We've been bailing it out and patching it up with the New Deal and Social Security and perpetual wartime spending and propaganda and financial shenanigans for over a century now.

Biden is a stopgap while we wait for more Boomers to die, plenty of young people are eager and able to do the job, but they won't be allowed until the geezers in charge lose their death-grip on power. (Then again, his Boomer fed chair wants to means test covid stimulus, so maybe the Boomercrats are just trying to alienate what's left of the middle class? Two-income households need not apply.)

The irredeemable GOP, billionaires, and late stage capitalism should die with the Boomers. Voter suppression is literally all the GOP has left, they can't win elections anymore. (Of course they freak out at bills to reduce voter suppression.) The GOP is horrible to poor people (and explicitly against basic income) and its fossil voters are clinging to fossil fuels. Republicans are objecting to renewables on behalf of buggy whip manufacturers. If we don't keep paying for things we don't need, the people performing obsolete tasks will be out of a job.

I live in a gerrymandered state, which has given us two truly awaful senators. Ted Cruz's PAC spent 80% of its budget buying copies of his book, from which he gets royalties. Not that this is a new trick for republicans (it was pioneered by a different cult). Meanwhile Texas' other senator is somehow almost as bad. Did I mention that we had purely digital voting machines with no paper trail right up until the 2020 election, with no possibility of a recount because whatever the results database was edited to say was all there was? Thank billionaire Michael Dell for those machines, who gave the Maximum Legal Donation to John Cornyn and Ted Cruz every year. (Yes, he's the Dell Computers guy, the one fined $100 million for accounting fraud.)

Still need to defund the police.


February 22, 2021

Somebody should really do the math from the public percent offline figures vs the predictions to come up with the talking point "texas estimated wind would provide 7% of its power in february, but during the blackout it actually provide X% of texas' power". Which is GOING to be a higher number if it declined less than other sources (which it did)...

Made it to the table again and stared at my pending sh.c change... which is completely out of control and I think I need to revert it and try again. (Sigh, function support is hard to do in reasonably sized chunks. It would also be a lot easier to do if I wasn't constantly context-switching away from it and feeling guilty about spending time on it instead of $DAYJOB stuff...)

I'm emailing back and forth with Jeff about some j-core design updates: We've wanted to do in-cpu DMA and repeat blocks for some time, and it would be nice to just knock that one out and get it posted to github.

The original idea behind in-cpu DMA was reusing the existing memory read/write bus plumbing to copy data when the CPU isn't using it; as a RISC chip all its math operations (including comparison) are done entirely on registers and its read/write memory operations are all to/from a pair of registers (one holding data, one holding an address), so the CPU is going to spend half its time NOT addressing memory (modulo instruction fetch but we have L1 cache now). This was also one of the drivers behind multi-issue where RISC chips have two execution cores and can do 2 instructions per cycle: one would deal with memory and one would deal with register-to-register logic.

Unfortunately, making them overlap properly to use unused cycles is large and intrusive enough Jeff isn't interested, and we DO plan to implement dual issue eventually anyway. The easy way to implement this is the "cycle stealing" approach to have the CPU execute invisible instructions that read/write through hidden registers, and sprinkle those in (probably 2 clock cycles, one to read and one to write) between the other instructions, which slows the CPU down a little while it's doing it, but at least avoids latency spikes.

We already have invisible instructions: they're called "system plane" instructions that handle reset and interrupts and so on: j-core instructions are 17 bits internally instead of the 16 they are in memory, and all the system plane instructions have the high bit set so the instruction decoder can distinguish them. Adding more up there and making the instruction dispatcher submit them instead of the next program instruction in response to an I/O pin is easy (I.E. small).

And we already have invisible registers: our register file is implemented as an sram block and in addition to the 16 numbered registers instructions can use there are some special ones (EBR, VBR, MACH, MACL, PR, SR, although not all of those are implemented as normal registers), and some multi-clock instructions need scratch space to store data between clock cycles so we've got a TEMP1 and TEMP2), which means our register count is 5 bits (32 entries) and the high bit set means it's one of those other registers. We're currently using... 22 I think? Plenty of space left in there for DMA.

So this implementation is less efficient, but can be done with almost no new circuitry, which means we can fit it in the ice40 version of jcore. And the main efficiency advantage is that a for loop copying data is repeatedly executing two unnecessary "test" and "jump" instructions each time through the loop, which directly injecting read/write instruction pairs wouldn't do. (Turns out read and write need to be on separate clocks anyway because there's only one DRAM bus which can only go in one direction each clock. I'd like to bypass cache for this because otherwise it's cache poisoning, but this needs design work...)


February 21, 2021

People aren't actually crazier today than they were hundreds of years ago: the current political crazy used to be religious crazy, but now capitalism is our religion, and capitalism perpetuates itself by actively creating scarcity (today's vaccine example). In that context, Republicans making it legal to murder protestors doesn't seem so historically out of place, does it? Same fights as always, obvious who the bad guys are.

Today, the catholic church has a policy that everyone who turns 75 has to submit their resignation, and can only stay on by exception. This makes them more progressive than the US house and senate. (In latin "senate", "senior", and "senescent" all come from the same root. Cluster of old geezers giving "in my day" speeches.)

AOC has raised $4 million (wait, now it's $5 million) to help shovel out from the storm in texas, and she flew to Houston to volunteer at a food bank. She's not from here, she's not responsible for this part of the country, but she showed up and did the job. Even Beta O'Rourke demonstrated competence (which is a first: he was in the House like AOC but ran for the senate instead of re-election, losing, then ran for president and lost, and no longer holds elected office). Meanwhile, Ted Cruz has become a meme and Texas' other senator The Asshole John Cornyn is missing in action. The best theory is nobody recognized him on _his_ flight out of the country.

Here's a good article with an analogy comparing the texas energy failure to the 2008 mortgage crisis as covered in the movie "The Big Short". It's the same late-stage-capitalism "optimizing" an increasingly brittle system to the point of collapse, because efficiency and resiliency trade off like security and usability do, and every libertarian plan ever turns into a nightmare when anything goes wrong. (The knee-jerk GOP/billionaire reaction is to scapegoat anything and everything you already don't like. That's what stokes most of the racism in the country, toadies blaming the ills caused by billionaires on brown people and immigrants.)

Faceboot's founder Mark Zuckerberg personally intervened to keep Alex Jones, founder of infowars, on the platform. He overrode employees who had already banned him, and changed the platform's policies to allow more violent extremism ahead of the January 6 capitol insurrection.

Boomer Media is "both sides matter"-ing itself off a cliff. This stuff is easy to counter but Boomer Media doesn't want to.

The most useful thing Biden might actually do is fix the justice department to prosecute the GOP using the existing laws they've already broken. (Alas, pointing out their hypocrisy does nothing for Boomers who haven't absorbed any new information since 1999.) The most useful thing Biden COULD do would be basic income but he's too old to believe it possible.

We need to double the IRS's budget and have the new staff focus exclusively on the top 1%, who owe more money than the 99% but are audited far less.


February 20, 2021

Made it out to the table tonight! Woo! Only stayed for about 2 hours, but I made some good progress on the "echo a1234b | grep -o '[0-9]*'" issue where zero length matches behave differently in -o than in non-o contexts.

I first went down a whole rathole of trying to teach regexec0() to filter out zero length matches, but that broke the grep '' empty pattern acts like .* tests, and I looked at special casing THAT but eventually figured out that "echo abc | grep '[0-9]*'" also matches: a zero length match is a match, and if you don't care what RANGE matched...

So what needs to change is the -o logic, recognizing a zero length match and advancing past it. I.E. rip out all the changes made so far and add stuff down in the "dealing with matches" section.

It's about a 4 mile round trip walk from my house to the table, and I am SO out of shape after a mostly sedentary week frozen in. (And several days of too cold to go out before that.)


February 19, 2021

Finally warm enough to decently melt stuff today, and it's supposed to stay above freezing for the forseeable future. Dunno when we get to drink the water again. (Also, trash pickup didn't happen today, but I can't say I'm surprised.)

Austin has a wood-burning power plant ("biomass") which was offline during the entire crisis because ERCOT hates it and has been trying to destroy it for years. You can't blame "renewables" if YOU'RE THE ONE WHO DISABLED THEM.

I do not understand the appeal of one of my state's senators even to his own base. I've voted against him every time I can, but they didn't fix the voting machines to produce a paper ballot until 2020, so none of the elections before that had any way to confirm the results. (Fascists always focus on voter suppression as their appeal narrows, which inevitably happens because none of their policies ever make anyone's life better. But all incumbent parties defend first past the post voting, which is fundamentally broken. The Boomercrats are Good Cop, doing a job that wouldn't exist without Bad Cop. Perpetuating the problem they claim to address.)

Over the lifetime of the Boomers, billionaires have stolen 47 trillion dollars from everyone else. When the Boomers Die, the GOP, late stage cappitalism, and billionaires all need to go down with them.

Speaking of historical relics past their sell-by date believing in the divine right of kings, Spain not only still has a monarchy it's disappearing critics of its monarchy. And oh look, Boomercrat Biden is caving to ICE, so the deportations may continue. (Yes, Ted Cruz is human garbage but Good Cop is still a cop. Bad Cop's real job is to drive you into the arms of Good Cop. Defund both.)

But at least the democrats have a tiny progressive wing that's pointing the Department of Fatherland Security at the nazis and will performatively fail to tax the billionares which is why to lobby for guillotines instead: your opening negotiating position should never be half measures, it should be the most extreme thing you're willing for a be-careful-what-you-wish-for monkey's paw to actually deliver. The existence of Billionaires racks up a continuous body count.

Yes I'm aware that "stock valuation" and "liquid assets" are not the same thing, and a controlling interest in a company like microsoft/amazon/faceboot comes with a dollar value that's not directly translatable into cash without losing control of the company or incurring a debt burden than results in a margin call if the stock price goes down temporarily. This stuff is complicated. It also kills people, and uprooting founders when their company outgrows them is almost as good as a sherman antitrust breakup. Steve Jobs left Apple to do Pixar (buying Industrial Light and Magic's discarded CGI arm after Tron flopped at the box office), and then almost became CEO of Disney (which involves appointed control, not owning a billion dollars of Disney stock). A publicly traded company does not need a dictator with a controlling interest rendering all other voting shares moot. Oh, and tax stock buybacks at twice the rate of dividends.

Speaking of Faceboot, its founder personally intervened to keep Alex Jones, founder of infowars, on the platform overriding employees who had already banned him and changing the platform's policies to allow more violent extremism.

As problematic as universal video surveilance is, it's used for punching up as often as punching down. Of course Powerful people try to distract from this fact, and leverage late stage capitalism to stop it.


February 18, 2021

The blizzard turning into a blackout is the fault of fossil fuel billionaires who are finger pointing like mad at green energy, I.E. lying (every accusation a confession). It was primarily natural gas that failed. (Yes it's an even numbered day but we're still under a "boil your water" advisory.)

MacOS is now the third most popular desktop, after ChromeOS.

Louis Rossman did a video about how he likes his dirt cheap $150 "moto g" android phone, and I still want a scratch device to install AOSP builds onto, so I thought I'd pull an aosp update to see if it's a supported target in vanilla, and... "repo update"? "repo upgrade"? "repo pull"? Nope, none of the above... sync. It's sync. (Every time, takes me MINUTES.)

[Several minutes later...] I have Google Fiber. How long does this update take? Ok, it's been months, but I have a GIGABIT FIBER CONNECTION and it's (finally) writing to an ssd instead of conventional hard drive. The download speeds are like 1.3 megabytes per second (times 4 because it's overlapping downloads, but still). Gigabit should be faster than the wireless connection and 802.11n's worst case config is still ballpark of 20 megabytes/second, why I am I getting less than _5_?)


February 17, 2021

The white male Boomer "Rush Limbaugh" died today. This makes today a good day by definition.

We needed some good news: here are informative threads on Texas' blizzard from an energy perspective and a freezing perspective. And in case you thought this was just a fluke instead of climate change, it's currently snowing in saudi arabia.

Late stage capitalism is circling the drain, but it will last as long as Boomer cognitive dissonance has the power to prop it up in a "beatings will continue until morale improves" way. Meanwhile the financial system is not ONLY entirely fictitious, it's also held together with string. (Guillotine the billionaires. And don't just defund the police (such as the ones in portland guarding a grocery store's dumpster from starving people), fire mayors who divert $300 million of covid money to police payroll.)

The survivalist preppers aren't handling the blizzard well. The sale of "survival buckets" mentined in those threads was pioneered by the televangelist Jim Bakker. I'm glad religion is slowly dying in the west, but the venn diagram of racism and misogyny and superstition and fascism is collapsing into a perfect circle. Every year texas and california fight to buy textbooks, and the rest of the country gets basically those ones due to economies of scale, and Texas is pumping its selections full of racism and editing out all mention of evolution in the name of religion. And any space dominated by white men is guarded by a moat of gatekeeping and harassment, not just historically but currently. Otherwise women and POC would work their way in and the imbalance would correct itself.


February 16, 2021

HEB is open today (noon to 5 the website says), but the line to get in stretches to the length of Hancock Center and then a block north along the sidewalk of Red River. (Fuzzy was willing to wait in it, I was not. She thinks she got mild frostbite in her feet doing so, but we have milk and a bread now; they were out of loaves but she got hamburger buns. The potato appears locally extinct, but we dug some flakes out of the back of the pantry and she made potato soup with that. Using fried deli ham in place of bacon; they were out.)

When the pandemic first hit I felt guilty for not using my time productively. Now mid-blizzard I feel again guilty for not using my time productively, but I'm kinda stressed by all this. It's stacking debuffs: the GOP broke the weather and Texas' electrical grid (back in the day Enron bribed the government to "deregulate" into a lucrative divide-and-conquer collapse, and now they're lying about it; our power hasn't gone out yet but COULD at any time, and so far the power outages are completely racist so I'm guilty about NOT having lost power yet, there are rumors of giant electrical bills coming for anything we do use)... The news is also making me feel very lucky that my pipes didn't burst. (We haven't lost power, the pipe that froze was the metal water main going into the house which is exposed for 6 inches in our concrete driveway with some half-assed foam insulation partially wrapped around 4 inches of it. Not exactly winterized. I took the heating pad back in but threw the old dog blanket over it and we've left a faucet dripping.)

I got a little work done. One of the google guys sent me some "df" command design suggestions disguised as patches, and I poked at that a bit. And a few days ago Elliott sent me a grep bug report I've diagnosed (-e '[0-9]*' produces zero length matches at every location that ISN'T between two numbers, including the first and last positions, and when combined with -o grep is not handling it right), and I need to finish that and check it in but I just haven't got the brain right now. People AROUND me are hurting, and the closest I can come to helping is staying out of the way.

I really really really really need to do $DAYJOB stuff but just can't focus enough at the moment. Toybox commands I already did the work and have a good mental model of, the GPS stuff is challenging exploratory signal processing stuff I don't quite know how to do and that takes brain. To quote the ever-quotable Seanan McGuire, "I cannot brain today, I has the dumb."

Watched a bit of Cells at Work with Fade and Fuzzy in the evening. Crunchandroll has obtained both Black and Season 2, but I only had the energy for 2 episodes and one of them was the 13th episode of season 1 that Netflix didn't have.


February 15, 2021

4 inches of snow in the driveway. The water pipe into the house froze. We ran an extension cord from the back yard out to the side of the house and stuck a heating pad on the water main going into the house, and threw two blankets over it, so maybe it'll thaw again before the sun goes down? Dunno. I should have left the water running but fell asleep instead. (One of those "let me nap for a couple hours after dinner... it's morning" things.) If nothing else I want to arrest the freezing before it makes it further along the pipe and maybe breaks something inside a wall.

HEB is closed today. So is Fiesta. As far as we can tell, NOTHING is open. We tried to stock up yesterday but they were closing as we got there and we had like 10 minutes and really long lines to get through, so we got a randomish assortment that did not include milk or bread or potatoes (all on the list, did not manage to grab them before the store closed). The website said they'd be open 12-5 today but that changed to shortly before it was scheduled to open and they just... didn't. Given the depth of snow around their loading dock, they wouldn't have been able to resupply anyway.

When faced with bald faced lies, modern journalists' pathological need to be two-faced (good people on both sides) results in contradictions like showing that wind turbines were producing 3200kwh when they were forecast to produce 2000 so COULDN'T be the culprit in power outages, and then end the piece with "balancing supply and demand on the grid has always been a challenge and prone to failure at times of extreme heat and cold. While the variability of renewable supplies will undoubtedly increase the challenge..." because you can't call out a lie, you have to support whatever both sides said.

The reason we can't fix this yet is Boomercrats and Boomer Media aren't dying fast enough. The Boomers are still driving and have stopped accepting anything new.

The continued existence of Boomers has splash damage everywhere. We can totally afford basic income, only the continued existence of billionaires prevents it. The easy fix to real estate hoarding by airbnb slumlords is to increase property taxes tenfold and then have "primary residence" rebates down to the old tax rate. (This is also incentive to keep rental units rented: then it's somebody's primary residence.) And David Graeber warned that ever-growing university "administration" (bureucracy) was crowding out the actual teaching staff, but here's an article on how university endowments are making that problem even worse, to the point they're firing lunch ladies and janitors to pay for more bureaucrats. And every day there's a new reason to defund the police.

Now that everybody knows what a sexist white man Joss Whedon was, they're talking about how horrible Rick Berman was and the damage he did to star trek.


February 14, 2021

For days now it's been too cold for my nightly walk to the table outside the UT geology building, and tonight we expect precipitation on top of that, which may not melt until SATURDAY. We already HAD snow January 10th, I have pictures in my phone of the snowman Fuzzy made in the backyard. Significant show twice in one year is historically Not A Thing in Texas, and they're saying we could get 8 inches tonight!

I'm trying to get some programming done anyway, but the cats are still clingy. I miss the booth at wendy's, the table at HEB, the sort of bar thing at junk-in-a-box, McDonalds, In-n-out, whatever the plural of "starbucks" is (starbii?), that bubble tea place next to the Mueller drafthouse, the ability to go INSIDE various UT buildings, libraries...

What I have is a kitchen table with cats. Multiple cats. If I get into anything like a zone, I get a demanding cat pulling me out of it. (They want to be held, and failing that on my keyboard.)


February 13, 2021

I miss the polar vortex.

Earlier today google thought tonight's low would be 29 degrees, but it's currently 27 degrees outside. Tomorrow it expects 13 and monday _8_. The expected low doesn't get back above freezing until next saturday, and the expected _high_ isn't above freezing until wednesday, and that's just 37 degrees. (Yeah yeah, Freedom Units. In metric everything but that last one is negative numbers.)

The Polar Vortex was a weather phenomenon that kept the cold contained up near the poles, where the intensity froze glaciers out of salt water despite salt usually melting ice. Freezing despite salt requires temperatures of ten or lower in Freedom Units, and growing LOTS of ice on salt water requires as much cold as you can focus up there: the south pole is over land but the north pole is on ocean. The ice sheet would melt again a bit over the summer because the sun would stay up 24/7 the same way it stays down 24/7 in winter, but as long as it got enough cold in winter to build back up everything would stay frozen over the summer.

But somewhere around 2014 global warming cracked the polar vortex, and all that cold started leaking out DOWN HERE rather than staying up there where it's supposed to be. The freezer door is open and the ice cubes are melting, and sure there's a bit of a draft in the rest of the room but none of the cold down here is going to keep anything frozen past march. Last year minnesota got up into the 80's in novemember, and the temperature is whiplashing all over the place which is where violent storms come from. We're having spontaneous hurricanes in the midwest now, and that's not just the new normal: it's going to get worse.

Meanwhile, the Boomercrats self-defeat at the impeachment trial. The Tories have gone full eugenics without pretext, the USA is still built on racism, and we need to defund the police. And for a combo bonus: late stage capitalism intellectual property law used to automate algorithmic police brutality video takedowns. (This is why you zero the budget. Not reduce, not reform. Clean slate.)

It's nice that the progressives are making an attempt to fix things, but I 100% expect the Boomercrats to fumble it until they're dead. After all, they preserved the filibuster and haven't managed to replace the head of the post office.

Oh look, this excellent thread explaining why to guillotine the billionaires starts with a picture of a guillotine in the first tweet. (You guillotine them because they've made it very clear that social change will only happen over their dead bodies.)


February 12, 2021

Here's how to uninstall some of the microsoft spyware the raspberry pi foundation added to the official PI operating system images. (They made the PI images dial out to microsoft servers every time you install something so they can track every package you've installed, which also lets microsoft's servers replace any package in a raspberry pi by adding a "newer" version of the package to their repositories, AND it installs binary only packages onto the system. The PI foundation is not actually that interested in open source, they just found Linux useful because it's cheap and runs well on low-end hardware.)

I'm getting a bit overwhelmed with toybox todo items coming in from github and the mailing list and the google guys. I need to be doing GPS stuff and I'm not getting it done...


February 11, 2021

The Boomercrats could eliminate the fillibuster at will, they just don't want to. (tl;dr: if they don't file cloture motions then septuagenarians have to stand and talk 24/7 until they drop, like in Mr. Smith Goes to Washington. Make them do it.)

The hollywood blacklists of the McCarthy era started as racist union-busting exercises driven by Walt Disney and Ronald Reagan. As always, follow the money back to rich white men lining their own pockets with blood.

Capitalism's suckage is increasing. The CEO of gofundme just took out a full page op-ed in USA Today calling the flood of fundraisers for bills and groceries on his platform a "national emergency". BS jobs are a result of the puritan work ethic, but capitalism creates scarcity in general. That's why Biden's vaccine program is so terrible, plus the people administering it are racist. (An opened vial of the MRNA stuff expires in 6 hours, a nurse opened a new vial at the end of a scheduled vaccination event and the doctor had to find 10 more people to give the rest to by midnight. He mostly knew other immigrants from Pakistan and was fired for "lack of equity" in his selections (I.E. too many Indians), and explicitly told he should have wasted the doses instead. The people who told him that should be fired.)

The GOP continues to be monsters (and one of my state's senators somehow managed to get even dumber), but the Boomercrats are Good Cop to their Bad Cop, enabling them. (Good Cop will not prevent any of this. Stop donating to the DNCC, start donating to Stacey Abrams.) Fascists are fundamentally people who fear change, but change is inevitable which is why they historically always lose, but only AFTER leaving a trail of destruction with concentration camps and kids in cages. Even their actions with a lower body count, such as the GOP in Georgia creating a state board to strip girls naked and examine their genitals for permission to participate in sports, are NOT GOOD THINGS TO DO.

It's long past time to defund the police. (And defund the Defense Intelligence Agency while we're at it.)

I vaguely recall (podcast?) Joss Whedon doing some sort of "mea culpa taking a time out" thing years ago, back when me-too winged him, and we've known for a while that his "feminism" consisted of constructing a work environment where he was surrounded by young women whom he had power over, but apparently he's even more of an asshole than was known at the time.


February 10, 2021

A few months ago Jeff was talking about how all the chip fab space is booked and backlogged, and now it's hit the auto industry. That site's follow-up article blames telecommuting and home entertainment, but ultimately it all traces back to the pandemic.

I've had writer's block on the GPS stuff, which you wouldn't think would be an issue but I've reached the point where I need to start comparing a bunch of candidate signals against each other, and my metrics for comparison are too hand-wavy for me to mentally put weight on them. Every time I sit down to code the Wrong Thing I'm expecting to produce lists of numbers sorted in an order that doesn't MEAN anything, and the purpose of the sorting is to discard all but the top few candidates.

Gold codes are special pseudo-random number generators easily implemented in hardware, which are based on polynomials selected to have certain characteristics. Basically you start with a register set to all 1 bits and you use a mask value to xor and shift it to get a new bit, and you do that repeatedly until it cycles back to all 1's in some "power of 2 minus 1" period. An "order 7" polynomial has a period of (1<<7)-1 I.E. 127, order 9 is 511, order 10 is 1023 (which is what GPS uses), and so on. Basically it's:

int gg_bit(unsigned gg, unsigned poly)
{
  unsigned x = 0, g = gg;

  while ((poly >>= 1)) {
    x ^= g&poly&1;
    g >>= 1;
  }

  return (gg<<1)|g;
}

The hardware doesn't need the loop, the new bottom bit is just a parity check on "gg&poly": 1 if an odd number of bits were set, 0 otherwise. But the PDP-11 didn't have an assembly instruction to do that, so there's no C operator for it, so we calculate it the hard way. (The above code leaves garbage in high bits; either mask them off or ignore them.)

So if you start with binary "1111111111" and use either of the (octal) poly values 2011 or 3515 (those are the two values GPS uses), after 1023 numbers the bottom 10 bits cycle back to being all 1 again and the cycle repeats. If you look at just the bottom bit, you get a sequence of 1023 bits which is guaranteed to start with a 0 (otherwise it wouldn't vary at all, so your poly must have an even number of bits set) and guaranteed to end with a run of ten 1s (to reset it back to where it started). This means we're using an "order 10" polynomial (and yes you can find both of those in the petersen table linked above, and bit 1<<11 being set makes it an order 10 table with the bottom bit of each poly always being zero and that's why the above is shifting one to the right before using it; I dunno why the math guys did that).

Then to get a proper Gold Code, you use two of these PRNG sequences with different polynomials, and XOR them together at an offset from each other. This produces a repeating bit sequence with the same length as its constituent PRNG algorithms, but is even more random. (Among other things, taking out that guaranteed 0 at the start and run of 1's at the end, it's xored against some part of the middle of the other one. The smallest offset GPS uses for an actual satellite is "5")

The way "spread spectrum" signaling works is you have a high frequency signal which you XOR with a repeating bit pattern (instead of a normal sine wave the radio signal "bounces" off the Y axis at zero when it toggles between 0 and 1 in the pattern). If you know the bit pattern, and you can line it up exactly in your receiver (either using atomic clocks and speed-of-light signal propogation delay math based on knowing where you are and where the sattelite is at all times because you have a mathematical model of its orbit and your position in polar coordinates... or you just do a brute force search, possibly via fourier transform), you can XOR the original signal back out with the same pattern like a key (this is called "correlation"), and a very weak signal becomes readable because the random (thermal) interference doesn't have that pattern. Even though the thermal noise is MUCH louder than the signal, when you invert half the samples a truly random signal will cancel itself out and each of our signals makes a tiny delta against that (when I'm looking for a 1 the signal is slightly higher, when I'm looking for a 0 the signal is slightly lower), and you add those up to get a strength indicator, I.E. consistent deviation from 0. You're looking for a tiny delta from truly random and adding it up over time.

To transmit data this way, you invert the whole cycle when you're sending a 1, so your delta from "zero" signal strength (actually 50% because random bits in the thermal noise should be set exactly half the time) in the correlated signal is either positive or negative. Except all this can still get drowned out by ground based radio thermal noise (which is VERY loud in comparison, and bits are very short so a single "pop" or "snap" from a static electrical discharge in the next room can easily obliterate one), so you repeat everything at multiple levels. The high frequency signal (like a couple gigahertz) only toggles every X waveforms, and then you repeat each correlated bit multiple times in a row. (And then WE plan to layer error correcting codes on top of it.)

It's called "spread spectrum" because taking a high frequency signal and switching it rapidly makes it look like a lower frequency signal. (This is how headphones produce bass notes, and how digital audio playback works in general: you sample at a very high speed and the result makes lower speed waveforms.) If you're switching sufficiently randomly you're essentially broadcasting old analog-style TV static or tape hiss and there's no significant interference at any one frequency. We want this, because we don't want satellites interfering with each other. (The ones with big expensive yagi antennas and kilowatts of broadcasting power broadcasting on an assigned frequency with carefully aligned antennas get pissed with dollar signs and lawyers behind them if you interfere with their signals. At the VERY least you'll never be allowed to launch another satellite.)

Another advantage is every satellite can be broadcasting on the same frequency and they all look like noise to each other, noise that is SO MUCH weaker than natural background static you can have lots of sattelites on the same band and they don't care. You pick out the signal you're interested in by correlating to it and letting the tiny deviations from randomness add up over time according to the very specific pattern you're looking for.

The GPS correlators run at 1.023 mhz (so each full 1023 bit cycle of the correlators takes exactly 1 millisecond). The GPS signal broadcasts at 1575.42 mhz, and 1575.42/1.023 = 1540 wavelengths of the ~1.5 ghz signal get emitted before toggling to the next correlator bit. Then each 1 millisecond long correlator cycle is repeated verbatim 20 times before toggling to the next bit of the encoded GPS signal, for a bit rate of 50 bits per second.

Fifty bits per second is pretty slow, but we have several knobs to twiddle to speed it up:

  1. What frequency are we transmitting (shift up from 1.5 ghz to ~2 ghz)

  2. How many wavelengths of the raw signal before we advance the correlator (1540 is pretty conservative, but it was 1960's technology being put into high orbit)

  3. How many consecutive correlator cycles do you repeat for each bit: having at least 4 makes "acquisition" (finding the signal in the noise in the first place) a lot easier for multiple reasons

  4. How long is our correlator code's repeat period (order 7 = 127 bits, order 9 = 511 bits, order 11 = 2047 bits)

This is before getting into more modern signal processing techniques where instead of a one dimensional plus-or-minus signal we decode a 2 dimensional sort of chessboard, but that's out of scope for now. Europe's Galilelo GPS constellation does that, as do modern wireless routers, and I _THINK_ the patents have now all expired but we haven't done that research yet...

The longer your correlator pattern is the more it helps the signal emerge from the noise, but some other math result Jeff dug up in his research says that even numbered polynomials have no real advantages over the odd numbered one below them when it comes to signal strength (for math reasons, ask him), so right now I'm looking at order 7, order 9, and order 11 polynomials. And the difference between an order 9 pattern and just repeating an order 7 pattern 4 times (same-ish number of bits!) is "better randomness".

The FIRST thing to do with each polynomial output is check that it's balanced, I.E. has the same number of zeroes and ones. (If it doesn't, throw it out.) The next thing is check the runs of zeroes and ones for randomness: in a truly random signal each bit has a 50% chance to flip so 2 adjacent bits will be the same half the time and different the other half of the time, 3 consecutive bits will have 4 runs of length 2 and 2 runs of length 3, and so on... except they never line up exactly and I dunno what's disqualifying? If there's a run of length 5, a run of length 6, and a run of length 7, is that better or worse than NOT having a run of lenght 6?

And this is where I start to get into writer's block. Jeff suggested running a fourier transform on it, which should produce a certain shape, but how do I test _that_ shape deviates "enough" from what's expected? Define "enough". I can easily come up with thousands of signal candidates, but am not comfortable making value judgements about them.


February 9, 2021

Oh hey, an update from the same Morgan Stanley analyst who gave that talk about self-driving cars back in 2017. Now he's saying the gasoline industry is a single digit number of years away from being "totally worthless". Meanwhile the rising prices of Palladium (now $2500/oz) and Rhodium ($20k/oz) has led to an epidemic of catalytic converter theft and rising prices for new fossil fuel cars (car markers are estimated to spend $40 billion on those two metals this year). Meanwhile lithium costs a little under $10/kg and an electric car has about 22kg of lithium in it, so that's $220 of metal. (That's after the price tripled over the past 5 years due to demand, which has led to And there's a whole lot of work going on to expand the supply.)

Twitter continues to suck at being twitter, but Faceboot is an "extremism amplifier" and one of the main reasons for the growth in right-wing loons in the USA.

Police are now using intellectual property law to take down videos of themselves posted on social media. (Intellectual property law is part of late stage capitalism, it cannot outlive the Boomers. Attribution is not ownership, and neither translate directly to support for artists creating. Tying funding to output is itself a source of stress, and the enemy is not piracy but obscurity.)

Of course republicans lie with statistics. They lie with everything. Reality has a well known liberal bias.

Years ago I wrote about how malaria gave rise to african slavery in the united states. Here's an article about how malaria in the USA ended. (The same Greatest Generation that knocked out smallpox did in malaria, and almost took out the bald eagle as collateral damage, by spraying massive amounts of DDT on the mosquitoes). And today I learned that the oklahoma panhandle is land Texas gave up so it could remain a slave state under the Missouri Compromise, which is also why it broke away from mexico in the first place.

Generation Jones has been screwed over by the Boomers, but lots of outlets still haven't learned to distinguish them yet.

Means testing still sucks.


February 8, 2021

I got poked about 0BSD today, although the result seems to be to leave it as is. David Graeber's observation that most work is maintenance (you make a cup once but wash it 1000 times) remains true.

I started to reply to somebody saying "Good to know" about free(0) and close(-1) both being defined as NOPs by posix, but decided it didn't belong on the mailing list, so here:

The free(NULL) thing is explicit in posix: "If ptr is a null pointer, no action shall occur."

But close(-1) being a NOP is implicit: it's reality but requires reading between the lines. The basic story is if the argument isn't an open file descriptor it returns EBADF (a harmless error) and open() returns -1 as its error value so that can never be a valid open file descriptor.

The problem is a literal reading of posix implies that the first file descriptor allocated should be -2147483649 because that's the "lowest numbered" value of type int, which MUST be signed to represent -1 and posix never said "positive" in "file descriptor allocation".

But even then -1 itself should be off limits because it has a defined value as the error return for open() (although pipe() could technically return it in its fildes[] array without violating what posix says). I'm aware of one other negative value in active use in Linux: -100 is AT_FDCWD to tell openat() and friends to use the current directory (which is again signalling, not an allocation return)

Practically speaking the file descriptor has always been an array index into the process's file table because it's about as hot as hot paths get, but "implementation detail everybody does" is not a standard. And posix ACTS like it means "lowest positive number" when it defines stdin as 0, stdout as 1, and stderr as 2 in the STDIN_FILENO and friends constants, so you can IMPLY that the next opened file descriptor should be 3, but posix doesn't actually _say_ it. As far as I can tell a "posix compliant yet horrible" implementation technically COULD return negative file descriptors, even though none historically ever have and unix is 52 years old now.

No I'm not poking the committee about it because Jorg Schilling isn't dead yet.) The historical reason posix is swiss cheese (to the point you can't BOOT a posix-only system because it doesn't mention mount or init) was so Windows NT and OS/360 could be be sold to the US federal government back when NIST FIPS 151-2 required posix compliance as a prerequisite for selling computers through the federal procurement process. Rather than fix their products IBM and Microsoft went for regulatory capture and punched holes in Posix big enough to drive a truck through. The result is that posix saying you _can_ do something might be meaningful, but posix failing to mention something means NOTHING. Posix is as "part of this complete breakfast" as the bowls of breakfast cereal surrounded by defensive rings of bacon, toast, juice, fruit, mashed potatoes, and an entire ham in the old saturday morning cartoon commercials to be able to legally call the net result food.

It's a pity that Red Hat similarly paid off the Linux Foundation to require RPM in the LSB until Ubuntu and Debian washed their hands of it, thus destroying the Linux Standard Base. It would be nice if there WAS a good linux standard out there, but bureaucracy begat cluelessness begat indifference and thus ended the LSB, and file /etc/os-release has replaced the "lsb_release -a" command, and the world moves on...


February 7, 2021

Today I learned about the Great Male Renunciation where jacobins during the french revolution declared it unmanly to wear bright colors or decoration (leaving women to inherit french court fashion like high heels, lace, and jewelry), and that men instead had to dress like monks, which suited the USA just fine since we'd been founded by religious loons who would go murderous at the drop of a hat. (White Men have always been trash, being one just lets me say that with authority.)

Microsoft continues to attack Linux, now using their "embrace/extend/extinguish" playbook such as when they switched from "the Microsoft Network will replace/destroy the internet" to using Internet Explorer to lock as many web pages as possible into microsoft proprietary data formats. The Raspiban idiots who fell for it in the raspberry pi are violating GPDR while they're at it.

Twitter hasn't emailed me about re-suspending the account for finding yet another "guillotine the billionaires' tweet all week, and yet they've barely scratched the surface. (I mean come on, those are visible in the backscroll when you look at the account. You're not even TRYING.)

Capitalism and Billionaires continue to suck. Most things should be easier to fix once the Boomers die, but in the meantime capitalism prevents a lot of kinds of creativity from scaling.

One hundred and forty of the DC police officers ordered not to stop the capital insurrection were injured by the maga rioters. Being police isn't even good for the police.


February 6, 2021

Today I learned about "gradual typing" and am still suppressing my gag reflex. (PICK ONE!)

I got poked about a patch from 2017. Ummm... ok?

I'm trying to buy a spare sd card so I can mail a turtle board to australia (not gonna send him an untested board in who knows what config state) and it turns out to be tricksy with the pandemic. I thought HEB carried them, but no. The kiosk in Fiesta that did closed. My sleep schedule is not lining up well with a trip to Best Buy right now, and mail ordering it seems silly...

Toysh! I haven't quite opened the line editing can of worms yet, but I did a quick experiment in bash to see what would happen if I typed a line of text and then resized the screen horizontally, and it does redraw the line every time the screen expands or contracts horizontally, but when the resulting number of lines decreases it cursors up one, so if you shrink and then expand multiple times the line gradually walks up the screen. And SOMETIMES (I think it has to do with contracting quickly and triggering the behavior another time while it's redrawing) it walks down the screen when it wraps to 2 lines, so I have repeats of the line smeared up and down the text window.

HOW AM I THE ONLY PERSON TESTING THIS?


February 5, 2021

Good quick read "Censorship as a tool that gives power to absuers" about how the Boomer pearl-clutching is just another misogynist way of keeping women "in their place".

Once again, the onion merely documents reality.

Week two of the Biden administration and democratic senators are already trying to destroy the internet. Please do not allow Boomers or people elected by Boomers near the Series of Tubes, they SUCK at it. (Honestly, under Amy Klobuchar's bill section 230 protections wouldn't apply to AO3, the Internet Archive, and Wikipedia. Those nonprofits do fundraisers, that means they accept payment to make speech available. I pay an ISP to host my personal website, who would this NOT hit?)

We still need to defund the police, and oh look more GOP campaign finance fraud. Speaking of which, it looks like Putin is now eliminating witnesses to his poisoning of Nalvany. (Putin is Joe Biden's age and has been making preparations for retirement, but Putin's riding a tiger he can't easily get off of...)

People keep joking about millennials killing stuff, but the reality is still Boomers destroying everything.

Sometimes algorithmic discrimination _is_ explicit, as in the case of TikTok presumably using discrimination against "poor and ugly" people to distract from the fact it's a chinese propaganda app.


February 4, 2021

Yay, $DAYJOB paid the moneys again! Both Neil Gaiman and John Rogers (creator of Leverage) have said that every job they took just for the money was a mistake, and while I agree it would be nice to be able to not worry about money living paycheck to paycheck is stressful. There should be a happy medium between "work from home doing what I love and wondering if I can pay the mortgage on time" and "live in an efficiency apartment in a city I'd never previously set foot in working in a cubicle for a company that just moved its headquarters to Dublin to avoid taxes" which literally pays 4x as much. (Yeah, my fault for buying a large house back under different employment circumstances. Thought I could have kids. Didn't work out.)

I need to circle back around to poking at the hello world kernel for j-core that Rich made recently, because I've been looking for something like that for years, and once did a writeup about why... (I've written so much stuff over the years that's not properly collated. Shouting into the void, you have to repeat the same thing dozens of times for anyone other than you to have even heard of it. Yes, that writeupu is a decade old, and I've repeatedly poked at it over the years. Never did get the ppc one working with qemu, but this one doesn't have the linker script the arm one did. Of course the NEXT logical thing to do is build a rom image for the j2 bitstream out of this which does NOT need the bare metal ELF compiler but can work with the same compiler that builds literally everything else, but Jeff objects strenuously to this for hardware engineer cultural reasons. The main difference between the two toolchains is the presence/absence of the _ prefix on symbol names, which propagates through to libgcc.a and you'd THINK you could fix this with multilib but the ELF toolchain build ends with an error, which is very much "this is not a real toolchain" to me... sigh.)

In toysh, right now do_source() automatically creates a new fcall context, which is a problem for eval wanting to use the $* from the parent context. Hmmm, I could remove TT.LINENO global variable and use TT.ff->LINENO, but there are two $LINENO contexts: parse context and runtime context. (Ala "$PS1 can prompt for the next line we haven't even run yet" and "we did a function call so it's a historical line number".

This is kind of similar to the global/local variable issue where what I really need is an "always there" TT.ff last entry. (Which points it back to being a doubly linked list, except it would want to be in reverse order which I still haven't got functions for...)

Oh great:

$ bash -c 'x=2; a() { local x=1; echo $x; unset x; echo $x;}; a; echo $x'
1

2

I need to support WHITEOUTS for local variables. Seriously? It's not just a stack it's outright UNION MOUNT semantics?

Ok, sometimes do_source() needs to reset LINENO and $*, and sometimes it doesn't, so when? Can the "name" argument signal it? Time to audit the callers: do_source() is called by run_subshell(), subshell_setup() (twice), sh_main(), eval_main(), and source_main(). And run_subshell(str, len) is called by pipe_subshell() and shexec() and run_lines(): run_subshell() does the fork() and returns pid, -1 for error, and 0 in the special case that we're called from the pipeline plumbing and need the child process to continue with the currently parsed pipeline data... shexec() is called by sh_exec() which is called from run_command() and from exec_main()...

I need to draw diagrams.


February 3, 2021

I hope Biden's bill to fix the post office doesn't get fillibustered, and it's good he's finally releasing the funds that were allocated to help Puerto Rico recover from hurricane Maria in 2017.

Republicans think the nanny state needs to take decisions away from citizens for their own good. That's what they think about drugs, what they think about abortion, why they do voter suppression and gerrymandering, why they need endless police and to imprison more of the population than any other country... Once again, every accusation a confession. (We still need to abolish ICE.) You don't have to dig too deep to find contradictions in any GOP policy, because they're hypocrites to the bone. Some of the GOP's go-to tricks are "blaming the victim" and "shooting the messenger", from Greta Thunberg to David Hogg.

If you don't think the GOP are monsters, ponder the case of a 16 year old girl who was sex trafficed, her seller murdered her buyer, and the DA wants to try her as an adult as an accessory to the murder. All those right wing loons who insist pizza shops must have hillary's sex dungeon in their nonexistent basement turn out to be on the wrong side of the real issues. (And of course that district attourney's bio mentions the church he attends.)

A big part of defunding the police is cycling out all the current officers, because they're not on our side. People keep quoting "a few bad apples" without finishing the proverb, "spoil the bunch". The rot spreads, unpunished bad drives out the good and you eventually have to start over. Give them pensions with the condition of never working in law enforcement again (from mercenary work to mall cops).

AOC recently recounted hiding from the GOP's capitol mob on January 6th, including from an angry white male police officer yelling "Where is she?" because she didn't know whose side he was on. AOC also mentioned she was sexually abused, but that's a bit like asking if a black person has ever been harassed by cops. Our society is deeply broken in many ways and every thanksgiving we celebrate how this country was founded by religious loons fleeing the wild licentiousness of england by settling land that european plagues had recently depopulated (as if Ghengis Kahn had arrived in europe right after the black death) and then the settlers murdered the remaining natives to take the rest of their land, erased their cultures, and continued to hound the survivors for centuries and continuing to this day, plus they imported a bunch more people to be explicitly racist at.

Capitalism continues to suck and we need to transition off it. (The next time amazon recruiters email me, I have fresh links to throw at them.) Our other religion (christianity) isn't doing any better.

We know exactly how to fix boomer media but step 1 is for Boomers to stop running it or being the target audience.

Tolerance of intolerance doesn't work, fascists must be punched for the same reason the immune system kills cancer cells.


February 2, 2021

There are currently 3 context stacks: one for "source" statements (resetting $LINENO), one for runtime function calls (call stack, can't be recursive because nests arbitrarily deep), and one for parse-time function assembly (which constantly drains when we're not saving a function; we only retain previously executed lines when we need to; command line history is seprate because that's raw input, not parsed structs).

I'm shuffling all this stuff to let actual shell function() calls work, and am restructuring a lot of previous assumptions as I go, mostly expressed as debugging to find a contradiction and then large structural changes falling out from that. I recently moved arg/shift/delete from source stack into function call stack, and need to move the variable list into the function call stack as well...

It's hard to do this in bite sized chunks with regression test checkpoints. After the most recent round of changes "eval" was segfaulting, and that's because eval calls do_source() which is the function that parses command text into structures from a FILE * (in this case a memopen). Calling "source" resets the argv[] list for $1 and shift and so on which means it adds a struct sh_fcall to the function call stack because that's where that lives. And when do_source does that it's using toys.optargs and toys.optc to initialize the struct sh_arg, but eval is a nofork command with a NULL optarg string so its arguments are in toys.argv instead with toys.optargs left NULL, and that's why the segfault when expanding $* with a null pointer in TT.ff->arg.v.

It's actually more complicated than that because eval reuses the $* expand plumbing to turn its arguments into one big string to feed to do_source(), so I need to feed it toys.argv as arguments, call expand_one_arg("$*"), and then put the previous arguments BACK so when I do_source() the resulting string any $1 and such that eval executes run in the right context. (I need to add a test for this, by the way: sh -c 'eval echo $*' one two three.) But that just means creating an fcall() and then popping it again right after, I've already got the plumbing for that (the struct sh_fcall stack in TT.ff).

But all this highlights the fact that the three contexts back at the start have different lifetime rules: the function list is basically like the variable list: you assign things into it with names but parsing a function() statement isn't necessarily an assignment because functions live inside blocks (if/else and while and such) which may delay or skip executing them, and they nest so a function can declare another function (each time it's called!). So a function being PARSED is not the same as the function being DECLARED which is not the same as the function being CALLED. And there's the three stacks.

I need to work out the storage lifetime for non-active functions which have been parsed but not yet declared (because we haven't executed the function() part of that if statement yet, or will re-execute it later because it's in a loop or other nested funciton call so it may get unset and reset multiple times and we may even have two functions swapping in with the same name... Inactive functions seemed like a fourth stack at first (simple command lines get parsed and then freed again immediately, how do you tangle persistent data within them that doesn't have the same lifetime as the current set of if/else blocks), but they're really an attribute of a pipeline segment roughly analogous to HERE documents. I already have an array of << EOF bodies that are addressed by index as we advance through parsing the command line, I can have an array of function bodies the same way, the question is what level they attach at and how to index them. And thinking about it, they may be an attribute of a pipeline segment, which means they're not indexed because there's just the one per segment, it's a "child" member.

And THAT means my current struct sh_function is combining two things that don't go together. It has three members: char *name, a pipeline segment list (I.E. the parsed function body), and struct double_list *expect which is basically the parsing version of sh_blockstack (which keyword to expect to end the current parsing block). The last two are used at parse time, the first two at runtime, and all they have in common is a pipeline list which is a single member of its own type. The two users are different instantiatons of this type in TT.functions which is the runtime active function list (declaring a function assigns an entry into this list, kicking the old entry with the same name if any), and struct sh_callstack TT.cc which is the source stack (and the only context in which the pipeline is self-emptying because everything is executed by default after each complete thought is read in, and goes away again if it didn't save data).

And the thing is, right now calls to do_source() DO nest. In fact I have a function prototype in sh.c for do_source() despite most toybox commands avoiding function prototypes because do_source() calls run_command() which calls expand_arg() which can have a $(subshell) or <(subshell) in it which can call do_source() again, and I dunno how to break that loop other than with a function prototype. Calls to the "source" comand also recurse into do_source(), which means that IS an actual recursive function and might as well just keep the call stack in local variables. (And I should add a stack depth probe depth probe to do_source() similarly to the toy_exec_which() probe in main.c, because nommu. Admittedly if you "echo source sh.sh > sh.sh; bash sh.sh" right now bash segfaults, but I'm trying to do BETTER here...)

But if TT.LINENO moves to be a local variable in do_source and gets passed on as arguments it has to be passed all the way into do_prompt() which gets called from everywhere. Grrr. Runtime line number vs parse time line number, and do_prompt() is... sometimes showing both? PS1 and PS2 are parse time, PS3 (for select) is run time? Oh for... Do Not Want.

This is already WAY bigger than I want to check in as one commit, and the hole does not go through yet. Hmmm.


February 1, 2021

Happy birthday to me, and for my birthday I'm intentionally NOT paying very much attention to the rest of the world, and instead focusing on fun programming (I.E. toysh).

Sigh. Toybox is now a mature enough project that a consistent part of the work is handling bug reports from people who blame toybox for what the kernel is doing.

Oops, I checked in some notes-to-self in test.c (because Elliott wanted the [ symlink back because somebody tried to run "sudo [ blah ]" and it didn't work). And I thought "the easy thing to do is just implement those TODO items now". I was wrong (about it being easy).

The problem isn't that ~= and string compare < and > are ideas which came from my quick reading of the bash man page where [[ ]] apparently does that. The problem is that what bash does is... non-obvious?

First of all, it's not ~= it's =~ which makes NO sense when != is right there (along with <= and >=), but fine. Don't wanna stomp $((x~=4)) being an assignment I guess, despite [[ ]] and $(( )) being different contexts with different operators. And it's not recognized by the bash builtin "test" or "[" but only by "[[": again, fine (said through gritted teeth in a british accent). But then when you DO work out the syntax enough to actually try to use it:

$ [[ abcde =~ '[b-d]' ]]; echo $?
1
$ [[ abcde =~ '[f-x]' ]]; echo $?
1
$ [[ abcde =~ 'a[b-d]*e' ]]; echo $?
1
$ [[ abcde =~ 'a[b-d]*' ]]; echo $?
1
$ [[ abcde =~ 'abcde' ]]; echo $?
0
$ [[ abcde =~ 'abcdef' ]]; echo $?
1
$ [[ abcde =~ 'a[b-d]cde' ]]; echo $?
1
$ [[ abcde =~ 'a.cde' ]]; echo $?
1

It doesn't work? What actual regex syntax is this thing accepting? The only "true" in that entire mess is the LITERAL MATCH.

Wait:

$ [[ abcde =~ [b-d] ]]; echo $?
0
$ [[ [b-d] =~ '[b-d]' ]]; echo $?
0
$ [[ abcde =~ a[b-d]c ]]; echo $?
0
$ [[ abcde =~ a[b-d]d ]]; echo $?
1
$ [[ abcde =~ a[b-d]*e ]]; echo $?
0
$ [[ abcde =~ a[b-d]..e ]]; echo $?
0

Quoting a section makes it literal, not regex. Which means I can't easily hand it off to an external command like test.c that isn't quote aware (doesn't have access to the sh data structures or global block). And it's regex syntax (not glob) which I don't already have my own quote range aware implementation for.

Bash's implementation details keep floating to the surface. They use in-band signalling for everything, and they punish you for NOT using in-band signalling. Sigh. Have to think about this one. (I wrote my own regex implementation in my first job out of college, it's not that I CAN'T do it again, I just really don't want to? Hmmm...)


January 31, 2021

Can we put AOC in charge yet? She actually addresses the real issues. (But I will admit Kamala Harris is acting more like AOC than I expected.)

We now know that the Secretary of Defense ordered the DC national guard NOT to arrest the maggats invading the capitol on January 6th, and the orders are dated January 4. That's about as inside job as it gets. And of course the vast right-wing propaganda network (started by Rupert Murdoch and Roger Ailes and so on back in the 1970s, but these days metastasizing into factions) went all in on it too.

Meanwhile, fresh nazi protests are being ignored by police because the police are on the side of the fascists (which is why their budget needs to be zeroed out), and the Boomers continue to fail predictably.

Old fossil fuel wells continue to poison the environment after they're abandoned: methane is lighter than air, it leaks up on its own once you punch a hole in the mile or so of rock containing it. Old oil wells are the next generation of superfund sites, and the lawsuits going after the oil companies once the Boomers die are likely to make love canal look like spilled milk.

What's the intersection of impostor syndrome and bullshit jobs where you're absolutely terrible at your job and get all the business anyway because you have status and money? I mean, other than "white male"? (And the occasional white woman.) Arthur Anderson was like that during the 2008 mortgage crisis, Enron was like that under the Dubyah administration, Bernie Madoff scammed a bunch of rich white guys via affinity fraud, and 80% of mutual funds lose to the market averages (which means they grow slower than index funds that make literally zero investing decisions). The poor are essential workers, the rich have bullshit jobs.

"Privatization" of government work means some parasite is inserting gratuitous profit-skimming middle men into a process that doesn't need them. It's not because the government can't do it. The government ran the New Deal, fought World War II, and landed on the moon via competent federal agencies. The post office worked way better before it was semi-privatized. The IRS knows exactly how much tax you owe, Intuit and TurboTax and H&R Block insert themselves into the process to get paid to hand off data you already have to people who ALSO already have it. But quiet competence is not rewarded for the same reason that the vast last-minute effort to prevent Y2K from being a disaster made everybody think nothing would have happened if they DIDN'T do all that work.

"Algorithmic bias" is the modern version of racists inventing stupid snake oil metrics to look down on others with. It's older than phrenology.


January 30, 2021

I went down a rathole of redoing tests/file.test because the toysh "should I run this script" test that currently explicitly checks for an ELF file (to avoid spamming lots of binary nonsense out as syntax errors when you "sh -c /bin/ls" or similar) does NOT notice if you try a mach-o binary, or a jpeg, or...

I suspected "the first line is valid utf8" might be a good test because the ELF check is really noticing "the first character is high ascii but it does not produce a valid UTF8 sequence". And I went what ELSE is like that? (Yes, I've since noticed that 0x7f is NOT high ascii, it's one char below that, but this is what sent me down that path...)

So I looked at the file.c plumbing, and invalid utf8 on the first line would catch PNG, and Java class files, and jpeg starts with ff (which would be 8 byte utf-8 and the unicode loons capped it at 4), gzip, xz, bzip2, Mach-o, whatever "android sparse image data" is...

I really don't care about ogg because it's been ten years since I encountered one in the wild and that was the recordings of a Linux conference trying to make a point. The signature of "Android DTB" may actually BE valid utf8 (0xd7b7ab1e big endian has high bits 110 10 10 0 so congratulations, I think you scan at least for the length of the signature file.c is checking)...

But this test does NOT catch gif, tar, cpio, wav, bmp, zip, or truetype. (And, let's be honest, ELF.) But all those end the first line with a NULL byte which xgetline() isn't noticing because it automatically strips the null terminator. Hmmm... The thing is, even if I drop back to normal getline() and check length/terminator myself... you can go a megabyte without having a newline in one of these file formats. I kinda want to read a chunk then back UP to do the line stuff. Is that reliable here? It isn't when you source <(output) and I kinda want to support that. I only need to special case the first line, the question is how...

And neither test will catch ar archives, ala "libc.a", which goes through TWO newline terminated ascii text lines before going into binary stuff, the first of which is "!" which is almost valid shell syntax. And an android dex file (whatever that is) also starts with a valid newline terminated ascii line.

But anyway, I looked at tests/file.test to see what input it was feeding in for some of these file formats where "yes you check the first 4 bytes but is there a NULL after them?" and... it's only testing like half the file formats that file.c knows about (no ar, no cpio, no mach-o...), and isn't testing remotely all the options that file.c is checking for within those file types. So I started making a list...

What I SHOULD be poking at is toysh function body lifetime and how to store the parsed input lines, and untangling the multiple list contexts.

Ok, what I REALLY should be focusing on is GPS code for $DAYJOB, but I want to get this tied off and checked in. It's time to cut a release...


January 29, 2021

Dear Vox: we've BEEN in a "period of political violence" all our lives, it was just aimed at brown people until recently, whom police have been casually murdering in large numbers for centuries. (Cowboys vs indians, slave ships with an average 30% mortality rate, random racism against irish refugees from the potato famine, the chinese exclusion act, FDR's japanese internment camps...) Police protect the rich from the poor. As white supremacy collapses they're circling the wagons tighter and tighter with ever-fewer Boomers inside, and shooting randomly out into everyone else.

The Occupy Wall Street protests were mad that the 1% was screwing the 99% after the 2008 Mortgage crisis, but had no leverage to fix it. The Black Lives Matter protests are even more people mad about basically the same issues: billionaires are using faux news to dupe poor white men into replaying Pickett's Charge on behalf of modern day plantation owners, to distract from the billionaires stealing everything from everybody. Plutocrats have always used racism to divide and conquer by convincing poor white people that even poorer minorities are the "real threat" to distract them from the wealthy slumlords (payday lenders, dollar store owners, wage theft, medical debt...) actually screwing everyone over.

I'm really hoping this is an extinction burst, that the idea of "whiteness" dies out, that the GOP goes the way of the Whigs and Federalists before it, and the Evangelicals go the way of the Shakers. The GOP has reached the point that democracy literally cannot survive their continued existence. The GOP has eliminated any middle ground in being for or against them: remaining a bystander watching an assault take place in front of you makes you an accomplice, we're long past plausible deniability. That's not a survival strategy for plutocratic white patriarchy, that's a "last stand".

Unfortunately this is a generational shift, empowered by 2/3 of the Boomers going collectively senile. And despite the year+ reduction in US average livespan due to Coronavirus already, and accepting the Generation Jones hypothesis, the expiration date of 1954-vintage Boomers is still 10 years out. There's a lot of work to do between now and then.


January 28, 2021

Internet flash mobs recently discovered the centuries-old concept of the "short squeeze", and have been using it to beat money out of hedge funds like a pinata. This clearly struck a nerve and the billionaires fought back with blatant market manipulation. (As in you can sell but not buy these shares, and if you don't they'll take your shares from you.) This is why the guillotine was invented.

Boomer Media is handling it about as well as can be expected (and of course right wing loons are trying to copy or hijack it as always), but tonight AOC did an excellent twitch stream where one of her guests explained that "Robin Hood" is backed by one of the two hedge funds that bailed out the original target hedge fund, and that's why they did the "sell but not buy" thing, and sold people's stock for them without asking. (Stealing from the poor to give to the rich.)

At least there is some pushback against the billionaires. Whether or not they ultimately lose, finding a new way to fight back seems like a good thing. Occupy Wall Street was experimental, the BLM protests and organizing work Stacy Abrams did in Georgia built on that stuff. That's probably why the newly re-occupied wall street is trying so hard to nip this in the bud...


January 27, 2021

At least there's some pushback on the Boomer pearl-clutching sour grapes about sex still existing now that they're too old for anyone to desire them, but the situation still looks like "Boomers Die, then we scrub the world clean of their crazy".

The GOP remains irredeemable to the core, and Boomercrats are Good Cop enabling Bad Cop but both serve plutocracy. At least Good Cop minimally responds to sustained screaming in its ear, if only to keep up appearances, but it's not MUCH leverage and they backslide if you give them an instant to breathe... Speaking of plutocracy, here's a short but excellent thread about how Late Stage Capitalism is utterly artificial. And speaking of late stage capitalism being corrosive, both Teespring and Hipstercart have gone bad. (Not necessarily MyPillow or Bain Capital levels of bad, but at least Chick-Fil-A and Wal-mart levels of bad.)

We need to defund the police because being police is not even good for the police, and we can do so much better things with the money. In that last link, the City Council here in Austin used money cut from the police budget to buy a failing hotel to permanently house homeless people, and an ex-homeless woman who's since won a World Fantasy Award for her writing talks about the benefits of doing exactly this. Type "abandoned hotel" into youtube to see a zillion videos where urban explorers go into places that _could_ have housed the homeless, but didn't because cities instead paid racists to be utter dicks.

Remember the viking cosplay insurrectionist snowflake who was starving to death without "organic" food? Yeah, the whole "organic" movement is quack medical science from nazis all about "purity" and scaremongering, so of course he'd be into it. There's a behind the bastards podcast episode about this topic.


January 26, 2021

Fielding some toybox bug reports: good reproduction sequence for a netcat bug, and people are using getty out of pending. Sigh. If toybox was my day job I'd try to do a WAY better job of shovelling out the pending directory, but as is I just don't have the time/energy...

Meanwhile I can't build current qemu git because I need a newer python source, and I can't boot a current kernel on m68k until I get the new qemu with the workaround to the kernel regression, and I can't get python 4 or whatever it is until I upgrade devuan from "ascii" to "chihuaua" or whatever the next release is that's been out forever and I haven't dealt with. (Or am I two behind at this point? Nope, Ascii is "old stable" but still nominally maintained except chrome keeps complaining it's out of date with no update queued in apt-get, Beowulf is current stable, and Chimaera is "in development" and Ceres is "unstable", whatever the difference between those is.)

And to "apt-get dist-upgrade" I need to close rather a lot of open windows on 8 desktops. It's not the literally hundreds of chrome tabs in over a dozen chrome windows that's the problem (if I lose those, eh). It's that I have a lot of terminal windows open with a lot of tabs in them, and those tend to have tests I ran that should go in the toybox test suite (often multiple tests per window, in the backscroll), and others have todo items I left off in the middle of that should go into one of my zillion todo.txt files in various project directories.

I'm dinking at it, but it's slow going. There's several months of backlog since the last time I rebooted this laptop...


January 25, 2021

The Donner Party resorted to cannibalism because they ignored the food the native Washoe people left for them (rabbits and wild potatoes), and shot at the ones who tried to bring them a whole deer. White people are the authors of their own problems, and we tend to hold up self-inflicted idiocy like "remember the alamo" or "custer's last stand" as examples of virtue instead of monumental stupidity. We're totally doing it with climate change again as we speak, just like we did with the Dust Bowl a hundred years ago. White men and plutocracy and the pervasive legacy of racism they engender remain the real problem. Luckily that problem seems at least somewhat self-limiting, but the collateral damage is biblical.

The Boomers have turned into the most prudish generation since Queen Victoria, trying to outlaw sex now that they're done with it, and the Boomercrats are right on board with the GOP's desire to outlaw women being anything but silent compliant wives. As usual, Sarah Taber has a good thread on the issue.

The GOP keeps posting video of themselves committing crimes, which still isn't enough to get useless Boomer Media off the "both sides" fence.


January 24, 2021

Capitalism is officially killing humanity, not even from global warming but from declining birthrates. People in capitalist countries can't afford to have children, it's too expensive. One interesting idea for a tiny band-aid is applying "modern monetary theory" to child support by having the government pay child support directly and then collect from the parent after the fact.

MMT is based on the observation that since the government is where money comes from, the government literally CAN'T run out of money, and the point of taxes is merely to control inflation. The government disguises printing money as "borrowing", but it's borrowing from itself. Ever since we went off the gold standard in 1971 (under Richard Nixon) and switched to "fiat currency", the Treasury department has regularly "borrowed" money by issuing bonds (IOUs that pay interest) and selling them to the Federal Reserve, which is the organization that creates digital money in the banking system.

Treasury bonds sold to the Federal Reserve are bought with newly created digital money. When the Fed issues an EFT (Electronic Funds Transfer), it doesn't come FROM anywhere, the Fed is the origin point that inserts new money into the system. This is also what happens when banks borrow from the Fed's "overnight window": they're borrowing newly created money (via wire transfer), and promising to pay it back (with another wire transfer) at negligible 0.1% interest. The Fed is the one bank in the USA that never has to balance its books: it can add money to an account by just changing the numbers in its computer. And that is how money is printed today. (The supply of physical cash is irrelevant to the supply of MONEY. Newly manufactured paper bills and coins can be "bought" from the bureau of engraving and printing with this digital currency, but these days most money stays digital: neither direct deposit of paychecks nor electronic bill payments actually involves cash changing hands. Even if you write a check it's scanned and OCR-ed and turns into an electronic payment behind the scenes, and those digital dollars being transferred all originate at the Fed.)

The sleight-of-hand exchange "borrowing" from the Fed hides the fact that "creating money" is actually what's happening, but the end result is the government (through the Treasury department) now has newly created money it can spend, and this happens ALL THE TIME. It's called a Treasury "auction", where the Treasury offers the new bonds for sale theoretically to all bidders (this is a way for billionaires and corporations that don't trust banks to hold their money to park it somewhere "safer" than in a bank account), but any bonds that don't sell at auction always get bought by the fed: treasury bond offerings never have any leftover unsold bonds.

And no, the government doesn't ever have to let the interest rate go up if it doesn't want to, the Fed sets the interest rate by specifying what price it will buy Treasury bonds at in the auctions. If another bidder doesn't offer more than that amount at auction then nobody else can buy any bonds, the Fed gets them all. And paying more means you get a LOWER return: If a bond is worth $10000 in 10 years and the Fed is offering to buy it at $9900, you need to offer more than that to get it, and that means the $10/year average profit the Fed would get as "interest" is even less for you. (Not that the Fed really cares about the interest: they don't NEED money, they're where money comes from.)

Treasury bonds are a government IOU, but when the Fed buys them it's an IOU from the government to itself. To pay the currently 0.1% "interest" the government can always sell more bonds (to the Fed, if nobody else buys them). So the government can't run out of money, all it has to worry about is inflation, and Japan's spent 20 years trying to CREATE inflation... and failing. Inflation in the United States has been falling for 30 years despite the enormous federal bailouts after the 2008 mortgage crisis, the 2001 dot com crash, the 1991 savings and loan crisis... Yeah, capitalism collapses and needs a huge injection of newly-printed federal money each decade. The current round of bailouts are being blamed on Covid but to be honest we were overdue. It's always something, because the system is rotten. Late Stage Capitalism doesn't actually work, and needs to be constantly rescued, propped up, bailed out.

The idea behind basic income is A) bail out the 99% instead of the 1%, and B) do a constant drip-feed instead of having an existential crisis every 10 years. That's it. Other than that, it's what we're ALREADY DOING. After the 2008 mortgage crisis the Fed injected $29 trillion into the economy (as "quantitative easing" and so on) to prevent a collapse. Averaged out over the decade between regular economic collapses that's $3 trillion/year, divided by ~300 million people in the USA is $10k/year. There's your basic income, right there. Just give it to everybody instead of rich people and corporations.

The government doesn't have to come up with the money for it, they just have to tax enough AFTER THE FACT to keep inflation manageable. Since billionaires and corporations own more than half of all wealth already, they are who you would logically tax to drain any superfluous pools of idle money clogging up the system. I've previously done the math to show that while 80% of the population used to work growing food, less than 2% does now, and less than 15% of the total workforce actually does ANYTHING related to human survival (food, housing, medical care, teaching...) instead of "entertainment" (which people constantly do for themselves when they're not being sued over IP rights, from fanfic to youtube videos) or pointless bureaucratic/financial shenanigans. The University of Texas has 3721 faculty but 24,000 faculty and staff meaning it has 5 times as many bureaucrats as teachers, and it is not remotely unusual in this. (David Graeber's excellent book Bullshit Jobs went into this at some length, and he has another called "The Utopia of Rules" about bureaucracy specifically which I need to read.)

The spiraling inflation in zimbabwe or 1930's germany wasn't because of money printing, it was a supply shock. When there isn't enough to go around people scramble to meet their needs, otherwise they bargain hunt, save extra money, buy optional extras like maid service instead of suddenly wanting 3x as much mac-n-cheese, and spend money on things like pay-per-view movies that can't run out. (Capitalism is GOOD at inventing empty nonsense for people to spend money on.) When supply meets demand you have GROWTH, not inflation.

The 1970's "stagflation" in the USA took place during the first major Opec oil embargo and a global crop failure: there wasn't enough food or energy to go around, and people couldn't easily do without either. Plus we left the gold standard for fiat currency in 1971 (in RESPONSE to already-existing inflation) and it took a few years to work out how to properly use the new system. We haven't repeated those mistakes for a long time now because we figured out we don't NEED to. If you haven't got shortages of things for people to buy, and you have competition among producers who aren't extracting monopoly rents (by intentionally CREATING shortages as the only supplier of the thing, thereby "cornering the market"), you tend not to get much inflation. When you have shortages, you get inflation even when you don't add money to the system (because those who do have money outbid those who don't for the limited supply).

A controlled amount of inflation is good for normal people, not just as incentive to spend and keep money flowing and the economy ticking over, but because 2% annual inflation means that 2% of your mortgage and student loans are paid off every year simply because the old dollar amount is less money today. If you have $50k of student loans that's $1000 of the principal paid FOR you each year. (A hundred years ago $4000 would buy a house. Today, paying off $4000 of debt is not as hard as saving up to buy a house entirely in cash with no mortgage. Yes if the minimum wage isn't raised that's a separate problem, but even social security has an annual Cost of Living Adjustment and as stagnant as our minum wage is, it WAS raised in 2009 and is $15 already in a lot of jurisdictions.) The stagflation of the 1970's paid off half the mortgages on the Boomers' starter homes.

Rich people don't want any inflation at all because they're who money is owed TO. Creditors who are owed specific dollar amounts hate ANY inflation, which is why you hear so much hand wringing about inflation from rich people who own everybody else's debts. Rich people and corporations can buy very large megaphones and entire think tanks to trick people into thinking "what's good for GM is good for america" when it simply isn't true.

But deflation is as bad for an economy as running out of oil is for an internal combuston engine: if my money will be worth more tomorrow why would I spend it now? But if everybody stops spending at once the economy collapses (everybody's unemployed, no customers, unsold inventories pile up), and deflation turns out to be sticky: once you're in it it's hard to get out, just like the "zero lower bound" problem with interst rates a few years ago. The annual inflation rates for the first 5 years of the 1930's "Great Depression" were 0%, -2.3%, -9.0%, -9.9%, and -5.1%. The Fed has targeted 2% annual inflation to leave a little buffer so every little market hiccup doesn't immediately put us into deflation, except that turned out not be be enough. We eventually hit the zero lower bound and got stuck there anyway, and the people arguing for a higher (5%) annual inflation rate way back when were retroactively proven right.

Traditionally, controlling interest rates was how the Fed controlled inflation, because it let the fed add money to the system (by lowering rates) or drain money out of the economy (by raising rates) due to encouraging or discouraging borrowing (I.E. going into debt), because banks create money too every time they make a loan. If I have $1000 in my bank account, and the bank loans it out via somebody's credit card purchase, that money exists twice. (Or three times if you count the value of what the person bought and the payment the vendor received for it as well as the bank balance.) When the loan is paid back, the multiplier goes down. (And if I withdraw cash at the ATM which the bank doesn't have on hand, it borrows from the Fed overnight window mentioned above, except that's not a real issue these days, lax regulation and plutocracy allows big banks to more or less create money like the Fed does now.)

But after the 2008 crash the global economy got stuck at the "zero lower bound", were even an interest rate of zero wasn't enough to get money flowing again to dig us out of a demand limited liquidity crisis. They've even pushed some interest rates literally negative to try to raise inflation... and failed. Japan's been stuck at the zero lower bound 10 years longer than the rest of us, and still not quite out of it despite years of trying.

In the modern economy, when most people get extra money they're not buying things. They're paying student loans and credit cards, and a lucky few are saving for the next emergency (let alone retirement). With 1% of the population capturing 99% of the gains ever since Reagan, wages haven't gone up and people have been forced into debt to cover the gap. Billionaires love this because everyone else is indebted to them: unlike federal debt the government owes to itself, every dollar of private debt is owed TO somebody, and that's where billionaires come in. All that money everybody else has borrowed winds up in their pockets, as does the newly printed federal reserve money the treasury borrows so the government can spend it, billionaires suck that up too. But massive private debt and financial inequality is an incredibly unhealthy way to run an economy, which is why it keeps crashing.

PUBLIC debt is just money printing in disguise. Conflating public debt with private debt is a trick billionaires pull to keep the inequality going. Always enough money to bail out the rich, never enough money to bail out the poor, because without the poor desperate to dance for pennies the wealth of the rich is meaningless. Warren Buffett does not hire Bill Gates to wash his car.

Circling back around to "being able to afford to have kids", a National Health Service paired with Basic Income means that if you want to be a stay-at-home parent, you can do that. Populations of capitalist countries are going to continue to decline, and lose out to countries that subsidize the creation of new citiziens. Boomers will never understand this, and Billionaires will never allow it. But once they're gone the right thing to do is obvious.


January 23, 2021

We still need to eliminate faceboot, which just did a purge of left leaning pages. Meanwhile GOP state legislatures are currently passing fresh voter suppression bills while the Boomercrats argue amongs themselves about doing the obvious. But at least this clown can get financially pummeled now.

Capitalism is not well. The CEO who cut his pay to raise all his employees salary to a minimum of $70k points out that he didn't just prove it works, he proved other companies won't do it unless forced.

Boomer media continues to suck at epic levels, and Boomercrats are looking to preemptively pardon as many capitol insurrectionists as they can get away with because it's too much work to charge them all (unlike the endless flood of brown people going into for-profit prisons), and that's why we need to defund the police. If they're happy to let THESE clowns walk, why do they bother to arrest anyone else? The Seattle police are doubling down on prosecuting wednesday's "Abolish ICE" protest. Police unions aren't real unions, we need to defund the police now more than ever. Of course they released flex-cuff-guy from the capitol invasion, they only punish brown people.

The boomercrats aren't "falling for" the GOP's rhetoric: Good Cop is complicit. It's a servant of the plutocracy currently running the exact same "divide and conquer" playbook as southern plantation owners in the 1800's: that's what all the racism IS, rich people arranging "let's you and him fight" so nobody gangs up on the real parasites making everyone's life miserable. Racism in the united states is engineered. It's carefully cultivated so rich John Galt wannabe libertarian assholes can exploit the poor without ever facing united opposition. I think we will only ever pass the amendment to overturn citizens united over the Boomers' dead bodies, but I'm happy to be proven wrong there. (Or be proven right, just pass it.) Interestingly, it seems the term "bipartisan", like billionaires, is only as old as the Boomers, as is the fillibuster.

Guillotine the billionaires because the parasite class insists they will only ever be taxed over their dead bodies, and we should take them up on it. Not singling out any specific billionaire, change federal law so that ANYONE hoarding an offensive amount of capital is committing a capital offense. It's an uphill slog because Good Cop serves the plutocracy, but it's good to have goals.

Russia is having protests.

Sometimes I worry about drones and boston dynamics killbots micro-policing the population into a pacified dystopia the way the KGB tried hard to do in east germany, then I remember that they can't cope with feral hogs and invasive pythons. The real world is always way harder to deal with than laboratory conditions.

Only 5% of US corn is fed to cattle, about 3 times as much is used to make high fructose corn syrup, and almost half goes to make ethanol for cars (not just gasohol, it's all got ethanol in it for anti-knock, these days _without_ gratuitous lead in the ethanol for intellectual property reasons).


January 21, 2021

Jeff and I are giving an online j-core talk a week from friday.

Still doing lots of little GPS programs to evaluate satellite encoding candidates for the ESA bid proposal we've already missed the first deadline for. This is not really my strong suit, but we're overscheduled and I'm a jack of all trades equally bad at lots of different things. I'm the guy you throw problems nobody else is available to do at. It's... really slow going, and as with previous GPS stuff it took a couple days to context switch into it and I can't really work on toybox stuff while doing it. They fight in my head...

Why do I want Android to win? Because Apple is now blocking sideloading on desktops. And yes, this is a follow-up to macs unencryptedly phoning home to Apple's servers for permission to launch every program. Google has its issues but Apple is "all the evil of microsoft, but mostly competent and somehow even greedier". (And I mention this on a GOOD news day because my toybox project is aimed at helping Android kick their ass. Problematic as it is, it's open source, customizable, available from multiple competing vendors, and capable of coexisting with other systems. You can use gmail on an iphone, you can't use apple keynote on any other system.)

Here's an engineering argument for Basic Income, and it's good to see the $70k minimum wage spreading.


January 21, 2021

Tax appointment today. Looks like I owe about $6500 (despite 104 days of per diem in japan deducting $229/day: jan 8-feb 18, oct15-dec 15, 24 in jan, 18 feb, 17 oct, 30 nov, 15 dec = 104). The problem is I have to pay self employment tax because Coresemi hasn't got a US subsidiary. Sigh. Let's see how much I can save up between now and April 15th. Applying the second stimulus check to it is a start...

The pandemic has gone to plaid.

The boomercrats are once again exploring preemptive unilateral compromise before even approaching the GOP, but I'm still hoping they don't fall for it again, but then Good Cop is still a fully owned subsidiary of late stage capitalism.

Here's a thread about a guy taking a college course in the age of Covid (I.E. online lectures) who tried to email a question and found out his professor died two years ago, but the university still lists him as the professor because that's who recorded the lectures. This is why we need basic income: the job has essentially been automated away, no living human is doing it, but the university is still collecting the full fee from customers to sit on its laurels as a rentier and didn't even bother to SAY they no longer have access to this content creator because it's not relevant to their business model.

We still need to defund the police. They are profoundly biased.

The collapse of oil and gas's business model is not just because of the pandemic. Putin gratuitously arrested the political opponent he recently poisoned the underpants of, and in response Europe has joined the US in opposing the nordstream 2 gas pipeline. It's interesting, the Voldemort administration opposed it because it US gas interests wanted that market to theselves so were hobbling a competitor, and the new administration opposes it (and other pipelines) because fossil carbon is cooking the planet and pipelines leak regularly. Opposite reasons, both bad news for the international fossil fuel industry. It's stranded assets all the way down.


January 20, 2021

Today is a good day. (And yes, they did the other thing. Good.)

Had to bump my return flight to japan: the place I got my covid test at last time switched to handling employer contracts only (no individuals), and none of the places I've called since will sign the form from the consulate. (Not even the one with "travel" in its name.) Plus Japan's covid/immigration policy changed again (yesterday!) so Jeff's having a japanese lawyer look at what we need to do now.

China installed 100 deloreans of renewable generating capacity in 2020 (about 70 gigawatts of wind and about 50 of solar), which is admittely only about 6% of their 2 terawatt generating capacity but still an excellent sign.

Yay, I heard back from Sundeep who pointed me at the correct defconfig and confirmed I need to use one of the forks because mainline hasn't got support. (Except all I want to do to start is run an initramfs with serial console, how much of this can I fake up with a vanilla tree?)

There should be a name for The Y2K effect where avoiding a catastrophe convinces people the problem wasn't real. This is related to "never let a good crisis go to waste" which is often attributed to Winston Churchill but dates back to at least Machiavelli. A common machiavellian technique is to never PREVENT forseeable crises (because you won't get credit for prevention, if you succeed it looks like you did nothing) and instead wait for the fire to spread and take credit for putting it out only once everybody is desperate for your solution. (Which is an evil sort of brinksmanship that gets people killed and spins out of control half the time because of how exponential curves work, but VERY effective politics when you can pull it off.)

This is why teaching stem without teaching humanities is self-destructive. This problem is POLITICAL, not technical. We need political science majors with courses in health and human services to have the backs of people doing the right thing, not 8 gazillion silicon valley douchebros extrapolating success in one narrow technical field into the dunning-kruger belief that everything else is trivial for them to understand and do, and the ensuing inevitable faceplant was obviously because they're surrounded by obstructionist morons telling them to look both ways before crossing the street, a thing they obviously do not need to do because they've never been hit by a car before, so they double down and do it HARDER.


January 19, 2021

And twitter just emailed me another "your account has been locked!" with 7 more tweets it found about guillotining the billionaires. (Keep in mind I haven't been able to log into that account since October 2019, but they're scrupulously defending billionaires from years-old criticism retroactively anyway. Apparently twitter has a quota of attacks on the left they have to do to stay "balanced" or some such? Good people on both sides...)

So we know it was the rally attendees who marched on the capitol, the Dorito is on tape ordering them to do it as part of his speech, yet investigative journalists are working to tie the rally to the ex-president? I'm confused as to what they're trying to prove here, which part of this is non-obvious? I don't know why the GOP still exists. (I mean the answer is "billionaires puppeting senile boomers", but even so.) People are attempting to explain things to Boomers but I expect we just have to wait them out. The GOP has nothing left but voter suppression, intimidation and embezzlement. And, unfortunately, violence and cult brainwashing.

Speaking of brainwashed cults, christianity in america is merging with white supremacy to become one big terrorist organization. It's interesting that nothing the church teaches, nor anything in the bible, stops these guys from beating police offiers to death with a fire extinguisher when they don't get their way. But then these "moral teachings" didn't stop the crusades, the inquisition, conquistadores, burning people at the stake, missionaries handing smallpox blankets to native americans, magdalene laundries, the church participating in the rwandan genocide, the church's peace treaty with nazi germany... Remember how Pope Palpatine was the guy in charge of covering up the decades of choirboy rape (as in covering it up was his day job before he became pope), and his successor has "fixed it" by requiring all priests and nuns to report sex abuse to their superiors within the church instead of secular authorities... So of course they're merging with the GOP.

Blaming cows for global warming remains profoundly stupid, but vegans are happy to use GOP lies to attack people they don't like. Speaking of methane, the wildly swinging price of "natural gas" (going way up and down based on the weather) makes it a bad fit for electricity generation. This year it's increased tenfold from $1.85/mbtu back in May to $21.45 for the same million british thermal units in the week ending January 8. Plus it funds Russia to hijack our government. Here's an utter asshole's highly biased explanation of how fossil fuel mining can't properly refine and distribute the products it gets and winds up dumping them into the air and rivers and such because selling them would lower the price, and only intentional supply restrictions keep the industry profitable pretty much the same way the debeers diamond cartel works.

There could easily be a daily twitter of "Cops murdering the person who called them". Oh, and the munitions used by the seattle police are toxic and there was a cover-up about the adverse health effects that just got exposed. Baltimore has 1900 police officers of which 1826 have faced complaints the department basically ignored. This is why defunding them is such an obvious goal.


January 18, 2021

Ooh, 8 year pathway to citizenship for undocumented immigrants. That's actually kind of reasonable.

Trying to get toysh out before getting on a plane back to tokyo friday.

Another problem with replacing the cached pl value with TT.ff->pl is that dlist_add_nomalloc() appends to the list but does not move the pointer, which stays pointing at the start of the list. So all references to pl should really be TT.ff->prev->pl which is just too long: it means TT.ff->prev->pl->end->arg->v[TT.ff->prev->pl->end->arg->c] is the block terminator, which you need to find when "if true; echo hello; fi" has an & or | at the end of it, or trailing redirections. You have to handle those at the start of the block so the filehandles the child processes inherit are correct.

I haven't got left-handed dlist_add() and dlist_pop() variants in lib/llist.c, I just use a singly linked listed for that which is reversed by nature, the simplest implementation pushes and pops like a stack. But if I want a "base" function call layer that contains the global variables (so the variable logic just naturally iterates to end of list without a special case, see "exported local variables" encountered earlier) then a doubly linked list lets me TT.ff->prev to access that directly when necessary. (I.E. for all the variables that are NOT marked local.) Except...

$ potato() { x=123; }
$ chicken() { local x=$((x+1)); echo $x; potato; echo $x; }
$ x=7; chicken; echo $x
8
123
7

You have to iterate through all the local variables anyway, because you can have multiple local contexts and you stop at the most recent one. So having it be a doubly linked list is silly, it should be a singly linked list, which makes it naturally reversed. Which means once again I'm frogging code.


January 17, 2021

Of COURSE parler is back online using servers in Russia. Russia has been stoking white supremacy and funding it since 2011 because it's easy way to split the country down the middle: a minority of bastards hate half the population, the more power they get the worse off everyone else is.

Meanwhile Nancy Peolosi just kicked Katie Porter off the finance committee. Now that the Boomercrats are in power, they no longer need "the squad". Keep in mind that plutocracy is currently behind both parties. (Racism has been a tool of plutocracy for centuries, divide and rule.) Obviously bad cop is worse than good cop, but good cop is not on our side.

Another argument for basic income is watching the guy behind leverage come up with equally intricate plots for his RPG campaign: creative people aren't creative BECAUSE of capitalism, it's usually in spite of it. Getting paid to create is stressful, and a huge source of writer's block. It's gotta be good enough to justify the money, and you have to KNOW it is before you've done it. How much risk is it comfortable to take when your livelihood is involved? Not everybody can perform on command, and if you get 90% there and throw it out because it's not good enough you've wasted money.

A historian makes the excellent point that our current issues with racism are because we didn't punish confederate leaders by taking their stuff and giving it to black people to start new lives with. The whole "reparations" movement boils down to "our family was enslaved for 300 years and these white assholes got to keep everything we made even after the civil war", and the resulting billionaire wealth and privilege infrastructure is behind today's racist misogynistic GOP.

In the absence of war profiteering (because nuclear weapons make war unstable), disaster capitalism has had to invent new disasters to steal money through. And now they're campaiging to "free billionaires from the constraints of democracy".

The first thing right wing loons do is attack/capture the news outlets.

The lack of municipal broadband is because of regulatory capture by monopolies.

The ongoing pandemic has already cut US life expectancy by over a year.

Every libertarian kobayashi maru thought experiment is a lie.

Defund the police. No seriously, they're counterproductive.

Here's one of the capitol rioters lamenting on the parler nazi network that he might lose his job as a pastor because of participating in the insurrection. Of course all white guys ever have to do is apologize once and all is forgiven. (The South Park movie had a musical number about that.)

Sigh. At least the end of fossil fuels is still on track, and it's entirely possible that will take out late stage capitalism. (1/6 of the global economy, and the original model for the "resource curse".) And here's an interesting thread postulating that bitcoin may be banned for environmental reasons. As climate damage increases there will be lawsuits and they may be next in line after Exxon...

Sigh. I suppose this could have been worse. ASCAP and BMI are terrible, anything they're unhappy about is probably a win? But they need to lose WAY MORE.


January 16, 2021

Today for work, I am reading another old master's thesis, and analyzing corresponding data tables. Yup, the GPS stuff has resurfaced. I really need to cut a toybox release so I can stop doing that for a while, they push each other out of my head.

Even in Austin, it's really cold out at the table outside the geology building at 3am in January. A few days ago we had actual snow that lasted a full day on the ground (in places anyway). People were making snowmen. I have gloves, a hat, a scarf, a hoodie under a jacket, shoes and socks, and I brought a towel to sit on between me and the metal bench, and I'm still cold. I want to walk somewhere for exercise and then go INSIDE, which is still two rounds of vaccinations away from being plausible. (And then what, do we get special "I've been vaccinated" hats?) I miss the booth at Wendy's I could hang out in for 3 hours between the mealtime rushes. (All the seats were empty from 2-5 pm and 7-10, it was away from the cats, easy access to snacks and endless beverage refills. I am SO ready for this pandemic to get cleaned up by actual adults.)

Wind power generated almost a quarter of Texas' electricity last year, second only to natural gas. Coal was down to 18%, and 95% of the pending generation proposals under consideration are wind, solar, and batteries. Which is good because the fossil fuel industry is funding literal nazis. (Fascism is where the Koch brothers got their money. Their daddy made his fortune working for Joseph Stalin as the oil drilling expert who got the USSR into the oil business in the first place. But even numbered day, focus on good news and programming stuff...)

I poked the guy who broke Linux on m68k QEMU and he basically said "yeah, I know, upgrade QEMU to get the workaround for my change", which I can't do because building current qemu requires a newer python 3.x than Devuan ascii packages, so it won't compile from source until I upgrade and I have a few too many open windows to want to do that right now.

Toysh: I need to background nonterminal pipeline segments, and THAT means the current pipe handling should also handle & backgrounding, which I guess is why break & is a thing in bash. Bash is also backgrounding the last command in a pipeline, hence the "echo | x=5" behavior where variable assignments in the last pipe segment are discarded by bash... but is it a bad thing if "echo $x" prints 1 after that? Prefixed assignments only last the length of the command anyway, what else could a trailing standalone assignment mean? Bash not honoring it seems a bit like a bug.

Except only type 1 needs to get backgrounded for | because normal type 0 commands are already spawning child processes when they need to. (Unless you exec in a pipeline which is pilot error if you ask me, I vaguely recall playing with that earlier and being kind of exasperated at what bash was doing.) And the redirects should be done and unwound again before backgrounding (again, for nommu) so the sequencing is wrong.

I want to avoid duplicating the backgrounding plumbing, but really it's only type 1 that needs to do anything new. Unless... hmmm. Some builtins (wait, read, suspend) can block. But then "echo $(sleep 999)" can too? And some builtins (exec, exit) can exit. And what does return in a pipeline mean?

$ chicken() { echo | return 37; }; { chicken; echo $?; } | cat
37
$ chicken() { echo | return 37 | echo potato; }; { chicken; echo $?; } | cat
potato
0

Nope, terminal pipeline segments ARE being treated differently than nonterminal pipeline segments by bash. Sigh. (But not consistently! They have that darn short-circuit logic where sometimes they run a command directly without the extra fork, and it's some sort of heuristic.)


January 15, 2021

Microsoft is performing a digital book burning, and it's a normal part of Late Stage Capitalism. Meanwhile, Bill Gates uses the ill-gotten gains to become the USA's largest landowner. Youtube possibly needs a rethink, not that this is a new observation.

Police are "worred about a black eye for the entire profession" due to so many off-duty officers being part of the capitol mob that tried to capture and assassinate elected officials. The fix is to have fewer police officers, the path to get there is defunding. At some point you go beyond "useless" to being net "part of the problem". The carceral state is charging BLM with felonies for actual peaceful protesting while ignoring actual insurrection. The point of defunding the police is you move the money to other more important things. Calling the police or fire service doesn't cost $2000 for one vehicle to show up, but calling an ambulance does? You still have the national guard and such if an active shooter situation breaks out. (You know, those services who were denied _permission_ to come to Washington DC to help out.) In June, DC Police arrested 5x as many people during an anti-racism protest as they have for the capitol invasion. Defund them, they're racist bigots.

The evangelical rapture cult is still poised to pass a flurry of bills outlawing birth control and being gay and so on, but now they're focusing on doing it at the state level instead of the federal level. (That's why they were installing all those judges, so making pre/extramarital sex a felony punishable by death can't be struck down in court.) The Boomers are old and trying to buy their way into valhalla at the last minute, so they'll take whatever snake oil is sold to them that makes dying sound easier, and Boomers have had such unhealthy relationships all along they think constantly hurting people is normal.

Opec's released numbers from oil prices going negative last year, $595 to $323 billion is almost a 50% decline. $202 billion of which went to Saudi Arabia, but they've screwed themselves over with the privatization/IPO of aramco. Six months ago all the oil producers were borrowing money to stay afloat and that debt load hasn't gone away. (Not that soverign debt actually means anything in modern economies, it just affects inflation and exchange rates. But "company" vs "country" is an interesting distinction. And foreign curency exchange and debt denominated in foriegn currency are a big deal no matter how much money you can print, self-sufficiency in basics like food, water, and energy are a big national security issue.)

Meanwhile in the USA, all fossil fuel fields are overvalued and the rebooted SEC just noticed. And in China, the Xi administration seems almost as weak as the Trump administration, at least when it comes to energy policy. Their stated goals are not what actually happens in the country. Of course that was back in october, now they've doubled down and caused another Mao the Dong style crisis. (Dunno the body count from this one yet, but freezing to death isn't fun.) Speaking of methane note the "5-6pm prices": duck curve (woo-ooo).

Oh look, another way rich bastards stole half a billion dollars of pandemic money. The maggats are still begging for pardons from a man infamous for not paying his workers. The NRA is declaring bankruptcy and swapping juristictions to try to escape pending litigation.


January 14, 2021

Good news: we have a fourth vaccine, this one from Johnson and Johnson. Similar to the Oxford vaccine, it's a conventional "store below 8 degrees celsius in a normal refrigerator, lasts up to 3 months, only needs one injection" type. Not the fancy new MRNA nonsense that decomposes instantly upon exposure to brightly colored wallpaper or in the presence or large flowers. And remember that CEO who took a pay cut so he could raise his minimum employee salary to $70k/year? His company has survived the pandemic just fine.

A bit concerned about an ongoing thread on linux-kernel where they're tacitly acknowleding that since the Linux Foundation finished the corporate-friendly purge of all hobbyists, their development community is not just aging but shrinking (obituaries aren't quite a section at Linux Weekly news yet, but they're definitely increasing in number), and the response is to throw hardware support overboard.

Unfortunately arch/sh looks a lot like #1 on that thread's list: it started renesas-only, they abandoned it, now it's SEI/Coresemi only because we haven't built a proper community and we vanish for months at a time... Not an _immediate_ threat, but despite repeated poking Rich hasn't sent patches upstream in months.

Speaking of which, the post in the thread I linked to is by the guy who broke qemu on m68k, I should poke him about that...

Also, now that qemu-system-arm has -M emcraft-sf2 support, I'm trying to find the kernel .config for smartfusion2. This is the board I used at innoflight, it's a nommu cortex-m3 system (with a large currently irrelevant FPGA attached) and would be great to add to mkroot's list of test systems as my cortex-m boot. (Arm thumb2 nommu: check.) Alas, I last used this 3 years ago (in one of the holes in my blog, I should check my USB backups to see if I can find the files I wrote but never published during that period) and I can't find the kernel config for it. The emcraft website (a company headquartered in Moscow) wants you to register to download half their stuff. (It's the same problem Renesas had with qemu-system-sh4, the idea that anyone other than paying customers exists is confusing to them.)

Emcraft has their own kernel fork on github, and the guy who submitted support to qemu also has a github but I'm not finding an obvious defconfig there either. So I emailed him. (I VAGUELY recall it's an stm32? I think? But I built stm32_defconfig with the musl-cross-make cortex-m toolchain I build toybox release binaries with, and -kernel vmlinux died with "can't escalate 3 to HardFault" whatever that means, and qemu couldn't load -kernel arch/arm/boot/xipImage at all. And when you google a LOT to follow obscure links to archived pages it just boils down to "cd into our magic tarball and type make", and the page ends with a note effectively saying "buy the .config from us, no questions answered without money".)

In toysh land, run_function() is now run_lines(), and call_function() has been broken out into its own thing, and I got rid of the pl local variable to just use it out of TT.ff->pl each time. (Which is verbose, but means there's a single location for it. Having a local variable cache a global variable is what the optimizer is for. Keeping said cache in sync by hand and flushing it back as appropriate is a brittle pain.)

This is a much longer slog than I'm happy with before I can get the pieces back together compiling and running the test suite again. I'd _really_ like to get a release out before getting on the plane back to tokyo...


January 13, 2021

When the electoral college vote reconvened after the coup in the capital, the GOP continued to object to Biden winning, and now they're calling for unity. That's not how unity works.

The coup was an inside job. There was nothing spontaneous about it, it was planned and supported by the entire republican party. People trained for it. Then right after the insurrection the GOP reps still voted against certifying the election, and now they object to impeachment. They still side with the treasonous dementia patient, even now. That's what their votes mean. It's ok when we do it, only what YOU do can ever be wrong. The GOP wants "conservative" judges who can outlaw abortion and so on, and are happy to murder people to do it, and scream victimization at minor personal inconvenience, all while mishandling a pandemic.

The problem is rich white people. They're who caused the civil war, they're why we haven't got medicare for all or Universal Basic Income, they've been driving up the price of rent and real estate, and now they're trying to violently undo a democratic election.

Another report just came out about the Catholic Church's Magdalene Laundries where pregnant women were kidnapped, forced to give birth, and the results either given up for adoption or interred in mass graves (15% mortality rate because they gave basically no medical care due to "sin"). On this side of the atlantic evangelicals trying to take down the US government are a more immediate concern. After all, Ireland shut down the church's pregnant woman kidnapping operation in 1998, and voted to legalize abortion two years ago.

Defund the police and give the entire department's budget to this guy and let him sort it out.

Seriously, the whigs ended, the GOP can too.


January 12, 2021

Sheldon Adelson died today. He was the largest political donor in the USA, all of it going to GOP loons. I know it's bad form to speak ill of the dead but he earned it. Despite everything, it is a good day.

The toysh function() plumbing has a design contradiction: after the set of design changes I'm making, it won't actually be called to run shell functions.

I don't want to recursively call run_function() because nommu has limited stack depth (both because it cann't do on-demand allocation without page faults so it has to consume the entire maximum amount of physical memory up-front, and because the stack has to be a physically contiguous memory allocation which is often the limiting factor on a busy nommu system; so while most linux stacks are 8 megs/thread, nommu stacks are usually in the 8k-128k range).

So I moved the blockstack list from a run_function() local variable into a new function call linked list in the globals() block, which I kind of need anyway to show the function call stack for debugging purposes. I still have pl and blk cacheing data out of the new struct sh_fcall (largely because I don't want to change everything to TT.ff->blk and TT.ff->pl yet which makes me have to re-wordwrap a bunch of lines), and pplist is still a local because a function call in the middle of a pipeline has to run in a subprocess for the same reason loops do (which boils down to "the halting problem"; there's no guarantee any loop will actually terminate but piping the output to something that consumes finite input and then closes the pipe should usually terminate the earlier process, so they MUST go in parallel to not hang). That means each pipeline stays within the same function context, with a short lifetime appropriate for a local variable.

But if the function call stack is a linked list in globals, then calling a function is logically a builtin or "break" style inline that adds a new entry onto the function list and updates the two local cache pointers. (Flushing the old ones into the old struct because it has to know what pl position to return to when this function ends, and this function has a new if/else/while block stack.)

I suspect all the local variable cached entries should just move into TT.ff and be dereferenced every time they're used, I've already moved a few of them (like the TT.ff->urd pipeline unredirect list for recovering redirections; remember I dup/close file descriptors to high filehandes and then dup/close them back down after the vfork() because nommu support), which means the list can never be empty. (Unlike the blk list, when is checked for emptiness ala !blk in several places.) Right now it run_function() adds a TT.ff entry to the list when it's called, but that's the same "call run_function() recursively to call a shell function" logic I'm trying to avoid here. So I need to split that out into a separate function that's called before run_function(), and then rename run_function() to something else. (My sleep deprivation suggests repeat_until_spanked() which is a reference to Matt Groening's "life in hell" comic from before he started The Simpsons. It's probably run_lines() to go with parse_line().)

The difference between the new struct sh_fcall and the old struct sh_function is that the first is runtime (argv[] and such the shell function was called with) and the second is parse time (list of commands in pipelines and blocks). Possibly the new one should be sh_function and the old one sh_parse (or some such) but renaming a bunch of things at once is hard to keep track of. (My problem here is this change is naturally very big, and doing it in stages is tricksy.) So sh_fcall is the runtime function call stack, and sh_function is a parsed block of input data with a lifetime, which again gets strange when "if true; then blah() { echo hello;}; fi" starts with the if, but the if has already run and you have a pointer to the echo at the start of blah and the whole parsed block has to stick around until that function gets undefined. The fact function definitions can live in other function definitions... As I said, reference counting.


January 11, 2021

The GOP can go the way of the Whigs and Federalists before it. In reality, it's going the way of the confederacy. Here's a thread on how white supremacy defends itself by lynching white people who step out of line.

The party has switched all its efforts to defending itself. The I was only following orders defense from the Neuremberg trials breaks down when you make the laws, and keep doing the behavior that got you in trouble. Numerous GOP lawmakers were directing the coup.


January 10, 2021

I'm trying to write a regression test for the behavior difference between

function() { stuff; }

and

function() ( stuff; )

And although the PID constantly varies I went "I'll just curly bracket collate it and pipe the result to sort -u | wc -l and expect a 1 or a 2 to distinguish the behavior" and then bash does:

$ { echo $$; chicken() { echo $BASHPID;}; chicken;}
10868
10868
$ { echo $$; chicken() { echo $BASHPID;}; chicken;} | cat
10868
10928

Why? Ah! If that first $$ is $BASHPID then they match, the pipeline is doing a subshell for each segment and $$ is the root shell. The important part is that all the elements of the outer { } are executing in the same process.


January 9, 2021

I'm hoping that Boomer pathologically abusive misogynistic racism is coming to a head and the fever's breaking, but there's so much clean up to do. The Boomers' cultural history of racism and domestic abuse isn't exactly new, but it is ongoing. And their whole society is bent to protect their racism and sexism: a man who drove his car into BLM protestors pled guilty and is not going to prison, will in fact have the incident erased from his record in 3 years, because he's a white male.

As always, follow the money, the insurgents are useful idiots for billionaires. Let's explain how stupid these clowns are: one of the guys photographed on the floor of congress during the riot, in full tactical gear, talking to a guy in a maga hat, holding plastic flex cuffs (often misidentified as zip-ties but these were disposable handcuffs), who made a bee-line for Nancy Pelosi's office as soon as he got in the building, now claims he found the flex cuffs on the floor and was just holding them, was wearing the tactical gear to protect himself from Antifa and BLM, and thought he was allowed in the building.

Don't let escalation distract you from what they've already done. One purpose the terrorist riot at the hill served was to distract from the georgia call, which wasn't even the only call. (Of course not merely distract, just like domestic abusers escalate from passive aggressive insults to shouting to hitting they double down until you bust out, and are backed by billionaires...) And yes, the invasion was organized and carried out with the full unwavering support of their party, it was entirely predictable and was racist on every level.

Their attempts to rehabilitate hitler continue: apparently nazis haven't had a bad enough reputation? (And yes, these clowns are full nazi, with zero loyalty even to each other. They're throwing each other under every bus.

And now that this iteration of coup has failed (they're trying again this weekend) they're trying to laugh it off, which I fully expect the Boomercrats to fall for.


January 8, 2021

There is good news today. And people doing excellent forensic work. (We still need to defund the police.)

Trying to focus on toysh stuff despite everything. Not doing a great job. Over in bash, pipelines are running just about everything in subprocesses:

$ chicken() { echo $$ $BASHPID; }; echo $$ $BASHPID>&2  | chicken
5109 5165
5109 5166

Note how neither is under the $$ parent PID. I'm not currently doing this, but I suspect I have to if things like:

$ while X=$(($X+1)); do echo $X; done | \
> while read i; do echo $i; done | head -n 5
1
2
3
4
5

Are ever going to work properly. Otherwise, the first while loop never exits so it doesn't move on to the second while loop (which also never exits) so it can't feed data into head. They pretty much have to be separate processes (or something truly horrible with select: no).


January 7, 2021

Of course the GOP can spend years investigating benghazi and and immediately excuse the capitol invasion. They were never about truth, or law, or rights. They're about naked power over everyone else, and nothing else. And they're getting worse, not just because of the "southern strategy" but because gerrymandering causes radicalization. People in those "safe seats" only have to worry about being primaried by a more extreme loon, not about winning the general, so the candidates get ever more extreme (and detached from reality).

Meanwhile, defund the police and a fine is a price.


January 6, 2021

Hands up everybody who's surprised by the coup. Didn't think so. Yeah, it's an even numbered day, I didn't get a lot of programming done.

After losing the senate last night, they're panicing. Thanks to the rules changes they made to fillibuster-proof judges and cabinet nominees so a simple majority can push through any nominee, EVERYTHING is going to be investigated and prosecuted now. They can't survive that. If Biden doesn't pardon them, half the GOP senators are going to wind up in jail.

The literally nazi terrorist mob in Washington DC today isn't the only attack on democracy the GOP is currently performing. (People wonder why I'm not surprised. I'm hoping that the timeline gives us long enough for the Boomers to die.) And of course the police have waffled between useless and actively collaborating, despite people pointing out their much larger racist crackdowns on non-nazis. (Plus how surprised were the capitol police supposed to be when the other side was selling shirts about it with the date on it? Are they now going to ignore the footage?)

I still expect Biden to pardon them all if the lame duck doesn't first. As hilarious a pick Merrick Garland is as attourney general (you wouldn't put this center-right Rockefeller republican on the supreme court? How do you like him NOW!), he's also a terrible choice for AG for significant reasons. Boomers just want things to be quiet for their remaining decade, they don't care who dies in service of Boomer comfort.

Meanwhile, there's still a pandemic. Austin is once again threatening to turn the convention center into overflow hospital beds which doesn't help because the limiting factor is staff (each nurse can supervise at most 2 ventilated covid patients, it's worse in that regard than many other diseases) and we're burning through staff darn fast.


January 5, 2021

Of course they're still lying. They always do. Republicans (and Tories) are fractally evil, example du jour: they prevented regulation of dietary supplements by the FDA (and oppose food labeling in general) so of course dietary supplements have become a major cause of liver failure, even in otherwise healthy people. (Which the pandemic is leaving in short supply.)

The intersection of "do unto others" and "judge not lest ye be judged" is "turnabout is fair play".


January 4, 2021

Monday! Start of a new year, end of the holiday time off. Time to start shouldering the $DAYJOB work again.

The price of batteries went down 89% over the past 10 years, from $1110/kwh to $137/kwh. (Except 137/1110 is 12.33? 100-12.33, or 87.66876 percent which rounds up to 88, not 89?)

Either way, that's almost exactly 3 doublings: 100%/2 = 50%, half of that is 25%, half of that is 12.5%. For a doubling time of 3 years and 4 months. Which means if it keeps going by mid-2024 we can expect batteries under $70/kwh and at the start of 2028 under $35/kwh. (And of course the analysts in that article are expecting it to go down 1/3 of 89% over the next 3 years, I.E. about 30%. That's... not how math works. Seriously, you covered Moore's Law for 30 years and don't understand exponential curves?) And then the analyst talking about how it would take over a decade to replace all the cars on the road, when:

  • An on-demand service needs 1/10 as many cars to handle all riders because the vehicles aren't sitting idle 95% of the time, and yes that covers rush hour because the same vehicle can make 8 half-hour trips between 6am and 10am.

  • You only need to replace 20% of the oil demand before the mining, refining, and distribution network becomes unprofitable and the whole thing implodes, as demonstrated by the 50% price drop circa 2015 or oil prices literally going negative during the pandemic. Bloomberg did a good video about this at the start of 2016, right after said 50% price drop.

The main reason I haven't put solar panels all over the roof of my house yet is I want about 3 days of battery storage, and while I can afford the panels (and the installation), I can't afford as much battery storage as I want yet. (Sending power from my house back to the grid isn't really something the grid _wants_. Much better to be self-sufficient.)


January 3, 2021

While we're all waiting for Biden to pardon Nixon again (the entire purpose of the DNC at this point is to block AOC), here's a Lovely thread about how most of the online ad industry is demonstrably a big scam that does nothing for the people paying money into it, and how ad buyers are improving their metrics to actually notice.


January 2, 2021

I need to make changes to the existing toysh code in stages, and figuring out a functional and coherent trail of breadcrumbs is tough. The data structures are a house of cards, I move one thing everything wants to switch over to an obvious new organization, but redoing the code to USE that is a giant tangled flag day change that's hard to debug. And I am not at my best right now.

Hmmm...


January 1, 2021

I kind of want to start the new year by NOT talking about bad things on odd numbered days, even though late stage capitalism has not let up. (Twitter has now locked my account 13 times for expressing the obvious sentiment resulting from this.)

That said, there is good news. The Boomers get older and more infirm every day and have to give way eventually. Here's an explanatory thread on the structural problems in the DNC that lead to gerontocracy over there, and here's Cory Doctorow recommending another excellent explanatory thread on where money comes from these days. (Reminder, twitter sucks at being twitter and threads randomly end abruptly with a tiny "show this thread" link you have to click to see the rest of the thread. That's why their authors often copy threads they wrote into blog entries which read awkwardly because of the original tweet length constraints they were composed within.)

Ok, I'm up to four shell contexts:

  • sh_process - list of currently running child processes, with PID and command line and exit status and so on.

  • sh_parse_context - my old sh_function struct renamed and extended, contains the information for each "source" level (pipeline list, lineno, array of function definitions).

    Possibly the $(subshell) stuff should be treated as functions so it can handle case/esac embedded in there (rather than just counting parentheses), but I dunno how to represent that yet.

  • sh_function_name - the directory of callable functions (which is not the same as _parsed_ functions because you can have function definitions and "unset -f" in a for loop; this means the sh_parse_context needs reference counting so we know when to free it).

  • sh_function_call - the runtime information for function calls (which are _not_ child processes), including their command line arguments (which can be reset by 'set') and local variables.

Switching to this requires rather a lot of reshuffling. I've come up with a set of structure definitions in GLOBALS() that I'm reasonably happy with for the moment, but changing all the code to USE them is a big deal and probably has to be done in stages. Global vars are just the top level of local vars, so the shell has to start with an "empty" function call.

The lifetime for sh_parse_context is just outright FIDDLY (see "reference counting", above): the common case is "you're typing at a command prompt" and commands are executed and freed right after, which means parsing shell scripts should work that way too: it remembers stuff it needs to and frees it as soon as it can.


Back to 2020