Enviar pesquisa
Carregar
使用Lua提高开发效率
•
1 gostou
•
1,274 visualizações
G
gowell
Seguir
Tecnologia
Negócios
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 10
Baixar agora
Baixar para ler offline
Recomendados
Lucene 全文检索实践
Lucene 全文检索实践
yiditushe
自动生成 Makefile 的全过程详解!
自动生成 Makefile 的全过程详解!
hik_lhz
GNU Autoconf / Automake #1
GNU Autoconf / Automake #1
imacat .
test
test
xieyq
MySQL aio
MySQL aio
zhaolinjnu
Gnu
Gnu
Ak Saint
六步教你学会简单Rmi
六步教你学会简单Rmi
yiditushe
Spring 2.0 技術手冊第九章 - API 封裝
Spring 2.0 技術手冊第九章 - API 封裝
Justin Lin
Recomendados
Lucene 全文检索实践
Lucene 全文检索实践
yiditushe
自动生成 Makefile 的全过程详解!
自动生成 Makefile 的全过程详解!
hik_lhz
GNU Autoconf / Automake #1
GNU Autoconf / Automake #1
imacat .
test
test
xieyq
MySQL aio
MySQL aio
zhaolinjnu
Gnu
Gnu
Ak Saint
六步教你学会简单Rmi
六步教你学会简单Rmi
yiditushe
Spring 2.0 技術手冊第九章 - API 封裝
Spring 2.0 技術手冊第九章 - API 封裝
Justin Lin
自由軟體鑄造場_20111023_Subversion版本控制系統之操作_曾義峰(ant)
自由軟體鑄造場_20111023_Subversion版本控制系統之操作_曾義峰(ant)
OpenFoundry
啟動 Laravel 與環境設定
啟動 Laravel 與環境設定
Shengyou Fan
Spring 2.0 技術手冊導讀
Spring 2.0 技術手冊導讀
Justin Lin
Jetty服务器架构及调优.v2 2011-5
Jetty服务器架构及调优.v2 2011-5
lovingprince58
GNU Autoconf / Automake #4
GNU Autoconf / Automake #4
imacat .
COSCUP 2016 Laravel 部署工作坊 - 部署指南
COSCUP 2016 Laravel 部署工作坊 - 部署指南
Shengyou Fan
Phpconf 2011 introduction_to_codeigniter
Phpconf 2011 introduction_to_codeigniter
Bo-Yi Wu
PHP 語法基礎與物件導向
PHP 語法基礎與物件導向
Shengyou Fan
Openshift by mtchang
Openshift by mtchang
Chang Mt
Spring4.x + hibernate4.x_配置详解
Spring4.x + hibernate4.x_配置详解
zany_hui
lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用
hugo
Oracle试题Exam Adminv1.1
Oracle试题Exam Adminv1.1
Zianed Hou
Mysql展示功能与源码对应
Mysql展示功能与源码对应
zhaolinjnu
Linux chapt3
Linux chapt3
夏 永锋
凌波微步:wagon + VS Code 的輕功哲學
凌波微步:wagon + VS Code 的輕功哲學
Shengyou Fan
前端工程師一定要知道的 Docker 虛擬化容器技巧
前端工程師一定要知道的 Docker 虛擬化容器技巧
Chu-Siang Lai
View 與 Blade 樣板引擎
View 與 Blade 樣板引擎
Shengyou Fan
开源Pass平台flynn功能简介
开源Pass平台flynn功能简介
Zhichao Liang
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
Shengyou Fan
1, shell intro
1, shell intro
ted-xu
How to configure an environment to cross-compile applications for beagleboard-xM
How to configure an environment to cross-compile applications for beagleboard-xM
Dalton Valadares
Company profile
Company profile
Lefitlhile Ramosesane
Mais conteúdo relacionado
Mais procurados
自由軟體鑄造場_20111023_Subversion版本控制系統之操作_曾義峰(ant)
自由軟體鑄造場_20111023_Subversion版本控制系統之操作_曾義峰(ant)
OpenFoundry
啟動 Laravel 與環境設定
啟動 Laravel 與環境設定
Shengyou Fan
Spring 2.0 技術手冊導讀
Spring 2.0 技術手冊導讀
Justin Lin
Jetty服务器架构及调优.v2 2011-5
Jetty服务器架构及调优.v2 2011-5
lovingprince58
GNU Autoconf / Automake #4
GNU Autoconf / Automake #4
imacat .
COSCUP 2016 Laravel 部署工作坊 - 部署指南
COSCUP 2016 Laravel 部署工作坊 - 部署指南
Shengyou Fan
Phpconf 2011 introduction_to_codeigniter
Phpconf 2011 introduction_to_codeigniter
Bo-Yi Wu
PHP 語法基礎與物件導向
PHP 語法基礎與物件導向
Shengyou Fan
Openshift by mtchang
Openshift by mtchang
Chang Mt
Spring4.x + hibernate4.x_配置详解
Spring4.x + hibernate4.x_配置详解
zany_hui
lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用
hugo
Oracle试题Exam Adminv1.1
Oracle试题Exam Adminv1.1
Zianed Hou
Mysql展示功能与源码对应
Mysql展示功能与源码对应
zhaolinjnu
Linux chapt3
Linux chapt3
夏 永锋
凌波微步:wagon + VS Code 的輕功哲學
凌波微步:wagon + VS Code 的輕功哲學
Shengyou Fan
前端工程師一定要知道的 Docker 虛擬化容器技巧
前端工程師一定要知道的 Docker 虛擬化容器技巧
Chu-Siang Lai
View 與 Blade 樣板引擎
View 與 Blade 樣板引擎
Shengyou Fan
开源Pass平台flynn功能简介
开源Pass平台flynn功能简介
Zhichao Liang
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
Shengyou Fan
1, shell intro
1, shell intro
ted-xu
Mais procurados
(20)
自由軟體鑄造場_20111023_Subversion版本控制系統之操作_曾義峰(ant)
自由軟體鑄造場_20111023_Subversion版本控制系統之操作_曾義峰(ant)
啟動 Laravel 與環境設定
啟動 Laravel 與環境設定
Spring 2.0 技術手冊導讀
Spring 2.0 技術手冊導讀
Jetty服务器架构及调优.v2 2011-5
Jetty服务器架构及调优.v2 2011-5
GNU Autoconf / Automake #4
GNU Autoconf / Automake #4
COSCUP 2016 Laravel 部署工作坊 - 部署指南
COSCUP 2016 Laravel 部署工作坊 - 部署指南
Phpconf 2011 introduction_to_codeigniter
Phpconf 2011 introduction_to_codeigniter
PHP 語法基礎與物件導向
PHP 語法基礎與物件導向
Openshift by mtchang
Openshift by mtchang
Spring4.x + hibernate4.x_配置详解
Spring4.x + hibernate4.x_配置详解
lua & ngx_lua 的介绍与应用
lua & ngx_lua 的介绍与应用
Oracle试题Exam Adminv1.1
Oracle试题Exam Adminv1.1
Mysql展示功能与源码对应
Mysql展示功能与源码对应
Linux chapt3
Linux chapt3
凌波微步:wagon + VS Code 的輕功哲學
凌波微步:wagon + VS Code 的輕功哲學
前端工程師一定要知道的 Docker 虛擬化容器技巧
前端工程師一定要知道的 Docker 虛擬化容器技巧
View 與 Blade 樣板引擎
View 與 Blade 樣板引擎
开源Pass平台flynn功能简介
开源Pass平台flynn功能简介
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
[Modern Web 2016] 讓你的 PHP 開發流程再次潮起來
1, shell intro
1, shell intro
Destaque
How to configure an environment to cross-compile applications for beagleboard-xM
How to configure an environment to cross-compile applications for beagleboard-xM
Dalton Valadares
Company profile
Company profile
Lefitlhile Ramosesane
Scrabble
Scrabble
ferevyjaf
Logging develop
Logging develop
gowell
The Rise of the Internet of Things
The Rise of the Internet of Things
Westbase.io
Casing3d opengl
Casing3d opengl
gowell
Destaque
(6)
How to configure an environment to cross-compile applications for beagleboard-xM
How to configure an environment to cross-compile applications for beagleboard-xM
Company profile
Company profile
Scrabble
Scrabble
Logging develop
Logging develop
The Rise of the Internet of Things
The Rise of the Internet of Things
Casing3d opengl
Casing3d opengl
Semelhante a 使用Lua提高开发效率
Docker容器微服務 x WorkShop
Docker容器微服務 x WorkShop
Philip Zheng
Docker應用
Docker應用
Jui An Huang (黃瑞安)
Lua 语言介绍
Lua 语言介绍
gowell
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
Weizhong Yang
docker intro
docker intro
koji lin
运维自动化
运维自动化
OpenCity Community
OpenResty/Lua Practical Experience
OpenResty/Lua Practical Experience
Ho Kim
自动化运维管理
自动化运维管理
frankwsj
基于Symfony框架下的快速企业级应用开发
基于Symfony框架下的快速企业级应用开发
mysqlops
NodeJS基礎教學&簡介
NodeJS基礎教學&簡介
GO LL
Docker一期培训
Docker一期培训
青帅 常
2, OCP - installing and creating a database
2, OCP - installing and creating a database
ted-xu
Html5
Html5
cazhfe
Docker Compose
Docker Compose
Miles Chou
2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt
tka
Build desktop app_by_xulrunner
Build desktop app_by_xulrunner
Rack Lin
Erlang Practice
Erlang Practice
litaocheng
Clipper@datacon.2019.tw
Clipper@datacon.2019.tw
Wei-Yu Chen
Inside VCL
Inside VCL
Sheng-Wei (Kuan-Ta) Chen
Install oracle ebs r12.1.1 on OEL5.6 x86(include demo)
Install oracle ebs r12.1.1 on OEL5.6 x86(include demo)
acqua young
Semelhante a 使用Lua提高开发效率
(20)
Docker容器微服務 x WorkShop
Docker容器微服務 x WorkShop
Docker應用
Docker應用
Lua 语言介绍
Lua 语言介绍
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Flutter 開發
docker intro
docker intro
运维自动化
运维自动化
OpenResty/Lua Practical Experience
OpenResty/Lua Practical Experience
自动化运维管理
自动化运维管理
基于Symfony框架下的快速企业级应用开发
基于Symfony框架下的快速企业级应用开发
NodeJS基礎教學&簡介
NodeJS基礎教學&簡介
Docker一期培训
Docker一期培训
2, OCP - installing and creating a database
2, OCP - installing and creating a database
Html5
Html5
Docker Compose
Docker Compose
2012 java two-desktop-appliction-using-j-ruby-with-swt
2012 java two-desktop-appliction-using-j-ruby-with-swt
Build desktop app_by_xulrunner
Build desktop app_by_xulrunner
Erlang Practice
Erlang Practice
Clipper@datacon.2019.tw
Clipper@datacon.2019.tw
Inside VCL
Inside VCL
Install oracle ebs r12.1.1 on OEL5.6 x86(include demo)
Install oracle ebs r12.1.1 on OEL5.6 x86(include demo)
Mais de gowell
Kernel init
Kernel init
gowell
Logging introduce
Logging introduce
gowell
Script meta
Script meta
gowell
Script binding
Script binding
gowell
Pytables
Pytables
gowell
从动态说开去
从动态说开去
gowell
Mais de gowell
(6)
Kernel init
Kernel init
Logging introduce
Logging introduce
Script meta
Script meta
Script binding
Script binding
Pytables
Pytables
从动态说开去
从动态说开去
使用Lua提高开发效率
1.
lua介绍
页码,1/10 介 lua介绍 Author: 罗进 <luojinlj@gmail.com> Version: 1 使用lua提高开发效率 议程 • 缘起 • lua特点 • lua语法 • lua库,c扩展 • iphone-wax开发介绍 • 迅雷插件开发介绍 • wireshark插件开发介绍 file:///C:/lua.htm 2011/5/12
2.
lua介绍
页码,2/10 缘起 • 工作中使用c++ • 新产品需求不定 • 时间浪费在编译、部署、执行上 • --lua可以在应用程序运行期修改代码 lua特点 特 • 目的:嵌入宿主程序执行,只是个核。 • 快:基于寄存器的虚拟机,与宿主程序在栈上交互 • 小:164k,可裁剪更小。python2100k • 省:自动垃圾收集、弱类型、单一数据结构,扩展c简单 • 稳定:5.1版2006发布 file:///C:/lua.htm 2011/5/12
3.
lua介绍
页码,3/10 lua语法:与python区别 语法:与 区 lua • local,if then end, for do end,建议2个空格缩进 • 迭代器少,只有一个tabel数据结构,强大的闭包 • 继承使用prototype,即metatable中的__index(),用table模拟 • 文档少,第三方库少,源代码好,与c结合好,调试方便 python • global,if :,for :,统一缩进 • 生成式[d for d in data],listdicttuple...,够用的lambda, • 文档多,第三方库多,源代码不好 file:///C:/lua.htm 2011/5/12
4.
lua介绍
页码,4/10 lua库,c扩展 库 扩 • lua for windows:第三方库非官方合集 • alien:同python的ctypes • penlight:自称battery include,借鉴python • luarocks:同python的easy_install(PEAK) • 自己扩展 L=luaL_newstate(); luaL_openlibs(L); // init luaL_dofile("") // readfile and compile lua_getglobal(L, func_name) // find func in global table lua_pushinteger() // parameter push to stack for called lua_pcall(L, narg, nresult, 0) // call lua_tonumber() // result file:///C:/lua.htm 2011/5/12
5.
lua介绍
页码,5/10 开发介 iphone-wax开发介绍 开发 为什么用lua写iphone 写 • objc不如lua好用 • 轻松垃圾收集(java),非引用计数(python) • 更少的代码,你懂得 • cocoa无缝集成,NSDictionary等的自动转换,自定义控件 • 更强的HTTP功能 • 闭包 • 正则 file:///C:/lua.htm 2011/5/12
6.
lua介绍
页码,6/10 代 iphone代码流 UIApplication-> UIAppDelegate-> applicationDidFinishlaunching() // add controllers for callbacks UITableViewController *tableViewController; UIWindow *window; tableViewController = [[UITableViewController alloc]]; [window addSubview:tableViewController.view]; [window make key and visible] objc class目录:app由多个controller+view组成,含.h .m文件 lua script目录:appDelegate.lua,viewController.lua file:///C:/lua.htm 2011/5/12
7.
lua介绍
页码,7/10 代 wax代码流 main.m wax_start(char *initScript, lua_CFunction extension, ...); wax_setup(); luaopen_wax_class(L); //lua访问cocoa Finds an ObjC class, //__index() Creates a new ObjC class//__call() luaopen_wax_instance(L); //Cocoa 对象 luaopen_wax_struct(L); //cocoa struct Load extentions, stdlib //lua的json、xml、http等库 luaL_dostring(L, initScript) //加载用户代码 wax_startWithServer(); //交互命令控制显示 wax_end(); //lua_close(wax_currentLuaState()); • waxClass{"TwitterTableViewController", UITableViewController} • 继承 类 , 功能 数 迅雷插 开发介 迅雷插件开发介绍 图 file:///C:/lua.htm 2011/5/12
8.
lua介绍
页码,8/10 迅雷插 开发介 迅雷插件开发介绍 addin.cfg //应用的相关信息 XAR/onload.lua // main() function OnMyIconClick(self) local tabCtrl = XLGetGlobal("xunlei.UIControlProvider").GetMainWndTab() local index = tabCtrl:GetItemPosByTitle("MyApp") tabCtrl:SelectItem(index) end local addin_mgr = XLGetGlobal("xunlei.AddinManagerHelper") addin_mgr.RegisterService("MyApp", "我的应用", "icon", "", OnMyIconClick, nil) XAR/layout/Control.xml //界面 XAR/layout/Control.cml.lua //逻辑 插 开发介 wireshark插件开发介绍 图 file:///C:/lua.htm 2011/5/12
9.
lua介绍
页码,9/10 插 开发介 wireshark插件开发介绍 dofile("myProto.lua") // init.lua, wireshake调用 local protocal = Proto("myProto","myProto xxx") //新协议 local field1 = ProtoField.bytes("myProto.identifier","Identifier") //协议字段 protocal.fields = { field1, ..., } //协议构造 function protocal.dissector(buf,pkt,root) //回调:解析协议后,将数据加入指定字段 local t = root:add(protocal,buf) t:add(field1,v_identifier) ... end Ref • lua http://lua-users.org/wiki/SampleCode • internal http://simohayha.iteye.com/category/84720 • wax https://github.com/probablycorey/wax • 迅雷 http://xldoc.xl7.xunlei.com/0000000024/00000000240000700004.html • wireshark http://yoursunny.com/study/IS409/ScoreBoard.htm]] • S5 http://meyerweb.com/eric/tools/s5/ • rst http://docutils.sourceforge.net/rst.html • rst2s5 http://docutils.sourceforge.net/docs/user/slide-shows.html • s5定 http://blog.zoomquiet.org/pyblosxom/utility/py4str/StructuredText/rst2s5-usage-2010-09-18-23-23.html file:///C:/lua.htm 2011/5/12
10.
lua介绍
页码,10/10 FAQ FAQ file:///C:/lua.htm 2011/5/12
Baixar agora