[{"data":1,"prerenderedAt":135},["ShallowReactive",2],{"project-9270405":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":27,"sentiment":28,"stance_mix":29,"scored_comments":31,"aspects":32,"strip":35,"post_text":28,"what":37,"said":47,"maker_in_thread":69,"shape":80,"grid":83,"attempts":96,"same_week":97,"maker_shows":15,"maker_hidden":128,"reader_version":129,"card":130},"9270405","ocalc","A Lispy Calculator in under 50 Lines of OCaml","title","Show HN: A Lispy Calculator in under 50 Lines of OCaml","https:\u002F\u002Fgithub.com\u002Featonphil\u002Focalc","github.com","eatonphil",1427384483,2015,15,5,1525,2565,60,"shown","languages","interpreter","cli",[24,25,26,21],"lisp","ocaml","calculator","quiet",null,{"positive":30,"neutral":31,"mixed":30,"critical":30},0,2,{"design":33,"execution":34},{"positive":30,"critical":30},{"positive":30,"critical":30},[36,30,30,36,30],3,{"problem":28,"audience":28,"pricing":28,"motivation":28,"time_to_build":28,"stack":38,"openness":45,"stage":46,"team_size":46},[39],{"value":40,"source":41,"evidence":42},"OCaml","maker",[43],{"id":44},"post","open_source","unknown",{"praise":48,"objections":57,"requests":62,"questions":67,"alternatives":68},[49],{"value":50,"source":51,"evidence":52},"Useful design feedback on using an expression ADT","commenter",[53],{"id":54,"by":55,"text":56},"9271281","tokenrove","As a calculator, wouldn't it make more sense to use Num from the standard library than int? FWIW, you don't end up doing a cumbersome amount of matching if you implement a full…",[58],{"value":59,"source":51,"evidence":60},"Using int instead of Num is questionable for a calculator",[61],{"id":54,"by":55,"text":56},[63],{"value":64,"source":51,"evidence":65},"Use Num from the standard library for arbitrary precision",[66],{"id":54,"by":55,"text":56},[],[],{"comments":36,"answered":31,"key":70},[71,74,77],{"id":72,"text":73},"9271417","I was hoping for some feedback like this. You're right, I think I could solve it by using an ADT and splitting `apply` into two parts: atom-ops and list-ops. ``` module LispData…",{"id":75,"text":76},"9271851","Also, a Num implementation is now available; thanks for the suggestion. However it just hits the 50-line limit :p https:\u002F\u002Fgithub.com\u002Featonphil\u002Focalc\u002Ftree\u002Fuse-num",{"id":78,"text":79},"9272070","Obviously the branch was done quickly, but at a short glance it was easier not to use an extra line to add `open Num` at the beginning. Good call on the irc channel. Thanks!",{"commenters":31,"max_depth":81,"maker_replies":36,"first_comment_mins":82,"lifespan_hours":36},4,91,[84,86,89,91,94],[54,30,36,85,55,30],"project\u002Fneutral\u002Fdesign",[72,30,30,87,11,88],"project\u002Fpositive\u002Fdesign",1,[75,30,30,90,11,88],"project\u002Fpositive\u002Fexecution",[92,30,36,93,55,30],"9272039","maker\u002Fneutral\u002Fexecution",[78,30,30,95,11,88],"commenter\u002Fneutral\u002Fnone",[],[98,103,108,113,118,123],{"id":99,"name":100,"points":101,"category":102},"9271946","SSL Decoder",160,"security_privacy",{"id":104,"name":105,"points":106,"category":107},"9297316","Netlify",116,"infrastructure",{"id":109,"name":110,"points":111,"category":112},"9295596","Notello",100,"productivity",{"id":114,"name":115,"points":116,"category":117},"9290087","Chrome",72,"dev_tools",{"id":119,"name":120,"points":121,"category":122},"9291842","Bitterness",67,"consumer_social",{"id":124,"name":125,"points":126,"category":127},"9298338","Boids",63,"learning_science",false,"v2",{"id":131,"name":5,"line":6,"ai":128,"cat":20,"year":13,"points":14,"comments":15,"rec":27,"s":28,"top":18,"kw":132,"maker":11,"domain":10,"tier":19,"attempts":30,"strip":133,"url":9,"mix":134,"praise":50,"objection":59,"sub":21},9270405,[24,25,26,21],"30030",[30,31,30,30],1794036529787]