hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

10K
active users

Joshua Wood

Webmentions: how I used 1990s technology to avoid writing JavaScript.

> When I started building websites over 20 years ago, I used Perl and CGI to run simple scripts, like a guestbook (I wrote my own). I prefer Ruby these days—and Perl has deprecated CGI—but could that approach still work? I thought it would be fun to try. It turns out it does work!

Please like/boost/reply to help me load test! 😁

joshuawood.net/webmentions

Joshua Wood · WebmentionsHave you heard of webmentions? They’re similar to pingbacks—but modern—and allow websites to notify each other about different types of activity (like replies on social media). As of 2017, the protocol is a W3C recommendation.

Looks like it's working!

@meercat0 I figured if it still works in 2023, it will still work in 2043. 😂

@benjaminwood yes! Bridgy polling is kind of slow by default, so it should appear on the website in a bit.

@wood I was talking to @getajobmike at RailsConf last year and I believe it was the Sidekiq website he said he was still running on Ruby CGI. So it's definitely still being used in the wild!

@jamie @getajobmike hah, that was Mike’s first comment when I told him about this recently. I’d thought about using that, but wanted to return to my roots. 😂

I’ll probably port this to Ruby if I ever have to expand the functionality. (I.e. if Webmentions.io ever goes away for some reason.)

@wood @getajobmike Oh, I misunderstood! I thought you meant you were doing it in Ruby, but used to do stuff like that in Perl. Just got to the part of the post where it said you were using Perl CGI, though! 😄

Perl CGI was also where I got my start in building for the web! 🙌🏼

@jamie @getajobmike haha, yeah! It was the first software I ever released. I had a guestbook script, and a photo gallery. I really wish I could find those archives.

@jamie @wood Yep, everything at billing.contribsys.com/ is CGI.

Hacking together a system for integration testing CGI scripts was a fun afternoon.

billing.contribsys.comContributed Systems Billing Portal

@wood Two questions and a comment:

1) You avoid a 3rd-party service like #Netlify because you "want [your] #blog to run forever,” but then use the Webmention.io #SaaS?

2) Did you use the classic #Perl #CGI module? You might enjoy the simpler and faster CGI::Tny instead. Here's a comparison: metacpan.org/pod/CGI::Tiny#COM

Comment: A lot of Perl is “legacy," but new #WebDev projects typically use #PSGI. An article on lifting to a modern framework: metacpan.org/pod/CGI::Alternat

webmention.ioWebmention.io

@mjgardner wow, thanks for the suggestions. I'll dig into these. Yes, I'm using the CGI module with mod_cgid in Apache.

You're right about Webmention.io—it's not an ideal dependency. I decided to accept this tradeoff because I had limited time and didn't want to build directly on the protocol. My requirement of not using a 3rd-party provider of "serverless functions" is still satisfied, in any case, and if Webmention.io goes away, I can take the time to support the protocol directly.

@mjgardner no, I missed that one! Looks like some good insurance.

@wood this is super cool! Love it!