J42H Blog

Thoughts about programming, Christianity, and cooking

TIL: PHP Array plus operator

I learned something today I learned a new thing today while reading through someone else’s code (nikic/FastRoute if you’re interested). I was reading through a function and noticed them using a varient of the + operator with 2 arrays: <?php // ... function cachedDispatcher(callable $routeDefinitionCallback, array $options = []): Dispatcher { $options += [ 'routeParser' => RouteParser\Std::class, 'dataGenerator' => DataGenerator\MarkBased::class, 'dispatcher' => Dispatcher\MarkBased::class, 'routeCollector' => RouteCollector::class, 'cacheDisabled' => false, 'cacheDriver' => FileCache::class, ]; // ....

April 5, 2022 · 2 min · j42h

Dev Proverb 1

Motivation Today I made a change to the site config, breaking a feature of the site. Frustratingly, I did this across several Vim sessions, and I don’t have persistent undo turned on, so I had no way of getting back to a known working state. Because of this I had to pour over the config file and documentation for a good 15 minutes before I found my typo. As soon as I got the site working again I created a repository for the site and checked everything into it....

April 15, 2021 · 1 min · j42h

Trying out Hugo

I migrated the blog to Hugo! Intro The last 48 hours have been something of a whirlwind for this site. I decided to build it on a whim, arbitrarily chose to run it using Vimwiki, and now I’ve decided to move everything to Hugo. I don’t really know how Hugo works, so I’ve basically just script-kiddied my way into running my new blog off of it. I’m not proud of this....

April 9, 2021 · 2 min · j42h

First!

I started a blog My friend Adam said that cool people have blogs, so I’ve started one because I’m probably a poser. I don’t know that I will ever post another entry again, but at least I can now say “I have a blog.” As of this writing, this site doesn’t even support TLS. I’ll probably at least get that working. TLS is working now…port 80’s for suckers. All for now....

April 7, 2021 · 1 min · j42h