Home For Fiction – Blog

for thinking people


javascript

Walrus Insulter: a Fun Little JavaScript Program

September 9, 2024

Does the word “insulter” exist in a standard dictionary? I don’t know and I’m too bored to search. But the name Walrus Insulter definitely does, in my dictionary. Obviously for those who know him, Walrus Insulter refers to none other than the supreme overlard [sic] of puns, my cartoon character Punning Walrus. If you haven’t met him yet, just click the “Free Walrus” link on the top menu. Or here’s the direct link for the lazy ones among you…

The whole thing, as they usually do, began on a boring cloudy afternoon. I was playing with my home network, trying to find new ways to annoy my neighbors (more of this in a while), when I realized that the best… walrus for the job is of course Punning Walrus.

Walrus Insulter. Screenshot from the program
Walrus Insulter: Don’t mess with the Walrus 😛
(more…)

Let’s Make a JavaScript Poetry Assistant

May 6, 2024

I’ll be honest with you: This JavaScript poetry assistant began as something meant entirely for my own use. I’m in the middle of a creative project (sneak preview: it’s relevant to Medēn), and I wanted something that would produce rhymes in real time. Indeed, the first name of this program was “Real Time Rhymer”.

Somewhere along the way, other things found their way into the program, all because I needed them. So eventually I realized, if I found this JavaScript poetry assistant useful, others might too.

Of course, the fact that it began as something I didn’t intend to share makes it a little bit Frankenstein-like. It works, but it’s a bit sloppily coded (for instance, some stuff work with jQuery, others with plain vanilla JavaScript). Its aesthetics are also a bit all over the place. And because I’m not going to spend more time working on the program itself, since I’ve got the functionality I wanted, I decided to simply share it. You can use it on this page, and the source code is also available if you want to play with it yourself.

javascript poetry assistant. Program screenshot
(more…)

An Iambic Pentameter Checker in JavaScript

January 15, 2024

My iambic pentameter generator has been one of the most popular posts of the blog. To be honest, I’m not sure if that’s still the case or not. Since I completely revamped the blog (actually even earlier), I removed Google and Jetpack analytics. In any case, today we’ll be looking at, essentially, the reverse scenario: We’re making a very simple iambic pentameter checker.

Just in case you need a reminder, an iambic pentameter line consists of ten syllables, of which every other is stressed. For instance, “And you, my sinews, grow not instant old” (from Hamlet).

So, how can we create a JavaScript iambic pentameter checker that tells us if a line is an iambic pentameter or not?

iambic pentameter checker, AI render of Shakespeare using a computer
I couldn’t resist using AI to generate this image of Shakespeare using a laptop. Like all tools, AI tools can be fun and useful, if one understands their limitations…
(more…)