[{"data":1,"prerenderedAt":309},["ShallowReactive",2],{"project-18790255":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":36,"aspects":37,"strip":43,"post_text":45,"what":46,"said":85,"maker_in_thread":194,"shape":204,"grid":208,"attempts":273,"same_week":274,"maker_shows":34,"maker_hidden":301,"reader_version":302,"card":303},"18790255","LJS","Lua\u002FLuaJIT with C\u002FC++\u002FJava\u002FJavaScript syntax","title","Show HN: Lua\u002FLuaJIT with C\u002FC++\u002FJava\u002FJavaScript syntax","https:\u002F\u002Fgithub.com\u002Fmingodad\u002Fljs","github.com","mingodad",1546191320,2018,77,30,566,2155,27,"notable","languages","programming language","other",[24,25,26,27,28],"lua","luajit","transpiler","javascript syntax","c-like syntax","mixed",-0.105,{"positive":32,"neutral":33,"mixed":34,"critical":35},2,4,1,3,10,{"docs":38,"idea":40,"execution":41,"design":42},{"positive":39,"critical":34},0,{"positive":34,"critical":39},{"positive":34,"critical":39},{"positive":39,"critical":32},[34,39,35,39,39,39,39,39,39,35,39,44,39,35,39,34,39,39,39,35,39,35,39,39,39,39,39,44,34,39],5,null,{"problem":47,"audience":45,"pricing":45,"motivation":57,"time_to_build":45,"stack":64,"openness":83,"stage":84,"team_size":84},{"value":48,"source":49,"evidence":50},"Lua's syntax differs from C-family languages, making existing code harder to reuse","maker",[51,54],{"id":52,"by":11,"text":53},"18790984","The general idea is to be able to reuse code as much as possible, and C\u002FC++\u002FJava\u002FJavascript style syntax make a lot of code available and if we ditch the 1 based index in favor…",{"id":55,"by":11,"text":56},"18791235","Fair point but I prefer less code to mantain move around, as you pointed out it's only a moderate modification of the Lua lexer\u002Fparser and not need anything else ~200KB ljs,…",{"value":58,"source":49,"evidence":59},"Reuse existing code and make the language easier to learn for C\u002FJava\u002FJavaScript programmers",[60,61],{"id":52,"by":11,"text":53},{"id":62,"by":11,"text":63},"18791687","Hello Andreas ! It's an interesting approach for jit, I did looked at your link and one of the reasons to reshape Lua with a C\u002FC++\u002FJava\u002FJavascript syntax was code reuse and…",[65,71,75,79],{"value":66,"source":49,"evidence":67},"Lua",[68],{"id":69,"by":11,"text":70},"18790311","Author here if you have any question. Also if you have done any enhancement to Lua\u002FLuaJIT and want help or talk about it I'm glad to hear from you. There is an parser\u002Ftranspiler…",{"value":72,"source":49,"evidence":73},"LuaJIT",[74],{"id":69,"by":11,"text":70},{"value":76,"source":49,"evidence":77},"lemon",[78],{"id":69,"by":11,"text":70},{"value":80,"source":49,"evidence":81},"re2c",[82],{"id":69,"by":11,"text":70},"open_source","unknown",{"praise":86,"objections":102,"requests":128,"questions":151,"alternatives":170},[87,95],{"value":88,"source":89,"evidence":90},"Transpilers are fun and the project is impactful as a next step","commenter",[91],{"id":92,"by":93,"text":94},"18790740","jxub","FYI, the link for https:\u002F\u002Fgithub.com\u002Fmingodad\u002Fraptorjit-ljs is down. Congrats for the project, transpilers are great fun. An impactful project and a logical next step would be…",{"value":96,"source":89,"evidence":97},"Interest in using it for embedded C projects",[98],{"id":99,"by":100,"text":101},"18793340","alextooter","Thanks for sharing this.This is what I want use for embedded in C projects,the same syntax.",[103,110,117,124],{"value":104,"source":89,"evidence":105},"Naming C\u002FC++\u002FJava\u002FJavaScript syntax is confusing; it is really one JavaScript-like frontend",[106],{"id":107,"by":108,"text":109},"18792053","coder543","Saying C\u002FC++\u002FJava\u002FJavaScript makes me think you've created 4 different syntax frontends for LuaJIT, when there is really only one here. It seems to me that you're really trying…",{"value":111,"source":89,"evidence":112},"JavaScript does not look like C\u002FC++\u002FJava",[113],{"id":114,"by":115,"text":116},"18792257","sdinsn","This looks like JS, and JS does not look like C\u002FC++\u002FJava",{"value":118,"source":89,"evidence":119},"Still 1-based indexing, an obstacle for some users",[120],{"id":121,"by":122,"text":123},"18792080","mkl","It looks like it's still 1-based currently, is that right? 1-based arrays have been the biggest obstacle to me using Lua.",{"value":125,"source":89,"evidence":126},"Learning curve and small community may hinder adoption",[127],{"id":62,"by":11,"text":63},[129,136,140,144],{"value":130,"source":89,"evidence":131},"Add class, switch, and const declarations",[132],{"id":133,"by":134,"text":135},"18790894","zeotroph","Maybe also properly separated list\u002Farray, map\u002Fdict and set types? The I-am-everything-{} type in lua is a bit unergonomic when you want to use it as only such a type and a…",{"value":137,"source":89,"evidence":138},"Use 0-based arrays",[139],{"id":121,"by":122,"text":123},{"value":141,"source":89,"evidence":142},"Separate list, map and set types",[143],{"id":133,"by":134,"text":135},{"value":145,"source":89,"evidence":146},"Add limited TypeScript-style transpilation",[147],{"id":148,"by":149,"text":150},"18793230","cordite","Have you considered a limited form of typescript transpilation?",[152,159,166],{"value":153,"source":89,"evidence":154},"Why modify the runtime instead of transpiling to stock Lua",[155],{"id":156,"by":157,"text":158},"18791202","dividuum","I only poked into the source code on github a bit, so I might be entirely wrong, but from what I understand, the original Lua runtimes (stock Lua, Luajit, etc) were modified for…",{"value":160,"source":89,"evidence":161},"Who maintains LuaJIT now",[162],{"id":163,"by":164,"text":165},"18790339","walterbell","Who maintains LuaJIT these days?",{"value":167,"source":89,"evidence":168},"Can 5.3 Lua projects coexist with .ljs files",[169],{"id":133,"by":134,"text":135},[171,176,183,190],{"value":172,"source":89,"evidence":173},"Moonshine \u002F Moonscript style Lua to JS or Lua transpilers",[174,175],{"id":92,"by":93,"text":94},{"id":156,"by":157,"text":158},{"value":177,"source":89,"evidence":178},"RaptorJIT, a LuaJIT fork",[179],{"id":180,"by":181,"text":182},"18793678","lukego","There’s also an active fork of LuaJIT called RaptorJIT that’s oriented towards building whole applications rather than embedding.",{"value":184,"source":89,"evidence":185},"Squirrel and Lemon languages",[186],{"id":187,"by":188,"text":189},"18790634","stephen82","For some reason, it reminds me of Squirrel language[1] and Lemon language[2]. ``` [1] http:\u002F\u002Fwww.squirrel-lang.org\u002F [2] http:\u002F\u002Fwww.lemon-lang.org\u002F ```",{"value":191,"source":49,"evidence":192},"Lily language",[193],{"id":69,"by":11,"text":70},{"comments":36,"answered":195,"key":196},6,[197,198,201],{"id":69,"text":70},{"id":199,"text":200},"18790374","Good question ! It seems that Mike Paul is still the main one that do it. Now there is a repository on https:\u002F\u002Fgithub.com\u002FLuaJIT\u002FLuaJIT\u002Fissues and after send a message to the…",{"id":202,"text":203},"18790676","I'm also forked the Squirrel at https:\u002F\u002Fgithub.com\u002Fmingodad\u002Fsquilu fixing some in my point of view missing features and making it accept a small subset of C\u002FC++ language.",{"commenters":205,"max_depth":206,"maker_replies":36,"first_comment_mins":36,"lifespan_hours":207},17,7,16,[209,211,213,215,216,219,223,225,229,230,232,233,235,237,239,241,243,247,250,253,254,255,256,258,261,263,265,268,269,270],[107,39,34,210,108,39],"project\u002Fcritical\u002Fdocs",[69,34,39,212,11,34],"maker\u002Fneutral\u002Fnone",[163,34,35,214,164,39],"project\u002Fneutral\u002Fnone",[199,34,39,214,11,34],[217,34,39,218,93,39],"18790712","other\u002Fneutral\u002Fnone",[220,34,39,221,222,39],"18791229","commenter\u002Fneutral\u002Fnone","marktangotango",[224,34,39,218,164,39],"18791507",[226,34,39,227,228,39],"18791740","other\u002Fneutral\u002Fperformance","kryptiskt",[180,34,39,218,181,39],[187,34,35,231,188,39],"project\u002Fneutral\u002Fidea",[202,34,39,212,11,34],[92,34,44,234,93,39],"maker\u002Fpositive\u002Fexecution",[236,34,39,212,11,34],"18790854",[133,34,35,238,134,39],"project\u002Fmixed\u002Fdesign",[52,34,39,240,11,34],"project\u002Fpositive\u002Fidea",[121,34,34,242,122,39],"project\u002Fcritical\u002Fdesign",[244,34,39,245,246,39],"18792520","commenter\u002Fneutral\u002Fdesign","spc476",[248,34,39,249,11,34],"18793569","commenter\u002Fneutral\u002Fidea",[251,34,39,252,11,34],"18793872","project\u002Fneutral\u002Fdesign",[156,34,35,231,157,39],[55,34,39,231,11,34],[148,34,35,231,149,39],[257,34,39,231,11,34],"18793875",[259,32,39,227,260,39],"18791559","sifoobar",[62,32,39,262,11,34],"commenter\u002Fcritical\u002Fidea",[264,32,39,221,260,39],"18791758",[266,32,39,267,260,39],"18792882","commenter\u002Fneutral\u002Fperformance",[99,35,44,240,100,39],[114,33,34,242,115,39],[271,33,39,245,272,39],"18792488","tyingq",[],[275,280,284,289,293,297],{"id":276,"name":277,"points":278,"category":279},"18776496","rrweb",353,"dev_tools",{"id":281,"name":282,"points":283,"category":279},"18789268","Vector Logo Zone",275,{"id":285,"name":286,"points":287,"category":288},"18776589","Pg-extend-rs",244,"infrastructure",{"id":290,"name":291,"points":292,"category":279},"18787777","Bake",132,{"id":294,"name":295,"points":296,"category":20},"18798209","Snigl",87,{"id":298,"name":299,"points":300,"category":279},"18794928","Autumn",75,false,"v2",{"id":304,"name":5,"line":6,"ai":301,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":305,"top":18,"kw":306,"maker":11,"domain":10,"tier":19,"attempts":39,"strip":307,"url":9,"mix":308,"praise":88,"objection":104,"sub":21},18790255,-0.1,[24,25,26,27,28],"103000000305030100030300000510",[32,33,34,35],1794036573138]