Q. Minimal Ruby


(Alan McFarlane) #1

Hi

Would it be possible to create a ‘minimal’ Ruby, that can be embedded into
an application by removing support for dynamic loading of libraries, all
operating system specific code, and just leaving the basic classes?

The aim is to create a secure, small, and totally machine independant
embedded scripting engine within the application, that will be called upon
frequently to perform simple tasks with some basic cooperation between Ruby
and C.

TIA

···


Alan McFarlane


(E F van de Laar) #2

Although I’ve never used it, Ferite might be what you are looking for.

http://www.ferite.org

Emiel

···

Hi

Would it be possible to create a ‘minimal’ Ruby, that can be embedded into
an application by removing support for dynamic loading of libraries, all
operating system specific code, and just leaving the basic classes?

The aim is to create a secure, small, and totally machine independant
embedded scripting engine within the application, that will be called upon
frequently to perform simple tasks with some basic cooperation between Ruby
and C.


E F van de Laar
Beheers Commissaris
+31648183479
www.il.fontys.nl/~emiel/
pub-key: finger emiel@il.fontys.nl


#3

Emiel van de Laar emiel@il.fontys.nl wrote in message news:20020611150030.GA14490@il.fontys.nl

Hi

Would it be possible to create a ‘minimal’ Ruby, that can be embedded into
an application by removing support for dynamic loading of libraries, all
operating system specific code, and just leaving the basic classes?

The aim is to create a secure, small, and totally machine independant
embedded scripting engine within the application, that will be called upon
frequently to perform simple tasks with some basic cooperation between Ruby
and C.

Although I’ve never used it, Ferite might be what you are looking for.

http://www.ferite.org

Emiel

Lua might do, too. (I haven’t used it, either.) It doesn’t have the
power of Ruby, but it’s fairly-well debugged by now. From the home
page:

http://www.lua.org

“Lua is a powerful light-weight programming language designed for
extending applications. Lua is also frequently used as a
general-purpose, stand-alone language. Lua is free software.”

There’s a front-end translator that compiles your Lua program into
byte-codes executed by an interpreter. Your C program can link in
everything, or if you want, just the byte-codes and the interpreter
for a smaller footprint. Some game developers are using it.

– Walter

···

(Jean-Hugues ROBERT) #4

Hello,

I am using the Windows distrib from Pragmatic Programmers,
apparently v165-2 (cygwin based I think).

On my WinME, system() & popen() don’t work. They freeze the machine for
a few seconds and then a .readlines() on the file descr is stuck
until a potential enclosing timeout() raise an exception.

Here is the code:
#IO::popen( “fgrep -hE …/…/…, *.rb”) do |fd|
system( “fgrep -hE …/…/…, *.rb > tmp.tmp”)
File.open( “tmp.tmp”) do |fd|
@statusMsg << fd.readlines.sort()
end

Anybody else who experienced that before ?

Thanks,

Jean-Hugues

···

Web: http://hdl.handle.net/1030.37/1.1
Phone: +33 (0) 4 92 27 74 17