I HI Ash, Zak, friends, I have been working with Steve Klabnik on QT Shoes and modularizing the shoes-core and shoes-gui. My Iteration 0 of this project is in pull-request status to steve on feature/white_shoes_gui. At least one of you suggested moving through the original Shoes Manual as a first-run smoke test, so that's where i'm headed next. I think much refactoring will be realized when we start merging the GTK and JRuby "gui" modules into WhiteShoes. So, Ash, Zak and Scott, could you look at my fork/commit, tell me your thoughts on continuing this project? Thanks, Peter Fitzgibbons (847) 859-9550 Email: peter.fitzgibbons@gmail.com IM GTalk: peter.fitzgibbons IM AOL: peter.fitzgibbons@gmail.com
> So, Ash, Zak and Scott, could you look at my fork/commit, tell me your > thoughts on continuing this project? It all looks good to me, man. I like the links to the QT documentation...
Hi Peter, > I have been working with Steve Klabnik on QT Shoes and > modularizing the shoes-core and shoes-gui. Wow, cool! Let's enjoy colorful Shoes. :) I downloaded your blue_shoes from http://github.com/pjfitzgibbons/blue_shoes/tree/feature/white_shoes_gui Then I ran blue_shoes/samples/shoes-man-hello.rb. But unfortunately I got the following error: C:/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/spec_set.rb:87: in `block in materialize': Could not find diff-lcs-1.1.2 in any of the sources (Bundler::GemNotFound) Umm,... sorry there must be something wrong in my Windows 7 environment. But I couldn't find a reason. I've never used bundler. :-P BTW. I walked through blue_shoes/lib/blue_shoes/gui/qt/*.rb a little. Then I noticed a big difference between Blue Shoes and Green Shoes. - In Blue Shoes all classes are inherited from Qt::xxx, but in Green Shoes no classes are inherited from GTK::xxx. I don't think it's a problem, but a big difference of approach. I'm not sure which is better. Because we are just getting started. ;-) ashbb
HI Ash, RE: Shoes::GUI + Qt + Gtk (+ Jruby/swing), Well, I forsee the centralization of Gui will include some refatorings where the "common denominator" between Gtk and Qt are resolved. The Gtk equivalents of Shoes::Gui::Icon may not require subclassing, yet hopefully there is a refactoring that will allow the Shoes::Gui to have an API that is agnostic to the gui-lib. I'm going on the assumption that as we move along, the generalizations we find will also find compatability with J/swing I was looking at the Gtk implementation today and I already see some necessary refactoring to properly encapsulate the gui-libs (for instance GreenShoes.Shoes::App#oval and GreenShoes.Shoes::App#rgb ) Anyway, continuing to look at the possibilities. I'm interested to hear your thoughts on approach to this. Regards, Peter Fitzgibbons (847) 859-9550 Email: peter.fitzgibbons@gmail.com IM GTalk: peter.fitzgibbons IM AOL: peter.fitzgibbons@gmail.com On Mon, Oct 11, 2010 at 4:01 AM, ashbb <ashbbb@gmail.com> wrote: > Hi Peter, > > > > I have been working with Steve Klabnik on QT Shoes and > > modularizing the shoes-core and shoes-gui. > Wow, cool! Let's enjoy colorful Shoes. :) > > I downloaded your blue_shoes from > http://github.com/pjfitzgibbons/blue_shoes/tree/feature/white_shoes_gui > > Then I ran blue_shoes/samples/shoes-man-hello.rb. But unfortunately I got > the following error: > > C:/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/spec_set.rb:87: > in `block in materialize': Could not find diff-lcs-1.1.2 in any of > the sources (Bundler::GemNotFound) > > > Umm,... sorry there must be something wrong in my Windows 7 environment. > But I couldn't find a reason. I've never used bundler. :-P > > BTW. > I walked through blue_shoes/lib/blue_shoes/gui/qt/*.rb a little. Then I > noticed a big difference between Blue Shoes and Green Shoes. > > - In Blue Shoes all classes are inherited from Qt::xxx, but in Green Shoes > no classes are inherited from GTK::xxx. > > I don't think it's a problem, but a big difference of approach. > I'm not sure which is better. Because we are just getting started. ;-) > > ashbb > >
Hi Peter, Steve et al, I'd like to discuss about this point: > > - In Blue Shoes all classes are inherited from Qt::xxx, but in Green Shoes > > no classes are inherited from GTK::xxx. > > Hm, yeah. I _have_ to subclass them with qtruby... Look at my first try for Blue Shoes: http://github.com/ashbb/blue_shoes/blob/master/lib/shoes/main.rb Yes, I had to subclass AppWindow with Qt::Widget. But only that. Other classes are not subclassed with Qt. So, I could use other code both with Blue Shoes and Green Shoes. But I have no experience to write any apps with Qt. Could you show me good QtRuby tutorials or api references? I'd like to study QtRuby a little more. :) ashbb
On Tue, 2010-10-12 at 23:07 +0900, ashbb wrote: > Hi Peter, Steve et al, > > I'd like to discuss about this point: > > > > - In Blue Shoes all classes are inherited from Qt::xxx, but in > Green Shoes > > > no classes are inherited from GTK::xxx. > > > > Hm, yeah. I _have_ to subclass them with qtruby... > > Look at my first try for Blue Shoes: > http://github.com/ashbb/blue_shoes/blob/master/lib/shoes/main.rb > > Yes, I had to subclass AppWindow with Qt::Widget. > But only that. Other classes are not subclassed with Qt. I believe this (ashbb) is the correct approach. Shoes::Button is not a C ++ subclass of QT::PushButton or Java.Swing.Button (sp?). In an ideal world it would be a subclass of Shoes::BaseWidget or similar name. Might be a good time to make that happen. Shoes::Flow and Shoes::Stack should be subclasses of Shoes::Layout. Just in case there is a need for a new widget or layout that should be added to Shoes. Video widget comes mind. The Ruby code in Shoes::Button (or Canvas or Editbox, ...) has to explicitly call c++ or java or gtk2 'new' and store the pointer/object reference returned in a Shoes structure (layout: flow or stack) and manage the alloc/free issues of the C++ or Java object reference as well as explicitly connect the event/signal/handler from the GUI toolkit to a Shoes/Ruby block in the correct Shoes scope and maps the Shoes arguments/return values into whatever the toolkits use. Once there is two feature complete Shoes of any other color then we have something to unify. > So, I could use other code both with Blue Shoes and Green Shoes. > > But I have no experience to write any apps with Qt. > Could you show me good QtRuby tutorials or api references? > > I'd like to study QtRuby a little more. :) > > ashbb >
> I believe this (ashbb) is the correct approach. Shoes::Button is not a C > ++ subclass of QT::PushButton or Java.Swing.Button (sp?). Yeah, the classes are a bit crazy. For reference: http://shoesrb.com/manual/Classes.html I tried to copy all of this down and get it into Blue Shoes directly.
On Wed, 2010-10-13 at 00:34 -0400, Steve Klabnik wrote: > > I believe this (ashbb) is the correct approach. Shoes::Button is not a C > > ++ subclass of QT::PushButton or Java.Swing.Button (sp?). > > Yeah, the classes are a bit crazy. For reference: > http://shoesrb.com/manual/Classes.html > > I tried to copy all of this down and get it into Blue Shoes directly. I don't know if that belongs in the "Manual" for 'mere' users but it is an important bit of developer documentation. Thank you. The Ruby include/module/mixin does confuse things for simple html presentation. On the other hand the list makes a fine To-Do list for anybody that wants to create the next Shoes. It's pretty clear why Shoes::Widget was an orphan of incomplete good intentions. I believe Widget is on the WalkAbout to-do list so I'm not wildly OT at wondering about what that will be in the Shoes or multi-colors.
On Wed, Oct 13, 2010 at 12:06 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > The Ruby include/module/mixin does confuse things for simple html > presentation. On the other hand the list makes a fine To-Do list for > anybody that wants to create the next Shoes. > > It's pretty clear why Shoes::Widget was an orphan of incomplete good > intentions. I believe Widget is on the WalkAbout to-do list so I'm not > wildly OT at wondering about what that will be in the Shoes or > multi-colors. Yeah, it might be a better idea to either inherit Shoes::Native from Shoes::Widget or at the least inherit them both from a common parent, so that widgets behave as much like first-class citizens as possible. martin
You know, we… really don't have to stick to that spec at all. Just aim for compatibility with existing Shoes apps—but who cares what our specs are? They can be better than that. On Tue, Oct 12, 2010 at 9:34 PM, Steve Klabnik <steve@steveklabnik.com>wrote: > > I believe this (ashbb) is the correct approach. Shoes::Button is not a C > > ++ subclass of QT::PushButton or Java.Swing.Button (sp?). > > Yeah, the classes are a bit crazy. For reference: > http://shoesrb.com/manual/Classes.html > > I tried to copy all of this down and get it into Blue Shoes directly. > -- ~devyn
> You know, we… really don't have to stick to that spec at all. Just aim for > compatibility with existing Shoes apps—but who cares what our specs are? > They can be better than that. This is also true... > I don't know if that belongs in the "Manual" for 'mere' users but it is > an important bit of developer documentation. Thank you. Don't thank me, that's been in the manual for as long as I can remember.
Ashbb, Zak, I'd like to know if you intend on moving forward with GreenShoes. If so, I will continue to build the WhiteShoes Shoes::Gui and begin a trivial integration of Shoes::Gui::Gtk (probably alert and para). I will have questions and it would be great if you wanted to also work on the same code base. Your thoughts? Peter Fitzgibbons (847) 859-9550 Email: peter.fitzgibbons@gmail.com IM GTalk: peter.fitzgibbons IM AOL: peter.fitzgibbons@gmail.com On Wed, Oct 13, 2010 at 8:04 AM, Steve Klabnik <steve@steveklabnik.com>wrote: > > You know, we… really don't have to stick to that spec at all. Just aim > for > > compatibility with existing Shoes apps—but who cares what our specs are? > > They can be better than that. > > This is also true... > > > I don't know if that belongs in the "Manual" for 'mere' users but it is > > an important bit of developer documentation. Thank you. > > Don't thank me, that's been in the manual for as long as I can remember. >
On Wed, Oct 13, 2010 at 10:05 AM, Peter Fitzgibbons < peter.fitzgibbons@gmail.com> wrote: > Ashbb, Zak, > > I'd like to know if you intend on moving forward with GreenShoes. If so, I > will continue to build the WhiteShoes Shoes::Gui and begin a trivial > integration of Shoes::Gui::Gtk (probably alert and para). I will have > questions and it would be great if you wanted to also work on the same code > base. > > While I can't speak for さとし あさかわ せんぱい, I can say that I'm partial to GTK as a Gnome/Ubuntu user; however, I plan on helping with both blue and green as much as I can. We're heading in the right direction with Shoes and I'm very excited about the future of the project, and glad to have everyone on board with what's been going on. The upcoming shoesfest is going to be great as well, and I plan on making some good progress on my shoes 3 app (twittershoes), as well as an entirely new application which will be written from the ground up with the new shoes spec. It will be interesting to work on both applications along with blue and green shoes, and help test each framework out. Let me know if you make any progress on Shoes::Gui::Gtk and I will gladly merge your changes with さとし and my branches. I think there has been some really great progress in green_shoes and hope to see it continue! I don't mind handling all the spec merging and gem packaging if it helps さとし focus on making green_shoes better. Your thoughts? > > Peter Fitzgibbons > (847) 859-9550 > Email: peter.fitzgibbons@gmail.com > IM GTalk: peter.fitzgibbons > IM AOL: peter.fitzgibbons@gmail.com > > > On Wed, Oct 13, 2010 at 8:04 AM, Steve Klabnik <steve@steveklabnik.com>wrote: > >> > You know, we… really don't have to stick to that spec at all. Just aim >> for >> > compatibility with existing Shoes apps—but who cares what our specs are? >> > They can be better than that. >> >> This is also true... >> >> > I don't know if that belongs in the "Manual" for 'mere' users but it is >> > an important bit of developer documentation. Thank you. >> >> Don't thank me, that's been in the manual for as long as I can remember. >> > > -- Zachary Scott http://zacharyscott.net/ http://twitter.com/hasmanytweets
Thanks Zak, Gem and packaging is all yours if you want it! I'll send an update when I get some more work done. Will be working on real work today & tomorrow. Later, Peter Fitzgibbons (847) 859-9550 Email: peter.fitzgibbons@gmail.com IM GTalk: peter.fitzgibbons IM AOL: peter.fitzgibbons@gmail.com On Wed, Oct 13, 2010 at 10:46 AM, Zachary Scott <zachary.s.scott@gmail.com>wrote: > > > On Wed, Oct 13, 2010 at 10:05 AM, Peter Fitzgibbons < > peter.fitzgibbons@gmail.com> wrote: > >> Ashbb, Zak, >> >> I'd like to know if you intend on moving forward with GreenShoes. If so, >> I will continue to build the WhiteShoes Shoes::Gui and begin a trivial >> integration of Shoes::Gui::Gtk (probably alert and para). I will have >> questions and it would be great if you wanted to also work on the same code >> base. >> >> > While I can't speak for さとし あさかわ せんぱい, I can say that I'm partial to GTK as > a Gnome/Ubuntu user; however, I plan on helping with both blue and green as > much as I can. > > We're heading in the right direction with Shoes and I'm very excited about > the future of the project, and glad to have everyone on board with what's > been going on. > > The upcoming shoesfest is going to be great as well, and I plan on making > some good progress on my shoes 3 app (twittershoes), as well as an entirely > new application which will be written from the ground up with the new shoes > spec. It will be interesting to work on both applications along with blue > and green shoes, and help test each framework out. > > Let me know if you make any progress on Shoes::Gui::Gtk and I will gladly > merge your changes with さとし and my branches. I think there has been some > really great progress in green_shoes and hope to see it continue! I don't > mind handling all the spec merging and gem packaging if it helps さとし focus > on making green_shoes better. > > > Your thoughts? >> >> Peter Fitzgibbons >> (847) 859-9550 >> Email: peter.fitzgibbons@gmail.com >> IM GTalk: peter.fitzgibbons >> IM AOL: peter.fitzgibbons@gmail.com >> >> >> On Wed, Oct 13, 2010 at 8:04 AM, Steve Klabnik <steve@steveklabnik.com>wrote: >> >>> > You know, we… really don't have to stick to that spec at all. Just aim >>> for >>> > compatibility with existing Shoes apps―but who cares what our specs >>> are? >>> > They can be better than that. >>> >>> This is also true... >>> >>> > I don't know if that belongs in the "Manual" for 'mere' users but it is >>> > an important bit of developer documentation. Thank you. >>> >>> Don't thank me, that's been in the manual for as long as I can remember. >>> >> >> > > > -- > Zachary Scott > > http://zacharyscott.net/ > http://twitter.com/hasmanytweets >
Hi Peter,
> I'll send an update when I get some more work done.
Any challenge is welcome.
If you'd do something, feel free sending me a pull request.
I'll check it out asap. ;-)
ashbb
Thank you Martin, Cecil, Devyn, Steve for your thoughts on this. A general reply and acknowledgement : Yes, you're on the right path, creating module/class "wrappers" to the platforms is definitely in order. That's what I've done with Shoes::Gui. The idea (more details if you inspect the code) is that "require 'shoes/gui/qt' " will load up qt.rb, which will load subclasses and setup modules to re-open Shoes::Gui and implement all the APIs required by the base Shoes::Gui. This is most easily done with mixins, as far as I know. The implementation detail of each gui-lib is up to the developer of that lib... all that matters is the Shoes::Gui api and compliance to it. Re: base-classes : I hope we can take an agilist attitude toward this codebase and wait to build subclassing/encapsulations until it is necessary/prudent in-the-moment. The most difficult libs that I have used are ones that encapsulate/subclass with nothing in the baseclass. To me that is clearly developing "futureware" and is a code smell. Please read the next message in this thread. Peter Fitzgibbons (847) 859-9550 Email: peter.fitzgibbons@gmail.com IM GTalk: peter.fitzgibbons IM AOL: peter.fitzgibbons@gmail.com On Wed, Oct 13, 2010 at 8:04 AM, Steve Klabnik <steve@steveklabnik.com>wrote: > > You know, we… really don't have to stick to that spec at all. Just aim > for > > compatibility with existing Shoes apps—but who cares what our specs are? > > They can be better than that. > > This is also true... > > > I don't know if that belongs in the "Manual" for 'mere' users but it is > > an important bit of developer documentation. Thank you. > > Don't thank me, that's been in the manual for as long as I can remember. >
> But I have no experience to write any apps with Qt. > Could you show me good QtRuby tutorials or api references? qtruby is basically a straight port of the C++ API. Any class like QApplication just becomes Qt::Application, and any methodOrFunctionName becomes method_or_function_name. So you can pretty much just use the C++ docs: http://doc.trolltech.com/4.7/index.html That said, this is the best qtruby specific tutorial I've found: http://www.darshancomputing.com/qt4-qtruby-tutorial/
Thanks, Steve. Okay, I'm going to walk through them. :) ashbb
Looks good Peter, I'll keep an eye on your fork to try to think about how I could integrate brown_shoes with what you're doing. On Tue, Oct 12, 2010 at 10:07 AM, ashbb <ashbbb@gmail.com> wrote: > Hi Peter, Steve et al, > > I'd like to discuss about this point: > > > > > - In Blue Shoes all classes are inherited from Qt::xxx, but in Green > Shoes > > > no classes are inherited from GTK::xxx. > > > > Hm, yeah. I _have_ to subclass them with qtruby... > > Look at my first try for Blue Shoes: > http://github.com/ashbb/blue_shoes/blob/master/lib/shoes/main.rb > > Yes, I had to subclass AppWindow with Qt::Widget. > But only that. Other classes are not subclassed with Qt. > So, I could use other code both with Blue Shoes and Green Shoes. > > But I have no experience to write any apps with Qt. > Could you show me good QtRuby tutorials or api references? > > I'd like to study QtRuby a little more. :) > > ashbb > >
I have a half-baked plan a.t.m. to begin integrating
green_shoes#{alert,button,para} with Shoes::Gui. I think that will give us
a feel for the eventual API of Shoes::Gui. After Green/Blue, I'll try
merging brown too.
Half Baked
I still have some loadpath/require issues, and also I'm going to start
RSpecing the Shoes::Gui, so we'll see how things progress.
Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com
On Tue, Oct 12, 2010 at 9:14 AM, Scott Werner <stwerner@vt.edu> wrote:
> Looks good Peter, I'll keep an eye on your fork to try to think about how I
> could integrate brown_shoes with what you're doing.
>
>
> On Tue, Oct 12, 2010 at 10:07 AM, ashbb <ashbbb@gmail.com> wrote:
>
>> Hi Peter, Steve et al,
>>
>> I'd like to discuss about this point:
>>
>>
>> > > - In Blue Shoes all classes are inherited from Qt::xxx, but in Green
>> Shoes
>> > > no classes are inherited from GTK::xxx.
>> >
>> > Hm, yeah. I _have_ to subclass them with qtruby...
>>
>> Look at my first try for Blue Shoes:
>> http://github.com/ashbb/blue_shoes/blob/master/lib/shoes/main.rb
>>
>> Yes, I had to subclass AppWindow with Qt::Widget.
>> But only that. Other classes are not subclassed with Qt.
>> So, I could use other code both with Blue Shoes and Green Shoes.
>>
>> But I have no experience to write any apps with Qt.
>> Could you show me good QtRuby tutorials or api references?
>>
>> I'd like to study QtRuby a little more. :)
>>
>> ashbb
>>
>>
>
HI Ash (proper name? plz advise) Well, I included ruby-debug19 in my Gemfile, which Bundler uses to do a dependency-walk and install the required gems. It does a better job at this than 'gem install' in some situations. I think you're going to run into Bundler (and RVM) in a hard way when you start on Rails3 development (unless you're a system/cmdline/desktop developer :). I don't know offhand what the Win equivalents are for Bundler and RVM. Tell us if you have issues with these. Peter Fitzgibbons (847) 859-9550 Email: peter.fitzgibbons@gmail.com IM GTalk: peter.fitzgibbons IM AOL: peter.fitzgibbons@gmail.com On Mon, Oct 11, 2010 at 4:01 AM, ashbb <ashbbb@gmail.com> wrote: > Hi Peter, > > > > I have been working with Steve Klabnik on QT Shoes and > > modularizing the shoes-core and shoes-gui. > Wow, cool! Let's enjoy colorful Shoes. :) > > I downloaded your blue_shoes from > http://github.com/pjfitzgibbons/blue_shoes/tree/feature/white_shoes_gui > > Then I ran blue_shoes/samples/shoes-man-hello.rb. But unfortunately I got > the following error: > > C:/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.0.2/lib/bundler/spec_set.rb:87: > in `block in materialize': Could not find diff-lcs-1.1.2 in any of > the sources (Bundler::GemNotFound) > > > Umm,... sorry there must be something wrong in my Windows 7 environment. > But I couldn't find a reason. I've never used bundler. :-P > > BTW. > I walked through blue_shoes/lib/blue_shoes/gui/qt/*.rb a little. Then I > noticed a big difference between Blue Shoes and Green Shoes. > > - In Blue Shoes all classes are inherited from Qt::xxx, but in Green Shoes > no classes are inherited from GTK::xxx. > > I don't think it's a problem, but a big difference of approach. > I'm not sure which is better. Because we are just getting started. ;-) > > ashbb > >
> I don't know offhand what the Win equivalents are for Bundler > and RVM. Bunlder should still work on windows, right? I see a 'windows' tag on their Issues tracker...
Yes, and since rubygems.org offers cross-platform gems to decide for you based on the platform you're using: So if you're on windows and there's a mswin-32 gem available for the gem you're trying to get, it will send you that one. Also, there is pik for managing versions of ruby on windows: http://github.com/vertiginous/pik On Mon, Oct 11, 2010 at 11:31 AM, Steve Klabnik <steve@steveklabnik.com>wrote: > > I don't know offhand what the Win equivalents are for Bundler > > and RVM. > > Bunlder should still work on windows, right? I see a 'windows' tag on > their Issues tracker... > -- Zachary Scott http://zacharyscott.net/ http://twitter.com/hasmanytweets
> Then I ran blue_shoes/samples/shoes-man-hello.rb. But unfortunately I got > the following error: Zack, you have any thoughts on this? Does this need to be included as a dependency in the gemspec somewhere, or should it be in the Gemfile? > - In Blue Shoes all classes are inherited from Qt::xxx, but in Green Shoes > no classes are inherited from GTK::xxx. Hm, yeah. I _have_ to subclass them with qtruby...
On Mon, Oct 11, 2010 at 8:58 AM, Steve Klabnik <steve@steveklabnik.com>wrote: > > Then I ran blue_shoes/samples/shoes-man-hello.rb. But unfortunately I got > > the following error: > > Zack, you have any thoughts on this? Does this need to be included as > a dependency in the gemspec somewhere, or should it be in the Gemfile? > > We prolly should add it to the gemspec since it's being used all over the place. It's suggested to only use core dependencies that are used throughout the entire project in the gemspec, and anything specific like rspec, goes in the Gemfile. I just briefly looked over peter's commits and it looks great!! Definitely, keep up the good work! :) -- Zachary Scott > > - In Blue Shoes all classes are inherited from Qt::xxx, but in Green > Shoes > > no classes are inherited from GTK::xxx. > > Hm, yeah. I _have_ to subclass them with qtruby...