[{"data":1,"prerenderedAt":224},["ShallowReactive",2],{"project-24388687":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":34,"aspects":35,"strip":40,"post_text":43,"what":44,"said":53,"maker_in_thread":114,"shape":126,"grid":130,"attempts":180,"same_week":186,"maker_shows":34,"maker_hidden":216,"reader_version":217,"card":218},"24388687","liblg","A minimal stack based VM in C","title","Show HN: A minimal stack based VM in C","https:\u002F\u002Fgithub.com\u002Fcodr7\u002Fliblg","github.com","codr7",1599362324,2020,60,20,980,3028,33,"notable","languages","virtual machine library","library",[24,25,26,27],"stack vm","c virtual machine","computed goto","bytecode interpreter","curious",-0.067,{"positive":31,"neutral":32,"mixed":31,"critical":33},1,7,2,11,{"docs":36,"design":38,"performance":39},{"positive":37,"critical":37},0,{"positive":31,"critical":33},{"positive":37,"critical":37},[41,37,41,37,37,41,41,31,37,37,41,42,31,37,37,37,41,37,41,41],3,5,null,{"problem":43,"audience":43,"pricing":43,"motivation":43,"time_to_build":43,"stack":45,"openness":52,"stage":52,"team_size":52},[46],{"value":47,"source":48,"evidence":49},"C","maker",[50],{"id":51},"post","unknown",{"praise":54,"objections":63,"requests":70,"questions":83,"alternatives":95},[55],{"value":56,"source":57,"evidence":58},"Design section of the README is helpful","commenter",[59],{"id":60,"by":61,"text":62},"24389278","matheusmoreira","The design section of the README is greatly appreciated! > The core loop uses computed goto, which means that new instructions must be added in identical order > Values are…",[64],{"value":65,"source":57,"evidence":66},"Built-in types are global, requiring lg_init and lg_deinit calls",[67],{"id":68,"by":61,"text":69},"24389350","I see, so it refers to the C storage class. There can be several virtual machine instances referencing the same built-in integer type instance. This imposes on users the need to…",[71,75],{"value":72,"source":57,"evidence":73},"Support user-defined data types without modifying the library's union",[74],{"id":68,"by":61,"text":69},{"value":76,"source":57,"evidence":77},"Performance improvements such as typed instructions or a JIT backend",[78,82],{"id":79,"by":80,"text":81},"24392055","gergo_barany","> ideas on how to improve its performance further without making a mess are most welcome. One approach would be designing the input language for performance. In particular,…",{"id":68,"by":61,"text":69},[84,88],{"value":85,"source":57,"evidence":86},"What is a global fundamental type and is there a local counterpart",[87],{"id":60,"by":61,"text":62},{"value":89,"source":57,"evidence":90},"Why parameters are named underscore",[91],{"id":92,"by":93,"text":94},"24389808","jiive","This piqued my intrest. I’m a hobbyist C programmer so forgive me if this is a rudimentary question. What is the rationale\u002Fconvention for naming a variable “_”? I’ve never seen…",[96,103,110],{"value":97,"source":57,"evidence":98},"Lua register based VM",[99],{"id":100,"by":101,"text":102},"24389960","tarruda","For those interested in the subject, another great read is Lua register based VM: https:\u002F\u002Fwebserver2.tecgraf.puc-rio.br\u002Flua\u002Flocal\u002Fsource\u002F5.1\u002Flvm.c.html",{"value":104,"source":57,"evidence":105},"GForth super-instructions",[106],{"id":107,"by":108,"text":109},"24391213","lebuffon","You might want to peruse the C sources for GForth which has been under continuous development for 20 years or so. It introduced a concept called super-instructions that speeds…",{"value":111,"source":57,"evidence":112},"LibJIT",[113],{"id":79,"by":80,"text":81},{"comments":115,"answered":41,"key":116},4,[117,120,123],{"id":118,"text":119},"24389299","You may choose whatever storage duration you feel like for your own types, but built in types are globally declared and therefore shared between VM instances.",{"id":121,"text":122},"24389390","You would either have to reuse one of the existing representations or modify the union atm. I'll add a void *as_any to the union eventually which means you're just one level of…",{"id":124,"text":125},"24392278","Because it's short, easy to recognize and somewhat accepted to signify that the name doesn't matter and even 'it' in Perl. I find that using it for the default parameter (or…",{"commenters":127,"max_depth":42,"maker_replies":115,"first_comment_mins":128,"lifespan_hours":129},14,149,18,[131,133,135,137,138,140,142,143,147,150,153,156,159,162,166,168,170,173,176,177],[60,37,41,132,61,37],"maker\u002Fneutral\u002Fdocs",[118,37,37,134,11,31],"project\u002Fneutral\u002Fdesign",[68,37,41,136,61,37],"project\u002Fmixed\u002Fdesign",[121,37,37,134,11,31],[100,31,37,139,101,37],"other\u002Fneutral\u002Fnone",[79,33,41,141,80,37],"project\u002Fneutral\u002Fperformance",[92,41,41,134,93,37],[144,41,31,145,146,37],"24389824","project\u002Fcritical\u002Fdesign","makapuf",[148,41,37,139,149,37],"24390086","nfoz",[151,41,37,139,152,37],"24394855","rurban",[154,41,41,134,155,37],"24390113","mostlylurks",[157,41,42,158,93,37],"24391389","project\u002Fpositive\u002Fdesign",[160,41,31,145,161,37],"24390471","Randor",[163,41,37,164,165,37],"24390734","commenter\u002Fneutral\u002Fnone","chrisseaton",[167,41,37,164,161,37],"24390850",[124,41,37,169,11,31],"maker\u002Fneutral\u002Fdesign",[171,115,41,141,172,37],"24390199","fwsgonzo",[174,115,37,175,11,31],"24392127","maker\u002Fneutral\u002Fperformance",[107,42,41,141,108,37],[178,42,41,141,179,37],"24391415","addaon",[181,185],{"id":182,"t":183,"points":184,"comments":33},"24296259",1598549952,12,{"id":4,"t":12,"points":14,"comments":15},[187,192,197,202,207,212],{"id":188,"name":189,"points":190,"category":191},"24380969","Linux Upskill Challenge",780,"learning_science",{"id":193,"name":194,"points":195,"category":196},"24422432","Mimestream",403,"productivity",{"id":198,"name":199,"points":200,"category":201},"24381700","Talk",310,"consumer_social",{"id":203,"name":204,"points":205,"category":206},"24407706","Titanoboa",279,"dev_tools",{"id":208,"name":209,"points":210,"category":211},"24370296","typing",237,"creative",{"id":213,"name":214,"points":215,"category":20},"24363493","kiss-orm",220,false,"v2",{"id":219,"name":5,"line":6,"ai":216,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":220,"top":18,"kw":221,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":222,"url":9,"mix":223,"praise":56,"objection":65,"sub":21},24388687,-0.07,[24,25,26,27],"30300331003510003033",[31,32,31,33],1793991015688]