[{"data":1,"prerenderedAt":259},["ShallowReactive",2],{"project-2502173":3},{"id":4,"name":5,"line":5,"line_source":6,"title":7,"url":8,"domain":9,"maker":10,"posted_at":11,"year":12,"points":13,"comments":14,"rank_in_year":15,"shown_in_year":16,"top":17,"tier":18,"category":19,"subcategory":20,"format":21,"keywords":22,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":43,"post_text":44,"what":45,"said":95,"maker_in_thread":152,"shape":161,"grid":165,"attempts":220,"same_week":221,"maker_shows":41,"maker_hidden":251,"reader_version":252,"card":253},"2502173","Minimal Lisp in ~70 lines of Haskell","title","Show HN: Minimal Lisp in ~70 lines of Haskell","https:\u002F\u002Fgist.github.com\u002F950199","gist.github.com","die_sekte",1304218004,2011,76,23,158,1097,15,"notable","languages","lisp interpreter","other",[23,24,25,26,27],"lisp","haskell","interpreter","parser combinators","scheme","mixed",0.143,{"positive":31,"neutral":32,"mixed":33,"critical":34},4,5,0,2,11,{"design":37,"docs":39,"execution":40,"idea":42},{"positive":38,"critical":33},3,{"positive":33,"critical":33},{"positive":33,"critical":41},1,{"positive":41,"critical":41},[32,38,33,33,32,32,38,33,38,33,41,41,33,32,33,38,33,33,33,33,38,33,33],null,{"problem":46,"audience":56,"pricing":44,"motivation":67,"time_to_build":74,"stack":80,"openness":93,"stage":94,"team_size":93},{"value":47,"source":48,"evidence":49},"Shows a minimal implementation of a Lisp interpreter in Haskell","inferred",[50,52],{"id":51},"post",{"id":53,"by":54,"text":55},"2503582","sjs","This is clearly a golfing exercise. If you want a more full featured Lisp check out Write Yourself A Scheme in 48 Hours by Jonathan Tang:…",{"value":57,"source":48,"evidence":58},"Haskell and Lisp programmers interested in small interpreters",[59,63],{"id":60,"by":61,"text":62},"2502983","kleiba","Cool, only 70 lines!! (plus a ton of libraries) j\u002Fk ;-) Actually, I like this - it shows how cool Haskell really is! No, wait - it shows how cool Lisp really is! No wait... I'm…",{"id":64,"by":65,"text":66},"2503603","eru","If you like this, there's a more involved version: http:\u002F\u002Fen.wikibooks.org\u002Fwiki\u002FWrite_Yourself_a_Scheme_in_48_Hours",{"value":68,"source":69,"evidence":70},"Training exercise to learn Haskell","maker",[71],{"id":72,"by":10,"text":73},"2503681","The eval throwing away context does not make any sense in retrospect. I think I made it that way because of some ghetto-scoping ideas. You broke car and cdr somehow (these don't…",{"value":75,"source":69,"evidence":76},"About 2-3 hours of work spread over about 16 hours",[77],{"id":78,"by":10,"text":79},"2502555","About 2-3 hours. Lots of breaks though; I started about 16 hours ago and finished about 4 hours ago.",[81,85],{"value":82,"source":69,"evidence":83},"Haskell",[84],{"id":51},{"value":86,"source":87,"evidence":88},"attoparsec","commenter",[89],{"id":90,"by":91,"text":92},"2502520","tel","I think this might be some of the most beautiful code I've seen in a long while ``` value :: Parser Value value = List \u003C$> (char8 '(' *> sepBy value (takeWhile1 isSpace_w8) \u003C*…","unknown","prototype",{"praise":96,"objections":101,"requests":116,"questions":124,"alternatives":132},[97],{"value":98,"source":87,"evidence":99},"Fun to read and compact",[100],{"id":60,"by":61,"text":62},[102,109],{"value":103,"source":87,"evidence":104},"Lacks arithmetic, scoping and error handling, so not a real Lisp",[105],{"id":106,"by":107,"text":108},"2503172","stiff","I do not know Haskell enough to fully judge this, so maybe someone can correct me, but that seems _very_ minimal. From what I understand, it doesn't even have arithmetic…",{"value":110,"source":87,"evidence":111},"Dense operator syntax is hard for Haskell beginners to read",[112],{"id":113,"by":114,"text":115},"2502887","snprbob86","I'm familiar with parser combinators, but not the Attoparsec or other libraries. Furthermore, I have limited Haskel experience, so I'm struggling to read this. In particular, the…",[117],{"value":118,"source":87,"evidence":119},"Explain how the code handles car and cdr",[120],{"id":121,"by":122,"text":123},"2504104","Peaker","Can you give the example that breaks car\u002Fcdr? They seem to be evaluating their args here: ``` fst $ repl \"(car (cons 1 (quote ())))\" Number 1 ```",[125],{"value":126,"source":87,"evidence":127},"How long did it take to write",[128],{"id":129,"by":130,"text":131},"2502549","meric","How long did it take to write?",[133,141,145],{"value":134,"source":87,"evidence":135},"Write Yourself a Scheme in 48 Hours",[136,137],{"id":53,"by":54,"text":55},{"id":138,"by":139,"text":140},"2502845","thinkingeric","And 'Write Yourself a Scheme in 48 Hours\" http:\u002F\u002Fen.wikibooks.org\u002Fwiki\u002FWrite_Yourself_a_Scheme_in_48_Hours",{"value":142,"source":87,"evidence":143},"Peter Norvig's lispy in Python",[144],{"id":106,"by":107,"text":108},{"value":146,"source":87,"evidence":147},"Lisprolog in Prolog",[148],{"id":149,"by":150,"text":151},"2504258","GregBuchholz","You might also like: Lisprolog http:\u002F\u002Fstud1.tuwien.ac.at\u002F~e0225855\u002Flisprolog\u002Flisprolog.html \"Some online books show how to implement a simple \"Prolog\" engine in Lisp. They…",{"comments":31,"answered":38,"key":153},[154,155,158],{"id":72,"text":73},{"id":156,"text":157},"2504128","Sorry, that was my fault. I didn't make lambdas evaluate their arguments and I didn't notice this in my code. I.e. car\u002Fcdr work correctly, fun doesn't.",{"id":159,"text":160},"2503657","(a) The empty list is treated as nil. (b) The scoping is in fact strange; what you saw, however, was a bug. (c) cons expects a list as its second argument. This certainly isn't…",{"commenters":162,"max_depth":31,"maker_replies":31,"first_comment_mins":163,"lifespan_hours":164},19,216,20,[166,168,170,174,178,181,184,187,189,190,191,193,195,196,198,202,204,206,209,210,213,216,217],[90,33,32,167,91,33],"project\u002Fpositive\u002Fdesign",[113,33,38,169,114,33],"project\u002Fneutral\u002Fdocs",[171,33,33,172,173,33],"2502919","other\u002Fneutral\u002Fdocs","aristidb",[175,33,33,176,177,33],"2502981","other\u002Fneutral\u002Fnone","palish",[179,33,32,167,180,33],"2503191","ezyang",[182,33,32,167,183,33],"2503081","sfvisser",[185,41,38,186,122,33],"2502913","project\u002Fneutral\u002Fdesign",[72,41,33,188,10,41],"maker\u002Fneutral\u002Fexecution",[121,41,38,188,122,33],[156,41,33,188,10,41],[106,34,41,192,107,33],"project\u002Fcritical\u002Fexecution",[53,34,41,194,54,33],"project\u002Fcritical\u002Fidea",[159,34,33,188,10,41],[60,38,32,197,61,33],"project\u002Fpositive\u002Fidea",[199,38,33,200,201,33],"2503050","commenter\u002Fneutral\u002Fnone","magoghm",[64,38,38,203,65,33],"project\u002Fneutral\u002Fidea",[149,38,33,205,150,33],"other\u002Fneutral\u002Fidea",[207,31,33,205,208,33],"2502602","guard-of-terra",[138,31,33,205,139,33],[211,32,33,205,212,33],"2503284","nkassis",[129,214,38,215,130,33],6,"maker\u002Fneutral\u002Fnone",[78,214,33,215,10,41],[218,214,33,176,219,33],"2502795","yason",[],[222,227,232,237,241,246],{"id":223,"name":224,"points":225,"category":226},"2515612","Machine learning cheat sheet",166,"learning_science",{"id":228,"name":229,"points":230,"category":231},"2495859","Timeslot",71,"productivity",{"id":233,"name":234,"points":235,"category":236},"2506627","Ambur",51,"web_saas",{"id":238,"name":239,"points":240,"category":231},"2503193","YC Interview Demo",50,{"id":242,"name":243,"points":244,"category":245},"2501495","BrowserCrawler",43,"infrastructure",{"id":247,"name":248,"points":249,"category":250},"2502150","my Hackathon Project",42,"consumer_social",false,"v2",{"id":254,"name":5,"line":5,"ai":251,"cat":19,"year":12,"points":13,"comments":14,"rec":28,"s":255,"top":17,"kw":256,"maker":10,"domain":9,"tier":18,"attempts":33,"strip":257,"url":8,"mix":258,"praise":98,"objection":103,"sub":20},2502173,0.14,[23,24,25,26,27],"53005530301105030000300",[31,32,33,34],1793990872585]