tokay
Awk-Batteries
Our great sponsors
tokay | Awk-Batteries | |
---|---|---|
4 | 8 | |
230 | 12 | |
2.2% | - | |
8.7 | 1.8 | |
about 1 month ago | over 2 years ago | |
Rust | Awk | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
tokay
-
The Awk Programming Language, Second Edition
[0]: https://github.com/tokay-lang/tokay
- GitHub - tokay-lang/tokay: Tokay is a programming language designed for ad-hoc parsing, inspired by awk.
-
Hacker News top posts: May 13, 2022
Tokay Programming Language\ (21 comments)
-
Tokay Programming Language
I am very interested in this project as a "better awk" is something I have often fantasized about.
I read all of the documentation that's available on https://tokay.dev/tokay-docs/, but unfortunately it never really... describes itself? Many sections, including the section on "parselets" are just unwritten. "Consumable" values are mentioned but never described (there is a "stub" section that doesn't really explain what the term means).
It begins with a pretty detailed description of value "severity" but doesn't really motivate why the concept exists. (I think that it's (basically) a way to very concisely discard certain matches? When there are "more important" matches around them?)
There are no examples of how I could use Tokay to "parse" something -- there are lots of examples dotted through the docs, but none of them demonstrate working with structured file formats, and they feel a little bit contrived.
I'm not complaining here: this project is not making any false claims about its status, the docs are clearly and explicitly unfinished, it is very clear that Tokay is still under active development.
But I want to learn more about it! I came away from that with a sense that, this has the potential to be really useful to me, but without any concrete evidence to support that. I guess the next step is to download the source and start reading through the tests.
All this to say: please highlight some examples showcasing situations where Tokay shines! (Parsing CSVs containing quoted strings was making the rounds recently, right? What does that look like in Tokay?)
Oh, actually, the GitHub readme has an example that is more involved than any in the documentation: https://github.com/tokay-lang/tokay
_ : [ \t]+ # redefine whitespace to just tab and space
Awk-Batteries
-
The Awk Programming Language, Second Edition
It's nice that everyone is supporting this, I've written a portable awk module that takes control of the parsing and it is SLOW (and a little buggy). I'm a little bummed that nobody will use it but this is truly a step in the right direction.
I guess for the people that are still using nawk, you can set up an AWK envvar so you can { awk -f $AWKU/ucsv.awk -f <(echo '{print NR, $1}') }
https://github.com/Nomarian/Awk-Batteries/blob/master/Units/...
-
Need help with awk script that keeps giving me syntax errors
if you have gawkextlib, you can -i csv, you can also download this and put it in your $AWKPATH then you just -i ucsv and use the csv file as normal. if you need an array with headers let me know.
-
Modernizing AWK, a 45-year old language, by adding CSV support
I wrote a parser that does what -F, does but correctly, you can see that its actually very difficult. Not only that, but there are extensions to csv, some csv have a header which means that instead of $1 $2 $3 ..., you just name the field instead, which means you have to ignore the first record. there's also other things, but csv is a difficult format to parse.
- Using AWK with CSV Files
-
Python was listed on "Harmful things", but why though ? http://harmful.cat-v.org/software
My attempt in awk
- Understanding AWK
- Understanding Awk
-
Getting better at Linux with mini-projects
awk lua
What are some alternatives?
sparklines - Text-based sparklines for the command line mimicking those of Edward Tuft.
microperl-standalone
butter - A tasty language for building efficient software. WIP
react-snippets - A sample of useful snippets in React
csvquote - Enables common unix utlities like cut, awk, wc, head to work correctly with csv data containing delimiters and newlines
textimg - Command to convert from color text (ANSI or 256) to image.
awk - Random AWK code
mech - 🦾 Main repository for the Mech programming language. Start here!
maga-csv - GAWK CSV extension
erg - A statically typed language compatible with Python
busybox-w32 - WIN32 native port of BusyBox.