This post is part of my video blog.
I’m not sure what I should say about this. Or if I should say anything about it at all.
This post is part of my video blog.
I’m not sure what I should say about this. Or if I should say anything about it at all.
I was having a conversation on IRC and I wanted to demo some code generation I did this afternoon.
I used this PHP to generate this BASH code.
And I used this PHP to generate this PHP code.
I think PHP is a good choice for code generation.
Here is another PHP thing I need to think clearly about from time to time:
var_dump( [ 'a' => 1 ] + [ 'a' => 2, 'b' => 2 ] );
Returns:
array(2) {
'a' =>
int(1)
'b' =>
int(2)
}
I was in bed trying to get to sleep but my brain wanted to know the answer to this question. So I was forced out of bed to write this experiment:
function main( $argv ) {
register_shutdown_function( 'shutdown_1' );
register_shutdown_function( 'shutdown_2' );
exit( 0 );
}
function shutdown_1() {
exit( 1 );
}
function shutdown_2() {
exit( 2 );
}
main( $argv );
With this PHP code, what do you expect is the resultant error level?
The answer is ‘1’. After main() calls exit( 0 ) the shutdown function shutdown_1() is invoked. When shutdown_1() calls exit( 1 ) the process exists and shutdown_2() is never called.
I’m glad we cleared that up. Back to bed.
I’m learning to use GitHub Copilot. So far so good. Today I read:
I’m reading some stuff, but I’m exhausted, so off to bed, and hopefully finish this reading tomorrow:
Hey Craig. I’ve made some changes (hopefully improvements!) to the website:
Only the home page is working at the moment. I will get the other pages working soon, hopefully today.
Please do let me know (in no uncertain terms!) what you think of the new design. I’ve gone “mobile first”, so it should look respectable on your smart phone.
There’s been a little bit of spring cleaning around here today!
I’m trying to get my house in order so I can pass myself off as respectable when I start promoting my new show In The Lab With Jay Jay in earnest.
To that end I have reviewed the look and feel of my wiki. It no longer has that black, green, and orange monospaced font vibe going on, but now uses the relatively unoffensive default theme.
It’s not using the latest Vector theme, but rather the legacy one. This was deliberate because I have a lot of big tables in my wiki (such as on my computers and shopping pages) and the legacy theme plays nicer with those.
I’ve also been tweaking the website for my show, including an updated about page.
The blog, the wiki, and the show also now all use my new favicon which is my take on the Hacker Emblem: