tag:blogger.com,1999:blog-5248616490907735528.post221011673450512568..comments2023-03-20T05:36:55.114-07:00Comments on Scriptensity: Lua Improvementskripkenhttp://www.blogger.com/profile/06468064783634443137noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-5248616490907735528.post-86362973726261372872011-06-08T22:44:49.472-07:002011-06-08T22:44:49.472-07:00The Lua demo page ( http://syntensity.com/static/l...The Lua demo page ( http://syntensity.com/static/lua.html ) mentions the needs for a Lua syntax highlighter. Codemirror ( http://codemirror.net/ ) supports this now, so switching Skywriter to Codemirror will do the trick.<br /><br />/philjaquethttps://www.blogger.com/profile/08338519329195168724noreply@blogger.comtag:blogger.com,1999:blog-5248616490907735528.post-78447852566091348832010-12-12T22:57:12.633-08:002010-12-12T22:57:12.633-08:00@Dave
Going through the Lua LLVM frontend would b...@Dave<br /><br />Going through the Lua LLVM frontend would be better, yeah. Let me know if you get that working, or if I can help!kripkenhttps://www.blogger.com/profile/06468064783634443137noreply@blogger.comtag:blogger.com,1999:blog-5248616490907735528.post-87613369539170051292010-12-04T21:05:11.015-08:002010-12-04T21:05:11.015-08:00Just tried a few examples from http://lua-users.or...Just tried a few examples from http://lua-users.org/wiki/MathLibraryTutorial and many of the functions didn't work (but some did). The following didn't work:<br /><br />math.floor<br />math.ceil<br />math.pow (x^y doesn't work either)<br />math.log<br />math.exp<br />math.frexp<br />math.ldexp<br />math.log<br />math.log10<br />math.modf<br />math.random<br />math.randomseed<br /><br />and "/bin/this.program: (error object is not a string)" was displayed in response on the webpage. <br /><br />http://lua-users.org/lists/lua-l/2008-06/msg00124.html contains tests for Lua 5.1. If you want to add tests for non-C/C++ languages, Lua might be a candidate.<br /><br />Using Emscripten to run the Lua interpreter (not LuaJIT?) in the browser seems like a fun way to learn the language. I'm a Lua newbie.<br /><br />Maybe I'll give the Lua LLVM front end a try and feed the generated bitcode into Emscripten...not as fun as running the entire VM but maybe it'll be a faster and smaller way of running Lua apps in the browser. Accessing the DOM is going to be a problem...unless I'm missing something.<br /><br />Thanks for the great work.david_from_1979https://www.blogger.com/profile/08941265578599474924noreply@blogger.comtag:blogger.com,1999:blog-5248616490907735528.post-15853506182236332252010-11-27T14:22:52.668-08:002010-11-27T14:22:52.668-08:00Ok, uploaded a fix. Stuff should now work in all b...Ok, uploaded a fix. Stuff should now work in all browsers, including those without typed arrays. Tested on Chrome and Firefox. Please let me know if something is broken.kripkenhttps://www.blogger.com/profile/06468064783634443137noreply@blogger.comtag:blogger.com,1999:blog-5248616490907735528.post-34890543837673162010-11-27T12:24:00.157-08:002010-11-27T12:24:00.157-08:00Thanks for the feedback Lazza and TheAncientGoat!
...Thanks for the feedback Lazza and TheAncientGoat!<br /><br />@Lazza: Hmm, to be honest I don't know Lua much either ;) But if you replace |io.write| with |print| then that code will work.<br /><br />I suspect as the TheAncientGoat says, it is trying to do IO to a file or something, and running on the web won't allow that...<br /><br />@TheAncientGoat: Ah, it seems to only work in browsers that support typed arrays right now... will have a fix up shortly.kripkenhttps://www.blogger.com/profile/06468064783634443137noreply@blogger.comtag:blogger.com,1999:blog-5248616490907735528.post-51186763134566340602010-11-27T11:19:06.471-08:002010-11-27T11:19:06.471-08:00Why? I don't know LUA so please be patient wit...Why? I don't know LUA so please be patient with me. :)<br />I found the example on the official website so I tought it was appropriate...Lazzahttps://www.blogger.com/profile/04733986432331615349noreply@blogger.comtag:blogger.com,1999:blog-5248616490907735528.post-47039752632471290692010-11-27T08:15:26.130-08:002010-11-27T08:15:26.130-08:00For loops only seem to work in Firefox, broken in ...For loops only seem to work in Firefox, broken in chrome and opera.<br /><br />lazza: I'd be pretty scared if io functions worked..TheAncientGoathttps://www.blogger.com/profile/08365731187779683178noreply@blogger.comtag:blogger.com,1999:blog-5248616490907735528.post-71247042506900627122010-11-27T03:27:28.665-08:002010-11-27T03:27:28.665-08:00Still doesn't work. I tried with this code:
io...Still doesn't work. I tried with this code:<br />io.write("Hello world, from ",_VERSION,"!\n")<br />Found on the Lua Web Demo: http://www.lua.org/cgi-bin/demoLazzahttps://www.blogger.com/profile/04733986432331615349noreply@blogger.com