Skip to content

Enjoy Kaizen

Category: Current Events

Lost a Tree

It landed on a car but didn’t break the windshield.

Weather seems to be calmer now in C1N than it was a couple of hours ago.

Installing a PHP Extension Outside Home

FEATURING: mf2 for PHP by cj.w6k.ca!

Have you seen similar?

cjw@buster201908:~$ []

You may recognize tilde hanging out there in the prompt:

... :~$ []

The tilde ~ is where the current directory name is written.

When you first login to your server, you’ll be chillin’ at home in $HOME circa ~. Change your current directory to /usr/local:

... :~$ cd /usr/local
... :/usr/local$

Make an empty folder here with the name phpext-mf2:

# don't forget sudo or you get pneughed ...
... :/usr/local$ mkdir phpext-mf2
mkdir: cannot create directory ‘phpext-mf2’: Permission denied

# with sudo
... :/usr/local$ sudo mkdir phpext-mf2

Now is a good time to take ownership with your login handle and default group, so you don’t get pneuged again. Use the chown command on /usr/local/phpext-mf2/.

From here, it’s time to clone the mf2 repo from code.cjwillcock.ca (or wherever):

... :/usr/local$ git clone https://code.cjwillcock.ca/php-extensions/mf2.git phpext-mf2
... :/usr/local$ cd phpext-mf2
... :/usr/local/phpext-mf2$ []

phpize is required next. It’s with the php-dev package:

... :/usr/local/phpext-mf2$ sudo apt-get install php-dev

Now the instructions from the mf2 README.md, but not in a rush like that. Run the 153 tests and decide if it will probably work for your server.

... :/usr/local/phpext-mf2$ phpize
... :/usr/local/phpext-mf2$ ./configure
... :/usr/local/phpext-mf2$ make
... :/usr/local/phpext-mf2$ make test

If everything passes, then install it!

... :/usr/local/phpext-mf2$ sudo make install
Installing shared extensions:     /usr/lib/php/20180731/

From here, installation is equivalent for any destination. Our prompt for the purpose of demonstration simplifies to $.

Make available for activation, your new extension:

$ echo "extension=/usr/lib/php/20180731/mf2.so" | sudo tee -a /etc/php/7.3/mods-available/mf2.ini

Activate it:

$ sudo ln -s /etc/php/7.3/mods-available/mf2.ini /etc/php/7.3/cli/conf.d/mf2.ini

Did it work?

$ php --ri mf2

mf2

Microformats2 support => enabled
cjw@buster201908:/usr/local/phpext-mf2$

My Buster 2019-08

P++?

There is an ongoing discussion among key contributors to the PHP language on the PHP internals mailing list about embarking on a new language project to simplify PHP maintenance.

The Gummy Bear of Imprecise Articulation

Twitter was aflutter yesterday over a venture capitalist’s tribbling on human capital. He asserted: there exists a class of engineer whose valuable outputs are an order of magnitude more valuable than other engineers. He proceeded to thread descriptions of a dozen characteristic attributes and behaviours which occur more frequently than average, in his experience, among members of the class.

Amidst uproar many commenters closed ranks and outed themselves as unitarily valuable engineers. Still others mocked the VC’s attempt, ascribing many more and numerous unsavoury characteristics to what quickly became a steaming dung pile of worst co-worker ever stories. It was reduced to farce. It was rife with bitterness. Meanwhile a few innocents took it on the chin as they agreed with the VC in the public forum. Poor saps.

Quick, let’s recap:

VC wants to let people try on his rose-coloured glasses, fails magnificently, and we are left with the fan dripping shit everywhere. Some tea with that guv’nor?

Meanwhile, this gem …

A true 10x engineer will have a callous on their right pinky finger from terminating so many lines of code. A 100x engineer will have a callous on their left pinky finger because that’s where the semicolon key is in a dvorak layout.

Ryan Cavenaugh

… and I’m just here with my Ergodox like … I can change where those keys are so I don’t get any callouses …

Then I see what’s about to happen, and I say it out loud, to myself -so it really, truly, sinks in-:

Don’t.
Say.
A fucking.
Word.

Thanks go out to Greg McVerry for providing the writing prompt for this post at Quick Thoughts.