[{"data":1,"prerenderedAt":150},["ShallowReactive",2],{"project-19178002":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":33,"aspects":34,"strip":36,"post_text":30,"what":37,"said":59,"maker_in_thread":88,"shape":91,"grid":94,"attempts":111,"same_week":112,"maker_shows":92,"maker_hidden":143,"reader_version":144,"card":145},"19178002","Compiler Fundamentals","Closure Conversion","title","Show HN: Compiler Fundamentals – Closure Conversion","https:\u002F\u002Fgist.github.com\u002Frain-1\u002F36c4851b7c29cf8e42f23ba6eec37be6","gist.github.com","rain1",1550311956,2019,70,7,660,2195,31,"notable","learning_science","compiler education","library",[24,25,26,27,28],"closure conversion","compiler","racket","lambda","scheme","quiet",null,{"positive":32,"neutral":32,"mixed":32,"critical":33},0,1,{"execution":35},{"positive":32,"critical":33},[32,32,32,32,32,32,33],{"problem":38,"audience":45,"pricing":30,"motivation":49,"time_to_build":30,"stack":53,"openness":58,"stage":58,"team_size":58},{"value":39,"source":40,"evidence":41},"Beginners implementing a language with lambda need to understand closure conversion","maker",[42],{"id":43,"by":11,"text":44},"19178006","I took the essence of closure conversion and implemented it as a single file racket script with explanation in comments and examples. The idea is that this should help someone if…",{"value":46,"source":40,"evidence":47},"Beginners building a language with lambda, and curious programmers",[48],{"id":43,"by":11,"text":44},{"value":50,"source":40,"evidence":51},"Help people learn how compilers implement lambda",[52],{"id":43,"by":11,"text":44},[54],{"value":55,"source":40,"evidence":56},"Racket",[57],{"id":43,"by":11,"text":44},"unknown",{"praise":60,"objections":61,"requests":62,"questions":63,"alternatives":72},[],[],[],[64],{"value":65,"source":66,"evidence":67},"Why not use pattern matching instead of manual dispatch","commenter",[68],{"id":69,"by":70,"text":71},"19188806","disconcision","this is just a tiny nitpick but I'm wondering why you didn't use pattern matching? if you just wanted to stay schemey then disregard but you could skip the entire shapes section…",[73],{"value":74,"source":66,"evidence":75},"Other closure conversion implementations in Racket, Scheme and C",[76,80,84],{"id":77,"by":78,"text":79},"19181450","sinistersnare","I also made a closure converting pass to my compiler (in racket also!) Here's mine: https:\u002F\u002Fgithub.com\u002Fsinistersnare\u002FSinScheme\u002Fblob\u002Fmaster\u002Fsrc\u002Fracket\u002Fclosure-convert.rkt",{"id":81,"by":82,"text":83},"19182611","abecedarius","Yet another: this is the whole compiler, but for a simpler language and target. https:\u002F\u002Fgithub.com\u002Fdarius\u002Fsqueam\u002Fblob\u002Fmaster\u002Feg\u002Flambdacompiler.scm It's in my own Scheme variant,…",{"id":85,"by":86,"text":87},"19192450","rurban","A shorter version in C: https:\u002F\u002Fgithub.com\u002Fperl11\u002Fpotion\u002Fblob\u002Fmaster\u002Fcore\u002Fcompile.c#L198",{"comments":33,"answered":32,"key":89},[90],{"id":43,"text":44},{"commenters":15,"max_depth":92,"maker_replies":33,"first_comment_mins":33,"lifespan_hours":93},2,55,[95,97,101,104,105,106,108],[43,32,32,96,11,33],"project\u002Fneutral\u002Fidea",[98,33,32,99,100,32],"19182051","other\u002Fneutral\u002Fnone","tinco",[102,33,32,99,103,32],"19182556","blevs",[77,92,32,99,78,32],[81,92,32,99,82,32],[85,107,32,99,86,32],3,[69,109,33,110,70,32],4,"project\u002Fcritical\u002Fexecution",[],[113,118,123,128,133,138],{"id":114,"name":115,"points":116,"category":117},"19210697","Commento",271,"web_saas",{"id":119,"name":120,"points":121,"category":122},"19200151","IMDB Ratings on Netflix",234,"consumer_social",{"id":124,"name":125,"points":126,"category":127},"19206507","GitNews Web",183,"dev_tools",{"id":129,"name":130,"points":131,"category":132},"19189455","Inlets",146,"infrastructure",{"id":134,"name":135,"points":136,"category":137},"19162876","Scannable Chess Scoresheets",117,"games",{"id":139,"name":140,"points":141,"category":142},"19196352","Summarized Finance \u002F Tech Newsletter",93,"finance_crypto",false,"v2",{"id":146,"name":5,"line":6,"ai":143,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":30,"top":18,"kw":147,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":148,"url":9,"mix":149,"praise":-1,"objection":-1,"sub":21},19178002,[24,25,26,27,28],"0000001",[32,32,32,33],1794036574906]