CppCon 2018: JeanHeyd Meneide “Scripting at the Speed of Thought: Lua and C++ with sol3”

preview_player
Показать описание


A big part of accelerating development and promoting collaboration often translates to deferring a lot of the typical programmer work to a scripting language, to allow for those with more design-oriented ideas and experience to handle some of the workload. What happens, then, when you have to bind a scripting language like Lua into C++ to allow for this workflow?

This session is going to be all about how you enable non-developers and developers alike to rapidly increase their development productivity by turning routines and algorithms into data that can be shipped alongside your product in Lua. We will talk primarily how you can use the library sol2 to abstract away the muck of working with the Lua C API and instead focus on using and describing both Lua and C++ with each other in a simple manner. We will demonstrate some of the more interesting properties of sol such as Overloading Support, Container Support, Usertypes -- C++ classes made available with automatic support for unique/shared pointers -- and Tables.

By the time this session is over, you will have a firm grasp over what a good Lua Binding can offer you, and how you can accelerate your C++ development with it.

JeanHeyd Meneide, Columbia Unviersity
Student

JeanHeyd "ThePhD" is a student at Columbia University in New York. Most of his programming is for fun and as a hobby, even if his largest open-source contribution -- sol2 -- is used across many industries. He is currently working towards earning his own nickname, climbing the academic ladder while spending as much time as possible contributing to C++ standardization and development.

He very much loves dogs and hopes to have his own in a year or so. He also likes Vulf's "Tee Time" from the album Mr. Finish Line.

*-----*
Комментарии
Автор

Glad to see the aging, outdated LuaBridge library which I was working on has been replaced by newer, modern solutions :)

thevinn
Автор

Excellent talk - really clear and informative.

fburton
Автор

Lua is used for other things than video games? *insert surprised pikatchu meme* :o

LemonChieff
Автор

What i miss with Lua is an integratable development environment. If i offer user level lua scripting in my app, my app should contain at least a simple IDE. Unfortunate ZeroBrane is not developed anymore and compilation is terrible (makes you hate the package manager problem of C++).

llothar
Автор

I never found the lua binding api all that hard to work with as-is. While this is a very nice little binding library, seems like extra overhead, at least for my projects.

psyjax
Автор

Lua and Sol are fantastic but lua's lack of types / debuggability / intellisense are big problems, especially if you're trying to build a user friendly api. You are forcing the user to rely on documentation and manually looking up things, manually printing them to debug, etc.
That said there really aren't a great variety of solutions that are better in this regard.
I have seen some use of TypeScript which is quite nice but then you have the giant v8, and a transpiler, and you still have to manually declare all of the api in TypeScript...

noxabellus