Re: [MacRuby-devel] Will FFI make it into macruby?

2010-03-18 Thread Jeremy Voorhis
> > > We don't really have a choice, the C API does not offer all the features we > need and we also need to follow the new LLVM changes internally. Hopefully, > the LLVM team is always helping us :-) > I wouldn't expect you to use the C API internally, but it's convenient to wrap it with FFI. Tha

Re: [MacRuby-devel] Will FFI make it into macruby?

2010-03-17 Thread Jeremy Voorhis
> > We already have a basic implementation of attach_function in MacRuby based > on LLVM, but it has not been tested well. And we have a class similar to > MemoryPointer too (called Pointer) which also uses LLVM to generate > conversion stubs. > > I think it shouldn't be hard to finish FFI inside M

Re: [MacRuby-devel] Will FFI make it into macruby?

2010-03-17 Thread Jeremy Voorhis
On Wed, Mar 17, 2010 at 2:02 AM, Laurent Sansonetti wrote: > Hi Robert, > > There is currently no plan about implementing the FFI API in MacRuby. It > was my plan originally but apparently the API is not really used, so I > preferred to support C extensions instead, which will be in the next > rel

Re: [MacRuby-devel] [MacRuby] #528: Improve Tail Call Elimination

2010-01-04 Thread Jeremy Voorhis
So, can the TCO elimination pass actually perform TCO for mutually recursive methods and the compiler just isn't phrasing method invocations in a compatible way? Also, better method inlining support is awesome, but my intuition tells me that there isn't a lot of overlap between implementing TCO and

[MacRuby-devel] Should the HotCocoa example on the home page run on 0.5 beta 2?

2009-12-18 Thread Jeremy Voorhis
I've just installed the latest MacRuby beta binaries on my new macbook, and this happens: Jeremy-Voorhiss-MacBook-Pro:~ jvoorhis$ cat test.rb require 'hotcocoa' include HotCocoa application do |app| win = window :size => [100,50] b = button :title => 'Hello' b.on_action { puts 'World!' } w

Re: [MacRuby-devel] How to test if you're running MacRuby vs. Ruby?

2009-12-18 Thread Jeremy Voorhis
> > i.e. the argument to defined? must be put in parentheses else MacRuby > crashes. > Only because && binds more tightly than method application. It would be nice if some of this code found its way into the Platform gem, or similar. I've found myself writing Kernel#macruby? in libraries a couple

Re: [MacRuby-devel] Monkey patching Objective-C classes

2009-08-21 Thread Jeremy Voorhis
I've reproduced it using 0.4, for whatever that's worth. If you open a builtin class (e.g. NSSet) with the class keyword, the object_id changes. If you open it with class_eval, the object_id is unchanged. Best, Jeremy On Fri, Aug 21, 2009 at 11:47 AM, Laurent Sansonetti wrote: > On Aug 21, 2009,

Re: [MacRuby-devel] How to use custom C struct's?

2009-08-05 Thread Jeremy Voorhis
When MacRuby's FFI support is more mature, declaring an FFI::Struct subclass like this will be another option. class MapPoint < FFI::Struct layout :row, :int, :col, :Int end You instantiate an FFI::Struct with a pointer. I'm hacking away on a Ruby interface to a C library, and I'm slinging

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

Re: [MacRuby-devel] Using performRubySelector

2009-05-28 Thread Jeremy Voorhis
ompatible. > > - Matt > > On Thu, May 28, 2009 at 10:32 AM, Jeremy Voorhis wrote: >> >> Mike, >> >> Is your code available anywhere, e.g. on github? I haven't looked at >> the PyObjC code myself, but I'd be interested in having really decent >&

Re: [MacRuby-devel] Using performRubySelector

2009-05-28 Thread Jeremy Voorhis
Mike, Is your code available anywhere, e.g. on github? I haven't looked at the PyObjC code myself, but I'd be interested in having really decent CoreMIDI support available in MacRuby. Btw, when C extensions are supported, simple apps will be able to use my MusicPlayer lib at http://github.com/jvo

Re: [MacRuby-devel] A MacRuby-users group?

2009-05-22 Thread Jeremy Voorhis
Personally, I'm in favor of a single mailing list, especially with a small group like this. If there is some perception that a name ending in -devel is intimidating, maybe we should just be pitched as "the MacRuby mailing list" :) Best, Jeremy On Fri, May 22, 2009 at 10:35 AM, Laurent Sansonetti

Re: [MacRuby-devel] Erb ...

2009-05-21 Thread Jeremy Voorhis
ERB is part of Ruby's core library, and as such, is included with MacRuby. I just poked around in macirb 0.4 and it seems to be working as expected. Best, Jeremy On Thu, May 21, 2009 at 2:57 AM, Mic Pringle wrote: > Hi, > > Is Erb included in 0.4 MacRuby ... and if so is it fully functional ? >

Re: [MacRuby-devel] Key-value observing

2009-05-15 Thread Jeremy Voorhis
Cocoa, and that the infrastructure is implemented in the base class for every object in the MacRuby runtime. Best, Jeremy Voorhis On Fri, May 15, 2009 at 12:42 AM, Thilo wrote: > Isn't it already working? At least for primitiv types? > > Eg. when I bind a label to a Int property which

Re: [MacRuby-devel] Status of Fiber support?

2009-05-14 Thread Jeremy Voorhis
can keep tabs on this. Thanks for the additional examples. > On Thu, May 14, 2009 at 11:10 AM, Jeremy Voorhis wrote: >> >> Hello, >> >> I've just noticed that, at least in 0.4, Fiber#resume causes a >> segfault. I found this ticket in trac which obliquely addr

[MacRuby-devel] Status of Fiber support?

2009-05-14 Thread Jeremy Voorhis
Hello, I've just noticed that, at least in 0.4, Fiber#resume causes a segfault. I found this ticket in trac which obliquely addresses the issue: https://www.macruby.org/trac/ticket/81. Laurent: would a new ticket for this issue be helpful or noisy in this case? Best, Jeremy Vo

Re: [MacRuby-devel] Key-value observing

2009-05-13 Thread Jeremy Voorhis
t; not forget about it? > > Thanks, > Laurent > > On May 12, 2009, at 10:18 AM, Jeremy Voorhis wrote: > >> Hello, >> >> I've been learning Cocoa, Objective-C and macruby in tandem and I was >> just wondering, are there any plans to integrate the key-value &

Re: [MacRuby-devel] testing macruby/hotcocoa apps

2009-05-12 Thread Jeremy Voorhis
at can actually account for how views *appear*? Best, Jeremy Voorhis On Tue, May 12, 2009 at 2:45 PM, Alex Vollmer wrote: > On May 11, 2009, at May 11, 11:18 PM, Matt Aimonetti wrote: > > Before I get too excited, I'd like to hear what you guys think and what you > believe you need

[MacRuby-devel] Key-value observing

2009-05-12 Thread Jeremy Voorhis
change end >> end => nil >> n = Notifier.new => # >> n.addObserver(Observer.new, forKeyPath:'value', options:0, context:nil) => nil >> n.value = 42 => 42 >> n.setValue 42 {"kind"=>1} => nil Best, Jeremy Voorhis _