Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ruby + Lua - Demian Kostelny | Ruby Meditation 28

131 views

Published on

Talk of Demian Kostelny, Freelance, Middle PHP Developer, at Ruby Meditation #28 Kyiv 26.10.2019
Next conference - http://www.rubymeditation.com/

How can we program with Ruby and Lua? And how can we use it in Minecraft mods to write code in real-time of the game?

Announcements and conference materials https://www.fb.me/RubyMeditation
News https://twitter.com/RubyMeditation
Photos https://www.instagram.com/RubyMeditation
The stream of Ruby conferences (not just ours) https://t.me/RubyMeditation

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Ruby + Lua - Demian Kostelny | Ruby Meditation 28

  1. 1. Ruby + Lua Talk by Demian Kostelny
  2. 2. Demian Kostelny Fullstack PHP Developer 3 года в веб-разработке Автор книги “PHP Junior Kit” 📖 Основатель бренда Funky (@funky.brand) @funknoid @KostDemian
  3. 3. Что такое вообще Lua?
  4. 4. ● Машинное обучение LuaJIT ● Написание веб-сервер ● Можно использовать для сервера к Arduino или Rassberry Pi. ● Написание игр и модов к играм. ● Написание веб-приложений с помощью фреймворков.
  5. 5. Синтаксис похож на Ruby
  6. 6. function fact (n) if n == 0 then return 1 else return n * face(n - 1) end end print(“Enter a number:” ) a = io.read(“*number”) print(fact(a))
  7. 7. А давайте Фреймворки для Lua
  8. 8. LuaRocks - свой пакетный менеджер для Lua
  9. 9. Lapis local lapis = require “lapis” local app = lapis.Application() app:match(“/”, function(self) return “Hello world!” end) return app
  10. 10. Lua для построения шаблонов
  11. 11. Ruby + Lua
  12. 12. Окей, и как мы это сделаем?
  13. 13. А вообщем мы это сделаем с использование библиотек которые создают виртуальную машину для Lua в Ruby приложении.
  14. 14. Конекторы для Ruby:
  15. 15. glejeune/ruby-lua
  16. 16. Подключаем наш гем Создаем класс для использования Lua Так можно запустить свой Lua код через Ruby Или вот к примеру запуск какой то своей функции написанной на Lua require “language/lua” lua = Language::Lua.new() lua.eval(“script.lua”) out = lua.my_lua_function(...) print out;
  17. 17. rufus-lua
  18. 18. Ещё пример: require “rufus-lua” s = Rufus::Lua:: State.new s.eval(“rubies = {}” ) s.function ‘add’ do |x, y| x + y end s.eval(“rubies.add(1, 2)”) # => 3.0 s.close Выполняем Lua функции в нашей виртуальной машине созданной с помощью Ruby
  19. 19. А смысл?
  20. 20. ● Обход интерпретатора Ruby ● Использование фич Lua ● Написание приложений на Lua после чего их запуск через Ruby ● Обращение к Lua программам с помощью Ruby И многое другое...
  21. 21. МЫ СОЗДАЛИ MINECRAFT ДЛЯ ТОГО ЧТОБЫ ТЫ МОГ ПРОГРАММИРОВАТЬ В MINECRAFT ПОКА ТЫ ИГРАЕШЬ MINECRAFT
  22. 22. Управление реальными вещами из виртуальной машини Lua
  23. 23. https://habr.com/ru/post/271527/
  24. 24. Вывод
  25. 25. Вопросы?
  26. 26. Конец @funknoid @KostDemian

×