Please, folks, don't hijack this topic (or any topic, really) for unrelated discussions. Just start a new topic with an appropriate Subject; your karma will benefit greatly ...
Posts made by RichMorin
-
RE: SketchUp API Wish List
-
Trying to find the 3DW modeler "travis"
I found some interesting models on the 3DW (relay racks, etc) by someone named "Travis":
http://sketchup.google.com/3dwarehouse/search?uq=0789464842124226787216916
I'd like to chat with their creator, but I don't see any way to get in contact. If you know Travis, could you let him (?) know I'd like to get in touch?
-r
-
RE: SketchUp API Wish List
To keep my initial posting brief, I mentioned some wish list items without providing any explanations. Here are some follow-up posts which clarify what I have in mind:
Wish List - plugin management and namespacing http://forums.sketchucation.com/viewtopic.php?f=180&t=45083
Wish List - Ruby interpreter and libraries
http://forums.sketchucation.com/viewtopic.php?f=180&t=45148Other posts of this type may be forthcoming; watch for titles of the form "Wish List - ...".
-r
-
Wish List - Ruby interpreter and libraries
Here's another topical breakout from my "SketchUp API Wish List" post:
http://forums.sketchucation.com/viewtopic.php?f=180&t=44949
SketchUp 8 uses Ruby 1.8.6 as its embedded Ruby interpreter. As in previous releases, library support is limited: only a subset of the "standard library" is included and adding RubyGems (etc) is left to the developer.
Although there is nothing particularly wrong with version 1.8.6, the Ruby community has moved on (the current version is 1.9.3). This poses several problems for SketchUp plugin developers:
- Gem developers may not maintain 1.8.6 compatibility.
- Interpreter bugs in MRI 1.8.6 may not be fixed.
- MRI 1.8.6 is significantly slower than later versions.
- Plugin developers must track two Ruby dialects.
- Ruby documentation (eg, web sites) may ignore 1.8.6.
Options
Fortunately, none of these problems are urgent; better yet, a short-term "fix" is available. If SketchUp 9 were to move to Ruby 1.8.7, existing plugins would continue to work, but developers could start using some of the new methods and syntax. The backports library could also be included, providing some 1.9.x methods.
Although this would provide some breathing room, it's clear that SketchUp will need to move on at some point. Although there are several interesting possibilities, only a couple (MRI 2.x, mruby) seem particularly likely.
MRI 2.0 should be released in the next year or so. It will be very similar to 1.9.x, but it is expected to be the basis for ongoing Ruby development. So, some 2.x release would be a logical choice for a stable plugin environment.
However, mruby offers another interesting possibility. As an interpreter which is designed to be modular and embedded, it might be a better fit for SketchUp's use than a hacked version of a "normal" interpreter.
I'm hoping that the SketchUp team will experiment with both MRI 2.x and mruby, determining which gives them the best balance of flexibility, performance, stability, etc. At the same time, they could address the packaging and namespacing issues I discussed previously. Then, in (say) SketchUp 10, they could give us a new, shiny plugin environment!
Resources
- backports - https://github.com/marcandre/backports
- MRI 2.x - http://www.rubyinside.com/ruby-2-0-implementation-work-begins-what-is-ruby-2-0-and-whats-new-5515.html
- mruby - http://matt.aimonetti.net/posts/2012/04/25/getting-started-with-mruby/
- mruby - https://github.com/mruby/mruby
- Ruby Gems - http://rubygems.org/
- Ruby Standard Library - http://www.ruby-doc.org/stdlib-1.9.3/
-
Wish List - plugin management and namespacing
My "SketchUp API Wish List" post listed a number of wish list items, but didn't go into detail on any of them:
http://forums.sketchucation.com/viewtopic.php?f=180&t=44949
This post discusses two items in more detail, suggesting an existing implementation which could serve as a model:
- plugin management (eg, installation, signing, vetting)
- plugin namespacing (eg, classes and modules, files)
In a typical software development project, programmers select components, fit them together, and test the results. This process provides a fair amount of protection against broken or malicious code, naming conflicts, etc.
Plugin environments, in contrast, have no such oversight: users simply download and install plugins, hoping for the best. To make such an approach safe and reliable, the plugin environment needs to address a number of issues. SketchUp does not do this, at present.
Fortunately, there are excellent plugin implementations to use as models. Google Chrome Extensions, for example, handle a broad range of architecture, management, and security issues. Here are some short videos which describe their approach, rationale, etc:
How to build an extension
Youtube VideoIdentity, Signing and Auto Update
Youtube VideoSecurity
Youtube VideoIn many ways, Google Chrome Extensions are very similar to SketchUp plugins. For example, both systems use CSS, HTML, and JavaScript for user interaction. In any case, the challenges they face are quite similar.
If you know of other plugin (etc) environments that have good ideas to offer, please suggest them!
-
SketchUp API Wish List
As you may know, Scott Lininger recently posted an encouraging entry on the SketchUp API blog:
@unknownuser said:
... I'm here to assure you that Trimble is committed to preserving the vitality of SketchUp’s developer community. ... In the longer term, I expect [this change] to improve the state of our APIs and developer resources. Trimble wants to invest strongly in SketchUp as a platform, and advance its mission of "3D for Everyone." ...
-- A new home for SketchUp
http://sketchupapi.blogspot.com/2012/04/new-home-for-sketchup.htmlI am quite willing (nay, delighted) to believe that "Trimble wants to invest strongly in SketchUp as a platform". What I'm not sure about is what this could mean for me as a developer.
Over the past several years, many of us have made suggestions, only to be told "that's a great idea, but the resources aren't available". Well, what if the resources were available? What projects should Scott propose to Trimble and/or John Bacus?
Well-known "clean up" items aside, what new projects would we like Scott to propose? What things could his team do if they had (say) another half-dozen programmers?
FYI: Constructive comments and suggestions are welcome, but please take any negativity elsewhere. We all have gripes about the past and worries about the future; this topic isn't the place for them. Let's see if we can give Scott some help, while he's busy packing for the move...
I'll start with some general items:
- concurrency (eg, actors, distributed Ruby)
- debugging support (eg, logging framework)
- documentation (eg, API, best practices, examples)
- interpreter (eg, Ruby 1.9.x, mruby)
- library support (eg, full standard library, gem access)
- plugin management (eg, installation, signing, vetting)
- plugin namespacing (eg, classes and modules, files)
API changes really deserve their own section, eg:
- improved access to menu items
- improved API for WebDialogs (eg, WebSockets)
What am I missing, folks? (ducks)
-r
-
RE: SketchUp developer IRC channel - #sketchup-dev
I was out of town for a couple of weeks, so the channel went away, but I've restarted it.
-
"SketchUp Ruby Cookbook"
There are quite a few computer-related "cookbooks", including ones on jQuery, Ruby, SketchUp, etc. These books typically contain hints and short, well-explained examples that readers can adapt to fit their own needs.
Unfortunately, I'm not aware of any such cookbook for SketchUp Ruby. So, I'm starting one now, based on a few dozen TWiki pages I've created over the past couple of years:
http://cfcl.com/twiki/bin/view/SketchUp/Cookbook/WebHome
My hope is that some of the folks who answer questions here on a frequent basis will like this idea and contribute (either by email or after obtaining TWiki editing privileges).
Over time, this could become a fairly comprehensive collection of lore on SketchUp Ruby. Please take a look and contact me (offline) if you'd like to participate. Online comments are also welcome...
-
RE: SketchUp developer IRC channel - #sketchup-dev
@jolran said:
Gotta link?
HowTo:
- Start up an IRC client (I like Colloquy for Mac OS X).
- Connect to the IRC server (irc.freenode.net).
- Join the chat room (sketchup-dev).
- Introduce yourself (eg, name, location).
-r
-
SketchUp developer IRC channel - #sketchup-dev
Some time back, I got too busy to maintain #sketchup-dev, an IRC channel (on irc.freenode.net) for discussion of SketchUp development topics. I have some time again, so I'd like to revive the channel.
I expect the traffic to mostly be about Ruby, but other topics (eg, dynamic attributes) are also welcome. About the only thing that will cause banning is nasty behavior: MINASWAN (Matz is nice, and so we are nice.)
Please consider dropping in ...
-r
-
SF Bay Area SketchUp meeting, 5/26
I realize that this list goes all over the world, but if
you're in or near the San Francisco Bay Area, you might
want to wander over to this:"Plugins! An introduction and demonstration of a variety
of plugins for SketchUp", Chris Fullmerhttp://www.meetup.com/Bay-Area-SketchUp/events/17223818/
Chris Fullmer, who has been developing plugins for several
years, is more than qualified to present this topic.May 26, 7:00 pm
Sandbox Suites Annex
1385 Mission St., Suite #300
San Francisco, CA, USAAs an added inducement, I'll buy a beer (or whatever) after
the meeting for any SketchUp Rubyist who shows up!-r
-
SF Bay Area SketchUp meeting, 5/26
I realize that this list goes all over the world, but if
you're in or near the San Francisco Bay Area, you might
want to wander over to this:"Plugins! An introduction and demonstration of a variety
of plugins for SketchUp", Chris Fullmerhttp://www.meetup.com/Bay-Area-SketchUp/events/17223818/
Chris Fullmer, who has been developing plugins for several
years, is more than qualified to present this topic.May 26, 7:00 pm
Sandbox Suites Annex
1385 Mission St., Suite #300
San Francisco, CA, USAAs an added inducement, I'll buy a beer (or whatever) after
the meeting for any SketchUp Rubyist who shows up!-r
-
SF Bay Area SketchUp meeting, 4/6
I realize that this list goes all over the world, but if you're in or near the San Francisco Bay Area, you might want to wander over to this:
"Taking Advantage of Google's 3D Warehouse", Mike Tadros
http://www.meetup.com/Bay-Area-SketchUp/events/16949298/April 6, 6:30 pm
Sandbox Suites Annex
1385 Mission St., Suite #300
San Francisco, CA, USAAs an added inducement, I'll buy a beer (or whatever) after the meeting for any SketchUp Rubyist who shows up!
-r
-
RE: SketchUp Sunday Social (SUSS)
@khai said:
open only to programmers or to all?
Open to anyone, but be prepared for a programming focus
to any substantive discussions. If demand warrants, I'm
sure we could have events aimed at a modelers and others,
but my own background and interests lie in programming. -
SketchUp Sunday Social (SUSS)
Thomas Thomassen (ThomThom) and I would like to
invite you to the first SketchUp Sunday Social (SUSS):Date/time; Sunday, 2011.0109 1000-1200 (PST - CA, USA) 1800-2000 (GMT) Venue; sketchup-dev (irc.freenode.net) Agenda; * introductions and chatter * optimization techniques * Best Practices in plugins
As the acronym hints, SUSS is supposed to help us
suss out how to solve SketchUp programming problems.
However, it’s also supposed to be a way for us to
meet each other, hear about events and gossip, etc.
Hope to see you there!-r
-
RE: Need help on writing threaded plugin code
@thomthom said:
UI.timer ? or a Javascript timer?
This has to be a UI.timer, because it runs in the plugin (telling the plugin when to look for proxied messages from the JavaScript client code).
I'm using SU 8, so the bug you mention isn't a problem for me. However, it would be nice to have a solution that works for earlier versions.
-
RE: PBI - emulate WebDialogs in a browser?
@morgan_greywolf said:
Sure, I'll take a look at it. I'm running SU8 on Linux/Wine.
Great. You can get started with the proxy server and the test page; send me a note off-list (rdm@cfcl.com) letting me know what you find out. As soon as I have my example plugin ready for Alpha testing, I'll let you know.
FYI, the plugin no longer sits in a read loop. Instead, I use UI.start_timer to perform periodic scans of the input directory. This seems to work quite nicely, but it does require SU8, because it's using a sub-second interval.
Also, I'm still hoping for a CygWin and/or native Windows tester!
-
RE: Need help on writing threaded plugin code
FWIW, I found a different solution to the problem. Instead of looping, I set up a timer which fires every 0.05 seconds. The associated block looks for files, etc. Seems to work just dandy...
-
RE: Need help on writing threaded plugin code
I have two reasons for thinking that I might need to use threads (or some other solution). Even in the context of show_modal(), it's annoying to have the Ruby Console (etc.) stalled. In the context of show(), it's unacceptable to have the rest of SketchUp stalled.
I'm not married to the idea of threads, but I need some way to detect and process incoming data files. Suggestions?
-
RE: PBI - emulate WebDialogs in a browser?
I now have a BrowserDialog class which lets me emulate a WebDialog under Safari. Although it's usable, there are still a few rough edges. In particular, it takes over the plugin, looking for input files (see http://forums.sketchucation.com/viewtopic.php?f=180&t=33012 for details).
Still, I was able to use it successfully on a couple of very substantial plugins, so I am quite encouraged. At this point, I'm looking for some other plugin developers who would like to try out the code, look it over for problems, etc. I'm particularly interested in finding a tester who runs something other than Mac OS X.