Lua
                                      Steroids
                                                                  on




Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
What is
             Lua
       all about

Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
http://www.lua.org/about.html




        “Lua is a powerful, fast,
      lightweight, embeddable
         scripting language.”



         Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Rationale

 Extending C/C++ applications with a
 configuration / scripting engine




            Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Rationale

 Extending C/C++ applications with a
 configuration / scripting engine

     Based on a virtual machine
     Can load source code / read char streams
     And compile it into portable bytecode




            Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Rationale

 Extending C/C++ applications with a
 configuration / scripting engine

     Tiny core (150kB)
     Pure ANSI C
     Simple C API




            Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Rationale

 Extending C/C++ applications with a
 configuration / scripting engine

     DSL building kit
     Provides only basic features
     And a powerful runtime




            Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
A language gaining momentum
 Video games                                        App scripting
   World of Warcraft                                       Adobe Lightroom
   Havoc physics                                           Redis (key-value
    engine                                                   store)
   AI scripting
 Mobile                                             Embedded
   Corona SDK                                              Brew MP
   Moai                                                     (Qualcomm)

   LÖVE                                                    eLua (Petrobras)
                                                            AAF (Sierra Wireless)

           Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
What
                                   is
  missing
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
IDE
 support
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
http://www.eclipse.org/koneki/ldt/


               Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Rationale

 A tool that follows Lua’s philosophy

 Providing lots of modern features while
 remaining easily embeddable in larger
 systems.




            Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
However…

 Lua strengths
   Dynamic
   Embeddable


 are double-edged swords

 that make tooling support tedious.


         Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Editor
VS.

Dynamic
code


      Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Debugger
VS.

Embedded
application


      Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
LDT
for m2m development




   Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
m2m.eclipse.org                              MQTT broker




  Wireless gateway                                                      Mobile phone




  Wireless (Zigbee) sensors




Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Two Lua applications
 Embedded                                        Mobile
    Aleos Application                                      Corona
    Framework                                            SDK                                                .


  Collects Zigbee data on                                Subscribes to MQTT
  device’s serial port                                   messages
  Publishes MQTT messages                                Displays sensor data with
                                                         a fancy UI




            Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
What’s
    Next
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
LDT Roadmap

 LDT 0.8 will be in Juno

 Content-assist (pending CQ)
    Beta product here: http://goo.gl/NZgCc

 Execution environments

 Next…
    Launch configurations (w/ embedded interpreter)
    Pre-bundled execution environments
          Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Big thanks to

  Eclipse
     RSE               http://www.eclipse.org/tm/
     DLTK              http://www.eclipse.org/dltk/


  Lua
     JNLua             http://code.google.com/p/jnlua/
     MetaLua           http://metalua.luaforge.net/
     LDoc              http://github.com/stevedonovan/LDoc




              Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Useful links

  Lua
     Main site http://lua.org
     Kepler project http://www.keplerproject.org/


  LDT
     Koneki http://www.eclipse.org/koneki/
     Installation http://download.eclipse.org/koneki/updates
     Wiki http://wiki.eclipse.org/Koneki
     Forum http://www.eclipse.org/forums/eclipse.koneki


            Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.

Lua on Steroids - EclipseCon NA 2012

  • 1.
    Lua Steroids on Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 2.
    What is Lua all about Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 3.
    http://www.lua.org/about.html “Lua is a powerful, fast, lightweight, embeddable scripting language.” Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 4.
    Rationale Extending C/C++applications with a configuration / scripting engine Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 5.
    Rationale Extending C/C++applications with a configuration / scripting engine  Based on a virtual machine  Can load source code / read char streams  And compile it into portable bytecode Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 6.
    Rationale Extending C/C++applications with a configuration / scripting engine  Tiny core (150kB)  Pure ANSI C  Simple C API Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 7.
    Rationale Extending C/C++applications with a configuration / scripting engine  DSL building kit  Provides only basic features  And a powerful runtime Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 8.
    A language gainingmomentum  Video games  App scripting  World of Warcraft  Adobe Lightroom  Havoc physics  Redis (key-value engine store)  AI scripting  Mobile  Embedded  Corona SDK  Brew MP  Moai (Qualcomm)  LÖVE  eLua (Petrobras)  AAF (Sierra Wireless) Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 9.
    What is missing Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 10.
    IDE support Copyright ©2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 11.
    http://www.eclipse.org/koneki/ldt/ Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 12.
    Rationale A toolthat follows Lua’s philosophy Providing lots of modern features while remaining easily embeddable in larger systems. Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 13.
    However… Lua strengths  Dynamic  Embeddable are double-edged swords that make tooling support tedious. Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 14.
    Editor VS. Dynamic code Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 15.
    Debugger VS. Embedded application Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 16.
    LDT for m2m development Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 17.
    m2m.eclipse.org MQTT broker Wireless gateway Mobile phone Wireless (Zigbee) sensors Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 18.
    Two Lua applications Embedded  Mobile Aleos Application Corona Framework SDK . Collects Zigbee data on Subscribes to MQTT device’s serial port messages Publishes MQTT messages Displays sensor data with a fancy UI Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 19.
    What’s Next Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 20.
    LDT Roadmap LDT0.8 will be in Juno Content-assist (pending CQ)  Beta product here: http://goo.gl/NZgCc Execution environments Next…  Launch configurations (w/ embedded interpreter)  Pre-bundled execution environments Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 21.
    Big thanks to Eclipse  RSE http://www.eclipse.org/tm/  DLTK http://www.eclipse.org/dltk/ Lua  JNLua http://code.google.com/p/jnlua/  MetaLua http://metalua.luaforge.net/  LDoc http://github.com/stevedonovan/LDoc Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 22.
    Useful links Lua  Main site http://lua.org  Kepler project http://www.keplerproject.org/ LDT  Koneki http://www.eclipse.org/koneki/  Installation http://download.eclipse.org/koneki/updates  Wiki http://wiki.eclipse.org/Koneki  Forum http://www.eclipse.org/forums/eclipse.koneki Copyright © 2012 Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.
  • 23.
    Copyright © 2012Sierra Wireless. All Right reserved. Made available under the Eclipse Public License v1.0.