[{"data":1,"prerenderedAt":237},["ShallowReactive",2],{"project-23612910":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":18,"aspects":35,"strip":41,"post_text":42,"what":43,"said":54,"maker_in_thread":125,"shape":131,"grid":136,"attempts":199,"same_week":200,"maker_shows":40,"maker_hidden":229,"reader_version":230,"card":231},"23612910","Awk-JVM","A toy JVM in Awk","title","Show HN: Awk-JVM – A toy JVM in Awk","https:\u002F\u002Fgithub.com\u002Frethab\u002Fawk-jvm","github.com","rethab",1592915008,2020,180,27,322,3028,11,"notable","languages","virtual machine","cli",[24,25,26,27,28],"jvm","awk","gawk","bytecode interpreter","java virtual machine","mixed",0.333,{"positive":32,"neutral":32,"mixed":33,"critical":34},5,0,1,{"execution":36,"docs":38,"idea":39},{"positive":37,"critical":33},2,{"positive":33,"critical":34},{"positive":40,"critical":33},3,[33,40,33,33,33,33,33,33,40,33,40,34,33,32,33,40,40,33,32,33,33,32,32,33,33,32,33],null,{"problem":42,"audience":42,"pricing":42,"motivation":42,"time_to_build":42,"stack":44,"openness":52,"stage":53,"team_size":53},[45],{"value":46,"source":47,"evidence":48},"AWK (GNU gawk)","maker",[49],{"id":50,"by":11,"text":51},"23616552","Author here. As I wrote in the README, this uses GAWK instead of plain AWK. Conveniences of GAWK over AWK in a nutshell: - functions - several additional functions (eg. bit…","open_source","unknown",{"praise":55,"objections":79,"requests":91,"questions":98,"alternatives":110},[56,72],{"value":57,"source":58,"evidence":59},"Cool, fun project; an impressive accomplishment","commenter",[60,64,68],{"id":61,"by":62,"text":63},"23615855","WFHRenaissance","This is definitely an accomplishment. Someone show this to Kernighan.",{"id":65,"by":66,"text":67},"23620498","loudmax","My 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…",{"id":69,"by":70,"text":71},"23617243","zserge","AWK is a very underappreciated language from the past, simple and fun to use. You did a very nice job, thanks!",{"value":73,"source":58,"evidence":74},"Implementation in awk is elegant",[75],{"id":76,"by":77,"text":78},"23620737","acqq","> 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…",[80],{"value":81,"source":58,"evidence":82},"Reads class files via hexdump, which is not portable across systems",[83,87],{"id":84,"by":85,"text":86},"23618873","wahern","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…",{"id":88,"by":89,"text":90},"23619768","tyingq","Not 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…",[92],{"value":93,"source":58,"evidence":94},"Port to POSIX awk for portability",[95],{"id":96,"by":85,"text":97},"23618568","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…",[99],{"value":100,"source":58,"evidence":101},"How does the five-dimensional array get populated?",[102,106],{"id":103,"by":104,"text":105},"23615973","ketanmaheshwari","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!",{"id":107,"by":108,"text":109},"23616058","leoh","Yes, 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.…",[111,118],{"value":112,"source":58,"evidence":113},"Lua as a more robust language for this",[114],{"id":115,"by":116,"text":117},"23616820","ufo","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.",{"value":119,"source":58,"evidence":120},"jawk, an AWK implementation on the JVM",[121],{"id":122,"by":123,"text":124},"23622819","userbinator","Such a thing does exist: http:\u002F\u002Fjawk.sourceforge.net\u002F ...and that naturally leads to pondering whether an implementation of AWK that runs on the JVM can then run an…",{"comments":37,"answered":33,"key":126},[127,128],{"id":50,"text":51},{"id":129,"text":130},"23625224","I actually simply didn't know it was possible based on some googling. But thanks for hint. Someone also opened an issue on github giving me a hint on how to replace hexdump[0].…",{"commenters":132,"max_depth":133,"maker_replies":37,"first_comment_mins":134,"lifespan_hours":135},19,6,227,29,[137,139,140,142,146,148,150,153,155,157,160,163,165,167,169,172,175,176,178,179,182,185,187,188,189,192,195],[50,33,33,138,11,34],"maker\u002Fneutral\u002Fexecution",[115,33,40,138,116,33],[96,33,33,141,85,33],"commenter\u002Fneutral\u002Fnone",[143,33,33,144,145,33],"23622552","other\u002Fneutral\u002Fnone","Twirrim",[147,33,33,144,89,33],"23623802",[149,33,33,144,145,33],"23631326",[151,33,33,141,152,33],"23617594","mzs",[154,33,33,141,85,33],"23618605",[84,33,40,156,85,33],"project\u002Fneutral\u002Fdocs",[158,33,33,144,159,33],"23621732","flukus",[161,33,40,162,123,33],"23622782","project\u002Fneutral\u002Fnone",[88,34,34,164,89,33],"project\u002Fcritical\u002Fdocs",[129,34,33,166,11,34],"maker\u002Fpositive\u002Fexecution",[61,37,32,168,62,33],"project\u002Fpositive\u002Fidea",[170,40,33,144,171,33],"23622761","siraben",[103,173,40,174,104,33],4,"project\u002Fneutral\u002Fexecution",[107,173,40,174,108,33],[177,173,33,144,89,33],"23620081",[69,32,32,168,70,33],[180,32,33,144,181,33],"23619545","enriquto",[183,32,33,144,184,33],"23619804","yjftsjthsd-h",[76,32,32,186,77,33],"project\u002Fpositive\u002Fexecution",[65,133,32,168,66,33],[122,133,33,144,123,33],[190,133,33,144,191,33],"23625153","tennineeight",[193,194,32,186,89,33],"23629390",7,[196,197,33,144,198,33],"23629648",8,"exabrial",[],[201,206,210,215,219,224],{"id":202,"name":203,"points":204,"category":205},"23591953","PJDL",337,"hardware",{"id":207,"name":208,"points":209,"category":20},"23610527","IHP",280,{"id":211,"name":212,"points":213,"category":214},"23616878","QuestDB",271,"data",{"id":216,"name":217,"points":218,"category":20},"23602008","Web3Torrent",206,{"id":220,"name":221,"points":222,"category":223},"23595430","Browservice",193,"dev_tools",{"id":225,"name":226,"points":227,"category":228},"23561904","Flatend",145,"infrastructure",false,"v2",{"id":232,"name":5,"line":6,"ai":229,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":233,"top":18,"kw":234,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":235,"url":9,"mix":236,"praise":57,"objection":81,"sub":21},23612910,0.33,[24,25,26,27,28],"030000003031050330500550050",[32,32,33,34],1794036592642]