github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jmettraux / rufus-lua

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 26
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (3)
  • Wiki (1)
  • Graphs
  • Tree: 7824537

click here to add a description

click here to add a homepage

  • Branches (1)
    • master
  • Tags (3)
    • r1.1.0
    • r1.0.0
    • r0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

embedding Lua in Ruby, via FFI — Read more

  cancel

http://rufus.rubyforge.org

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

release 0.1.0 
jmettraux (author)
Mon Mar 16 01:06:45 -0700 2009
commit  78245371b23234ffe41cf97756dd97b28f3eef01
tree    937cadd14a46e0c789f9c9c97742d2b1d58781a0
parent  4906914d9baf7509cc8cb26372e976124287cf70
rufus-lua / README.txt README.txt
100644 142 lines (70 sloc) 2.587 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
= rufus-lua
 
Lua embedded in Ruby, via Ruby FFI
 
Tested with Ruby 1.8.6, Ruby 1.9.1p0 and JRuby 1.1.6
 
 
== Lua
 
from
 
  http://www.lua.org/
  http://www.lua.org/about.html
 
"""
Lua is a powerful, fast, lightweight, embeddable scripting language.
 
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.
"""
 
 
== other Ruby and Lua bridges / connectors
 
 
  http://rubyluabridge.rubyforge.org/
  http://raa.ruby-lang.org/project/ruby-lua
 
 
== using rufus-lua
 
If you don't have liblua.dylib on your system, scroll until "compiling liblua.dylib" to learn how to get it.
 
  sudo gem install rufus-lua
 
then
 
  require 'rubygems'
  require 'rufus/lua'
 
  s = Rufus::Lua::State.new
 
  puts s.eval("return table.concat({ 'hello', 'from', 'Lua' }, ' ')")
    #
    # => "Hello from Lua"
 
  s.close
 
rufus-lua's rdoc is at http://rufus.rubyforge.org/rufus-lua/
 
 
== compiling liblua.dylib
 
original instructions by Adrian Perez at :
 
  http://lua-users.org/lists/lua-l/2006-09/msg00894.html
 
get the source at
 
  http://www.lua.org/ftp/lua-5.1.4.tar.gz
 
then
 
  tar xzvf lua-5.1.4.tar.gz
  cd lua-5.1.4
 
modify the file src/Makefile as per http://lua-users.org/lists/lua-l/2006-09/msg00894.html
 
  make
  make masocx # or make linux ...
  make -C src src liblua.dylib
 
  sudo cp src/liblua.dylib /usr/local/lib/
 
 
== build dependencies
 
You need to add the github gems to your gem sources
  gem sources -a http://gems.github.com
 
The following gems are needed to run the specs
  mislav-hanna
  install bacon
 
 
== dependencies
 
the ruby gem 'ffi'
 
 
== mailing list
 
On the rufus-ruby list :
 
  http://groups.google.com/group/rufus-ruby
 
 
== issue tracker
 
  http://rubyforge.org/tracker/?atid=18584&group_id=4812&func=browse
 
 
== irc
 
irc.freenode.net #ruote
 
 
== source
 
http://github.com/jmettraux/rufus-lua
 
  git clone git://github.com/jmettraux/rufus-lua.git
 
 
== credits
 
many thanks to the authors of Ruby FFI, and of Lua
 
  http://kenai.com/projects/ruby-ffi/
  http://lua.org/
 
 
== authors
 
John Mettraux, jmettraux@gmail.com, http://jmettraux.wordpress.com
Alain Hoang, http://blogs.law.harvard.edu/hoanga/
 
 
== the rest of Rufus
 
http://rufus.rubyforge.org
 
 
== license
 
MIT
 
Lua itself is licensed under the MIT license as well :
 
  http://www.lua.org/license.html
 
 
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server