Discussion in 'Ruby' started by wit, Aug 3, 2003.

1. ### witGuest

Hi.

A few weeks ago, while I was evaluating Python and Java for my
next project I found about Ruby.
I read some parts of the "Programming Ruby" (great book BTW)
and tried programming some small scripts in Ruby.
I must say after this experience, I will never be the same ;-)
This language has some kind of elegance, that struck me
immediately. I've programmed in some other languages:
Asembler, Pascal, C, C++, and lately (since 1996) almost
exclusively in Java.

Now, my real trouble is: I have to choose the language for
my next dosktop app. The future of my one-person company
depends on this product. It will be a technical analysis app for
stock markets, that would probably take about 40-50k lines
of Java code.
I know I can safely choose Java+SWT or Python+wxWindows
and it will be OK.
However, I will feel really unhappy if I don't write this app in Ruby
(and some small parts in C).
I'm little worried about Ruby's maturity, especially on Win32 platform.

I wonder, what would you guys do in a similar situation and why.

And Matz, thanks for this beautiful language.

wit
wit, Aug 3, 2003

2. ### Shashank DateGuest

"wit" <> wrote in message
> I read some parts of the "Programming Ruby" (great book BTW)
> and tried programming some small scripts in Ruby.
> I must say after this experience, I will never be the same ;-)

Welcome ! We all have experienced the same feeling

> This language has some kind of elegance, [snip]

Yep!

[snip]

> I'm little worried about Ruby's maturity, especially on Win32 platform.

If by "maturity" you mean:

* stability,
* ease of use (installation, etc),
* interface to Win32 API,
* interface to OLE automation,
* documentation (of Windows specific stuff),
* support of various free 32-bit compilers for Win 32 (Mingw, cygwin)
* support of non-free Microsoft Visual C++ ( I recommend that you try out
/\ndy's one click installer for this one)

and such issues then it is fairly mature. No need to worry there ! We have
been using it for quite some time and there are many experts on this ML who

The one thing that IMO, is not supported like it is on *ix platforms is the
of "fork/exec") within the language. You will have to rely on libraries
(external) for that.

Feel free to voice your concerns in more specific terms and I am sure you
will get heard and some one will respond.
HTH,
-- shanko
Shashank Date, Aug 3, 2003

3. ### Emmanuel TouzeryGuest

On Sunday 03 of August 2003 19:06, wit wrote:
> Hi.

Hello,

> Now, my real trouble is: I have to choose the language for
> my next dosktop app. The future of my one-person company
> depends on this product. It will be a technical analysis app for
> stock markets, that would probably take about 40-50k lines
> of Java code.
> I know I can safely choose Java+SWT or Python+wxWindows
> and it will be OK.
> However, I will feel really unhappy if I don't write this app in Ruby
> (and some small parts in C).
> I'm little worried about Ruby's maturity, especially on Win32 platform.

Dave Thomas wrote a 26000 lines ruby application in few months, he wrote a
short report at:
http://www.zenspider.com/dl/rubyconf2002/SummerVacation.tgz

IIRC, his conclusion is something like "couldn't have done it in ruby, but
sometimes you have to look in the source to fix things when doing advanced
things".

