Tuesday, October 24, 2023

Add a AI powered conversational site search bar to your website or blog

R2D2
Everyone having a website or a blog adds a "Search this website" search bar prominently somewhere near the top for visitors to punch in queries and find specific information quickly. With the advent of free and cheap AI engines that use natural language processing techniques to create humanlike conversational dialogue, the ubiquitous "Search this site" box can become far more friendly.

I looked around the 'net and created a AI powered conversational search bar for a travel blog in around 15 minutes. To see how it works, head to interactive The Vagabond Couple Travel Blog Search and type in "Victoria Falls" or any other place that is posted in that blog and has been already been crawled by the engine. Alternatively, try typing in something like FORTRAN into the AI Chat Bot for this blog.

Please be aware the AI engine's knowledge base is confined to just the blog and its posts that it has crawled at the current time, not the wider internet.

This is how I did it.

Friday, June 16, 2023

HECnet-in-a-Box distribution: A virtual machine for quick and effortless connection to HECnet - the global hobbyist DECnet network

HECnet in a box

Here is a Oracle VirtualBox appliance intended for people wanting to get on HECnet (the global hobbyist DECnet computer network) in a few minutes (after obtaining Nodenames and DECnet addresses from one of the HECnet Area owners) .

It comes with a bridge that provides TAP interfaces and a VDE Switch for emulators to connect to, as well as a DECnet/Python instance and a SimH PDP-11/70 running RSX-11M-Plus. Configuration involves answering a few questions pertaining to node names and addresses and firing them up which shouldn't take more than a few minutes. Instructions are in the README file.

Both SimH and QEMU support VDE switches directly, so it is easy to keep adding SimH and QEMU emulated machines to it.

The home partition has 80GB of space as-shipped, and memory is set to 2GB but it is a VirtualBox thing and it is trivial to bump up memory as needed.

Maybe it will be of help to people interested in joining HECnet with minimal effort. It can be downloaded from

Any feedback for the next revision welcome.

Thank you Paul Koning for DECnet/Python and Johnny Billquist for the immaculately curated RSX distribution.

Friday, May 5, 2023

Linux: Keep Disk Usage of System Journal (systemd-journald) in check

systemd-journald sometimes uses up a ridiculous amount of disk space under /var/log/journal. Here are the steps to limit systemd-journald to use 16MB of disk space under /var/log/journal.

1) Edit the configuration file  /etc/systemd/journald.conf and set SystemMaxUse=16M uncommenting it if necessary.

2) Stop the service and its trigger sockets:

# systemctl stop systemd-journald-dev-log.socket systemd-journald.socket systemd-journald
# systemctl status systemd-journald-dev-log.socket systemd-journald.socket systemd-journald

3) If /var/log/journal does not  exist, create it:

# ls -l /var/log/journal/*

If not found:

# mkdir -p /var/log/journal
# systemd-tmpfiles --create --prefix /var/log/journal

4) Clear out existing transient and persistent journals.

# rm -rvf /var/log/journal/*
# rm -rvf /run/log/journal/*

5) Start the service and its trigger sockets:

# systemctl start systemd-journald-dev-log.socket systemd-journald.socket systemd-journald
# systemctl status systemd-journald-dev-log.socket systemd-journald.socket systemd-journald

6) Flush any transient journal entries into persistent storage:

#killall -USR1 systemd-journald # forces in-memory journal to be written to /var/log/journal/*

7) Now you can check the disk space used by journals periodically using:

# du -h /var/log/journal

Note: A quick cleanup of journal storage can be done using the following command which clears up all old entries so that disk usage falls below the indicated parameter:

# journalctl --vacuum-size=2M --rotate