Queensland University of Technology   Brisbane Australia CommentsAndQuestions A university for the real world
Username:
Password:
Remember me: Login
This wiki is in the process of being discontinued. Please migrate your usage to the new sharepoint site.

This forum has moved to:

http://groups.google.com/group/RubyDOTNET

Q: What is the licence?? Please put this on the main website!

A: It is! See Licensing Section on http://plas.fit.qut.edu.au/Ruby.NET/?


Q: How can i use function written in C# dll in Ruby Script? Can i use this compilier to export my Dll functions to Ruby?

A: We have not yet implemented any interoperability features with other .NET languages. So, currently you cannot do this. But we certainly plan to add such features by the end of this year.


Q: Does it work under Mono on Linux or Mac OS X?

A: see http://groups.google.com/group/ruby-talk-google/browse_thread/thread/4441a9275b3cabf


Awesome work guys! I got it to run on the latest Ubuntu (running in Parallels on OS X) by installing mono-classlib-2.0.

I could not get it to run on mono on OS X. But I have an older intel version of Mono and I haven't tried to upgrade or compile. This isn't because of RubyCompiler, its because there isn't an offical install for mono on OS X/Intel. I get this output:

$ mono RubyCompiler.exe hello.rb

** (RubyCompiler.exe:818): WARNING **: Missing method System.IO.StreamReader::get_EndOfStream() in assembly /Library/Frameworks/Mono.framework/Versions/1.1.13-02.28.2006/lib/mono/2.0/mscorlib.dll, referenced in assembly /Users/blowmage/Downloads/Ruby.NET/Bin/QUT.RubyRuntime.dll

Unhandled Exception: System.MissingMethodException: Method not found: 'System.IO.StreamReader.get_EndOfStream'.
in <0x00000> <unknown method>
in <0x000d8> Ruby.IO:rb_io_getline_fast (Ruby.IO file, Char rs)
in <0x00043> Ruby.IO:rb_io_gets (System.Object io)
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_String_object (object)
in <0x00020> Ruby.Compiler.Scanner:lex_getline ()
in <0x00054> Ruby.Compiler.Scanner:nextc ()
in <0x001f8> Ruby.Compiler.Scanner:yylex ()
in <0x001a7> gppg.ShiftReduceParser`1[Ruby.Compiler.ValueType]:Parse ()
in <0x00047> Ruby.Compiler.Parser:ParseInput (System.String f, Int32 line)
in <0x0007f> Ruby.Compiler.Parser:ParseFile (System.String f, Ruby.IO file, Int32 start)
in <0x00127> Ruby.File:load_file (System.String fname, Boolean xflag, System.Collections.Generic.List`1 more_options)
in <0x01385> Ruby.Compiler.RubyMain:proc_options (Int32 first, System.String[] args)
in <0x00035> Ruby.Compiler.RubyMain:process_options ()
in <0x00013> Ruby.Compiler.RubyMain:Main (System.String[] args)


Q: How can I get IRB working?

A: We currently haven't done anything towards supporting IRB. If anyone would like to look into what is required we'd appreciate it.



Q: Is it possible to extend the executables by C-extension libraries (i.e. socket.so) ? -- Ruslan

A: You can't simply use native libraries designed to interface with the standard Ruby interpreter (our internal APIs are different).


Q: I wrote a little Ruby class like this:
#ruby!
class Person
@@counter=0
attr_accessor :name, :age

def initialize( name, age)
@name, @age = name, age
@@counter+=1
end

def name_length
return @name.length
end

def self.get_counter
return @@counter
end
end

... and compiled it successfull in a DLL. But I can't use it
in a C# project. If I had a look into it by ildasm.exe
I found only classes, no class methods or instance methods
like above!?

How can I use such a DLL???



Answer from Josh (not related to this project)

I tried doing this exact thing and found that I was able to access the instance variables through instance_variable_set and instance_variable_get.  I'm still figureing out how to do the methods...  Will keep you updated.

Attachments

Edit

Home | User Preferences | Title Index | Recent Changes | Help | Administration

This page last changed at 21/09/2006 4:19 AM by Anonymous User
Full Text Search: