Re: [MacRuby-devel] book idea - "making it look like Ruby"
Ruby is extremely flexible. I'm quite sure that some metaprogramming could be used to prototype something for experimentation.
For the sake of experimentation then, here's some ruby code that does that: https://gist.github.com/824163 I don't think that implementing this in macruby would be a terrible idea. It's not like the way in which the two styles are switched between would be arbitrary, there would be two simple methods for moving each way like String#camelize and String#underscore in rails. One downside I can see is that it could make searching for method names harder. -Arthur
At 11:01 AM +1300 2/13/11, Arthur Gunn wrote:
Ruby is extremely flexible. I'm quite sure that some metaprogramming could be used to prototype something for experimentation.
For the sake of experimentation then, here's some ruby code that does that: https://gist.github.com/824163
I don't think that implementing this in macruby would be a terrible idea. ...
I certainly don't think it's a terrible idea to TRY. If the results are uglier and/or more confusing than normal MacRuby, we'll have learned something and can move on. The next step, for someone with the time and energy, is to pick a working MacRuby example and transliterate the code to use this hack. That will allow folks to assess both the performance and the appearance of the hack. -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Software system design, development, and documentation
Ok so I will play the mean team member and tell you that we are seriously not considering supporting something like that as part of the base implementation. Now that doesn't mean that you guys can't create a gem to support that. - Matt Sent from my iPhone On Feb 12, 2011, at 16:35, Rich Morin <rdm@cfcl.com> wrote:
At 11:01 AM +1300 2/13/11, Arthur Gunn wrote:
Ruby is extremely flexible. I'm quite sure that some metaprogramming could be used to prototype something for experimentation.
For the sake of experimentation then, here's some ruby code that does that: https://gist.github.com/824163
I don't think that implementing this in macruby would be a terrible idea. ...
I certainly don't think it's a terrible idea to TRY. If the results are uglier and/or more confusing than normal MacRuby, we'll have learned something and can move on.
The next step, for someone with the time and energy, is to pick a working MacRuby example and transliterate the code to use this hack. That will allow folks to assess both the performance and the appearance of the hack.
-r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841
Software system design, development, and documentation _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Is it extremely bad practice to use Camel Case in Ruby? At least for MacRuby? I have been mostly because I'm an Objective-C developer and it's what I'm used to as well as all of the Apple API are Camel Case and I didn't want to make the code spaghetti between the two. -Robert On 13/02/2011, at 1:41 PM, Matt Aimonetti wrote:
Ok so I will play the mean team member and tell you that we are seriously not considering supporting something like that as part of the base implementation. Now that doesn't mean that you guys can't create a gem to support that.
- Matt
Sent from my iPhone
On Feb 12, 2011, at 16:35, Rich Morin <rdm@cfcl.com> wrote:
At 11:01 AM +1300 2/13/11, Arthur Gunn wrote:
Ruby is extremely flexible. I'm quite sure that some metaprogramming could be used to prototype something for experimentation.
For the sake of experimentation then, here's some ruby code that does that: https://gist.github.com/824163
I don't think that implementing this in macruby would be a terrible idea. ...
I certainly don't think it's a terrible idea to TRY. If the results are uglier and/or more confusing than normal MacRuby, we'll have learned something and can move on.
The next step, for someone with the time and energy, is to pick a working MacRuby example and transliterate the code to use this hack. That will allow folks to assess both the performance and the appearance of the hack.
-r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841
Software system design, development, and documentation _______________________________________________ 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
It is not, we are just talking about conventions here. Personally I like to use both casing approaches so I can see the difference between obj-c APIs and Ruby's. - Matt Sent from my iPhone On Feb 12, 2011, at 16:44, Robert Payne <robertpayne@me.com> wrote:
Is it extremely bad practice to use Camel Case in Ruby? At least for MacRuby? I have been mostly because I'm an Objective-C developer and it's what I'm used to as well as all of the Apple API are Camel Case and I didn't want to make the code spaghetti between the two.
-Robert
On 13/02/2011, at 1:41 PM, Matt Aimonetti wrote:
Ok so I will play the mean team member and tell you that we are seriously not considering supporting something like that as part of the base implementation. Now that doesn't mean that you guys can't create a gem to support that.
- Matt
Sent from my iPhone
On Feb 12, 2011, at 16:35, Rich Morin <rdm@cfcl.com> wrote:
At 11:01 AM +1300 2/13/11, Arthur Gunn wrote:
Ruby is extremely flexible. I'm quite sure that some metaprogramming could be used to prototype something for experimentation.
For the sake of experimentation then, here's some ruby code that does that: https://gist.github.com/824163
I don't think that implementing this in macruby would be a terrible idea. ...
I certainly don't think it's a terrible idea to TRY. If the results are uglier and/or more confusing than normal MacRuby, we'll have learned something and can move on.
The next step, for someone with the time and energy, is to pick a working MacRuby example and transliterate the code to use this hack. That will allow folks to assess both the performance and the appearance of the hack.
-r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841
Software system design, development, and documentation _______________________________________________ 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
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Robert Payne <robertpayne@me.com> wrote:
Is it extremely bad practice to use Camel Case in Ruby? At least for MacRuby? I have been mostly because I'm an Objective-C developer and it's what I'm used to as well as all of the Apple API are Camel Case and I didn't want to make the code spaghetti between the two.
Matt Aimonetti wrote:
It is not, we are just talking about conventions here. Personally I like to use both casing approaches so I can see the difference between obj-c APIs and Ruby's.
Indeed, it's "just" a matter of tastes and conventions. Some folks like CamelCase. I despise so much that, when forced to use upper case (eg, to name a class), I tend to use a Combination_Method, for readability. IMHO, two of the nicest things about Ruby are: * Matz's taste as a language designer * TIMTOWTDI, inherited from Perl I'm extremely OCD about how my code looks. I polish it until it's as clean and readable as I can make it. By giving me a nice starting point and not getting in my way, Ruby allows me to write code I can be proud of. If a Ruby variant (eg, MacRuby) forces my code to look like a combination of Ruby with Java, ObjC, or another high-ceremony language, that will diminish my joy (and perhaps my efficiency) in using it. At 4:41 PM -0800 2/12/11, Matt Aimonetti wrote:
Ok so I will play the mean team member and tell you that we are seriously not considering supporting something like that as part of the base implementation. Now that doesn't mean that you guys can't create a gem to support that.
The next step, as I posted earlier, is to transliterate an example, then look over the results. So, there is only one situation where a change to MacRuby needs to be considered at all: MacRuby.hack if code.nicer? and code.slow? When and if that happens, we can talk about sanitary ways to hack variant behavior into MacRuby's code base, etc. -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Software system design, development, and documentation
Same here. And while I'm all too curious about the case conversion implementations, I'm in agreement it'd be a bad fit for the official distribution, and a major annoyance with clashing styles in shared code. Sent from my iPhone On 12 Feb 2011, at 23:06, Matt Aimonetti <mattaimonetti@gmail.com> wrote:
It is not, we are just talking about conventions here. Personally I like to use both casing approaches so I can see the difference between obj-c APIs and Ruby's.
- Matt
Sent from my iPhone
On Feb 12, 2011, at 16:44, Robert Payne <robertpayne@me.com> wrote:
Is it extremely bad practice to use Camel Case in Ruby? At least for MacRuby? I have been mostly because I'm an Objective-C developer and it's what I'm used to as well as all of the Apple API are Camel Case and I didn't want to make the code spaghetti between the two.
-Robert
On 13/02/2011, at 1:41 PM, Matt Aimonetti wrote:
Ok so I will play the mean team member and tell you that we are seriously not considering supporting something like that as part of the base implementation. Now that doesn't mean that you guys can't create a gem to support that.
- Matt
Sent from my iPhone
On Feb 12, 2011, at 16:35, Rich Morin <rdm@cfcl.com> wrote:
At 11:01 AM +1300 2/13/11, Arthur Gunn wrote:
Ruby is extremely flexible. I'm quite sure that some metaprogramming could be used to prototype something for experimentation.
For the sake of experimentation then, here's some ruby code that does that: https://gist.github.com/824163
I don't think that implementing this in macruby would be a terrible idea. ...
I certainly don't think it's a terrible idea to TRY. If the results are uglier and/or more confusing than normal MacRuby, we'll have learned something and can move on.
The next step, for someone with the time and energy, is to pick a working MacRuby example and transliterate the code to use this hack. That will allow folks to assess both the performance and the appearance of the hack.
-r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841
Software system design, development, and documentation _______________________________________________ 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
_______________________________________________ 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 (5)
-
Arthur Gunn
-
Caio Chassot
-
Matt Aimonetti
-
Rich Morin
-
Robert Payne