in my little ruby experience, FXRuby is good, only you have the limitations of
FOX (most of the time it's ok). and i met a garbage collection bug, that i
fixed temporarily by disabling the garbage collector. generally i'm very
satisfied.

emmanuel
--
"Droit devant soi, on ne peut pas aller bien loin"
- Le petit prince, Antoine de Saint Exupéry
Emmanuel Touzery, Aug 3, 2003
4. ### Dave ThomasGuest

Emmanuel Touzery wrote:

> Dave Thomas wrote a 26000 lines ruby application in few months, he wrote a
> short report at:
> http://www.zenspider.com/dl/rubyconf2002/SummerVacation.tgz
>
> IIRC, his conclusion is something like "couldn't have done it in ruby, but
> sometimes you have to look in the source to fix things when doing advanced
> things".

To be fair, the conclusion was "couldn't have done it _without_ Ruby..."

I think the OP has some valid concerns if he's straying into
lower-levels of the language under Windows. However, if he sticks to
more conventional code, I'd say Ruby and either wxWindows or Fox is a
good bet, and the resulting code will probably be a lot easier to
maintain and enhance than it would be in many other languages.

Cheers

Dave
Dave Thomas, Aug 3, 2003
5. ### Volker GrabschGuest

In article <>, Dave Thomas wrote:
> I think the OP has some valid concerns if he's straying into
> lower-levels of the language under Windows. However, if he sticks to
> more conventional code, I'd say Ruby and either wxWindows or Fox is a
> good bet, and the resulting code will probably be a lot easier to
> maintain and enhance than it would be in many other languages.

Well, I don't like TK that much and I haven't workes a lot with it, so
the better question:

I never worked with wxWindows, so I'd like to know whether I should
learn wxWindows or use Gtk as in C ..

Greets,

--
Volker Grabsch
---<<(())>>---
\frac{\left|\vartheta_0\times\{\ell,\kappa\in\Re\}\right|}{\sqrt
[G]{-\Gamma(\alpha)\cdot\mathcal{B}^{\left[\oint\!c_\hbar\right]}}}
Volker Grabsch, Aug 3, 2003
6. ### witGuest

U¿ytkownik "Shashank Date" <> napisa³ w wiadomo¶ci
news:bgjg36$p9lo0$-berlin.de...
>
> "wit" <> wrote in message
> > I read some parts of the "Programming Ruby" (great book BTW)
> > and tried programming some small scripts in Ruby.
> > I must say after this experience, I will never be the same ;-)

>
> Welcome ! We all have experienced the same feeling
>
> > This language has some kind of elegance, [snip]

>
> Yep!
>
> [snip]
>
> > I'm little worried about Ruby's maturity, especially on Win32 platform.

>
> If by "maturity" you mean:

I will try to explain it more clearly below. I will also say, what I'm
willing to compromise.

>
> * stability,

This is a must for a finished product. So far, I've had the best results
with Java.

> * ease of use (installation, etc),

For a developer not necessarilly, for end user of my product, YES.

> * interface to Win32 API,

The native user interface is a must on Windows.
I have 2 choices:
-SWT (available with Java)
-wxWindows (not ready for Ruby yet)

Using WinAPI or MFC would make my application Windows Only.
I would like to avoid that.

I admire FOX toolkit and it's Ruby binding, but I know my users
would not feel really comfortable with it.

> * interface to OLE automation,

Probably won't need it.

> * documentation (of Windows specific stuff),

It's important but not critical. Ruby source code is available,
and I think I can learn a lot about good programming just by
studying it.

> * support of various free 32-bit compilers for Win 32 (Mingw, cygwin)

Not critical, but useful.

> * support of non-free Microsoft Visual C++ ( I recommend that you try out
> /\ndy's one click installer for this one)

I've tried it - works really good.
I have even been able to compile Ruby with Visual C++ .NET 2002 STD
(only with a lot of warnings about not supported optimization flags).

> and such issues then it is fairly mature. No need to worry there ! We have
> been using it for quite some time and there are many experts on this ML

who
>
> The one thing that IMO, is not supported like it is on *ix platforms is

the
> of "fork/exec") within the language. You will have to rely on libraries
> (external) for that.

Yes, I'm aware of that. It really worries me, because my application
will need to be multithreaded. Users must be able to use it online
with real-time data feed.
It my be a showstopper for me.
Is it possible to create Ruby (maybe with some C code) multithreaded
application on Win32 without blocking the whole app. when
waiting for/sending data over http?

> Feel free to voice your concerns in more specific terms and I am sure you
> will get heard and some one will respond.
> HTH,
> -- shanko
>

if you could.

wit
wit, Aug 3, 2003
7. ### witGuest

Uzytkownik "Emmanuel Touzery" <> napisal w
> On Sunday 03 of August 2003 19:06, wit wrote:
> > Hi.

>
> Hello,
>
> > Now, my real trouble is: I have to choose the language for
> > my next dosktop app. The future of my one-person company
> > depends on this product. It will be a technical analysis app for
> > stock markets, that would probably take about 40-50k lines
> > of Java code.
> > I know I can safely choose Java+SWT or Python+wxWindows
> > and it will be OK.
> > However, I will feel really unhappy if I don't write this app in Ruby
> > (and some small parts in C).
> > I'm little worried about Ruby's maturity, especially on Win32 platform.

