Awk-JVM
Languages and libraries
virtual machine
SHOW HN2020
180points
27comments
#322of 3,028 in 2020
Top 11%of 2020 by points
How HN took it
MixedNo clear lean
5 positive, 5 neutral or asking, 0 mixed, 1 critical, out of 11 comments about the project. Thread score +0.33.
Idea: 3 for, 0 againstExecution: 2 for, 0 againstDocs: 0 for, 1 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Cool, fun project; an impressive accomplishment
From 3 comments
This is definitely an accomplishment. Someone show this to Kernighan.
WFHRenaissance on HNMy first thought reading the headline was that this was an implementation of Awk that ran on a JVM. But no, this is the reverse of that. This is way is far less useful but…
loudmax on HNAWK is a very underappreciated language from the past, simple and fun to use. You did a very nice job, thanks!
zserge on HN
Implementation in awk is elegant
From 1 comment
> Has AWK changed significantly in the last 30 years Actually it did, exactly the dialect used by the author of OP, Gawk got some very new and, in the context of awk language…
acqq on HN
Objections
Reads class files via hexdump, which is not portable across systems
From 2 comments
It might be useful to provide an example using POSIX od(1) instead of hexdump(1). hexdump is actually a BSD utility. The Debian Linux version is ported from FreeBSD, while the…
wahern on HNNot the main point, and this is a very cool dancing bear. But, on this point: "since none of the awks can read binary, you first need to pipe the classfile through hexdump" Gawk…
tyingq on HN
Requests
Port to POSIX awk for portability
From 1 comment
But awk is usually part of the default system install, unlike Lua. And while GNU awk isn't as common, it's still far more likely to be available than Lua, especially on Linux…
wahern on HN
Questions
How does the five-dimensional array get populated?
From 2 comments
METHODS[m]["attributes"][a]["data"][4] Is this a five dimensional array? How does it get populated? EDIT: I see it now in the code. Excellent!
ketanmaheshwari on HNYes, a bit tricky. You don't need to declare arrays in AWK, amazingly. Interesting how long it takes to get ergonomic gestures just right in languages.…
leoh on HN
Alternatives named
Lua as a more robust language for this
From 1 comment
Honestly, maybe the most robust workaround is to rewrite it in another language... Lua might be a good candidate: it has a similar syntax and also uses 1-based arrays.
ufo on HN
jawk, an AWK implementation on the JVM
From 1 comment
Such a thing does exist: http://jawk.sourceforge.net/ ...and that naturally leads to pondering whether an implementation of AWK that runs on the JVM can then run an…
userbinator on HN