1
0
Fork
You've already forked harelang
0
Small programs written in The Hare Programming Language. Harelang. IRC-client sic.ha
Find a file
2024年09月30日 14:42:21 +02:00
sic resync with host 2024年09月30日 14:36:30 +02:00
sicfmt resync with host 2024年09月30日 14:36:30 +02:00
trans resync with host 2024年06月06日 06:35:49 +00:00
LICENSE.txt Initial commit: sic.ha 2023年12月06日 08:02:36 +01:00
README.md resync with host 2024年09月30日 14:42:21 +02:00

Harelang

Small programs in The Hare Programming Language

  • sic.ha A Simple IRC client written in the Hare Programming Language.

  • sicfmt.ha Formating output of sic.ha to a more pleasant appearance.

  • trans.ha A super simple offline AI-free translation program.

System requirements

  • Linux, with minimal adoptions where ever Hare runs.

  • Hare, here currently running '0.24.2-rc2-36-gfa58bc7'

sic.ha A Simple IRC Client

I'm not a heavy user of IRC, but from time to time IRC turns out to be a fast and friendly help. That said, i prefer a simple, self made client which i can understand and maintain.

The IRC client should not be responsible for formating incomming text messages or writing outgoing my messages. That is what text ediors are made for.

Configuration happens in sic.ha, chapter CONFIG. TODO: provide a makefile in order to set compilation time.

# Build a new executable.
$> hare build -o sicbin sic
# Called without parameters the executable prints a usage info.
$> ./sicbin
# Called with option -d default values are used to connect and join.
$> ./sicbin -d
# Connect to libre.chat with password as me8 and join #hare-soc and #hare
$> ./sicbin -s irc.libera.chat -k '****' -n me8 -j '#hare-soc,#hare'

sicfmt.ha Formating output of sic.ha to a more pleasant appearance.

Limit line length of PRIVMSG content and add a smol touch of colour.

# Build a new executable.
$> hare build -o sicfmtbin sicfmt
# Pipe from sicbin to sicfmtbin.
# Exit with <Ctrl-c>
$> ./sicbin <args> | ./sicfmtbin

trans.ha A super simple offline AI-free translation program.

Google used to provide a translation service. I was quit happy with it until Google made a habbit of asking me if i am happy with it.

trans.ha is a super simple dictionary lookup program, made to work with a dictionary provided by tu-chemnitz. Yes, it could be done with plain grep in a bash-one-liner, too.

Configuration happens in trans.ha, chapter CONFIG.

TODO: simpler UI.

# Build a new executable.
$> hare build -o transbin trans
# Called without parameters the executable prints a usage info.
$> ./transbin
# Called with only a word as parameter, it prints all lines containing it.
$> ./transbin Waldhäckensänger
Waldheckensänger {m} [ornith.] 
: forest scrub robin
$> ./transbin "forest scrub robin"
Waldheckensänger {m} [ornith.] 
: forest scrub robin

License

 ;======================================================================
 ; sic.ha	A Simple IRC Client in The Hare Programming Language.
 ; sicfmt.ha Formating output of sic.ha to a more pleasant appearance.
 ; trans.ha A super simple offline AI-free translation program.
 ; GNU GENERAL PUBLIC LICENSE, Version 3.0, http://www.gnu.org/licenses/
 ; https://codeberg.org/sts-q/harelang
 ; Copyright (C) 2023 sts-q
 ; https://sts-q.codeberg.page
 ;======================================================================
 ; These programs are distributed in the hope that they will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 ; GNU General Public License for more details.
 ;======================================================================

Links

hare

sic.c

Contact

Ping sts-q at libera.chat channel #oberon.

This repository was first published at codeberg at 2023年12月06日.