3 Questions, One about language restriction, one about platform targeting and the final about the standard library.
Hi all, I have a couple of questions which I have attempted to answer to no-avail. I was wondering if anyone could point me in the right direction (Quite new to OS X development so my apologies if it is mealy my incompetence that has lead me here.) 1) I am looking into using MacRuby and am interested in it's ability to AOT compile ruby code down to an executable. I am wondering though whether this places a restriction on the code in any way? Is there a subset of ruby which is supported or can i go ahead and perform all the meta-magic i want and still have the code AOT compiled? 2) I am also interested in targeting both 10.6 and 10.5 with any applications developed (at 50%+ OS X share it is imposable to ignore with any conscience.) I have looked at the deployment task shipped with Mac Ruby and love the fact that I can have a simple .app to pass on to my users however, am i right in thinking that this .app will only operate on 10.6 machines? If so is there any way to develop either a combined or separate .app which is useful to users of 10.5? Is this possible when the development system is 10.6? 3) I also read an article about how the developer of Stopwatch* packaged said application without the "standard library." am I right in thinking that this is the ruby standard library which was left unpackaged? Wouldn't this render the application un-runnable? Any advice on any of the 3 questions is much appreciated. Regards, Anthony Buck * http://isaac.kearse.co.nz/2010/01/31/stopwatch/
Hi Anthony, On Feb 3, 2010, at 5:36 PM, Anthony Buck wrote:
Hi all, I have a couple of questions which I have attempted to answer to no-avail. I was wondering if anyone could point me in the right direction (Quite new to OS X development so my apologies if it is mealy my incompetence that has lead me here.)
1) I am looking into using MacRuby and am interested in it's ability to AOT compile ruby code down to an executable. I am wondering though whether this places a restriction on the code in any way? Is there a subset of ruby which is supported or can i go ahead and perform all the meta-magic i want and still have the code AOT compiled?
Yes, the AOT compiler should fully support the Ruby language. If you find something that does not work when compiled, it's a bug :) Please report them and we will fix them.
2) I am also interested in targeting both 10.6 and 10.5 with any applications developed (at 50%+ OS X share it is imposable to ignore with any conscience.) I have looked at the deployment task shipped with Mac Ruby and love the fact that I can have a simple .app to pass on to my users however, am i right in thinking that this .app will only operate on 10.6 machines? If so is there any way to develop either a combined or separate .app which is useful to users of 10.5? Is this possible when the development system is 10.6?
It is currently not possible, as explained in http://www.macruby.org/trac/ticket/354 . Note that this might be supported in a future release. We also accept contributions :)
3) I also read an article about how the developer of Stopwatch* packaged said application without the "standard library." am I right in thinking that this is the ruby standard library which was left unpackaged? Wouldn't this render the application un-runnable?
Yes, it is the Ruby standard library. If the application does not use it there is no reason why removing it would cause a problem. In fact, we recommend to prefer the Cocoa APIs over the Ruby standard library when it is possible. Cocoa is much better designed and implemented. Laurent
Thank you for such prompt response! I am surprised that the standard lib can be left out though! Is there any formal/informal list of what ruby considers "standard library"? Can we safely assume that most container classes are available for instance? Array, Hash etc? Am I right in assuming that what is left out is anything that warrants a "require" statement? Again, Thanks! Anthony On 4 February 2010 01:36, Anthony Buck <roja@arbia.co.uk> wrote:
Hi all, I have a couple of questions which I have attempted to answer to no-avail. I was wondering if anyone could point me in the right direction (Quite new to OS X development so my apologies if it is mealy my incompetence that has lead me here.)
1) I am looking into using MacRuby and am interested in it's ability to AOT compile ruby code down to an executable. I am wondering though whether this places a restriction on the code in any way? Is there a subset of ruby which is supported or can i go ahead and perform all the meta-magic i want and still have the code AOT compiled?
2) I am also interested in targeting both 10.6 and 10.5 with any applications developed (at 50%+ OS X share it is imposable to ignore with any conscience.) I have looked at the deployment task shipped with Mac Ruby and love the fact that I can have a simple .app to pass on to my users however, am i right in thinking that this .app will only operate on 10.6 machines? If so is there any way to develop either a combined or separate .app which is useful to users of 10.5? Is this possible when the development system is 10.6?
3) I also read an article about how the developer of Stopwatch* packaged said application without the "standard library." am I right in thinking that this is the ruby standard library which was left unpackaged? Wouldn't this render the application un-runnable?
Any advice on any of the 3 questions is much appreciated.
Regards,
Anthony Buck
std libs are all the "extra" classes that you need to require in your code like rexml, yaml, CGI etc... - Matt On Thu, Feb 4, 2010 at 8:39 AM, Anthony Buck <roja@arbia.co.uk> wrote:
Thank you for such prompt response! I am surprised that the standard lib can be left out though! Is there any formal/informal list of what ruby considers "standard library"? Can we safely assume that most container classes are available for instance? Array, Hash etc? Am I right in assuming that what is left out is anything that warrants a "require" statement?
Again, Thanks!
Anthony
On 4 February 2010 01:36, Anthony Buck <roja@arbia.co.uk> wrote:
Hi all, I have a couple of questions which I have attempted to answer to no-avail. I was wondering if anyone could point me in the right direction (Quite new to OS X development so my apologies if it is mealy my incompetence that has lead me here.)
1) I am looking into using MacRuby and am interested in it's ability to AOT compile ruby code down to an executable. I am wondering though whether this places a restriction on the code in any way? Is there a subset of ruby which is supported or can i go ahead and perform all the meta-magic i want and still have the code AOT compiled?
2) I am also interested in targeting both 10.6 and 10.5 with any applications developed (at 50%+ OS X share it is imposable to ignore with any conscience.) I have looked at the deployment task shipped with Mac Ruby and love the fact that I can have a simple .app to pass on to my users however, am i right in thinking that this .app will only operate on 10.6 machines? If so is there any way to develop either a combined or separate .app which is useful to users of 10.5? Is this possible when the development system is 10.6?
3) I also read an article about how the developer of Stopwatch* packaged said application without the "standard library." am I right in thinking that this is the ruby standard library which was left unpackaged? Wouldn't this render the application un-runnable?
Any advice on any of the 3 questions is much appreciated.
Regards,
Anthony Buck
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
As Matt writes, the standard library only contains extra classes. Everything accessible without a #require is part of the core, which cannot be stripped down during the deployment phase (yet). As of trunk (0.6), the stdlib files are in /Library/Frameworks/ MacRuby.framework/Versions/0.6/usr/lib/ruby. It's a mix of Ruby and C extension bundles. These are the files that will be removed. HTH, Laurent On Feb 4, 2010, at 9:59 AM, Matt Aimonetti wrote:
std libs are all the "extra" classes that you need to require in your code like rexml, yaml, CGI etc...
- Matt
On Thu, Feb 4, 2010 at 8:39 AM, Anthony Buck <roja@arbia.co.uk> wrote: Thank you for such prompt response! I am surprised that the standard lib can be left out though! Is there any formal/informal list of what ruby considers "standard library"? Can we safely assume that most container classes are available for instance? Array, Hash etc? Am I right in assuming that what is left out is anything that warrants a "require" statement?
Again, Thanks!
Anthony
On 4 February 2010 01:36, Anthony Buck <roja@arbia.co.uk> wrote:
Hi all, I have a couple of questions which I have attempted to answer to no-avail. I was wondering if anyone could point me in the right direction (Quite new to OS X development so my apologies if it is mealy my incompetence that has lead me here.)
1) I am looking into using MacRuby and am interested in it's ability to AOT compile ruby code down to an executable. I am wondering though whether this places a restriction on the code in any way? Is there a subset of ruby which is supported or can i go ahead and perform all the meta-magic i want and still have the code AOT compiled?
2) I am also interested in targeting both 10.6 and 10.5 with any applications developed (at 50%+ OS X share it is imposable to ignore with any conscience.) I have looked at the deployment task shipped with Mac Ruby and love the fact that I can have a simple .app to pass on to my users however, am i right in thinking that this .app will only operate on 10.6 machines? If so is there any way to develop either a combined or separate .app which is useful to users of 10.5? Is this possible when the development system is 10.6?
3) I also read an article about how the developer of Stopwatch* packaged said application without the "standard library." am I right in thinking that this is the ruby standard library which was left unpackaged? Wouldn't this render the application un-runnable?
Any advice on any of the 3 questions is much appreciated.
Regards,
Anthony Buck
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (3)
-
Anthony Buck
-
Laurent Sansonetti
-
Matt Aimonetti