GUI and serial communications

I was told about the Ruby language, and have been doing some homework on
it. So far I’m impressed with its OO design and other high level
features. Two things I will need (and have not found so far) is an easy
to use GUI (the app will have a GUI), and an RS-232 communications
library. The intended OS is Windows for now, but Linux and Mac are
being looked at.

Thanks for your help.

Dave,

I was told about the Ruby language, and have been doing some homework on
it. So far I’m impressed with its OO design and other high level
features. Two things I will need (and have not found so far) is an easy
to use GUI (the app will have a GUI), and an RS-232 communications
library. The intended OS is Windows for now, but Linux and Mac are
being looked at.

FXRuby is one option for GUI. I’m sure Lyle will jump on here if he’s around
and fill in the details. I’ve only started using it myself, so can’t say
much from personal experience, but it seems to have a good rep around here.

Chris

GUI:
we’ve plenty of gui, I think fxruby is the most used (and it’s very
portable )

SERIAL:
from raa.ruby-lang.org

http://raa.ruby-lang.org/list.rhtml?name=ruby-serialport

Ruby/SerialPort: Ruby/SerialPort is a Ruby library that provides a
class for using RS-232 serial ports.

this could help ? :wink:

···

il Fri, 21 Feb 2003 19:17:58 GMT, Dave Boland dboland9@tds.net ha scritto::

I was told about the Ruby language, and have been doing some homework on
it. So far I’m impressed with its OO design and other high level
features. Two things I will need (and have not found so far) is an easy
to use GUI (the app will have a GUI), and an RS-232 communications
library. The intended OS is Windows for now, but Linux and Mac are
being looked at.

Thanks for your help.

Dave,

  1. I am partial for Ruby-GNOME2. Gtk+2 is a great, cross-platform
    toolkit. The Ruby bindings are still under development, so I’m not sure
    how they work under Windows. But development is moving fast.

http://ruby-gnome2.sourceforge.net/

  1. Some people like FXRuby. I don’t particularly like it (for instance,
    it doesn’t look native), but a lot of people do, so you should consider it.
  1. Of course, there is good-all Tk (again, it doesn’t look native) (comes
    with Ruby):

http://www.rubycentral.com/book/ext_tk.html
http://httpd.chello.nl/k.vangelder/ruby/learntk/

  1. There is FLTK/Ruby:

http://ruby-fltk.sourceforge.net/

  1. For Windows-only GUIs, there is the Win32API (comes with Ruby):

http://www.rubycentral.com/book/lib_windows.html

  1. For Mac-only GUIs there is RubyCocoa:

http://www.imasy.or.jp/~hisa/mac/rubycocoa/index.en.html

There’s a RubyQt but it’s alpha. I hope that one of these suits your
needs.

···

On Sat, Feb 22, 2003 at 04:23:25AM +0900, Dave Boland wrote:

I was told about the Ruby language, and have been doing some homework on
it. So far I’m impressed with its OO design and other high level
features. Two things I will need (and have not found so far) is an easy
to use GUI (the app will have a GUI), and an RS-232 communications
library. The intended OS is Windows for now, but Linux and Mac are
being looked at.


Daniel Carrera
Graduate Teaching Assistant. Math Dept.
University of Maryland. (301) 405-5137

Thanks Chris, Gabriele, and Daniel - I appreciate the information and will
check it out!

Dave,

Dave Boland wrote:

···

I was told about the Ruby language, and have been doing some homework on
it. So far I’m impressed with its OO design and other high level
features. Two things I will need (and have not found so far) is an easy
to use GUI (the app will have a GUI), and an RS-232 communications
library. The intended OS is Windows for now, but Linux and Mac are
being looked at.

Thanks for your help.

Dave,

“Daniel Carrera” dcarrera@math.umd.edu wrote in message
news:20030221205805.GB2704@math.umd.edu…

  1. I am partial for Ruby-GNOME2. Gtk+2 is a great, cross-platform
    toolkit. The Ruby bindings are still under development, so I’m not sure
    how they work under Windows. But development is moving fast.

I haven’t looked at the Gnome2 side of Gtk2, but I did take a brief look at
some Gtk2 application under Windows - actually it was a GUI designer, so the
app should now how to make GUI’s. While it definitely worked, it was far
from native looking in Windows and it was rather slow painting the controls.
Various people have pointed out, in this forum, that GTK2 works much better
on windows than GTK 1.x. This may be, but to me doesn’t appear to be a
serious option at this point in time - not on Windows.

  1. Some people like FXRuby. I don’t particularly like it (for instance,
    it doesn’t look native), but a lot of people do, so you should consider
    it.

I’m anxiously awaiting a more Ruby Way approach in FXRuby but that is a
luxus problem. Fox looks pretty native in Windows. I can’t say how it works
on Linux, but most Linux GUI’s tend to gravitate towards Windows style
anyway. Fox may have a few rough edges, but is good enough to blend into the
Windows enviroment. Microsoft has recenlty released so many products with
different GUI styles, that no-one would take notice. Fox has a few drawing
problems, but it is being actively developed. Finally, FxRuby has a large
range of demo applications. Most other GUI toolkits have a few poor
screenshots.
Fox has bidirectional connections making it relatively easy to keep GUI
components in sync and to handle the event flows. Some really don’t like
this approach, but I do.

  1. Of course, there is good-all Tk (again, it doesn’t look native) (comes
    with Ruby):

