[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 cod

[MacRuby-devel] LLVM Build Convenience

2009-08-02 Thread Josh Ballanco
Hey all, I got tired of constantly having to rebuild/reinstall LLVM, so I added a facility to scrape the commands from the README and offer to run them if llvm-config isn't found. I've attached the diff if anyone else is interested (don't know that I'd recommend this for general use, thou

Re: [MacRuby-devel] LLVM Build Convenience

2009-08-02 Thread Josh Ballanco
Whoops! Small mistake in that last patch. Use this one: llvm_build.diff Description: Binary data - Josh On Aug 2, 2009, at 4:36 PM, Josh Ballanco wrote: Hey all, I got tired of constantly having to rebuild/reinstall LLVM, so I added a facility to scrape the commands from the README

Re: [MacRuby-devel] Information about the new YAML module

2009-08-03 Thread Josh Ballanco
Hey Matt, Just to add another data point, I've been using git-svn to interface with a svn repo where some of my git branches are matched to svn branches and others are not. In general, my workflow is: # Make a branch in svn: $ svn cp svn+ssh://path/to/trunk svn+ssh://path/to/branch/yaml_bra

Re: [MacRuby-devel] What's the current state of macgem?

2009-08-17 Thread Josh Ballanco
Hey Conrad, I was just looking at this last week. Some recent work on marshalling landed on trunk recently (thanks Laurent!), which is one of the pieces needed. The other major missing piece is zlib. I was looking at what would be needed to port this to MacRuby. However, there is also Zliby

Re: [MacRuby-devel] Git Mirrors

2009-08-21 Thread Josh Ballanco
Well, a wonderful discovery that I made recently is that git-apply doesn't, in fact, require that the destination you're applying a patch to be a git repo. In other words, patches generated with git-format- patch could be e-mailed to subversion repo maintainers and applied with git-apply. Ju

Re: [MacRuby-devel] Assertion failed: (castIsValid(getOpcode(), S, Ty) && "Illegal SExt"), function SExtInst, file Instructions.cpp, line 2508.

2009-09-27 Thread Josh Ballanco
I've been running tests in 32-bit mode, and I can confirm that this is definitely a 32-bit issue. - Josh On Sep 27, 2009, at 2:27 PM, Art Taylor wrote: I'm in the process of migrating an Objective-C project to MacRuby (0.5 trunk) and am seeing this error when I run the application: Asser

Re: [MacRuby-devel] MacRuby tips

2009-10-06 Thread Josh Ballanco
Hey Matt, Something I'm working on is writing a Framework in Xcode, and using MacRuby to test it. I'm running into some issues that I'm trying to chase down (segfaults with bacon when loading frameworks), but there were enough gottchas that I think this would make for a good little recipe

[MacRuby-devel] Default Test Framework

2009-10-08 Thread Josh Ballanco
Hey all! So, as I've been working on a recipe for testing with MacRuby, I realized that it would probably be good to discuss the topic of "blessing" a particular test suite. Obviously, with macgem all of the Ruby test suites are available to use, but for the purposes of tutorials and what

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Josh Ballanco
Hi Ruben, Using an Objective-C class in a MacRuby script is the first step in both recipes currently posted to the MacRuby website (http://www.macruby.org/documentation.html ). Your choices are either to add a "dummy" Init_foo{} function and make a foo.bundle from the class or compile the Ob

Re: [MacRuby-devel] MACRUBY_REVISION

2009-10-29 Thread Josh Ballanco
On Oct 29, 2009, at 12:48 PM, Ernest N. Prabhakar, Ph.D. wrote: Hi Laurent, On Oct 29, 2009, at 12:42 PM, Laurent Sansonetti wrote: On Oct 29, 2009, at 12:39 PM, Ernest N. Prabhakar, Ph.D. wrote: Hi Laurent, On Oct 29, 2009, at 12:26 PM, Laurent Sansonetti wrote: $ macruby -e "p MACRUBY_R

Re: [MacRuby-devel] spotlight - MDItemRef

2009-10-29 Thread Josh Ballanco
Hi Ruben, On Oct 29, 2009, at 11:07 AM, Ruben Fonseca wrote: Finally, as to your later question, there actually *is* a MacRuby API for GCD currently in the 0.5 beta and nightly builds. Yes I know. That's why I've asked if it makes sense to include more wrappers to other C APIs into Macruby

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

2009-12-17 Thread Josh Ballanco
def is_macruby? defined? RUBY_ENGINE && RUBY_ENGINE == 'macruby' end Cheers, Josh On Dec 17, 2009, at 12:18 AM, Paul Howson wrote: > Is there a way to test if code is running in MacRuby rather than Ruby? I'm > developing and testing some code using plain old Ruby 1.8.7 in TextMate, then >

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

2009-12-18 Thread Josh Ballanco
Whoops...that's what I get for replying with untested code... On Dec 18, 2009, at 12:14 PM, Paul Howson wrote: > On 17/12/2009, at 6:21 PM, Josh Ballanco wrote: > >> def is_macruby? >> defined? RUBY_ENGINE && RUBY_ENGINE == 'macruby' >> end >

Re: [MacRuby-devel] problems building MacRuby

2010-01-25 Thread Josh Ballanco
Rich, When you were downloading, building, and installing LLVM, did you follow the instructions exactly as outlined in the README? LLVM has a plethora of configuration options, and MacRuby currently works with a very specific svn revision of the project. Cheers, Josh On Jan 25, 2010, at 11:

Re: [MacRuby-devel] Obj-C -> MacRuby and back?

2010-04-28 Thread Josh Ballanco
Alexander, See also, for example, the recipe on the MacRuby website for TDD. In that recipe, a class created in Obj-C gets used from MacRuby. - Josh On Apr 28, 2010, at 2:17 PM, Alexander von Below wrote: > Thanks a lot! > > I have looked at the EmbeddedRuby app, but I did not see the way "ba

Re: [MacRuby-devel] A ruby string with ASCII-8BIT encoding is really an NSData and not an NSString

2010-05-28 Thread Josh Ballanco
On May 28, 2010, at 10:03 AM, Carl Lerche wrote: > Hello, Hi! > I've been playing around with macruby a bunch and I hit a point of > confusion. I basically did "".pack("H*") which returns a ruby > string. This string is an ASCII-8BIT encoded ruby string which is an > alias for a Binary strin