[MacRuby-devel] question about goals for ruby module compatibility with macruby

2009-07-30 Thread Tim Rand
Hi Laurent and macruby-ists,I am thinking about taking on a rather ambitious
project with macruby in the next year or so which would benefit from having
access to existing ruby gems (like the bioruby gem and rails). Can anyone
predict how general the ruby gem compatibility will be as macruby matures? I
promise I won't hold anyone responsible for their speculation.
Tim
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] question about goals for ruby module compatibility with macruby

2009-07-30 Thread Matt Aimonetti
Hi Tim,

I was about to reply to your colleague, Mr Otero, so let me try to clarify a
few things that might help others.
 The goal for MacRuby 0.5 is to be able to run any rubygems that are not C
extensions. ( see Macruby 0.5 roadmap:
http://lists.macosforge.org/pipermail/macruby-devel/2009-July/002091.html )

The good news is that the BioRuby gem is pure Ruby, the bad news is that
it's not fully compatible with Ruby 1.9 yet. (MacRuby is aiming for Ruby 1.9
compatibility) However, that shouldn't be hard to fix.

Regarding Rails, that's a different story, as you probably know, Rails 3 is
going to be released towards the end of the year. Rails is a big project and
quite a challenging one to have running on top of any Ruby implementation.
The primarily goal of MacRuby is to let people write Cocoa apps in Ruby, so
Rails is not at the top of the todo list.
However, this is something we would really like to be able to do ASAP.
(being part of the Rails team, I would love to see that happen).

Rails also uses some C based extensions like its DB drivers and we would
need to find workarounds.

I hope it helps,

- Matt



On Thu, Jul 30, 2009 at 9:36 AM, Tim Rand  wrote:

> Hi Laurent and macruby-ists,I am thinking about taking on a rather
> ambitious project with macruby in the next year or so which would benefit
> from having access to existing ruby gems (like the bioruby gem and rails).
> Can anyone predict how general the ruby gem compatibility will be as macruby
> matures? I promise I won't hold anyone responsible for their speculation.
> Tim
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] question about goals for ruby module compatibility with macruby

2009-07-30 Thread Jeremy Voorhis
If MacRuby is aiming for full FFI support, a la JRuby, then creating
interpreter-independent versions of C extensions need not be difficult. I've
begun porting some of my own Ruby bindings from DL and C and have found that
as long as you handle your C types correctly, everything tends to Just Work
on MRI versions 1.8.6, 1.9.1, and recent versions of JRuby.
To my knowledge, the macruby-experimental branch only supports attaching C
functions (e.g. no structs, callbacks), but that is likely to improve. The
FFI documentation is also a little thin, but it's easy to pick up once
you've seen some examples. Here's a CoreMIDI driver I've ported to FFI:
http://github.com/jvoorhis/midiator/blob/4e6024b8e68503868272770d8c8ecabe02445f85/lib/midiator/drivers/core_midi.rb

Best,

Jeremy

On Thu, Jul 30, 2009 at 10:09 AM, Matt Aimonetti wrote:

> Hi Tim,
>
> I was about to reply to your colleague, Mr Otero, so let me try to clarify
> a few things that might help others.
>  The goal for MacRuby 0.5 is to be able to run any rubygems that are not C
> extensions. ( see Macruby 0.5 roadmap:
> http://lists.macosforge.org/pipermail/macruby-devel/2009-July/002091.html)
>
> The good news is that the BioRuby gem is pure Ruby, the bad news is that
> it's not fully compatible with Ruby 1.9 yet. (MacRuby is aiming for Ruby 1.9
> compatibility) However, that shouldn't be hard to fix.
>
> Regarding Rails, that's a different story, as you probably know, Rails 3 is
> going to be released towards the end of the year. Rails is a big project and
> quite a challenging one to have running on top of any Ruby implementation.
> The primarily goal of MacRuby is to let people write Cocoa apps in Ruby, so
> Rails is not at the top of the todo list.
> However, this is something we would really like to be able to do ASAP.
> (being part of the Rails team, I would love to see that happen).
>
> Rails also uses some C based extensions like its DB drivers and we would
> need to find workarounds.
>
> I hope it helps,
>
> - Matt
>
>
>
> On Thu, Jul 30, 2009 at 9:36 AM, Tim Rand  wrote:
>
>> Hi Laurent and macruby-ists,I am thinking about taking on a rather
>> ambitious project with macruby in the next year or so which would benefit
>> from having access to existing ruby gems (like the bioruby gem and rails).
>> Can anyone predict how general the ruby gem compatibility will be as macruby
>> matures? I promise I won't hold anyone responsible for their speculation.
>> Tim
>>
>>
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] question about goals for ruby module compatibility with macruby

2009-07-30 Thread Laurent Sansonetti

Hi Tim,

As Matt mentioned on a separate mail, rubygems should be fully  
supported (modulo C extensions) in the upcoming release, which should  
be out before the end of the year if everything goes well.


I can't pronounce for Rails at this point, but we are approaching it  
bit by bit, and we might look at it sooner than planned, since our  
major objective (Cocoa support) is mostly complete. Surely MacRuby  
will be in a better shape next year :-)


Laurent

On Jul 30, 2009, at 9:36 AM, Tim Rand wrote:


Hi Laurent and macruby-ists,
I am thinking about taking on a rather ambitious project with  
macruby in the next year or so which would benefit from having  
access to existing ruby gems (like the bioruby gem and rails). Can  
anyone predict how general the ruby gem compatibility will be as  
macruby matures? I promise I won't hold anyone responsible for their  
speculation.