>
> Dave Thomas wrote a 26000 lines ruby application in few months, he wrote a
> short report at:
> http://www.zenspider.com/dl/rubyconf2002/SummerVacation.tgz
>
> IIRC, his conclusion is something like "couldn't have done it in ruby, but
> sometimes you have to look in the source to fix things when doing advanced
> things".
>

Thanks, I will look at that.

> in my little ruby experience, FXRuby is good, only you have the

limitations of
> FOX (most of the time it's ok). and i met a garbage collection bug, that i
> fixed temporarily by disabling the garbage collector. generally i'm very
> satisfied.

FXRuby is nice, but I must use native Windows widgets.

> emmanuel
> --
> "Droit devant soi, on ne peut pas aller bien loin"
> - Le petit prince, Antoine de Saint Exupéry
>

wit
wit, Aug 3, 2003
8. ### Shashank DateGuest

"wit" <> wrote in message
[snip]

> Is it possible to create Ruby (maybe with some C code) multithreaded
> application on Win32 without blocking the whole app. when
> waiting for/sending data over http?

I am not qualified to answer that specific question (since I never played
with
sending data over HTTP in a mutli-threaded app), but Richard Kilmer may
have
apps in Ruby and with minor tweaks, they have worked fine.

I urge you to take a look at Park Heesob's win32_popen on RAA, if you are
looking for "popen" (spawning subprocesses with accessible I/O streams)
like functionality:

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

Also, if you can wait for some time (Matz knows how long) , I think, we will
have this functionality for Windows available within the language.

Hang on for a while ...

-- shanko
Shashank Date, Aug 4, 2003
9. ### Daniel CarreraGuest

On Mon, Aug 04, 2003 at 04:00:31AM +0900, Hal E. Fulton wrote:
> > I think the OP has some valid concerns if he's straying into
> > lower-levels of the language under Windows. However, if he sticks to
> > more conventional code, I'd say Ruby and either wxWindows or Fox is a
> > good bet, and the resulting code will probably be a lot easier to
> > maintain and enhance than it would be in many other languages.

>
> wxWindows?? Is that stable yet? Did you mean
> something else?

I will do cartwheels if wxWindows is stable. I've been really hoping to
try it out.

I've looked through RAA and I couldn't find the project.
Does anyone know the status of wxRuby?

Cheers,
--
Daniel Carrera | PGP: 6643 8C8B 3522 66CB D16C D779 2FDD 7DAC 9AF7 7A88
Math PhD. UMD | http://www.math.umd.edu/~dcarrera/pgp.html

* * * * * Weekly Smile * * * * * * * * * * * * * * * * * * * * * * * *
Visitors are expected to complain at the office between the hours
of 9 and 11 A.M. daily.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Daniel Carrera, Aug 4, 2003
10. ### Daniel CarreraGuest

When the time comes, if anyone is interested, I can test on a Sun SPARC.
I'm not very proficient with C/C++ so I doubt I'd be able to fix bugs, but
I can run tests and report on results.

Cheers,
Daniel.

On Mon, Aug 04, 2003 at 10:53:24AM +0900, Richard Kilmer wrote:
> WxRuby is close to an initial (very early) Alpha release. It will be
> released in that (early) stage within the next few weeks. The author,
> Kevin Smith, is actually using it to construct an email application for
> himself as both a learning exercise, and to demonstrate/document the
> WxRuby API. Several folks across various platforms are working on
> testing the early release on win32, mingw, os x and Linux (which Kevin
> runs). I must say that Kevin is making great progress.
>
> The project is currently on Savannah, but is moving to RubyForge (over
> the next few days) here:
>
> http://rubyforge.org/projects/wxruby/
>
>
> Best,
>
> Rich

--
Daniel Carrera | PGP: 6643 8C8B 3522 66CB D16C D779 2FDD 7DAC 9AF7 7A88
Math PhD. UMD | http://www.math.umd.edu/~dcarrera/pgp.html

* * * * * Weekly Smile * * * * * * * * * * * * * * * * * * * * * * * *
Visitors are expected to complain at the office between the hours
of 9 and 11 A.M. daily.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Daniel Carrera, Aug 4, 2003
11. ### witGuest

U¿ytkownik "Shashank Date" <> napisa³ w wiadomo¶ci
news:bgk7fr$plujd$-berlin.de...
>
> "wit" <> wrote in message
> [snip]
>
> > Is it possible to create Ruby (maybe with some C code) multithreaded
> > application on Win32 without blocking the whole app. when
> > waiting for/sending data over http?

>
> I am not qualified to answer that specific question (since I never played
> with
> sending data over HTTP in a mutli-threaded app), but Richard Kilmer may
> have
> apps in Ruby and with minor tweaks, they have worked fine.
>
> I urge you to take a look at Park Heesob's win32_popen on RAA, if you are
> looking for "popen" (spawning subprocesses with accessible I/O streams)
> like functionality:
>
> http://raa.ruby-lang.org/list.rhtml?name=win32_popen
>

I will look at that...

>
> Also, if you can wait for some time (Matz knows how long) , I think, we

will
> have this functionality for Windows available within the language.
>
> Hang on for a while ...
>
> -- shanko
>

Thanks.
I will begin development in october so I can only wait 2 months.

wit
wit, Aug 4, 2003
12. ### Emmanuel TouzeryGuest

wit wrote:

>>Also, if you can wait for some time (Matz knows how long) , I think, we
>>
>>

>will
>
>
>>have this functionality for Windows available within the language.
>>
>>Hang on for a while ...
>>
>>-- shanko
>>
>>
>>

>
>Thanks.
>I will begin development in october so I can only wait 2 months.
>
>wit
>

opinion: in this time, there's no way it should be more than alpha. in
my mind, the timeline is much longer than that. you should base your
evaluation on ruby 1.8 i'd say.

emmanuel
Emmanuel Touzery, Aug 4, 2003
13. ### otGuest

On Mon, 2003-08-04 at 03:06, wit wrote:
> Hi.
>
> A few weeks ago, while I was evaluating Python and Java for my
> next project I found about Ruby.
> I read some parts of the "Programming Ruby" (great book BTW)
> and tried programming some small scripts in Ruby.
> I must say after this experience, I will never be the same ;-)
> This language has some kind of elegance, that struck me
> immediately.

