lubyk - the programming language lua · lubyk lua libraries for live arts gaspard bucher (buma)!...
TRANSCRIPT
![Page 1: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/1.jpg)
lubyklua libraries for live arts
Gaspard Bucher (Buma)!artist, musician, coder
![Page 2: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/2.jpg)
lubyk
is not a framework
![Page 3: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/3.jpg)
![Page 4: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/4.jpg)
![Page 5: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/5.jpg)
Why lubyk ?• Reuse code from project to project • Accelerate development (live coding) • Simple APIs • Good documentation • Stability (unit tests)
![Page 6: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/6.jpg)
History !• 2006 First prototype in Ruby
• Slow, inaccurate, rubato music • 2008 Second pure C++ version, many threads,
mutex. Lua scripting. Works when not crashing
![Page 7: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/7.jpg)
2008 “Home” machine learning based movement recognition
![Page 8: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/8.jpg)
History !• 2006 First prototype in Ruby
• Slow, inaccurate, rubato music • 2008 Second pure C++ version, many threads,
mutex. Lua scripting. Works when not crashing • 2011 Third version, pure lua, Qt GUI, multi-process,
network distribution (mdns, zeroMQ, Msgpack).
![Page 9: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/9.jpg)
2011 “boats to nowhere”
![Page 10: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/10.jpg)
2011 All written in lua (dub made Qt bindings)
![Page 11: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/11.jpg)
What was wrong ?• Did not scale well to larger projects • Confusing interface • Hard to work on different parts (shaders, physics,
control, music integration, etc). • Too complex, hard to share modules • Complicated GUI takes too much dev time !!
![Page 12: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/12.jpg)
less is more
![Page 13: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/13.jpg)
History !• 2006 First prototype in Ruby
• Slow, inaccurate, rubato music • 2008 Second pure C++ version, many threads,
mutex. Lua scripting. Works when not crashing • 2011 Third version, pure lua, Qt GUI, multi-process,
network distribution (mdns, zeroMQ, Msgpack). • 2014 Fourth version, modules, tests, doc
![Page 14: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/14.jpg)
Modules
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 15: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/15.jpg)
lub• Class declaration • Template {{moustache}} • Directory traversal • Algorithm (search) • String, Array helpers • etc
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 16: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/16.jpg)
Documentation, testing• Inline documentation • Literate programming • Testing framework • Coverage • Module setup/build
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 17: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/17.jpg)
lut.DocCross references
Latex Math
![Page 18: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/18.jpg)
lut.Doc!literate programming
![Page 19: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/19.jpg)
lut.Doc!literate programming
![Page 20: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/20.jpg)
Testing with lut.Test
![Page 21: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/21.jpg)
Libraries using lut
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 22: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/22.jpg)
lens• Scheduling • Socket (TCP, UDP) • Thread • Timer • FileWatch
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 23: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/23.jpg)
encode / decode
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 24: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/24.jpg)
Core graphic types
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 25: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/25.jpg)
bulletphysics (3D physics)
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
• lug integration
![Page 26: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/26.jpg)
media (video, image)
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
• Native (AVFoundation) • Fast, asynchronous • Multi-threaded
![Page 27: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/27.jpg)
OpenGL 4
• Shaders • Geometry • Etc
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 28: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/28.jpg)
Native UI• Provides OpenGL context • Event loop integration
with lens • View (window/view) • Mouse, keyboard
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 29: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/29.jpg)
midi• Midi in/out • Virtual ports, real ports • Note handling (off event)
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 30: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/30.jpg)
C++ binding generator
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
• Advanced type management • GC protection • Fast callbacks from C • Cast, operators, etc • Customizable • Uses doxygen
![Page 31: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/31.jpg)
Libraries using dub
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 32: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/32.jpg)
OS Support
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 33: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/33.jpg)
Windowsalpha
beta
released
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 34: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/34.jpg)
Linuxalpha
beta
released
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
![Page 35: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/35.jpg)
Mac OS X
lub
lens
lui
four
yaml
lmidi
xmllug osc
lut dubbtmedia
• media = 10.9
alpha
beta
released
![Page 36: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/36.jpg)
Future plans• Simple multi-machine, multi-process support
(mdns + zmq + dropbox) • Parameter support (per effect, per object, etc).
Makes code reuse and adaptation easy. • Eventually, use a simple web app for this. • Exploration needed, ideas welcome !
![Page 37: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/37.jpg)
Immediate plans• Finish Linux port, start Windows port, for fun RPi • Extract lug from four and optimize data transfers • Fix old lubyk libraries
• mdns (Zeroconf plug&play network) • zmq (ZeroMQ messaging library) • box2D (2D physics)
• Parameter handling • Workshops !
![Page 38: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/38.jpg)
using lubyk• Stable modules: luarocks install … • Licence: MIT • Documentation: doc.lubyk.org • Source code: github.com/lubyk • Twitter: @lubyk_
![Page 39: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/39.jpg)
![Page 40: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/40.jpg)
![Page 41: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/41.jpg)
![Page 42: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/42.jpg)
![Page 43: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/43.jpg)
![Page 44: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/44.jpg)
![Page 45: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/45.jpg)
![Page 46: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/46.jpg)
![Page 47: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/47.jpg)
![Page 48: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/48.jpg)
![Page 49: lubyk - The Programming Language Lua · lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder. lubyk is not a framework. Why lubyk ? • Reuse code from](https://reader030.vdocuments.us/reader030/viewer/2022040415/5eb06d4faa63d513d7684669/html5/thumbnails/49.jpg)