What version of Ruby should I start learning?
-
Haha perfect timing for SketchUp 2014. Looks like I'll be learning Ruby 2.0.0 instead!
-
It hurt so much not being able to tell ya that last week.
-
@dan rathbun said:
It hurt so much not being able to tell ya that last week.
Ditto! I nearly ate my foot!
But the major concepts is still the same. It's mostly differ in terms of features and string handling. And you need to beware of the differences between the two if you want to be backward compatible.
-
@tt_su said:
@dan rathbun said:
It hurt so much not being able to tell ya that last week.
Ditto! I nearly ate my foot!...And you need to beware of the differences between the two if you want to be backward compatible.
Haha well said guys! I'll take that into account as I slowly plod my way through it. I definitely want things to be backward compatible if I can manage it. Looking forward to meeting up with everybody @ Base Camp next month if you're going!
-
The difficult thing is SketchUp has used 4 Ruby versions now.
Mac: v1.8.5-p0 < 14, and v2.0.0-p247 on 14
PC: v.1.8.0-p0 < 8, v1.8.6-p287 on 8 & 13, and v2.0.0-p247 on 14.
Older versions are missing some methods the newer versions have. A few methods here and there have been removed.
As for the API, some of the collection classes did not mixin
Enumerable
at all, some not correctly.I always wished for a master table, that listed missing methods, differences etc.
But I have never seen one even for normal Ruby. -
@dan rathbun said:
The difficult thing is SketchUp has used 4 Ruby versions now...I always wished for a master table, that listed missing methods, differences etc.
But I have never seen one even for normal Ruby.Thanks Dan, I'll have to bookmark this for reference. Knowing what little I know of Ruby thus far, I imagine that'd still be a hell of an undertaking! I think I'll focus on writing for 2.0.0 for now, and worry about stepping whatever I write successfully back down for previous versions later. One thing at a time for me. Are you making out to Base Camp this year, out of curiosity?
-
Base Camp, no. Too busy. Don't ski much. It seems like an excuse to get together and party, and I don't party.
-
Right right. Not much of a partier myself, however I am really looking forward to meeting some of the SketchUcation/Ruby community face to face.
Sent from my XT1080 using Tapatalk
-
Regarding the Ruby 2.0 shift, what's appening to the Sketchup 2014 API ?
It seems the API documentation is still the old one, out there, or at least I coudn't find nothing new about it and that sound strange to me because SU 2014 did introduced some new things (like BIM classification) so I expect to use it also programmatically.Another really important point would be the avaibility of a list of breaking changes (if any) so we can check ours plugins to remove potential bugs.
Any help will be really appreciated.
-
@nick60 said:
Another really important point would be the avaibility of a list of breaking changes (if any) so we can check ours plugins to remove potential bugs
+1
I usually try to study up on the API whenever I can, so anything additional like that would be awesome.
-
We had the longest changelog for the Ruby API ever with the SU2014 release: http://www.sketchup.com/intl/en/developer/docs/releases
We didn't document breaking changes from Ruby 1.8 to Ruby 2.0 as this has been documented extensively by the Ruby community in general.
We did have a breaking change where we moved the Set class to Sketchup::Set - and this is mentioned in the release notes.
API methods for classifiers where something we where unable to get into the last release because Classifiers where changing all too close to release. It is something that will come however.
We are also planning a whole new developer portal.
-
Thanks a lot!
Advertisement