Hi and welcome to Ruby. I'm also new to this list. I discovered Ruby a
few years ago while researching some object oriented languages and was
also struck by the elegance of Ruby.

> Now, my real trouble is: I have to choose the language for
> my next dosktop app. The future of my one-person company
> depends on this product. It will be a technical analysis app for
> stock markets, that would probably take about 40-50k lines
> of Java code.

I am also in the process of writing a stock market analysis program and
am planning to use artificial neural networks (libneural) to do the
analysis for me. I've decided to use Ruby for its ability to do lot with
very few lines of code.

Cheers,
Ot.
ot, Aug 4, 2003
14. ### witGuest

U¿ytkownik "ot" <> napisa³ w wiadomo¶ci
news:1060004068.21379.70.camel@localhost...
> On Mon, 2003-08-04 at 03:06, wit wrote:
> > Hi.
> >
> > A few weeks ago, while I was evaluating Python and Java for my
> > next project I found about Ruby.
> > I read some parts of the "Programming Ruby" (great book BTW)
> > and tried programming some small scripts in Ruby.
> > I must say after this experience, I will never be the same ;-)
> > This language has some kind of elegance, that struck me
> > immediately.

> Hi and welcome to Ruby. I'm also new to this list. I discovered Ruby a
> few years ago while researching some object oriented languages and was
> also struck by the elegance of Ruby.
>
>
> > Now, my real trouble is: I have to choose the language for
> > my next dosktop app. The future of my one-person company
> > depends on this product. It will be a technical analysis app for
> > stock markets, that would probably take about 40-50k lines
> > of Java code.

> I am also in the process of writing a stock market analysis program and
> am planning to use artificial neural networks (libneural) to do the
> analysis for me. I've decided to use Ruby for its ability to do lot with
> very few lines of code.
>
> Cheers,
> Ot.
>

Good luck!

wit
wit, Aug 4, 2003