Does Ruby generate WINDOWS and dialog boxes?

I just heard about Ruby and it looks fascinating. I see lots of code being
discussed but I see no mention of the actual windows and input/output
boxes/windows which it may or may not produce.

Does it make windows?

···

--

*************
http://www.sticksite.com/ Ken Laninga

Ken Laninga wrote:

I just heard about Ruby and it looks fascinating. I see lots of code being
discussed but I see no mention of the actual windows and input/output
boxes/windows which it may or may not produce.

Does it make windows?

Oi, this might get bloody.

Firstly, not all programming involves graphical user interfaces (windows
/ dialogs; I'll just use GUI onwards).

But, here goes. For Ruby (and most anything that isn't Visual Basic),
GUI is a thing that is handled in a library. (Mostly because Ruby aims
to be a crossplatform language, and trying to handle GUIs crossplatform
is finicky and would probably end in tragedy if tried.)

As far as I'm aware, Ruby doesn't include a GUI library in the standard
library.

However, such libraries are available. I'll audaciously presume your
background to be Windows. In this case, you can either do raw Win32 API
callouts (even if it might be slightly maddening.), which is part of the
standard Windows distribution.

Also, if you're using the One Click Installer (which you should, since
it's by far the Path Least Annoying), you will get both VisualuRuby (a
Windows-only higher-level wrapper around the GUI calls, aims to look
VB-like from the programming point of view in the vruby variant), and
FOX (a synthethic crossplatform toolkit with probably more bells and
whistles than VisualuRuby, but you have to bear with what I consider
ugly-looking results - YMMV).

If those don't work for you, there's always Gtk, so far the only GUI
library I can recall that comes with prebuilt Windows bindings mature
enough I would consider usable outside personal code. Gtk visual quality
and native veracity has improved from a sorry status recently, but is
still lacking in a few areas if you have pet peeves. (Like I do,
specifically non-native file choosers.) I do have hopes for the
wxWidgets binding maturing, and a prebuilt Qt4 one appearing though,
those two toolkits are the ones I prefer - wx for nigh-on-perfect native
veracity, Qt4 for Designer, Linguist, Assistant, and the whole shebang,
and the API style. (Which is very friendly to metaprogramming.) I
currently use the latter from its Python binding (both wx and Qt4 have
well-maintained and uptodate Python bindings), so if you want to get
something done, as opposed to poking around specifically Ruby, you might
try The Other Language.

David Vallner

Ken Laninga wrote:

I just heard about Ruby and it looks fascinating. I see lots of code being
discussed but I see no mention of the actual windows and input/output
boxes/windows which it may or may not produce.

Does it make windows?

--

*************
http://www.sticksite.com/ Ken Laninga

I'm planning to implement desk-top applications the same way I'm
implementing websites: use Ruby on Rails. That gives me essentially
one cross-platform application environment. Is there something wrong
with that plan?

···

---
Richard

David Vallner wrote:
...

As far as I'm aware, Ruby doesn't include a GUI library in the standard
library.

Tk is in the standard library. Don't laugh, it can be useful! :slight_smile:

I'm using the Tk canvas for some easy-to-set-up animations that don't really need opengl.

···

--
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Richard wrote:

Ken Laninga wrote:

I just heard about Ruby and it looks fascinating. I see lots of code being
discussed but I see no mention of the actual windows and input/output
boxes/windows which it may or may not produce.

Does it make windows?

--

*************
http://www.sticksite.com/ Ken Laninga

I'm planning to implement desk-top applications the same way I'm
implementing websites: use Ruby on Rails. That gives me essentially
one cross-platform application environment. Is there something wrong
with that plan?
---
Richard

How would that be a desktop application?

Or, in slightly other words, do you have an architecture to go with that
plan?

David Vallner

Joel VanderWerf wrote:

David Vallner wrote:
...

As far as I'm aware, Ruby doesn't include a GUI library in the standard
library.

Tk is in the standard library. Don't laugh, it can be useful! :slight_smile:

Wooer. I subconsciously ignore Tk by now. Go me. Or something.
/me puts on a dunce hat.

David Vallner

Joel VanderWerf wrote:

David Vallner wrote:
...

As far as I'm aware, Ruby doesn't include a GUI library in the standard
library.

Tk is in the standard library. Don't laugh, it can be useful! :slight_smile:

I'm using the Tk canvas for some easy-to-set-up animations that don't
really need opengl.

Tk is wonderful! It's really simple to manipulate widgets and graphics
in the way you'd expect. IMHO, Tk is the Ruby of GUI toolkits.

I don't know why people hate it so much. They seem to prefer "desktop
integration" and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

···

--
Posted via http://www.ruby-forum.com/\.

David Vallner wrote:

How would that be a desktop application?

To us programmers it would be a web app with a local server, but to
the user it would be indistinguishable from, say, an application built
with Visual C++ and Microsoft Foundation Classes running on a Windows
OS.

Does that make sense to you?

···

---
Richard

Quoting Suraj Kurapati <snk@gna.org>:

Tk is wonderful! It's really simple to manipulate widgets and graphics
in the way you'd expect. IMHO, Tk is the Ruby of GUI toolkits.

I don't know why people hate it so much. They seem to prefer "desktop
integration" and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

I don't actually *hate* Tk -- I just never learned how to use it, and I think
its widgets are ugly relative to, say, Qt. Now Tcl, on the other hand -- that I
*do* hate. :slight_smile: It was the first scripting language, but I find Tcl code
virtually unreadable.

Suraj Kurapati wrote:

I don't know why people hate it so much. They seem to prefer "desktop
integration" and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

Some of us have to "sell" software, at least to managers - then it matters.

[Hide the women, children and livestock. This just got bloody as I
predicted.]

Also, you're missing the point. It's a GUI, noone really gives a damn if
the programmer had an easier time coding it if there's hundreds of users
that will feel constantly alienated by it because of some detail the
programmer didn't feel like bothering with.

User interface design isn't the same as programming a user interface.
Programmers, especially the lazy sort, tend to suck, suck-oh-so-horribly
at user interface design. Approaching user interface design with a
programmer's mindset can only end in pain, tragedy, and Tk.

Also, you're confusing internal UI consistency, and external UI
consistency. Internal UI consistency is when the features of the UI fit
together to make working with the software alone productive (your clean
and functional).

External consistency is when the UI incorporates features that make
working with that software in connection with other software on the
computer productive. This means panels will scroll when the mouse is
over them and won't require clicking on the buttons. This means that the
file chooser, on XP, will have a "My Documents" button as the third one
in a button sidepanel on the left. (I can't describe the rage I feel
when a toolkit opens a file chooser that doesn't even try to look alike
and leaves me flailing about trying to find my way back home.) I've seen
Tk interfaces fail at all the above when they're capabilities the damn
system below them gets right out of the box, and I've no doubt that's
barely the tip of the iceberg.

Both internal and external consistency are, for pretty much most
applications, factors that contribute to productivity. Having an
externally consistent program in no way excludes it being internally
consistent, so no point in setting up that straw man.

Any GUI toolkit will let you achieve internal consistency, and getting
really good usability from a GUI is 1% toolkit choice, 99% blood and
sweat. (My favourite GUI programs in terms of UI usability, and
consequently the ones I use most are firstly Opera, written in nothing
publically known for Windows, Qt3 for Linux, and IntelliJ IDEA, based on
the by-default-horrid Swing it makes sing and dance.) However, the
mindset of most Tk users seems to be to fight achieving external
consistency kicking and screaming and inventing nonarguments to prove
such patent nonsense as external consistence being undesirable. (That's
usually laziness, youthful zealotry, incompetence, or short time budget
speaking. Prove me wrong.)

Also, to set you right. People, or at least I (the only part of "people"
I can confidently speak for - for what part were you speaking and with
how much confidence when you used the words "people" and "they" again? -
obviously not yourself), don't just prefer eye candy. I want usable
interfaces that do what I need, do what I want, and do even what I
didn't know I wanted, and pay close attention now, that *also* look
good, look native-or-better (Java 6 giving me subpixel font AA on
Windows 2000 machines at work or under uncooperative Linux window
managers), act native-or-better (cf. some Windows programs that emulate
"scroll widget under cursor"). Both. And. No. Less. I am willing to and
have paid money to get that, and when forced to make a choice, there
will be something pissing me off with either alternative making me
wrestle lossage of some sort.

(PS: Just writing desktop integration in quotes doesn't make it of no
value. Refer to the missing the point by leagues bit above.)

Oh, and to make my position fully clear, I do hate Tk as a programmer
too. I find Qt linearly superior because of the object-oriented design,
MVC support, and the mixin architecture for separating UI and controller
logic, and QMetaObject::connectSlotsByName very reliably killing event
handler wireup boilerplate. And who really cares how you lay out the
widgets when there's Designer (the form designer that made me stop
hating form designers) to do that. Oh, and even with those features,
it's probably faster than Tk.

