Hey Guys, This just came over the rubytalk list. Does anybody have any Debian experience? BTW, one thing this project *really* could use is people to package wxruby for <your distro here>. You don''t need SWIG/C++ experience for it, and a little work could help a lot of people. Nick -------- Original Message -------- Subject: Re: Help a newbie pick a gui tool kit Date: Sun, 13 Mar 2005 22:27:32 +0900 From: Tom Willis <tom.willis@gmail.com> Reply-To: ruby-talk@ruby-lang.org To: ruby-talk@ruby-lang.org (ruby-talk ML) References: <4232F7DA.1060804@freenet.de> <b54d04890503120621144babd0@mail.gmail.com> <4233DF34.7000201@nicreations.com> On Sun, 13 Mar 2005 15:38:37 +0900, Nick <devel@nicreations.com> wrote:> > Unforunately I can''t get it installed quickly to come up with a more > > informed critique. > > Why does Debian hate ruby? :( > > What problems did you have building it? > > Nick > > > Tom Willis wrote: > > On Sat, 12 Mar 2005 22:07:28 +0900, Enrico Schwass <deckard73@freenet.de> wrote: > > > >>Hello > >> > >> >So I am still learning Ruby. I am also learning C. I just did > >> >Conways Game of Life in C. I showed my wife and she wasn''t impressed. > >> > > >> >I then decided to do it again in Ruby. I was thinking I could use a > >> >GUI toolkit to make it better looking. > >> > > >> >I am looking at them they don''t seem ruby-ish. Or perhaps I don''t > >> >know what I am talking about:) > >> > > >> >What is the best one for a newbie to get a handle on? > >> > >>I suggest the tk-library. The bindings are already included. (ext/tk) > >>Look at www.scriptics.com or www.tcltk.com > >>Its cross platform and there is a lot of documentation available. > >> > >>ciao > >>Enno > >> > >> > > > > > > I like the wxWindows toolkit at least in Python. Haven''t tried it in > > ruby yet, but here''s a link. > > > > http://wxruby.rubyforge.org/wiki/wiki.pl > > > > A brief look at the examples and it looks like the bindings look a lot > > more rubyish. Pythons bindings made me feel like I was interfacing to > > an external library rather than writing in the language manipulating > > objects etc. > > > > > > Unforunately I can''t get it installed quickly to come up with a more > > informed critique. > > Why does Debian hate ruby? :( > >well it seemed I didn''t have the development libs for wxWindows. I was getting an error that wx-config command not found. I also didn''t have the ruby dev libs. So I got it to build. But I was hoping for a *.deb to be out there somewhere. -- Thomas G. Willis http://paperbackmusic.net
Jani Monoses
2005-Mar-14 07:24 UTC
[Wxruby-users] Re: [Fwd: Re: Help a newbie pick a gui tool kit]
I meant to package it but wanted to wait till wxruby-swig matures. If you think that the stable wxruby with wx2.4 (and GTK1 on debian) is OK I could try again. I also wanted to wait while you decide on the naming so that there are no confusions down the line with two wxrubys in debian(actually ubuntu) with wxruby-swig the porblem is that wx2.5 is compiled with unicode support in debian so they do not go well together (subject of a mail a couple of weeks ago) So let me know which combination of wxruby/wx/gtk versions you would prefer to have exposure at this time and I will try to help. Jani
Joao Pedrosa
2005-Mar-14 07:38 UTC
[Wxruby-users] Re: [Fwd: Re: Help a newbie pick a gui tool kit]
Hi, On Mon, 14 Mar 2005 14:30:53 +0200, Jani Monoses <jani@iv.ro> wrote:> I meant to package it but wanted to wait till wxruby-swig matures. > If you think that the stable wxruby with wx2.4 (and GTK1 on debian) is OK I could try > again. I also wanted to wait while you decide on the naming so that there are no > confusions down the line with two wxrubys in debian(actually ubuntu) > with wxruby-swig the porblem is that wx2.5 is compiled with unicode support in debian so > they do not go well together (subject of a mail a couple of weeks ago) > So let me know which combination of wxruby/wx/gtk versions you would prefer to have > exposure at this time and I will try to help.Does anyone use wxRuby with GTK2 yet? :-) Cheers, Joao
Nick
2005-Mar-14 23:51 UTC
[Wxruby-users] Re: [Fwd: Re: Help a newbie pick a gui tool kit]
I think the wxGTK GTK2 support is a 2.5.x branch feature. Is this true? Nick Joao Pedrosa wrote:> Hi, > > On Mon, 14 Mar 2005 14:30:53 +0200, Jani Monoses <jani@iv.ro> wrote: > >>I meant to package it but wanted to wait till wxruby-swig matures. >>If you think that the stable wxruby with wx2.4 (and GTK1 on debian) is OK I could try >>again. I also wanted to wait while you decide on the naming so that there are no >>confusions down the line with two wxrubys in debian(actually ubuntu) >>with wxruby-swig the porblem is that wx2.5 is compiled with unicode support in debian so >>they do not go well together (subject of a mail a couple of weeks ago) >>So let me know which combination of wxruby/wx/gtk versions you would prefer to have >>exposure at this time and I will try to help. > > > Does anyone use wxRuby with GTK2 yet? :-) > > Cheers, > Joao > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
Nick
2005-Mar-14 23:56 UTC
[Wxruby-users] Re: [Fwd: Re: Help a newbie pick a gui tool kit]
> If you think that the stable wxruby with wx2.4 (and GTK1 on debian) is> OK I could try again. I also wanted to wait while you decide on the > naming so that there are no confusions down the line with two wxrubys in > debian(actually ubuntu) You''re right. Work has been really busy, so my progress has slowed, but I want to do a release of wxruby-2.4 fairly soon with some of the recent bug fixes. If possible, I''d like a ubuntu package. Can I coordinate with you for that? > with wxruby-swig the porblem is that wx2.5 is compiled with unicode > support in debian so they do not go well together (subject of a mail a > couple of weeks ago) Uuuugggh. Well, I guess my question is "how does one pass ANSI arrays to wxString in Unicode mode?". If you can find an answer, I''ll implement it in wxruby-2.5 Nick Jani Monoses wrote:> I meant to package it but wanted to wait till wxruby-swig matures. > If you think that the stable wxruby with wx2.4 (and GTK1 on debian) is > OK I could try again. I also wanted to wait while you decide on the > naming so that there are no confusions down the line with two wxrubys in > debian(actually ubuntu) > with wxruby-swig the porblem is that wx2.5 is compiled with unicode > support in debian so they do not go well together (subject of a mail a > couple of weeks ago) > So let me know which combination of wxruby/wx/gtk versions you would > prefer to have exposure at this time and I will try to help. > > Jani > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
Joao Pedrosa
2005-Mar-15 00:10 UTC
[Wxruby-users] Re: [Fwd: Re: Help a newbie pick a gui tool kit]
Hi, On Mon, 14 Mar 2005 22:58:12 -0600, Nick <devel@nicreations.com> wrote:> > > If you think that the stable wxruby with wx2.4 (and GTK1 on debian) is > > OK I could try again. I also wanted to wait while you decide on the > > naming so that there are no confusions down the line with two wxrubys in > > debian(actually ubuntu) > > You''re right. Work has been really busy, so my progress has slowed, but > I want to do a release of wxruby-2.4 fairly soon with some of the recent > bug fixes. If possible, I''d like a ubuntu package. Can I coordinate with > you for that?This would be awesome. I want to use wxRuby a little bit, at least to get a grasp of it. My first try in installing it didn''t go very well but I suspect I shouldn''t have tried to use GTK2 in the first place. My main dev machine is Ubuntu, but I all my Ruby code should work on Windows also. For GUI I use Ruby-GTK2 from the Ruby-GNOME2 project, but I want native widgets on Windows as well, and wxRuby would fit this role. I guess I should give wxRuby another try. Thanks, Joao
Jani Monoses
2005-Mar-15 03:18 UTC
[Wxruby-users] Re: [Fwd: Re: Help a newbie pick a gui tool kit]
> You''re right. Work has been really busy, so my progress has slowed, but > I want to do a release of wxruby-2.4 fairly soon with some of the recent > bug fixes. If possible, I''d like a ubuntu package. Can I coordinate with > you for that?Sure, that will be 0.7 right?> > > with wxruby-swig the porblem is that wx2.5 is compiled with unicode > > support in debian so they do not go well together (subject of a mail a > > couple of weeks ago) > > Uuuugggh. Well, I guess my question is "how does one pass ANSI arrays to > wxString in Unicode mode?". If you can find an answer, I''ll implement it > in wxruby-2.5Sorry, I''m pretty new to ruby and have never used wxWidgets :) I wanted to try them out together then thought I should make a package seeing how hard it is to get it installed esp. on debian compared to other ruby toolkits. So when you release the next I''ll package it, and I''ll follow CVS till then. Jani
Kevin Smith
2005-Mar-15 08:01 UTC
[Wxruby-users] Re: [Fwd: Re: Help a newbie pick a gui tool kit]
Nick wrote:> Uuuugggh. Well, I guess my question is "how does one pass ANSI arrays to > wxString in Unicode mode?". If you can find an answer, I''ll implement it > in wxruby-2.5I''m no expert. Here''s a starting point: http://wxwidgets.org/manuals/2.4.2/wx458.htm#unicode This is for wxWindows 2.4, but probably is the same (or similar) with wxWidgets 2.5. Internally, wx uses wide characters for all strings (like Java does). As that page points out, external libraries often use ANSI strings, or in the case of GTK 2, UTF-8. That''s where the wxMBConv classes come in: http://wxwidgets.org/manuals/2.4.2/wx459.htm#mbconvclasses This would probably be easiest if we think about the actual situations that wxRuby needs to handle: 1. Ruby code passes a string to wx, as in set_text(s) 2. wx code returns a string to Ruby, as in get_text() ...that''s it, right? If so, #1 should work if we immediately construct a wxString from the passed Ruby string, and forward that to wx. #2 should do the opposite, converting the wxString that wx gave us by calling something like str.mb_str(wxConvLocal). All of that can be surrounded by #if wxUSE_UNICODE to avoid creating problems for non-unicode wx builds. BUT we might want to think about it further and discuss it more. When a user passes an 8-bit string in from Ruby, should we always assume it is encoded using some 8-bit scheme (8859-1, KOI-8, 1252)? How do we know which encoding is being used? How can we support Ruby UTF-8 strings--will we need multiple variants of each method, like set_text_utf8, set_text_8bit, set_text_ucs16, etc? We should look at how other libraries such as FXRuby and wxPython have addressed this issue. Kevin
Nick
2005-Mar-16 00:00 UTC
[Wxruby-users] Re: [Fwd: Re: Help a newbie pick a gui tool kit]
> BUT we might want to think about it further and discuss it more. When a> user passes an 8-bit string in from Ruby, should we always assume it is > encoded using some 8-bit scheme (8859-1, KOI-8, 1252)? How do we know > which encoding is being used? How can we support Ruby UTF-8 > strings--will we need multiple variants of each method, like > set_text_utf8, set_text_8bit, set_text_ucs16, etc? I''ll be the first to admit I''m out of my league in this area. It looks like the KCODE built in variable is the string encoding. To get started, we may need to start with ANSI to Unicode conversion, and go from there. Nick Kevin Smith wrote:> Nick wrote: > >> Uuuugggh. Well, I guess my question is "how does one pass ANSI arrays >> to wxString in Unicode mode?". If you can find an answer, I''ll >> implement it in wxruby-2.5 > > > I''m no expert. Here''s a starting point: > http://wxwidgets.org/manuals/2.4.2/wx458.htm#unicode > > This is for wxWindows 2.4, but probably is the same (or similar) with > wxWidgets 2.5. Internally, wx uses wide characters for all strings (like > Java does). As that page points out, external libraries often use ANSI > strings, or in the case of GTK 2, UTF-8. > > That''s where the wxMBConv classes come in: > http://wxwidgets.org/manuals/2.4.2/wx459.htm#mbconvclasses > > This would probably be easiest if we think about the actual situations > that wxRuby needs to handle: > > 1. Ruby code passes a string to wx, as in set_text(s) > 2. wx code returns a string to Ruby, as in get_text() > > ...that''s it, right? > > If so, #1 should work if we immediately construct a wxString from the > passed Ruby string, and forward that to wx. #2 should do the opposite, > converting the wxString that wx gave us by calling something like > str.mb_str(wxConvLocal). > > All of that can be surrounded by #if wxUSE_UNICODE to avoid creating > problems for non-unicode wx builds. > > BUT we might want to think about it further and discuss it more. When a > user passes an 8-bit string in from Ruby, should we always assume it is > encoded using some 8-bit scheme (8859-1, KOI-8, 1252)? How do we know > which encoding is being used? How can we support Ruby UTF-8 > strings--will we need multiple variants of each method, like > set_text_utf8, set_text_8bit, set_text_ucs16, etc? > > We should look at how other libraries such as FXRuby and wxPython have > addressed this issue. > > Kevin > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > >
Kevin Smith
2005-Mar-16 08:04 UTC
[Wxruby-users] Unicode support (was: Help a newbie pick a gui tool kit)
Nick wrote:> > I''ll be the first to admit I''m out of my league in this area. It looks > like the KCODE built in variable is the string encoding. To get started, > we may need to start with ANSI to Unicode conversion, and go from there.You''re probably right. I am still curious how the other ruby libraries have handled this issue, but for now I would propose the following three-phase approach: 1. All calls passing strings either way would (for now) assume whatever encoding is specified by KCODE, and would automatically convert all strings to or from that encoding. At this point, we would be internationalized, and if we stopped here, it would still be releasable. 2. Create our own wxruby-specific global and use that instead of KCODE. That would allow apps to use different encodings on the fly (but only one at a time). 3. Add additional parameters or methods (to be decided later) that would allow the encoding to be specified for each individual call. One other thing: Should we expose the wx conversion routines? Or does Ruby already have convenient calls to convert between UTF-8 and 8859-1, or between UCS-16 and KOI-8? Kevin
(replying to myself...see below) Kevin Smith wrote:> Nick wrote: > >> >> I''ll be the first to admit I''m out of my league in this area. It looks >> like the KCODE built in variable is the string encoding. To get >> started, we may need to start with ANSI to Unicode conversion, and go >> from there. > > > You''re probably right. I am still curious how the other ruby libraries > have handled this issue, but for now I would propose the following > three-phase approach: > > 1. All calls passing strings either way would (for now) assume whatever > encoding is specified by KCODE, and would automatically convert all > strings to or from that encoding. At this point, we would be > internationalized, and if we stopped here, it would still be releasable.Ugh. I just now looked at the definition of KCODE, and I think we should skip step 1 and go directly to step 2 (below). KCODE seems to only have a single value to represent ALL 8-bit encodings, and that''s not good enough for us. We need to know whether it''s 8859-1 or 8859-7, in order to create the proper corresponding unicode string. We should use KCODE to initialize our variable if it is one of the non-8-bit options. Otherwise, fall back to 8859-1 as a default, I suppose.> > 2. Create our own wxruby-specific global and use that instead of KCODE. > That would allow apps to use different encodings on the fly (but only > one at a time). > > 3. Add additional parameters or methods (to be decided later) that would > allow the encoding to be specified for each individual call. > > One other thing: Should we expose the wx conversion routines? Or does > Ruby already have convenient calls to convert between UTF-8 and 8859-1, > or between UCS-16 and KOI-8? > > KevinKevin
Alan Chen
2005-Mar-21 22:04 UTC
[Wxruby-users] Re: [Fwd: Re: Help a newbie pick a gui tool kit]
On my Linux system, I''ve built wxWindows 2.4.2 with an --enable-gtk2 configuration and my rudimentary check seems to work OK. I didn''t explicitly enable the unicode flag though... - alan On Mon, Mar 14, 2005 at 10:53:10PM -0600, Nick wrote:> > I think the wxGTK GTK2 support is a 2.5.x branch feature. Is this true? > > Nick > > Joao Pedrosa wrote: > >Hi, > > > >On Mon, 14 Mar 2005 14:30:53 +0200, Jani Monoses <jani@iv.ro> wrote: > > > >>I meant to package it but wanted to wait till wxruby-swig matures. > >>If you think that the stable wxruby with wx2.4 (and GTK1 on debian) is OK > >>I could try > >>again. I also wanted to wait while you decide on the naming so that there > >>are no > >>confusions down the line with two wxrubys in debian(actually ubuntu) > >>with wxruby-swig the porblem is that wx2.5 is compiled with unicode > >>support in debian so > >>they do not go well together (subject of a mail a couple of weeks ago) > >>So let me know which combination of wxruby/wx/gtk versions you would > >>prefer to have > >>exposure at this time and I will try to help. > > > > > >Does anyone use wxRuby with GTK2 yet? :-) > > > >Cheers, > >Joao > >_______________________________________________ > >wxruby-users mailing list > >wxruby-users@rubyforge.org > >http://rubyforge.org/mailman/listinfo/wxruby-users > > > > > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users > > > ** CRM114 Whitelisted by: rubyforge.org ** > > ** ACCEPT: CRM114 Whitelisted by: rubyforge.org ** >-- Alan Chen Digikata Computing http://digikata.com