[{"data":1,"prerenderedAt":331},["ShallowReactive",2],{"project-5390954":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":83,"maker_in_thread":178,"shape":187,"grid":190,"attempts":294,"same_week":295,"maker_shows":32,"maker_hidden":323,"reader_version":324,"card":325},"5390954","np","a lexer, parser, interpreter and web runtime (np, a 5-weekend project)","title","Show HN: a lexer, parser, interpreter and web runtime (np, a 5-weekend project)","http:\u002F\u002Fnp-lang.org\u002F","np-lang.org","Udo",1363552865,2013,122,44,177,1739,11,"notable","languages","programming language","web_app",[24,21,25,26,27],"interpreter","lexer parser","language design","lisp-like syntax","debated",0.241,{"positive":31,"neutral":32,"mixed":33,"critical":34},8,3,1,5,17,{"idea":37,"execution":39,"docs":42,"design":43},{"positive":32,"critical":38},0,{"positive":40,"critical":41},2,4,{"positive":33,"critical":33},{"positive":33,"critical":38},[38,38,38,38,34,38,38,38,38,32,38,33,38,38,38,34,38,34,38,32,38,33,38,33,38,33,32,38,32,38,34,38,34,38,32,38,38,34,38,34],null,{"problem":47,"audience":45,"pricing":45,"motivation":58,"time_to_build":62,"stack":67,"openness":80,"stage":81,"team_size":82},{"value":48,"source":49,"evidence":50},"Learning how interpreters and language design work by building one from scratch.","maker",[51,54],{"id":52,"by":11,"text":53},"5391173","I made this primarily because I wanted to learn more about writing an interpreter and I also wanted to experiment a little with the decisions that go into language design - so it…",{"id":55,"by":56,"text":57},"5392055","peterkelly","\"I wanted to explore what it feels like to write a parser, a lexer, and an interpreter without using a framework or some other ready-made solution\" This is an excellent exercise…",{"value":59,"source":49,"evidence":60},"Wanted to learn about writing an interpreter and experiment with language design.",[61],{"id":52,"by":11,"text":53},{"value":63,"source":49,"evidence":64},"Five weekends.",[65],{"id":66},"post",[68],{"value":69,"source":70,"evidence":71},"Java","commenter",[72,76],{"id":73,"by":74,"text":75},"5390976","niggler","Failing in chrome: ``` java.lang.ArrayIndexOutOfBoundsException: 1 at np.LibRequest.parseCookies(LibRequest.java:37) at np.LibRequest.\u003Cinit>(LibRequest.java:26) at…",{"id":77,"by":78,"text":79},"5391647","iskander","Looks cool but the sandboxed interpreter fails to run in my instance of Chrome (v25 on Mac OS X): >Error: java.lang.NullPointerException…","unknown","beta","solo",{"praise":84,"objections":110,"requests":137,"questions":151,"alternatives":163},[85,92,103],{"value":86,"source":70,"evidence":87},"Docs are excellent for a short project.",[88],{"id":89,"by":90,"text":91},"5391680","andrewflnr","I've only skimmed it so far, but the docs seem excellent for a mere 5-weekend project. That is perhaps the thing that impresses me most.",{"value":93,"source":70,"evidence":94},"Impressive that it was built in five weekends.",[95,99],{"id":96,"by":97,"text":98},"5391433","S4M","I also am super impressed that it took the OP only 5 week ends to do this. For me it would probably take 1 year if I don't give up on the way...",{"id":100,"by":101,"text":102},"5392350","kamaal","If you did this in your spare time or even other wise. 5 weeks is amazingly short time for a project of this size. Good work done!",{"value":104,"source":70,"evidence":105},"Syntax experiment is refreshing compared with C-style languages.",[106],{"id":107,"by":108,"text":109},"5391678","goldfeld","I have been coding CoffeeScript for a while and slowly got rid of it's parentheses down to doing `do someFunction`. When I learned about Clojure and got excited to learn it (but…",[111,121,130],{"value":112,"source":70,"evidence":113},"Bugs in semicolon handling and function invocation behaviour.",[114,118],{"id":115,"by":116,"text":117},"5391384","mkdir","This is an inspiring project. It would have taken me far more than five weekends to create this, so you can feel smug knowing you're about ten times as efficient as a random HN…",{"id":119,"by":116,"text":120},"5391435","Actually—I think you did explain properly. I must confess that I jumped into the sandbox before reading the documentation, and then I only checked the documentation when ran into…",{"value":122,"source":70,"evidence":123},"Sandboxed interpreter throws exceptions in Chrome.",[124,125,126],{"id":73,"by":74,"text":75},{"id":77,"by":78,"text":79},{"id":127,"by":128,"text":129},"5393326","huhtenberg","``` oki-doki = 42; ``` will cause an exception too.",{"value":131,"source":70,"evidence":132},"Recursion does not work without a workaround.",[133,134],{"id":115,"by":116,"text":117},{"id":135,"by":11,"text":136},"5391522","Ah, I'm so dense! Sure, there is also \"math.pi\" as a built-in for that. (And I fixed this grave rounding error) I also discovered a scope problem with the recursion example you…",[138,146],{"value":139,"source":70,"evidence":140},"Suggestions for learning resources such as the Dragon Book.",[141,142],{"id":55,"by":56,"text":57},{"id":143,"by":144,"text":145},"5393260","stiff","The single best resource on this topic is the \"Dragon Book\" Your advice is great in general, but I wish people would back up statements like this with some context, for example,…",{"value":147,"source":70,"evidence":148},"Fix the bugs found in testing.",[149,150],{"id":115,"by":116,"text":117},{"id":135,"by":11,"text":136},[152,159],{"value":153,"source":70,"evidence":154},"Why use Lisp-style (f x) call syntax instead of f(x)?",[155],{"id":156,"by":157,"text":158},"5391431","akkartik","I'm curious: why did you choose the lisp-like (f x) syntax for function calls?",{"value":160,"source":70,"evidence":161},"Will development continue?",[162],{"id":115,"by":116,"text":117},[164,172],{"value":165,"source":70,"evidence":166},"Dragon Book and SICP as compiler learning resources.",[167,168],{"id":55,"by":56,"text":57},{"id":169,"by":170,"text":171},"5391620","gngeal","\"To my surprise, making decisions about how scope should work was actually the hardest part.\" Perhaps a thorough reading of SICP would enlighten you as to how scope should be…",{"value":173,"source":49,"evidence":174},"LLVM tutorial.",[175],{"id":176,"by":11,"text":177},"5391598","> Could you post any helpful resources you used? Not a lot initially. I did have a look at the LLVM tutorial, which is absolutely great, but I eventually closed that tab because…",{"comments":35,"answered":34,"key":179},[180,181,184],{"id":52,"text":53},{"id":182,"text":183},"5391631","I know SICP, it's great. However, arguments from authority only get one so far. I think it's definitely worth experimenting with different paradigms. And I'm not done yet.…",{"id":185,"text":186},"5392114","Thanks for the encouragement! Doing this was pretty exciting. > and I didn't really consult any literature either In hindsight I shouldn't have written that, because it…",{"commenters":188,"max_depth":189,"maker_replies":35,"first_comment_mins":189,"lifespan_hours":35},21,6,[191,193,195,196,200,202,203,206,208,210,212,214,217,219,221,224,226,228,231,235,237,240,241,244,245,248,250,252,253,255,257,260,264,267,269,272,275,277,279,280,284,286,288,292],[52,38,38,192,11,33],"maker\u002Fneutral\u002Fidea",[169,38,38,194,170,38],"commenter\u002Fneutral\u002Fidea",[182,38,38,194,11,33],[197,38,38,198,199,38],"5394152","other\u002Fneutral\u002Fnone","fabriceleal",[55,33,34,201,56,38],"maker\u002Fpositive\u002Fidea",[185,33,38,194,11,33],[204,33,38,198,205,38],"5392378","rohitarondekar",[143,33,38,207,144,38],"commenter\u002Fneutral\u002Fnone",[209,33,38,207,56,38],"5393302",[211,33,38,207,144,38],"5393368",[115,40,32,213,116,38],"project\u002Fmixed\u002Fexecution",[215,40,38,216,11,33],"5391403","maker\u002Fneutral\u002Fdocs",[119,40,33,218,116,38],"project\u002Fcritical\u002Fdocs",[220,40,38,216,11,33],"5391462",[222,40,38,223,116,38],"5391512","commenter\u002Fneutral\u002Fdocs",[135,40,38,225,11,33],"project\u002Fcritical\u002Fexecution",[96,40,34,227,97,38],"project\u002Fpositive\u002Fexecution",[229,40,38,230,11,33],"5391476","maker\u002Fneutral\u002Fnone",[232,32,34,233,234,38],"5391226","project\u002Fpositive\u002Fidea","endlessvoid94",[236,32,38,230,11,33],"5391229",[238,32,34,233,239,38],"5391551","mgallivan",[73,41,33,225,74,38],[242,41,38,243,11,33],"5390987","project\u002Fneutral\u002Fexecution",[77,34,33,225,78,38],[246,34,38,247,11,33],"5391651","maker\u002Fneutral\u002Fexecution",[249,34,33,225,78,38],"5392478",[251,34,38,247,11,33],"5392501",[127,34,33,225,128,38],[156,189,32,254,157,38],"project\u002Fneutral\u002Fdesign",[256,189,38,254,11,33],"5391508",[258,189,32,259,157,38],"5391514","maker\u002Fneutral\u002Fdesign",[261,189,38,262,263,38],"5391610","commenter\u002Fneutral\u002Fdesign","stormbrew",[265,189,38,262,266,38],"5391882","pash",[107,189,34,268,108,38],"project\u002Fpositive\u002Fdesign",[270,189,38,271,11,33],"5391709","maker\u002Fpositive\u002Fdesign",[89,273,34,274,90,38],7,"project\u002Fpositive\u002Fdocs",[276,273,38,216,11,33],"5391691",[278,31,32,230,239,38],"5391559",[176,31,38,192,11,33],[281,282,38,198,283,38],"5393809",9,"kunil",[100,285,34,227,101,38],10,[287,285,38,247,11,33],"5392505",[289,18,34,290,291,38],"5391482","project\u002Fpositive\u002Fnone","LolWolf",[293,18,38,290,11,33],"5391543",[],[296,300,305,309,314,319],{"id":297,"name":298,"points":299,"category":20},"5395463","XKCD-inspired StackSort",948,{"id":301,"name":302,"points":303,"category":304},"5380056","Intro.js",716,"dev_tools",{"id":306,"name":307,"points":308,"category":304},"5407499","Webflow",503,{"id":310,"name":311,"points":312,"category":313},"5372183","CupidWithFriends",200,"web_saas",{"id":315,"name":316,"points":317,"category":318},"5377130","Replace Reader",175,"productivity",{"id":320,"name":321,"points":322,"category":304},"5386713","Advanced Namespace Tools (ANTS)",131,false,"v2",{"id":326,"name":5,"line":6,"ai":323,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":327,"top":18,"kw":328,"maker":11,"domain":10,"tier":19,"attempts":38,"strip":329,"url":9,"mix":330,"praise":86,"objection":112,"sub":21},5390954,0.24,[24,21,25,26,27],"0000500003010005050301010130305050300505",[31,32,33,34],1794036504958]