Tk isn't hardly the Ruby of GUI toolkits, with the massive advocating of
/ tolerance to mediocrity of results, it's the PHP of GUI toolkits.

David Vallner
No Way Someone Reads This Whole

Tk is wonderful! It's really simple to manipulate widgets and graphics
in the way you'd expect. IMHO, Tk is the Ruby of GUI toolkits.

I'm with David here. Tk isn't the Ruby of GUI toolkits. But I diverge
sharply from him after that. He says it's the PHP of GUI toolkits. I
say it's the GWBASIC of them.

Tk-based GUIs are typically so fscking useless that I'd rather use the
CLI and ed over an app coded in Tk.

I don't know why people hate it so much. They seem to prefer "desktop
integration" and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

You may want to do some reading before you embarrass yourself further.
Start with The Rise of Worse is Better
(http://www.jwz.org/doc/worse-is-better.html\). Then pick up a book on
good UI design. Almost any book written on the topic in, say, the past
20 years will open your eyes to just how much effort and thought goes
into a good user interface, GUI or otherwise. (Here's a hint: the vast
majority of user interfaces suck bowling balls through garden hoses.)

···

On Sun, 2006-17-12 at 10:09 +0900, Suraj Kurapati wrote:

--
Michael T. Richter
Email: ttmrichter@gmail.com, mtr1966@hotpop.com
MSN: ttmrichter@hotmail.com, mtr1966@hotmail.com; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
mtr1966@jabber.cn

"My paramount object in this struggle is to save the Union, and is not
either to save or to destroy slavery." --Abraham Lincoln

Richard wrote:

David Vallner wrote:

How would that be a desktop application?

To us programmers it would be a web app with a local server, but to
the user it would be indistinguishable from, say, an application built
with Visual C++ and Microsoft Foundation Classes running on a Windows
OS.

Now -that- I want to see. Really. Odds are it Just Won't unless you only
render in IE with high security privileges and abuse ActiveX with
reckless abandon.

Does that make sense to you?

As I'm generally not a fan of the heinous crimes commited in the name of
Ajax, I'd have to see the result for that to happen. Most of the
in-browser desktop mockups make me ask why not use Java Web Start /
ClickOnce / Flex anyway? DHTML still doesn't work fully reliably even
amongst standards-compliant browsers due to the W3C being too busy
reinventing the world in angle brackets and trying to force the shiny
markup language of the day down the throats of the whole ten people that
understand and need it instead of properly addressing Ajax (that
undoubtedly impacts more web users right now than the joke that is
XForms). And the dependencies for the above technologies aren't rocket
science to fullfill.

David Vallner

Suraj Kurapati wrote:

I don't know why people hate it so much. They seem to prefer "desktop
integration" and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

Some of us have to "sell" software, at least to managers - then it matters.

[Hide the women, children and livestock. This just got bloody as I
predicted.]

Also, you're missing the point. It's a GUI, noone really gives a damn if
the programmer had an easier time coding it if there's hundreds of users
that will feel constantly alienated by it because of some detail the
programmer didn't feel like bothering with.

[...]

David Vallner
No Way Someone Reads This Whole

I had. And it was good words. Really worth to be remembered and quoted.

(I've been freelance UI designer and usability consultant during several
years, so I somewhat know, what it all about.)

V.

···

From: David Vallner [mailto:david@vallner.net]
Sent: Sunday, December 17, 2006 5:56 AM

I did. And applauded most of the way through it. Programmers have a
very annoying habit of not only disregarding the end-users but, indeed,
actively sneering at them. This is why software sucks almost, but not
quite, universally.

···

On Sun, 2006-17-12 at 12:56 +0900, David Vallner wrote:

No Way Someone Reads This Whole

--
Michael T. Richter
Email: ttmrichter@gmail.com, mtr1966@hotpop.com
MSN: ttmrichter@hotmail.com, mtr1966@hotmail.com; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
mtr1966@jabber.cn

"My paramount object in this struggle is to save the Union, and is not
either to save or to destroy slavery." --Abraham Lincoln

David Vallner wrote:

Suraj Kurapati wrote:

I don't know why people hate it so much. They seem to prefer "desktop
integration" and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

Some of us have to "sell" software, at least to managers - then it
matters.

Bingo! That's where we differ. I don't sell software so I haven't had to
deal with market pressures and bosses and customers, etc. Thus, my claim
might have more merit when viewed in the interest of programmer
productivity/laziness.

Also, you're missing the point. It's a GUI, noone really gives a damn if
the programmer had an easier time coding it if there's hundreds of users
that will feel constantly alienated by it because of some detail the
programmer didn't feel like bothering with.

Alas, what a world we live in. The same goes for movies where the stars
and director get a substantial chunk of the publicity/credit while the
back-end sound engineer is largely ignored.

[...]

Approaching user interface design with a
programmer's mindset can only end in pain, tragedy, and Tk.

LOL good one. :slight_smile:

Also, you're confusing internal UI consistency, and external UI
consistency. Internal UI consistency is when the features of the UI fit
together to make working with the software alone productive (your clean
and functional).

Interesting.

External consistency is when the UI incorporates features that make
working with that software in connection with other software on the
computer productive. This means panels will scroll when the mouse is
over them and won't require clicking on the buttons. This means that the
file chooser, on XP, will have a "My Documents" button as the third one
in a button sidepanel on the left.

I don't use windows, so I'm quite satisfied with Tk's horrendous
appearance and its lack of integration with "My documents".
Nevertheless, I can understand your point of view and I do sympathize.

[...]

However, the
mindset of most Tk users seems to be to fight achieving external
consistency kicking and screaming and inventing nonarguments to prove
such patent nonsense as external consistence being undesirable.
(That's usually laziness, youthful zealotry,

Alright, you've caught me there :slight_smile:

Also, to set you right. People, or at least I (the only part of "people"
I can confidently speak for - for what part were you speaking and with
how much confidence when you used the words "people" and "they" again? -
obviously not yourself)

I do so with the confidence of uncertainty (probability = 0.5). When one
does not know the world, one naturally assumes the world is like one's
self. Alas, I am but a frog in a well.

[...]

David Vallner
No Way Someone Reads This Whole

Thanks for the lesson.

···

--
Posted via http://www.ruby-forum.com/\.

Michael T. Richter wrote:

Tk is wonderful! It's really simple to manipulate widgets and graphics
in the way you'd expect. IMHO, Tk is the Ruby of GUI toolkits.

I'm with David here. Tk isn't the Ruby of GUI toolkits. But I diverge
sharply from him after that. He says it's the PHP of GUI toolkits. I
say it's the GWBASIC of them.

Tk-based GUIs are typically so fscking useless that I'd rather use the
CLI and ed over an app coded in Tk.

I don't know why people hate it so much. They seem to prefer "desktop
integration" and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

You may want to do some reading before you embarrass yourself further.

Why should I fear embarrassing or otherwise making an ass out of myself?
Such fear would prevent me from learning and keep me ignorant forever.

Start with The Rise of Worse is Better
(http://www.jwz.org/doc/worse-is-better.html\). Then pick up a book on
good UI design. Almost any book written on the topic in, say, the past
20 years will open your eyes to just how much effort and thought goes
into a good user interface, GUI or otherwise. (Here's a hint: the vast
majority of user interfaces suck bowling balls through garden hoses.)

Thanks for the link and suggestions.

···

On Sun, 2006-17-12 at 10:09 +0900, Suraj Kurapati wrote:

--
Posted via http://www.ruby-forum.com/\.

Odds are it Just Won't unless you only
render in IE with high security privileges and abuse ActiveX with
reckless abandon.

A client's WindowsXP machine, for the purpose of running a Rails-based
app, will have Firefox running and invoke the app with
http://localhost:3000, which will be serviced by WEBrick, a Ruby-based
web server, supported by a publicly available database like MySQL. No
ActiveX nor security risks.

As I'm generally not a fan of the heinous crimes commited in the name of
Ajax, I'd have to see the result for that to happen.

I'll have an example on my website in a month. Send me an email
inviting me to contact you when it's ready if you're interested in
seeing it.

Most of the
in-browser desktop mockups make me ask why not use Java Web Start /
ClickOnce / Flex anyway?

IMHO, Ruby + Rails is a far superior way to build both desktop and web
apps. Java is, too my taste, a lousy C++, which I felt is the most
elegant programming language ever. But I've come to see that Ruby is
the most economical yet powerful (in terms of programmer effort)
languages ever. Of course, I'm not really qualified to make such
judgments, despite 40+ years of professional programming experience
with IBM mainframe assembler, Fortran, and Cobol to desktop Visual C++.

I see by your disdain of some aspects of the current state of affairs
that you've thought a lot about some of these issues, so I'm
interested in knowing whether you're more sanguine about the
Ruby-Rails-WEBrick-MySQL environment.

Best wishes,
Richard Muller

Odds are it Just Won't unless you only
render in IE with high security privileges and abuse ActiveX with
reckless abandon.

A client's WindowsXP machine, for the purpose of running a Rails-based
app, will have Firefox running and invoke the app with
http://localhost:3000, which will be serviced by WEBrick, a Ruby-based
web server, and supported by a publicly available database-server like
MySQL. No
ActiveX nor security risks. But plenty of Ajax.

As I'm generally not a fan of the heinous crimes committed in the name of
Ajax, I'd have to see the result for that to happen.

I'll have an example on a website in a month.

Most of the
in-browser desktop mockups make me ask why not use Java Web Start /
ClickOnce / Flex anyway?

IMHO, Ruby + Rails is a far superior way to build both desktop and web
apps. Java is, too my taste, a lousy C++, which I felt is the most
elegant programming language ever. But I've come to see that Ruby is
the most economical yet powerful (in terms of programmer effort)
languages ever. Of course, I'm not really qualified to make such
judgments, despite 40+ years of professional programming experience
with IBM mainframe assembler, Fortran, and Cobol to desktop Visual C++.

I see by your disdain of some aspects of the current state of affairs
that you've thought a lot about some of these issues, so I'm
interested in knowing whether you're more sanguine about the
Firefox-Ruby-Rails-WEBrick-MySQL environment.

As I said, I'll have a sample app up in a month or so housed on a
website that supports Ruby-Rails-MySQL apps. If you wish, send me an
email indicating your interest and I'll respond with URL, user-name
and password when it's ready. Right now I'm toying with the idea of
posting a small reward to anyone who can crack the web app and email me
selected content from it (sort of a poor man's way of tests done on the
DES, as I recall).

Best wishes,
Richard Muller

Apart from the TkCanvas, which is utterly brilliant. How many other
toolkits give you a vector-oriented canvas, in which you can draw
graphical objects that respond to click events, for free?

martin

···

On 12/17/06, Michael T. Richter <ttmrichter@gmail.com> wrote:

On Sun, 2006-17-12 at 10:09 +0900, Suraj Kurapati wrote:
Tk is wonderful! It's really simple to manipulate widgets and graphics
in the way you'd expect. IMHO, Tk is the Ruby of GUI toolkits.

I'm with David here. Tk isn't the Ruby of GUI toolkits. But I diverge sharply from him after that. He says it's the PHP of GUI toolkits. I say it's the GWBASIC of them.

Tk-based GUIs are typically so fscking useless that I'd rather use the CLI and ed over an
app coded in Tk.

> You may want to do some reading before you embarrass yourself further.

Why should I fear embarrassing or otherwise making an ass out of myself?
Such fear would prevent me from learning and keep me ignorant forever.

That is both an interesting and a refreshing attitude. However there is
a key word you missed above: "further".

Being afraid of initial embarrassment is silly. Mistakes are a part of
life and ignorance is the default condition. (I'd even, in my more
cynical moments, extend "ignorance" to "stupidity" in the previous
sentence -- yes, self included.) What you should be afraid of is
repeated embarrassment: embarrassment on the same (or similar) points.

Being initially embarrassed is a sign of learning. Being further
embarrassed on the same topic is a sign of not learning. See what I
mean?

> Start with The Rise of Worse is Better
> (http://www.jwz.org/doc/worse-is-better.html\). Then pick up a book on
> good UI design. Almost any book written on the topic in, say, the past
> 20 years will open your eyes to just how much effort and thought goes
> into a good user interface, GUI or otherwise. (Here's a hint: the vast
> majority of user interfaces suck bowling balls through garden hoses.)

Thanks for the link and suggestions.

Thanks for the refreshing outlook. Usually people who talk about how
"tool <foo> is great and people who don't like it Just Don't Get It"
aren't so open-minded. If you want to take this off-list, I might even
be able to direct you to some decent books on HUI design (or at least
some web pages with decent information).

···

On Sun, 2006-17-12 at 14:16 +0900, Suraj Kurapati wrote:

--
Michael T. Richter
Email: ttmrichter@gmail.com, mtr1966@hotpop.com
MSN: ttmrichter@hotmail.com, mtr1966@hotmail.com; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
mtr1966@jabber.cn

"[Blacks] ... are inferior to the whites in the endowments both of body
and mind." --Thomas Jefferson