[COFF] A slack clone in 5 lines of bash

Edouard Klein edouardklein at gmail.com
Sun Jul 2 02:00:07 AEST 2023


Dear Old Farts,

I've written a chat system that relies at its core on UNIX's permission
system.

All the explanations are here:
https://the-dam.org/docs/explanations/suc.html

I thought it would be of interest to the list as it has one foot in the
past (using system primitives from the 70's for access control) and one
foot in the future: (optionally) using GNU Guix's declarative
configuration to create the necessary users, groups, and files.

I know most of you have used (and some maybe still do) talk et al. This
system is even simpler, just a forever loop:

while /usr/bin/true
do
    read -r line || exit 0  # EOF
    /usr/bin/echo "$(/usr/bin/date --iso-8601=seconds)"\
        "$(printf "%-9s" "$(/usr/bin/id --user --name --real)")" \
        "$line" >> /var/lib/suc/"$1"
done

I'd be happy to hear any comments or to welcome you on the Dam, where we
test this stuff.

Cheers !

Edouard.


More information about the COFF mailing list