Tim

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] problem with trac login page

2009-07-30 Thread Rich Morin
I was looking at http://www.macruby.org/trac/ticket/296,
wondering when the patch would actually show up on the
web site, when I decided to log in and file another bug.

When I clicked the Login link, I got this nastygram from
Firefox (3.5.1):

  The page isn't redirecting properly

  Firefox has detected that the server is redirecting
  the request for this address in a way that will never
  complete.

  *  This problem can sometimes be caused by disabling or
 refusing to accept cookies.

For the record, I do not have cookies disabled, etc.  I
then went to http://www.macruby.org/trac and tried again,
getting the same result.

I also tried with Safari (4.0.1), getting:

  Safari can't open the page.

  Too many redirects occurred trying to open
  "http://www.macruby.org/auth/login/";.  This might occur
  if you open a page that is redirected to open another
  page which then is redirected to open the original page.

Although this IS an effective way to keep the bug counts
down, it may not be the best overall strategy...  Could
someone please take a look at this?

-r
-- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Technical editing and writing, programming, and web development
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] problem with trac login page

2009-07-30 Thread William Siegrist

Should be fixed now.

-Bill


On Jul 30, 2009, at 8:54 PM, Rich Morin wrote:


I was looking at http://www.macruby.org/trac/ticket/296,
wondering when the patch would actually show up on the
web site, when I decided to log in and file another bug.

When I clicked the Login link, I got this nastygram from
Firefox (3.5.1):

 The page isn't redirecting properly

 Firefox has detected that the server is redirecting
 the request for this address in a way that will never
 complete.

 *  This problem can sometimes be caused by disabling or
refusing to accept cookies.

For the record, I do not have cookies disabled, etc.  I
then went to http://www.macruby.org/trac and tried again,
getting the same result.

I also tried with Safari (4.0.1), getting:

 Safari can't open the page.

 Too many redirects occurred trying to open
 "http://www.macruby.org/auth/login/";.  This might occur
 if you open a page that is redirected to open another
 page which then is redirected to open the original page.

Although this IS an effective way to keep the bug counts
down, it may not be the best overall strategy...  Could
someone please take a look at this?

-r
--
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Technical editing and writing, programming, and web development
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #301: minor correction to Overview page

2009-07-30 Thread MacRuby
#301: minor correction to Overview page
--+-
 Reporter:  r...@… |   Owner:  lsansone...@…
 Type:  defect|  Status:  new  
 Priority:  trivial   |   Milestone:   
Component:  MacRuby   |Keywords:   
--+-
 I think "handful" should be "helpful", as shown in the patch.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] problem with trac login page

2009-07-30 Thread Rich Morin
At 21:17 -0700 7/30/09, William Siegrist wrote:
> Should be fixed now.

It seems to be, thanks.  FYI, I had to clear my cache in order
for it to work.

-r
-- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Technical editing and writing, programming, and web development
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] Error with AOT compiler

2009-07-30 Thread Josh Ballanco
I've stumbled across a bug with the AOT compiler. Compiling the  
following code causes an "Instruction does not dominate all uses!"  
error from LLVM:


--*begin code*--

def test_method(a_hash)
  a_hash.each{|k,v| puts "Key: #{k} and Value: #{v}"}
end

test_method({:hello => 'world'})

--*end code*--

I haven't had time to add this to test_vm, but I did narrow down the  
issue to this region of the generated llvm assembly:


--*begin code*--

rescue_save_vars:   ; preds = %MainBlock
%7 = call i8* @llvm.eh.exception()  ;   
[#uses=2]
%8 = call i64 (i8*, i8*, ...)* @llvm.eh.selector.i64(i8* %7,  
i8* bitcast (i8* ()* @__gxx_personality_v0 to i8*), i8*  
null)  ;  [#uses=0]
%9 = call i8* @__cxa_begin_catch(i8* %7);  
 [#uses=0]

%10 = load i8** %1  ;  [#uses=2]
%11 = icmp eq i8* %10, null ;  [#uses=1]
br i1 %11, label %merge, label %not_null

normal: ; preds = %MainBlock
%12 = load i64* @6  ;  [#uses=2]
%13 = load i8** %1  ;  [#uses=1]
call void (i8*, i32, ...)* @rb_vm_keep_vars(i8* %13, i32 1,  
i64 %12, i64* %0)

ret i64 %6

not_null:   ; preds = %rescue_save_vars
call void (i8*, i32, ...)* @rb_vm_keep_vars(i8* %10, i32 1,  
i64 %12, i64* %0)

br label %merge

--*end code*--

Specifically, the issue is that "not_null" can be accessed directly  
from "rescue_save_vars" leaving %12 undefined. I've attached the  
related files.


Cheers,

Josh


def test_method(a_hash)
  a_hash.each{|k,v| puts "Key: #{k} and Value: #{v}"}
end

test_method({:hello => 'world'})


test.ll
Description: Binary data
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Error with AOT compiler

2009-07-30 Thread Vincent Isambart
> I haven't had time to add this to test_vm, but I did narrow down the issue
> to this region of the generated llvm assembly:
> (...)
> Specifically, the issue is that "not_null" can be accessed directly from
> "rescue_save_vars" leaving %12 undefined. I've attached the related files.

Thanks for doing all the detective work!
rescue_vars is my domain :-), I'll try to fix tonight.

Cheers,
Vincent
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel