CppCon 2017: Andreas Weis “Howling at the Moon: Lua for C++ Programmers”

  Рет қаралды 31,593

CppCon

CppCon

Күн бұрын

Пікірлер: 36
@outsider1st
@outsider1st 7 жыл бұрын
Wow they mentioned Sol2, I'm currently using it, best binding I've ever used. It has decent documentation, pretty cool examples, great dude who's maintaining it and oh, it's written in a modern cpp!
@PoopLoserDa69th
@PoopLoserDa69th 7 жыл бұрын
ikr Sol2 is amazing
@daggawagga
@daggawagga 6 жыл бұрын
Damn I checked out Sol2 and it's truly amazing, it has even more conveniences than I could imagine. Also the source is lit 😂 I wish other language bindings were half as practical as this one
@yash1152
@yash1152 11 ай бұрын
32:10
@radoslawbiernacki
@radoslawbiernacki 7 ай бұрын
Wooow this is so good. Compact and to the point! Ideal for C++ devs.
@tobiasfuchs7016
@tobiasfuchs7016 7 жыл бұрын
MUC++ had four talks (Andreas, Klaus, Lukas and some newb) at CppCon'17, now that's something that makes me proud of my town.
@yash1152
@yash1152 11 ай бұрын
14:17 operator overloading? 14:27 metatable (table with special fields' custom def) and attaching normal table to a particular metatable
@simgesonmez3508
@simgesonmez3508 3 жыл бұрын
concise and informative, thanks.
@CppCon
@CppCon 3 жыл бұрын
Glad it was helpful!
@BitPuffin
@BitPuffin 5 жыл бұрын
What's the game at 1:50 in the top left corner?
@rj00a
@rj00a 5 жыл бұрын
That would be Escape From Monkey Island (2000)
@BitPuffin
@BitPuffin 5 жыл бұрын
@@rj00a Much appreciated my dude
@yash1152
@yash1152 11 ай бұрын
this talk is well made! why? 'cz: * the slides are made by latex/beamer like similar software (not some dumb powerpoint) * the aspect ratio is smaller than 16:9 * as it has to leave enough space in side to put the speaker inset this above last point becomes a huge issue otherwise
@eliseulucenabarros3920
@eliseulucenabarros3920 2 жыл бұрын
imagine this guy, realize that lisp has only lists and is the only complex data structure to interpret lisp on lisp...
@yash1152
@yash1152 11 ай бұрын
13:49 > _"don't want to pass it explicitly, ... colon syntax"_ wish java wrapper object method implementors were this aware of situations.
@tomasruzicka9835
@tomasruzicka9835 3 жыл бұрын
"I don't know about any language that can manage with just one complex data structure" What about JavaScript and it's dynamic Object? Heck it's basically the same thing. It's a key, value pair with potentially "magic" functions associated with it. Great talk overall tho :-)
@llothar68
@llothar68 7 жыл бұрын
Two problems with Lua: Speed is bad when you go OO with a Lua class hierarchy and the stack API is in fact terrible if you do something serious in the C routine which is not a simple take parameter - return argument. And another thing might be a problem: The garbage collector was improved in 5.3 but it is still terrible (neither ruby nor python is better) when you have large memory sets.
@peppybocan
@peppybocan 7 жыл бұрын
what about LuaJIT?
@llothar68
@llothar68 7 жыл бұрын
LuaJIT doesn't help with method lookup/invocation speed.
7 жыл бұрын
Then don't make a class hierarchy unless you really need to
@llothar68
@llothar68 7 жыл бұрын
Sometimes you just have to make it a class hierarchy. Try wrapping GTK with Lua. And then add a few thousand items to a list. It's painful (even if the most pain still comes from GTK).
7 жыл бұрын
Just a question: how are you creating this class hierarchy of yours? Are you setting metatables or just storing the methods in each of the objects?
@llothar68
@llothar68 7 жыл бұрын
Another performance killer. If you use a custom type, they want you to put a type identificator into the global hash table so during parameter checking you have another hash calculation and lookup operation, instead of storing a pointer to a type descriptor and doing it in one instruction. Add the inefficency of the stack and you wonder where the Lua is fast myth comes from. Not from skilled C++ programmers. And i have no idea why simple implementation should be a point of interest for any user (it's only for the implementors). This is the main reason why still all script languages technically suck, except Javascript which sucks on the language design.
@llothar68
@llothar68 7 жыл бұрын
I read the source Luke. And i did benchmarks.
@jking907
@jking907 6 жыл бұрын
every benchmark ive read shows lua is fast @@llothar68
@llothar68
@llothar68 6 жыл бұрын
@@jking907 not if the benchmarks include user datatypes or inheritance hierarchies (they are the worst performance pigs). Games do neither use datatype verification of user types (thats where you get the additional lookups) nor inheritance (thats done on the c++ side). Lua is also almost not used anymore in the gaming industry now we have stable V8 javascript which shows that Lua might be better then other 1990ths script languages but not a fast language with a smart system (like javascript).
@HammerheadHal
@HammerheadHal 5 жыл бұрын
@@llothar68 Inheritance hierarchies are a problem in any language, we should all work on minimising them. Also LuaJIT handles lookup differently than Lua and beats v8 in benchmarks. Those are standard issue benchmarks that do not tend to take into account the extremely available and performant LuaJIT FFI implementation.
@egorsozonov7425
@egorsozonov7425 2 жыл бұрын
Where are you even getting this from, Lothar? First of all, Lua doesn't have good performance but not for the reasons you've listed. "inefficiency of the stack", really? Lua has a register-based VM. "hash calculation"? Do you even realize that a scripting language like Lua does not do any CPU-intensive work, instead it calls into native code which does the heavy lifting? Lua is not fast but fast enough. It's there to complement native, compiled languages with its high-level, dynamically loaded capabilities. And yeah, it's much faster than JokeScript because a fast JokeScript runtime like V8 weighs like a hog and is painful to interop with. As for why simplicity of implementation is a point of interest for users, it's because simple programs have fewer bugs and unpleasant performance surprises. V8 is buggy as hell for the simple reason that it's millions of lines of code. Lua is less than 30k lines of code, it can be proofread easily, and it does just what it promises, no more, no less.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Automating Sequences via Lua Coroutines in C++
45:23
javidx9
Рет қаралды 60 М.
Bjarne Stroustrup - The Essence of C++
52:46
code::dive conference
Рет қаралды 2 М.
CppCon 2017: Chandler Carruth “Going Nowhere Faster”
1:00:58
NeovimConf 2022: Lua, a Primer
30:10
John McBride
Рет қаралды 20 М.