
why no banner ?
NETRuby a la interpreter
These source files are an experiment of straight porting from C to C#.
usage
- nrb [options] script [script args...]
- nrb -e "script-line"
Use Cases
Command Line Interpreter
It maybe works (in near future). But I think if you'd like to run ruby as an interpreter, it's better to use original ruby. It's more efficient, I think.
Embedded Object - native interface
See samples in the archive.
At this time, only valid object and methods are
- NetRuby it self
- public NetRuby Constructor
- public object NetRuby::Funcall(object receiver, string methodname, params object[] argv);
as same as rb_funcall();
- public object NetRuby::EvalString(string script);
as same as rb_eval_string();
- RBignum is Bignum
- RString is String (not same as System.String, because RString has Tainted flag)
- RFloat is Float
- RNumeric is a superclass as Numeric
- RArray is Array
- RProc is Proc
- RThread is Thread
- RTime is Time
- RRegexp is Regexp (simple System.Text.RegularExpressions.Regex rwapper)
- RMatchData is MatchData (System.Text.RegularExpressions.Group wrapper)
Another public classes and methods will be changed in the future version.
DotNet class reference
the point
- Because NETRuby is an object, you can have multiple NETRuby at the same time, at the same process. Unlike original Ruby, the evaluation tree and namespaces are completely separated (the original has only one monolithic space).
- At this time, only the plan, but I'll implement native thread interface. This implies the fact that current NETRuby is not thread safe. - I just finished this working (on 22 Feb.). Some methods (for ex. NetRuby::Options(string[] argv);) are not safe, but EvalString() is safe. See mthread sample in the source archive.
Embedded Script Engine - Framework interface
At this time, not implemented.
the point
Compliler
At this time, not implemented.
RWiki page about NETRuby.
Copyright
Unlike ActiveScriptRuby (that uses GPL, Because it's Binary Standard and not tightly coupled with another program), NETRuby is under LGPL.
brief history
- May 2001: NOTRuby the compiler. (the relation is Ruby:NOTRuby = Java:JScript) -- I'm boarding with it.
- Jan 2002: Nrb a la interpreter.
Back
copyright(c) 2002 arton, Under GPL
Last modified: Sat Mar 02 20:29:03 LMT 2002