Lua Scripting - page 2 - Feature Requests - CHDK Forum

Lua Scripting

  • 14 Replies
  • 11456 Views
*

Offline Velo

  • *
  • 30
Re: Lua Scripting
« Reply #10 on: 27 / April / 2008, 06:11:35 »
Advertisements
Good news. With newlib's setjmp/longjmp implementation error handling works now like a charm.

I think script parameters is the last feature that is missing compared to uBASIC.
Well, shouldn't take too long. :)


Re: Lua Scripting
« Reply #11 on: 29 / April / 2008, 07:35:53 »
Impressive. I started on that but gave up almost as soon as I started. Shows how persistent I am. :P
Next step: Implement an offline script compiler (the parser bits) so one doesn't have to compile them on the PC, (possibly) risking breakage if the bytecode format changes and you forget to recompile. Please. :)
This depends, of course, on how much program memory space the cameras have. And other stuff.

*

Offline Velo

  • *
  • 30
Re: Lua Scripting
« Reply #12 on: 29 / April / 2008, 12:54:05 »
You don't have to compile them on the PC. My current version compiles it in the cam.

But I'm thinking about how to reduce the compiled image size. To kick the parser would be the first thing to do. But than you loose the ability to compile Lua source in the cam.

But I have the idea to use a Lua compiler that is written in Lua. So you only load the compiler when you need it.
This idea can be extended to nearly all of chdk, I guess.

A little core with Lua runtime and all cam-function bound to Lua. And a rich set of Lua scripts implementing the logic of CHDK. But this idea is far in the future.


*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: Lua Scripting
« Reply #13 on: 29 / April / 2008, 15:43:29 »
actually having a cross-compiler would be a GREAT bonus.
At least the syntax erros could be found without switching the card to the camera and back....


*

Offline Velo

  • *
  • 30
Re: Lua Scripting
« Reply #14 on: 29 / April / 2008, 16:05:19 »
Well this is easy. Just install Lua on you PC and run 'lua' on the scripts.
You can even write a stub script with all available cam-functions and let the script run.

uBasic seems to have the same feature. At least I've seen this in the source tree. But never tried it.


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal