Re: [MacRuby-devel] Can't build trunk
On Nov 24, 2008, at 10:57 PM, Patrick Bennett wrote: I would be using the stable branch but it seems like everything assumes the development branch is being used (ie hotconsole). Speaking of hotconsole - I've never been able to get it to build. With the latest MacRuby (rev 756) [which now builds] I get the following when running macrake with the latest hotconsole code: PMBMacOSX:hotconsole patrickb$ macrake (in /Users/patrickb/dev/hotconsole) macruby(74947,0x103785000) malloc: free_garbage: garbage ptr = 0x800029fc0, has non-zero refcount = 1 /Users/patrickb/dev/hotconsole/HotConsole.app/Contents/Resources/lib/ application.rb:43:in `': undefined method `method_signature' for Terminal:Class (NoMethodError) from /Users/patrickb/dev/hotconsole/HotConsole.app/Contents/ Resources/lib/application.rb:13:in `' from /Users/patrickb/dev/hotconsole/HotConsole.app/Contents/ Resources/rb_main.rb:2:in `load' from /Users/patrickb/dev/hotconsole/HotConsole.app/Contents/ Resources/rb_main.rb:2:in `' It looks like you're not using the latest version of MacRuby, which introduced #method_signature (quite a few builds ago). $ macirb >> class Foo >> def foo; end >> method_signature :foo, 'v@:' >> end => nil >> Foo.new.foo => nil Check with macruby -v if it reports 0.4 at least. Also, it looks like you're not using the latest HotConsole sources. The call to #method_signature was removed (it was added to work around a bug in MacRuby trunk which has been fixed after). http://github.com/vincentisambart/hotconsole/commit/8452a7be6343aabb8abfa9e34064e96f44ac4737 Laurent ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Can't build trunk
Laurent Sansonetti wrote: On Nov 24, 2008, at 10:57 PM, Patrick Bennett wrote: I would be using the stable branch but it seems like everything assumes the development branch is being used (ie hotconsole). Speaking of hotconsole - I've never been able to get it to build. With the latest MacRuby (rev 756) [which now builds] I get the following when running macrake with the latest hotconsole code: PMBMacOSX:hotconsole patrickb$ macrake (in /Users/patrickb/dev/hotconsole) macruby(74947,0x103785000) malloc: free_garbage: garbage ptr = 0x800029fc0, has non-zero refcount = 1 /Users/patrickb/dev/hotconsole/HotConsole.app/Contents/Resources/lib/application.rb:43:in `': undefined method `method_signature' for Terminal:Class (NoMethodError) from /Users/patrickb/dev/hotconsole/HotConsole.app/Contents/Resources/lib/application.rb:13:in `' from /Users/patrickb/dev/hotconsole/HotConsole.app/Contents/Resources/rb_main.rb:2:in `load' from /Users/patrickb/dev/hotconsole/HotConsole.app/Contents/Resources/rb_main.rb:2:in `' It looks like you're not using the latest version of MacRuby, which introduced #method_signature (quite a few builds ago). Well, then you haven't updated the svn repository or rake install isn't complete. ;) I checked out a brand new copy as a part of this email thread last night and I run 'svn up' every day in my trunk directory. $ macirb >> class Foo >> def foo; end >> method_signature :foo, 'v@:' >> end => nil >> Foo.new.foo => nil Can't test that right now - my laptop is at home. Check with macruby -v if it reports 0.4 at least. Yes. Also, it looks like you're not using the latest HotConsole sources. That's very possible - I'm still quite green with 'git'. I'll check when I get back home. Thanks... Patrick ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
[MacRuby-devel] Using the MacRuby framework to embed ruby in Objective-C
Hi, Thanks for MacRuby, I'm going to follow its development closely. While I wouldn't use Ruby (without static typing) for large-scale development, IMHO, it is my favourite scripting language for those "little jobs", and I'm currently interested in it as an embedded language in my app. Given the interest, I thought I would try creating a mini obj-c project, including the MacRuby framework, to attempt some simple interactions with ruby from obj-c. Accordingly, I created some toy code: - (void)awakeFromNib { ruby_init(); rb_eval_string("puts 'hello world'"); ruby_finalize(); } Running my little app, results in a series of messages of the form" warning: Could not find object file "/private/tmp/trunk/x.o" - no debug information available for "x.c" where x are things like "array", "bignum", "class", "compar", ... etc. The app then crashes with a stack walk back containing a huge number of nested exceptions (it seems). Now, it's quite possible that I'm just not driving this right (to date I've always scripted in Ruby, and never attempted to drive it from C). Equally, I'd imagine that it's possible that the 0.3 version of the framework isn't up to this yet. If I can get past this point, I can see the objective-c interfacing functions in the header file, so things might be peachy from then on :-) Can anyone enlighten me? Cheers Luke ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Using the MacRuby framework to embed ruby in Objective-C
Hi Luke, On Nov 25, 2008, at 2:57 PM, Luke Evans wrote: Hi, Thanks for MacRuby, I'm going to follow its development closely. While I wouldn't use Ruby (without static typing) for large-scale development, IMHO, it is my favourite scripting language for those "little jobs", and I'm currently interested in it as an embedded language in my app. Given the interest, I thought I would try creating a mini obj-c project, including the MacRuby framework, to attempt some simple interactions with ruby from obj-c. Accordingly, I created some toy code: - (void)awakeFromNib { ruby_init(); rb_eval_string("puts 'hello world'"); ruby_finalize(); } Running my little app, results in a series of messages of the form" warning: Could not find object file "/private/tmp/trunk/x.o" - no debug information available for "x.c" where x are things like "array", "bignum", "class", "compar", ... etc. The app then crashes with a stack walk back containing a huge number of nested exceptions (it seems). Now, it's quite possible that I'm just not driving this right (to date I've always scripted in Ruby, and never attempted to drive it from C). Equally, I'd imagine that it's possible that the 0.3 version of the framework isn't up to this yet. If I can get past this point, I can see the objective-c interfacing functions in the header file, so things might be peachy from then on :-) Can anyone enlighten me? MacRuby trunk ships an Objective-C API that you can use to communicate with the interpreter. See the include/ruby/objc.h file for the API: http://www.macruby.org/trac/browser/MacRuby/trunk/include/ruby/objc.h And the sample-macruby/EmbeddedMacRuby project for an example: http://www.macruby.org/trac/browser/MacRuby/trunk/sample-macruby/EmbeddedMacRuby Note that there are currently 2 known bugs about this "feature". These will be fixed for 0.4 (the next release). http://www.macruby.org/trac/ticket/164 http://www.macruby.org/trac/ticket/165 Laurent ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel