[{"data":1,"prerenderedAt":231},["ShallowReactive",2],{"project-23812894":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":35,"aspects":36,"strip":41,"post_text":43,"what":44,"said":82,"maker_in_thread":158,"shape":162,"grid":165,"attempts":193,"same_week":194,"maker_shows":34,"maker_hidden":223,"reader_version":224,"card":225},"23812894","sed-bin","Sed to C translator written in sed","title","Show HN: Sed to C translator written in sed","https:\u002F\u002Fgithub.com\u002Flhoursquentin\u002Fsed-bin","github.com","lhoursquentin",1594573891,2020,160,14,375,3028,13,"notable","dev_tools","compiler","cli",[24,25,26,27,28],"sed","sed to c","posix sed","sed compiler","translator","mixed",0.278,{"positive":32,"neutral":32,"mixed":33,"critical":34},3,0,1,7,{"performance":37,"execution":38,"idea":40},{"positive":33,"critical":33},{"positive":39,"critical":34},2,{"positive":33,"critical":33},[32,34,33,33,33,33,32,42,42,33,42,32,33,33],5,null,{"problem":45,"audience":43,"pricing":43,"motivation":57,"time_to_build":43,"stack":65,"openness":79,"stage":80,"team_size":81},{"value":46,"source":47,"evidence":48},"Compiles POSIX sed scripts into C for speed","commenter",[49,53],{"id":50,"by":51,"text":52},"23813127","ketanmaheshwari","Nice! In the why part you speculatively mention better speed. Do you have any concrete benchmark results? If fast, the tool would be very useful for my work where I run an…",{"id":54,"by":55,"text":56},"23814854","alphaBetaGamma","Not the author, but I had a similar problem. If you specify many replacement rules in sed, it will run in O(num_replacements * num_lines). You should be able to use a state…",{"value":58,"source":47,"evidence":59},"Speculative speed benefits; a fun project",[60,61],{"id":50,"by":51,"text":52},{"id":62,"by":63,"text":64},"23813158","segfaultbuserr","Not the author, but I see that > no pattern\u002Fhold space overflow checks, currently both limited to 8192 bytes as per the POSIX spec requirement. Going over that limit will most…",[66,75],{"value":24,"source":67,"evidence":68},"maker",[69,71],{"id":70},"post",{"id":72,"by":73,"text":74},"23814298","girst","wow--impressive! the core is here (https:\u002F\u002Fgithub.com\u002Flhoursquentin\u002Fsed-bin\u002Fblob\u002Fmaster\u002Fpar.sed), and it's 600 lines of beautifully commented sed",{"value":76,"source":47,"evidence":77},"C",[78],{"id":62,"by":63,"text":64},"open_source","prototype","unknown",{"praise":83,"objections":100,"requests":112,"questions":127,"alternatives":135},[84,92],{"value":85,"source":47,"evidence":86},"Impressive that it translates itself",[87,91],{"id":88,"by":89,"text":90},"23813732","tgv","So it can translate itself? > Translate the translator (par.sed) with itself: Yes! Congrats!",{"id":72,"by":73,"text":74},{"value":93,"source":47,"evidence":94},"Fun project",[95,96],{"id":50,"by":51,"text":52},{"id":97,"by":98,"text":99},"23814572","easytiger","Genuinely very cool. Nice work.",[101,108],{"value":102,"source":47,"evidence":103},"Limited to 8192-byte pattern and hold space, may segfault",[104,105],{"id":62,"by":63,"text":64},{"id":106,"by":11,"text":107},"23813771","Yep that's exactly right :) ! To clarify my statement POSIX requires at least 8192 bytes for the pattern and hold space, and I chose to allow at most 8192 bytes here, which…",{"value":109,"source":47,"evidence":110},"C code is rough and unsafe, no overflow checks",[111],{"id":62,"by":63,"text":64},[113,123],{"value":114,"source":47,"evidence":115},"Support for awk or Python translation",[116,120],{"id":117,"by":118,"text":119},"23813621","sheerun","Now one for Awk and Python please :)",{"id":121,"by":118,"text":122},"23817582","I mean awk-to-Python transcompiler, it would be useful for datascience. I wonder if it's possible to use awka to create such thing.",{"value":124,"source":47,"evidence":125},"Benchmark results",[126],{"id":50,"by":51,"text":52},[128],{"value":129,"source":47,"evidence":130},"Does it run faster than GNU sed and is there a benchmark?",[131,132],{"id":50,"by":51,"text":52},{"id":133,"by":11,"text":134},"23813615","No concrete benchmarks no, I just timed a few scripts I had on hand and generated a bunch of others, and I saw compiled ones performed slightly faster than GNU and toybox sed, so…",[136,143,147,154],{"value":137,"source":47,"evidence":138},"elvm (C to sed)",[139],{"id":140,"by":141,"text":142},"23814036","rkeene2","And for the other direction (C->sed): https:\u002F\u002Fgithub.com\u002Fshinh\u002Felvm",{"value":144,"source":47,"evidence":145},"lex-based sed compilation via bash function",[146],{"id":54,"by":55,"text":56},{"value":148,"source":47,"evidence":149},"awka (awk to C compiler)",[150],{"id":151,"by":152,"text":153},"23814663","mftrhu","There's already an awk-to-C compiler [1], even if it seems to be unmaintained. Python has a couple of them, more or less constrained, including Nuitka [2]. [1]…",{"value":155,"source":47,"evidence":156},"Nuitka (Python compiler)",[157],{"id":151,"by":152,"text":153},{"comments":39,"answered":34,"key":159},[160,161],{"id":106,"text":107},{"id":133,"text":134},{"commenters":163,"max_depth":32,"maker_replies":39,"first_comment_mins":164,"lifespan_hours":18},11,28,[166,168,170,172,176,178,180,181,183,184,185,188,190,191],[50,33,32,167,51,33],"project\u002Fneutral\u002Fperformance",[62,33,34,169,63,33],"project\u002Fcritical\u002Fexecution",[106,33,33,171,11,34],"project\u002Fneutral\u002Fexecution",[173,33,33,174,175,33],"23813348","other\u002Fneutral\u002Fnone","jessaustin",[177,33,33,174,51,33],"23813426",[133,33,33,179,11,34],"maker\u002Fneutral\u002Fperformance",[54,33,32,167,55,33],[72,34,42,182,73,33],"project\u002Fpositive\u002Fexecution",[88,39,42,182,89,33],[140,32,33,174,141,33],[97,186,42,187,98,33],4,"maker\u002Fpositive\u002Fnone",[117,42,32,189,118,33],"project\u002Fneutral\u002Fidea",[151,42,33,174,152,33],[121,42,33,192,118,33],"other\u002Fneutral\u002Fidea",[],[195,199,204,209,214,219],{"id":196,"name":197,"points":198,"category":20},"23820201","Primo",575,{"id":200,"name":201,"points":202,"category":203},"23802317","Trail Router",402,"consumer_social",{"id":205,"name":206,"points":207,"category":208},"23830195","Is It Worth the Cost?",319,"web_saas",{"id":210,"name":211,"points":212,"category":213},"23795779","Learnawesome.org",216,"learning_science",{"id":215,"name":216,"points":217,"category":218},"23782053","Screenr",118,"productivity",{"id":220,"name":221,"points":222,"category":218},"23812178","Notado",96,false,"v2",{"id":226,"name":5,"line":6,"ai":223,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":227,"top":18,"kw":228,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":229,"url":9,"mix":230,"praise":85,"objection":102,"sub":21},23812894,0.28,[24,25,26,27,28],"31000035505300",[32,32,33,34],1793991012931]