M
Mauricio Fernández
[...]Rodrigo B. de Oliveira said:I feel exactly the same way. When do we start coding?
There is a mailing list
http://sourceforge.net/mailarchive/forum.php?forum_id=34312
for discussing all things to do with Ruby and .NET.
I have code right now which allows you to do things like
require 'dotnet'
DotNet.System.Console.WriteLine("Hello DotNet World!")
foo = DotNet.System.Collections.Hashtable.new
foo['one'] = 1
puts(foo['one']) # -> 1
It also allows C# to call Ruby code.
This is *very* similar in spirit to what I'm doing w/ Java (through
JNI). If I got it right (I did a quick inspection of your code), you're
linking to the C# runtime, so you have both parts running on the same
process at a time (as opposed to communicating through sockets for
instance).
BTW, you have achieved about the same (if not more) in < 2Klocs than me
in 8Kloc (although some 4Kloc are auto-generated).
Did you solve the problem w/ threads (does it happen at all w/
C# ?)
In my case, Java threads are spawned as "real" (native) threads, so if
any of them tries to call Ruby code the thing will bomb (Ruby not being
thread safe).
A few more questions:
* are you doing proper method dispatching on method overload?
This can be tricky if you perform automatic Ruby -> C#/Java type
conversions as there might be several matching methods
* do you have metaclasses for static methods or such? Do you think it's
sensible to provide them? (I did that in rjni)
I'll take another look at your code when I have some time but as I know
nothing about .net I don't know if I will understand it.
And last: is it just me, or C# is insanely easier to interface with than Java?
There's several things in your code that take many more lines when using JNI...
--
_ _
| |__ __ _| |_ ___ _ __ ___ __ _ _ __
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com
<SomeLamer> what's the difference between chattr and chmod?
<SomeGuru> SomeLamer: man chattr > 1; man chmod > 2; diff -u 1 2 | less
-- Seen on #linux on irc