TK is good for making GUI’s than run everywhere, but it doesn’t look it and
isn’t comfortable to the end user - at least not on windows. It gets the job
done, nothing more.

  1. There is FLTK/Ruby:

I recently looked into this. I’m not sure it is ready for prime time, but it
appears to have improved significantly and you can make decent applications
in Windows - I don’t know about the Ruby bindings. FLTK is optionally based
on OpenGL which may end up being the future of GUI toolkits a few years from
now. FLTK is planning multiple themes, which should make it possible to get
a more native look on different platforms. If I remember correctly, FLTK is
not a bad choice for internation applications - Fox is not mature yet.

Note on OpenGL GUI’s: most GUI’s burn all the CPU in the main loop. I think
FLTK is one of the few that does it properly, but I didn’t get that far into
it. OpenGL has a built in weakness for 2D graphics: every pixel operation is
guaranteed not to overlap with previous operation as this could jam
transparency buffers. Therefore some drawings may look slightly ugly at the
edges (according to a major OpenGL book). This may suggest the GUI’s are
better not generated in OpenGL and should embed OpenGL instead (like Fox
does).

  1. For Windows-only GUIs, there is the Win32API (comes with Ruby):

Hmmm… Life is too short.

There’s a RubyQt but it’s alpha. I hope that one of these suits your
needs.

I haven’t had a closer look at Qt, but for commecial cross-platform
applications this is probably the way to go - but Ruby support may be
lacking. Of course, one might build the Ruby support while building the
application - this is the best way to ensure a high quality GUI framework.

There’s also WxWindows but not yet any Ruby bindings. It is supposedly very
good, but also very large. The C++ code reminds me too much of MFC - and I’d
rather not go down that path again.

If the language is Ruby, I’d say FxRuby is by far the best choice available
today - but it can’t say how nice it looks on Linux, and I’m not sure it’s
quite working on Mac yet.

I have frequently noticed that people say this or that GUI is great. But
most fail on non-standard keyboard bindings, unacceptable screen updates,
strange looking buttons or unacceptable CPU usage. The situation is
improving.

Mikkel

···

On Sat, Feb 22, 2003 at 04:23:25AM +0900, Dave Boland wrote:

I haven’t looked at the Gnome2 side of Gtk2, but I did take a brief look at
some Gtk2 application under Windows - actually it was a GUI designer, so the
app should now how to make GUI’s. While it definitely worked, it was far
from native looking in Windows and it was rather slow painting the controls.
Various people have pointed out, in this forum, that GTK2 works much better
on windows than GTK 1.x. This may be, but to me doesn’t appear to be a
serious option at this point in time - not on Windows.

Fair enough. I didn’t know that it was slow under Windows.

  1. Some people like FXRuby. I don’t particularly like it (for instance,
    it doesn’t look native), but a lot of people do, so you should consider
    it.

I’m anxiously awaiting a more Ruby Way approach in FXRuby but that is a
luxus problem. Fox looks pretty native in Windows. I can’t say how it works
on Linux, but most Linux GUI’s tend to gravitate towards Windows style
anyway.

What? No they don’t. Qt and Gtk do not look like Windows at all.
I’ve seen some themes that resemble Linux, and they look quite different.
But they look akward (IMHO).

I’ve seen Fox under Windows. I guess it might be native enough. If I
recall correctly, the open-file dialog is different.

<personal_opition flames=0>
IMHO Fox looks ugly under Linux. It most definitelly does not resemble
either Qt or Gtk, it does not look native and the difference is very
conspicuous.

Fox might be fine for Windows, but I don’t like it on Linux.
</presonal_opinion>

Sigh, perhaps we’ll get wxRuby going some day. That would be great.

  1. Of course, there is good-all Tk (again, it doesn’t look native) (comes
    with Ruby):

TK is good for making GUI’s than run everywhere, but it doesn’t look it and
isn’t comfortable to the end user - at least not on windows. It gets the job
done, nothing more.

Yeah. In included it only for completeness. I looks ugly under Linux
too.

FLTK is planning multiple themes, which should make it possible to get
a more native look on different platforms.

Perhaps we can get Gtk+2 under Windows with a Windows theme? So it’ll
look better. It’ll still be slow though. I don’t know what can be done
about that.

If I remember correctly, FLTK is
not a bad choice for internation applications - Fox is not mature yet.

That’s interesting. I didn’t know that.

There’s also WxWindows but not yet any Ruby bindings. It is supposedly very
good, but also very large. The C++ code reminds me too much of MFC - and I’d
rather not go down that path again.

I didn’t know it was large. Is it slow?

If the language is Ruby, I’d say FxRuby is by far the best choice available
today - but it can’t say how nice it looks on Linux, and I’m not sure it’s
quite working on Mac yet.

I’ve seen Gtk+ under Windows. I think that Gtk+ looks better under
Windows that Fox does under Linux. I also think that Gtk+ and Fox both
probably look bad under Mac. Sigh.

Daniel Carrera
Graduate Teaching Assistant. Math Dept.
University of Maryland. (301) 405-5137

···

On Sat, Feb 22, 2003 at 07:04:21AM +0900, MikkelFJ wrote: