Added something fun, and potentially useless, to this blog: styling for dialogues:

L: Hello?

๐Ÿฆ†: Oh, hello. What's up?

L: Just showing how dialogues look on this site.

๐Ÿฆ†: Oh, wow. Super nice.

I don’t rubber-duck often, but I have a few times in the past, and I’ve published those as blog posts on this site. And it’s been fun. Not only has it been helpful to work through the problem this way, there’s an element of creativity involved in the whole process: imagining two characters working through a problem like this. The exchange is purely fictional, but the benefits are very real.

And part of me is wondering whether to do more of this style of writing. Not only when I’m facing a programming dilemma, but when I’m feelingโ€ฆ I don’t know, “whimsical.” I’ve seen a few other sites having this style of dialogues, both real and imagined; and I’ve recently read posts from others wishing more sites had them.

So all these justifications โ€” along with boredom, a desire to work on something novel, and ship something small โ€” accumulated into this silly little change.

The dialogues themselves are all HTML. If you were to view source, you’ll see that they’re essentially styled blockquotes. It was important to me to make sure that came through correctly on RSS feeds, with all the styling stripped away. In a browser, they’re meant to resemble an imaginary chat experience. I’m hoping this is versatile enough: the one concern I have is that this style of interaction seems to encourage short exchanges between the participants, so I may adjust the styling a little in the future. But I’ll start with this and see how it goes. If you’re curious as to how the CSS looks, you can find it here.

Of course, most people would stop here; but because I’m me, and will take any opportunity to spend several hours on something if I think it would save me a few minutes, I added a module to Blogging Tools to render dialogs from a mini-language. This uses a small parser written in participal that will produce the HTML for a dialog that I can copy and paste directly into the Micro.blog editor. There’s also a tiny bit of AI that would automatically generate a name for the interaction if I were to leave it blank. For that, I’m using “Meta Llama 3.1.8B Instruct Turbo” made available via together.ai (the name is not published, it’s just used for listing the dialogue).

๐Ÿฆ†: Great work.

๐Ÿฆ†: So are you going to use this often?

L: Well, probably not. I think it's one of those features where most of the fun is building it. Then once you have it, you're left wondering what to do with it.

๐Ÿฆ†: Oh, okay.

L: Yeah, it's not the first time I did this. I did it before with marginalias. Built the Hugo short-code, added it to a few posts, then never looked at it again.

๐Ÿฆ†: Oh, yeah. I vaguely remember you doing that before.

L: Yeah, I may actually revisit that some time. Might be that doing something similar to what I've done here with dialogues, i.e. adding a module in this Blogging Tool, will make it that I'm more likely to use this.

๐Ÿฆ†: Well, let's see. The feature is here now, so there's no reason why you wouldn't use this in the future. Maybe next time in one of our rubber-ducking sessions.

L: Yeah, we'll see.

L: Anyway, I'll catch you then.

๐Ÿฆ†: Yeah, see ya later.

So anyway, that’s what I’ve been doing the last week.