The thread_local scope tells the compiler to create one unique version of a variable per thread. Then you can access it without worrying at all about in what thread you are. (Grammar Nazis, help me out here. I think I got that right…) It is absolutely genius for making multi threaded programming that much easier. W00t.

UPDATE: of course, every razor blade comes with its share of nicks. In this case, the expectation that different objects in the same thread would still have different thread_local members. Nope! Vet your ideas before you change to this scope too fast! Me, I’m all better now, and still love it. Good luck girls and boys.

Example to convert a field from real type to integer type:

update bracketevents set json = jsonb_set(json, '{sq_id}', ((round(cast(json->>'sq_id' as real))::text)::jsonb)); 

All that just remove the $*(@ decimals… how particular…

Today I updated my gentoo server’s eselected PHP from 5.6 to 7.2 and wordpress phabricator and mediawiki didn’t even hiccup. WordPress went from a steaming pile of stubborn version upgrade refusal right back into line. I used mysqldump to back up all my databases, less than a GB. I git pulled phabricator’s stable branch (updated weekly from master) and ran a boatload of database patches that went smooth as coconut milkfat. I git-skipped the .arcconfig files so i could just update them in place. OK… why did that all just work?

Update: I went ahead and made the phabricator-recommended changes to mysql and PHP, including installing a PHP memory-based cache:

emerge -DavuN dev-php/pecl-apcu

And that, of course, cascaded me into a gentoo server update.

  • first I had to [emerge -av glibc] as it was ancient
  • do not put comments in [/etc/portage/package.use/zzz_autounmask]
  • used advice from gentoo perl docs:
emerge -uDNav --with-bdeps=y --backtrack=100 --autounmask-keep-masks=y @world

And away we go…

UPDATE: ok these are a few more of my “favorite” things…

  • mediawiki required an update, I had to manually tweak my multi-site LocalSettings overrides since some themes were removed, and some were added.
  • I decided to go through all the phabricator tweaks that it complains about.
  • I fell into an update of my fork of Simple Web Server, not really related except that it was YA deep rabbit hole.
  • Files served up were made real pretty with this; I had to tweak the .htaccess to make it correctly mo safe.
  • Moving to boost 1_69_0 was actually a lot of (CPU) work.
  • While I was moving things around, I set up a nice git flow for my stock app, with branches:
    • develop
      • feature/postgress-archive
      • refactor/use-archive-db
    • master
      • release/1.55.41-pre-archive-database

gcc seems to be getting smarter all the time. Sentience soon…?

/home/m/development/thedigitalage/AbetterTrader/server/src/TradingModel.cpp:2095:33: note: suggested alternative: ‘ba_’
ss << "WTF account " << pa_->strDesc_ << " sr " << db_id_ << " gain: " ^~~ ba_

After seeing this little gem on the xunitpatterns site:

(We are running all the tests before every check-in, aren’t we?)

I was glad that I baked my tests into the startup of A better Trader. As I build and run while coding, I’m constantly running my regression tests. Steady on.