Hacker Newsnew | past | comments | ask | show | jobs | submit | gramakri2's commentslogin

Missed chance to end the article mid sentence


IMO, newer PHP is still very readable. I programmed with C++ for a decade, but I can safely say that I cannot understand a modern C++ code base anymore.


Are the new features really readable? I have no idea what this code from the OP is meant for:

    #[SkipDiscovery(static function (Container $container): bool {
        return ! $container->get(Application::class) instanceof ConsoleApplication;
    })]
    final class BlogPostEventHandlers
    { /* … */ }
As a side note, even PHP's official wiki cannot highlight correctly the multiline attributes behind a "#". See https://wiki.php.net/rfc/closures_in_const_expr


The examples in TFA are terrible and I don't get why it was necessary to jump the gun by submitting that article instead of actually waiting for the release and the official release page with more carefully designed examples.

Given that the cat effectively is out of the bag, does the example on the release page (sneak preview) make more sense to you: https://www.php.net/releases/8.5/en.php#closures-in-const-ex...?

> As a side note, even PHP's official wiki cannot highlight correctly the multiline attributes behind a "#"

Yes, unfortunately the off-the-shelf software of the Wiki uses a custom-built highlighter instead of the `highlight_string()` function that is bundled with PHP: https://www.php.net/manual/en/function.highlight-string.php


> The examples in TFA are terrible and I don't get why it was necessary to jump the gun by submitting that article instead of actually waiting for the release and the official release page with more carefully designed examples.

Clout.


I'm glad it's not just me who finds the syntax of some of the new PHP features confusing and complicated. And it's not just this version either, they keep adding weird "sugar" in each new release.


> Using web versions

ahem, heard of cloudflare? web hosters and developers are voluntarily centralizing themselves.


quay.io is down


It was in read only mode,now available again


npm registry also down


Where can I download the pdf? It seems the link points to itself


It's hidden in the "Copy" drop down at the top right.

https://http3-explained.haxx.se/~gitbook/pdf?limit=100


Where did you read this?


They said it in Slack. There is a screenshot on my own blog post here:

https://jamesoclaire.com/2025/05/27/how-to-self-host-your-ow...


Oh the memories. How does this work? Is it built using an emulator of old VB6 code ? (didn't realize it was opensource) . Or is everything built from scratch?


Hey, author here, I built everything from scratch. It supports only a subset of VB6 so it wasn't difficult or long. I wrote an interpreter for VB6 code


Man hats off to you. Great work


How does one backup a sqlite without stopping the app or disrupting service? I couldn't find a simple answer to this


There is a generic way to do it that works with SQLite and other databases, including Postgres. On Linux, take a filesystem or block device coherent snapshot, take your backup of all the SQLite files from the snapshot, then delete the snapshot.

The app or service continues to run without disruption, and the backup is a coherent database image. Perhaps you have other state in addition to the database, or multiple databses. For example cache files. This covers them too, if they are all in the same snapshot.

There are many ways to take a snapshot: ZFS and btrfs offer a filesystem command, and any Linux filesystem, such as ext4, can be snapshotted with LVM or LVM-thin. Well known cloud providers like AWS, GCP, Azure also provide ways to snapshot block devices, through their APIs. However, to ensure a coherent image, it may be necessary to use the Linux `fsfreeze` command around API calls.

The database backup files can have incomplete transactions, but if the files are restored it will be as if the OS was abruptly stopped at the moment of the snapshot. SQLite and other good databases are designed to recover well from this sort of abrupt stop, without corrupting the database. They clean up incomplete transactions on recovery.


The typical solution is https://litestream.io/. Comparatively easy to setup for most usages of sqlite.


With sqlite3 -backup There's an online backup api


The link to license is broken. It links to LICENSE.md instead of LICENSE


Thanks for noticing this. Just pushed up a fix!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: