When I try to figure how something works in my programming language I often use the service replit. It offers a simple bare bones php environment which is ready to go to test out some stuff, is portable and free to use.

One thing that is slightly annoying is that they only support PHP 7.4 out of the box, but it is very easy to upgrade the php version used to PHP 8. Let’s start with an example:

<?php
$str = "Hello, world!\n";
if (str_contains($str, 'llo')){
  echo 'YUP';
}

This code will not run as is on replit, because the function str_contains doesn’t exist before PHP 8.

Screen Shot 2023 03 09 at 14 39 02

So let’s change that. Click the three dots in the side bar and reveal hidden files:

Screen Shot 2023 03 09 at 14 41 39

Next, open the replit.nix file and change the used php version, like so:

{ pkgs }: {
  deps = [
    pkgs.php //from pkgs.php74
  ];
}

Without needing to do anything else we have instructed nix - the package and config manager underlying much of replit.com’s functionality - to use the latest php package which happens to be php 8.

If we run our little test program now, it’ll work:

Screen Shot 2023 03 09 at 14 47 10

NB: The version of nix on replit is not up to date, so trying to use php82 to get the latest and greatest PHP Version 8.2 won’t work. But php 8.0 is still better than php 7.4

It still is a challenge to find the right words in code reviews, no matter what side I’m on:

As the reviewer I want to give really good reasons, be persuasive but also signal that I know that we live in a contingent universe. If I have knowledge to give I want to explain things well, without coming off as paternalistic.

As the reviewed I want to be open minded, interested, but also being able to challenge things back without coming off as defensive.

Even though I want to use the services that Omg.lol provides, I struggle to do so.

I set up a profile page now, but I feel like this should be a page reachable under my domain (I can probably set this up). I love the idea of a status.log, but I have a micro.blog already and all the content should come from that as the canonical place and be fed into other means to consume my content. I don’t want to produce parallel content or keep things up to date manually.

I’ll keep my omg.log address, because my mastodon account is registered on their instance, but I’m not sure what I’ll use it for otherwise at the moment.

UPDATE: My profile page is now reachable under my domain.

The weird feeling when you realize that you work quicker in php than in typescript nowadays.

Or in other words: I started to rewrite my side-project in php. Because why not? 😅

Weird question: How do normal people handle giving/donations?

How much? For what? Through what channels? Recurring or one-time? On/Off-Line? What else?

I have been a bad donator so far and would like a starting point for doing the right thing, more often. Thanks!