WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: awk oddities  (Read 1415 times)

Offline mocore

  • Sr. Member
  • ****
  • Posts: 499
  • ~.~
awk oddities
« on: October 24, 2021, 03:29:45 AM »
hi *

heare are afew  oddities awk found while looking for other compleatly diffrent awk related things

https://github.com/djanderson/aho -  A git implementation in awk


https://github.com/huijunchen9260/fm.awk - File manager written in awk



Offline mocore

  • Sr. Member
  • ****
  • Posts: 499
  • ~.~
Re: awk oddities
« Reply #1 on: November 29, 2023, 10:31:58 PM »

a few more

https://github.com/xonixx/makesure # Simple task/command runner with declarative goals and dependencies
https://github.com/xonixx/makesure/blob/main/makesure.awk

https://github.com/ttv1/aok/blob/master/docs/index.md

Quote
AOK is a pre-processor to AWK code that adds:

- Abstract data types;
- Easy methods to list the  attributes and operations of that data;
- Object constructors;
- Nested object constructors.
- Multi-line quotes
- A _dot_ notation for easy reference to nested structures.

As an example of the last point,

```c
emp.name.lname
```

expands to

```c
emp["name"]["lname"]
```

By the way, the magic text substitution  for implementing the above is:

```c
gensub( /\.([a-zA-Z_])([a-zA-Z0-9_]*)/,
        "[\"\\1\\2\"]",
   "g",
   $0
     )
```

https://github.com/xonixx/gron.awk # Similar to tomnomnom/gron but in Awk.

Offline mocore

  • Sr. Member
  • ****
  • Posts: 499
  • ~.~
Re: awk oddities
« Reply #2 on: December 01, 2023, 10:16:31 PM »

https://github.com/Gumnos/kv.awk # A dumb key/value store implemented in awk & plain-text files

 perhaps this could be a usefull addition to base  ;)
 to create a sort of
 tinycore registry  :P  to store configuration info etc 
 
eg
Code: [Select]
kv.awk TCLM add Registry-Equivalents_and_alternatives  https://en.wikipedia.org/wiki/Windows_Registry#Equivalents_and_alternatives ;D

 ???
Quote from: en.wikipedia.org/wiki/Windows_Registry#Equivalents_and_alternatives
In contrast to Windows Registry's binary-based database model,
some other operating systems use separate plain-text files for daemon and application configuration,
but group these configurations together for ease of management.

 In Unix-like operating systems (including Linux) that follow the Filesystem Hierarchy Standard,
system-wide configuration files (information similar to what would appear in HKEY_LOCAL_MACHINE on Windows)
are traditionally stored in files in /etc/ and its subdirectories, or sometimes in /usr/local/etc.
Per-user information (information that would be roughly equivalent to that in HKEY_CURRENT_USER) is stored in hidden directories and files (that start with a period/full stop) within the user's home directory.
However XDG-compliant applications should refer to the environment variables defined in the Base Directory specification.[56]

Offline mocore

  • Sr. Member
  • ****
  • Posts: 499
  • ~.~
Re: awk oddities
« Reply #3 on: December 02, 2023, 09:18:22 PM »

 # AWK As A Major Systems Programming Language — Revisited
 https://www.skeeve.com/awk-sys-prog.html

 this is particularity interesting imho and contains more links and a du.awk
 as well as some insight into the history of awk 

 the https://github.com/dubiousjim/awkenough readme list some murky edge cases  and workarounds

 Shell, Awk, and Make Should Be Combined
 https://www.oilshell.org/blog/2016/11/13.html
 interesting comparison's
 & more links to other  third-party "standard libraries"  ( awkenough , awk-libs , and the 'A-Library-of-awk-Functions' section in the gawk manual )

 make  implemented in awk

 https://benhoyt.com/writings/awk-make/
 https://github.com/benhoyt/awkmake


 another stdlib
 https://github.com/IMAGE-ET/stdlib OSIX standard library for Awk and shell

 Speculative View on How FP Could Work in AWK
 http://www.btellez.com/posts/fp-awk.html

 Awk, Unix, and functional programming
 http://trevorjim.com/awk-unix-and-functional-programming/

Offline mocore

  • Sr. Member
  • ****
  • Posts: 499
  • ~.~
Re: awk oddities : Building a roguelike in awk
« Reply #4 on: January 07, 2024, 07:55:50 PM »

https://jellepelgrims.com/posts/awkventure  8)

an interesting write up of this https://github.com/jpelgrims/awkventure "Console roguelike written in awk " project

... much like huijunchen9260/fm.awk file manager awkventure  includes some basic "Text-based user interface" ( read keypress / draw on terminal )

*tangent:List of projects that provide terminal user interfaces https://github.com/rothgar/awesome-tuis *