Introducing Lua/HTML5 Web IDE, a web-based Lua IDE that will help you write and test Lua programs. It also aims to be a complete LuaZM simulator, among other things.

Features
- LuaZM support
- Partial Nspire Lua support
- An interpreter, an editor and a display
- A windowing system (beta, chances it breaks stuff while resizing)
- run() will execute the code in the editor (already preloaded with sample code)
- dofile(url) (same as run(url)) runs asynchronously a file from the Internet
- canvas.mode(width, height) - Resizes the display ("nspire", "prizm" or "big" are supported instead of (width, height))

To do
- Keyboard and clipping support for LuaZM
- Nspire Lua support
- An integration API
- Tons of features!

http://juju2143.ca/lua
It doesn't seem to like loops...
This looks like it will be a great tool, Juju! Is this based on the Lua core that Jimbauwens wrote, or is this an independent interpreter? Since I'm hoping to get a new beta of LuaZM out soon, thanks to persistent reminders from flyingfisch and nsg, I'll try to keep you up-to-date on any new or modified functions. Also, in the interest of LuaZM, may I remind you once again about PrizmIO? Smile
flyingfisch wrote:
It doesn't seem to like loops...


I'm sorry, reading that just now, it probably sounded a little curt. I was in a hurry and had a couple projects going at the same time, sorry. :-\

Anyway, this looks like a really cool project, can't wait to see it finished! Smile
It is indeed the same Lua core Jim Bauwens uses. And only 2 functions from the zmg library are left to implement (3 if you count the fact keyDirect uses PC keycodes and not the Prizm ones).

And yeah I have a problem with loops, I think it's a feature of Javascript actually, the JS is executed in the same thread as the UI, so if you execute a lengthy while loop, the UI crashes. So I'm looking at a solution, maybe worker threads.

And yes you can nag me with PrizmIO. Maybe this weekend when I'll get less busy with everything.
juju2143 wrote:

And yeah I have a problem with loops, I think it's a feature of Javascript actually, the JS is executed in the same thread as the UI, so if you execute a lengthy while loop, the UI crashes. So I'm looking at a solution, maybe worker threads.

And yes you can nag me with PrizmIO. Maybe this weekend when I'll get less busy with everything.


Doesn't jsTIfied run in a loop?
The loops are most likely made of setTimeout or setInterval, which does pratically the same thing as while, but sets up a delay between each iteration so other stuff can happen meanwhile and so the browser won't break.
juju2143 wrote:
The loops are most likely made of setTimeout or setInterval, which does pratically the same thing as while, but sets up a delay between each iteration so other stuff can happen meanwhile and so the browser won't break.


Would it be possible to do that with this?
flyingfisch wrote:
juju2143 wrote:
The loops are most likely made of setTimeout or setInterval, which does pratically the same thing as while, but sets up a delay between each iteration so other stuff can happen meanwhile and so the browser won't break.


Would it be possible to do that with this?
Probably. I guess it would be upstream in the lua.js code though.
The Fun Has Been Doubled Update:

- Save file dialog
- Luna support (Save as TNS) (hence the update name Razz)
- It's on GitHub!
The Long-Awaited Infinite Loop Update:

- Infinite loops!
- Threading!

That is, infinite loops work! Try it out with this sample code:


Code:
i = 0
zmg.clear()
while true do
zmg.drawText(0,0,i,zmg.makeColor("black"),zmg.makeColor("white"))
zmg.fastCopy()
time = zmg.ticks()
while time+128 >= zmg.ticks() do end
i = i+1
end


then select Tools > Run (threaded). You should put a sleep loop (line 6 and 7) in there or else the browser crashes. So yeah, the Lua code is now ran in a web worker, that is, a different thread from the UI one. All the recent major browsers (including IE10) should support it (or else it would tell you). Have fun, and, as usual, report all the bugs here Smile
juju2143 wrote:
The Fun Has Been Doubled Update:

- Save file dialog
- Luna support (Save as TNS) (hence the update name Razz)
- It's on GitHub!
Great! Now, from what Adriweb was saying in another Cemetech topic, Luna has some bugs and doesn't always export TNS files properly. Do you know if that is the case with the version of Luna you're using, and/or if that's just heresay?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement