Re: [MacRuby-devel] MacRuby in the Mac App Store

2010-10-25 Thread Jason Guiditta
On Wed, Oct 20, 2010 at 7:44 PM, Robert Schaaf  wrote:

> It sems to me that since you can compile an app to native code, using
> Apple's frameworks and runtime system, there need be no Ruby installation.
>
> That said, I think an app store for the Mac is a horrible idea.  I won't
> detail why in this forum, but I'm sure my views will be expresed by others
> elsewhere.
>
>
> Sent from my iPad
>
>
Apologies if this has been covered elsewhere on the list (I may have missed
it in the archives), but I was wondering the same thing about the app store
for iOS devices.  Is anyone actively using macruby to build apps there, and
are there any known issues with the rules as mentioned in the beginning of
this thread for the OSX app store?
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] MacRuby in the Mac App Store

2010-10-25 Thread Scott Ribe
MacRuby does not work on iOS.

On Oct 25, 2010, at 7:55 AM, Jason Guiditta wrote:

> Is anyone actively using macruby to build apps there


-- 
Scott Ribe
[email protected]
http://www.elevated-dev.com/
(303) 722-0567 voice




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


Re: [MacRuby-devel] MacRuby in the Mac App Store

2010-10-25 Thread Matt Aimonetti
Scott, I think the discussion is about the OS X app store. And as far as I
know, there is no official word from Apple about that.

- Matt

On Mon, Oct 25, 2010 at 7:25 AM, Scott Ribe wrote:

> MacRuby does not work on iOS.
>
> On Oct 25, 2010, at 7:55 AM, Jason Guiditta wrote:
>
> > Is anyone actively using macruby to build apps there
>
>
> --
> Scott Ribe
> [email protected]
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
> ___
> 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] MacRuby in the Mac App Store

2010-10-25 Thread Scott Ribe
On Oct 25, 2010, at 11:29 AM, Matt Aimonetti wrote:

> Scott, I think the discussion is about the OS X app store. And as far as I 
> know, there is no official word from Apple about that.

This discussion certainly was (maybe still is) about that, but the post I was 
responding asked about iOS.

-- 
Scott Ribe
[email protected]
http://www.elevated-dev.com/
(303) 722-0567 voice




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


Re: [MacRuby-devel] Mixing ruby code with Objective-C code within a Cocoa project...

2010-10-25 Thread Frederick C. Lee
I can see the use of Ruby in doing some intense data massaging, like 
string/math/dates sort of processing that would be quite verbose in Objective C.
I'm thinking of using Ruby in place of plain 'C'  (or Perl) in doing some 
rudimentary stuff such as that.

I'm somewhat aware of the Ruby/Objective-C APIs out there...  and the paradigm 
of doing such, albeit I haven't come across formal documentation yet.

As to the IOS...
... I'm assuming that Ruby support for the iOS platform will be a reality 
sometime in the not-to-distant future; particularly when OS X & iOS appear to 
be merging 
... somewhat

Ric.



On Oct 22, 2010, at 11:29 AM, Alistair Holt wrote:

> Hi Ric
> 
> I think I'm right in saying that you can mix the two languages but not in the 
> same file. Also, you wont be able to use Ruby to write anything for iOS as 
> it's not currently supported. 
> 
> --
> Alistair Holt
> 
> On 22 Oct 2010, at 18:32, "Frederick C. Lee"  wrote:
> 
>> Greetings:
>>  I'm a MacRuby neophyte and wonder if I'll be able to mix Ruby with 
>> Objective-C, similar to the ability to write Objective-C++ code.
>> I'm particularly interested in exploiting the power of Ruby's terse language 
>> to aid in Objective-C projects; preferably for iOS.
>> 
>> Or... would I have to keep Ruby code in its own .rb file and pass data 
>> to/from ruby routines as parameters.
>> 
>> Any info?   Demo code?
>> 
>> Regards,
>> 
>> Ric.
>> ___
>> 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] MacRuby in the Mac App Store

2010-10-25 Thread Jason Guiditta
On Mon, Oct 25, 2010 at 1:29 PM, Matt Aimonetti wrote:

> Scott, I think the discussion is about the OS X app store. And as far as I
> know, there is no official word from Apple about that.
>
> - Matt
>
>
>
Yeah, that was my fault - I asked if the same was true of the iOS app store
(original poster was referring to OSX store).  However, if the reply from
earlier that 'it compiles down to objective-c anyway' is correct (which is
what I thought was the case), perhaps it doesn't matter for either store?
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] MacRuby in the Mac App Store

2010-10-25 Thread Scott Ribe
On Oct 25, 2010, at 12:55 PM, Jason Guiditta wrote:

> However, if the reply from earlier that 'it compiles down to objective-c 
> anyway' is correct (which is what I thought was the case), perhaps it doesn't 
> matter for either store?

No, MacRuby apps do not work on iOS. MacRuby uses garbage collection, which iOS 
does not support.

-- 
Scott Ribe
[email protected]
http://www.elevated-dev.com/
(303) 722-0567 voice




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


Re: [MacRuby-devel] Understanding Pointer objects

2010-10-25 Thread Laurent Sansonetti
Hi Mark,

> Ah, that does work, and seems to have worked for a number of other things I 
> am trying to do. 
> 
> The only problem now is when I have something like
> 
>   value = Pointer.new '^v' # pointer to pointer to void
>   AXUIElementCopyAttributeValue mail_object, 'AXHidden', value
> 
> In this case I am using it right now, it will be returning a boolean, but 
> when I try to dereference it like
> 
>   puts value[0][0] # => 120
> 
> it gives me a Fixnum, and then I can keep trying things like 
> 
>   puts value[0][1] # => 104
>   puts value[0][1] # => 0
> 
> And I seem to get nowhere.
> 
> Is there a way to cast the data back into the type I want it to be? Or am I 
> doing something dumb?

Looks like this function has the following declaration:

extern AXError  AXUIElementCopyAttributeValue (AXUIElementRef element, 
CFStringRef attribute, CFTypeRef *value);

So, the 3rd argument is is a CF object returned by reference.

You should be able to do the following then:

  ptr = Pointer.new(:id)
  AXUIElementCopyAttributeValue(mail_object, 'AXHidden', ptr)
  value = ptr[0]

To reply to your other question, it is possible to cast the type of a Pointer 
object, using the #cast! method. Sometimes this is useful when you get a void 
pointer from a native API and want to cast it into something more useful. But 
you should be careful, MacRuby will not prevent you from doing bad casts.

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


Re: [MacRuby-devel] Confusing with The memory a macruby app used

2010-10-25 Thread niedhui
got it .thanks
On Oct 25, 2010, at 9:20 AM, Laurent Sansonetti wrote:

> Hi,
> 
> The memory used by a new MacRuby app depends on your environment, but it's 
> indeed bigger than a default Objective-C app. If you start enabling garbage 
> collection in the Objective-C app and create some objects, the rsize should 
> then be the same as a normal MacRuby app (since the runtime itself creates 
> some objects when starting).
> 
> Using AOT compilation will decrease some memory usage.
> 
> If you think the default rsize of a MacRuby process is too high please file a 
> ticket and we will investigate.  Otherwise, make sure the rsize of your app 
> remains constant while using it, if you notice it's growing then please let 
> us know, since it might be a leak.
> 
> Laurent
> 
> On Oct 24, 2010, at 6:26 AM, 聂殿辉 wrote:
> 
>> Hi:
>> I want to write an app with macruby , and want to make sure there's not 
>> memory problem. I create an Macruby-Application with Xcode ,and lanuch it 
>> ,using the Activity Monitor , it using about 44M memory ,and create an 
>> ObjectivC-Application ,it only use 8M memory ,is it normal?  thanks 
>> ___
>> 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