[{"data":1,"prerenderedAt":211},["ShallowReactive",2],{"project-3769498":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":59,"maker_in_thread":126,"shape":136,"grid":139,"attempts":172,"same_week":173,"maker_shows":31,"maker_hidden":203,"reader_version":204,"card":205},"3769498","jslm32","Open Source emulator in Javascript that runs Linux","title","Show HN: Open Source emulator in Javascript that runs Linux","http:\u002F\u002Fwww.ubercomp.com\u002Fjslm32\u002Fsrc\u002F","ubercomp.com","reginaldo",1332991534,2012,65,15,361,1677,22,"notable","languages","emulator","web_app",[24,25,26,27],"javascript emulator","lm32 emulator","linux in browser","dynamic recompilation","curious",-0.125,{"positive":31,"neutral":32,"mixed":33,"critical":31},1,4,0,6,{"docs":36,"performance":37,"execution":38,"idea":39},{"positive":33,"critical":33},{"positive":31,"critical":33},{"positive":33,"critical":31},{"positive":33,"critical":33},[33,41,33,42,33,41,33,31,33,41,33,41,33,33,33],3,5,null,{"problem":43,"audience":43,"pricing":43,"motivation":43,"time_to_build":43,"stack":45,"openness":56,"stage":57,"team_size":58},[46],{"value":47,"source":48,"evidence":49},"JavaScript","maker",[50,53],{"id":51,"by":11,"text":52},"3769515","Since there seems to be some interest on the subject, and I don't want to kidnap the great thread about the worst Linux PC ever [1], I decided to submit on a separate thread.…",{"id":54,"by":11,"text":55},"3772065","Ok, one way to do interpretation is to do a loop like ``` while True: instr = decode_instruction(pc) execute_instruction(instr) ``` Where execute instruction is usually a big…","open_source","prototype","unknown",{"praise":60,"objections":79,"requests":95,"questions":106,"alternatives":115},[61,69],{"value":62,"source":63,"evidence":64},"Readable, clean code","commenter",[65],{"id":66,"by":67,"text":68},"3770860","jbert","Thanks for this, it's a great piece of work and very easy to read. Nice code. > \"it looks like it is a statistical profiler. When the usual invocation takes less than 1ms, it…",{"value":70,"source":63,"evidence":71},"Interesting technical approach to dynamic recompilation",[72,76],{"id":73,"by":74,"text":75},"3771529","int3","You mentioned in the 'Worst Linux PC' thread that your implementation generates JS code on the fly and 'captures up to three backwards jumps'. Do you mind explaining in more…",{"id":77,"by":74,"text":78},"3775709","Thanks for the explanation! It makes sense. I was just wondering though -- why is it necessary for generate_block \u002F decode_instruction to be called on the fly, instead of as a…",[80,84,91],{"value":81,"source":48,"evidence":82},"Does not run well in browsers other than Chrome",[83],{"id":51,"by":11,"text":52},{"value":85,"source":63,"evidence":86},"Terminal input did not work for a user",[87],{"id":88,"by":89,"text":90},"3770960","rdg","Hey reginaldo, for some reason I cannot enter any text on the terminal, hence, I cannot login. I'm using Chrome 18 on OS X Lion. Just in case, I tried downloading the code and…",{"value":92,"source":63,"evidence":93},"Performance concerns with the interpreter approach",[94],{"id":66,"by":67,"text":68},[96,102],{"value":97,"source":63,"evidence":98},"Write-up of how boot time was optimised",[99],{"id":100,"by":67,"text":101},"3770514","Very nice. Is there any chance of a follow up on your comment in the previous thread: \"I'll write a post describing what I did to take boot time from 2.5 minutes to 10 seconds.\"…",{"value":103,"source":63,"evidence":104},"Explanation of the JIT block generation",[105],{"id":73,"by":74,"text":75},[107,111],{"value":108,"source":63,"evidence":109},"Why generate code on the fly instead of static recompilation",[110],{"id":77,"by":74,"text":78},{"value":112,"source":63,"evidence":113},"How profiler results differ between Chrome and Firebug",[114],{"id":66,"by":67,"text":68},[116,120],{"value":117,"source":48,"evidence":118},"Fabrice Bellard's JSLinux",[119],{"id":51,"by":11,"text":52},{"value":121,"source":48,"evidence":122},"Emscripten",[123],{"id":124,"by":11,"text":125},"3781674","What you're looking for is called static recompilation. It's what Emscripten [1] does, it statically recompiles LLVM bitcode to javascript. Emscripten is a wonderful project, by…",{"comments":127,"answered":34,"key":128},7,[129,130,133],{"id":51,"text":52},{"id":131,"text":132},"3770567","> - how did you find what to optimise? - what approach did you use? I used profilers: Chrome developer tools and Firebug. The Chrome profiler is very nice and easy to use, but it…",{"id":134,"text":135},"3770957","> I don't understand this.. Well, I won't speculate on the workings of the Chrome profiler, but what I can say is that profiling in Chrome and Firefox gives different results…",{"commenters":42,"max_depth":34,"maker_replies":127,"first_comment_mins":137,"lifespan_hours":138},9,93,[140,142,144,146,147,149,152,154,157,160,162,163,164,165,168],[51,33,33,141,11,31],"project\u002Fneutral\u002Fidea",[100,31,41,143,67,33],"maker\u002Fneutral\u002Fdocs",[131,31,33,145,11,31],"maker\u002Fpositive\u002Fperformance",[66,31,42,145,67,33],[134,31,33,148,11,31],"maker\u002Fneutral\u002Fperformance",[150,31,41,151,67,33],"3771639","project\u002Fneutral\u002Fperformance",[153,31,33,151,11,31],"3773018",[88,155,31,156,89,33],2,"project\u002Fcritical\u002Fexecution",[158,155,33,159,11,31],"3771032","maker\u002Fneutral\u002Fexecution",[73,41,41,161,74,33],"maker\u002Fneutral\u002Fidea",[54,41,33,151,11,31],[77,41,41,161,74,33],[124,41,33,141,11,31],[166,41,33,167,74,33],"3785652","commenter\u002Fneutral\u002Fnone",[169,32,33,170,171,33],"3770147","other\u002Fneutral\u002Fnone","fudged",[],[174,179,183,188,193,198],{"id":175,"name":176,"points":177,"category":178},"3800089","Clutch.io",290,"dev_tools",{"id":180,"name":181,"points":182,"category":20},"3782929","ECMAchine",156,{"id":184,"name":185,"points":186,"category":187},"3783538","resume",58,"productivity",{"id":189,"name":190,"points":191,"category":192},"3793985","Coachella Rides",30,"consumer_social",{"id":194,"name":195,"points":196,"category":197},"3779070","Let's all connect on LinkedIn",27,"web_saas",{"id":199,"name":200,"points":201,"category":202},"3790233","Twifbook",23,"learning_science",false,"v2",{"id":206,"name":5,"line":6,"ai":203,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":207,"top":18,"kw":208,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":209,"url":9,"mix":210,"praise":62,"objection":81,"sub":21},3769498,-0.12,[24,25,26,27],"030503010303000",[31,32,33,31],1793990879861]