What are you working on? - Programming On Unix

Users browsing this thread: 3 Guest(s)
seninha
Long time nixers
(07-08-2021, 11:53 AM)zge Wrote: I just finished cleaning up a IRC library I wrote for (GNU) AWK a few years ago, and published it here: https://git.sr.ht/~pkal/irc.awk

Would be interested in seeing what others here think of it.

This shebang is not portable:
Code:
#!/usr/bin/gawk -f irc.awk -f

Posix requires only one argument to the interpreter, more information here.
opfez
Members
(07-08-2021, 06:04 PM)seninha Wrote: This shebang is not portable:
Code:
#!/usr/bin/gawk -f irc.awk -f

Posix requires only one argument to the interpreter, more information here.

I mean, they did specify that it was written in GNU AWK, so POSIX compatibility is already out the window.
zge
Long time nixers
(07-08-2021, 06:04 PM)seninha Wrote:
(07-08-2021, 11:53 AM)zge Wrote: I just finished cleaning up a IRC library I wrote for (GNU) AWK a few years ago, and published it here: https://git.sr.ht/~pkal/irc.awk

Would be interested in seeing what others here think of it.

This shebang is not portable:
Code:
#!/usr/bin/gawk -f irc.awk -f

Posix requires only one argument to the interpreter, more information here.

Didn't know about that, I can update the README and replace the shebang with a manual invocation. But as Opfez says and the README notes, the library relies on GNU AWK for now, so portability is a lesser priority.
seninha
Long time nixers
Speaking of awk, I formalized a plain text markup language I have been using for ages in a awk script that converts it to troff -ms or html.
I call it incipit, and it is heavily based on non-ASCII Unicode characters for marking things up. For example, the section character (§) is used to mark up section headers, and the bullet character (•) is used to mark up bulleted lists. Since those characters are rarely used in a text, I do not have to escape things out (in Markdown I often had to escape *s, =s and #s). Another feature is that tables are more readable with box drawing characters.