[{"data":1,"prerenderedAt":299},["ShallowReactive",2],{"project-15111390":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":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":44,"post_text":45,"what":46,"said":69,"maker_in_thread":157,"shape":169,"grid":173,"attempts":237,"same_week":261,"maker_shows":32,"maker_hidden":291,"reader_version":292,"card":293},"15111390","Pest","Fast parser generator written in Rust","title","Show HN: Pest – Fast parser generator written in Rust","https:\u002F\u002Fgithub.com\u002Fpest-parser\u002Fpest","github.com","dragostis",1503850985,2017,108,27,420,2242,19,"notable","languages","parser generator","library",[21,24,25,26,27],"peg","rust","parsing expression grammar","packrat parser","debated",-0.072,{"positive":31,"neutral":32,"mixed":33,"critical":34},6,3,0,5,14,{"performance":37,"design":39,"idea":40,"execution":41,"docs":42},{"positive":38,"critical":38},1,{"positive":33,"critical":38},{"positive":38,"critical":38},{"positive":38,"critical":33},{"positive":38,"critical":43},2,[38,33,38,33,34,32,33,33,32,33,33,34,33,34,32,33,33,33,34,38,38,38,33,33,33,34,34],null,{"problem":47,"audience":45,"pricing":45,"motivation":45,"time_to_build":45,"stack":59,"openness":67,"stage":68,"team_size":67},{"value":48,"source":49,"evidence":50},"Generating parsers from grammar definitions in Rust","inferred",[51,55],{"id":52,"by":53,"text":54},"15112487","z1mm32m4n","The confusion here is because Pest is not, in fact, a parser. It's a parser generator: you can use it to generate parsers (maybe even a parser for Rust), but it is not in itself…",{"id":56,"by":57,"text":58},"15112275","DC-3","What type of parser does this produce?",[60],{"value":61,"source":62,"evidence":63},"Rust","maker",[64,66],{"id":65},"post",{"id":52,"by":53,"text":54},"unknown","beta",{"praise":70,"objections":79,"requests":109,"questions":115,"alternatives":130},[71],{"value":72,"source":73,"evidence":74},"Speed is good and the DSL feels familiar","commenter",[75],{"id":76,"by":77,"text":78},"15115472","turboladen","Been using this for a couple weeks now and dig it. The DSL feels familiar and the speed is yummy. I'd been using LALRPOP for some months; I dig it too, but just couldn't get the…",[80,95,102],{"value":81,"source":73,"evidence":82},"Title suggested it was a Rust AST parser, not a parser generator",[83,87,91],{"id":84,"by":85,"text":86},"15111920","hobofan","Shouldn't the title better by \"Pest - Fast, modern parser _in_ Rust\"? The current title made me think that this would be a Rust AST parser, similar to syntex.",{"id":88,"by":89,"text":90},"15112100","grimgrin","Yes this is no doubt the current implication. I was expecting something like racer.",{"id":92,"by":93,"text":94},"15112123","reificator","Exactly what I came into this thread expecting. Was curious why when it looks like there's already great IDE support for Rust with existing tools.",{"value":96,"source":73,"evidence":97},"Creative operator overloading in the grammar syntax is hard to read",[98],{"id":99,"by":100,"text":101},"15112389","weberc2","This is a neat project! I might take a look at this if\u002Fwhen I get started on my dream language. :p One constructive criticism, which may be only an unpopular opinion, but I find…",{"value":103,"source":73,"evidence":104},"Benchmark comparison with nom seemed unfair",[105],{"id":106,"by":107,"text":108},"15112489","jorams","I'm a bit confused by the benchmark. I looked through the benchmark code and, without really understanding what I'm looking at, the result of the nom parser looks much closer to…",[110],{"value":111,"source":73,"evidence":112},"Clearer title stating it is a parser generator",[113,114],{"id":84,"by":85,"text":86},{"id":52,"by":53,"text":54},[116,120],{"value":117,"source":73,"evidence":118},"What type of parser does it produce?",[119],{"id":56,"by":57,"text":58},{"value":121,"source":73,"evidence":122},"Does it handle Unicode character families well?",[123,127],{"id":124,"by":125,"text":126},"15111753","OtterCoder","I remember playing with PEGjs back in the day, making a toy implementation of JS in JS. It had terrible Unicode support though. To build a token out of valid Unicode…",{"id":128,"by":125,"text":129},"15111832","The difficulty wasn't in the engine. JS itself is just as good with accepting Unicode characters as Rust, both in code and strings. The problem was with the PEG implementation.…",[131,135,139,146,153],{"value":132,"source":73,"evidence":133},"LALRPOP",[134],{"id":76,"by":77,"text":78},{"value":136,"source":73,"evidence":137},"nom",[138],{"id":106,"by":107,"text":108},{"value":140,"source":73,"evidence":141},"syn",[142],{"id":143,"by":144,"text":145},"15112328","dikaiosune","There's actually a parser for rust called syn, and it's very useful for procedural macros, as the current API exposes a stream of tokens, not a full AST.",{"value":147,"source":73,"evidence":148},"GNU Bison and Yacc",[149],{"id":150,"by":151,"text":152},"15112299","jmcomets","\"Parsing expression grammars (PEGs) are an alternative to context free grammars for formally specifying syntax\" [1] Basically, you have tools for context free grammars such as…",{"value":154,"source":73,"evidence":155},"PEGjs",[156],{"id":124,"by":125,"text":126},{"comments":34,"answered":158,"key":159},4,[160,163,166],{"id":161,"text":162},"15112553","I've added a clarification. The point of the benchmark is not to compete with other projects, it's merely there to put the parsing speed (and not necessarily the processing that…",{"id":164,"text":165},"15112497","I agree with your point. I tried my best not to sway too far off of some of syntax I've seen in other PEG projects, while also keeping it compatible with Rust's standard macros.…",{"id":167,"text":168},"15112349","For now, it produces a recursive descent parser. Packrat parsing is an open-question since I'm afraid that adding a memoization layer all throughout the parser will lead to a…",{"commenters":170,"max_depth":34,"maker_replies":34,"first_comment_mins":171,"lifespan_hours":172},16,83,17,[174,176,178,180,182,185,187,189,193,195,198,199,202,205,207,209,213,214,217,219,221,222,224,225,228,231,233],[106,33,38,175,107,33],"project\u002Fcritical\u002Fperformance",[161,33,33,177,11,38],"maker\u002Fneutral\u002Fperformance",[99,38,38,179,100,33],"project\u002Fcritical\u002Fdesign",[164,38,33,181,11,38],"maker\u002Fneutral\u002Fdesign",[183,38,34,184,100,33],"15112604","maker\u002Fpositive\u002Fnone",[56,43,32,186,57,33],"project\u002Fneutral\u002Fidea",[150,43,33,188,151,33],"other\u002Fneutral\u002Fidea",[190,43,33,191,192,33],"15112309","commenter\u002Fneutral\u002Fidea","yellowapple",[194,43,32,186,192,33],"15112305",[196,43,33,197,57,33],"15112356","commenter\u002Fneutral\u002Fnone",[167,43,33,177,11,38],[200,43,34,201,57,33],"15112360","project\u002Fpositive\u002Fexecution",[203,43,33,204,11,38],"15112436","maker\u002Fneutral\u002Fexecution",[206,43,34,184,57,33],"15112522",[124,32,32,208,125,33],"project\u002Fneutral\u002Fexecution",[210,32,33,211,212,33],"15111811","commenter\u002Fneutral\u002Fexecution","runevault",[128,32,33,211,125,33],[215,32,33,216,192,33],"15112319","other\u002Fneutral\u002Fnone",[76,158,34,218,77,33],"project\u002Fpositive\u002Fperformance",[84,34,38,220,85,33],"project\u002Fcritical\u002Fdocs",[88,34,38,220,89,33],[92,34,38,223,93,33],"project\u002Fcritical\u002Fidea",[143,34,33,191,144,33],[226,34,33,191,227,33],"15112409","steveklabnik",[229,34,33,230,11,38],"15112450","maker\u002Fneutral\u002Fdocs",[52,34,34,232,53,33],"project\u002Fpositive\u002Fidea",[234,34,34,235,236,33],"15112958","maker\u002Fpositive\u002Fdocs","dang",[238,241,244,247,250,254,257,260],{"id":239,"t":240,"points":43,"comments":33},"15046879",1503069157,{"id":242,"t":243,"points":34,"comments":33},"15053271",1503149889,{"id":245,"t":246,"points":32,"comments":33},"15063246",1503308878,{"id":248,"t":249,"points":38,"comments":33},"15067812",1503349148,{"id":251,"t":252,"points":253,"comments":33},"15075042",1503425887,8,{"id":255,"t":256,"points":43,"comments":33},"15082437",1503503188,{"id":258,"t":259,"points":43,"comments":33},"15088617",1503565501,{"id":4,"t":12,"points":14,"comments":15},[262,266,271,276,281,286],{"id":263,"name":264,"points":265,"category":20},"15105726","Moon",268,{"id":267,"name":268,"points":269,"category":270},"15115318","OpenFaaS",194,"infrastructure",{"id":272,"name":273,"points":274,"category":275},"15123638","MMRA",193,"productivity",{"id":277,"name":278,"points":279,"category":280},"15117037","bitcoin-trading-dca",170,"finance_crypto",{"id":282,"name":283,"points":284,"category":285},"15131408","Logo Rank",152,"ai",{"id":287,"name":288,"points":289,"category":290},"15105304","DomDB",131,"web_saas",false,"v2",{"id":294,"name":5,"line":6,"ai":291,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":295,"top":18,"kw":296,"maker":11,"domain":10,"tier":19,"attempts":253,"strip":297,"url":9,"mix":298,"praise":72,"objection":81,"sub":21},15111390,-0.07,[21,24,25,26,27],"101053003005053000511100055",[31,32,33,34],1793990963272]